Commit Graph

1402 Commits

Author SHA1 Message Date
Akim Demaille
6372ab2eec * acgeneral.m4 (ac_includes_default): Don't use simple quotes, but
doubles quotes if you want to use -continuation lines: this is
not recognized by MIPS' sh.
2000-02-08 10:59:38 +00:00
Akim Demaille
9965880fe8 * acgeneral.m4. Formatting changes.
* acspecific.m4: Likewise.
2000-02-08 10:46:43 +00:00
Akim Demaille
f624b6d754 * acgeneral.m4 (AC_CONFIG_HEADERS, AC_CONFIG_LINKS,
AC_CONFIG_SUBDIRS): A space was missing to separate the arguments
of m4_append.
2000-02-08 10:31:47 +00:00
Akim Demaille
0c5cd97cc3 Arrange that config.status creates the file with the AC_SUBSTing
engine only if needed.

* acgeneral.m4 (AC_OUTPUT_FILES): Create the sed code only if test
-n "$CONFIG_FILES".
2000-02-08 10:03:26 +00:00
Akim Demaille
13110f0768 Promote AC_LANG_CASE.
* acgeneral.m4 (AC_TRY_COMPILER, AC_TRY_LINK_FUNC, AC_CHECK_LIB,
AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN_NATIVE, AC_CHECK_FUNC):
Use AC_LANG_CASE instead of ifelse (AC_LANG, ...).
(AC_TRY_LINK_FUNC): Quote the body the the AC_DEFUN (whoa, how
could this survive so long?!?).
2000-02-08 09:54:19 +00:00
Akim Demaille
c809277bf9 * acgeneral.m4: Formatting changes.
* acspecific.m4: Likewise.
2000-02-08 09:45:21 +00:00
Akim Demaille
bfe8456484 Use the style we promote.
* doc/autoconf.texi (Header Templates): Promote #if over #ifdef;
and #undef over #define in templates.
* acspecific.m4 (AC_DECL_SYS_SIGLIST, AC_FUNC_MMAP,
AC_FUNC_SETPGRP, AC_FUNC_VFORK, AC_FUNC_SELECT_ARGTYPES): Use #if,
not #ifdef and #ifndef, indent CPP directives.
2000-02-08 09:34:19 +00:00
Akim Demaille
6a609fe4b1 Quote properly AC_SHELL_IFELSE and callers.
* acgeneral.m4 (AC_SHELL_IFELSE): Don't overquote $1.
(AC_VAR_IF_SET, AC_CHECK_MEMBER, AC_CHECK_LIB, AC_CHECK_HEADER,
AC_CHECK_DECL, AC_CHECK_FUNC, AC_CHECK_TYPE_INTERNAL): Quote the
first argument of AC_SHELL_IFELSE.
2000-02-08 09:23:54 +00:00
Akim Demaille
c4d2980dbd It seems quite delicate to have AC_INCLUDES_DEFAULT insert the
default headers in the INIT section of configure: the reason is
that AC_INCLUDES_DEFAULT is called unquoted, and this results in
an un expected behavior.  Thanks to Roman V. Shaposhnick for the
details.

The current implementation is not satisfying: the default headers
are defined in the INIT section even if they are not used.

* acgeneral.m4 (Prologue of AC_INCLUDES_DEFAULTS): Dump the
definition of ac_includes_default in the INIT section of
configure.
(AC_INCLUDES_DEFAULTS): Use it.
2000-02-08 09:19:18 +00:00
Akim Demaille
37ed7bc3f2 * TODO: Updated.
* THANKS: Updated.
2000-02-08 08:53:03 +00:00
Akim Demaille
0cd449970f * libm4.m4 (m4_for): New macro. 2000-02-08 08:41:52 +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
9a9baf80c6 Use #' for comments instead of dnl'.
Better highlighting of the sections in the sources.

* acgeneral.m4: Formatting changes.
* acspecific.m4: Likewise.
* autoheader.m4: Likewise.
* acoldnames.m4: Likewise.
2000-02-07 18:03:54 +00:00
Akim Demaille
6b8dfc89ca Create libm4.m4.
* Makefile.am: Adjusted for libm4.m4.

