Commit Graph

122 Commits

Author SHA1 Message Date
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