Commit Graph

359 Commits

Author SHA1 Message Date
Pavel Roskin
48f158e039 * 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.
2000-11-02 17:03:32 +00:00
Pavel Roskin
7bb9bdc360 * m4/atconfig.m4 (AT_CONFIG): s/AT_TESTPATH/AUTOTEST_PATH/
because AT_TESTPATH looks like a macro.
        * tests/atconfig.in: Likewise.
2000-11-02 16:12:15 +00:00
Akim Demaille
ff03218ac3 * tests/tools.at (Tracing M4 builtins): New test.
* autoconh.sh (trace_format): Fix its computation.
2000-11-02 15:32:23 +00:00
Akim Demaille
e015643d3f * 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.
2000-11-02 15:21:04 +00:00
Akim Demaille
cc8824a06a Improve tests/README. 2000-11-02 14:36:16 +00:00
Akim Demaille
f2a537cc26 * tests/atgeneral.m4 (AT_CHECK, AT_CLEANUP): Be more verbose when
`-v' is passed.
2000-11-02 12:23:42 +00:00
Pavel Roskin
33de71ca28 * autoconf.sh: Using trap-safe "exit".
* autoreconf.sh: Likewise.
        * autoupdate.sh: Likewise.
        * tests/base.at: Use AS_EXIT instead of exit in configure.in.
        * tests/m4sh.at: Likewise.
        * tests/semantics.at: Likewise.
2000-11-01 19:57:54 +00:00
Pavel Roskin
ae60935d08 * tests/tools.at (autoupdating AC_LINK_FILES): Invoke autoconf
like in the rest of the tests.
2000-11-01 15:20:46 +00:00
Pavel Roskin
1bbd2322ea More stuff to ignore: config.h config.hin experr expout state* 2000-10-30 16:47:42 +00:00
Pavel Roskin
03bbc0e52b * tests/atgeneral.m4 (AT_CHECK): Warn if the expected exit status
is different from what we got. Don't preserve exit status other
        than 77.
2000-10-30 03:24:44 +00:00
Pavel Roskin
6cb5583f10 * tests/suite.at: Move "-*- Autoconf -*-" to the second line. 2000-10-27 14:43:44 +00:00
Akim Demaille
7eadb5fda3 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.
2000-10-27 14:15:28 +00:00
Akim Demaille
5ec791a2d5 * shell.m4: Rename as...
* m4sh.m4: this.
* tests/m4sugar.m4, tests/shell.m4, tests/torture.m4: Rename as...
* tests/m4sugar.at, tests/m4sh.at, tests/torture.at: these.
* tests/semantics.m4, tests/base.m4, tests/suite.m4: Rename as...
* tests/semantics.at, tests/base.at, tests/suite.at: these.
* tests/tools.m4, tests/update.m4, tests/syntax.m4: Rename as...
* tests/tools.at, tests/update.at, tests/syntax.at: these.
* tests/mktests.sh: Adjust the output file names.
2000-10-26 09:52:34 +00:00
Akim Demaille
a14a5e7ca5 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.
2000-10-25 17:51:10 +00:00
Akim Demaille
35853557ac * 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.
2000-10-25 15:04:29 +00:00
Pavel Roskin
4796034df3 * 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.
2000-10-25 11:47:20 +00:00
Pavel Roskin
f4f898452d * tests/mktests.sh: set locale to C to make sure that syntax.m4
and update.m4 are locale-independent
2000-10-24 19:30:00 +00:00
Akim Demaille
e2879ff558 * tests/tools.m4 (Syntax of the scripts): Specify the path to the
tested program, some shells don't honor the PATH with `sh PROG'.
2000-10-24 11:28:20 +00:00
Akim Demaille
cd48b4a16e Grr, CVS managed to remove tests/atspecific.m4 anyway.
Add it again to the repository.
2000-10-24 10:16:30 +00:00
Akim Demaille
68702fc995 Preventing unwanted removal of tests/atspecific.m4. 2000-10-24 09:41:20 +00:00
Akim Demaille
6e09a63ca2 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.
2000-10-23 19:13:37 +00:00
Akim Demaille
7994b48d70 * 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.
2000-10-23 18:58:43 +00:00
Akim Demaille
161112fd78 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.
2000-10-23 18:32:17 +00:00
Pavel Roskin
2c965f419d * tests/tools.m4 (autoupdating AC_LINK FILES): Clean up "src1"
and "src2" at the end of the test.
2000-10-23 04:01:41 +00:00
Pavel Roskin
31358f35e6 More files to ignore. 2000-10-21 02:22:51 +00:00
Pavel Roskin
bab2798aa8 * mdate-sh: Removed, its copy remains in the doc/ directory.
* Makefile.in: Regenerate.
* tests/Makefile.in: Likewise.
2000-10-18 22:48:02 +00:00
Akim Demaille
c27236bff5 * 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.
2000-10-18 12:42:20 +00:00
Akim Demaille
7753fa9d46 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.
2000-10-17 09:43:33 +00:00
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
Akim Demaille
beb715a12b Synchronize AC_FUNC_GETLOADAVG with the version of the shellutils
1.16f (serial 4).

