This commit is contained in:
David MacKenzie 1996-11-20 21:27:29 +00:00
parent f989a49ded
commit 8801bfce14
13 changed files with 106 additions and 71 deletions

View File

@ -1,9 +1,14 @@
Wed Nov 20 13:00:21 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
* 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 <eggert@twinsun.com>.

23
TODO
View File

@ -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 <marc@MIT.EDU>
autoreconf should automatically figure out which ac* files to use--the
closest ones up the tree from each directory, probably, unless
overridden by --localdir.
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.
------------------------------------------------------------------------------
Rewrite AC_OUTPUT_COMMANDS to use diversions.
------------------------------------------------------------------------------

View File

@ -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 <<EOF
ifdef([AC_LIST_INIT], [AC_LIST_INIT
],)[]dnl
undivert(AC_DIVERSION_ICMDS)dnl
$3
EOF
cat >> $CONFIG_STATUS <<\EOF])
ifdef([AC_LIST_EXTRA], [AC_LIST_EXTRA
],)[]dnl
undivert(AC_DIVERSION_CMDS)dnl
$2
exit 0
EOF

View File

@ -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

View File

@ -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 |

View File

@ -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 |

View File

@ -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 |

3
config.guess vendored
View File

@ -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 ;;

10
config.sub vendored
View File

@ -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
;;

2
configure vendored
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 <<EOF
ifdef([AC_LIST_INIT], [AC_LIST_INIT
],)[]dnl
undivert(AC_DIVERSION_ICMDS)dnl
$3
EOF
cat >> $CONFIG_STATUS <<\EOF])
ifdef([AC_LIST_EXTRA], [AC_LIST_EXTRA
],)[]dnl
undivert(AC_DIVERSION_CMDS)dnl
$2
exit 0
EOF