Commit Graph

594 Commits

Author SHA1 Message Date
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
Akim Demaille
6a80cc62e0 Uniform idioms.
* acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS,
_AC_OUTPUT_LINKS, _AC_OUTPUT_COMMANDS): Prefer
for i in : $is; do test $i = : && continue
over
for i in .. $is; do if test $i != ..; then
2000-03-21 12:03:55 +00:00
Akim Demaille
a420def412 * acgeneral.m4 (_AC_INIT_PREPARE, _AC_INIT_PARSE_ARGS): Move more
initializations to...
(_AC_INIT_DEFAULTS): here.
2000-03-21 11:13:50 +00:00
Akim Demaille
bb03a37786 Give a means to compute `srcdir' earlier in configure.
* acgeneral.m4 (_AC_INIT_SRCDIR): New macro, pulled out from...
(_AC_INIT_PREPARE): No longer compute `srcdir'.
(_AC_INIT): Use _AC_INIT_SRCDIR.
(AC_INIT): Don't forget to pass the argument to _AC_INIT.
2000-03-21 10:01:40 +00:00
Akim Demaille
cfc55ad76f * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Rename as _AC_OUTPUT_SUBDIRS.
No argument, use AC_LIST_SUBDIRS.
Adjust callers.
2000-03-21 09:20:40 +00:00
Akim Demaille
197b270708 * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Double quote the head
of the help snippet.
2000-03-21 09:18:31 +00:00
Akim Demaille
264330cef7 Give an identity to `configure' scripts.
* acgeneral.m4 (AC_PACKAGE): New macro.
(_AC_COPYRIGHT_SEPARATOR): Remove.
(AC_COPYRIGHT): Adjust.
(_AC_INIT_HELP, _AC_INIT_VERSION): Name the package you configure
when you want.
(_AC_INIT): Adjust.
* configure.in (AC_PACKAGE): Add.
2000-03-21 09:07:15 +00:00
Jim Meyering
6d877fe7a1 (AC_SYS_LONG_FILE_NAMES): Don't test for existence
of $ac_xdir.  Not only is `test -e' not portable, but the test isn't
necessary at all;  the following mkdir ends up accomplishing the
same goal.  Suggestion from Alexandre Oliva.
2000-03-20 11:16:40 +00:00
Jim Meyering
2e4e43be07 (_AC_INIT_PREPARE_ENVIRONMENT) [setting IFS]: Be careful
to use space, tab and new line, in precisely that order.
2000-03-20 11:06:51 +00:00
Akim Demaille
28fadd7df1 * acgeneral.m4: Formatting changes. 2000-03-20 10:35:53 +00:00
Akim Demaille
aac61512e0 In Autoconf 2.13, although AC_OUTPUT_COMMANDS did double quote its
arguments, AC_OUTPUT arguments 2 and 3 were not!  Currently,
AC_OUTPUT over quotes too: stop that.
Reported by Martin Buchholz.

* doc/autoconf.texi (Output): Don't expand on the ternary
AC_OUTPUT.
* acgeneral.m4 (AC_OUTPUT): Don't over quote $2 and $3.
2000-03-17 10:07:56 +00:00
Akim Demaille
ab542b1f77 * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Security fixes: create
the temp files in a private temporary directory, not directly in
TMPDIR.
2000-03-17 08:40:27 +00:00
Akim Demaille
75b5d70be3 Install the IFS we need once for all.
* acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): New macro.
Handle the NLS envvars, and IFS.
(_AC_INIT_PREPARE): Use it, no longer set the NLS envvars.
(_AC_WHICH_A, AC_PATH_PROG): Rely on the default IFS.
* acspecific.m4 (AC_PROG_INSTALL, AC_FUNC_SELECT_ARGTYPES):
Likewise.
2000-03-17 08:37:50 +00:00
Akim Demaille
5b50a54f8f * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_TRY_COMPILE,
AC_TRY_LINK, AC_TRY_RUN_NATIVE): Simplify the removal of the
contest files: don't remove them before running the actions, just
remove them at the end of the macro.
2000-03-17 08:31:49 +00:00
Akim Demaille
6522e14a8f * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use
: ${foo='some words'}
not
  : ${foo=some words}
since this is not portable: Digital Unix v5.0: `bad substitution'.
From Nicolas Joly.
2000-03-16 18:12:58 +00:00
Akim Demaille
cbccb222a2 Revamp AC_FUNC_SELECT_ARGTYPES.
* acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use a single cache
variable instead of three.
Use AC_CACHE_CHECK.
Shorten the name of the var loops, they are no longer cached.
Include sys/types.h unconditionally.
`select' returns an int, fixes Autoconf/46.
Don't display parens in the user messages.
2000-03-15 09:55:21 +00:00
Akim Demaille
92cd322dc1 * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): No use for @%:@ here,
no need to over quote $1 in the comments.
2000-03-14 08:47:48 +00:00
Akim Demaille
9da44165aa * acgeneral.m4: Replace some ifelse with ifval or m4_default, or
even nothing when not needed.
* acspecific.m4: Likewise.
2000-03-14 08:41:15 +00:00
Akim Demaille
324a1d71da * acgeneral.m4 (_AC_INIT_PREPARE): Insert the Autoconf version in
config.log, and the command line which ran configure.
Kill a couple of useless quote around dollars.
2000-03-14 08:37:27 +00:00
Akim Demaille
073f2c710a * acgeneral.m4 (_AC_INIT_PREPARE): Kill a changequote in the
building of `ac_configure_args'.
2000-03-14 08:34:21 +00:00