* acspecific.m4 (AC_FUNC_GETLOADAVG): Check for
`pstat_getdynamic'.
Define `C_GETLOADAVG' if compiling `getloadavg.c'.
Check for NLS.
Compute `GETLOADAVG_LIBS'.
(AC_FUNC_MKTIME): Remove a forgotten `AC_SUBST(LIBOBJS)'.
2000-05-19 12:08:46 +00:00
Akim Demaille
cecf9459b8 The Associated Rewriters are even prouder to present...
.
	  |
	  |
	 /-+		/   +		)===(   U  T  O  U  P  D  A  T  E    I V
       //   \
      =========
    _//_     _\_      The ``Eiffel Tower'' Release

* autoupdate.sh: Complete rewrite.  See that file for a detailed
explanation.  Basically, simulate the name spaces thanks to
`autoconf --trace' and auxiliary files.
No longer use `autoupdate.m4', remove the dependencies.
Synchronize the options and `--help'.
* doc/autoconf.texi (Invoking autoupdate): Humanoupdate.
* autoupdate.m4: Delete.
* tests/Makefile.am (FILTER_MACROS): Add `AC_OUTPUT'.
Since `AC_OUTPUT' is now AU_DEFUN'd, it is extracted for testing,
while it was not before.
* tests/tools.m4 (autoupdate): Re-enable.  Adjust the expected
output with the right quotation (yeah!).
Pass `-m $top_srcdir': autoupdate want the `.m4' files, not the
frozen files.
* Makefile.am (nodistpkgdataDATA): Move `acversion.m4' to
(distpkgdataDATA): here, so that all the `.m4' files are in the
source hierarchy, not split across src and build.
* acversion.m4.in: Update to today's standards.
* Makefile.am: Adjust.
2000-05-11 15:45:34 +00:00
Akim Demaille
b93ddb3ab5 Get rid of the m4 name spaces.
* libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push,
m4_namespace_pop, m4_namespace_register, m4_namespace_define,
m4_disable, m4_enable):	Removed.
All dependencies adjusted.
* libm4.m4: Remove all the name space initialization.
* acgeneral.m4: Adjust.
(AU_DEFINE): Redefine as `AC_DEFUN'.
* autoupdate.m4: Adjust.
* tests/tools.m4: Temporarily disable the `autoupdate' test.
2000-05-11 13:28:47 +00:00
Akim Demaille
c706f3273a Eradicate AC_TRY_COMPILE.
* aclang.m4 (AC_PROG_CC_STDC, AC_C_BIGENDIAN, AC_C_INLINE,
AC_C_CONST, AC_C_VOLATILE, AC_F77_NAME_MANGLING): Use
`AC_COMPILE_IFELSE'.
* acspecific.m4 (AC_DECL_SYS_SIGLIST, _AC_CHECK_HEADER_DIRENT,
AC_HEADER_SYS_WAIT, AC_HEADER_TIME, AC_TYPE_SIGNAL,
AC_FUNC_GETLOADAVG, AC_FUNC_SELECT_ARGTYPES, AC_STRUCT_TM,
AC_CYGWIN, AC_MINGW32, AC_EMXOS2): Likewise.
* tests/semantics.m4 (C keywords): Check that AC_C_CONST,
AC_C_VOLATILE, and AC_C_INLINE function properly with GCC.
2000-05-11 13:09:05 +00:00
Akim Demaille
87c43d275c * libm4.m4 (m4_foreach): Rewritten so that it does not require
lists in between parens.
(m4_foreach_quoted): new copy of the previous `m4_foreach' which
is still used by `m4_wrap'.
* acgeneral.m4 (AC_INCLUDE, AC_INCLUDES): Removed.
(AC_FOREACH): Don't use parens with `m4_foreach'.
(AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES): Adjust the
description.
* acspecific.m4 (AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE,
AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Adjust.
* autoconf.texi (AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES):
Adjust their documentation.
(AC_INCLUDE): Undocument.
* tests/semantics.m4: Adjust.
* tests/actest.m4: Rename as...
* tests/aclocal.m4: this.
* tests/atspecific.m4: No longer include actest.m4.
* tests/torture.m4: Likewise.
* tests/Makefile.am: Adjust.
2000-05-10 16:16:31 +00:00
Akim Demaille
fce102c8c9 * acgeneral.m4 (AH_TOP, AH_BOTTOM): New macros.
(_AH_COUNTER): New variable.
* tests/tools.m4 (autoheader): Check their proper functioning.
2000-05-04 10:26:02 +00:00
Akim Demaille
668492f8f7 * doc/autoconf.texi (Obsolete Macros): Rename as...
(Obsoleting Macros): this.
(Old Macros): Rename as...
(Obsolete Macros): this.
Be a section of...
(Obsolete Constructs): New chapter.
(Invoking autoheader): Move the `acconfig.h' documentation to...
(acconfig.h): here, new section of `Obsolete Constructs'.
(Autoheader Macros): Document AH_VERBATIM, AH_TEMPLATE, AH_TOP and
AH_BOTTOM.
2000-05-04 09:25:43 +00:00
Akim Demaille
0e827bb4bf * tests/tools.m4 (autoheader): Don't pass `-l at_srcdir' to
`autoheader', since `acconfig.h' is created in the build dir.
There's one empty line less in `config.h.in' than before when
using `acconfig.h'.
2000-05-03 12:28:17 +00:00
Akim Demaille
cc07253b22 Support of acconfig.h was broken. Fix and test.
Reported by Jim Meyering.

* autoheader.sh: Trace AC_DEFINE and AC_DEFINE_UNQUOTED to build
the list of $syms which are defined.
* tests/tools.m4 (autoheader): New test.
2000-05-03 11:00:46 +00:00
Akim Demaille
b2c5b8a278 Provide a macro to canonicalize a configuration name.
Suggested by Ralf Corsepius.

*  acgeneral.m4 (AC_CANONICALIZE): New macro.
(_AC_CANONICAL_THING): Use it.
2000-05-03 09:53:55 +00:00
Akim Demaille
be342dbf70 Have `make check' succeed with CC=g++.
* tests/atspecific.m4 (AT_TEST_MACRO): Don't check `env-after' if
the file does not exist, which may happen when a `configure' exits
brutally.
* tests/semantics.m4 (AC_CHECK_MEMBERS, AC_CHECK_TYPES): ANSI C++
forbids members named like their hosting struct, so don't do it.
2000-04-11 12:07:45 +00:00
Akim Demaille
af8eb3314f Rewrite the autoheader chain on top of `autoconf --trace'.
* autoheader.m4: Dispatch the prototypes next to there AC_
siblings.
(AH_TEMPLATE, AH_VERBATIM): Move to...
* acgeneral.m4: here.
(AH_OUTPUT): New macro.
* autoheader.sh: Run `autoconf --trace' instead of `m4 autoheader.m4'.
* autoheader.m4: Remove.
* Makefile.am: Adjust.
* tests/tools.m4 (AH_DEFUN): Remove, no longer makes sense.
* tests/actests.m4 (autoheader::AC_TATOOINE): Remove, was used by
the test above.
2000-03-29 16:48:00 +00:00
Akim Demaille
bdce732f0c * acgeneral.m4 (_AC_CHECK_TOOL_PREFIX): Rename back as
AC_CHECK_TOOL_PREFIX since some packages rely on it.
2000-03-27 15:47:35 +00:00
Akim Demaille
b23061fafb Move all the language dependent macros into aclang.m4.
* aclang.m4: New file.
* autoconf.m4: Include it.
* autoheader.m4: Likewise.
* autoupdate.m4: Likewise.
* Makefile.am: Adjust.
* test/Makefile.am: Likewise.
* acgeneral.m4 (AC_LANG_CASE,AC_LANG_SAVE, _AC_LANG_DISPATCH,
AC_LANG, _AC_LANG_CURRENT, AC_LANG_SOURCE, AC_LANG_PROGRAM,
AC_LANG_CALL, AC_LANG(C), AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C),
AC_LANG_CALL(C), AC_LANG(C++), AC_LANG_SOURCE(C++),
AC_LANG_PROGRAM(C++), AC_LANG_CALL(C++), AC_LANG(FORTRAN77),
AC_LANG_SOURCE(FORTRAN77), AC_LANG_PROGRAM(FORTRAN77),
AC_LANG_CALL(FORTRAN77): Move to...
* aclang.m4: here.
* acspecific.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77,
AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS,
AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU, AC_PROG_CC_G,
AC_PROG_CXX_G, AC_PROG_F77_G, AC_PROG_GCC_TRADITIONAL,
AC_PROG_CC_C_O, AC_PROG_F77_C_O, AC_PROG_CC_STDC, AC_PROG_CPP,
AC_PROG_CXXCPP, AC_REQUIRE_CPP, AC_PROG_LEX, AC_TYPE_MODE_T,
AC_C_CROSS, AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE, AC_C_BIGENDIAN,
AC_C_INLINE, AC_C_CONST, AC_C_VOLATILE, AC_C_STRINGIZE,
AC_C_PROTOTYPES, AC_F77_LIBRARY_LDFLAGS, AC_F77_NAME_MANGLING,
AC_F77_WRAPPERS): Move to...
* aclang.m4: here.
2000-03-27 12:26:33 +00:00
Akim Demaille
bb84983e28 * acgeneral.m4 (_AC_INIT_HELP, _AC_OUTPUT_SUBDIRS): Fix the DOS
absolute path pattern: s/?:[[/\]]/?:[[/\]]*/.
2000-03-27 11:44:22 +00:00
Akim Demaille
d1291b2ea1 * acgeneral.m4 (AC_RUN_IFELSE): New macro.
(AC_TRY_RUN_NATIVE): Remove.
(AC_TRY_RUN): Use AC_RUN_IFELSE, not AC_TRY_RUN_NATIVE.
2000-03-25 09:12:59 +00:00
Akim Demaille
fd92d2bd3c * tests/semantics.m4 (AC_TRY_LINK_FUNC, AC_CHECK_LIB): New tests. 2000-03-25 09:06:24 +00:00
Akim Demaille
700c767833 * tests/semantics.m4 (AC_PATH_PROG, AC_PATH_PROGS): New tests. 2000-03-21 12:22:27 +00:00
Akim Demaille
2200cf61c9 Start the language support overhaul: Introduce AC_LANG().
* acgeneral.m4 (AC_LANG): Renamed as _AC_LANG_CURRENT.
(AC_LANG, AC_LANG(C), AC_LANG(C++), AC_LANG(FORTRAN77)): New
macros.
(AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_FORTRAN): AU_DEFUN'ed.
Adjust all callers.
* acspecific.m4 (AC_F77_NAME_MANGLING): Remove the exceeding
AC_LANG_RESTORE.
* tests/Makefile.am (FILTER_MACROS): Add AC_LANG.
2000-03-21 12:15:54 +00:00
Akim Demaille
41f6c57a3e * tests/tools.m4 (autoconf --trace): New test. 2000-03-21 12:08:24 +00:00
Akim Demaille
134cd844f3 * tests/actest.m4 (AC_ENV_SAVE): Don't consider RANDOM and LINENO
which some shells update.
2000-03-14 08:59:11 +00:00
Akim Demaille
bc37b8f562 Typos in ChangeLog. 2000-03-13 15:31:26 +00:00
Akim Demaille
702e183cf6 Multiple `-e' to egrep are not portable. On IRIX 6.5 and Solaris
2.5.1 only the last one is honored:
  > echo "foonbar" | egrep -e 'foo' -e 'bar'
  bar
  > echo "foonbar" | egrep -e 'bar' -e 'foo'
  foo
Reported by Nicolas Joly.
An alternative would have to use `sed', unfortunately alternation
is not portable.

