AS_ERROR was not properly saving data in the log file.

* sh.m4 (AS_WARN, AS_ERROR): Use AS_MESSAGE.
(_AS_ECHO): Fix quotation.
(AS_MESSAGE): Use `as_me'.
* acgeneral.m4: More banners in the log.
(_AC_INIT_DEFAULTS): Compute as_me before using it.
This commit is contained in:
Akim Demaille 2000-12-12 10:53:41 +00:00
parent d0bbf5dcb6
commit 1088d101b2
5 changed files with 100 additions and 64 deletions

View File

@ -1,3 +1,13 @@
2000-12-12 Akim Demaille <akim@epita.fr>
AS_ERROR was not properly saving data in the log file.
* sh.m4 (AS_WARN, AS_ERROR): Use AS_MESSAGE.
(_AS_ECHO): Fix quotation.
(AS_MESSAGE): Use `as_me'.
* acgeneral.m4: More banners in the log.
(_AC_INIT_DEFAULTS): Compute as_me before using it.
2000-12-08 Akim Demaille <akim@epita.fr>
* doc/autoconf.texi (System Services) <AC_PATH_XTRA>: Adjust the

View File

@ -739,6 +739,14 @@ m4_define([_AC_INIT_DEFAULTS],
AS_SHELL_SANITIZE
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
# Name of the executable.
as_me=`echo "$[0]" | sed 's,.*/,,'`
cat >config.log << EOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@ -747,8 +755,12 @@ It was created by $as_me m4_ifset([AC_PACKAGE_STRING],
[(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
> $[0] $[@]
on `(hostname || uname -n) 2>/dev/null | sed 1q`:
## ---------- ##
## Platform. ##
## ---------- ##
hostname = $ac_hostname
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
@ -766,6 +778,11 @@ hostinfo = `(hostinfo) 2>/dev/null`
/bin/universe = `(/bin/universe) 2>/dev/null`
PATH = $PATH
## ------------ ##
## Core tests. ##
## ------------ ##
EOF
_AC_INIT_DEFAULTS_FDS
@ -783,14 +800,6 @@ AC_SUBST(SHELL, ${CONFIG_SHELL-/bin/sh})dnl
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
# Name of the executable.
as_me=`echo "$[0]" | sed 's,.*/,,'`
# Avoid depending upon Character Ranges.
ac_cr_az='abcdefghijklmnopqrstuvwxyz'
ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@ -3721,7 +3730,6 @@ m4_define([_AC_LIST_SUBDIRS])
#
# If there are arguments given to AC_OUTPUT, dispatch them to the
# proper modern macros.
AU_DEFUN([AC_OUTPUT],
[m4_ifvaln([$1],
[AC_CONFIG_FILES([$1])])dnl
@ -3763,12 +3771,22 @@ dnl Commands to run before creating config.status.
AC_OUTPUT_COMMANDS_PRE()dnl
# Save into config.log some information that might help in debugging.
echo >&AS_MESSAGE_LOG_FD
echo "Cache variables:" >&AS_MESSAGE_LOG_FD
_AC_CACHE_DUMP | sed 's/^/| /' >&AS_MESSAGE_LOG_FD
echo >&AS_MESSAGE_LOG_FD
echo "confdefs.h:" >&AS_MESSAGE_LOG_FD
sed '/^$/d;s/^/| /' confdefs.h >&AS_MESSAGE_LOG_FD
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
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@ -3807,7 +3825,9 @@ AS_SHELL_SANITIZE
_AC_INIT_DEFAULTS_FDS
cat >&AS_MESSAGE_LOG_FD << EOF
----------------------------------------------------------------------
## ----------------------- ##
## Running config.status. ##
## ----------------------- ##
This file was extended by $as_me m4_ifset([AC_PACKAGE_STRING],
[(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with

View File

@ -739,6 +739,14 @@ m4_define([_AC_INIT_DEFAULTS],
AS_SHELL_SANITIZE
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
# Name of the executable.
as_me=`echo "$[0]" | sed 's,.*/,,'`
cat >config.log << EOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@ -747,8 +755,12 @@ It was created by $as_me m4_ifset([AC_PACKAGE_STRING],
[(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
> $[0] $[@]
on `(hostname || uname -n) 2>/dev/null | sed 1q`:
## ---------- ##
## Platform. ##
## ---------- ##
hostname = $ac_hostname
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
@ -766,6 +778,11 @@ hostinfo = `(hostinfo) 2>/dev/null`
/bin/universe = `(/bin/universe) 2>/dev/null`
PATH = $PATH
## ------------ ##
## Core tests. ##
## ------------ ##
EOF
_AC_INIT_DEFAULTS_FDS
@ -783,14 +800,6 @@ AC_SUBST(SHELL, ${CONFIG_SHELL-/bin/sh})dnl
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
# Name of the executable.
as_me=`echo "$[0]" | sed 's,.*/,,'`
# Avoid depending upon Character Ranges.
ac_cr_az='abcdefghijklmnopqrstuvwxyz'
ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@ -3721,7 +3730,6 @@ m4_define([_AC_LIST_SUBDIRS])
#
# If there are arguments given to AC_OUTPUT, dispatch them to the
# proper modern macros.
AU_DEFUN([AC_OUTPUT],
[m4_ifvaln([$1],
[AC_CONFIG_FILES([$1])])dnl
@ -3763,12 +3771,22 @@ dnl Commands to run before creating config.status.
AC_OUTPUT_COMMANDS_PRE()dnl
# Save into config.log some information that might help in debugging.
echo >&AS_MESSAGE_LOG_FD
echo "Cache variables:" >&AS_MESSAGE_LOG_FD
_AC_CACHE_DUMP | sed 's/^/| /' >&AS_MESSAGE_LOG_FD
echo >&AS_MESSAGE_LOG_FD
echo "confdefs.h:" >&AS_MESSAGE_LOG_FD
sed '/^$/d;s/^/| /' confdefs.h >&AS_MESSAGE_LOG_FD
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
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@ -3807,7 +3825,9 @@ AS_SHELL_SANITIZE
_AC_INIT_DEFAULTS_FDS
cat >&AS_MESSAGE_LOG_FD << EOF
----------------------------------------------------------------------
## ----------------------- ##
## Running config.status. ##
## ----------------------- ##
This file was extended by $as_me m4_ifset([AC_PACKAGE_STRING],
[(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with

View File

@ -180,7 +180,7 @@ m4_define([_AS_QUOTE_IFELSE],
# _AS_ECHO_UNQUOTED(STRING, [FD = AS_MESSAGE_FD])
# ---------------------------------------------------
# -----------------------------------------------
# Perform shell expansions on STRING and echo the string to FD.
m4_define([_AS_ECHO_UNQUOTED],
[echo "$1" >&m4_default([$2], [AS_MESSAGE_FD])])
@ -205,37 +205,30 @@ $1])])
# ----------------------------------
# Protect STRING from backquote expansion, echo the result to FD.
m4_define([_AS_ECHO],
[_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], $2)])
[_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], [$2])])
# AS_MESSAGE(STRING, [FD = AS_MESSAGE_FD])
# --------------------------------------------
# ----------------------------------------
m4_define([AS_MESSAGE],
[m4_ifset([AS_MESSAGE_LOG_FD],
[{ _AS_ECHO([$as_me:__oline__: $1], [AS_MESSAGE_LOG_FD])
_AS_ECHO($@);}],
[_AS_ECHO($@)])[]dnl
_AS_ECHO([$as_me: $1], [$2]);}],
[_AS_ECHO([$as_me: $1], [$2])])[]dnl
])
# AS_WARN(PROBLEM)
# ----------------
m4_define([AS_WARN],
[m4_ifset([AS_MESSAGE_LOG_FD],
[{ _AS_ECHO([$as_me:__oline__: WARNING: $1], [AS_MESSAGE_LOG_FD])
_AS_ECHO([$as_me: warning: $1], 2); }],
[_AS_ECHO([$as_me: warning: $1], 2)])[]dnl
])# AS_WARN
[AS_MESSAGE([WARNING: $1], [2])])# AS_WARN
# AS_ERROR(ERROR, [EXIT-STATUS = 1])
# ----------------------------------
m4_define([AS_ERROR],
[{m4_ifset([AC_LOG_FD],
[_AS_ECHO([$as_me:__oline__: error: $1], [AS_MESSAGE_LOG_FD])
])[]dnl
_AS_ECHO([$as_me: error: $1], 2)
AS_EXIT([$2]); }[]dnl
[{ AS_MESSAGE([error: $1], [2])
AS_EXIT([$2]); }
])# AS_ERROR

23
m4sh.m4
View File

@ -180,7 +180,7 @@ m4_define([_AS_QUOTE_IFELSE],
# _AS_ECHO_UNQUOTED(STRING, [FD = AS_MESSAGE_FD])
# ---------------------------------------------------
# -----------------------------------------------
# Perform shell expansions on STRING and echo the string to FD.
m4_define([_AS_ECHO_UNQUOTED],
[echo "$1" >&m4_default([$2], [AS_MESSAGE_FD])])
@ -205,37 +205,30 @@ $1])])
# ----------------------------------
# Protect STRING from backquote expansion, echo the result to FD.
m4_define([_AS_ECHO],
[_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], $2)])
[_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], [$2])])
# AS_MESSAGE(STRING, [FD = AS_MESSAGE_FD])
# --------------------------------------------
# ----------------------------------------
m4_define([AS_MESSAGE],
[m4_ifset([AS_MESSAGE_LOG_FD],
[{ _AS_ECHO([$as_me:__oline__: $1], [AS_MESSAGE_LOG_FD])
_AS_ECHO($@);}],
[_AS_ECHO($@)])[]dnl
_AS_ECHO([$as_me: $1], [$2]);}],
[_AS_ECHO([$as_me: $1], [$2])])[]dnl
])
# AS_WARN(PROBLEM)
# ----------------
m4_define([AS_WARN],
[m4_ifset([AS_MESSAGE_LOG_FD],
[{ _AS_ECHO([$as_me:__oline__: WARNING: $1], [AS_MESSAGE_LOG_FD])
_AS_ECHO([$as_me: warning: $1], 2); }],
[_AS_ECHO([$as_me: warning: $1], 2)])[]dnl
])# AS_WARN
[AS_MESSAGE([WARNING: $1], [2])])# AS_WARN
# AS_ERROR(ERROR, [EXIT-STATUS = 1])
# ----------------------------------
m4_define([AS_ERROR],
[{m4_ifset([AC_LOG_FD],
[_AS_ECHO([$as_me:__oline__: error: $1], [AS_MESSAGE_LOG_FD])
])[]dnl
_AS_ECHO([$as_me: error: $1], 2)
AS_EXIT([$2]); }[]dnl
[{ AS_MESSAGE([error: $1], [2])
AS_EXIT([$2]); }
])# AS_ERROR