the log.
(_AC_INIT_PREPARE): Do it in the trap 0.
+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>
# ---------------------
# 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
## ------------ ##
EOF
-m4_wrap([AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])[]])dnl
_AC_INIT_DEFAULTS_FDS
#
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
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
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"
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
# ---------------------
# 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
## ------------ ##
EOF
-m4_wrap([AC_EXPAND_ONCE([_AC_INIT_LOG_COMPLETE])[]])dnl
_AC_INIT_DEFAULTS_FDS
#
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
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
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"