more improvements from the net

This commit is contained in:
David MacKenzie 1996-11-12 07:17:30 +00:00
parent 8fb56d8ec4
commit 618b5d14d1
10 changed files with 100 additions and 36 deletions

View File

@ -1,3 +1,19 @@
Tue Nov 12 00:06:14 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
* acspecific.m4 (AC_PROG_CC, AC_PROG_CXX) [GCC]: Use -O2 instead
of -O. Suggested by fnf@ninemoons.com (Fred Fish).
* acgeneral.m4 (AC_OUTPUT_HEADER): Support passing
AC_CONFIG_HEADER a value containing shell variables. Suggested by
Markku Savela <msa@msa.tte.vtt.fi> and Julian Onions
<j.onions@nexor.co.uk>.
* acgeneral.m4 (AC_TRY_RUN_NATIVE, AC_TRY_LINK, AC_TRY_COMPILE,
AC_TRY_CPP): Show the test program in config.log if the test fails.
From Karl Berry <karl@cs.umb.edu>.
* testsuite/config/unix.exp: Run the configure script as "./script"
in case the user doesn't have "." in their PATH.
Mon Nov 11 18:02:58 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
* acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK): Deal with smart
@ -22,7 +38,7 @@ Sat Nov 9 01:54:04 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
* Test release 2.10.1.
* acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): New macros
adapted from Jim Meyering and automake.
adapted from Bruno Haible <haible@ilog.fr>.
(AC_PROG_CC, AC_PROG_CXX): Use them.
* acgeneral.m4 (AC_TRY_RUN_NATIVE): Split out of AC_TRY_RUN.
(AC_TRY_LINK): Check that the executable exists after linking.

9
NEWS
View File

@ -1,8 +1,17 @@
Issues to resolve before release:
1. sed command limitation.
2. autoreconf problem with finding nested acconfig.h.
3. test the new features.
Major changes in release 2.11:
* AC_PROG_CC and AC_PROG_CXX check whether the compiler works.
They default CFLAGS/CXXFLAGS to "-g -O2" for gcc, instead of "-g -O".
* AC_REPLACE_FUNCS defines HAVE_@var{function} if the system has the function.
* The argument to AC_CONFIG_HEADER can contain shell variables.
* New macros: AC_FUNC_FNMATCH, AC_FUNC_SETPGRP.
* The source code for test programs that fail is saved in config.log.
* config.sub and config.guess recognize more system types.
* autoheader.sh adds multiple-inclusion protection for config.h.
* Bug fixes.

15
TODO
View File

@ -113,12 +113,6 @@ just as for X includes and libraries. Should they be cached
all in one variable, or three? In that case, what if only one
or two of the cache variables are set?
------------------------------------------------------------------------------
Look at contributions:
ac_include (Karl Berry)
aclocal.h tom@basil.icce.rug.NL (Tom R.Hageman)
------------------------------------------------------------------------------
The argument HELP-STRING is a description of the option which
@ -429,6 +423,7 @@ Mention automake, libtool, etc. in the autoconf manual.
------------------------------------------------------------------------------
configure-time pasting together of output files from multiple pieces.
Or ac_include?
------------------------------------------------------------------------------
@ -448,3 +443,11 @@ done.
From Jim Meyering
------------------------------------------------------------------------------
Question: at least one common UNIX variant has a "cc" that is old K&R
and "c89" for ANSI C. Is there any reason why AC_PROG_CC couldn't
check for c89 before cc if it can't find gcc?
hpa@yggdrasil.com (H. Peter Anvin)
------------------------------------------------------------------------------

View File

@ -1521,6 +1521,8 @@ if test -z "$ac_err"; then
$2])
else
echo "$ac_err" >&AC_FD_CC
echo "configure: input program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$3], , , [ rm -rf conftest*
$3
])dnl
@ -1580,8 +1582,10 @@ EOF
if AC_TRY_EVAL(ac_compile); then
ifelse([$3], , :, [rm -rf conftest*
$3])
ifelse([$4], , , [else
rm -rf conftest*
else
echo "configure: input program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$4], , , [ rm -rf conftest*
$4
])dnl
fi
@ -1617,8 +1621,10 @@ EOF
if AC_TRY_EVAL(ac_link) && test -s conftest; then
ifelse([$3], , :, [rm -rf conftest*
$3])
ifelse([$4], , , [else
rm -rf conftest*
else
echo "configure: input program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$4], , , [ rm -rf conftest*
$4
])dnl
fi
@ -1659,8 +1665,10 @@ EOF
AC_TRY_EVAL(ac_link)
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ifelse([$2], , :, [$2])
ifelse([$3], , , [else
rm -fr conftest*
else
echo "configure: input program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$3], , , [ rm -fr conftest*
$3
])dnl
fi
@ -1927,6 +1935,7 @@ dnl config.status should not do recursion.
ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
])dnl
dnl Set the DEFS variable to the -D options determined earlier.
dnl This is a subroutine of AC_OUTPUT.
dnl It is called inside configure, outside of config.status.
dnl AC_OUTPUT_MAKE_DEFS()
@ -1948,8 +1957,10 @@ DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs
])
dnl Do the variable substitutions to create the Makefiles or whatever.
dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted
dnl here document whose contents are going into config.status.
dnl here document whose contents are going into config.status, but
dnl upon returning, the here document is being quoted.
dnl AC_OUTPUT_FILES(FILE...)
define(AC_OUTPUT_FILES,
[# Protect against being on the right side of a sed subst in config.status.
@ -2044,6 +2055,7 @@ fi; done
rm -f conftest.subs
])
dnl Create the config.h files from the config.h.in files.
dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
dnl here document whose contents are going into config.status.
dnl AC_OUTPUT_HEADER(HEADER-FILE...)
@ -2069,7 +2081,14 @@ ac_eC=' '
ac_eD='%g'
changequote([, ])dnl
CONFIG_HEADERS=${CONFIG_HEADERS-"$1"}
if test -z "$CONFIG_HEADERS"; then
EOF
dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
cat >> $CONFIG_STATUS <<EOF
CONFIG_HEADERS="$1"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$ac_file" in

