Commit Graph

2188 Commits

Author SHA1 Message Date
Ralf Wildenhues
30ced44ece * lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT): Solaris 2.5.1
needs _UINT8_T and _UINT64_T defines as well, to avoid clashes
with system headers.  Report by Bruno Haible.
2006-06-19 18:22:03 +00:00
Ralf Wildenhues
07eac594cc * lib/autom4te.in (Automake-preselections): Add AM_PROG_CXX_C_O,
AM_PROG_F77_C_O, AM_PROG_FC_C_O, AC_FC_SRCEXT, AC_FC_FREEFORM.
2006-06-13 18:03:30 +00:00
Ralf Wildenhues
5a84fe71d2 * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Fix M4 quotation
in sed regular expression.
2006-06-13 17:02:59 +00:00
Paul Eggert
58716edd69 * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Look for
$as_shell.exe too.  Problem reported by Andreas Buening in
<http://lists.gnu.org/archive/html/autoconf/2006-06/msg00038.html>.
2006-06-07 23:46:47 +00:00
Ralf Wildenhues
6dc2080f18 * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Work around
`unused variable' compiler warning, for `-Wall -Werror'.
Report by Jaap Haitsma <jaap@haitsma.org>.
2006-06-07 18:24:01 +00:00
Paul Eggert
dbcaeb5704 * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Remove core file, in
case the compiler dumps core.  Problem reported for
OpenServer 5.0.7 by Tim Rice in
<http://lists.gnu.org/archive/html/bug-autoconf/2006-06/msg00019.html>.
* lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE):
Likewise.
2006-06-07 05:35:46 +00:00
Ralf Wildenhues
7b022ff9eb * lib/freeze.mk: Quiet check-forbidden-patterns so the string
"ERROR" only shows up in "make check" output if there is an
error.
2006-06-06 20:31:55 +00:00
Ralf Wildenhues
d6cd3db447 * bin/autoreconf.in: Trace `LT_CONFIG_LTDL_DIR'; if it has been
seen, invoke libtoolize with `--ltdl' argument.
* lib/autom4te.in (Autoreconf-preselections): Adjust.
* NEWS: Update.
Suggested by Eric Blake.
2006-06-05 12:16:06 +00:00
Ralf Wildenhues
8cf341a6dc * lib/m4sugar/m4sugar.m4 (m4_require): Modify the error
message issued by AC_REQUIRE.
* tests/m4sugar.at: Check m4_require's error message.
* tests/base.at: Check AC_REQUIRE's error message.
* tests/local.at (AT_CHECK_M4): New macro, almost identical
to...
(AT_CHECK_AUTOM4TE): ... which is now a thin wrapper around
AT_CHECK_M4.
(AT_CHECK_AUTOCONF): Use AT_CHECK_M4; no longer support
`expout' as the last parameter.
* tests/tools.at: Adapt to the above change.
2006-06-05 08:18:33 +00:00
Paul Eggert
e190aab2e7 (AC_PROG_MKDIR_P): Improve the comment. 2006-05-31 20:52:38 +00:00
Paul Eggert
e07dda2d48 * lib/autoconf/general.m4 (_AC_DO_ECHO): Be even more conservative
about quoting the case statement, just in case.
* doc/autoconf.texi (Particular Programs) <AC_PROG_MKDIR_P>:
Document that ${MKDIR_P} understands --.
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Improve the
comment.
2006-05-31 19:49:15 +00:00
Ralf Wildenhues
c148c4af82 * lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): Guard against test
argument with leading hyphen.  Problem reported by Paul Eggert.
2006-05-31 09:44:39 +00:00
Paul Eggert
9394ddfd69 * lib/autoconf/general.m4 (_AC_DO_ECHO): Be more conservative
about quoting ac_try: quote all of it, if any of it seems suspicious.
This means we don't have to worry about ${ or sed any more.
Also, double-quote the case statement, to work around misuses via
underquoting as reported by Ralf Wildenhues in
<http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00169.html>.
(_AC_EVAL_STDERR): Revert, since evidently some packages rely on this
undocumented and dangerous macro.
Problem reported by Ralf Wildenhues in
<http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00168.html>.
2006-05-31 01:28:06 +00:00
Ralf Wildenhues
7548e5acd6 * lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): Check whether
`dirname -- /' returns `/', for SunOS dirname scripts that escaped.
Report by Sam Sirlin <sam@kalessin.jpl.nasa.gov>.
2006-05-30 23:24:55 +00:00
Paul Eggert
5c407d5b48 Fix typo. 2006-05-30 07:38:17 +00:00
Paul Eggert
e6c5aee481 * lib/autoconf/general.m4: Revert AC_TRY_EVAL and AC_TRY_COMMAND,
since evidently some packages rely on the old, broken behavior.
Problem reported by Ralf Wildenhues in
<http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00160.html>.
(AC_TRY_EVAL, AC_TRY_COMMAND, _AC_EVAL): Go back to the
pre-2006-05-26 definitions, but leave in the comments that
these macros are dangerous and should not be used.
(_AC_DO_ECHO): Renamed from _AC_EVAL_ECHO.  All callers changed.
(_AC_DO): Renamed from _AC_EVAL.  All callers changed.
(_AC_DO_STDERR): Renamed from _AC_EVAL_STDERR.  All callers changed.
(_AC_DO_VAR): Renamed from AC_TRY_EVAL.
(_AC_DO_TOKENS): Renamed from AC_TRY_COMMAND.
2006-05-30 07:28:01 +00:00
Paul Eggert
2d1f047960 * lib/autoconf/status.m4 (AC_OUTPUT_MAKE_DEFS): Rewrite to avoid
the use of 'tr', since this is our only use of 'tr'.
2006-05-30 05:47:40 +00:00
Paul Eggert
dce46f95f4 * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE):
Don't assume 'grep' works on long lines, since AIX grep doesn't.
2006-05-30 05:17:17 +00:00
Ralf Wildenhues
8c65c51bf9 * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Do not use `grep' on
the output file in the `${datarootdir}' test.
2006-05-28 12:51:49 +00:00
Ralf Wildenhues
2a801ac193 * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): If we have not seen
mention of `datarootdir' in the input file(s), but literal
`${datarootdir}' in the output file, and we haven't warned yet,
then warn as well: the user may have (erroneously) used
`AC_SUBST([mydatadir], [$datadir/my])' instead of the correct
`AC_SUBST([mydatadir], ['${datadir}/my'])'.
* tests/torture.at (datarootdir workaround): Extend this test.
* NEWS: Update.
2006-05-28 12:38:49 +00:00
Paul Eggert
43575790ec * NEWS: Reword notice for AC_TRY_COMMAND, AC_TRY_EVAL,
ac_config_guess, ac_config_sub, ac_configure.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
Fix typo that prevented an unnecessary space from being removed.
Problems reported by Ralf Wildenhues in:
http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00143.html
2006-05-27 21:59:04 +00:00
Paul Eggert
7758301cbb Undo previous change. 2006-05-27 03:20:51 +00:00
Paul Eggert
c7ff45a0aa * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG):
Don't test whether getloadavg.c is where it belongs.
2006-05-27 03:03:37 +00:00
Paul Eggert
aa4a2459e6 * doc/autoconf.texi (Particular Programs, Limitations of Usual Tools):
Use better wording to talk about AC_PROG_MKDIR_P's thread-safety.
Don't use the term "thread-safe" to talk about mkdir race
conditions, since the problem is more a process than a thread
issue.  Problem reported by Stepan Kasal in:
http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00088.html
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Use code that mimics
the test for 'install' more closely.  Look at MKDIR_P first.
Look in the PATH, and at /opt/sfw/bin.
Look for a 'gmkdir' program as well (Solaris 10 /opt/sfw/bin/gmkdir).
Don't bother to try mkdir -p, since we already check mkdir --version;
just look at the version number.  (There's no easy way to check
for race-free implementations.)
* tests/tools.at (autoconf: subdirectories): Adjust to above
changes, since MKDIR_P now might end in "/mkdir -p".
2006-05-27 02:54:33 +00:00
Paul Eggert
922c98ee7d * NEWS: Mention that AC_TRY_COMMAND and AC_TRY_EVAL may be removed.
* doc/autoconf.texi (Special Chars in Variables): New section.
(Preset Output Variables): Warn about special chars in CPPFLAGS.
(Installation Directory Variables): Quote $(datadir) better.
(Limitations of Builtins): Describe some of eval's trickiness.
* lib/autoconf/c.m4 (AC_PROG_CC_C_O): Simplify quoting.
* lib/autoconf/fortram.m4 (_AC_PROG_FC_V_OUTPUT): Likewise.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Put leading space
in front of every arg, not just trailing args.  Quote apostrophes.
(_AC_EVAL_ECHO): New macro.
(_AC_EVAL, AC_EVAL_STDERR): Use it.  Quote arg of eval.
(AC_TRY_EVAL, AC_TRY_COMMAND): Mention that these macros might get
removed.
(_AC_LINK_IFELSE): Use proper rule for shell continuation lines,
exposed by quoting of eval argument.  Put the command on line line
so it logs better.
* lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Use eval more safely.
(_AC_PATH_X, AC_PATH_X): Quote more safely.
* lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Use eval more safely.
* lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Don't use eval.
* lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Minor style change.
Handle special chars in prefix, ac_srcdir, ac_aux_dir.
Use eval more safely.
(_AC_OUTPUT_CONFIG_STATUS): Adjust to above changes.
* lib/m4sugar/m4sh.m4 (AS_VAR_GET): Note that this API needs
to be replaced.
* tests/base.at (AC_TRY_COMMAND): Use proper rule for shell continuation
lines, exposed by quoting of eval argument.
2006-05-26 22:29:50 +00:00
Ralf Wildenhues
cf78c7e16e * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Drop the
initialization of `ac_cv_exeext', do not override it if it was
already set, unless it was set to `no', for compatibility with
Autoconf-2.13, and comment this.
Do not export `ac_cv_exeext', Libtool hasn't needed this for years.
(_AC_COMPILER_EXEEXT_DEFAULT): Likewise, do not export it.
(_AC_COMPILER_EXEEXT_WORKS, _AC_COMPILER_EXEEXT_CROSS): Typos.
* doc/autoconf.texi (Compilers and Preprocessors) <EXEEXT>:
Document that this test may be overridden by setting
`ac_cv_exeext'.
2006-05-26 17:25:35 +00:00
Ralf Wildenhues
b336169d61 Revert these two patches:
2006-04-06  Eric Blake  <ebb9@byu.net>
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Inside cache
check, s/ac_exeext/ac_cv_exeext/.  Fixes regression introduced
2006-04-01.

