Commit Graph

128 Commits

Author SHA1 Message Date
Stepan Kasal
9655f04da2 * lib/autoconf/status.m4: Quote ``$tmp'' in many places.
* lib/m4sugar/m4sh.m4 (AS_TMPDIR): Fix the comment, as traps are
  no longer part of the macro, quote the occurrence of ``$tmp''.
* doc/autoconf.texi (Forbidden Patterns): Typo.
2004-12-21 14:24:01 +00:00
Paul Eggert
1a135aaa8d * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): New macro.
(_AT_CHECK): Use it.
* lib/m4sugar/m4sh.m4 (AS_ESCAPE_FOR_EXPAND): Remove.
(AS_ESCAPE): Fix comment.
* tests/autotest.at: Adjust section banner comments.
(AT_CHECK_AT): Accept STATUS and STDERR.
(AT_CHECK_AT_TEST): Likewise.
(Invalid brace-enclosed parameter expansion)
(Multiline command from M4 expansion)
(Double-M4-quoted command): New tests.
2004-12-19 14:25:56 +00:00
Stepan Kasal
04c2cc1dbc * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Fix comment. 2004-12-17 14:41:16 +00:00
Paul Eggert
a090c3988a * lib/m4sugar/m4sh.m4 (AS_EXECUTABLE_P): Use test -f && test -x
on platforms where it works.
(_AS_TEST_PREPARE): Test for ``test -x''.
(_AS_BROKEN_TEST_PREPARE): Nuke.
2004-12-13 18:22:55 +00:00
Paul Eggert
5d3ad5cb5a * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Move the trap commands ...
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): ... here;
  give only 4-letter prefix to AS_TMPDIR, comment fixed.
* lib/autoconf/programs.m4 (_AC_PATH_PROG_FEATURE_CHECK): Don't
  create the temporary directory.
  (_AC_FEATURE_CHECK_LENGTH): Work in current directory.
2004-12-13 17:58:03 +00:00
Paul Eggert
04dcf25d6e * bin/.cvsignore: Add autoconf.in.
* tests/.cvsignore: Add wrapper.in.

* man/Makefile.am (autoconf.1): Regenerate when `autoconf.as' changes.

* lib/autotest/general.m4 [--trace] (AT_INIT): Do not `set -v'.

* tests/autotest.at: New file.
* tests/suite.at: Include it.
* tests/Makefile.am: Distribute it.

* lib/autotest/general.m4 [--trace] (_AT_CHECK): Do not enable
  shell tracing on a command that could contain multiple lines.
* doc/autoconf.text: Document that fact and its implications.
* lib/m4sugar/m4sh.m4 (AS_ESCAPE_FOR_EXPAND): New macro.
* tests/autotest.at (Multiline backquote command substitution,
  Multiline parameter expansion, Literal multiline command,
  Multiline parenthetical command substitution): Remove XFAIL.
