Commit Graph

1280 Commits

Author SHA1 Message Date
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
f14cd77f30 * tests/base.m4: s/m4 -I ../m4 -I $at_top_srcdir/. 2000-02-09 08:31:39 +00:00
Akim Demaille
b62028d508 * autoheader.sh (debug): Initialize to `false', not 0. 2000-02-08 17:23:25 +00:00
Akim Demaille
5ad32e051d Fix a bug: `libm4::define' was incorrectly registered.
* libm4.m4 (libm4::define): Not only register, define too.
2000-02-08 16:51:19 +00:00
Akim Demaille
60c3912450 * acgeneral.m4 (AC_COMPILE_CHECK): Use AU_DEFUN, remove the call
to AC_OBSOLETE.
2000-02-08 13:58:13 +00:00
Akim Demaille
3986defac7 * acgeneral.m4 (AC_PROVIDE): Use m4_define', not define'.
Because of the namespace machinery this change makes `autoconf'
about four times faster on complex `configure.in's.
2000-02-08 13:55:52 +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
b39821a30a * acgeneral.m4 (AC_CONFIG_UNIQUE): Strip the `:foo.in' part
yourself, in order to give better error messages.
(AC_CONFIG_IF_MEMBER): Adapted to the above change.
Quote some regexp active characters ([+.*]).
Suggested by Alexandre Oliva.
2000-02-08 13:51:55 +00:00
Akim Demaille
ecf746f564 * acgeneral.m4 (AC_INCLUDES_DEFAULT): Make it more robust to
the fact it is used non quoted.
Reported by Jim Meyering.
2000-02-08 13:50:52 +00:00
Akim Demaille
90cea7798f * acgeneral.m4 (AC_OUTPUT_FILES): Simplify some excess in
changequote.
(AC_OUTPUT_SUBDIRS): Likewise.
2000-02-08 13:47:29 +00:00
Akim Demaille
ed706fc1bf * autoupdate.sh: Don't dump --help on --wrong-option.
* autoconf.sh: Reformating, and use >&2 instead of 1>&2.
* autoreconf.sh: Likewise.
* autoheader.sh: Likewise.
2000-02-08 13:45:24 +00:00
Akim Demaille
30387328fa * libm4.m4 (m4_namespace_push, m4_namespace_pop): Use the private
macros to be robust to name space changes.
(m4_popdef, m4_pushdef): New private macros.
2000-02-08 13:43:58 +00:00
Akim Demaille
11eaab70bd Let the doc catch up.
* doc/autoconf.texi (Common Behavior): New section, to document
the common behavior of the macros.
(Standard Symbols): New subsection.  Describes the transformation
of the AC_DEFINEd names.
(Default Includes): New subsection.  Obvious content.
All the ``callers'' updated.
2000-02-08 13:42:51 +00:00
Akim Demaille
738595fda3 * acgeneral.m4 (AC_OUTPUT_HEADERS): Don't use `break' to exit the
while loops which are breaking conftest.defines and
conftest.undefs into smaller snippets: just use the proper
condition for the while.
Suggested by Alexandre Oliva.
2000-02-08 13:41:51 +00:00
Akim Demaille
36dcb4d62b * doc/autoconf.texi (Configuration Commands): New section, for
AC_CONFIG_COMMANDS.
Move the definition of AC_OUTPUT_COMMANDS here.
(Configuration Links): New section, for AC_CONFIG_LINKS and
AC_LINK_FILES.
(Configuration Files): New section, for AC_CONFIG_FILES.
(Globally) Promote AC_CONFIG_HEADERS over AC_CONFIG_HEADER.
(Using System Type): Don't document AC_CONFIG_LINKS and
AC_LINK_FILES.
(Invoking config.status): Mention CONFIG_COMMANDS.
Document --file and --header.
Talk first of the newest interface of config.status.
2000-02-08 13:40:26 +00:00
Akim Demaille
eb835e21d2 Introduce a concept index, and update a bit the documentation.
* doc/autoconf.texi (Concept Index): New section.
Various entries added.
(Typedefs): Renamed as...
(Types): this.  Pay attention to not limiting the documentation to
the typedefs.
(Particular Types): Mention the equivalent generic test.
Promote the GNU coding style at various places.
2000-02-08 13:38:45 +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
5ea4b5387a Clean up some m4 files.
* acoldnames.m4: Use `#', not `dnl'.
Don't spread `dnl' everywhere, anyway, we are in a divert(-1).
* autoconf.m4: Likewise.
* autoheader.m4: Likewise.
2000-02-08 13:16:01 +00:00
Akim Demaille
0ba85ee10a Clean up autoconf.
* autoconf.sh: Minor reorganizations to clearly separate the
prologue, which is almost common to all the shell scripts of
Autoconf, and the body.
2000-02-08 13:12:49 +00:00
Akim Demaille
df16b72f85 Improve support of name spaces in libm4. Put the m4 builtins
in the `libm4' name space.

* libm4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_undefine): Private copies in the global name space.  Used by
the name space mechanisms.
(m4_namespace_register): New macro.
(m4_namespace_define): Use it.
(builtin, changequote, defn, dnl, esyscmd, ifdef, ifelse, indir,
patsubst, popdef, pushdef, regexp, undefine, syscmd, sysval): Put
in the `libm4' name space.
(m4_disable, m4_enable): Use the private m4_indir, otherwise once
`libm4' closed, there is no `indir' available, and therefore no
means to reopen a name space.
2000-02-08 13:11:21 +00:00
Akim Demaille
47f9aa62a1 Output really nothing if AC_INIT was not given. Unconditional
output can be problematic with autoupdate.