* tests/actest.m4 (join): New macro.
(AC_ENV_SAVE): Join the egrep patterns into a single big one.
* tests/Makefile.am (EGREP_EXCLUDE): Rename as FILTER_MACROS.
Join the egrep patterns into a single big one.
2000-03-10 15:22:13 +00:00
Akim Demaille
9c2aba3427 Fix a typo in ChangeLog.
Regenerate configure
2000-03-08 16:58:54 +00:00
Akim Demaille
0fa2ad4e0c * tests/Makefile.am (all-local): Remove. It wastes time to have
testsuite rebuilt each time an ac*.m4 file changes.  It is enough
to build it for each `make check'.
2000-03-08 16:12:09 +00:00
Akim Demaille
b0cf240330 Some tests are failing with srcdir != builddir, because they can't
find config.guess, install-sh etc.
Reported by Erez Zadok.

* tests/atspecific.m4 (AT_TEST_MACRO): Set AC_CONFIG_AUX_DIR to
top_srcdir in configure.in, and pass the value of top_srcdir to
configure.
2000-03-08 11:02:30 +00:00
Akim Demaille
3fd820a5b5 * tests/atspecific.m4 (m4_match): Remove, no longer used. 2000-03-06 08:48:48 +00:00
Akim Demaille
c33696519a Move the quadrigraphs out of the user name space.
* acgeneral.m4: 's/@BKL@/@<:@/g', 's/@BKR@/@:>@/g',
's/@DLR@/@S|@/g', 's/@PND@/@%:@/g'.
* acspecific.m4: Likewise.
* autoconf.sh: Likewise.
2000-03-03 14:25:03 +00:00
Akim Demaille
2585dd7c36 * acgeneral.m4 (_AC_WHICH_A): New macro.
(AC_CHECK_PROG): Use it.  Use ifval.
(AC_CHECK_PROGS): Use ifval.  Fix the quoting.
* tests/semantics.m4: Test AC_CHECK_PROG.
* tests/Makefile.am (EGREP_EXCLUDE): Add /AC_CHECK_PROGS?/.
2000-03-03 14:15:41 +00:00
Akim Demaille
7a628f5092 The empty regexp cannot be portably used in egrep's alternation.
For instance with Digital Unix v5.0:
   > echo "foo"  | egrep -e "^(|foo|bar)$"
   > echo "|foo" | egrep -e "^(|foo|bar)$"
   |foo
   > echo "|bar" | egrep -e "^(|foo|bar)$"
   > echo "bar"  | egrep -e "^(|foo|bar)$"
   bar
Reported by Nicolas Joly.

* src/actest.m4 (AC_ENV_SAVE): s/(|EXTRA_|PRE_)/(EXTRA_|PRE_)?/.
2000-03-01 17:01:29 +00:00
Akim Demaille
e603fedec3 * tests/actest.m4 (AC_ENV_SAVE): Use multiple -e instead of
multiple egrep.
2000-03-01 11:28:02 +00:00
Akim Demaille
2b72cac902 Test suite: instead of using a full list of the AC macros and an
AT macro with selects which are the AC macros to test, just
produce the list of the AC macros we want to test.

* tests/atspecific.m4 (TEST_MACRO): Removed.
* tests/Makefile.am (EGREP_EXCLUDE): New variable, performing the
selection TEST_MACRO used to do.
(macros.m4): Use it.  Use AT_TEST_MACRO, not TEST_MACRO.  Check
also AU macros.
2000-03-01 08:22:40 +00:00
Akim Demaille
6b6d1788b1 Test suite: more debugging information.
* tests/atspecific.m4 (AT_TEST_MACRO): When verbose, report the
content of config.log.
2000-02-29 08:51:42 +00:00
Akim Demaille
256a3c55e2 * doc/Makefile.am (MAKEINFO): s/makefino/@MAKEINFO@/.
* missing: chmod +x.
2000-02-28 10:20:50 +00:00
Akim Demaille
1ce240fbef * tests/Makefile.am (testsuite): Use $(M4), not m4.
From Patrick Tullmann.
2000-02-28 08:54:23 +00:00
Akim Demaille
ab73229498 2000-02-25 Akim Demaille <akim@epita.fr>
* doc/autoconf.texi (Default Includes):

	Export the knowledge on disabling echo's trailing new line.

	* acspecific.m4 (AC_PROG_ECHO_N): Renamed as...
	(_AC_PROG_ECHO): this.
	Set ECHO_N, ECHO_C, ECHO_T instead of ac_n, ac_c and ac_t.
	All dependencies changed.
	* doc/autoconf.texi (Preset Output Variables): Document ECHO_C,
	ECHO_N and ECHO_T.
	* m4/atconfig.m4 (fp_PROG_ECHO): Removed.
	(AT_CONFIG): Don't use it.
2000-02-25 13:19:35 +00:00
Akim Demaille
54c26866f9 * tests/tools.m4 (syntax.sh): The logic of the previous patch was
twisted.  Fix it so that it performs what claims the entry below.
From Nicolas Joly.
2000-02-21 12:57:47 +00:00
Akim Demaille
7690cdf6d1 * tests/tools.m4 (syntax.sh): Exit 1 if you managed to kill the
child, since it means `/bin/sh -n' went loopy.
2000-02-21 09:18:01 +00:00
Akim Demaille
c34897ff86 Some `diff' refuse to diff with /dev/null, such as Tru64's.
Reported by Nicolas Joly.

* tests/atgeneral.m4 (empty): New dummy file.
Changed various `diff /dev/null' as `diff empty'.
2000-02-18 13:44:17 +00:00
Akim Demaille
4ca3c004b0 * tests/atspecific.m4 (TEST_MACRO): Don't run AC_PATH_TOOL and
AC_PATH_PROG.
2000-02-18 10:22:29 +00:00
Akim Demaille
1a31555694 * tests/atgeneral.m4 (at_diff): Don't use `cmp -s', on DOS it
makes the difference between Unix and DOS EOL. `diff' does not.
Reported by Eli Zaretski.
Also, be ready to use a diff that does not support `-u'.
2000-02-18 10:01:25 +00:00
Akim Demaille
0cf60eb2d2 * tests/tools.m4 (Syntax of the scripts): Be robust to shells that
never return on some `/bin/sh -n foo.sh'.
Reported by Nicolas Joly.
2000-02-18 09:25:46 +00:00
Akim Demaille
c6d671566e * tests/actest.m4 (AC_ENV_SAVE): Added ALLOCA. 2000-02-17 09:50:51 +00:00
Akim Demaille
f3d6e8968d * tests/semantics.m4 (AC_CHECK_TYPES): `addr, addr' is not
portable sed: use `addr,addr'.
2000-02-17 09:38:08 +00:00
Akim Demaille
98c9da45a3 Fix the `missing dummy.in' reported by the test suite.
Reported by Erez Zadok.

