]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
more improvements from the net
authorDavid MacKenzie <djm@djmnet.org>
Tue, 12 Nov 1996 07:17:30 +0000 (07:17 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Tue, 12 Nov 1996 07:17:30 +0000 (07:17 +0000)
ChangeLog
NEWS
TODO
acgeneral.m4
acspecific.m4
autoconf.texi
doc/autoconf.texi
lib/autoconf/general.m4
lib/autoconf/specific.m4
testsuite/config/unix.exp

index 4b0d3c74c9115ad6a45094a4f09c953bca3b47d5..ee8e3ca6b380eedd2509d8f821f21e9fd22207d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/NEWS b/NEWS
index 0e8a6293b32d086127fd6d7b0c90c7edd2ad3079..6b74dca99531b44242e6111989eb7587a30e265f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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.
diff --git a/TODO b/TODO
index 8de81da2a09a725816e9b0dabfdb08eab5e43997..df6e99b9028fb44dd7ca63d73d24ba104bb832ce 100644 (file)
--- a/TODO
+++ b/TODO
@@ -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)
+
+------------------------------------------------------------------------------
index 26fb579ceebb5fd211912e188c68b6f4fb031e4d..cd0028e37db3aec29d38ed7d9d7eb72e9a689ed7 100644 (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
index e896fb344313382877f2b56215e50a667bd7847b..8ff07aebbb0a717fa916a1304047a22ea68203ff 100644 (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
index 982ab41728991ab243744e956d8e3570cf3ebfe9..5edc3057a99002cd16d389645df9c5916d531cf8 100644 (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
index 982ab41728991ab243744e956d8e3570cf3ebfe9..5edc3057a99002cd16d389645df9c5916d531cf8 100644 (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
index 26fb579ceebb5fd211912e188c68b6f4fb031e4d..cd0028e37db3aec29d38ed7d9d7eb72e9a689ed7 100644 (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
index e896fb344313382877f2b56215e50a667bd7847b..8ff07aebbb0a717fa916a1304047a22ea68203ff 100644 (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
index cf4f08afdc4ef2dbea3171e1c589306fa50340b1..31cc117be7cfdb54462d4024c56f5f8fb21d3863 100644 (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"
     }