autoconf 2.13 - patch 19990117 - T.Dickey <dickey@clark.net>
This is a resync against autoconf 2.13 of my changes to autoconf 2.12:
+ improve the AC_OUTPUT macro by allowing it to generate the contents
of the config.h file rather than simply substituting in a template.
+ change the autoconf logic that builds up & displays the --help
message. This is a workaround for shells with limited environment
space.
+ changes (from the lynx project) to config.guess and config.sub to
work with CLIX and os390 platforms.
+ correct autoconf 2.13's "make distclean" rule, which did not clean
the .m4f files.
# ------------------------------------------------------------------------------
# Makefile.in | 2 -
# acgeneral.m4 | 110 ++++++++++++++++++++++++++++++++++++++++++++------------
# autoconf.info | 13 ++++++
# config.guess | 24 +++++++-----
# config.sub | 12 +++++-
# configure | 22 ++++++-----
# 6 files changed, 137 insertions, 46 deletions
# ------------------------------------------------------------------------------
Index: Makefile.in
--- autoconf-2.13+/Makefile.in Tue Jan 5 08:27:16 1999
+++ autoconf-2.13-990117/Makefile.in Sun Jan 17 11:15:33 1999
@@ -206,7 +206,7 @@
rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas
distclean maintainer-clean::
- rm -f Makefile config.status config.cache config.log
+ rm -f Makefile config.status config.cache config.log $(M4FROZEN)
TAGS:
etags ${srcdir}/*.m4 ${srcdir}/*.sh ${srcdir}/[a-z]*.in ${srcdir}/*.texi
Index: acgeneral.m4
--- autoconf-2.13+/acgeneral.m4 Tue Jan 5 08:27:37 1999
+++ autoconf-2.13-990117/acgeneral.m4 Sun Jan 17 11:03:03 1999
@@ -52,7 +52,7 @@
divert(-1)dnl Throw away output until AC_INIT is called.
changequote([, ])
-define(AC_ACVERSION, 2.13)
+define(AC_ACVERSION, 2.13.19990117)
dnl Some old m4's don't support m4exit. But they provide
dnl equivalent functionality by core dumping because of the
@@ -78,14 +78,18 @@
dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line
define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings
define(AC_DIVERSION_INIT, 2)dnl initialization code
-define(AC_DIVERSION_NORMAL_4, 3)dnl AC_REQUIRE'd code, 4 level deep
-define(AC_DIVERSION_NORMAL_3, 4)dnl AC_REQUIRE'd code, 3 level deep
-define(AC_DIVERSION_NORMAL_2, 5)dnl AC_REQUIRE'd code, 2 level deep
-define(AC_DIVERSION_NORMAL_1, 6)dnl AC_REQUIRE'd code, 1 level deep
-define(AC_DIVERSION_NORMAL, 7)dnl the tests and output code
-define(AC_DIVERSION_SED, 8)dnl variable substitutions in config.status
-define(AC_DIVERSION_CMDS, 9)dnl extra shell commands in config.status
-define(AC_DIVERSION_ICMDS, 10)dnl extra initialization in config.status
+define(AC_DIVERSION_HELP, 3)dnl user help-messages
+define(AC_DIVERSION_INIT2, 4)dnl initialization code, part 2
+define(AC_DIVERSION_NORMAL_4, 5)dnl AC_REQUIRE'd code, 4 level deep
+define(AC_DIVERSION_NORMAL_3, 6)dnl AC_REQUIRE'd code, 3 level deep
+define(AC_DIVERSION_NORMAL_2, 7)dnl AC_REQUIRE'd code, 2 level deep
+define(AC_DIVERSION_NORMAL_1, 8)dnl AC_REQUIRE'd code, 1 level deep
+define(AC_DIVERSION_NORMAL, 9)dnl the tests and output code
+define(AC_DIVERSION_SED, 10)dnl variable substitutions in config.status
+define(AC_DIVERSION_CMDS, 12)dnl extra shell commands in config.status
+define(AC_DIVERSION_ICMDS, 12)dnl extra initialization in config.status
+dnl
+define(ac_help_count, 0)dnl
dnl Change the diversion stream to STREAM, while stacking old values.
dnl AC_DIVERT_PUSH(STREAM)
@@ -101,6 +105,22 @@
divert(AC_DIVERSION_CURRENT)dnl
])
+dnl Send text to the user help-message list. We will expand it as a here-
+dnl document, so we'll split it to avoid too-long strings.
+dnl AC_DIVERT_HELP(message)
+define(AC_DIVERT_HELP,
+[AC_DIVERT_PUSH(AC_DIVERSION_HELP)dnl
+ifelse(ac_help_count,0,[--enable and --with options recognized:
+])dnl
+define([ac_help_count], builtin(eval, ac_help_count + 1))dnl
+[$1]
+ifelse(ac_help_count,13,[EOF
+cat <<EOF
+define([ac_help_count], 1)dnl
+])dnl
+AC_DIVERT_POP()dnl
+])
+
dnl Initialize the diversion setup.
define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
dnl This will be popped by AC_REQUIRE in AC_INIT.
@@ -346,11 +366,12 @@
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
-changequote([, ])dnl
EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
+changequote([, ])dnl
+cat <<EOF])dnl
+dnl User help-messages will be inserted "here".
+AC_DEFUN(AC_INIT_PARSE_ARGS2,
+[EOF
exit 0 ;;
-host | --host | --hos | --ho)
@@ -586,6 +607,9 @@
AC_DIVERT_POP()dnl to NORMAL
AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
AC_INIT_PARSE_ARGS
+AC_DIVERT_POP()dnl to NORMAL
+AC_DIVERT_PUSH(AC_DIVERSION_INIT2)dnl
+AC_INIT_PARSE_ARGS2
AC_INIT_PREPARE($1)dnl
AC_DIVERT_POP()dnl to NORMAL
])
@@ -728,10 +752,7 @@
dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
AC_DEFUN(AC_ARG_ENABLE,
-[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
-ac_help="$ac_help
-[$2]"
-AC_DIVERT_POP()dnl
+[AC_DIVERT_HELP([$2])
[#] Check whether --enable-[$1] or --disable-[$1] was given.
if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
enableval="[$enable_]patsubst([$1], -, _)"
@@ -753,10 +774,7 @@
dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
AC_DEFUN(AC_ARG_WITH,
-[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
-ac_help="$ac_help
-[$2]"
-AC_DIVERT_POP()dnl
+[AC_DIVERT_HELP([$2])
[#] Check whether --with-[$1] or --without-[$1] was given.
if test "[${with_]patsubst([$1], -, _)+set}" = set; then
withval="[$with_]patsubst([$1], -, _)"
@@ -2062,7 +2080,7 @@
dnl The big finish.
dnl Produce config.status, config.h, and links; and configure subdirs.
-dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
+dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS] [, SAVE-DEFS])
define(AC_OUTPUT,
[trap '' 1 2 15
AC_CACHE_SAVE
@@ -2083,7 +2101,11 @@
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
+ifdef([AC_LIST_HEADER],
+[ifelse($4,,,[define(AC_SAVE_DEFS,$4)])dnl
+DEFS=-DHAVE_CONFIG_H],
+[ifelse($4,,,AC_MSG_WARN(ignored save-defs parameter))
+AC_OUTPUT_MAKE_DEFS()])
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
@@ -2140,10 +2162,12 @@
EOF
cat >> $CONFIG_STATUS <<EOF
undivert(AC_DIVERSION_ICMDS)dnl
+# Extra initialization commands, if any
$3
EOF
cat >> $CONFIG_STATUS <<\EOF
undivert(AC_DIVERSION_CMDS)dnl
+# Extra commands, if any
$2
exit 0
EOF
@@ -2364,6 +2388,45 @@
EOF
+ifdef([AC_SAVE_DEFS],
+[
+# Transform confdefs.h into a list of #define's. We won't use it as a sed
+# script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
+# be either 'cat' or 'sort'.
+AC_SAVE_DEFS confdefs.h >conftest.vals
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+echo ' rm -f conftest.frag' >> $CONFIG_STATUS
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write chunks of a limited-size here document to conftest.frag.
+ echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+# Run sed to substitute the contents of conftest.frag into conftest.in at the
+# marker @DEFS@.
+echo ' cat >> conftest.edit <<CEOF
+/@DEFS@/r conftest.frag
+/@DEFS@/d
+CEOF
+sed -f conftest.edit conftest.in > conftest.out
+rm -f conftest.in
+mv conftest.out conftest.in
+rm -f conftest.edit conftest.frag
+' >> $CONFIG_STATUS
+],[
# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h. And first:
# Protect against being on the right side of a sed subst in config.status.
@@ -2414,6 +2477,7 @@
mv conftest.tail conftest.vals
done
rm -f conftest.vals
+])
dnl Now back to your regularly scheduled config.status.
cat >> $CONFIG_STATUS <<\EOF
Index: autoconf.info
--- autoconf-2.13+/autoconf.info Tue Jan 5 08:43:40 1999
+++ autoconf-2.13-990117/autoconf.info Sun Jan 17 11:00:04 1999
@@ -709,7 +709,7 @@
other files resulting from configuration. The only other required
macro is `AC_INIT' (*note Input::.).
- - Macro: AC_OUTPUT ([FILE... [, EXTRA-CMDS [, INIT-CMDS]]])
+ - Macro: AC_OUTPUT ([FILE... [, EXTRA-CMDS [, INIT-CMDS] [, SAVE-DEFS]]])
Create output files. Call this macro once, at the end of
`configure.in'. The FILE... argument is a whitespace-separated
list of output files; it may be empty. This macro creates each
@@ -744,6 +744,17 @@
variables from `configure' to the EXTRA-CMDS. If
`AC_OUTPUT_COMMANDS' has been called, the commands given to it are
run just before the commands passed to this macro.
+
+ If you specify SAVE-DEFS, autoconf will save the #define's in a
+ different form, for use in the files specified in AC_CONFIG_HEADER.
+ In this case, autoconf substitutes the C-style #define's where it
+ finds @DEFS@. This runs faster, and is simpler to maintain than
+ building a file of #undef's, since autoconf will automatically
+ generate a #define for each AC_DEFINE that you execute in the
+ configure script. The value for SAVE-DEFS should be either 'cat', or
+ 'sort'; this value is used to filter the list of #define's before
+ editing. Sorted lists are easier to read, but you may wish to see the
+ definitions in the order that they were processed.
- Macro: AC_OUTPUT_COMMANDS (EXTRA-CMDS [, INIT-CMDS])
Specify additional shell commands to run at the end of
Index: config.guess
--- autoconf-2.13+/config.guess Tue Jan 5 08:28:47 1999
+++ autoconf-2.13-990117/config.guess Sun Jan 17 10:46:35 1999
@@ -234,7 +234,7 @@
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
- 2020:CLIX:*:*)
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
@@ -307,6 +307,10 @@
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
+ *:MVS:*:* | *:OS390:*:*|*:OS/390:*:*)
+ # uname -m gives a processor model number /* S/390 -- gil -- 1389 */
+ echo s390-ibm-os390 # on R1 and R2, uname -s reports OS390
+ exit 0 ;; # on R3, uname -s reports OS/390
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
@@ -372,21 +376,21 @@
sed 's/^ //' << EOF >dummy.c
#include <stdlib.h>
#include <unistd.h>
-
+
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
- #endif
+ #endif
long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
+
+ switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
+ case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
- switch (bits)
+ switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
@@ -394,7 +398,7 @@
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
- #endif
+ #endif
default: puts ("hppa1.0"); break;
}
exit (0);
@@ -600,14 +604,14 @@
16)
UNAME_MACHINE="alphaev6"
;;
- esac
+ esac
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
- fi
+ fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
Index: config.sub
--- autoconf-2.13+/config.sub Tue Jan 5 08:28:51 1999
+++ autoconf-2.13-990117/config.sub Sun Jan 17 10:49:12 1999
@@ -349,6 +349,13 @@
basic_machine=i370-ibm
os=-mvs
;;
+ s390 | s390-ibm*)
+# OS/390 support after:
+# Linkname: Mortice Kern Systems (MKS) Inc. - OS/390 OpenEdition -- GNU Utilities Downloads
+# URL: http://www.mks.com/s390/gnu/download.htm#autoconf
+ basic_machine=s390-ibm # /* S/390 -- gil -- 1419 */
+ os=-os390
+ ;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[34567]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
@@ -707,7 +714,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* | -os390* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
@@ -829,6 +836,9 @@
;;
*-be)
os=-beos
+ ;;
+ s390-ibm)
+ os=-os390 # /* S/390 -- gil -- 1451 */
;;
*-ibm)
os=-aix
Index: configure
--- autoconf-2.13+/configure Tue Jan 5 08:28:57 1999
+++ autoconf-2.13-990117/configure Sun Jan 17 11:06:59 1999
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
+# Generated automatically using autoconf version 2.13.19990117
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -181,9 +181,8 @@
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
+cat <<EOF
+EOF
exit 0 ;;
-host | --host | --hos | --ho)
@@ -333,7 +332,7 @@
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
+ echo "configure generated by autoconf version 2.13.19990117"
exit 0 ;;
-with-* | --with-*)
@@ -547,7 +546,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:551: checking for $ac_word" >&5
+echo "configure:550: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -588,7 +587,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:592: checking for $ac_word" >&5
+echo "configure:591: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -621,7 +620,7 @@
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:625: checking for $ac_word" >&5
+echo "configure:624: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -691,7 +690,7 @@
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:695: checking for a BSD compatible install" >&5
+echo "configure:694: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -812,6 +811,7 @@
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
@@ -851,7 +851,7 @@
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13.19990117"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -1005,9 +1005,11 @@
EOF
cat >> $CONFIG_STATUS <<EOF
+# Extra initialization commands, if any
EOF
cat >> $CONFIG_STATUS <<\EOF
+# Extra commands, if any
exit 0
EOF