2004-12-10 07:08:52 +00:00
Paul Eggert
76da3417c6 * HACKING: Refer to "coreutils", not "File, Shell or Text utils".
* lib/m4sugar/m4sh.m4 (AS_HELP_STRING): A typo in the comment.
2004-11-29 04:34:31 +00:00
Paul Eggert
37d938763a (_AS_TEST_PREPARE): Fix a typo. 2004-11-14 06:35:21 +00:00
Paul Eggert
6b1c07685a Use "file name" rather than "filename" or "path",
to be consistent with the terminology of the GNU coding standards.
2004-08-20 19:58:06 +00:00
Paul Eggert
df0eea46f0 (_AS_BOURNE_COMPATIBLE): Set BIN_SH, for Tru64. 2004-07-29 22:28:54 +00:00
Paul Eggert
c652094d91 Use "set -o posix" with pdksh, too. 2004-07-27 20:15:15 +00:00
Paul Eggert
8dcb87fb42 * lib/m4sugar/m4sh.m4:
Don't fail if ENV, MAIL, MAILPATH, LC_ALL, etc. are read only.
2004-06-24 15:00:29 +00:00
Paul Eggert
c41d505cbc * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): If the shell is
zsh, disable GLOB_SUBST.
2004-06-24 07:07:39 +00:00
Paul Eggert
39afca425e Don't default to /bin/sh. 2004-05-03 03:49:22 +00:00
Paul Eggert
42970c489e (_AS_DETECT_BETTER_SHELL): Consult $SHELL last, not first. 2004-05-03 03:47:19 +00:00
Paolo Bonzini
7c1b2b4c78 * lib/m4sugar/m4sh.m4 (M4SH-SANITIZE): New diversion.
(AS_INIT): Output shell initialization there. Removed optional
parameter. Expand _AS_SHELL_FN_SPY.
(AS_INIT_WITH_SHELL_FN): Removed.
(_AS_SHELL_FN_SPY): New macro.
(AS_DETECT_REQUIRED, AS_DETECT_SUGGESTED): New
macros.
(AS_SHELL_SANITIZE): Remove loop to find better shell
and documentation for the parameter.
(_AS_DETECT_BETTER_SHELL): Move it here.
(_AS_SHELL_FN_WORK): Remove shell invocation, reformat.
(_AS_RUN): Move it here, support testing with eval.
(AS_REQUIRE_SHELL_FN): Require shell functions when
it is used.
(_AS_LINENO_WORKS): Put around braces, we do not
trigger the bash bug anymore.
* lib/autotest/general.m4: Document M4SH-SANITIZE, do not
use AS_INIT_WITH_SHELL_FN.
* bin/autoconf.in, tests/wrapper.in: Regenerated.
2004-01-30 14:29:18 +00:00
Paul Eggert
3cbad6e408 * lib/m4sugar/m4sh.m4 (AS_MKDIR_P):
Test for dir before calling mkdir -p.  (trivial changes)
* doc/autoconf.texi: Document this.
2004-01-14 20:27:30 +00:00
Paul Eggert
c1556b819b Speed up sed scripts by doing lineno substitution only on lines with "$LINENO". 2004-01-05 07:43:48 +00:00
Paul Eggert
12475c8947 Replace "rm -rf" and "rm -fr" with "rm -f -r", as POSIX requires. 2004-01-05 07:05:22 +00:00
Paolo Bonzini
063d705adf 2003-12-03 Paolo Bonzini <bonzini@gnu.org>
* lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Redirect
        stderr to /dev/null.
        * bin/autoconf.in: Regenerate.
        * bin/wrapper.in: Regenerate.
2003-12-25 15:43:01 +00:00
Paolo Bonzini
0723ac047b 2003-11-26 Paolo Bonzini <bonzini@gnu.org>
* lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE):
        Extracted from AS_SHELL_SANITIZE.
        (_AS_SHELL_FN_WORK, AS_INIT_WITH_SHELL_FN): New
        macros.
        (AS_SHELL_SANITIZE): Move reinvocation code from
        _AS_LINENO_WORKS, use it to find out if shell
        functions work.
        (_AS_LINENO_WORKS): Don't find another shell if $LINENO
        does not work.
        (AS_INIT): Pass parameter down to AS_SHELL_SANITIZE.
        (AS_REQUIRE_SHELL_FN): Test that AS_INIT_WITH_SHELL_FN
        was called.
        * lib/autotest/general.m4: Use AS_INIT_WITH_SHELL_FN.
        * bin/autoconf.in: Regenerate.
        * tests/wrapper.in: Regenerate.
        * tests/tools.at: Test the syntax of tests/autoconf
        and tests/testsuite.
2003-11-27 10:04:12 +00:00
Paolo Bonzini
f2193aa86c 2003-11-24 Paolo Bonzini <bonzini@gnu.org>
* lib/m4sugar/m4sh.m4 (AS_REQUIRE_SHELL_FN): New macro.
        * tests/m4sh.at (AS_REQUIRE_SHELL_FN and m4_require): New test.