* tests/torture.m4 (config.status under extreme conditions):
Reorganized.  Because files required by this test were created
outside the pair AT_SETUP/AT_CLEANUP, when the test fails and
autotest extracts this test, the `debug' script does not contain
the files it needs.  Now AT_SETUP/AT_CLEANUP encloses the full
auto contained section.
2000-02-17 09:31:34 +00:00
Akim Demaille
c67e931be3 * tests/actest.m4 (AC_ENV_SAVE): X_EXTRA_LIBS can be changed by
AC_PATH_EXTRA.
Reported by Erez Zadok.
2000-02-17 09:27:58 +00:00
Akim Demaille
7e4260dccb Define HAVE_DECL_FOO both to 1 if found and 0 otherwise.
* acgeneral.m4 (AC_CHECK_DECLS): Define HAVE_DECL_FOO to 1 instead
of NEED_FOO_DECL if found.  Define to 0 if not found.
* autoheader.m4 (AC_CHECK_DECLS): Template HAVE_DECL_FOO.
* tests/semantics.m4 (AC_CHECK_DECLS): Adjusted.
* doc/autoconf.texi (Generic Declarations): Adjusted.
2000-02-15 09:33:59 +00:00
Akim Demaille
86b8b0de15 autoreconf had a silly syntax error, test it and fix it.
Reported by Franc,ois Pinard and Rainer Orth.

* autoreconf.sh: Removed spurious `;;'.
Formatting changes.
* tests/tools.m4 (Syntax of the scripts): Run `sh -n' on all the
shell scripts.
2000-02-15 09:15:22 +00:00
Akim Demaille
2522903e51 CVS added tests/Makefile.in 2000-02-15 09:12:36 +00:00
Akim Demaille
728bc59408 * tests/torture.m4: Nuke the trailing space in defs. 2000-02-15 09:03:36 +00:00
Akim Demaille
037acbb765 * tests/atspecific.m4: Really added to the CVS repository. 2000-02-11 09:01:24 +00:00
Akim Demaille
920939e349 Don't use `cat -s' to single out new-lines, it is not portable.
Also remove trailing blanks.

