Commit Graph

131 Commits

Author SHA1 Message Date
Akim Demaille
be8f881881 * acgeneral.m4 (AC_FATAL): Use _AC_EXPANSION_STACK_DUMP.
(_AC_REQUIRE): Use AC_FATAL.
2000-10-17 08:36:20 +00:00
Akim Demaille
4e40bb2d16 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.
2000-10-17 07:55:44 +00:00
Akim Demaille
1e3cdfe0a3 * acgeneral.m4: Adjust copyright notice.
* acspecific.m4: Likewise.
* acoldnames.m4: Likewise.
* acversion.m4.in: Likewise.
* autoconf.sh: Likewise.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
* autoscan.pl: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
2000-10-16 18:25:55 +00:00
Pavel Roskin
f31906a5b7 * tests/aclocal.m4: Don't considers variables @, '*', '?' and
'#' in the output of `set' - they are modified by zsh.
2000-10-16 12:27:30 +00:00
Akim Demaille
f1fcddedab * tests/mktests.sh: If ever it fails, touch the output files
``a` la missing''.
2000-10-13 16:37:21 +00:00
Akim Demaille
3f4e21bdfa Regenerate. 2000-10-12 16:12:03 +00:00
Akim Demaille
b868d59ecb * tests/mktests.sh: Backslash the quote in the heredocs to help
syntax highlighting tools.
* tests/atspecific.m4 (AT_CHECK_UPDATE): Give a better AT_SETUP
title.
2000-10-12 15:02:42 +00:00
Akim Demaille
5d348fb01a * tests/mktests.sh: Remove tmp files. 2000-10-12 12:45:16 +00:00
Akim Demaille
6af38a6c4e More entries in .cvsignores. 2000-10-12 12:43:22 +00:00
Pavel Roskin
32f853c7e3 * tests/atgeneral.m4 (AT_CHECK): Make sure that $? is set to 0
if diffs have succeded.
2000-10-11 19:59:43 +00:00
Akim Demaille
aed9b5dee4 Check that updated scripts are valid scripts.
* tests/mktests.sh: Generate `syntax.m4' directly.
* tests/macros.m4: Remove.
Adjust dependencies.
* tests/mktests.sh: Generate `update.m4' too.
* tests/update.m4: New generated file.
Adjust dependencies.
* tests/atspecific.m4 (AT_CHECK_UPDATE): New macro.
2000-10-05 13:52:41 +00:00
Akim Demaille
fe9214cbf0 * tests/mktests.sh: New file, which replaces the code inlined in
Makefile.am.
* src/Makefile.am (macros.m4): Use `mktests.sh'.
* tests/suite.m4: Reorder from low level to high level.
2000-10-05 09:39:06 +00:00
Akim Demaille
c7a8dfd1cf * aclang.m4 (_AC_LANG_ABBREV, _AC_LANG_ABBREV(C))
(_AC_LANG_ABBREV(C++), _AC_LANG_ABBREV(Fortran 77): New macros.
(AC_LANG_(C), AC_LANG_(C++), AC_LANG_(Fortran 77)): Don't define
AC_LANG_ABBREV.
(_AC_PROG_PREPROC_WORKS): Adjust.
* acgeneral.m4 (_AC_TRY_CPP): Likewise.
2000-10-02 13:11:27 +00:00
Pavel Roskin
f66621410b * tests/Makefile.am: Macros defined by AC_DEFUN_ONCE should
go to macros.m4 for testing.
2000-10-02 12:43:02 +00:00
Pavel Roskin
de231bb167 * tests/semantics.m4 (AC_PROG_CPP with warning): Simplified. 2000-09-25 20:12:01 +00:00
Pavel Roskin
51ff685138 * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Check stderr from
autoconf and autoheader. Expected warnings disabled by "-W none"
Preceding comment removed as no longer relevant.
* tests/semantics.m4 (AC_CHECK_PROG & AC_PATH_PROG): Check
stderr from autoconf.
(AC_PATH_PROG & AC_PATH_PROGS): Likewise.
(AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Likewise.
* tests/tools.m4 (autoheader): Check that autoheader prints
a warning for missing templates. Check stderr from autoconf.
* tests/torture.m4 (config.status under extreme conditions):
Check stderr from autoconf and autoheader.
(command line interface): Check stderr from autoconf.
2000-09-21 13:42:49 +00:00
Pavel Roskin
b4f63402c1 * acgeneral.m4 (_AC_OUTPUT_FILES): Ensure that config.status
exits if any input file is missing.
* tests/semantics.m4 (missing templates): Test it.
2000-09-21 13:34:15 +00:00
Akim Demaille
af51198638 * src/atgeneral.m4 (AC_CHECK): Display stderr including when the
test failed because of stdout.
2000-09-21 13:06:03 +00:00
Akim Demaille
7a3e952e57 * tests/atgeneral.m4: Formatting changes.
(AT_INIT): Let `at_stop_on_error' and `at_verbose' be `:'/`false'
variables instead of `'/`1'.
`at_check_stds' replaces `at_no_redirs'.
Rename `Snippet 3' as `Snippet 4'.
Introduce `Snippet 3' for variable initializations.
Adjust the dependencies.
(AT_CHECK): Don't show diff's result unless verbose.
2000-09-21 12:47:04 +00:00
Pavel Roskin
3258eecc3e Regenerated 2000-09-20 16:51:43 +00:00
Pavel Roskin
ff99097cef * tests/Makefile.am: AC_PREFIX_PROGRAM and AC_F77_FUNC excluded
from testing because they require an argument.
* tests/atspecific.m4: Make sure that configure doesn't write
anything to stderr.
2000-09-20 13:12:13 +00:00
Akim Demaille
c550ac5ae5 * tests/atspecific.m4 (AT_TEST_MACRO): Rename as...
(AT_CHECK_MACRO): this.  All dependencies adjusted.
2000-09-19 18:08:38 +00:00
Akim Demaille
eb875d8240 * tests/aclocal.m4.new (AC_ENV_SAVE): Skip POW_LIB, used by
AC_FUNC_STRTOD.
From Bernard Dautrevaux.
2000-09-19 15:36:39 +00:00
Akim Demaille
a5c2f0e5d9 * tests/atgeneral.m4 (AT_DATA): Use _ATEOF instead of EOF. 2000-09-19 15:36:09 +00:00
Akim Demaille
c27e377c86 * tests/semantics.m4 (AC_PROG_CPP with warnings): Minor
simplification.
2000-09-19 15:20:04 +00:00
Akim Demaille
82479fc371 * acgeneral.m4 (AU_ALIAS): Do not use `defn' since then autoupdate
would replace an old macro call with the new macro body instead of
the new macro call.
* tests/tools.m4 (autoupdate): Test an AU_ALIAS'd macro update.
2000-09-19 12:21:47 +00:00
Akim Demaille
a096ddee16 * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): New macro.
(AT_TEST_MACRO): Use it.
* tests/semantics.m4 (AC_PROG_CPP with warnings, AC_PROG_CPP
without warnings): New tests.
2000-09-19 10:37:57 +00:00
Akim Demaille
949f06e0e8 * aclang.m4 (AC_PROG_CPP): Use double quotes in the for loop
and eliminate ac_tmp_cpp.
(AC_PROG_CXXCPP): Use double quotes in the for loop and
eliminate ac_tmp_cxxcpp.
2000-09-14 07:55:32 +00:00
Akim Demaille
0c6d235eeb * acspecific.m4 (AC_PROG_INSTALL): Exclude c:install on AmigaOS. 2000-09-12 15:03:13 +00:00
Akim Demaille
82bbd6fe4e * autoconf.sh: Consider undefined macros as errors.
* tests/base.m4 (unexpanded macros): Expect error, not warning
2000-09-05 10:19:01 +00:00
Akim Demaille
81f36d316c * tests/base.m4 (AC_SHELL_MKDIR_P): Remove `a' too. 2000-08-11 09:28:24 +00:00
Akim Demaille
35e933c528 Add .cvsignore in each directory. 2000-08-09 08:47:01 +00:00
Akim Demaille
4df82da14e * autoconf.sh (finalize.awk): Don't leave spaces before the user
function calls.
Reported by John David Anglin.
* doc/autoconf.texi (Limitations of Usual Tools): Start the AWK
section.
* tests/tools.m4 (AWK portability): New test.
2000-08-09 06:53:07 +00:00
Akim Demaille
970d1bc9d0 * tests/tools.m4 (undefined macros): New test. 2000-08-07 12:07:43 +00:00
Akim Demaille
a1dde0367f Create acfunctions.m4, in charge of the macros related to
functions.

* acgeneral.m4 (AC_CHECK_FUNC, AC_CHECK_FUNCS, AC_REPLACE_FUNCS):
Move to...
* acfunctions.m4: here, new file.
* acspecific.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA, AC_FUNC_CHOWN,
AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETGROUPS,
_AC_LIBOBJ_GETLOADAVG, AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT,
AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK,
AC_FUNC_MALLOC, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP,
AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, _AC_FUNC_STAT,
AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, AC_FUNC_STRFTIME,
AC_FUNC_VFORK, AC_FUNC_VPRINTF, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL,
AC_FUNC_STRCOLL, AC_FUNC_SETVBUF_REVERSED): Likewise.
* Makefile.am: Adjust.

Move also the old definitions into acfunctions.m4, and adjust the
test suite.

* acgeneral.m4 (AU_ALIAS): New macro.
* acoldnames (AC_FUNC_CHECK, AC_HAVE_FUNCS, AC_ALLOCA,
AC_GETLOADAVG, AC_MMAP, AC_SETVBUF_REVERSED, AC_STRCOLL,
AC_UTIME_NULL, AC_VFORK, AC_VPRINTF, AC_WAIT3, AM_FUNC_FNMATCH,
AM_FUNC_MKTIME, fp_FUNC_FNMATCH): Move to...
* acfunctions.m4: here, using AU_ALIAS.
* acgeneral.m4 (AC_FD_CC, AC_CANONICAL_SYSTEM): Use AU_ALIAS to
define them.
* acoldnames.m4: Use AU_ALIAS instead of AU_DEFUN.
* tests/Makefile.am (MACRO_FILES): Adjust.
2000-08-01 10:13:14 +00:00
Akim Demaille
9150c0ede6 Make it clear that the regular user does not need --macrodir.
In fact, rename this option as -A, --autoconf-dir.

* autoconf.sh: Complain when -m, --macrodir is used.
Accept -A, --autoconf-dir.
Use $autoconf_dir instead of $AC_MACRODIR.
Adjust --help.
* autoheader.sh: Likewise.
* autoscan.sh: Likewise.
* autoupdate.sh: Likewise.
Use $optarg.
* autoreconf.sh: Likewise.
* doc/autoconf.texi: Adjust.
* tests: Adjust the test suite.
2000-07-19 09:03:53 +00:00
Akim Demaille
d9c7337e87 * acgeneral.m4 (AC_PLAIN_SCRIPT): New macro.
* tests/base.m4 (m4_wrap, AC_REQUIRE, AC_SHELL_MKDIR_P): Use it.
* autoconf.sh: Properly handle the case where `$output' is `-'
(i.e., stdout).
Handle `-ofile', not only `-o file'.
2000-07-10 08:56:19 +00:00
Akim Demaille
42944c4fc3 * tests/atgeneral.m4 (AT_CHECK): Fix a redirection problem. 2000-07-07 12:56:02 +00:00
Akim Demaille
9f1999bf1e * acgeneral.m4 (AC_SHELL_MKDIR_P): New macro.
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS,
AC_PROG_INSTALL): Use AC_SHELL_MKDIR_P.
* tests/base.m4 (AC_SHELL_MKDIR_P): Test it.
2000-07-04 18:20:05 +00:00
Akim Demaille
8b3a0fbaae * acgeneral.m4 (AC_CONFIG_LINKS, AC_CONFIG_HEADERS,
AC_CONFIG_COMMANDS, AC_CONFIG_FILES): Use a shell variable instead
of an m4 variable to store what must be done, so that sh
conditionals are honored.
(_AC_OUTPUT_LINKS, _AC_OUTPUT_HEADERS,
_AC_OUTPUT_COMMANDS, _AC_OUTPUT_FILES): Adjust.
* tests/semantics.m4: Test the four AC_CONFIG sisters.
* doc/autoconf.texi (Configuration Actions): Promote the use of
literals, show it works properly with sh conditionals.
2000-06-26 10:20:36 +00:00
Akim Demaille
12e3a8ea6e The current implementation of AC_REQUIRE fails on
| AC_DEFUN([TEST1],  [REQUIRE([TEST2a])REQUIRE([TEST2b])])
| AC_DEFUN([TEST2a], [])
| AC_DEFUN([TEST2b], [REQUIRE([TEST3])])
| AC_DEFUN([TEST3],  [REQUIRE([TEST2a])])
|
| AC_INIT
| TEST1