Approved by Paul Eggert.
2003-11-24 10:44:52 +00:00
Alexandre Duret-Lutz
727294e819 * lib/autoconf/status.m4 (_AC_SRCPATHS): Fix use of AS_SET_CATFILE
so that ac_abs_builddir, ac_abs_top_builddir, ac_abs_srcdir,
and ac_abs_top_srcdir are absolute paths.
* lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): Remove misleading comment.
2003-11-05 11:58:43 +00:00
Akim Demaille
610c228914 AC_CONFIG_FILE([d1/foo:d2/foo]) triggers error messages when
computing the absolute path to d1 in the source hierarchy: it may
not exist at all.  So don't cd into it.
From Alexandre Duret-Lutz.
http://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00205.html
* lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): New.
From Paul Eggert, but named after Perl's IO::Spec->catfile.
* doc/autoconf.texi (Programming in M4sh): Document.
* lib/autoconf/status.m4 (_AC_SRCPATHS): Use it.
2003-11-04 08:32:06 +00:00
Paul Eggert
828da4a04c Use 'eval', so that the resulting configure scripts work even if
the current directory has a weird file name like 'y%s+%pp%;s%@%_%g'.
2003-10-20 23:24:37 +00:00
Paul Eggert
fb37a3ec82 Work around a bug in pdksh 5.2.14.
Document ksh better.
2003-10-15 22:56:22 +00:00
Paul Eggert
69460e86e0 (_AS_MKDIR_P_PREPARE): Change "rm -fr ./-p" to "test -d ./-p && rmdir ./-p". 2003-09-28 19:02:41 +00:00
Paul Eggert
857ba94761 (AS_SHELL_SANITIZE): Set DUALCASE=1, for MKS sh. 2003-09-28 18:53:50 +00:00
Paul Eggert
403b1490b8 (_AS_MKDIR_P_PREPARE): If mkdir -p . fails,
rm -fr ./-p to remove junk left behind on NextStep and OpenStep.
2003-09-26 08:24:30 +00:00
Paul Eggert
a0efe16f10 (_AS_UNSET_PREPARE): Work around a bug in Bash 2.01. Problem reported
by Brian Gough in
<http://mail.gnu.org/archive/html/bug-autoconf/2003-07/msg00106.html>.
2003-08-01 01:10:58 +00:00
Paolo Bonzini
2f7d336646 * lib/m4sugar/m4sh.m4: actually use the 2nd parameter to AS_REQUIRE 2003-05-22 21:39:45 +00:00
Akim Demaille
3cb00cdb8b * aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4,
* lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4,
* lib/autoconf/c.m4, lib/autoconf/fortran.m4,
* lib/autoconf/general.m4, lib/autoconf/headers.m4,
* lib/autoconf/lang.m4, lib/autoconf/libs.m4,
* lib/autoconf/programs.m4, lib/autoconf/specific.m4,
* lib/autoconf/status.m4, lib/autoconf/types.m4,
* lib/autotest/general.m4, lib/m4sugar/m4sugar.m4,
* tests/atspecific.m4, tests/base.at, tests/compile.at,
* tests/foreign.at, tests/m4sh.at, tests/semantics.at,
* tests/tools.at, tests/torture.at:
Whitespace clean up.
Suggested by Jim Meyering.
2003-05-22 13:24:04 +00:00
Paolo Bonzini
f16c8d206e * lib/m4sugar/m4sh.m4: protect RHS of AS_VAR_SET against expansion of
quotes (it is delayed to after the eval).
2003-05-21 19:04:41 +00:00
Akim Demaille
8624a70899 * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): s/FOO/as_foo/ to avoid
user name space clashes.
Reported by Bruno Haible.
2003-05-16 09:59:15 +00:00
Derek Price
ed71ef7fc3 * lib/autoconf/general.m4 (AC_ARG_VAR): Use AS_HELP_STRING instead of
obsolete AC_HELP_STRING.
(AC_HELP_STRING): AU_DEFUN to...
* lib/m4sugar/m4sh.m4 (AS_HELP_STRING): ...here.
* tests/m4sh.at (AS_HELP_STRING): New test.