* acgeneral.m4 (m4_errprint, m4_warn, m4_fatal, m4_prefix,
m4_eval, m4_shift, m4_format, m4_include_unique, m4_include,
m4_sinclude, m4_quote, m4_split, m4_join, m4_strip, m4_append,
m4_list_append, ifval, ifset, m4_default, m4_case, m4_match,
m4_foreach): Moved from here, to...
* libm4.m4: here.
* acgeneral.m4 (AC_WRAP): Moved from here, to...
* libm4.m4 (m4_wrap): here.  All callers changed.

* acgeneral.m4: Don't include acversion.m4.
* autoconf.m4: Include libm4.m4 and acversion.m4.
* autoheader.m4: Likewise.
2000-02-07 17:42:03 +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
fb4e32afa3 Give explicit diagnostics when an input file (for config headers;
config files etc.) does not exist.
From Jim Meyering.

* acgeneral.m4 (AC_OUTPUT_FILES, AC_OUTPUT_HEADERS): Check for the
existence of source files.
2000-02-07 17:23:07 +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
a2dec8cec2 * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Instead of defining an
unused pointer to the type $1, use
if (($1 *) 0) return 0;
to avoid warnings from the compiler.
From Paul Eggert.
2000-02-07 16:52:09 +00:00
Akim Demaille
293dd2c41d * acgeneral.m4 (AC_INCLUDES_DEFAULT): Include sys/types.h
Reported by Jim Meyering.
2000-02-07 16:46:56 +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
db2e9d0892 * acgeneral.m4: Formatting changes.
* acspecific.m4: Likewise.
2000-02-07 16:17:51 +00:00
Akim Demaille
b49b3a3107 * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): Don't use FFLAGS_SAVE
but ac_save_FFLAGS.
(AC_F77_NAME_MANGLING): Don't use foo_bar but ac_foo_bar.
2000-02-07 16:00:02 +00:00
Akim Demaille
00f447ee06 * acspecific.m4 (AC_C_INLINE): Proceed as for AC_C_CONST:
condition out the test case if __cpluscplus.
Don't document the autoheader template twice, one is enough.
* autoheader.m4 (AC_CONFIG_HEADER): don't hook on this guy, but
on...
(AC_CONFIG_HEADERS), since the former is defined on the latter.
2000-02-07 15:39:16 +00:00
Akim Demaille
635d167e35 * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Use the scheme proposed
by Alexandre Oliva for testing the definition of TYPE:
TYPE *foo;
sizeof (TYPE);
2000-02-07 15:06:35 +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
ec364610f6 * acgeneral.m4(AC_CONFIG_PRE_COMMANDS, AC_CONFIG_POST_COMMANDS):
Renamed AC_CONFIG_COMMANDS_PRE, AC_CONFIG_COMMANDS_POST.  All
dependencies changed.
From Jim Meyering.
2000-02-07 12:10:37 +00:00
Akim Demaille
63aaea568f * acgeneral.m4: Formatting changes.
* acspecific.m4: Likewise.
2000-02-07 12:04:39 +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
6e4a18d930 * testsuite/autoconf.g/init.exp: Removed, test performed by
tests/syntax.m4.
* testsuite/autoconf.g/sizeof.exp: Likewise.
* testsuite/autoconf.s/defines.exp: Likewise.
* configure.in (AC_OUTPUT): Adjusted.
* Makefile.am (SUBDIRS): Adjusted.
2000-02-04 14:24:34 +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
eb8389f45e Updated. 2000-02-04 13:40:55 +00:00
Akim Demaille
ea044949a5 Hide AH_HOOK behind AH_DEFUN.
* autoheader.m4 (AH_DEFUN): New macro.  Combination of define and
AH_HOOK.
(AC_TRY_RUN, AC_DEFINE, AC_DEFINE_UNQUOTED, AC_CHECK_LIB,
AC_CHECK_HEADERS, AC_CHECK_HEADERS_DIRENT, AC_CHECK_DECLS,
AC_CHECK_FUNCS, AC_CHECK_SIZEOF, AC_PROG_LEX, AC_CHECK_MEMBERS,
AC_CHECK_TYPE, AC_FUNC_ALLOCA, AC_CHECK_TYPES, AC_C_CHAR_UNSIGNED,
AC_AIX, AC_F77_WRAPPERS, AC_CONFIG_HEADER): All the former calls
to define and AH_HOOK in autoheader.m4 are replaced by AH_DEFUN.
2000-02-04 13:37:47 +00:00
Akim Demaille
8ef18f1d04 * acspecific.m4 (AC_RSH, AC_ARG_ARRAY, AC_HAVE_POUNDBANG): No use
to hide, you are DEFUNCT.
2000-02-04 13:20:19 +00:00
Akim Demaille
82033a0b35 * autoconf.texi (Invoking ifnames): ifnames no longer supports
--macrodir.
2000-02-04 13:01:39 +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
682572c9b1 Really install this patch.
* acgeneral.m4 (AC_MSG_ERROR, AC_MSG_ERROR_UNQUOTED): Allow an
optional $2: exit status.
2000-02-04 11:27:50 +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
89b1b4e90b Formatting changes. 2000-02-04 09:23:29 +00:00
Akim Demaille
34804a9d13 Introduce a means to distinguish failures of `configure' due to
extern software (so that the test suite doesn't fail on them).

* acgeneral.m4 (AC_MSG_ERROR, AC_MSG_ERROR_UNQUOTED): Allow an
optional $2: exit status.
* doc/autoconf.texi: Document.
* acspecific.m4 (AC_PROG_CC_WORKS, PROG_CXX_WORKS,
AC_PROG_F77_WORKS): Exit 77 if the compiler does not work.
2000-02-04 09:15:26 +00:00
Akim Demaille
7f8a47f153 Clean up a bit the handling of the LANG stack. More is needed.
* acgeneral.m4 (AC_LANG_CASE): New macro.
(AC_LANG_RESTORE): Use m4_case.
(AC_LINKER_OPTION): Use AC_LANG_CASE.
2000-02-04 08:41:39 +00:00
Akim Demaille
eda374af6b 1999-11-11 Akim Demaille <akim@epita.fr>
* autoconf.texi (Generic Declarations): Fixed a typo which
	prevented `make distcheck' from succeeding.
	* texinfo.tex: Updated for the same reasons.