because it produces TEST3; TEST2a; TEST2b; TEST1.
Fix this bug, implement the solution provided by Axel Thimm,
and test AC_REQUIRE.

* acgeneral.m4: Document this implementation.
(_AC_DEFUN_PRO, _AC_DEFUN_EPI, AC_REQUIRE): Be sure that macros
are emitted in the same order as they are expanded.
(AC_REQUIRE): Forbid being calling out of an AC_DEFUN'd	macro (in
particular the top level).
* tests/base.m4 (AC_REQUIRE): New test.
2000-06-26 09:06:02 +00:00
Akim Demaille
5407be557f * tests/aclocal.m4 (AC_ENV_SAVE): Skip `no_x'.
From Mark Elbrecht.
2000-06-06 17:00:46 +00:00
Akim Demaille
ca10061659 Find a means to extract integers from the compiler.
Use this technology to compute `sizeof' even when cross-compiling.
Ideas and initial suggestion by Kaveh Ghazi.
Binary search by Bruno Haible.

* aclang.m4 (AC_LANG_BOOL_COMPILE_TRY,
AC_LANG_BOOL_COMPILE_TRY(C), AC_LANG_BOOL_COMPILE_TRY(C++),
AC_LANG_INT_SAVE, AC_LANG_INT_SAVE(C), AC_LANG_INT_SAVE(C++)): New
macros.
* acgeneral.m4 (_AC_COMPUTE_INT_COMPILE, _AC_COMPUTE_INT_RUN,
_AC_COMPUTE_INT): New.
(AC_CHECK_SIZEOF): Use them.
Check whether the type exists beforehand.
* tests/semantics.m4 (AC_CHECK_SIZEOF): Strengthen.
2000-05-26 11:33:54 +00:00
Akim Demaille
b991f500dd The test suite needs GNU m4.
Reported by Bob Friesenhahn.