* acgeneral.m4 (AC_INIT_NOTICE): Output ac_includes_default.
(Default includes section): No longer dump ac_includes_default in
AC_DIVERSION_INIT.
2000-02-08 13:06:17 +00:00
Akim Demaille
a9b538ad79 * libm4.m4 (m4_namespace_define): Fix a bug: `m4_namespace'
instead of `$1'.
Simplify some excess in quoting.
Use NAMESPACE::MACRONAME instead of `m4_defn(NAMESPACE,
MACRONAME)'.
2000-02-08 12:43:47 +00:00
Akim Demaille
723b26a3de Adapt autoheader to use libm4's namespaces.
* autoheader.m4 (AH_HOOK): Removed.
(AH_DEFUN): Define in the `autoheader' name space.
Use only AH_DEFUN to define macros in this file.
(epilogue): No longer run the `AH_HOOKS', enter the `autoheader'
name space.
2000-02-08 11:46:51 +00:00
Akim Demaille
a443a89e84 Clean up a bit the user interface.
* autoconf.sh: Give your name while reporting errors.
Don't spit --help for errors on arguments.
* autoreconf.sh: Likewise.
* autoheader.sh: Likewise.
More temporary files that one can browse when debugging.
Don't ${var}, just $var.
Don't dump --help when the arguments are invalid.
(config_h): Use the empty value instead of `undefined' to check
that it is defined.
* acspecific.m4: Formatting changes.
2000-02-08 11:39:46 +00:00
Akim Demaille
5a9da0e05e Introduce name spaces in libm4.
* libm4.m4 (m4_namespace_push, m4_namespace_pop,
m4_namespace_define, define, m4_disable, m4_enable, m4_rename):
New macros.
(_m4_foreach, _m4_for, m4_wrap): Use m4_define for temporaries.
(m4_split): Don't mess with the quotes.

* acgeneral.m4 (AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_HEADERS): Quote
`define'.
2000-02-08 11:20:57 +00:00
Akim Demaille
435c0e5aa9 * doc/autoconf.texi (Introduction): m4 1.4 is now required.
(Invoking autoconf): A better help on --trace.
(Defining Symbols): Advocate a proper use of the quotes in m4
code, including if the quotes are sometimes useless.  It is bad,
very bad not to quote properly, so quote all the examples
properly.
(Cache Files): Use a unary call to define, instead of an empty
$2.
(Using System Type): Watch out TeX wrapping.
(Pretty Help Strings): Don't give too long a snippet of --help.
Promote the coding style of Autoconf.  Quote properly.
2000-02-08 11:15:59 +00:00
Akim Demaille
4bed138997 * acgeneral.m4 (AC_PRO): Use AC_PROVIDE instead of defining
yourself.  This allows to see everything that is AC_PROVIDEd via
autoconf --trace.
(AC_SPECIALIZE): define'd, not AC_DEFUN'd.
(AC_PROVIDE): Use define with a single arg, instead of an empty $2.
2000-02-08 11:06:23 +00:00
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