From: David MacKenzie Date: Wed, 20 Nov 1996 21:27:29 +0000 (+0000) Subject: cleanups X-Git-Tag: fsf-origin~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8801bfce14465187d222458b5aed04879d9cd4f5;p=thirdparty%2Fautoconf.git cleanups --- diff --git a/ChangeLog b/ChangeLog index a732e5b6..03cb0d38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,14 @@ Wed Nov 20 13:00:21 1996 David J MacKenzie + * Test release 2.11.1. + * acgeneral.m4 (AC_TRY_LIB): Remove an erroneous dnl. (AC_TRY_COMPILE): Make the final newline consistent with the other AC_TRY_* macros. - + (AC_DIVERSION_CMDS, AC_DIVERSION_ICMDS): New macros. + (AC_OUTPUT_COMMANDS, AC_OUTPUT): Use them instead of appending to + list macros. + * acgeneral.m4 (AC_CACHE_SAVE): Handle cache variable values correctly even if they contain single quote, or are quoted by the shell. From Paul Eggert . diff --git a/TODO b/TODO index 4a15fdd1..c6b7ac84 100644 --- a/TODO +++ b/TODO @@ -562,18 +562,19 @@ Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov> ------------------------------------------------------------------------------ -Modify the meaning of autoheader --localdir to add an additional -directory to look for acconfig.h instead of replacing the directory -containing configure.in. You can't have both directories that are -parts of a large package, and directories that are independent -packages. (Also, autoreconf recurses on all subdirectories containing -a configure.in, not just those given by an AC_CONFIG_SUBDIRS -directive.) +autoreconf doesn't support having (in the same tree) both directories +that are parts of a larger package (sharing aclocal.m4 and acconfig.h), +and directories that are independent packages (each with their own ac*). +It assumes that they are all part of the same package, if you use --localdir, +or that each directory is a separate package, if you don't use it. -Marc Horowitz +autoreconf should automatically figure out which ac* files to use--the +closest ones up the tree from each directory, probably, unless +overridden by --localdir. ------------------------------------------------------------------------------- - -Rewrite AC_OUTPUT_COMMANDS to use diversions. +Also, autoreconf recurses on all subdirectories containing a +configure.in, not just those given by an AC_CONFIG_SUBDIRS directive. +This may not be a problem in practice. ------------------------------------------------------------------------------ + diff --git a/acgeneral.m4 b/acgeneral.m4 index 4fd7d8ce..d070d98d 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -72,17 +72,20 @@ dnl ### Defining macros dnl m4 output diversions. We let m4 output them all in order at the end, -dnl except that we explicitly undivert AC_DIVERSION_SED. +dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS, +dnl and AC_DIVERSION_ICMDS. 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_SED, 3)dnl variable substitutions in config.status -define(AC_DIVERSION_NORMAL_4, 4)dnl AC_REQUIRE'd code, 4 level deep -define(AC_DIVERSION_NORMAL_3, 5)dnl AC_REQUIRE'd code, 3 level deep -define(AC_DIVERSION_NORMAL_2, 6)dnl AC_REQUIRE'd code, 2 level deep -define(AC_DIVERSION_NORMAL_1, 7)dnl AC_REQUIRE'd code, 1 level deep -define(AC_DIVERSION_NORMAL, 8)dnl the tests and output 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 dnl Change the diversion stream to STREAM, while stacking old values. dnl AC_DIVERT_PUSH(STREAM) @@ -1070,7 +1073,7 @@ changequote(, )dnl ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1=\2}/p' + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache changequote([, ])dnl @@ -1880,17 +1883,16 @@ define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])]) dnl Add additional commands for AC_OUTPUT to put into config.status. -dnl I have concluded that m4's quoting rules make it impossible to -dnl make this robust in the presence of commas in $1 or $2 and -dnl an arbitrary number of calls. I tried putting the defines -dnl inside the ifdefs, with no success that way either. -djm +dnl Use diversions instead of macros so we can be robust in the +dnl presence of commas in $1 and/or $2. dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS) AC_DEFUN(AC_OUTPUT_COMMANDS, -[dnl -define([AC_LIST_EXTRA], ifdef([AC_LIST_EXTRA], [AC_LIST_EXTRA -],)[$1])dnl -define([AC_LIST_INIT], ifdef([AC_LIST_INIT], [AC_LIST_INIT -],)[$2])]) +[AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl +[$1] +AC_DIVERT_POP()dnl +AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl +[$2] +AC_DIVERT_POP()]) dnl AC_CONFIG_SUBDIRS(DIR ...) AC_DEFUN(AC_CONFIG_SUBDIRS, @@ -1980,13 +1982,11 @@ ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl ifelse([$3][AC_LIST_INIT], , , [EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF]) -ifdef([AC_LIST_EXTRA], [AC_LIST_EXTRA -],)[]dnl +undivert(AC_DIVERSION_CMDS)dnl $2 exit 0 EOF diff --git a/autoconf.texi b/autoconf.texi index 4e8ce3fd..7a11d2d8 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -61,7 +61,7 @@ by the Foundation. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, '93, '94, '95, '96 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 93, 94, 95, 96 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -681,6 +681,15 @@ If you give @code{autoreconf} the @samp{--macrodir=@var{dir}} or @code{autoconf} and @code{autoheader} (with relative paths adjusted properly). +@code{autoreconf} does not support having, in the same directory tree, +both directories that are parts of a larger package (sharing +@file{aclocal.m4} and @file{acconfig.h}), and directories that are +independent packages (each with their own @file{aclocal.m4} and +@file{acconfig.h}). It assumes that they are all part of the same +package, if you use @samp{--localdir}, or that each directory is a +separate package, if you don't use it. This restriction may be removed +in the future. + @xref{Automatic Remaking}, for @file{Makefile} rules to automatically remake @code{configure} scripts when their source files change. That method handles the timestamps of configuration header templates @@ -836,14 +845,12 @@ commands given to it are run just before the commands passed to this macro. Specify additional shell commands to run at the end of @file{config.status}, and shell commands to initialize any variables from @code{configure}. This macro may be called multiple times. -If the shell commands contain commas, you must add an extra layer of -@code{m4} quotes for each additional time you call this macro, due to -the insanity of @code{m4} quoting. Like this: +Here is an unrealistic example: @example fubar=27 -AC_OUTPUT_COMMANDS([[echo this is extra $fubar, and so on.]], fubar=$fubar) -AC_OUTPUT_COMMANDS([[echo this is another, extra, bit]], [[echo init, bit]]) +AC_OUTPUT_COMMANDS([echo this is extra $fubar, and so on.], fubar=$fubar) +AC_OUTPUT_COMMANDS([echo this is another, extra, bit], [echo init bit]) @end example @end defmac diff --git a/autoreconf.in b/autoreconf.in index 7b5ef524..a91d26c7 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -72,9 +72,11 @@ if test $# -ne 0; then echo "$usage" 1>&2; exit 1 fi +# The paths to the autoconf and autoheader scripts, at the top of the tree. top_autoconf=`echo $0|sed s%autoreconf%autoconf%` top_autoheader=`echo $0|sed s%autoreconf%autoheader%` +# Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. find . -name configure.in -print | xargs grep -l AC_OUTPUT | diff --git a/autoreconf.sh b/autoreconf.sh index 7b5ef524..a91d26c7 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -72,9 +72,11 @@ if test $# -ne 0; then echo "$usage" 1>&2; exit 1 fi +# The paths to the autoconf and autoheader scripts, at the top of the tree. top_autoconf=`echo $0|sed s%autoreconf%autoconf%` top_autoheader=`echo $0|sed s%autoreconf%autoheader%` +# Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. find . -name configure.in -print | xargs grep -l AC_OUTPUT | diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 7b5ef524..a91d26c7 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -72,9 +72,11 @@ if test $# -ne 0; then echo "$usage" 1>&2; exit 1 fi +# The paths to the autoconf and autoheader scripts, at the top of the tree. top_autoconf=`echo $0|sed s%autoreconf%autoconf%` top_autoheader=`echo $0|sed s%autoreconf%autoheader%` +# Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. find . -name configure.in -print | xargs grep -l AC_OUTPUT | diff --git a/config.guess b/config.guess index 7fc20d31..85fb13ad 100755 --- a/config.guess +++ b/config.guess @@ -366,6 +366,9 @@ EOF FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; diff --git a/config.sub b/config.sub index a661f98f..04325249 100755 --- a/config.sub +++ b/config.sub @@ -177,7 +177,7 @@ case $basic_machine in | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-*) + | mips64el-* | mips64orion-* | mips64orionel-* | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -577,6 +577,9 @@ case $basic_machine in basic_machine=vax-dec os=-vms ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -686,7 +689,7 @@ case $os in | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -linux-gnu*) + | -linux-gnu* | -uxpv*) # Remember, each alternative MUST END IN *, to match a version number. ;; -linux*) @@ -862,6 +865,9 @@ case $basic_machine in *-masscomp) os=-rtu ;; + f301-fujitsu) + os=-uxpv + ;; *) os=-none ;; diff --git a/configure b/configure index a3f877ba..1ce9be09 100755 --- a/configure +++ b/configure @@ -766,7 +766,7 @@ EOF ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1=\2}/p' + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 4e8ce3fd..7a11d2d8 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -61,7 +61,7 @@ by the Foundation. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, '93, '94, '95, '96 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 93, 94, 95, 96 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -681,6 +681,15 @@ If you give @code{autoreconf} the @samp{--macrodir=@var{dir}} or @code{autoconf} and @code{autoheader} (with relative paths adjusted properly). +@code{autoreconf} does not support having, in the same directory tree, +both directories that are parts of a larger package (sharing +@file{aclocal.m4} and @file{acconfig.h}), and directories that are +independent packages (each with their own @file{aclocal.m4} and +@file{acconfig.h}). It assumes that they are all part of the same +package, if you use @samp{--localdir}, or that each directory is a +separate package, if you don't use it. This restriction may be removed +in the future. + @xref{Automatic Remaking}, for @file{Makefile} rules to automatically remake @code{configure} scripts when their source files change. That method handles the timestamps of configuration header templates @@ -836,14 +845,12 @@ commands given to it are run just before the commands passed to this macro. Specify additional shell commands to run at the end of @file{config.status}, and shell commands to initialize any variables from @code{configure}. This macro may be called multiple times. -If the shell commands contain commas, you must add an extra layer of -@code{m4} quotes for each additional time you call this macro, due to -the insanity of @code{m4} quoting. Like this: +Here is an unrealistic example: @example fubar=27 -AC_OUTPUT_COMMANDS([[echo this is extra $fubar, and so on.]], fubar=$fubar) -AC_OUTPUT_COMMANDS([[echo this is another, extra, bit]], [[echo init, bit]]) +AC_OUTPUT_COMMANDS([echo this is extra $fubar, and so on.], fubar=$fubar) +AC_OUTPUT_COMMANDS([echo this is another, extra, bit], [echo init bit]) @end example @end defmac diff --git a/install-sh b/install-sh index 2c212ccf..ebc66913 100755 --- a/install-sh +++ b/install-sh @@ -20,8 +20,8 @@ # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. -# +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 4fd7d8ce..d070d98d 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -72,17 +72,20 @@ dnl ### Defining macros dnl m4 output diversions. We let m4 output them all in order at the end, -dnl except that we explicitly undivert AC_DIVERSION_SED. +dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS, +dnl and AC_DIVERSION_ICMDS. 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_SED, 3)dnl variable substitutions in config.status -define(AC_DIVERSION_NORMAL_4, 4)dnl AC_REQUIRE'd code, 4 level deep -define(AC_DIVERSION_NORMAL_3, 5)dnl AC_REQUIRE'd code, 3 level deep -define(AC_DIVERSION_NORMAL_2, 6)dnl AC_REQUIRE'd code, 2 level deep -define(AC_DIVERSION_NORMAL_1, 7)dnl AC_REQUIRE'd code, 1 level deep -define(AC_DIVERSION_NORMAL, 8)dnl the tests and output 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 dnl Change the diversion stream to STREAM, while stacking old values. dnl AC_DIVERT_PUSH(STREAM) @@ -1070,7 +1073,7 @@ changequote(, )dnl ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1=\2}/p' + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache changequote([, ])dnl @@ -1880,17 +1883,16 @@ define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])]) dnl Add additional commands for AC_OUTPUT to put into config.status. -dnl I have concluded that m4's quoting rules make it impossible to -dnl make this robust in the presence of commas in $1 or $2 and -dnl an arbitrary number of calls. I tried putting the defines -dnl inside the ifdefs, with no success that way either. -djm +dnl Use diversions instead of macros so we can be robust in the +dnl presence of commas in $1 and/or $2. dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS) AC_DEFUN(AC_OUTPUT_COMMANDS, -[dnl -define([AC_LIST_EXTRA], ifdef([AC_LIST_EXTRA], [AC_LIST_EXTRA -],)[$1])dnl -define([AC_LIST_INIT], ifdef([AC_LIST_INIT], [AC_LIST_INIT -],)[$2])]) +[AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl +[$1] +AC_DIVERT_POP()dnl +AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl +[$2] +AC_DIVERT_POP()]) dnl AC_CONFIG_SUBDIRS(DIR ...) AC_DEFUN(AC_CONFIG_SUBDIRS, @@ -1980,13 +1982,11 @@ ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl ifelse([$3][AC_LIST_INIT], , , [EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF]) -ifdef([AC_LIST_EXTRA], [AC_LIST_EXTRA -],)[]dnl +undivert(AC_DIVERSION_CMDS)dnl $2 exit 0 EOF