* tests/atconfig.in (M4): Set it.
* tests/base.m4: Use it.
2000-05-25 16:37:12 +00:00
Akim Demaille
52498c9c04 Update `missing'. 2000-05-25 16:31:12 +00:00
Akim Demaille
c4dbe5c591 Have --host=sun4 automatically look for CC=sun4-cc etc.
* acgeneral.m4 (AC_CHECK_TOOLS): New.
* aclang.m4 (AC_PROG_CXX, AC_PROG_CC, AC_PROG_F77): Use new
AC_CHECK_TOOLS macro instead of AC_CHECK_PROGS so that a cross
compiler is found by default with --host.
* doc/autoconf.texi (Generic Programs, Manual Configuration):
Describe new AC_CHECK_TOOLS macro. Fix unclear working about
AC_CHECK_PROGS.
* tests/Makefile.am (FILTER_MACROS): Adjust.
2000-05-24 15:46:12 +00:00
Akim Demaille
0fbdd96cf3 The night of the living dead...
* acspecific.m4 (AC_XENIX_DIR, AC_DYNIX_SEQ, AC_IRIX_SUN,
AC_SCO_INTL): Wake up a few zombies.
* doc/autoconf.texi: Adjust.
* tests/aclocal.m4 (AC_ENV_SAVE): Likewise.
2000-05-24 14:39:24 +00:00
Akim Demaille
7435a2e96c Simplify the interface: users shouldn't need to explicitly check
for special environments.

* acspecific.m4 (AC_EXEEXT, AC_OBJEXT): AU defined to
nothing.  Replace them by...
(_AC_EXEEXT, _AC_OBJEXT): this.
* aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call them.
(AC_PROG_CC_G, AC_PROG_CXX_G, AC_PROG_F77_G): Rename as...
(_AC_PROG_CC_G, _AC_PROG_CXX_G, _AC_PROG_F77_G): this.
Adjust dependencies.
* tests/Makefile.am (FILTER_MACROS): Adjust.
* doc/autoconf.texi (Compilers and Preprocessors): New section,
move the documentation of AC_PROG_CC, AC_PROG_CC_C_O,
AC_PROG_CC_STDC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP,
AC_PROG_F77, AC_PROG_F77_C_O, AC_PROG_GCC_TRADITIONAL here.
Factor the comment documentation of AC_PROG_CC, AC_PROG_CXX,
AC_PROG_F77.
2000-05-23 14:54:49 +00:00
Akim Demaille
164b08eb76 Factor the AC_PROG_<compiler>_WORKS macros.
* acgeneral.m4 (_AC_INIT_DEFAULTS): Set `cross_compiling'.
(AC_TRY_COMPILER): Remove.
* aclang.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS,
AC_PROG_F77_WORKS): Removed.
(_AC_LANG_COMPILER_WORKS): New macro.
(AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Adjust.
2000-05-22 08:38:44 +00:00
Akim Demaille
cbb8a34d48 More than one argument to `configure' builds a broken
`config.status'.  Fix and test.

* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use
`$ac_configure_args' directly, no via a tmp variable.
* tests/torture.m4 (command line interface): Test with more than
one argument.
2000-05-22 08:05:40 +00:00