2006-04-01  Stepan Kasal  <kasal@ucw.cz>
Clean up _AC_COMPILER_EXEEXT* macros.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't try to
  detect exeext, it will be done by _AC_COMPILER_EXEEXT_O; just set
  ac_file to the name of the default output file and call
  _AC_COMPILER_EXEEXT_WORKS.  Move the definition of ac_files and the
  initial `rm' of the candidate files...
(_AC_COMPILER_EXEEXT): ... here and simplify them.  Moreover, use
  the same list in subsequent `rm' calls, and for the temporary
  redefinition of ac_clean_files; call _AC_COMPILER_OBJEXT at the end,
  and don't call the other _AC_COMPILER_EXEEXT_* macros directly, use...
(_AC_COMPILER_EXEEXT_TESTS): ... this new macro.
(_AC_COMPILER_EXEEXT_O): Don't export ac_cv_exeext, it's not needed (or
  no longer needed) by libtool.  Make it a cache check.
(_AC_COMPILER_EXEEXT_CROSS): Remove the comment, it was obviously
  copied here by mistake.
(AC_NO_EXECUTABLES): Redefine _AC_COMPILER_EXEEXT_TESTS, not
  _AC_COMPILER_EXEEXT.
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Do not call
  _AC_COMPILER_OBJEXT directly.
* lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
2006-05-26 17:23:02 +00:00
Ralf Wildenhues
0d6c1e5aa0 Sync from Automake:
* lib/Autom4te/XFile.pm (lock): Allow EOPNOTSUPP, besides
ENOLCK.  Only mention `make -j' when applicable.  Only raise
fatal errors when `make -j' is involved.  Improve error message.
2006-05-25 10:25:44 +00:00
Paul Eggert
68ad5f2fcb Fix a bug in the previous patch: it assumed that echo '...\...' had
the BSD interpretation rather than the SysV interpretation.  Use
a short here-document instead.
2006-05-23 23:30:57 +00:00
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
Ralf Wildenhues
6ca1cfdde2 * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): MSYS `ln -s' fails
with a target directory; it's internally implemented as `cp'
anyway, but since Autoconf advertises the possibility to use
a target directory when LN_S is `ln -s', we need to find out.
Reported by Rolf Ebert <rolf.ebert.gcc@gmx.de> against MSYS,
analyzed by Keith Marshall <keith.marshall@total.com>.
2006-04-10 17:55:33 +00:00
Paul Eggert
80c47ff76d * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Just output
confdefs.h as-is.  In general, if it has backslash-newline or the
like, then it doesn't work either to sort or to remove empty
lines.
2006-04-10 09:15:11 +00:00
Alexandre Duret-Lutz
22e04a7d35 * lib/autom4te.in (Automake-preselections): Preselect
_AM_SUBST_NOTMAKE.
2006-04-09 07:54:28 +00:00
Paul Eggert
b71ab86dba Use sort -u rather than echo grep sort. 2006-04-09 06:29:28 +00:00
Paul Eggert
92e830d8a0 * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Use '\'' for an
apostrophe within a single-quoted string, as this is the usual
tradition and is easier to read than '"'"'.  Don't rely on the
shell treating "$/" like '$/'.  Use a more-consistent indenting
style for the trap.
2006-04-09 06:22:28 +00:00
Paul Eggert
309a01c200 Import macros from gnulib (often changing their name).
* NEWS: AC_C_TYPE_LONG_DOUBLE is now obsolete.
New macros AC_CHECK_DECLS_ONCE, AC_CHECK_FUNCS_ONCE,
AC_CHECK_HEADERS_ONCE, AC_FUNC_STRTOLD, AC_HEADER_ASSERT,
AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE,
AC_TYPE_LONG_DOUBLE, AC_TYPE_LONG_DOUBLE_WIDER, AC_TYPE_INT8_T,
AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T,
AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_LONG_INT,
AC_TYPE_UINT8_T, AC_TYPE_UINT16_T, AC_TYPE_UINT32_T,
AC_TYPE_UINT64_T, AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T,
AC_TYPE_UNSIGNED_LONG_LONG_INT, AC_USE_SYSTEM_EXTENSIONS.
The manual mentions Gnulib more prominently.
* doc/autoconf.texi (Gnulib): New node.
(Pointers): Add Gnulib URL.
(Particular Functions): Alphabetize.  Add AC_FUNC_STRTOLD.
(Generic Functions): Add AC_CHECK_FUNCS_ONCE.  Refer to new
Gnulib section.
(Particular Headers): Add AC_HEADER_ASSERT.  For stdbool.h,
suggest a #define rather than a typedef for _Bool, and mention
Gnulib rather than trying to substitute stdbool code.
(Generic Headers): Add AC_CHECK_HEADERS_ONCE.
(Generic Declarations): Add AC_CHECK_DECLS_ONCE.
(Particular Structures): Add AC_STRUCT_DIRENT_D_INO,
AC_STRUCT_DIRENT_D_TYPE.
(Particular Types): Mention stdint.h and inttypes.h as standard
headers too.
Add AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T,
AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_DOUBLE,
AC_TYPE_LONG_DOUBLE_WIDER, AC_TYPE_LONG_LONG_INT, AC_TYPE_UINT8_T,
AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, AC_TYPE_UINT64_T, AC_TYPE_UINTMAX_T,
AC_TYPE_UINTPTR_T, AC_TYPE_UNSIGNED_LONG_LONG_INT.
(C Compiler): Move AC_C_LONG_DOUBLE to ...
(Obsolete Macros): here.  Under AC_LONG_DOUBLE, mention
AC_TYPE_LONG_DOUBLE or AC_TYPE_LONG_DOUBLE_WIDER instead.
(Posix Variants): Add AC_USE_SYSTEM_EXTENSIONS.
(Coding Style).  Don't mention m4_expand_once.
* lib/autoconf/c.m4 (AC_C_LONG_DOUBLE): Implement via
AC_TYPE_LONG_DOUBLE_WIDER.  Now obsolete.
* lib/autoconf/functions.m4 (_AH_CHECK_FUNCS): New macro.
(AC_CHECK_FUNCS): Use it.
(AC_CHECK_FUNCS_ONCE, AC_FUNC_STRTOLD): New macros.
(AC_FUNC_WAIT3): "the Open Group standards" -> "POSIX".
* lib/autoconf/general.m4 (AC_CHECK_DECLS_ONCE): New macro.
* lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): New macro.
(AC_HEADER_ASSERT): New macro.
(AC_HEADER_STDBOOL): Don't assume "#error" works.
Catch a bug in IBM AIX xlc compiler version 6.0.0.0.
Catch a bug in an HP-UX C compiler.
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): New macro.
* lib/autoconf/types.m4 (AC_TYPE_INTMAX_T. AC_TYPE_UINTMAX_T):
(AC_TYPE_INTPTR_T, AC_TYPE_UINTPTR_T. AC_TYPE_LONG_DOUBLE):
(AC_TYPE_LONG_DOUBLE_WIDER, AC_C_LONG_DOUBLE, AC_TYPE_LONG_LONG_INT):
(AC_TYPE_UNSIGNED_LONG_LONG_INT, _AC_TYPE_INT, _AC_TYPE_UNSIGNED_INT):
(_AC_STRUCT_DIRENT, AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE):
New macros.
2006-04-08 21:46:03 +00:00
Stepan Kasal
70d428506b * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Fix the wording
of the warning introduced by the 2001-08-28 change.
2006-04-08 17:59:56 +00:00
Ralf Wildenhues
115e3bf448 * lib/autoconf/general.m4 (AC_CACHE_SAVE): All `ac_cv_env_foo'
variables shall be overriden by the cache.
* tests/torture.at (AC_ARG_VAR): Test also with a first value
that contains braces.
2006-04-08 09:07:05 +00:00
Ralf Wildenhues
9e365d1e0b Revert the patch from 2006-04-01 and only improve
_AS_DETECT_BETTER_SHELL:

* lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Do not optimize; do not
skip nonexistent directories.
(_AS_DETECT_BETTER_SHELL): The optimization is moved here--try
only shell candidates which exist.
(AS_UNAME): No need to give three parameters to _AS_PATH_WALK.
* lib/autotest/general.m4 (AT_INIT): No need to give three
parameters to _AS_PATH_WALK.
2006-04-07 18:31:09 +00:00
Stepan Kasal
67b61ef700 Revert my change from 2006-03-17, in other words:
* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Insert BIN_SH=xpg4
  and DUALCASE=1.
(AS_SHELL_SANITIZE): Remove DUALCASE=1.
* doc/autoconf.texi (Special Shell Variables) <BIN_SH>: Say that
  it is set.
2006-04-07 18:00:55 +00:00
Ralf Wildenhues
67070903a4 * doc/autoconf.texi (Programming in M4sh): Document that
AS_MKDIR_P exits the script on failure.
* lib/autotest/general.m4: Remove redundant AS_ERROR.
2006-04-07 12:33:04 +00:00
Ralf Wildenhues
df756e0046 * lib/Autom4te/FileUtils.pm, lib/Autom4te/Struct.pm: Sync
from Automake.
2006-04-06 22:39:22 +00:00
Stepan Kasal
2387e2b98a * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Inside cache
check, s/ac_exeext/ac_cv_exeext/.  Fixes regression introduced
2006-04-01.
2006-04-06 18:34:24 +00:00
Ralf Wildenhues
31d0e60498 * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Fix the detection of
whether `set' quotes correctly: redirect stderr of the tested
`set', and use a subshell, for Ultrix; use `sed' instead of
`grep' for zsh `set' which may write binary output; match only
at the beginning of a line, to avoid false positives.
In order to avoid false positives by unrelated variables with
multiline content, put the dump algorithm in a subshell and
unset all variables containing newlines (except some which are
special to the shell).  Warn about cache variables that are
unset.
2006-04-06 18:16:56 +00:00
Ralf Wildenhues
d209422b6b * Makefile.maint (sc_cast_of_argument_to_free): Do not fail when
no file matches the glob, discard the warning, set `nullglob'.
(syntax-check): Likewise.
(sc_cast_of_x_alloc_return_value): Likewise.
(sc_cast_of_alloca_return_value, sc_error_exit_success)
(sc_prohibit_jm_in_m4, .re-list, sc_unmarked_diagnostics)
(m4-check): Likewise.
(sc_system_h_headers): Do not print rule on execution.
(sc_tight_scope): Do not fail for non-existing `src' directory.
(sc_changelog): Skip the Copyright footer.
* lib/autoconf/lang.m4: Remove trailing space.
2006-04-06 17:43:52 +00:00
Ralf Wildenhues
4686c69e0f * lib/autoconf/status.m4: More replacements to
<tab><space> where this makes sense.
2006-04-06 17:38:05 +00:00
Stepan Kasal
736ed9a5ae * lib/autoconf/status.m4 (_AC_CONFIG_FOOS): Append TAGS to
ac_config_<foo>s again, sometimes normalized, sometimes not.
(AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS, AC_CONFIG_COMMANDS):
  Do not do so here.
