Commit Graph

1603 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
9317181589 More doc on AC_PROG_CC_C_O 2000-04-13 08:00:38 +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
be342dbf70 Have `make check' succeed with CC=g++.
* tests/atspecific.m4 (AT_TEST_MACRO): Don't check `env-after' if
the file does not exist, which may happen when a `configure' exits
brutally.
* tests/semantics.m4 (AC_CHECK_MEMBERS, AC_CHECK_TYPES): ANSI C++
forbids members named like their hosting struct, so don't do it.
2000-04-11 12:07:45 +00:00
Akim Demaille
63d0122eb0 * autoscan.pl: Reindent using 2 spaces, not 4.
Use `#' to denote Autoconf comments, not `dnl'.
Put a few `' here and there to avoid misfontification and
misindentation.
Use your base name when reporting errors.
(parse_args::usage): Use $0, use the same order as the other
executables.
(parse_args): Don't dump `--help' on cmd line errors.
2000-04-11 12:06:12 +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
2b22ca58e0 Move obsolete macros' definitions out of the way.
* doc/autoconf.texi (Old Macro Names): Rename as...
(Old Macros): this.  Change the @table enumeration into a list of
@defmac.
(AC_CHECKING, AC_CHECK_TYPE, AC_COMPILE_CHECK, AC_C_CROSS,
AC_DYNIX_SEQ, AC_HAVE_LIBRARY, AC_IRIX_SUN, AC_LINK_FILES,
AC_OUTPUT, AC_OUTPUT_COMMANDS, AC_SCO_INTL, AC_VERBOSE,
AC_XENIX_DIR): Move their descriptions into here.
Kill a few TeX warnings.
2000-04-11 11:53:26 +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
def4320d0f Fix typo. 2000-04-03 12:33:59 +00:00
Akim Demaille
d3019a7877 * doc/autoconf.texi (Canonicalizing): Officially recognize
AC_CANONICAL_TARGET and AC_CANONICAL_BUILD.
2000-04-03 12:05:02 +00:00
Akim Demaille
f98025aaca More doc on portability. 2000-04-03 12:02:37 +00:00
Akim Demaille
f92cbfb64a More doc on quotation. 2000-04-03 12:01:27 +00:00
Akim Demaille
61de8c0fb7 * doc/autoconf.texi (Writing configure.in): Explain what Autoconf
is.  Explain how to use the quotation scheme used in Autoconf.
(Quoting): Update.  Do not advocate changequote.
2000-04-03 11:59:27 +00:00
Akim Demaille
8f0e1b3401 Fix typo. 2000-04-03 11:19:22 +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
e727a08732 * autoheader.sh: Catch up with the `mktemp -d' changes in
autoconf.sh.
* autoupdate.sh: Likewise.
2000-03-31 08:20:09 +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
8e30614b9a silent.m4 depends upon the current quotation in m4, which changes
if `-i' is used or not.

* autoconf.sh (trace::silent.m4): Removed.
(trace::run_m4_trace): Pass -Derrprint.
2000-03-29 16:18:52 +00:00
Akim Demaille
d629254b79 Fix the call to umask in the previous checkin. 2000-03-29 16:15:22 +00:00
Akim Demaille
15fc2d9ecb Use `mktemp -d' when possible to create securely a tmp work dir.
* autoconf.sh: Use it when possible to create the dir $tmp.
Stop using variables for tmp files, use their names in $tmp.
[install]: Use the new features of autoconf --trace.
2000-03-29 11:09:59 +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
b2e9ed520a Update NEWS. 2000-03-28 13:36:43 +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
9a26587828 * autoconf.sh (trace): Let translate_awk do the whole translation
from `$trace' to the m4 program.
2000-03-27 12:19:01 +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
4b6a9f36ba * autoconf.sh (translate_awk): `> "/dev/stderr"' is not portable
to systems without a real /dev/stderr in the file system or if not
using one of the three free awks.  Use
print message | "cat >&2"
...
END { close("cat >&2") }
From Aharon Robbins.
2000-03-25 09:17:40 +00:00
Akim Demaille
f684a9be3d * autoheader.sh (checking completeness): Be ready to recognize
patterns with a value, and spaces between `#' and the directive, e.g.
# define FOO FIXME:
Reported by John Fortin.
2000-03-25 09:16:53 +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
fd92d2bd3c * tests/semantics.m4 (AC_TRY_LINK_FUNC, AC_CHECK_LIB): New tests. 2000-03-25 09:06:24 +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
eb99e78fb6 * libm4.m4 (m4_do): New macro. 2000-03-23 16:14:57 +00:00
Akim Demaille
89265d33a4 Typos in ChangeLog 2000-03-23 16:11:19 +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