]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (_AC_INIT_LOG_COMPLETE): Eve out from AC_OUTPUT.
authorAkim Demaille <akim@epita.fr>
Tue, 16 Jan 2001 10:46:37 +0000 (10:46 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 16 Jan 2001 10:46:37 +0000 (10:46 +0000)
(_AC_INIT_DEFAULTS, AC_OUTPUT): Use it.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index 7c6dd633f427971c4e2e6d3fedbb43a6264ef942..16d632ff1fdd44807028412a3576b53de886c3f8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-01-16  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (_AC_INIT_LOG_COMPLETE): Eve out from AC_OUTPUT.
+       (_AC_INIT_DEFAULTS, AC_OUTPUT): Use it.
+
 2001-01-16  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi: Lots of additions and changes.
index 33065c3a6bac910532294d12559c253eaa1026c4..a1fd5a66f3de04951ecdfd4504e1c6b7e7d63c23 100644 (file)
@@ -724,6 +724,36 @@ exec AS_MESSAGE_LOG_FD>>config.log
 ])# _AC_INIT_DEFAULTS_FDS
 
 
+# _AC_INIT_LOG_COMPLETE
+# ---------------------
+# 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],
+[# Save into config.log some information that might help in debugging.
+cat <<_ACEOF >&AS_MESSAGE_LOG_FD
+
+## ----------------- ##
+## Cache variables.  ##
+## ----------------- ##
+
+_ACEOF
+_AC_CACHE_DUMP >&AS_MESSAGE_LOG_FD
+
+sed '/^$/d' confdefs.h >conftest.log
+if test -s conftest.log; then
+  cat <<_ACEOF >&AS_MESSAGE_LOG_FD
+
+## ------------ ##
+## confdefs.h.  ##
+## ------------ ##
+
+_ACEOF
+  cat conftest.log >&AS_MESSAGE_LOG_FD
+fi
+(echo; echo) >&AS_MESSAGE_LOG_FD
+])# _AC_INIT_LOG_COMPLETE
+
+
 # _AC_INIT_DEFAULTS
 # -----------------
 # Values which defaults can be set from `configure.ac'.
@@ -758,6 +788,7 @@ cat >>config.log <<EOF
 ## ------------ ##
 
 EOF
+m4_wrap([AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])])dnl
 
 _AC_INIT_DEFAULTS_FDS
 #
@@ -1498,6 +1529,7 @@ m4_pattern_forbid([_AC_])
 m4_divert_push([BODY])])
 
 
+
 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
 # ----------------------------------------
 # Include the user macro files, prepare the diversions, and output the
@@ -3728,23 +3760,7 @@ 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
 
-# Save into config.log some information that might help in debugging.
-cat <<_ACEOF >&AS_MESSAGE_LOG_FD
-
-## ----------------- ##
-## Cache variables.  ##
-## ----------------- ##
-
-_ACEOF
-_AC_CACHE_DUMP >&AS_MESSAGE_LOG_FD
-cat <<_ACEOF >&AS_MESSAGE_LOG_FD
-
-## ------------ ##
-## confdefs.h.  ##
-## ------------ ##
-
-_ACEOF
-sed '/^$/d' confdefs.h >&AS_MESSAGE_LOG_FD
+AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
index 33065c3a6bac910532294d12559c253eaa1026c4..a1fd5a66f3de04951ecdfd4504e1c6b7e7d63c23 100644 (file)
@@ -724,6 +724,36 @@ exec AS_MESSAGE_LOG_FD>>config.log
 ])# _AC_INIT_DEFAULTS_FDS
 
 
+# _AC_INIT_LOG_COMPLETE
+# ---------------------
+# 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],
+[# Save into config.log some information that might help in debugging.
+cat <<_ACEOF >&AS_MESSAGE_LOG_FD
+
+## ----------------- ##
+## Cache variables.  ##
+## ----------------- ##
+
+_ACEOF
+_AC_CACHE_DUMP >&AS_MESSAGE_LOG_FD
+
+sed '/^$/d' confdefs.h >conftest.log
+if test -s conftest.log; then
+  cat <<_ACEOF >&AS_MESSAGE_LOG_FD
+
+## ------------ ##
+## confdefs.h.  ##
+## ------------ ##
+
+_ACEOF
+  cat conftest.log >&AS_MESSAGE_LOG_FD
+fi
+(echo; echo) >&AS_MESSAGE_LOG_FD
+])# _AC_INIT_LOG_COMPLETE
+
+
 # _AC_INIT_DEFAULTS
 # -----------------
 # Values which defaults can be set from `configure.ac'.
@@ -758,6 +788,7 @@ cat >>config.log <<EOF
 ## ------------ ##
 
 EOF
+m4_wrap([AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])])dnl
 
 _AC_INIT_DEFAULTS_FDS
 #
@@ -1498,6 +1529,7 @@ m4_pattern_forbid([_AC_])
 m4_divert_push([BODY])])
 
 
+
 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
 # ----------------------------------------
 # Include the user macro files, prepare the diversions, and output the
@@ -3728,23 +3760,7 @@ 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
 
-# Save into config.log some information that might help in debugging.
-cat <<_ACEOF >&AS_MESSAGE_LOG_FD
-
-## ----------------- ##
-## Cache variables.  ##
-## ----------------- ##
-
-_ACEOF
-_AC_CACHE_DUMP >&AS_MESSAGE_LOG_FD
-cat <<_ACEOF >&AS_MESSAGE_LOG_FD
-
-## ------------ ##
-## confdefs.h.  ##
-## ------------ ##
-
-_ACEOF
-sed '/^$/d' confdefs.h >&AS_MESSAGE_LOG_FD
+AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files