(_AC_CONFIG_REGISTER_DEST): Double quote the tags in macros _AC_LIST_TAGS
  and_AC_LIST_TAG_COMMANDS; fixes another regression introduced by the
  2005-07-25 rewrite.  Noticed by Noah Misch.
2006-04-06 15:07:59 +00:00
Stepan Kasal
b2d1fdf998 * lib/autoconf/general.m4 (AC_PRESERVE_HELP_ORDER): Do not define
_AC_PRESERVE_HELP_ORDER, ...
(AC_ARG_ENABLE, AC_ARG_WITH): ... use AC_PROVIDE_IFELSE insetad.
2006-04-06 13:49:08 +00:00
Stepan Kasal
19de93e293 * lib/autoconf/general.m4 (AC_ARG_VAR): Do not use m4_divert_once
inside m4_expand_once; it is redundant.
2006-04-06 12:16:38 +00:00
Stepan Kasal
aa4ad131b5 * lib/autoconf/general.m4 (_AC_INIT_HELP): Remove the broken support
for --help from Cygnus `configure.'
2006-04-06 11:33:52 +00:00
Stepan Kasal
d10fd094fa Revert this (for now):
| * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Call
|   _AC_COMPILER_EXEEXT instead of m4_expand_once([_AC_COMPILER_EXEEXT])
| * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
| * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_TESTS): On subsequent
|   calls, for a new language, only check that the compiler works.
| (AC_NO_EXECUTABLES): Change the redefinition of
|   _AC_COMPILER_EXEEXT_TESTS so that on subsequent calls, it checks
|   that the new language's compiler works if ac_no_link=no, and
|   does nothing otherwise.
2006-04-06 11:24:00 +00:00
Paul Eggert
ee81d1d102 Change <space>''<tab> to <tab><space> where that makes sense. 2006-04-06 02:28:56 +00:00
Noah Misch
a04993aa1d * lib/autoconf/general.m4 (AC_PRESERVE_HELP_ORDER): New macro.
(AC_ARG_ENABLE, AC_ARG_WITH): Adjust.
* doc/autoconf.texi (Help Formatting): New node.
* NEWS: Announce AC_PRESERVE_HELP_ORDER.
2006-04-05 22:41:36 +00:00
Ralf Wildenhues
73b45d6e4b * TODO, config/Makefile.am, lib/freeze.mk, lib/autoconf/c.m4,
lib/autoconf/specific.m4, lib/autoconf/status.m4,
lib/autoconf/types.m4, lib/autotest/general.m4,
tests/mktests.sh, tests/torture.at: White space cleanup:
remove some SPACE before TAB, or add quoting ('' or @&t@).
2006-04-05 20:55:14 +00:00
Ralf Wildenhues
f55b0f0d79 * lib/autotest/general.m4 (AT_INIT): Prep AT_*_all, so that an
empty test suite works.
* tests/autotest.at (Empty test suite): Remove xfail.
2006-04-05 16:04:22 +00:00
Noah Misch
7c8b18229e * lib/autoconf/status.m4 (_AC_CONFIG_FOOS): Do not append normalized
TAGS to ac_config_<foo>s.
(AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS): Do so here.
(AC_CONFIG_COMMANDS): Append NAME to ac_config_commands without
normalizing it, consistent it with previous releases.
* tests/torture.at (Macro calls in AC_CONFIG_COMMANDS tags): New test.
2006-04-05 14:20:37 +00:00
Paul Eggert
cf298164fe * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR, AS_DIRNAME_EXPR):
Use simplified args that Eric Blake originally suggested.
2006-04-05 08:01:04 +00:00
Noah Misch
775f230c39 * lib/autoconf/general.m4 (_AC_INIT_HELP): Only `configure.in' evidences
a subdirectory subject to Cygnus `configure'.
* lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Likewise.

* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Omit the bug
report request when we have no AC_PACKAGE_BUGREPORT.
2006-04-04 16:13:47 +00:00
Ralf Wildenhues
7ff8451f9e * lib/autoconf/c.m4 (AC_C_INLINE): Do not skip cleanup code.
(AC_C_RESTRICT): Likewise.  Furthermore, add a function with a
typedef'ed restricted pointer, to catch a compiler bug on
HP-UX 11.x, and fix warnings so it passes with -Werror.
(_AC_PROG_CC_C99): Likewise.
Reported by Albert Chin <china@thewrittenword.com>.
* tests/mktests.sh: Do not skip AC_C_INLINE, AC_C_RESTRICT.
2006-04-03 19:09:55 +00:00
Noah Misch
bb393e107a * lib/autoconf/general.m4 (AC_CACHE_SAVE): Use AC_MSG_NOTICE. 2006-04-03 13:51:02 +00:00
Ralf Wildenhues
5efb21aa55 * lib/autotest/general.m4 (AT_INIT): Add `at_testdir' to pointer
to log, point to testsuite output tree.
2006-04-03 04:47:02 +00:00
Paul Eggert
a71c24a704 * NEWS: AC_PROG_CC and AC_PROG_CXX no longer declare 'exit'.
* doc/autoconf.texi (Function Portability): Mention that C++
has trouble with 'exit'.
(Guidelines): Test programs shouldn't use 'exit'.
* lib/autoconf/c.m4 (_AC_PROG_CXX_EXIT_DECLARATION):
Remove; all uses removed.
(AC_LANG_INT_SAVE(C), AC_C_BIGENDIAN):
Return from 'main' instead of calling 'exit'.
* lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_CLOSEDIR_VOID):
(_AC_FUNC_FNMATCH_IF, AC_FUNC_GETGROUPS):
(AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, _AC_FUNC_MALLOC_IF):
(AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP, _AC_FUNC_REALLOC_IF):
(AC_FUNC_SETPGRP, _AC_FUNC_STAT, AC_FUNC_STRTOD, AC_FUNC_STRERROR_R):
(AC_FUNC_STRNLEN, AC_FUNC_SETVBUF_REVERSED, AC_FUNC_UTIME_NULL):
(_AC_FUNC_FORK, _AC_FUNC_VFORK, AC_FUNC_WAIT3): Likewise.
* lib/autoconf/headers.m4 (AC_HEADER_STDC): Likewise.
* lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise.
* lib/autoconf/types.m4 (AC_TYPE_GETGROUPS): Likewise.
* tests/compile.at: Likewsie.
2006-04-03 03:18:39 +00:00
Paul Eggert
c2286019bf * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Call
_AC_COMPILER_EXEEXT instead of m4_expand_once([_AC_COMPILER_EXEEXT])
* lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_TESTS): On subsequent
  calls, for a new language, only check that the compiler works.
