[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10-ac-msg-error-in-config-status.patch
From: |
Akim Demaille |
Subject: |
10-ac-msg-error-in-config-status.patch |
Date: |
12 Nov 2000 15:53:01 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Index: ChangeLog
from Akim Demaille <address@hidden>
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
Index: acgeneral.m4
--- acgeneral.m4 Sat, 11 Nov 2000 16:02:51 +0100 akim (ace/27_acgeneral.
1.169.8.84 644)
+++ acgeneral.m4 Sat, 11 Nov 2000 17:13:09 +0100 akim (ace/27_acgeneral.
1.169.8.84 644)
@@ -666,7 +666,7 @@ m4_define([AC_COPYRIGHT],
# which sees the opening of a string.
m4_define([AC_REVISION],
[m4_divert([REVISION],
- address@hidden:@ From configure.in m4_translit([$1], $"").])dnl
+ address@hidden:@ From __file__ m4_translit([$1], [$""]).])dnl
])
@@ -800,14 +800,24 @@ m4_define([_AC_INIT_DEFAULTS_FDS],
else
exec AC_FD_MSG>&1
fi
-exec AC_FD_LOG>./config.log
+exec AC_FD_LOG>>config.log
+])# _AC_INIT_DEFAULTS_FDS
+
+
+# _AC_INIT_DEFAULTS
+# -----------------
+# Values which defaults can be set from `configure.in'.
+m4_define([_AC_INIT_DEFAULTS],
+[m4_divert_push([DEFAULTS])dnl
-echo "\
+_AC_INIT_DEFAULTS_ENVIRONMENT
+
+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 configure ifset([AC_PACKAGE_STRING],
- [(AC_PACKAGE_STRING)]) AC_ACVERSION, executed with
+It was created by $as_me ifset([AC_PACKAGE_STRING],
+ [(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
> $[0] address@hidden
on `(hostname || uname -n) 2>/dev/null | sed 1q`:
@@ -826,20 +836,9 @@ m4_define([_AC_INIT_DEFAULTS_FDS],
/bin/arch = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-" >&AC_FD_LOG
-])# _AC_INIT_DEFAULTS_FDS
-
-
-# _AC_INIT_DEFAULTS
-# -----------------
-# Values which defaults can be set from `configure.in'.
-m4_define([_AC_INIT_DEFAULTS],
-[m4_divert_push([DEFAULTS])dnl
+EOF
-_AC_INIT_DEFAULTS_ENVIRONMENT
_AC_INIT_DEFAULTS_FDS
-
-
#
# Initializations.
#
@@ -859,6 +858,9 @@ m4_define([_AC_INIT_DEFAULTS],
# 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'
@@ -1269,7 +1271,7 @@ m4_define([_AC_INIT_PARSE_ARGS],
x_libraries=$ac_optarg ;;
-*) AC_MSG_ERROR([unrecognized option: $ac_option
-Try `configure --help' for more information.])
+Try `$[0] --help' for more information.])
;;
*=*)
@@ -1537,8 +1539,8 @@ m4_define([_AC_INIT_PREPARE],
# config.log.
trap 'exit_status=$?
test "$ac_signal" != 0 &&
- echo "configure: caught signal $ac_signal" >&AC_FD_LOG
- echo "configure: exit $exit_status" >&AC_FD_LOG
+ echo "$as_me: caught signal $ac_signal" >&AC_FD_LOG
+ echo "$as_me: exit $exit_status" >&AC_FD_LOG
rm -rf conftest* confdefs* core core.* *.core $ac_clean_files &&
exit $exit_status
' 0
@@ -1991,14 +1993,14 @@ m4_define([AC_CACHE_LOAD],
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
- echo "loading cache $cache_file"
+ AC_MSG_NOTICE([loading cache $cache_file])
case $cache_file in
[[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
*) . ./$cache_file;;
esac
fi
else
- echo "creating cache $cache_file"
+ AC_MSG_NOTICE([creating cache $cache_file])
>$cache_file
fi
])# AC_CACHE_LOAD
@@ -2273,7 +2275,7 @@ m4_define([_AC_ECHO_N],
# AC_MSG_NOTICE(STRING)
# ---------------------
m4_define([AC_MSG_NOTICE],
-[_AC_ECHO([configure:__oline__: notice: $1], AC_FD_LOG)
+[_AC_ECHO([$as_me:__oline__: notice: $1], AC_FD_LOG)
_AC_ECHO([$1])[]dnl
])
@@ -2281,7 +2283,7 @@ m4_define([AC_MSG_NOTICE],
# AC_MSG_CHECKING(FEATURE)
# ------------------------
m4_define([AC_MSG_CHECKING],
-[_AC_ECHO([configure:__oline__: checking $1], AC_FD_LOG)
+[_AC_ECHO([$as_me:__oline__: checking $1], AC_FD_LOG)
_AC_ECHO_N([checking $1... ])[]dnl
])
@@ -2289,7 +2291,7 @@ m4_define([AC_MSG_CHECKING],
# AC_MSG_RESULT(RESULT)
# ---------------------
m4_define([AC_MSG_RESULT],
-[_AC_ECHO([configure:__oline__: result: $1], AC_FD_LOG)
+[_AC_ECHO([$as_me:__oline__: result: $1], AC_FD_LOG)
_AC_ECHO([${ECHO_T}$1])[]dnl
])
@@ -2298,7 +2300,7 @@ m4_define([AC_MSG_RESULT],
# ------------------------------
# Likewise, but perform $ ` \ shell substitutions.
m4_define([AC_MSG_RESULT_UNQUOTED],
-[_AC_ECHO_UNQUOTED([configure:__oline__: result: $1], AC_FD_LOG)
+[_AC_ECHO_UNQUOTED([$as_me:__oline__: result: $1], AC_FD_LOG)
_AC_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
])
@@ -2306,15 +2308,15 @@ m4_define([AC_MSG_RESULT_UNQUOTED],
# AC_MSG_WARN(PROBLEM)
# --------------------
m4_define([AC_MSG_WARN],
-[{ _AC_ECHO([configure:__oline__: WARNING: $1], AC_FD_LOG)
-_AC_ECHO([configure: WARNING: $1], 2); }])
+[{ _AC_ECHO([$as_me:__oline__: WARNING: $1], AC_FD_LOG)
+_AC_ECHO([$as_me: WARNING: $1], 2); }])
# AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
# --------------------------------------
m4_define([AC_MSG_ERROR],
-[{ _AC_ECHO([configure:__oline__: error: $1], AC_FD_LOG)
- _AC_ECHO([configure: error: $1], 2)
+[{ _AC_ECHO([$as_me:__oline__: error: $1], AC_FD_LOG)
+ _AC_ECHO([$as_me: error: $1], 2)
AS_EXIT([$2]); }])
@@ -2343,7 +2345,7 @@ m4_define([AC_MSG_ERROR],
# The purpose of this macro is to "configure:123: command line"
# written into config.log for every test run.
AC_DEFUN([AC_TRY_EVAL],
-[{ (eval echo configure:__oline__: \"[$]$1\") >&AC_FD_LOG; dnl
+[{ (eval echo $as_me:__oline__: \"[$]$1\") >&AC_FD_LOG; dnl
(eval [$]$1) 2>&AC_FD_LOG; }])
@@ -2856,7 +2858,7 @@ AC_DEFUN([AC_TRY_CPP],
m4_default([$2], :)
else
cat conftest.err >&AC_FD_LOG
- echo "configure: failed program was:" >&AC_FD_LOG
+ echo "$as_me: failed program was:" >&AC_FD_LOG
cat conftest.$ac_ext >&AC_FD_LOG
$3
fi
@@ -2910,7 +2912,7 @@ m4_define([_AC_COMPILE_IFELSE],
if AC_TRY_EVAL(ac_compile) && test -s conftest.$ac_objext; then
m4_default([$2], :)
else
- echo "configure: failed program was:" >&AC_FD_LOG
+ echo "$as_me: failed program was:" >&AC_FD_LOG
cat conftest.$ac_ext >&AC_FD_LOG
m4_ifvanl([$3],[ $3])dnl
fi
@@ -2951,7 +2953,7 @@ m4_define([_AC_LINK_IFELSE],
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
m4_default([$2], :)
else
- echo "configure: failed program was:" >&AC_FD_LOG
+ echo "$as_me: failed program was:" >&AC_FD_LOG
cat conftest.$ac_ext >&AC_FD_LOG
m4_ifvanl([$3], [ $3])dnl
fi
@@ -3010,7 +3012,7 @@ m4_define([_AC_RUN_IFELSE],
test -s conftest$ac_exeext && (./conftest$ac_exeext; exit) 2>/dev/null; then
m4_default([$2], :)
else
- echo "configure: failed program was:" >&AC_FD_LOG
+ echo "$as_me: failed program was:" >&AC_FD_LOG
cat conftest.$ac_ext >&AC_FD_LOG
m4_ifvanl([$3], [ $3])dnl
fi
@@ -3910,7 +3912,7 @@ m4_define([AC_OUTPUT],
_AC_CACHE_DUMP | sed 's/^/| /' >&AC_FD_LOG
echo >&AC_FD_LOG
echo "confdefs.h:" >&AC_FD_LOG
-cat confdefs.h | sed 's/^/| /' >&AC_FD_LOG
+sed '/^$/d;s/^/| /' confdefs.h >&AC_FD_LOG
: ${CONFIG_STATUS=./config.status}
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
@@ -3933,21 +3935,33 @@ m4_define([AC_OUTPUT],
# Pay special attention not to have too long here docs: some old
# shells die. Unfortunately the limit is not known precisely...
m4_define([_AC_OUTPUT_CONFIG_STATUS],
-[echo creating $CONFIG_STATUS
-cat >$CONFIG_STATUS <<\EOF
+[AC_MSG_NOTICE([creating $CONFIG_STATUS])
+cat >$CONFIG_STATUS <<\_ACEOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-_AC_INIT_DEFAULTS_ENVIRONMENT
debug=false
-me=`echo "$[0]" | sed 's,.*/,,'`
+as_me=`echo "$[0]" | sed 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}
+_AC_INIT_DEFAULTS_ENVIRONMENT
+_AC_INIT_DEFAULTS_FDS
+cat >&AC_FD_LOG << EOF
+
+----------------------------------------------------------------------
+
+This file was extended by $as_me ifset([AC_PACKAGE_STRING],
+ [(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
+ > $[0] address@hidden
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
EOF
+_ACEOF
+
# Files that config.status was made for.
if test -n "$ac_config_files"; then
echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
@@ -3968,7 +3982,7 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
cat >>$CONFIG_STATUS <<\EOF
ac_cs_usage="\
-\`$me' instantiates files from templates according to the
+\`$as_me' instantiates files from templates according to the
current configuration.
Usage: $[0] [[OPTIONS]] [[FILE]]...
@@ -3976,7 +3990,7 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
-h, --help print this help, then exit
-V, --version print version number, then exit
-d, --debug don't remove temporary files
- --recheck update $me by reconfiguring in the same conditions
+ --recheck update $as_me by reconfiguring in the same conditions
ifset([AC_LIST_FILES],
[[ --file=FILE[:TEMPLATE]
instantiate the configuration file FILE
@@ -4011,7 +4025,7 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
-$CONFIG_STATUS generated by autoconf version AC_ACVERSION.
+$CONFIG_STATUS generated by $as_me (Autoconf AC_ACVERSION).
Configured on host $ac_hostname by
`echo "[$]0 $ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
@@ -4056,8 +4070,8 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- echo "$me: ambiguous option: $ac_option
-Try \`$me --help' for more information."; exit 1 ;;
+ AC_MSG_ERROR([ambiguous option: $ac_option
+Try \`$[0] --help' for more information.]);;
--help | --hel | -h )
echo "$ac_cs_usage"; exit 0 ;;
--debug | --d* | -d )
@@ -4090,9 +4104,9 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
])dnl
# This is an error.
- -*) echo "$me: unrecognized option: $[1]
-Try \`$me --help' for more information."; exit 1 ;;
- *) echo "$me: invalid argument: $[1]"; exit 1 ;;
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ *) AC_MSG_ERROR([invalid argument: $[1]]);;
esac
shift
done
@@ -4303,9 +4317,12 @@ m4_define([_AC_OUTPUT_FILES],
])dnl
if test x"$ac_file" != x-; then
- echo creating $ac_file
+ AC_MSG_NOTICE([creating $ac_file])
rm -f "$ac_file"
fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
configure_input="Generated automatically from `echo $ac_file_in |
sed 's,.*/,,'` by configure."
@@ -4457,7 +4474,7 @@ m4_define([_AC_OUTPUT_HEADERS],
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && echo creating $ac_file
+ test x"$ac_file" != x- && AC_MSG_NOTICE([creating $ac_file])
# First look for the input files in the build tree, otherwise in the
# src tree.
@@ -4584,6 +4601,9 @@ m4_define([_AC_OUTPUT_HEADERS],
dnl Now back to your regularly scheduled config.status.
cat >>$CONFIG_STATUS <<\EOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
if test x"$ac_file" = x-; then
echo "/* Generated automatically by configure. */" >$tmp/config.h
else
@@ -4593,7 +4613,7 @@ m4_define([_AC_OUTPUT_HEADERS],
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
- echo "$ac_file is unchanged"
+ AC_MSG_NOTICE([$ac_file is unchanged])
else
ac_dir=`AS_DIRNAME(["$ac_file"])`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
@@ -4638,7 +4658,7 @@ m4_define([_AC_OUTPUT_LINKS],
ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
- echo "linking $srcdir/$ac_source to $ac_dest"
+ AC_MSG_NOTICE([linking $srcdir/$ac_source to $ac_dest])
if test ! -r $srcdir/$ac_source; then
AC_MSG_ERROR($srcdir/$ac_source: File not found)
@@ -4665,7 +4685,7 @@ m4_define([_AC_OUTPUT_LINKS],
if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
ln $srcdir/$ac_source $ac_dest; then :
else
- AC_MSG_ERROR(cannot link $ac_dest to $srcdir/$ac_source)
+ AC_MSG_ERROR([cannot link $ac_dest to $srcdir/$ac_source])
fi
ifset([AC_LIST_LINKS_COMMANDS],
[ # Run the commands associated with the file.
@@ -4754,7 +4774,7 @@ m4_define([_AC_OUTPUT_SUBDIRS],
# parts of a large source tree are present.
test -d $srcdir/$ac_subdir || continue
- echo configuring in $ac_subdir
+ AC_MSG_NOTICE([configuring in $ac_subdir])
case $srcdir in
.) ;;
*) AS_MKDIR_P(["./$ac_subdir"])
@@ -4808,7 +4828,7 @@ m4_define([_AC_OUTPUT_SUBDIRS],
esac
])dnl
- echo "[running $ac_sub_configure $ac_sub_configure_args
--cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
+ AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args
--cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir])
# The eval makes quoting arguments work.
if eval $ac_sub_configure $ac_sub_configure_args
--cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
then :
Index: aclang.m4
--- aclang.m4 Sat, 11 Nov 2000 16:02:51 +0100 akim (ace/b/32_aclang.m4 1.5.3.45
644)
+++ aclang.m4 Sat, 11 Nov 2000 16:14:42 +0100 akim (ace/b/32_aclang.m4 1.5.3.45
644)
@@ -1427,7 +1427,7 @@ AC_DEFUN([_AC_PROG_F77_V_OUTPUT],
# Fortran 77 linker flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS m4_default([$1], [$ac_cv_prog_f77_v])"
-(eval echo configure:__oline__: \"$ac_link\") >&AC_FD_LOG
+(eval echo $as_me:__oline__: \"$ac_link\") >&AC_FD_LOG
ac_f77_v_output=`eval $ac_link AC_FD_LOG>&1 2>&1 | grep -v 'Driving:'`
echo "$ac_f77_v_output" >&AC_FD_LOG
FFLAGS=$ac_save_FFLAGS
Index: tests/semantics.at
--- tests/semantics.at Fri, 03 Nov 2000 20:58:02 +0100 akim
(ace/b/25_semantics. 1.22 644)
+++ tests/semantics.at Sat, 11 Nov 2000 17:09:42 +0100 akim
(ace/b/25_semantics. 1.22 644)
@@ -455,7 +455,7 @@
## Check that config.status detects missing input files. ##
## ------------------------------------------------------ ##
-AT_SETUP(missing templates)
+AT_SETUP([missing templates])
AT_DATA(configure.in,
[[AC_INIT
@@ -463,9 +463,9 @@
AC_OUTPUT
]])
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
AT_CHECK([./configure], 1, ignore,
-[[configure: error: cannot find input file `nonexistent.in'
+[[config.status: error: cannot find input file `nonexistent.in'
]])
# Make sure that the output file doesn't exist
AT_CHECK([test -f nonexistent], 1)
- 10-ac-msg-error-in-config-status.patch,
Akim Demaille <=