Commit Graph

613 Commits

Author SHA1 Message Date
Akim Demaille
5d6bc2e95d * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Less adventurous use of
`test'.
Fixes Autoconf/108.
2000-05-11 11:14:03 +00:00
Akim Demaille
bf8eaa27de * acspecific.m4 (_AC_CHECK_HEADER_DIRENT): Use more modern
Autoconf idioms.
(_AC_CHECK_HEADERS_DIRENT): Removed, instead...
(AC_HEADER_DIRENT): Handle the loop.
2000-05-11 08:31:16 +00:00
Akim Demaille
13057a3aa3 Provide a means to track the dependencies of files created by
`configure'.

* acgeneral.m4 (AT_FILE_DEPENDENCY, _AC_CONFIG_DEPENDENCY,
_AC_CONFIG_DEPENDENCIES): New macros.
(AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS): Use them.
2000-05-11 08:14:18 +00:00
Akim Demaille
465612289e Merge AC_DECL_YYTEXT into AC_PROG_LEX.
* acgeneral.m4 (AC_DECL_YYTEXT): Rename as
(_AC_DECL_YYTEXT): this.
(AC_PROG_LEX): Use it.
(AC_DECL_YYTEXT): New AU macro.
* doc/autoconf.texi: Adjust.
2000-05-11 07:59:08 +00:00
Akim Demaille
6ee6f9f8ca * aclang.m4 (AC_F77_NAME_MANGLING): Use AC_COMPILE_IFELSE.
Move the requirements at the top of the macro.
2000-05-10 17:11:21 +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
a9408e08e8 * doc/autoconf.texi (Obsolete Macros): Document `AU_DEFUN'.
Move the documentation of `AC_OBSOLETE' from here, to...
(Old Macros): here.
* acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV):
AU_DEFUN'd.
2000-05-10 15:39:22 +00:00
Akim Demaille
0591c3a3ba * acgeneral.m4 (AC_LIBOBJ_DECL, AC_LIBOBJ): New macros.
(AC_REPLACE_FUNCS): Use AC_LIBOBJ.
* acspecific.m4 (AC_FUNC_MKTIME, AC_FUNC_MEMCMP,
AC_STRUCT_ST_BLOCKS): Use AC_LIBOBJ.
* doc/autoconf.texi : Adjust so that the user is not encouraged to
use LIBOBJS directly.
(Generic Functions): Document AC_LIBOBJ_DECL and AC_LIBOBJ.
2000-05-10 11:47:35 +00:00
Jim Meyering
d04507e711 (AC_SEARCH_LIBS): Remove double quotes around `no'. 2000-05-09 11:21:46 +00:00
Akim Demaille
82e6c9d866 * acgeneral.m4 (_AC_OUTPUT_FILES): Don't automatically spit
`Generated by...' in Makefiles.
Fixes Autoconf/102.
2000-05-09 11:01:20 +00:00
Akim Demaille
a0a58f7673 Let `config.status' use a private temp dir.
Suggested by Jim Meyering.

* acgeneral.m4 (_AC_SHELL_TMPDIR): New macro.
(_AC_OUTPUT_CONFIG_STATUS): Use it.
Use more quoted here docs to improve readability.
Compute `$me' and use it in the error messages.
Define `$configure' and `$configure_args' to avoid continuously
mixing the uses of `configure' and `config.status' evaluation in a
single line.
Define `$SHELL' and use it.
Simplify all the unjustified `[$]foo' into `$foo', the quotes
are needed only for `$[1]', `$[@]' etc.
Replace all the uses of `ac_cs_root' with files in the tmp dir of
`config.status'.
Remove a few `rm' covered by the removal of the `$tmp' dir.
Let `config.status' support `--debug'.
(_AC_INIT_PREPARE): Avoid the leading space in `ac_configure_args'.
* doc/autoconf.texi (Invoking config.status): Adjust.
2000-05-09 09:45:04 +00:00
Jim Meyering
6d0a7d0b49 (_AC_OUTPUT_CONFIG_STATUS): Set up traps to remove
temporaries upon exit, too, not just upon receipt of signal.
2000-05-05 14:58:44 +00:00
Akim Demaille
5556110f0c AC_CHECK_PROG macro fails if REJECT value is set under Digital
Unix 4.0x and 5.0 because `"$@"' expands into an empty parameter
(instead of nothing) when there are no positional parameters.
From Nicolas Joly.

