Akim Demaille [Tue, 14 Nov 2000 10:44:27 +0000 (10:44 +0000)]
Set AC_LANG_PREPROC_REQUIRE which replaces AC_REQUIRE_CPP.
The main difference is that the former requires AC_LANG_COMPILER.
* aclang (AC_LANG_PREPROC, AC_LANG_PREPROC(C), AC_LANG_PREPROC(C++))
(AC_LANG_PREPROC(Fortran 77), AC_LANG_PREPROC_REQUIRE): New
macros. Issue a warning when looking for the Fortran 77
preprocessor instead of an error.
(AC_LANG_COMPILER): Check that it is run before the corresponding
AC_LANG_PREPROC.
(AC_PROG_C
(AC_LANG_COMPILER_REQUIRE): Don't call directly
AC_LANG_COMPILER(_AC_LANG), rather invoke AC_LANG_COMPILER so that
the generic code in AC_LANG_COMPILER is run.
(AC_REQUIRE_CPP): Use AC_LANG_PREPROC_REQUIRE.
(AC_PROG_CC, AC_PROG_CXX): Don't require being run before the
corresponding AC_LANG_PREPROC: AC_LANG_COMPILER does it.
Propagate AC_LANG_PREPROC_REQUIRE.
* acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP): Use it instead of
AC_REQUIRE_CPP.
* acspecific.m4 (_AC_DECL_YYTEXT, AC_PATH_X): Don't
AC_REQUIRE_CPP, inner macro will do it.
* aclang.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_STRINGIZE)
(AC_C_PROTOTYPES): Likewise.
(AC_C_STRINGIZE): Yeeks! The body of AC_CACHE_CHECK was not
quoted. Use @%:@ do assist Emacs.
For some reason (don't ask), this revamping revealed that
AC_PROG_CC_STDC, because of the `break', does not clean its tmp
files.
* aclang.m4 (AC_PROG_CC_STDC): Extract the creation of conftest.c
out of AC_COMPILE_IFELSE.
Be sure to clean the tmp files.
Akim Demaille [Tue, 14 Nov 2000 10:38:57 +0000 (10:38 +0000)]
* acfunctions.m4 (AC_FUNC_ALLOCA): Don't require AC_PROG_CPP,
since (i) you actually need a compiler, (ii) AC_TRY_LINK handles
it.
* acheaders.m4 (AC_HEADER_STDC): Don't require AC_PROG_CPP,
AC_TRY_CPP does it.
Akim Demaille [Tue, 14 Nov 2000 10:05:14 +0000 (10:05 +0000)]
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.
Pavel Roskin [Fri, 10 Nov 2000 15:49:15 +0000 (15:49 +0000)]
* autoscan.pl (scan_files): Eliminate a warning if no C files
are found.
(output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES
instead of old-style arguments for AC_INIT and AC_OUTPUT.
Akim Demaille [Fri, 10 Nov 2000 14:55:37 +0000 (14:55 +0000)]
* doc/autoconf.texi (Shell Substitutions): Some information about
Solaris' sh handling of ``foo=${foo='}'}'' collected by Alexandre,
reported by David Taylor.
Akim Demaille [Fri, 10 Nov 2000 12:10:13 +0000 (12:10 +0000)]
* doc/autoconf.texi (Shellology): Some about /usr/xpg4/bin/sh on
Solaris.
Sort the entries.
Some words about POSIX vs Bourne shell.
From Russ Allbery and Robert Lipe.
Akim Demaille [Fri, 10 Nov 2000 11:43:23 +0000 (11:43 +0000)]
* doc/autoconf.texi (Shell Substitutions): Split into...
(Shell Substitutions, Assignments): these.
Move them before `Special Shell Variables'.
(Shell Substitutions): Include information on `$()' from Russ
Allbery.
Akim Demaille [Fri, 10 Nov 2000 10:57:34 +0000 (10:57 +0000)]
When running
AC_INIT
AC_PROG_CC
AC_LANG_COMPILER_REQUIRE
AC_PROG_CC is expanded twice, because AC_PROG_CC provides
`AC_PROG_CC', and not `AC_LANG_COMPILER(C)' as expected by
AC_LANG_COMPILER_REQUIRE.
* aclang.m4 (AC_LANG_COMPILER(C)): Instead of calling AC_PROG_CC,
require it.
(AC_LANG_COMPILER(C++), AC_LANG_COMPILER(Fortran 77)): Likewise.
Pavel Roskin [Thu, 9 Nov 2000 18:59:18 +0000 (18:59 +0000)]
* acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Use ":" instead of
"true".
* tests/atgeneral.m4 (AT_INIT): Likewise.
* tests/tools.at (Syntax of the scripts): Likewise.
Akim Demaille [Wed, 8 Nov 2000 17:46:24 +0000 (17:46 +0000)]
* aclang.m4 (AC_LANG_PROGRAM(Fortran 77): Complain about $1 having
a value.
Reported by Paul Martinolich.
(_AC_LANG_COMPILER_GNU): Pass the test as the body of
AC_LANG_PROGRAM, not the prologue.
Pavel Roskin [Tue, 7 Nov 2000 17:58:43 +0000 (17:58 +0000)]
* autoconf.sh: Temporarily disable recognizing of abbreviated
long options - it's hard to maintain them by hand.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
Akim Demaille [Tue, 7 Nov 2000 14:16:54 +0000 (14:16 +0000)]
* aclang.m4 (ac_cv_prog_gcc, ac_cv_prog_gxx, ac_cv_prog_g77):
Be AU_DEFUN'd, not AU_ALIAS'd.
Reported by Ralf Corsepius.
* tests/mktests.sh (exclude_list): Skip these variables.
Akim Demaille [Tue, 7 Nov 2000 11:49:35 +0000 (11:49 +0000)]
m4_syscmd was reestablished as `syscd' intead of `syscmd' because
instead of `s/^m4_//', m4_copy_unm4 was running `s/[m4_]//'.
* m4sugar.m4 (m4_copy_unm4): Fix.
Jim Meyering [Sat, 4 Nov 2000 22:07:50 +0000 (22:07 +0000)]
(AC_FUNC_FNMATCH): Add a test to detect the d*/*1 vs d/s/1 bug.
Add a couple more test cases to catch bugs in glibc 2.1.95.
Include fnmatch.h unconditionally
Mention the GNU C library.
From Paul Eggert.
Akim Demaille [Fri, 3 Nov 2000 15:21:14 +0000 (15:21 +0000)]
* m4sugar.m4 (m4_location): When using its value, don't use
`m4_defn', since m4_location is not a variable, it's a macro which
expands to __file__:__line__.
* tests/m4sugar.at (m4_warn): New test.
Akim Demaille [Fri, 3 Nov 2000 14:01:58 +0000 (14:01 +0000)]
* Makefile.am (.m4.m4f): Check that processing produces only
comments and empty lines.
Check that freezing produced no output.
* m4sugar.m4: Commentize what was not.
* m4sh.m4: Likewise.
* aclang.m4: Formatting changes.
Akim Demaille [Fri, 3 Nov 2000 11:59:39 +0000 (11:59 +0000)]
* acgeneral.m4 (AU_ALIAS): Don't forget to pass the arguments to
the new macro...
Reported by Ezra Peisach.
* tests/semantics.m4 (AC_HAVE_FUNCS): New test.
* tests/tools.at (autoupdate): As a benign side effect, updating a
macro that takes no argument produces `UPDATED([])', no longer
`UPDATED()'. Adjust the test.
Akim Demaille [Fri, 3 Nov 2000 11:14:48 +0000 (11:14 +0000)]
* autoconf.m4: Instead of reactivating the macros before reading
Autoconf's file, do it afterwards, so that Autoconf promotes the
right use, but users still can use the old names.
Of course this revealed numerous non updated uses of old macros in
Autoconf's files. Adjust them.
But for the time being, keep `define' alive for Autoconf.
Akim Demaille [Fri, 3 Nov 2000 10:39:27 +0000 (10:39 +0000)]
AC_REQUIRE and AC_DEFUN_ONCE don't work properly together. This
caused strange messages about AC_ARG_PROGRAM.
Reported by Jim Meyering.
* acgeneral.m4 (AC_DEFUN_ONCE): Fix the indirection to
m4_defun_once.
* m4sugar.m4 (m4_defun_once): Also define
`m4_location(MACRO-NAME)'. s/ac_warn/m4_warn/.
Use `m4_defn' to read `m4_location'.
* tests/base.at (AC_REQUIRE & AC_DEFUN_ONCE): Two new tests.
Akim Demaille [Fri, 3 Nov 2000 10:07:40 +0000 (10:07 +0000)]
Set up config.log earlier so that AC_MSG_ERROR and AC_MSG_WARN can
be used early.
* acgeneral.m4 (_AC_INIT_DEFAULTS): Call `_AC_INIT_PREPARE_FDS'.
(_AC_INIT_PREPARE): Don't.
(_AC_INIT_PREPARE_ENVIRONMENT, _AC_INIT_PREPARE_FDS): Rename as...
(_AC_INIT_DEFAULTS_ENVIRONMENT, _AC_INIT_DEFAULTS_FDS): these,
since they are called from `_AC_INIT_DEFAULTS', not
`_AC_INIT_PREPARE'.
(_AC_INIT_DEFAULTS_FDS): Dump `$@' in config.log, not
`$ac_configure_args' which is not computed yet.
Akim Demaille [Fri, 3 Nov 2000 09:16:21 +0000 (09:16 +0000)]
* m4sh.m4 (_AS_UNSET_PREPARE): New macro, eved from
_AC_INIT_PREPARE_ENVIRONMENT, and fixed: set `FOO' before trying
to unset it: `unset' exits 1 if the variable is not defined.
(AS_UNSET): Require it. Use `as_unset' not `ac_unset'.
* acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Use it.
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.