autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] config.log initialization after --help/--version handling


From: Lars J. Aas
Subject: [patch] config.log initialization after --help/--version handling
Date: Wed, 4 Apr 2001 17:03:01 +0200
User-agent: Mutt/1.2.5i

So finally, here it is...  Old config.log is preserved if you just
invoke configure for --help and --version.

Akim, can you write a test-case for this behaviour? - I've still not
taken the plunge into autotest :(

2001-04-04  Lars J. Aas  <address@hidden>

        * acgeneral (_AC_INIT_CONFIG_LOG): New macro for setting up the
        config.log file.
        (_AC_INIT_DEFAULTS_FDS): Log to /dev/null instead of config.log.
        (AC_INIT): Invoke _AC_INIT_CONFIG_LOG after _AC_INIT_VERSION.

Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.707
diff -u -r1.707 acgeneral.m4
--- acgeneral.m4        2001/04/04 12:52:30     1.707
+++ acgeneral.m4        2001/04/04 14:54:03
@@ -704,7 +704,7 @@
 # 2 errors and warnings
 @%:@ AS_MESSAGE_LOG_FD compiler messages saved in config.log
 @%:@ AS_MESSAGE_FD checking for... messages and results
-exec AS_MESSAGE_LOG_FD>>config.log
+exec AS_MESSAGE_LOG_FD>>/dev/null
 exec AS_MESSAGE_FD>&1
 ])# _AC_INIT_DEFAULTS_FDS
 
@@ -723,28 +723,7 @@
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
-cat >config.log <<EOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by m4_ifset([AC_PACKAGE_NAME],
-                           [AC_PACKAGE_NAME ])dnl
-$as_me[]m4_ifset([AC_PACKAGE_VERSION],
-                 [ AC_PACKAGE_VERSION]), which was
-generated by GNU Autoconf AC_ACVERSION.  Invocation command line was
-
-  $ $[0] address@hidden
 
-EOF
-AS_UNAME >>config.log
-
-cat >>config.log <<EOF
-## ------------ ##
-## Core tests.  ##
-## ------------ ##
-
-EOF
-
 _AC_INIT_DEFAULTS_FDS
 #
 # Initializations.
@@ -1381,6 +1360,35 @@
 ])# _AC_INIT_VERSION
 
 
+# _AC_INIT_CONFIG_LOG
+# -------------------
+# Write the config.log header.
+m4_define([_AC_INIT_CONFIG_LOG],
+[m4_divert_text([INIT_PREPARE],
+[exec AS_MESSAGE_LOG_FD>>config.log
+cat >config.log <<EOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by m4_ifset([AC_PACKAGE_NAME],
+                           [AC_PACKAGE_NAME ])dnl
+$as_me[]m4_ifset([AC_PACKAGE_VERSION],
+                 [ AC_PACKAGE_VERSION]), which was
+generated by GNU Autoconf AC_ACVERSION.  Invocation command line was
+
+  $ $[0] address@hidden
+
+EOF
+AS_UNAME >>config.log
+
+cat >>config.log <<EOF
+## ------------ ##
+## Core tests.  ##
+## ------------ ##
+
+EOF
+])])# _AC_INIT_CONFIG_LOG
+
 # _AC_INIT_PREPARE_FS_SEPARATORS
 # ------------------------------
 # Compute the directory and path separators.
@@ -1540,6 +1548,7 @@
 _AC_INIT_SRCDIR
 _AC_INIT_HELP
 _AC_INIT_VERSION
+_AC_INIT_CONFIG_LOG
 _AC_INIT_PREPARE
 dnl _AC_INIT_COPYRIGHT must be called after _AC_INIT_VERSION, since
 dnl it dumps into a diversion prepared by _AC_INIT_VERSION.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]