* acgeneral.m4 (AC_CHECK_PROG, AC_CHECK_PROGS): Prefer
`$$1' to `[$]$1', `$foo' to `[$]foo', `$[1]' to `[$]1', and
`${1+"$[@]"}' to `"[$]@"'.
2000-05-05 13:29:47 +00:00
Akim Demaille
4c5528d039 AC_PREREQ understand 2.14a' as 2.141'.
Reported by Didier Verna.

* acgeneral.m4 (AC_PREREQ): Don't quote AC_ACVERSION.
2000-05-04 11:39:46 +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
a6881e088c Rename the language FORTRAN77 as Fortran 77.
* aclang.m4 (AC_LANG(FORTRAN77), AC_LANG_SOURCE(FORTRAN77),
AC_LANG_PROGRAM(FORTRAN77), AC_LANG_CALL(FORTRAN77)): Rename as...
(AC_LANG(Fortran 77), AC_LANG_SOURCE(Fortran 77),
AC_LANG_PROGRAM(Fortran 77), AC_LANG_CALL(Fortran 77)): This.
(AC_LANG_FORTRAN77): Adjust.
2000-05-03 10:08:37 +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
27aaac5d86 Don't double quote in AC_MSG_*.
* acgeneral.m4 (_AC_SH_QUOTE): Don't double quote.  Escape the
double quotes too.
(_AC_ECHO_UNQUOTED): Don't double quote :).
(_AC_ECHO, _AC_ECHO_N): Quote the call to _AC_SH_QUOTE.

The autoheader chain needs to be adjusted.

* acgeneral.m4 (AH_VERBATIM): Just pass two arguments to AH_OUTPUT
instead of trying to build what `autoheader' needs: let it handle
the format by itself.
* autoheader.m4: Adjust.
s,tmp/config.h,tmp/config.hin.

The adjustment revealed that `autoconf --trace' is not robust to
single quotes in its argument.

* autoconf.sh: Fix this issue.
Rename the escape `$*' as `$%'.  Implement `$@'.
* doc/autoconf.texi: Adjust.
2000-05-03 08:53:06 +00:00
Akim Demaille
04149796fa * acspecific.m4 (AC_FUNC_MKTIME): Use AC_SUBST. 2000-04-20 11:49:53 +00:00
Akim Demaille
cc748d17e8 Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 08:25:11 +00:00
Akim Demaille
afd63112d9 * acgeneral.m4 (_AC_INIT_HELP): Move --srcdir in the first
section.
Document --help=short and recursive.
Split the `Directory' section into `Installation directories' for
--prefix and --exec-prefix, and all the others into `Fine tuning
of the installation directories'.
In the latter, don't repeat `in DIR', the user understands, and it
comes out better.
Default for --exec-prefix is PREFIX.
Reported by Kathryn Hargreaves.
Move --host before --build.
Fix a test on `$ac_init_help' which was not updated.
2000-04-12 11:50:57 +00:00
Akim Demaille
99a3fef759 * acgeneral.m4 (AC_PROVIDE_IF): Rename as...
(AC_PROVIDE_IFELSE): this.  Change all callers.
Spread the use of AC_PROVIDE_IFELSE, no macro should know how
AC_PROVIDE names its internal variables.
2000-04-11 12:02:34 +00:00
Akim Demaille
1e6abf4e36 * acgeneral.m4: Simplify all the foo="$bar"' into foo=$bar'.
* acspecific.m4: Likewise.
* aclang.m4: Likewise.
2000-04-11 12:00:13 +00:00
Akim Demaille
c77aec0c9c * acgeneral.m4 (AC_MSG_ERROR_UNQUOTED): Remove.
(AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED): Output to the log too.
(AC_CHECKING, AC_VERBOSE): AU_ define.
2000-04-11 10:13:05 +00:00
Akim Demaille
f629b02938 * acgeneral.m4: s/1>&/>&/g.
(AC_FD_LOG): New macro, replaces...
(AC_FD_CC): this.  Provide an AU definition.
(_AC_ECHO_UNQUOTED, _AC_ECHO_N): Use m4_default.
2000-04-11 09:21:29 +00:00
Akim Demaille
2f491b084e At the end of `./configure', save the cache values, and the CPP
values.