(AC_NO_EXECUTABLES): Change the redefinition of
  _AC_COMPILER_EXEEXT_TESTS so that on subsequent calls, it checks
  that the new language's compiler works if ac_no_link=no, and
  does nothing otherwise.
2006-04-02 16:38:54 +00:00
Stepan Kasal
e5c9d58fcb Add _AS_DIRNAME_PREPARE to _AS_PREPARE. 2006-04-01 22:55:15 +00:00
Stepan Kasal
c8514d3a3a Do not optimize the first _AS_PATH_WALK. 2006-04-01 22:53:04 +00:00
Stepan Kasal
2a7aa88566 Clean up _AC_COMPILER_EXEEXT* macros. 2006-04-01 21:45:13 +00:00
Stepan Kasal
2af85b096a _AS_DIRNAME_PREPARE 2006-04-01 20:06:12 +00:00
Stepan Kasal
a7ee4bb357 back out _AS_DIRNAME_PREPARE 2006-04-01 19:54:55 +00:00
Stepan Kasal
0435cce62a _AS_DIRNAME_PREPARE 2006-04-01 19:48:14 +00:00
Stepan Kasal
784f54dfcd Fix typos. 2006-04-01 19:38:07 +00:00
Stepan Kasal
6f39626778 _AS_PATH_WALK: Skip nonexistent dirs, unless told otherwise. 2006-04-01 18:32:10 +00:00
Stepan Kasal
a9b857317c Sort the macros and fix typos. 2006-04-01 18:26:46 +00:00
Stepan Kasal
29e314f91f Improve --version output for old-style AC_INIT 2006-04-01 18:16:05 +00:00
Stepan Kasal
70c31ba6dc autoreconf: impement -vv 2006-04-01 18:09:07 +00:00
Stepan Kasal
1a74a211bc Be tolerant if rm was not able to remove the test directory. 2006-04-01 16:09:13 +00:00
Stepan Kasal
713895ae5c More autoupdate issues. 2006-04-01 15:57:02 +00:00
Paul Eggert
e4913c88f3 * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR): Handle ///, ////, etc.
correctly.  Problem reported by Eric Blake.
(_AS_EXPR_PREPARE): Detect Tru64 expr bug.  Problem reported by
Ralf Wildenhues.
2006-03-31 18:46:47 +00:00
Ralf Wildenhues
ff15ef7a2c * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Quote
`$0' to protect against spaces.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Likewise, for
`$0', $as_me.
2006-03-27 17:42:17 +00:00
Stepan Kasal
f8d9179d74 . 2006-03-21 17:50:11 +00:00
Ralf Wildenhues
96aa2c31b2 * lib/autoconf/c.m4 (AC_LANG(Objective C), AC_LANG_OBJC)
(_AC_LANG_ABBREV(Objective C), _AC_LANG_PREFIX(Objective C))
(AC_LANG_SOURCE(Objective C), AC_LANG_PROGRAM(Objective C))
(AC_LANG_CALL(Objective C), AC_LANG_FUNC_LINK_TRY(Objective C))
(AC_LANG_BOOL_COMPILE_TRY(Objective C))
(AC_LANG_INT_SAVE(Objective C), AC_LANG_PREPROC(Objective C))
(AC_PROG_OBJCPP, AC_LANG_COMPILER(Objective C), AC_PROG_OBJC)
(_AC_PROG_OBJC_G): New macros.
(_AC_ARG_VAR_CPPFLAGS): Adjusted.
* doc/autoconf.texi (Objective C Compiler): New node.
(Preset Output Variables): Document OBJCFLAGS.
(Language Choice): Document `Objective C' language.
(Fortran Compiler): Fix typo.
* NEWS: Updated.
Inspired by a patch from David M. Lloyd <dmlloyd@tds.net>.
2006-03-20 20:28:55 +00:00
Stepan Kasal
2ea44d31c2 typos 2006-03-20 14:46:12 +00:00
Stepan Kasal
8900df9ae0 * lib/autoconf/programs.m4 (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS):
Factor out the warning to...
	(_AC_TOOL_WARN): ... this new macro; use `cross_compiling'.
	* tests/local.at (AT_CHECK_MACRO_CROSS): Avoid this warning.
	* tests/semantics.at (AC_C_BIGENDIAN): Likewise.