View File

@ -111,9 +111,9 @@ rm -f conftest*
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_gcc_g = yes; then
CFLAGS="-g -O"
CFLAGS="-g -O2"
else
CFLAGS="-O"
CFLAGS="-O2"
fi
else
GCC=
@ -160,9 +160,9 @@ dnl
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_gxx_g = yes; then
CXXFLAGS="-g -O"
CXXFLAGS="-g -O2"
else
CXXFLAGS="-O"
CXXFLAGS="-O2"
fi
else
GXX=
@ -172,7 +172,6 @@ fi
AC_PROG_CXX_WORKS
])
dnl This check is derived from macros from Bruno Haible and Cygnus.
AC_DEFUN(AC_PROG_CC_WORKS,
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
AC_LANG_SAVE

View File

@ -1186,7 +1186,7 @@ however, you can override the input file name by appending it to
AC_CONFIG_HEADER(defines.h:defines.hin)
@end example
@noindent
Doing this allows you to keep your filenames acceptable to MS-DOS.
Doing this allows you to keep your file names acceptable to MS-DOS.
@end defmac
@menu

View File

@ -1186,7 +1186,7 @@ however, you can override the input file name by appending it to
AC_CONFIG_HEADER(defines.h:defines.hin)
@end example
@noindent
Doing this allows you to keep your filenames acceptable to MS-DOS.
Doing this allows you to keep your file names acceptable to MS-DOS.
@end defmac
@menu

View File

@ -1521,6 +1521,8 @@ if test -z "$ac_err"; then
$2])
else
echo "$ac_err" >&AC_FD_CC
echo "configure: input program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$3], , , [ rm -rf conftest*
$3
])dnl
@ -1580,8 +1582,10 @@ EOF
if AC_TRY_EVAL(ac_compile); then
ifelse([$3], , :, [rm -rf conftest*
$3])
ifelse([$4], , , [else
rm -rf conftest*
else
echo "configure: input program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$4], , , [ rm -rf conftest*
$4
])dnl
fi
@ -1617,8 +1621,10 @@ EOF
if AC_TRY_EVAL(ac_link) && test -s conftest; then
ifelse([$3], , :, [rm -rf conftest*
$3])
ifelse([$4], , , [else
rm -rf conftest*
else
echo "configure: input program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$4], , , [ rm -rf conftest*
$4
])dnl
fi
@ -1659,8 +1665,10 @@ EOF
AC_TRY_EVAL(ac_link)
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ifelse([$2], , :, [$2])
ifelse([$3], , , [else
rm -fr conftest*
else
echo "configure: input program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$3], , , [ rm -fr conftest*
$3
])dnl
fi
@ -1927,6 +1935,7 @@ dnl config.status should not do recursion.
ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
])dnl
dnl Set the DEFS variable to the -D options determined earlier.
dnl This is a subroutine of AC_OUTPUT.
dnl It is called inside configure, outside of config.status.
dnl AC_OUTPUT_MAKE_DEFS()
@ -1948,8 +1957,10 @@ DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs
])
dnl Do the variable substitutions to create the Makefiles or whatever.
dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted
dnl here document whose contents are going into config.status.
dnl here document whose contents are going into config.status, but
dnl upon returning, the here document is being quoted.
dnl AC_OUTPUT_FILES(FILE...)
define(AC_OUTPUT_FILES,
[# Protect against being on the right side of a sed subst in config.status.
@ -2044,6 +2055,7 @@ fi; done
rm -f conftest.subs
])
dnl Create the config.h files from the config.h.in files.
dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
dnl here document whose contents are going into config.status.
dnl AC_OUTPUT_HEADER(HEADER-FILE...)
@ -2069,7 +2081,14 @@ ac_eC=' '
ac_eD='%g'
changequote([, ])dnl
CONFIG_HEADERS=${CONFIG_HEADERS-"$1"}
if test -z "$CONFIG_HEADERS"; then
EOF
dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
cat >> $CONFIG_STATUS <<EOF
CONFIG_HEADERS="$1"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$ac_file" in

View File

@ -111,9 +111,9 @@ rm -f conftest*
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_gcc_g = yes; then
CFLAGS="-g -O"
CFLAGS="-g -O2"
else
CFLAGS="-O"
CFLAGS="-O2"
fi
else
GCC=
@ -160,9 +160,9 @@ dnl
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_gxx_g = yes; then
CXXFLAGS="-g -O"
CXXFLAGS="-g -O2"
else
CXXFLAGS="-O"
CXXFLAGS="-O2"
fi
else
GXX=
@ -172,7 +172,6 @@ fi
AC_PROG_CXX_WORKS
])
dnl This check is derived from macros from Bruno Haible and Cygnus.
AC_DEFUN(AC_PROG_CC_WORKS,
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
AC_LANG_SAVE

View File

@ -89,7 +89,7 @@ proc autoconf_load { args } {
}
# Capture only stderr in exec_output, not "creating Makefile" etc.
catch "exec $args --cache=/dev/null >/dev/null" exec_output
catch "exec ./$args --cache=/dev/null >/dev/null" exec_output
if $verbose>1 then {
send_user "Executed $args --cache=/dev/null\n"
}