* acgeneral.m4 (_AC_CACHE_DUMP): New macro.
(AC_CACHE_SAVE, AC_OUTPUT): Use it.
(AC_OUTPUT): Dump confdefs.h into config.log.
(_AC_INIT_PREPARE::config.log): Name the package being configured
if you can.
2000-04-05 08:53:19 +00:00
Akim Demaille
5ae14bc8c0 Disable caching by default, so as not to cause problems when
newbies accidentally use a stale cache file.

* acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set cache_file to /dev/null
to disable caching by default.
(_AC_INIT_HELP): Adjust the --help message.
(AC_CACHE_LOAD, AC_CACHE_SAVE): Don't print "loading/updating
/dev/null" messages.
* autoconf.texi: Note that caching is disabled, how to enable it,
and that `./config.cache' is the traditional name of the cache file.
* install.texi: Likewise.
2000-04-05 07:42:06 +00:00
Akim Demaille
f1e4ffce26 * acgeneral.m4 (_AC_INIT_PARSE_ARGS): If any option waiting for a
directory receives a relative path, die (bindir, sbindir,
libexecdir, datadir, sysconfdir, sharedstatedir, localstatedir,
libdir, includedir, oldincludedir, infodir, mandir, exec_prefix,
prefix).  Fixes Autoconf 42.
2000-04-03 16:16:09 +00:00
Akim Demaille
dad0204a71 Fix F77 name-mangling macros to work with cached values (so
they don't break the second time you run configure).

* aclang.m4 (AC_F77_NAME_MANGLING): Extract f77_case,
f77_underscore from cache variable.
(AC_F77_WRAPPERS): Get rid of ac_cv_f77_wrappers, it's useless.
Simplify the nested case-esac into a single one.
Simplify the documentation strings of CPP symbols.
2000-04-03 08:47:05 +00:00
Akim Demaille
c4a462d301 * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix the accumulation in
CONFIG_HEADERS.
2000-03-31 15:47:30 +00:00
Akim Demaille
8d6f0a7c05 * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): bug fix in F77 test program
(missing whitespace--F77 requires program statements to start in
column 7).
2000-03-31 08:06:38 +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
d56fbd245e Probably all the versions of bash up to 2.04 fail on
fnmatch ("/tmp", "[/\\]")
The backslash must not be last.

* acgeneral.m4 (_AC_INIT_HELP, AC_PATH_PROG, _AC_OUTPUT_FILES,
_AC_OUTPUT_LINKS, _AC_OUTPUT_SUBDIRS): Always make `\' be the
first character in all the `[]' of `case' patterns.
2000-03-28 14:48:56 +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
cb7e0312f4 * acgeneral.m4 (AC_PACKAGE): Also define AC_PACKAGE_STRING.
Use it here and there.
2000-03-27 12:03:56 +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
d25da990fe * acgeneral.m4 (_AC_CANONICAL_TARGET, _AC_CANONICAL_BUILD): Rename
as (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD), although internal,
too much foreign code depends upon them.
2000-03-25 09:24:16 +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
773e9ed0a3 * acgeneral.m4 (AC_CHECK_LIB): Ah ah! I recognized you, even
masked: you are AC_TRY_LINK_FUNC.
Fix quotation.
(AC_SEARCH_LIBS): Use AC_SHELL_IFELSE.
2000-03-25 09:07:37 +00:00
Akim Demaille
587da45d65 * acgeneral.m4 (AC_LANG_CALL, AC_LANG_CALL(C), AC_LANG_CALL(C++),
AC_LANG_CALL(FORTRAN77)): New macros.
(AC_TRY_LINK_FUNC): Use it.
(AC_TRY_CPP): Argument was output twice.
(AC_COMPILE_IFELSE, AC_LINK_IFELSE): Output $3 only if needed.
2000-03-25 09:05:22 +00:00
Akim Demaille
2662940380 * acgeneral.m4 (AC_TRY_COMPILER): Use AC_LINK_IFELSE.
(AC_TRY_LINK_FUNC, AC_CHECK_LIB, AC_CHECK_FUNC): Don't check that
the current language is C++ to output `extern "C"': the CPP
condition is enough.
2000-03-25 09:04:13 +00:00
Akim Demaille
6e08327ec7 * acgeneral.m4 (AC_LINK_IFELSE, AC_COMPILE_IFELSE): New macros.
(AC_TRY_LINK, AC_TRY_COMPILE): Use them.
(AC_CHECK_MEMBER, AC_COMPILE_CHECK, AC_CHECK_DECL,
_AC_CHECK_TYPE_NEW): Adjust.
* acspecific.m4 (AC_DECL_YYTEXT, AC_PATH_XTRA): Adjust.
2000-03-25 09:00:53 +00:00
Akim Demaille
94663d40de * acspecific.m4 (AC_F77_NAME_MANGLING): Need to use
AC_F77_LIBRARY_LDFLAGS when linking C and Fortran code.
2000-03-24 09:03:56 +00:00
Akim Demaille
df11184013 * acgeneral.m4 (AC_LANG_PROGRAM, AC_LANG_PROGRAM(C),
AC_LANG_PROGRAM(C++), AC_LANG_PROGRAM(FORTRAN77)): New macros.
(AC_TRY_COMPILE, AC_TRY_LINK): Use them.
2000-03-23 18:15:28 +00:00
Akim Demaille
ac5feaa002 * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Support --help={long, short,
recursive}.
(_AC_INIT_HELP): Propagate --help=recursive to CONFIG_SUBDIRS.
Code stolen from...
(AC_OUTPUT_SUBDIRS): s/ac_config_dir/ac_subdir/g.
2000-03-23 18:10:42 +00:00
Akim Demaille
5e090cb748 Provide a language independent means to generate language specific
programs.

* acgeneral.m4 (_AC_LANG_DISPATCH): New macro.
(AC_LANG): Use it.
(AC_LANG_SOURCE, AC_LANG_SOURCE(C), AC_LANG_SOURCE(C++),
AC_LANG_SOURCE(FORTRAN77)): New macros.
(AC_TRY_COMPILER, AC_EGREP_CPP, AC_TRY_RUN_NATIVE): Use
AC_LANG_SOURCE.
2000-03-21 12:41:22 +00:00
Akim Demaille
e77251e421 Fix a bug: some macros (e.g., AC_REVISION, AC_COPYRIGHT etc.) can
be used before AC_INIT, but they do require it.  But then, the
argument of the explicit AC_INIT call is lost.

* acgeneral.m4 (AC_CONFIG_SRCDIR): New macro.
(_AC_INIT_SRCDIR): Adjust.
(_AC_INIT): Pass your argument to AC_CONFIG_SRCDIR.
2000-03-21 12:33:37 +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
1a1ee72ec1 Speed ups.
* libm4.m4 (m4_append, m4_list_append): Use m4_define, not define.
On my machine the former implementation takes 4mn 40s to run the
test suite.  Using m4_define leads to 4mn 15s.
* acgeneral.m4 (_AC_SUBST): Use AC_EXPAND_ONCE (which uses
m4_define, not define).  4mn.
(_AC_DIVERT): Don't use m4_case.  Starting from those 4mn, if you
just move NORMAL* first in m4_case, the test suite is run in 3mn.
If instead of using m4, you use an `associative array' plus a
wrapper (current implementation), it falls to 2mn.
2000-03-21 12:09:31 +00:00