* tests/Makefile.am (testsuite): Use sed instead of cat.
* tests/torture.m4: No longer check for a trailing space.
* autoconf.sh: Likewise.
2000-02-11 08:59:52 +00:00
Akim Demaille
18bcad9b51 * tests/actest.m4 (AC_ENV_SAVE): OpenBSD-2.3's /bin/sh defines an
envvar SECONDS which does change with time.
KMEM_GROUP is set by AC_FUNC_GETLOADAVG.
Reported by Volker Borchert.
2000-02-10 16:57:55 +00:00
Akim Demaille
97bf777083 * tests/Makefile.am (macros.m4): Better regex to build `macro'.
Depend upon acgeneral.m4.
2000-02-10 16:30:17 +00:00
Akim Demaille
a3b3fe8516 * tests/torture.m4: Also check the value of @DEFS@ when no
CONFIG_HEADER is used.
2000-02-10 10:41:52 +00:00
Akim Demaille
08de8c9f93 Honor properly the `#define' config.h.in templates.
Test it.

* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this.  All callers changed.
Don't mess with changequote, just quote properly.
Bug 1.  Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'.  Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2.  Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top').  This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3.  Don't try to preserve what was behind the value in the
template, since on
	#define NAME "bar baz"
it leads to
	#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
2000-02-10 10:38:59 +00:00
Akim Demaille
c7bd04fb16 Keep `AC_CHECK_TYPE' backward compatibility and provide a proper
`AC_CHECK_TYPE',
Based on ideas from Paul Eggert and Alexandre Oliva.

* acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Renamed as
(_AC_CHECK_TYPE_NEW): this.
(AC_CHECK_TYPES): Adjusted.
(AC_CHECK_TYPE): Renamed as
(_AC_CHECK_TYPE_OLD): This.  Adjusted to _AC_CHECK_TYPE_NEW.
No longer support extra includes, stick to 2.13's interface.
(_AC_CHECK_TYPE_BUILTIN_P): New macro.
(AC_CHECK_TYPE): New macro.
* autoheader.m4 (autoheader::AC_CHECK_TYPE): Renamed as...
(autoheader::_AC_CHECK_TYPE_OLD): this.
* tests/atspecific.m4 (TEST_MACRO): Skip /^_AC_/ macros.
* tests/semantics.m4: Test the choices of AC_CHECK_TYPE (wrt _NEW
or _OLD implemenation).
* doc/autoconf.texi (Generic Types): Reorganized.  Explain
everything about AC_CHECK_TYPE and Co.
2000-02-10 10:24:10 +00:00
Akim Demaille
dc6fcad969 The AU-glue code for AC_LINK_FILES was not fully compatible: in
AC_LINK_FILES($from, $to)
`$from' and `$to' can be lists, hence `AC_CONFIG_LINKS($to:$from)'
is wrong.
Reported by H.J. Lu.

* acgeneral.m4 (AC_LINK_FILES): Replace the m4-glue code from
AC_LINK_FILES to AC_CONFIG_LINKS, with sh-glue code.
Give a detailed update message.
(_AC_LINK_FILES_CNT): New variable.  Initialize.
* tests/tools.m4 (autoupdate): No longer exercise `autoupdate'
with AC_LINK_FILES.
2000-02-10 09:45:25 +00:00
Akim Demaille
d6ef78697d AC_CHECK_FILES has never worked properly.
* acgeneral.m4 (AC_CHECK_FILE): Use AC_CACHE_CHECK.
* autoheader.m4 (AC_CHECK_FILES): AH-define.
* tests/semantics.m4: Test AC_CHECK_FILES.
* tests/atspecific.m4 (TEST_MACRO): Don't.
2000-02-10 09:40:55 +00:00
Akim Demaille
e1b31f306e Fix the handling of `./configure foo=bar' and test it.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, getopt loop): Always define
ac_optarg as the rhs of the first `=', not only on `-.*=', so that
`configure var=val' defines ac_optarg=val.
Improve the robustness to shell special characters:
 - Use grep when checking that shell variable names are valid.
 - Quote the quotes in ac_optarg before `eval var='$ac_optarg''.
 - Quote the quotes when building ac_configure_args.