2000-01-29 12:29:03 +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
Akim Demaille
91a9a99d16 1999-11-10 Akim Demaille <akim@epita.fr>
A test suite will be introduced which tries to run all the
	specific macros, but hasbeen'd macro make configure die with bad
	exit status.  So we wish to distinguish live macros from defunct
	macros at the moment they are AC_DEFUN'd, not in their body.  Hm,
	defunct, defunct... Hey!  That's a good name!

	* acgeneral.m4 (AC_DEFUNCT): New macro, comparable to AC_DEFUN,
	but for macros which are no longer defined.  Replaces AC_HASBEEN.
	(AC_HASBEEN): Defunct.  Well, removed in fact.
	(AC_HAVE_LIBRARY): Don't use AC_DEFUN and AC_HASBEEN, just
	AC_DEFUNCT.
	* acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_DIR_HEADER,
	AC_INT_16_BITS, AC_LONG_64_BITS): Likewise.
	(AC_XENIX_DIR): It was defunct even before I declared it was: was
	depending upon AC_DIR_HEADER which is defunct.  So AC_DEFUNCT'ed
	now.
	(AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): While we're here, you
	too are defunct now.
	* autoconf.texi (Obsolete Macros): Replace the documentation of
	AC_HASBEEN with that of AC_DEFUNCT.
2000-01-29 11:46:21 +00:00
Akim Demaille
ddfcae90fa 1999-11-10 Akim Demaille <akim@epita.fr>
* autoconf.sh: Formatting changes.
	Removed development junk.
	* acspecific.m4: Formatting changes.
	* autoconf.m4: Likewise.
	* autoheader.m4: Likewise.
2000-01-29 11:37:48 +00:00
Akim Demaille
10b394d34f 1999-11-10 Akim Demaille <akim@epita.fr>
Let Autoconf use autoconf's `--install'.

	* m4/Makefile.am: New file.
	* m4/init.am: New file, required by Automake.
	* m4/missing.am: Likewise.
	* m4/sanity.am: Likewise.
	* aclocal.m4: Include them.
	* configure.in (AC_OUTPUT): Added m4/Makefile.
2000-01-29 10:30:15 +00:00