Commit Graph

2059 Commits

Author SHA1 Message Date
Paul Eggert
25387a6c8b * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Don't use shell
expansion in the here-documents used by config.status, as that
runs afoul of the Korn shell version M-12/28/93d bug described in
the Autoconf manual, and this in turn causes a Coreutils 5.95 build to
fail as described by Tim Rice and diagnosed by Ralf Wildenhues in
<http://lists.gnu.org/archive/html/bug-autoconf/2006-05/msg00082.html>.
2006-05-23 23:07:50 +00:00
Jim Meyering
3f707bfd9f * lib/autoconf/functions.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
Fix typo introduced with 2006-04-02 change.  It reversed the sense
of the test.
2006-05-23 21:23:32 +00:00
Paul Eggert
20e21056a2 * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Simplify ac_dA and
ac_dB slightly, to save bytes in the script.
Max out at 50 lines, rather than 96; this is more likely
(though not guaranteed) to avoid obscure 'sed' failures.
2006-05-23 08:27:32 +00:00
Ralf Wildenhues
c373a466da * lib/autotest/general.m4 (AT_INIT): UnixWare `tr' may interpret
`tr -d -' as bad option argument.  Work around this by deleting
an unrelated character.
Report by Tim Rice <tim@multitalents.net>.
2006-05-23 04:44:27 +00:00
Stepan Kasal
49bb58f8f6 * lib/autoconf/programs.m4 (AC_PROG_SED): Catch script length
limits in Solaris 8 /usr/ucb/sed by testing a long script.
2006-05-22 16:27:08 +00:00
Stepan Kasal
a2cc685508 * doc/autoconf.texi (Defining Symbols): Literal parameter of
AC_DEFINE is now passed to m4_pattern_allow.
* NEWS: Mention that; likewise for AC_SUBST.
* lib/autoconf/general.m4 (AC_DEFINE_TRACE_LITERAL): Pass
the parameter to m4_pattern_allow.
* tests/tools.at: Add a check for that.
2006-05-22 15:54:09 +00:00
Stepan Kasal
f6e7fe1dce * lib/autoconf/status.m4: Fix typos. 2006-05-22 10:40:40 +00:00
Stepan Kasal
8b8f873866 * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Remove
only the files that this macro generates.
2006-05-22 10:37:15 +00:00
Stepan Kasal
408bb81c76 * doc/autoconf.texi (Limitations of Usual Tools) <sed>: For
the HP-UX sed limitation of 99 commands, labels do not count.
* lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): Mention that
in the comment.
(_AC_OUTPUT_HEADER): Revert the change from 2006-05-19.
2006-05-22 10:28:33 +00:00
Paul Eggert
cb1c7aeacd * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT):
Import the following fix from coreutils:

2006-01-13  Jim Meyering  <jim@meyering.net>