2006-03-17 20:37:26 +00:00
Stepan Kasal
13324b1dfd Removed BIN_SH=xpg4, moved DUALCASE=1 to AS_SHELL_SANITIZE. 2006-03-17 19:32:53 +00:00
Stepan Kasal
8219ba6af6 do not check for ac_delim 2006-03-17 19:19:16 +00:00
Stepan Kasal
d2d7871702 (_AC_PATH_PROG): Store the result to VARIABLE. 2006-03-17 19:05:27 +00:00
Ralf Wildenhues
c5982aeff4 * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Prepend
the directory `/usr/bin/posix' in the shell search, to prefer
the Posix shell not only in subsequent spawns as with `$BIN_SH'
on Tru64.
2006-03-17 17:09:21 +00:00
Stepan Kasal
a7791c7782 Move the IFS setup and CDPATH sanitizing to AS_SHELL_SANITIZE. 2006-03-16 13:33:18 +00:00
Ralf Wildenhues
6f4a6a0740 * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Do not forget to reset
IFS even in case of empty `$PATH'.
2006-03-14 07:18:18 +00:00
Ralf Wildenhues
e1d5a93433 * lib/autotest/general.m4 (AT_INIT) <at_optarg>: Optimize
`expr' away if there is nothing to do.
< --keywords >: Simplify and robustify argument handling.
Revert erroneous comment from 2005-08-23.  Extend to allow
keyword negation with `!'.
Update help message.  Remove broken code to prevent running
tests multiple times.
* doc/autoconf.texi (testsuite Invocation) < --keywords >:
Update and fix the documentation accordingly.
* tests/autotest.at (Keywords): Renamed to..
(Keywords and ranges): .. this.  Extended to make sure negated
keywords, keywords taken from AT_SETUP arguments, and numeric
test ranges work, and that matching is case-insensitive.
2006-03-12 19:58:31 +00:00
Ralf Wildenhues
17bb2b9ac8 * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): Use a typedef to
allow to pass unnamed structs even in C++.
(AC_CHECK_SIZEOF):  Likewise.
Also fix quoting error in `AC_MSG_FAILURE' arguments.
* tests/semantics.at (AC_CHECK_ALIGNOF struct, AC_CHECK_SIZEOF
struct): New tests for unnamed structs, each both native and
cross-compiling.
2006-03-11 13:22:42 +00:00
Ralf Wildenhues
c8ad4b48ac * lib/autoconf/c.m4 (AC_C_TYPEOF): Use typedef to avoid defining
a structure inside a cast, for C++ conformance.
* lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Likewise.
Also fix quoting error in `AC_MSG_FAILURE' arguments.
2006-03-11 13:21:32 +00:00
Ralf Wildenhues
4bed79349d * lib/autoconf/c.m4 (AC_PROG_CC_STDC): If we cannot enable C99
nor C89 mode, set `$ac_cv_prog_cc_stdc' to `no' instead of
trying to execute the command `no'.
2006-03-11 13:20:14 +00:00
Ralf Wildenhues
df1fe4b493 * lib/autoconf/lang.m4 (AC_LANG_CONFTEST): AC_DEFUN this, not
m4_define, so that the requirements of `AC_INCLUDES_DEFAULT' are
expanded outside.
2006-03-11 13:17:23 +00:00
Ralf Wildenhues
2602ca4aa5 * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): The limit for
HP-UX sed is 99 commands, not 100.
(_AC_OUTPUT_FILES_PREPARE): Do not count the `}' of an
_AC_SUBST_FILES fragment.  Separate `{' and `r' commands by
newline for portability.
* tests/torture.at (Torturing config.status): Also test 100
AC_SUBST_FILE invocations.  Fix test to actually verify the
AC_CONFIG_FILES output.
* doc/autoconf.texi (Limitations of Usual Tools): Document HP-UX
command, label, and read-file `r' limits.  Unify HP-UX spelling.
2006-03-06 22:34:34 +00:00
Paul Eggert
2e38fe93be * lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): New macro.
(AT_INIT): Use it, to remove arbitrary limit of 999,999 test
cases, and to work around Tru64 expr bug.
* doc/autoconf.texi (Limitations of Usual Tools): Mention Tru64
expr bug that turns the result of a regex match into a number if
possible.
2006-03-05 08:29:49 +00:00
Ralf Wildenhues
5c8afca5a6 * lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Work around
HPUX compiler bug, similarly to AC_CHECK_SIZEOF, as documented
in section `Specific Compiler Characteristics'.
2006-03-04 17:28:34 +00:00
Paul Eggert
3ddd7fba50 * lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Avoid unused
variable warning.
2006-03-03 20:41:40 +00:00
Ralf Wildenhues
f4d628245a * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Force correct
order of variable initialization, so even the Solaris 2.6 shell
can create a config header correctly.  Fixes lots of test suite
failures.
2006-03-01 19:54:33 +00:00
Paul Eggert
c53065d39a * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Fix typo:
XrmInitialize (0) -> XrmInitialize ().
Reported by Toshio Kuratomi.
2006-02-22 19:37:40 +00:00
Ralf Wildenhues
a628e04465 * lib/m4sugar/m4sh.m4 (AS_IF): Extend to allow more than one
test, as in `if tests; then cmd1; elif ...; else ...; fi'.
* doc/autoconf.texi (Programming in M4sh): Adjusted.
* tests/m4sh.at (AS_IF and AS_CASE): Test this.  Also make sure
both macros are defun'ed so that required macros are evaluated
outside.
2006-02-21 09:30:01 +00:00
Ralf Wildenhues
5ff8a3d39a * lib/autoconf/general.m4 (_AC_LIBOBJ): Minor optimization. 2006-02-21 07:16:33 +00:00