(_AC_EVAL_STDERR, _AC_EVAL): Use them.
(_AC_INIT_PREPARE_FS_SEPARATORS): Use AC_RUN_LOG.
+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
[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=:
## ---------------------------- ##
-# _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
(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"
# 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])"])])
## ------------------ ##
[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=:
## ---------------------------- ##
-# _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
(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"
# 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])"])])
## ------------------ ##
# - 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.
^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))$