* tests/acgeneral.at: Regenerated.
2003-03-27 13:18:34 +00:00
Paul Eggert
36685d590f (AS_SHELL_SANITIZE): Fix typo in
2002-09-01 patch by replacing "test -n" with "test -z".
This fixes a bug reported by Tom Epperly in
<http://mail.gnu.org/archive/html/autoconf/2003-02/msg00139.html>.
2003-02-25 06:45:05 +00:00
Paul Eggert
11894d8bfc (AS_SHELL_SANITIZE): Set the following variables,
too: LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_MONETARY,
LC_NAME, LC_PAPER, LC_TELEPHONE.
2002-11-05 07:09:14 +00:00
Akim Demaille
f77ff8f591 * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted
characters is a back as an `obsolete' warning now.
Reported by Ralf Corsepius.
2002-10-29 08:06:36 +00:00
Akim Demaille
33c894c0bf * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted
characters is a syntax warning now.
(_AS_QUOTE): Accept $2 as list of characters to quote.
* lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD):
Quote for Perl, not sh.
* bin/autoheader.in: When $debug, report the file which is
`do'ne.
* tests/tools.at (autom4te, autoheader): Exercise @bar, not merely
`@', to tickle Perl's lists.
Reported by Carlos Velasco.
2002-10-22 08:20:19 +00:00
Akim Demaille
7260b1d3c2 * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Use $$ in the
file name to enable parallel executions.
From Sam Varshavchik.
2002-10-11 09:49:31 +00:00
Akim Demaille
9a56bdde71 * doc/autoconf.texi (Limitations of Usual Tools): Some about mv
from /tmp.
Thanks to Bill Moseley and Paul Eggert.
* lib/m4sugar/m4sh.m4 (AS_TMPDIR): $2 is the directory into which
the tmpdir must be created.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Have the tmp
dir be in the build tree, instead of $TMPDIR.
2002-09-27 08:20:26 +00:00
Paul Eggert
24e7c10e7f (AS_SHELL_SANITIZE): Unset ENV, MAIL,
MAILPATH and set PS1, PS2, PS4 to default values, to work
around bug in pre-3.0 UWIN ksh reported by Bruce Lilly.
For LC_ALL etc, first try to set to "C" as POSIX requires and as
the Autoconf documentation specifies; fall back to "unset" only if
this fails.  Use a shell for-loop for this rather than an m4 loop,
to shorten the output script.
2002-09-01 08:24:04 +00:00
Paul Eggert
f27d2995ab (AS_SHELL_SANITIZE): Use AS_UNSET instead
of rolling our own unset.
(_AS_PREPARE): $as_unset CDPATH instead of AS_UNSETting it, since
in practice we needn't worry about CDPATH if unset doesn't work.
2002-08-31 05:48:04 +00:00
Paul Eggert
a8ead8a326 (_AS_PATH_SEPARATOR_PREPARE):
Use PATH="/nonexistent;.", not PATH=".;.", as FreeBSD ksh2002
apparently treats PATH="nonexistent" as if it contained ".".
Bug reported by Stefan `Sec' Zehl.
2002-07-23 22:17:19 +00:00
Paul Eggert
dd756ac977 Minor spelling and grammar fixes. 2002-04-20 06:09:01 +00:00
Akim Demaille
ac07b92899 Comment changes. 2002-04-10 17:36:45 +00:00
Akim Demaille
9d658eddd9 * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Install the Zsh
workaround for ${1+"$@"}.
* doc/autoconf.texi (Shell Substitutions): Explain it.
From Oliver Kiddle and Peter Stephenson.
Have M4sh perform minimal shell sanitizing.
* lib/m4sugar/m4sh.at (AS_SHELL_SANITIZE): Split the `_AS_PREPARE_*'
part into...
(_AS_PREPARE): this new macro.
(AS_PREPARE): New.
(AS_INIT): Invoke AS_SHELL_SANITIZE.
* tests/m4sh.at (AT_DATA_LINENO): Use _AS_PREPARE.
Adjust Autoconf and Autotest.
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Don't invoke
AS_SHELL_SANITIZE, AS_INIT did it, but invoke AS_PREPARE.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
Invoke _AS_PREPARE (not AS_PREPARE) in addition to
AS_SHELL_SANITIZE.
Use this M4sh to generate Autoconf's shell scripts.
* tests/wrapsh.as: New, precursor of wrapsh.in.
* tests/Makefile.am: Include lib/freeze.mk to get the dependencies
on Autotest and M4sh.
($(TESTSUITE)): Use $(autotest_m4f_dependencies).
(wrapsh.in): New target.
* bin/autoconf.as: New, precursor of autoconf.in.
(autoconf.in): New target.
2002-04-10 15:58:19 +00:00
Andreas Schwab
193f800800 * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Only simplify if path
contains no literal separators.
2002-04-04 13:35:05 +00:00
Akim Demaille
3aec90e1cb * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Invoke
_AS_MKDIR_P_PREPARE.
2002-04-02 15:14:09 +00:00
Paul Eggert
4f473142a8 (_AS_BASENAME_PREPARE): New macro.
(AS_SHELL_SANITIZE): Invoke it.
(AS_BASENAME): AS_REQUIRE it, and use $as_basename.
2002-03-27 20:33:03 +00:00