* tests/torture.m4: Test that `./configure foo=bar' works properly.
2000-02-09 18:24:24 +00:00
Akim Demaille
d7e3c874ea * Makefile.am (CLEANFILES): Added autoupdate.m4f and autoconf.tmp. 2000-02-09 18:08:37 +00:00
Akim Demaille
8ba96e391b Test `autoupdate'.
* tests/tools.m4 (AH_DEFUN): Fix the comments.
Quote properly.
(autoupdate): New test.
2000-02-09 18:02:18 +00:00
Akim Demaille
d21aeb1510 * tests/base.m4: Really added to the CVS repository.
* tests/tools.m4: Likewise.
2000-02-09 08:36:01 +00:00
Akim Demaille
b54d44e0c3 Open the access to AH_ to users.
* autoheader.m4 (autoheader::AH_DEFUN): New macro.
* tests/tools.m4: New file, in charge of testing the scripts.
All the dependencies adapted.
* tests/actest.m4 (autoheader::AC_TATOOINE): New macro, used while
testing autoheader.
* tests/atspecific.m4: Create config.hin instead of config.h.in.
2000-02-08 13:54:48 +00:00
Akim Demaille
881b4d908f Because of commas and brackets, m4_split must mess with the
quotes.

* libm4.m4 (m4_split): Quote the elements of the list you produce.
* tests/base.m4: New file, testing libm4.
All callers adapted.
Test m4_wrap.
2000-02-08 13:53:32 +00:00
Akim Demaille
c7eb9bd99e Revamp the autoupdate/AC_OBSOLETE chain. All the details are
given in the prologue of acobsolete.m4.

* acgeneral.m4 (Prologue): Enter the `autoconf' name space.
(AU_DEFUN): New macro.

* autoupdate.m4: New file.
Disable the name spaces `autoconf', and `libm4'.  Disable libm4.
* Makefile.am: Tuned to support the changes above.