Invoke AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
$ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need
not double-quote uses of that variable, to accommodate the rare
case in which getmntent is available in none of the libraries
checked.  This happens at least on FreeBSD 5.0.
2006-05-22 04:45:03 +00:00
Paul Eggert
fb2b02422b * lib/autoconf/general.m4 (AC_CONFIG_AUX_DIRS): Bring back
ac_config_guess, ac_config_sub, and ac_configure, since evidently
some other programs unwisely rely on these undocumented vars.
But put in warning comments about them.
Problem reported by Ralf Wildenhues in
<http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00068.html>.
* NEWS: Document that these variables are intended to go away.
2006-05-21 00:19:42 +00:00
Ralf Wildenhues
8362e4e987 * lib/autoconf/c.m4 (AC_PROG_CXX_C_O): Require AC_PROG_CXX,
and set the language to C++ (analogous to the equivalent Fortran
tests).
2006-05-20 15:49:27 +00:00
Ralf Wildenhues
621112ccfb * lib/autoconf/c.m4 (AC_PROG_CXX_C_O): New macro.
* doc/autoconf.texi (C++ Compiler): Document it.
* lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Adjust comment.
* NEWS: Update.
2006-05-20 05:39:03 +00:00
Paul Eggert
4b2a883785 * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Fix off-by-one bug
that caused config.status to generate 100-command sed scripts; the
portable limit is 99.
2006-05-19 21:02:10 +00:00
Ralf Wildenhues
3e25c3e856 * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Name temporary
variable `ac_d' instead of `d' to avoid infringing namespace.
Report by Ralf Menzel.
2006-05-19 08:11:26 +00:00
Paul Eggert
ef8f36b013 * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Don't prepend
$ac_top_build_prefix to $MKDIR_P if it's just 'mkdir -p'.
* tests/tools.at (autoconf: subdirectories): New test, taken from
the corresponding problem report by Ralf Wildenhues in:
http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00053.html
2006-05-19 04:14:13 +00:00
Paul Eggert
a5272ddcec * lib/autoconf/functions.m4 (AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU):
Quote some uses of shell variables if they might suffer unexpected
globbing.  This doesn't fix all instances of quoting problems that
I found, just the easy ones that look safe.
* lib/autoconf/general.m4 (_AC_INIT_SRCDIR, _AC_INIT_HELP):
(AC_CONFIG_AUX_DIR, AC_CONFIG_AUX_DIR_DEFAULT, AC_CONFIG_AUX_DIRS):
(AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET):
(AC_CACHE_LOAD, AC_CACHE_SAVE): Likewise.
* lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF, _AC_PATH_X_DIRECT): Likewise.
* lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_LINK, _AC_OUTPUT_SUBDIRS):
Likewise.
* lib/autotest/general.m4 (_AC_INIT_PARSE_ARGS): Likewise.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Likewise.
2006-05-19 02:57:45 +00:00
Ralf Wildenhues
b66a11a01c * lib/Automake/Configure_ac.pm, lib/Automake/Channels.pm,
lib/Automake/FileUtils.pm, lib/Automake/Struct.pm: Sync from
Automake as follows:

* lib/Autom4te/Configure_ac.pm (find_configure_ac): Use
`$configure_in' instead of `configure.in', to preserve
directory component.
2006-05-17 02:17:57 +00:00
Paul Eggert
5e2a797ae7 * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Fix overly-picky
test for C99 conformance; (bool) 0.5 is an integer constant
expression, but (bool) -0.5 is not.  Problem reported by Fedor
Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
2006-05-15 02:22:28 +00:00
Paul Eggert
22768c5765 Regenerate. 2006-05-13 09:55:13 +00:00
Paul Eggert
9479591b3e * doc/autoconf.texi (Particular Programs): AC_PROG_MKDIR_P now
sets MKDIR_P, not mkdir_p, to avoid collisions with Automake.
Warn about obsolete install-sh files.  Remove stray sentence
fragment and fix cross reference.
* lib/autoconf/programs.m4 (AC_PROG_INSTALL): Don't insist on
install -d; this undoes the 2006-05-10 change.
(MKDIR_P): Mark with AN_MAKEVAR.
(AC_PROG_MKDIR_P): Fall back on $ac_install_sh, not $INSTALL, so
that we don't require $INSTALL to be thread-safe.  Move comments
out of generated code.  Require AC_CONFIG_AUX_DIR_DEFAULT instead
of AC_PROG_INSTALL.  Output a message saying that we're checking
mkdir -p.  Set MKDIR_P rather than mkdir_p.  Do special magic for
MKDIR_P instead of AC_SUBST.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILE, _AC_OUTPUT_CONFIG_STATUS):
Special magic for MKDIR_P, too.
* lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Remove comment that defeated
a dnl.
* tests/local.at (AT_CHECK_ENV): mkdir_p -> MKDIR_P.
2006-05-13 09:54:51 +00:00
Paul Eggert
fbf6ef9ae5 Insist that install -d works, and have mkdir -p fall back on that. 2006-05-10 23:43:36 +00:00
Paul Eggert
0f696b8be5 * NEWS: New macro AC_PROG__MKDIR_P. AS_MKDIR_P is now more robust.
* config/install-sh: Don't use 'path' to talk about file names,
as per GNU coding standards.  Close a race condition reported by Ralf
Wildenhues and Stepan Kasal.  There is still a race condition
on hosts that predate POSIX 1003.1-1992, but we can't help this.
Don't mishandle weird characters like space on pre-POSIX hosts.
Invoke mkdir at most once per dir arg on pre-POSIX hosts.
* doc/autoconf.texi (Programming in M4sh): Cross-reference to
AC_PROG_MKDIR_P from AS_MKDIR_P.
(Limitations of Usual Tools): Cross-reference to AC_PROG_MKDIR_P
from mkdir.  Mention that Autoconf 2.60 install-sh is safe but
earlier editions are not (including Automake 1.8.3).
Do not suggest mkinstalldirs for thread-safety.
* lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Make it more robust in the
presence of special characters and race conditions.
* tests/local.at (AT_CHECK_ENV): Add mkdir_p to the list of variables
in Autoconf's name space.

* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): New macro, taken
from Automake with minor changes.
* doc/autoconf.texi (Particular Programs): Document AC_PROG_MKDIR_P.
2006-05-10 23:05:15 +00:00
Ralf Wildenhues
62e0f31c7c * lib/autoconf/c.m4 (AC_PROG_CC_STDC): If ac_cv_prog_cc_stdc
is set to `no', then that overrides and sets ac_cv_prog_cc_c89
and ac_cv_prog_cc_c99 to `no', for backward compatibility.
* NEWS: Update.
2006-05-07 20:36:01 +00:00
Ralf Wildenhues
e35c2c54f7 * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Take care not to
munge (multiple) white space and other oddities.
* tests/torture.at (AT_CHECK_AC_ARG_VAR): Make sure to M4-escape
single quotes in variable assignment.
(AC_ARG_VAR, configure invocation): Adjust tests to expose this
and similar failures by adding multiple spaces, tabs, and other
special characters.
Report and different test suggested by Francesco Romani
<fromani@gmail.com> and Andrew Church <achurch@achurch.org>.
2006-05-06 05:53:50 +00:00
Ralf Wildenhues
7ad0bfad53 * lib/autoconf/general.m4 (_AC_INIT_PREPARE): When we escape
single quotes, we only need to search for single quotes; this
both simplifies the search pattern, and makes us less
susceptible to `echo' variations for arguments not containing
single quotes.
(_AC_ARG_VAR_VALIDATE): Likewise.
2006-05-06 05:52:28 +00:00
Ralf Wildenhues
99ff5f6603 * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Cater for
traditional shells like the Solaris one that do not use the
first IFS character for assembling `$*'.
Prompted by a related report from autoconf_bug@nro.ca.
2006-05-02 20:09:24 +00:00
Ralf Wildenhues
2775732faa * doc/autoconf.texi (Fortran Compiler): Do not use `@ovar' in
continuous text.
(Runtime): Fix macro argument names to match description:
`action-if-found' -> `action-if-true' and similarly.
(Obsolete Macros): Likewise.
* lib/autoconf/general.m4 (_AC_COMPILE_IFELSE): Likewise.
(AC_COMPILE_IFELSE, AC_TRY_COMPILE, _AC_LINK_IFELSE)
(AC_LINK_IFELSE, AC_TRY_LINK, AC_COMPILE_CHECK): Likewise.
2006-04-30 17:04:06 +00:00
Ralf Wildenhues
16562b36b8 * doc/autoconf.texi (Limitations of Builtins): Document FreeBSD
/bin/sh set unsorted output.
* lib/autoconf/general.m4 (_AC_CACHE_DUMP): Adjust.
* tests/local.at
2006-04-28 04:17:51 +00:00
Paul Eggert
a87d7437dc * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Don't use AS_ERROR,
since as_me isn't set yet.
2006-04-25 12:27:45 +00:00
Paul Eggert
9aed71b2ec Undo many of the recent changes, substituting these instead:
* doc/autoconf.texi (Programming in M4sh): Comment out the
documentation of AS_BASENAME, for now.
(Shell Substitutions): Do not use AS_DIRNAME in an example.
(Limitations of Builtins) <basename>: Do not refer to
AS_BASENAME.
* bin/autoconf.as (me): Don't use AS_BASENAME.
(dir): Remove the unused variable.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED): Renamed from
AS_DETECT_REQUIRED.  All uses changed.
(_AS_DETECT_SUGGESTED): Renamed from AS_DETECT_SUGGESTED.
All uses changed.
(_AS_DETECT_BETTER_SHELL): Put ;; at the end of a case.
(AS_BASENAME): Use "basename --" to protect against leading "-".
(_AS_BASENAME_EXPR): Renamed from AS_BASENAME_EXPR.  All uses changed.
(_AS_BASENAME_SED): Renamed from AS_BASENAME_SED.  All uses changed.
(_AS_BASENAME_PREPARE): Reject implementations that cannot handle "--".
(_AS_DIRNAME_PREPARE): Likewise.
(_AS_DIRNAME_EXPR): Renamed from AS_DIRNAME_EXPR.  All uses changed.
(_AS_DIRNAME_SED): Renamed from AS_DIRNAME_SED.  All uses changed.
(AS_DIRNAME): Use "dirname --".
2006-04-24 19:36:01 +00:00
Paul Eggert
a6e40381c6 * doc/autoconf.texi (Runtime): Renamed from "Run Time". All uses
of "run time" and "run-time" changed to "runtime", for consistency.
* lib/autoconf/fortran.m4: Likewise (in comment).
* lib/autoconf/functions.m4: Likewise.
* lib/autoconf/general.m4: Likewise.
* lib/autoconf/headers.m4: Likewise.
2006-04-24 06:51:53 +00:00
Paul Eggert
24a8c2d4a5 * NEWS: Update wording to say merely "should" for AS_DIRNAME
and AS_BASENAME.
* lib/m4sugar/m4sh.m4 (AS_BASENAME, AS_DIRNAME): Bring these
back, albeit undocumented.  Programs now have a grace period
to switch to AS_VAR_SET_DIRNAME and AS_VAR_SET_BASENAME.
2006-04-23 08:13:43 +00:00
Ralf Wildenhues
44635be039 * doc/autoconf.texi (Introduction): The GNU Autoconf Macro
Archive is not officially `GNU' any more.  Update URL.
(Defining Directories): Likewise
* lib/autoconf/c.m4 (AC_C_RESTRICT): Update URL.
2006-04-23 07:13:52 +00:00
Paul Eggert
52d54c54e3 * NEWS: Remove AS_DIRNAME and AS_BASENAME, replacing them with
AS_VAR_SET_DIRNAME and AS_VAR_SET_BASENAME.
* doc/autoconf.texi (Programming in M4sh): Document this.  All uses
changed.  The newer interfaces are more reliable, as they allow
implementations that handle trailing newline correctly.  For now,
we're in a freeze, so I did not include the more-reliable
implementations, but I wanted to correct the interface before 2.60
goes out.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED): Renamed from
AS_DETECT_REQUIRED.  All uses changed.
(_AS_DETECT_SUGGESTED): Renamed from AS_DETECT_SUGGESTED.
All uses changed.
(_AS_DETECT_BETTER_SHELL): Put ;; at the end of a case.
(_AS_BASENAME): Renamed from AS_BASENAME.  All uses changed.
Use "basename --" to protect against leading "-".
(_AS_BASENAME_EXPR): Renamed from AS_BASENAME_EXPR.  All uses changed.
(_AS_BASENAME_SED): Renamed from AS_BASENAME_SED.  All uses changed.
(_AS_BASENAME_PREPARE): Reject implementations that cannot handle "--".
(_AS_DIRNAME_PREPARE): Likewise.
(_AS_DIRNAME): Renamed from AS_DIRNAME.  All uses changed.
(_AS_DIRNAME_EXPR): Renamed from AS_DIRNAME_EXPR.  All uses changed.
(_AS_DIRNAME_SED): Renamed from AS_DIRNAME_SED.  All uses changed.
Use "dirname --".
(AS_VAR_SET_BASENAME, AS_VAR_SET_DIRNAME): New macros.
* tests/m4sh.at (AS_VAR_SET_DIRNAME): Renamed from AS_DIRNAME.
Test the new API.  Don't test internals, since they're probably
going to change anyway.
(AS_VAR_SET_BASENAME): Likewise, renamed from AS_BASENAME.

* bin/autoconf.as: Don't use AS_BASENAME or AS_DIRNAME.  This
removes a bootstrapping problem with the changes described above.
The AS_DIRNAME part wasn't used, anyway, and the AS_BASENAME
part can be done portably without all the deep Autoconf magic.
2006-04-23 06:49:53 +00:00
Paul Eggert
c10c1a2bf6 * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Remove the leading
newline from the `trap' code to finish `config.log'; the NetBSD
/bin/sh resets the exit status after an empty command, as
documented in doc/autoconf.texi.
2006-04-19 18:16:36 +00:00
Ralf Wildenhues
08d4c6bbb7 * lib/Autom4te/FileUtils.pm: Sync from Automake. 2006-04-17 12:17:01 +00:00
Paul Eggert
5863d13f3f * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Don't
use ">&-" since we're only 99.999% sure that this is portable,
and since the MinGW bug is fixed in a different way.
* lib/autotest/general.m4 (AT_INIT): Likewise.

* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Handle --recheck
before opening config.log, to avoid hitting a bug on MinGW.
2006-04-17 06:10:50 +00:00
Paul Eggert
5455100eda * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Close
AS_MESSAGE_LOG_FD before reopening it onto the log file.
This works around a MinGW bug reported by Eric Paire.
Make sure that all writes to the log file append to it,
rather than possibly losing data.
* lib/autotest/general.m4 (AT_INIT): Likewise.
2006-04-15 01:13:32 +00:00
Stepan Kasal
f7b10b57c1 * lib/Autom4te/FileUtils.pm (find_file): Fix a typo in the
description.
2006-04-14 07:05:36 +00:00
Ralf Wildenhues
8683ec4ff9 * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): If the templates for
the instantiated file do not contain the string 'datarootdir'
but contain @datadir@, @docdir@, @infodir@, @localedir@, or
@mandir@, replace the reference '${datarootdir}' by the value.
* tests/torture.at (datarootdir workaround): New test.
* NEWS: Advertise this temporary fixup.
Based on a patch by Bruno Haible, reported and analyzed by
Paul Eggert and Noah Misch.
2006-04-12 20:40:21 +00:00
Stepan Kasal
b3c78a065b * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Simplify the summary of
all the changes since 2006-04-07.
2006-04-12 12:20:13 +00:00
Ralf Wildenhues
f05b9c77f0 * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): If `ln -s file1 file2'
succeeded, but `ln -s file dir' failed, take care to remove the
leftover target before the next test, to prevent its spurious
failure; also make sure `ln file dir' works before selecting it.
Thanks to Keith Marshall for pointing this out.
* THANKS: Update.
2006-04-11 17:34:03 +00:00
Ralf Wildenhues
985a38d751 * lib/autotest/general.m4 (AT_INIT): Store quoted variable
assignments in `at_debug_args', so that we put them correctly
in the `run' script.
* tests/autotest.at (Debugging a failed test): Unmark XFAIL.
Reported by Eric Blake.
2006-04-11 16:09:54 +00:00
Ralf Wildenhues
67fa0de6f4 * tests/autotest.at (AT_CHECK_AT): Add new argument, to allow
top-level tests after micro-suite has been run.   Used in...
(Debugging a successful test, Debugging script and environment),
(Debugging a failed test): ...these new tests.  The first of these
is fixed by...
* lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): New
macro, split out from...
(AT_INIT): ...here, so that using -d also generates a run script.
Document that -d inhibits top-level logging.
* doc/autoconf.texi (testsuite Invocation): Document that -d only
inhibits top-level logging; debug scripts are created.
2006-04-11 16:06:40 +00:00
Ralf Wildenhues
1eff34d1c3 * lib/autotest/general.m4 (_AT_CHECK): Avoid syntax error on empty
check.
* tests/autotest.at (Empty test, Empty check): New test to check it.
2006-04-11 16:03:28 +00:00
Ralf Wildenhues
4ba7445703 * lib/autoconf/c.m4 (AC_C_CONST, AC_C_VOLATILE): Avoid warnings
from gcc.
2006-04-11 16:02:01 +00:00
Ralf Wildenhues
6d2c0bd7e5 Regenerate. 2006-04-10 20:40:49 +00:00
Ralf Wildenhues
284c40be5c * lib/freeze.mk: Fix typo in comment. Unlike the last, white
space only patch to this file, this patch causes the Makefile.in
files that include freeze.mk to be updated, and thus have a
newer time stamp again, which in turn makes a pristine CVS
checkout have correct time stamps.
2006-04-10 20:40:37 +00:00
Paul Eggert
1854644bfa Regenerate. 2006-04-10 18:00:31 +00:00