Akim Demaille [Thu, 2 Nov 2000 17:44:02 +0000 (17:44 +0000)]
The documentation is not clear about the obsoleteness of
`acconfig.h', `config.h.top', and `config.h.bot'.
Reported by Aharon Robbins.
* doc/autoconf.texi (Making configure Scripts)
(Automatic Remaking, Defining Symbols, Distributing): Forget about
these files.
(acconfig.h): Reword.
Display the old scheme presenting the dependencies between input
and output files.
(Changed File Names): Clarify.
Pavel Roskin [Thu, 2 Nov 2000 17:03:32 +0000 (17:03 +0000)]
* ifnames.sh: Put the opening brace on the same line with
patterns. Reported by Paul Martinolich.
* tests/tools.at (AWK portability): Check ifnames.
(ifnames): New test for ifnames.
* THANKS: Updated.
Akim Demaille [Thu, 2 Nov 2000 15:21:04 +0000 (15:21 +0000)]
* tests/atgeneral.m4 (AT_CHECK): Check stderr first, since if both
stdout and stderr fail, differences on the latter are probably
more significant than on the former.
Akim Demaille [Wed, 1 Nov 2000 17:32:17 +0000 (17:32 +0000)]
In M4sugar, move `define', `undefine', and `defn' into the `m4_'
name space.
* m4sugar.m4 (m4_define, m4_defn, m4_undefine): New macros.
(define, defn, undefine): Undefine.
Adjust all uses.
* m4sh.m4: Adjust.
* autoconf.m4: Reenable these builtins.
* m4sugar.m4 (m4_expansion_stack_dump): Use m4_copy.
Akim Demaille [Wed, 1 Nov 2000 16:49:47 +0000 (16:49 +0000)]
Autoupdate should not depend upon foreign macros.
* autoupdate.sh (ac.m4): Use `_au_define', not `define'.
(input.m4): Use `_au_BUILTIN' not `BUILTIN'.
Pavel Roskin [Mon, 30 Oct 2000 19:47:58 +0000 (19:47 +0000)]
* m4sh.m4 (AS_EXIT): Use "false" for exit code 1, ":" for 0.
* acgeneral.m4 (AC_MSG_ERROR): Don't use m4_default for the
second argument - AS_EXIT takes care of it.
Akim Demaille [Mon, 30 Oct 2000 19:01:24 +0000 (19:01 +0000)]
Move the handling of diversions into M4sugar.
* acgeneral.m4 (_AC_DIVERT, AC_DIVERT, AC_DIVERT_PUSH)
(AC_DIVERT_POP): Move to...
* m4sugar.m4 (_m4_divert, m4_divert, m4_divert_push)
(m4_divert_pop): here.
* acgeneral.m4: Adjust to use only the M4sugar macros.
Nevertheless...
(AC_DIVERT_PUSH, AC_DIVERT_POP): New wrappers around the M4sugar
macros.
(_AC_DIVERT(...)): Rename all the diversions names as...
(_m4_divert(...)): these.
Pavel Roskin [Mon, 30 Oct 2000 12:29:36 +0000 (12:29 +0000)]
* m4sh.m4 (AS_EXIT): New macro that exits and makes sure that $?
is set correctly within the exit trap.
(AS_TMPDIR): Use it.
* acgeneral.m4 (AC_MSG_ERROR): Likewise,
Pavel Roskin [Mon, 30 Oct 2000 03:20:00 +0000 (03:20 +0000)]
* autoconf.sh: When scanning for unexpanded macros match only
words beginning with "A?_" and "m4_" or containing "_A?_".
Strip the comments before the matching. Don't use character
ranges.
Akim Demaille [Fri, 27 Oct 2000 14:15:28 +0000 (14:15 +0000)]
Use AC_MSG_ERROR in the test suite, not just `exit'.
* tests/README: New file.
* tests/semantics.at: Don't just `exit 1' or `exit 77' from
configure.in: call AC_MSG_ERROR.
* tests/base.m4: Likewise.
* tests/m4sh.at: Likewise.
* tests/semantics.at (AT_CHECK_PROGS_PREPARE): New macro, eved
out of...
(AC_CHECK_PROG & AC_PATH_PROG): here.
Split into two individual tests...
(AC_CHECK_PROG & AC_CHECK_PROGS, AC_PATH_PROG & AC_PATH_PROGS): these.
Pavel Roskin [Fri, 27 Oct 2000 13:47:54 +0000 (13:47 +0000)]
* autoconf.sh: Recognize short options followed by arguments
without separators.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise. Recognize abbreviations for
"--autoconf-dir" and "--m4dir"
* autoupdate.sh: Likewise. Recognize abbreviations for
"--autoconf-dir"
Pavel Roskin [Thu, 26 Oct 2000 22:27:48 +0000 (22:27 +0000)]
* autoconf.sh: Don't show obsolete options on "--help". Report
obsolete options to stderr. Adjust list of options. Correct
processing of options. Process options with values separated by
"=" first, so that abbreviations work. Don't accept "=" with
short options.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: There is no "--verbose" option.
* doc/autoconf.texi: Option "-A" requires an argument.
(autoreconf Invocation): Document "--install", "--symlink",
"--m4dir" and the options passed to Automake.
Akim Demaille [Wed, 25 Oct 2000 17:51:10 +0000 (17:51 +0000)]
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
Akim Demaille [Wed, 25 Oct 2000 15:04:29 +0000 (15:04 +0000)]
* acgeneral.m4 (AC_SHELL_DIRNAME): Split its code into...
(AC_SHELL_DIRNAME_EXPR, AC_SHELL_DIRNAME_SED): these new macros.
* tests/base.m4 (AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): New
test.
Pavel Roskin [Wed, 25 Oct 2000 11:47:20 +0000 (11:47 +0000)]
* tests/aclocal.m4 (AC_ENV_SAVE): Rename to ...
(AC_STATE_SAVE): ... this. Save the list of all files
in the current directory.
* tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Compare lists of
files created by AC_ENV_SAVE. Remove state* before and after
the test.
Akim Demaille [Tue, 24 Oct 2000 16:54:48 +0000 (16:54 +0000)]
Start avoiding dependence upon character ranges.
* acgeneral.m4 (_AC_INIT_DEFAULTS): Introduce `ac_cr_AZ',
`ac_cr_az', `ac_cr_09', `ac_cr_alnum' and `ac_hostname'.
Spread their use.
Akim Demaille [Tue, 24 Oct 2000 16:37:14 +0000 (16:37 +0000)]
* acgeneral.m4 (AC_OUTPUT): Don't play with `trap'.
(_AC_INIT_PREPARE): Trap after having created config.log.
Also trap on 0.
When trapped, report why in config.log.
(AC_MSG_WARN, AC_MSG_ERROR): Also output the message in
config.log.
Akim Demaille [Tue, 24 Oct 2000 11:59:45 +0000 (11:59 +0000)]
* acgeneral.m4 (_AC_SHELL_DIRNAME): Rename as...
(AC_SHELL_DIRNAME): this.
s/X$1/X[]$1/ so that when $1 is a macro, it's given a chance to be
expanded.
(AC_PREFIX_PROGRAM): Use AC_SHELL_DIRNAME.
Quote properly.
Akim Demaille [Mon, 23 Oct 2000 19:13:37 +0000 (19:13 +0000)]
Since GNU M4 now comes with its libm4 (binary), to avoid
ambiguities let's rename `libm4' (M4 code) as `m4sugar':
Readability And Greater Understanding Stands 4 M4sugar
name coined by Lars J. Aas.
* libm4.m4: Rename as...
* m4sugar.m4: this.
All dependencies adjusted.
Akim Demaille [Mon, 23 Oct 2000 18:58:43 +0000 (18:58 +0000)]
* tests/mktests.sh (update_exclude_list, syntax_exclude_list): Add
`AC_PREREQ'.
* tests/tools.m4: Globally, don't use `../' to invoke the tested
tools, since the PATH is properly set, and in most cases it
obfuscates the test code.
(autoupdating AC_PREREQ): New tests.
Akim Demaille [Mon, 23 Oct 2000 18:32:17 +0000 (18:32 +0000)]
In order to check that all the CPP symbols which are AC_DEFINE'd
are properly templated, autoheader traces
AC_DEFINE/AC_DEFINE_UNQUOTED. Only literals can be traced, and
actually tracing non literals produces invalid autoheader input.
Hence, provide a means to trace calls to
AC_DEFINE/AC_DEFINE_UNQUOTED with literals.
* acgeneral.m4 (AC_DEFINE_TRACE, AC_DEFINE_TRACE_LITERAL): New
macros.
(AC_DEFINE, AC_DEFINE_UNQUOTED): Use AC_DEFINE_TRACE.
* autoheader.sh: Trace AC_DEFINE_TRACE_LITERAL, not
AC_DEFINE/AC_DEFINE_UNQUOTED.
Akim Demaille [Mon, 23 Oct 2000 17:41:27 +0000 (17:41 +0000)]
Let autoupdate change AC_PREREQ to require the current version of
Autoconf.
* acgeneral.m4 (_AC_VERSION_UNLETTER, _AC_VERSION_COMPARE): Move
to...
* libm4.m4 (m4_version_unletter, m4_version_compare): here.
Adjust dependencies.
* acgeneral.m4 (AU::AC_PREREQ): New macro.
* autoupdate.sh: Fail when `m4 input.m4' fails.
Akim Demaille [Wed, 18 Oct 2000 16:18:18 +0000 (16:18 +0000)]
* aclang.m4 (_AC_PROG_CC_G): Use the _AC_COMPILE_IFELSE macro
instead of reinventing the wheel. This also takes care of a bug
where the "-g" option was accepted if the compiler silently exits
with status unequal to 0.
(_AC_PROG_CXX_G): Likewise.
(AC_PROG_CC): As _AC_PROG_CC_G depends on $ac_objext and
$ac_exeext, move the expansion of _AC_OBJEXT and _AC_EXEEXT in
front of _AC_PROG_CC_G.
(AC_PROG_CXX, AC_PROG_F77): Likewise.
Akim Demaille [Wed, 18 Oct 2000 12:42:20 +0000 (12:42 +0000)]
* tests/atgeneral.m4 (AT_INIT): Avoid foo="`bar`", foo=`bar` is
enough.
Use grep to check the presence of a string in a stream.
* m4/atconfig.m4: Quote.
Akim Demaille [Tue, 17 Oct 2000 16:34:10 +0000 (16:34 +0000)]
* acgeneral.m4 (AC_CHECK_TOOL): As AC_CHECK_PROG first tests the
value of the VARIABLE argument when looking for executables, we
need to set it to the correct value from AC_CHECK_TOOL when not
just passing on the incoming VARIABLE directly.
(AC_CHECK_TOOLS, AC_PATH_TOOL): Likewise.
Akim Demaille [Tue, 17 Oct 2000 12:48:50 +0000 (12:48 +0000)]
* acgeneral.m4 (_AC_INIT_PREPARE): Move the
_AC_INIT_PREPARE_ENVIRONMENT invocation to...
(_AC_INIT_DEFAULTS): here, so that we keep the same known
environment for more of the script.
Akim Demaille [Tue, 17 Oct 2000 09:43:33 +0000 (09:43 +0000)]
Somehow, the adjustment of `mktests.sh' claimed on 2000-10-17 by
myself (`Fix autoupdate...') was not applied.
* tests/mktests.sh (update_exclude_egrep): Add AC_INIT, AC_OUTPUT,
AC_LINK_IFELSE.
Akim Demaille [Tue, 17 Oct 2000 09:08:32 +0000 (09:08 +0000)]
* acgeneral.m4 (AC_CHECK_PROG, AC_CHECK_PROGS, AC_PATH_PROG)
(AC_PATH_PROGS, AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Fix
the quotation.
(AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Check with the
$ac_tool_prefix iff it is not empty.
Akim Demaille [Tue, 17 Oct 2000 08:41:26 +0000 (08:41 +0000)]
* acgeneral.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE)
(_AC_RUN_IFELSE): Before compiling, remove the files expected to
be produced.
(_AC_LINK_IFELSE, _AC_RUN_IFELSE): You don't create object files,
so don't remove them.
Akim Demaille [Tue, 17 Oct 2000 08:07:59 +0000 (08:07 +0000)]
Give a means to report where the macros have been defined in error
messages.
* libm4.m4 (m4_location): New macro.
(m4_errprint): Rename as...
(m4_diagnose): this. Use m4_location.
Adjust dependencies.
(m4_errprint): New macro, similar to `errprint' but for an
additional trailing `n'.
* acgeneral.m4 (AC_DEFUN, AC_DEFUN_ONCE): Define `m4_location($1)'
to the current location (i.e., that of the definition of $1).
(_AC_DEFUN_PRO, _AC_REQUIRE): Also push the location of the
current macro in the stack.
(_AC_EXPANSION_STACK_DUMP): Adjust.
Akim Demaille [Tue, 17 Oct 2000 07:55:44 +0000 (07:55 +0000)]
Fix autoupdate: updating `AC_OUTPUT_COMMANDS' was failing because
it includes another AU defined macro.
* autoupdate.sh (input.m4:_au_defun): New macro.
(au.m4): Use it instead of inlining _au_enable/_au_disable
invocations in the definition of all these macros.
(input.m4:__au_enable, input.m4:__au_disable): New macros.
(input.m4:_au_enable, input.m4:_au_disable): Use them.
* tests/mktests.sh (update_exclude_list): Add `AC_OUTPUT'.
Running it twice in a configure.in is not valid.
Add `AC_LINK_FILES' since it requires arguments.
* tests/tools.m4 (autoupdating AC_LINK_FILES): New test.
Pavel Roskin [Sun, 15 Oct 2000 02:12:38 +0000 (02:12 +0000)]
* m4/missing.m4 (AM_MISSING_PROG): Use $SHELL to run "missing"
* configure.in: Don't add $SHELL to the path of help2man -
it is already added by AM_MISSING_PROG.
Pavel Roskin [Thu, 12 Oct 2000 20:46:23 +0000 (20:46 +0000)]
* acspecific.m4 (AC_PROG_LEX): Don't assume that lex exists.
Don't run _AC_DECL_YYTEXT if it doesn't. Always check libl and
libfl regardless of the $LEX value.