* autoupdate.sh: Model after autoconf.sh.
Can run on several files at once (for instance m4/*.m4).
Don't touch files that are up to date.
Run m4 on autoupdate.m4f instead of playing with sed.


Use AU_DEFUN.

* acgeneral.m4 (AC_LINK_FILES, AC_ENABLE, AC_WITH): Use AU_DEFUN,
remove the call to AC_OBSOLETE.
* acspecific.m4 (AC_CYGWIN32): Likewise.
* acoldnames.m4: Replaced all the definitions via `define' or
`AC_DEFUN' to use `AU_DEFUN'.
2000-02-08 13:25:49 +00:00
Akim Demaille
9729954f66 Stay in Autoconf's name space.
* acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): Prefixed with 'ac_':
arg, save_arg, i, seen, previous_arg, ld_run_path.
Renamed f77_link_output as ac_link_output.
* tests/actest.m4 (AC_ENV_SAVE): Don't note F77, FFLAGS, FLIBS,
G77, f77_case, f77_underscore.
2000-02-07 18:09:54 +00:00
Akim Demaille
b519547b61 AC_CHECK_SIZEOF: Fix a bug, use standard default headers, and
test.

* acgeneral.m4 (AC_CHECK_SIZEOF): Don't over quote $1, some []
were left in the C code, and had the macro fail.
Use AC_INCLUDES_DEFAULT.
* doc/autoconf.texi: Mention default includes.  Explain stdio.h
must always be given.

* tests/atspecific.m4 (TEST_MACRO): Updated the list of
exceptions.
(AT_CHECK_DEFINES): New macro, to check the content of config.h.
* tests/semantics.m4: All the tests are updated to use
AT_CHECK_DEFINES.
Test AC_CHECK_SIZEOF, AC_CHECK_HEADERS, and AC_CHECK_FUNCS.
2000-02-07 17:28:43 +00:00
Akim Demaille
c699fab52c Torture test config.status, AC_SUBST and AC_DEFINE.
* tests/torture.m4: New file.
* tests/suite.m4: Include it.
2000-02-07 17:15:51 +00:00
Akim Demaille
a604d916a0 * tests/atspecific.m4 (m4_for, m4_foreach): New macros. 2000-02-07 17:02:37 +00:00
Akim Demaille
ae593084aa * tests/atspecific.m4: New file, for AT macros specific to
Autoconf testing.
* tests/suite.m4 (AT_TEST_MACRO): Moved to
* tests/atspecific.m4 (AT_TEST_MACRO): here.
* tests/syntax.m4 (TEST_MACRO): Moved to
* tests/atspecific.m4 (TEST_MACRO): here.  Don't test /^AC_INIT/,
nor /^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$/: they are already
tried elsewhere.
* tests/Makefile.am: Adjusted.
2000-02-07 16:42:15 +00:00
Akim Demaille
304ecacb35 * acgeneral.m4 (m4_case): Fixed a typo and a bug: one shift was
missing.
(m4_match): New macro.
* tests/atgeneral.m4 (AT_CASE): Fixed.
2000-02-07 16:28:06 +00:00
Akim Demaille
6bc62513f5 * acspecific.m4 (AC_C_CONST): Don't changequote, there is no need
for it.  Just quote properly!
condition out the test case if __cpluscplus.
AC_REQUIRE AC_PROG_CC_STDC.
Fix slightly the display of the result (formerly the first run
says `none needed', and later, because of the cache `no').
(AC_C_INLINE, AC_C_VOLATILE): AC_REQUIRE AC_PROG_CC_STDC.
* doc/autoconf.texi (AC_C_CONST): Give a few hints on the
motivation for trusting the C++ compilers.
2000-02-07 14:53:49 +00:00
Akim Demaille
78a1aa6fc3 * tests/atgeneral.m4: Updated.
(AT_CASE): new macro.
(AT_CHECK): Use it.  Don't changequote for patsubst, there is no
need.
* tests/syntax.m4 (TEST_MACRO): Don't run AC_ARG_VAR.
Reported by Jim Meyering.
Use AT_CASE.
2000-02-07 14:22:37 +00:00
Akim Demaille
466fd1b23f Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 13:25:35 +00:00
Akim Demaille
3c2a8f9b09 Start a new series of tests which check the semantics.
* acgeneral.m4 (AC_CHECK_MEMBER): It is not smart to define
ac_Foo, and use AC_Foo.  Got rid of AC_Member_Aggregate and
AC_Member_Member which were complicating more than simplifying.
(AC_CHECK_DECLS): Use m4 lists.
(AC_CHECK_TYPES): A comma was missing.
* autoheader.m4: (AC_CHECK_DECLS): Use m4 lists.
* doc/autoconf.texi (Generic Declarations): AC_CHECK_DELCS uses m4
lists.
* tests/semantics.m4: New file.  Collection of semantical tests:
verify that the tests are positive and negative when appropriate.
Test AC_CHECK_MEMBERS, AC_CHECK_DECLS and AC_CHECK_TYPES.
2000-02-07 11:54:29 +00:00
Akim Demaille
afd5637353 * tests/Makefile.am (macros.m4): Fix the sed snippet. 2000-02-04 14:29:14 +00:00
Akim Demaille
fade74a103 * tests/syntax.m4: Test AC_CHECK_SIZEOF.
* tests/Makefile.am (CLEANFILES, DISTCLEANFILES): Adjusted.
(macros.m4): Use tmp dest files ($@-t), not directly `$@'.
2000-02-04 14:02:57 +00:00
Akim Demaille
4f7835e642 Run the `syntax' test on acgeneral macros too.
Fix the bugs discovered.

* acgeneral.m4 (AC_CANONICAL_THING): Quote the
AC_REQUIRE([AC_CANONICAL_HOST]).  Bug triggered by the use of
AC_CANONICAL_BUILD alone in configure.in.  Also, quote the
arguments of macros (eg, ifelse([$1]...), not ifelse($1...)).
(m4_case): New macro.
(AC_LINKER_OPTION): Don't clash with user's name space
(s/i/ac_link_opt).
(AC_LIST_MEMBER_OF).  You mean AC_FATAL, not AC_MSG_ERROR.
Quote properly the argument.
dnl out the empty lines that result from m4 pure code.
Don't pollute the user name space.
Use AC_SHELL_IFELSE.
(AC_F77_NAME_MANGLING): Don't use `test -o'.  There are still
name space problems.
* tests/Makefile.am (macros.m4): Also fetch the macros from
acgeneral.m4.
2000-02-04 12:44:56 +00:00
Akim Demaille
b9b4dc14d8 Check that the AC_DEFINEs from acspecific.m4 do have a template.
Fix the discovered bugs.

* tests/atgeneral.m4 (AT_CHECK): Don't just exit 1 when you want
to propagate the failure of a test: exit with the same exit
status, at least to preserve 77 (=ignore).
* tests/syntax.m4 (TEST_MACRO): Run also autoheader.  Don't run
this test on all the macros, some just cannot run without
arguments.
* acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): In the if egrep/fi for
#define templates, add a `:' to prevent syntax errors in
config.status when there are no AC_DEFINE performed.
* autoheader.m4 (AH_TEMPLATE): Don't use _AC_SH_QUOTE here, use it
in...
(AH_VERBATIM): here.  Now AH_C_UNSIGNED_CHAR is no longer failing
(formerly it would produce a non backslashed backquote, which
made sh choke).
2000-02-04 10:23:15 +00:00
Akim Demaille
f6dd7456f3 1999-11-11 Akim Demaille <akim@epita.fr>
Introduce a new style of testing, independent from DejaGNU.


	Introduce the logistics.

	* configure.in: Initialize AT, and output tests/atconfig, and
	tests/Makefile.
	* m4/atconfig.m4: New file.
	* m4/Makefile.am: Adjusted.
	* aclocal.m4: Include atconfig.m4.
	* Makefile.am: Adjusted.
	* tests/Makefile.am: New file.
	* tests/atgeneral.m4: Likewise.
	* tests/atconfig.in: Likewise.


	Write tests.

	* tests/syntax.m4: New file, in charge of checking the validity of
	the sh code produced by the macros defined in acspecific.m4.
	acgeneral.m4 is not checked here, because these macros require
	arguments.
	* tests/suite.m4: New file.  Run syntax.m4.
2000-01-29 12:18:40 +00:00