]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_INIT, AC_OUTPUT): Don't take care of completing
authorAkim Demaille <akim@epita.fr>
Mon, 22 Jan 2001 08:58:47 +0000 (08:58 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 22 Jan 2001 08:58:47 +0000 (08:58 +0000)
the log.
(_AC_INIT_PREPARE): Do it in the trap 0.

ChangeLog
acgeneral.m4
doc/autoconf.texi
lib/autoconf/general.m4

index 4e598cba78308063259346867181ce451a8d8716..8994075c37273306442e1fd851c6f64dccc4c58f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2001-01-22  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (AC_INIT, AC_OUTPUT): Don't take care of completing
+       the log.
+       (_AC_INIT_PREPARE): Do it in the trap 0.
+
+2001-01-22  Akim Demaille  <akim@epita.fr>
+
+       * autoscan.pl: Instead of undefined globals, set them to empty
+       values.
+       (%needed_macros): New.
+       (&check_configure_ac): New.  Call it.
+       (&output_libraries): Eve out from &output_programs.
+       (&print_unique): For the time being register in %needed_macros
+       only argument less macros.
+
 2001-01-22  Raja R Harinath  <harinath@cs.umn.edu>,
        Tim Van Holder  <tim.van.holder@pandora.be>,
        Jim Meyering <jim@meyering.net>
index c3bd269894faa34461ef08c27b17b33ffe660539..62409a979f8abf8e1f19e65f2f4598049b97b49f 100644 (file)
@@ -716,7 +716,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
 # ---------------------
 # At the end of configure, dump some useful information in the
 # log, even if AC_OUTPUT was not called.
-AC_DEFUN([_AC_INIT_LOG_COMPLETE],
+m4_define([_AC_INIT_LOG_COMPLETE],
 [# Save into config.log some information that might help in debugging.
 cat <<_ACEOF >&AS_MESSAGE_LOG_FD
 
@@ -776,7 +776,6 @@ cat >>config.log <<EOF
 ## ------------ ##
 
 EOF
-m4_wrap([AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])[]])dnl
 
 _AC_INIT_DEFAULTS_FDS
 #
@@ -1452,8 +1451,30 @@ dnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
 done
 
 # When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
 trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  echo cat <<_ACEOF >&AS_MESSAGE_LOG_FD
+  echo >&AS_MESSAGE_LOG_FD
+  echo "## ----------------- ##" >&AS_MESSAGE_LOG_FD
+  echo "## Cache variables.  ##" >&AS_MESSAGE_LOG_FD
+  echo "## ----------------- ##" >&AS_MESSAGE_LOG_FD
+  echo >&AS_MESSAGE_LOG_FD
+  m4_patsubst(m4_patsubst(m4_dquote(m4_defn([_AC_CACHE_DUMP])),
+                          [^ *\(#.*\)?
+]),
+              ['], ['"'"']) >&AS_MESSAGE_LOG_FD
+  sed "/^$/d" confdefs.h >conftest.log
+  if test -s conftest.log; then
+    echo >&AS_MESSAGE_LOG_FD
+    echo "## ------------ ##" >&AS_MESSAGE_LOG_FD
+    echo "## confdefs.h.  ##" >&AS_MESSAGE_LOG_FD
+    echo "## ------------ ##" >&AS_MESSAGE_LOG_FD
+    echo >&AS_MESSAGE_LOG_FD
+    cat conftest.log >&AS_MESSAGE_LOG_FD
+  fi
+  (echo; echo) >&AS_MESSAGE_LOG_FD
   test "$ac_signal" != 0 &&
     echo "$as_me: caught signal $ac_signal" >&AS_MESSAGE_LOG_FD
   echo "$as_me: exit $exit_status" >&AS_MESSAGE_LOG_FD
@@ -1461,7 +1482,7 @@ trap 'exit_status=$?
     exit $exit_status
      ' 0
 for ac_signal in 1 2 13 15; do
-  trap 'ac_status=$?; ac_signal='$ac_signal'; exit $ac_status' $ac_signal
+  trap 'ac_status=$?; ac_signal='$ac_signal'; AS_EXIT([$ac_status])' $ac_signal
 done
 ac_signal=0
 
@@ -3770,8 +3791,6 @@ m4_ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
 dnl Commands to run before creating config.status.
 AC_OUTPUT_COMMANDS_PRE()dnl
 
-AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])
-
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
index e66f8ac7677977be1ac08a539bf5847d094dfead..623b66654b675e065d0f8eee4c4b0f538d7f1f91 100644 (file)
@@ -5975,7 +5975,7 @@ set the exit status to 42 for Zsh, and the second to trigger the trap
 and pass 42 as exit status for Bash.
 
 The shell in FreeBSD 4.0 has the following bug: @samp{$?} is reset to 0
-by empty lines if the code in inside trap.
+by empty lines if the code is inside trap.
 
 @example
 $ trap 'false
index c3bd269894faa34461ef08c27b17b33ffe660539..62409a979f8abf8e1f19e65f2f4598049b97b49f 100644 (file)
@@ -716,7 +716,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
 # ---------------------
 # At the end of configure, dump some useful information in the
 # log, even if AC_OUTPUT was not called.
-AC_DEFUN([_AC_INIT_LOG_COMPLETE],
+m4_define([_AC_INIT_LOG_COMPLETE],
 [# Save into config.log some information that might help in debugging.
 cat <<_ACEOF >&AS_MESSAGE_LOG_FD
 
@@ -776,7 +776,6 @@ cat >>config.log <<EOF
 ## ------------ ##
 
 EOF
-m4_wrap([AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])[]])dnl
 
 _AC_INIT_DEFAULTS_FDS
 #
@@ -1452,8 +1451,30 @@ dnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
 done
 
 # When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
 trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  echo cat <<_ACEOF >&AS_MESSAGE_LOG_FD
+  echo >&AS_MESSAGE_LOG_FD
+  echo "## ----------------- ##" >&AS_MESSAGE_LOG_FD
+  echo "## Cache variables.  ##" >&AS_MESSAGE_LOG_FD
+  echo "## ----------------- ##" >&AS_MESSAGE_LOG_FD
+  echo >&AS_MESSAGE_LOG_FD
+  m4_patsubst(m4_patsubst(m4_dquote(m4_defn([_AC_CACHE_DUMP])),
+                          [^ *\(#.*\)?
+]),
+              ['], ['"'"']) >&AS_MESSAGE_LOG_FD
+  sed "/^$/d" confdefs.h >conftest.log
+  if test -s conftest.log; then
+    echo >&AS_MESSAGE_LOG_FD
+    echo "## ------------ ##" >&AS_MESSAGE_LOG_FD
+    echo "## confdefs.h.  ##" >&AS_MESSAGE_LOG_FD
+    echo "## ------------ ##" >&AS_MESSAGE_LOG_FD
+    echo >&AS_MESSAGE_LOG_FD
+    cat conftest.log >&AS_MESSAGE_LOG_FD
+  fi
+  (echo; echo) >&AS_MESSAGE_LOG_FD
   test "$ac_signal" != 0 &&
     echo "$as_me: caught signal $ac_signal" >&AS_MESSAGE_LOG_FD
   echo "$as_me: exit $exit_status" >&AS_MESSAGE_LOG_FD
@@ -1461,7 +1482,7 @@ trap 'exit_status=$?
     exit $exit_status
      ' 0
 for ac_signal in 1 2 13 15; do
-  trap 'ac_status=$?; ac_signal='$ac_signal'; exit $ac_status' $ac_signal
+  trap 'ac_status=$?; ac_signal='$ac_signal'; AS_EXIT([$ac_status])' $ac_signal
 done
 ac_signal=0
 
@@ -3770,8 +3791,6 @@ m4_ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
 dnl Commands to run before creating config.status.
 AC_OUTPUT_COMMANDS_PRE()dnl
 
-AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])
-
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"