]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (_AC_RUN_LOG, _AC_RUN_LOG_STDERR, AC_RUN_LOG): New.
authorAkim Demaille <akim@epita.fr>
Tue, 6 Feb 2001 15:11:50 +0000 (15:11 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 6 Feb 2001 15:11:50 +0000 (15:11 +0000)
(_AC_EVAL_STDERR,  _AC_EVAL): Use them.
(_AC_INIT_PREPARE_FS_SEPARATORS): Use AC_RUN_LOG.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4
tests/mktests.sh

index 4c704e72af1c2f6fc52478887948c24b6cbf006a..bcd7555351e24fd437ab6ac8992322730a60bd7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-06  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (_AC_RUN_LOG, _AC_RUN_LOG_STDERR, AC_RUN_LOG): New.
+       (_AC_EVAL_STDERR,  _AC_EVAL): Use them.
+       (_AC_INIT_PREPARE_FS_SEPARATORS): Use AC_RUN_LOG.
+
 2001-02-05  Derek Price  <derek.price@openavenue.com>
 
        * autoheader.sh: Only set config_h for the first call to
index 5a0e8ab5ddc19f1319d98cd4f0062ca76abd8fa6..3d29e9aa4efb1a517359d86b7d0a9234e10bd69f 100644 (file)
@@ -1370,7 +1370,7 @@ m4_define([_AC_INIT_PREPARE_FS_SEPARATORS],
 [echo "#! $SHELL" >conftest.sh
 echo  "exit 0"   >>conftest.sh
 chmod +x conftest.sh
-if AC_TRY_COMMAND([PATH=".;`pwd`"; conftest.sh]); then
+if AC_RUN_LOG([PATH=".;`pwd`"; conftest.sh]); then
   ac_path_separator=';'
 else
   ac_path_separator=:
@@ -2200,25 +2200,25 @@ AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
 ## ---------------------------- ##
 
 
-# _AC_EVAL(COMMAND)
-# -----------------
+# _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
+# ----------------------------------
 # Eval COMMAND, save the exit status in ac_status, and log it.
-AC_DEFUN([_AC_EVAL],
-[{ (eval echo "$as_me:__oline__: \"$1\"") >&AS_MESSAGE_LOG_FD
-  (eval $1) 2>&AS_MESSAGE_LOG_FD
+AC_DEFUN([_AC_RUN_LOG],
+[{ ($2) >&AS_MESSAGE_LOG_FD
+  ($1) 2>&AS_MESSAGE_LOG_FD
   ac_status=$?
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
   (exit $ac_status); }])
 
 
-# _AC_EVAL_STDERR(COMMAND)
-# ------------------------
+# _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
+# -----------------------------------------
 # Eval COMMAND, save its stderr into conftest.err, save the exit status
 # in ac_status, and log it.
 # Note that when tracing, most shells will leave the traces in stderr
-AC_DEFUN([_AC_EVAL_STDERR],
-[{ (eval echo "$as_me:__oline__: \"$1\"") >&AS_MESSAGE_LOG_FD
-  (eval $1) 2>conftest.er1
+AC_DEFUN([_AC_RUN_LOG_STDERR],
+[{ ($2) >&AS_MESSAGE_LOG_FD
+  ($1) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -2227,6 +2227,24 @@ AC_DEFUN([_AC_EVAL_STDERR],
   (exit $ac_status); }])
 
 
+# _AC_EVAL(COMMAND)
+# -----------------
+# Eval COMMAND, save the exit status in ac_status, and log it.
+AC_DEFUN([_AC_EVAL],
+[_AC_RUN_LOG([eval $1],
+             [eval echo "$as_me:__oline__: \"$1\""])])
+
+
+# _AC_EVAL_STDERR(COMMAND)
+# ------------------------
+# Eval COMMAND, save its stderr into conftest.err, save the exit status
+# in ac_status, and log it.
+# Note that when tracing, most shells will leave the traces in stderr
+AC_DEFUN([_AC_EVAL_STDERR],
+[_AC_RUN_LOG_STDERR([eval $1],
+                    [eval echo "$as_me:__oline__: \"$1\""])])
+
+
 # AC_TRY_EVAL(VARIABLE)
 # ---------------------
 # The purpose of this macro is to "configure:123: command line"
@@ -2238,7 +2256,15 @@ AC_DEFUN([AC_TRY_EVAL],
 # AC_TRY_COMMAND(COMMAND)
 # -----------------------
 AC_DEFUN([AC_TRY_COMMAND],
-[{ ac_try='$1'; _AC_EVAL([$ac_try]); }])
+[{ ac_try='$1'
+  _AC_EVAL([$ac_try]); }])
+
+
+# AC_RUN_LOG(COMMAND)
+# -------------------
+AC_DEFUN([AC_RUN_LOG],
+[_AC_RUN_LOG([$1],
+             [echo "$as_me:__oline__: AS_ESCAPE([$1])"])])
 
 
 ## ------------------ ##
index 5a0e8ab5ddc19f1319d98cd4f0062ca76abd8fa6..3d29e9aa4efb1a517359d86b7d0a9234e10bd69f 100644 (file)
@@ -1370,7 +1370,7 @@ m4_define([_AC_INIT_PREPARE_FS_SEPARATORS],
 [echo "#! $SHELL" >conftest.sh
 echo  "exit 0"   >>conftest.sh
 chmod +x conftest.sh
-if AC_TRY_COMMAND([PATH=".;`pwd`"; conftest.sh]); then
+if AC_RUN_LOG([PATH=".;`pwd`"; conftest.sh]); then
   ac_path_separator=';'
 else
   ac_path_separator=:
@@ -2200,25 +2200,25 @@ AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
 ## ---------------------------- ##
 
 
-# _AC_EVAL(COMMAND)
-# -----------------
+# _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
+# ----------------------------------
 # Eval COMMAND, save the exit status in ac_status, and log it.
-AC_DEFUN([_AC_EVAL],
-[{ (eval echo "$as_me:__oline__: \"$1\"") >&AS_MESSAGE_LOG_FD
-  (eval $1) 2>&AS_MESSAGE_LOG_FD
+AC_DEFUN([_AC_RUN_LOG],
+[{ ($2) >&AS_MESSAGE_LOG_FD
+  ($1) 2>&AS_MESSAGE_LOG_FD
   ac_status=$?
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
   (exit $ac_status); }])
 
 
-# _AC_EVAL_STDERR(COMMAND)
-# ------------------------
+# _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
+# -----------------------------------------
 # Eval COMMAND, save its stderr into conftest.err, save the exit status
 # in ac_status, and log it.
 # Note that when tracing, most shells will leave the traces in stderr
-AC_DEFUN([_AC_EVAL_STDERR],
-[{ (eval echo "$as_me:__oline__: \"$1\"") >&AS_MESSAGE_LOG_FD
-  (eval $1) 2>conftest.er1
+AC_DEFUN([_AC_RUN_LOG_STDERR],
+[{ ($2) >&AS_MESSAGE_LOG_FD
+  ($1) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -2227,6 +2227,24 @@ AC_DEFUN([_AC_EVAL_STDERR],
   (exit $ac_status); }])
 
 
+# _AC_EVAL(COMMAND)
+# -----------------
+# Eval COMMAND, save the exit status in ac_status, and log it.
+AC_DEFUN([_AC_EVAL],
+[_AC_RUN_LOG([eval $1],
+             [eval echo "$as_me:__oline__: \"$1\""])])
+
+
+# _AC_EVAL_STDERR(COMMAND)
+# ------------------------
+# Eval COMMAND, save its stderr into conftest.err, save the exit status
+# in ac_status, and log it.
+# Note that when tracing, most shells will leave the traces in stderr
+AC_DEFUN([_AC_EVAL_STDERR],
+[_AC_RUN_LOG_STDERR([eval $1],
+                    [eval echo "$as_me:__oline__: \"$1\""])])
+
+
 # AC_TRY_EVAL(VARIABLE)
 # ---------------------
 # The purpose of this macro is to "configure:123: command line"
@@ -2238,7 +2256,15 @@ AC_DEFUN([AC_TRY_EVAL],
 # AC_TRY_COMMAND(COMMAND)
 # -----------------------
 AC_DEFUN([AC_TRY_COMMAND],
-[{ ac_try='$1'; _AC_EVAL([$ac_try]); }])
+[{ ac_try='$1'
+  _AC_EVAL([$ac_try]); }])
+
+
+# AC_RUN_LOG(COMMAND)
+# -------------------
+AC_DEFUN([AC_RUN_LOG],
+[_AC_RUN_LOG([$1],
+             [echo "$as_me:__oline__: AS_ESCAPE([$1])"])])
 
 
 ## ------------------ ##
index 69251d591cea7eb3fc628c57f4bebe50981d5ed3..918d1e9cad8d078dff19565a8035a2f6e00ddd38 100755 (executable)
@@ -93,7 +93,7 @@ exclude_list='^ac_cv_prog_(gcc|gxx|g77)$
 # - AC_PATH_PROGS?, AC_F77_FUNC
 #   They produce `= val' because $1, the variable used to store the result,
 #   is empty.
-# - AC_TRY, AC_.*_IFELSE
+# - AC_TRY, AC_.*_IFELSE, AC_RUN_LOG.
 #   Used in many places.
 # - _AC_
 #   Internal macros are used elsewhere.
@@ -122,7 +122,7 @@ ac_exclude_list='^AC_ARG_VAR$
 ^AC_PATH_(TOOL|PROG)S?$
 ^AC_REPLACE_FUNCS$
 ^AC_SEARCH_LIBS$
-^AC_TRY
+^(AC_TRY.*|AC_RUN_LOG)$
 ^AC_.*_IFELSE$
 ^AC_FD_CC$
 ^(AC_(PROG_CC|C_CONST|C_INLINE|C_VOLATILE))$