Commit Graph

1479 Commits

Author SHA1 Message Date
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
Akim Demaille
700c767833 * tests/semantics.m4 (AC_PATH_PROG, AC_PATH_PROGS): New tests. 2000-03-21 12:22:27 +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
41f6c57a3e * tests/tools.m4 (autoconf --trace): New test. 2000-03-21 12:08:24 +00:00
Akim Demaille
424aa5a02f * autoconf.sh (task trace): Pipe the output of the first m4 into
the second one, instead of saving to a tmp file, so that we can
trace endless configure.in expansion.
2000-03-21 12:06:30 +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
25a01c40c0 . 2000-03-20 11:16:58 +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
9785f1af92 . 2000-03-20 11:07:49 +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
e140e3ce82 Don't rely on RS = "0" to swallow the whole input as a single
record, this is not portable: mawk and nawk understand it as RS =
"".  gawk understands it as expected.

* autoconf.sh (translate_awk::BEGIN): No longer change RS.
(translate_awk::body): Move to the END.
Instead, accumulate the input in `request'.
2000-03-20 10:30:54 +00:00
Akim Demaille
ded9870204 * doc/autoconf.texi (Testing Values and Files): Be a subsection of
`Portable Shell Programming'.
(Shell Substitutions, Limitations of Usual Tools): New subsections.
2000-03-20 10:10:06 +00:00
Akim Demaille
affebc0e90 Use a single tool to reformat the raw `configure' script output by
m4.
Suggested by Paul Eggert.

* autoconf.sh: Stop playing with 2 seds and an AWK to finalize
`configure', a single AWK program is enough.
2000-03-20 10:06:36 +00:00
Akim Demaille
421c31c674 Add details to a ChangeLog entry 2000-03-17 10:24:06 +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