Commit Graph

1700 Commits

Author SHA1 Message Date
Akim Demaille
40b982ac3c * doc/autoconf.texi (Common Shell Constructs): Rename as...
(Programming in M4sh): this.
Promote to @section.
2001-09-23 17:16:57 +00:00
Akim Demaille
eacc95ddc9 * lib/autotest/general.m4 (AT_INIT): Dump config.log last.
Pass $at_debug_args to the rerun test suite.
* lib/m4sugar/Makefile.am (DISTCLEANFILES): New.
* bin/Makefile.am (ETAGS_SH): Don't use characters ranges.
From Paul Eggert.
2001-09-23 17:16:43 +00:00
Akim Demaille
f69035452d * bin/autom4te.in (@my_warning): Remove, handled by `autom4te.cfg'. 2001-09-23 17:16:28 +00:00
Akim Demaille
0540a84bcd * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix shell
over-escaping.
2001-09-23 17:16:15 +00:00
Akim Demaille
d3bcaf7a86 * lib/Autom4te/General.pm (&debug): New.
* bin/autom4te.in ($language): Move to...
(parse_args): here.
Handle --language in languages.
* lib/autom4te.in (Automake-selections, Autoheader-selections)
(Autoscan-selections): New.
(Autoconf): Adjust.
2001-09-23 17:16:01 +00:00
Tim Van Holder
00353f7c20 * m4/auxdir.m4, m4/cond.m4, m4/depend.m4, m4/init.m4, m4/install-sh.m4,
m4/missing.m4, m4/sanity.m4, m4/strip.m4: Updated to match current versions
  from CVS Automake.
2001-09-23 15:34:56 +00:00
Alexandre Duret-Lutz
92233ef902 * doc/autoconf.texi (Special Shell Variables): Add pdksh output
for $LINENO.
2001-09-23 14:42:14 +00:00
Akim Demaille
4153a98f4e * lib/autoconf/autotest.m4: Create `package.m4'.
* tests/Makefile.am (package.m4): Remove.
2001-09-22 15:21:20 +00:00
Akim Demaille
a9bd52773e Rely on $LINENO' when possible instead of __oline__'.
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Provide some form of
`$LINENO' support replacement when not supported.
(_AS_CR_PREPARE, _AS_TR_CPP_PREPARE, _AS_TR_SH_PREPARE): Invoke
them explicitly to be sure they are not output before this section
(via m4_require).  Cosmetic only.
* lib/autoconf/c.m4, lib/autoconf/general.m4,
* lib/autoconf/programs.m4: Replace all the occurrences of
`__oline__' with `$LINENO'.
* doc/autoconf.texi (Special Shell Variables): Document LINENO.
2001-09-22 15:20:44 +00:00
Tim Van Holder
710e4d6b1c * lib/autoconf/functions.m4 (_AC_FUNC_FORK): Replaceded an 8-bit
character (u: -> ue) in a code comment.
  (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Only run 'ln -s' if we know
  it works.
2001-09-21 16:19:09 +00:00
Akim Demaille
30ef540bdd * Makefile.maint (AUTOM4TE): Neutralize autom4te.
Suggested by Jim Meyering.
2001-09-21 16:17:38 +00:00
Tim Van Holder
c163d9c990 * lib/autoconf/programs.m4: Use extensions listed in $ac_executable_extensions
when looking for programs.
2001-09-20 16:19:54 +00:00
Tim Van Holder
18d1bacab0 * lib/autoconf/general.m4: Fix a small Englisho.
* lib/autoconf/status.m4: Fix a small typo.  Handle DOS paths when
  setting up ac_dir_suffix and ac_top_builddir.
* lib/m4sugar/m4sh.m4: Default CDPATH to $PATH_SEPARATOR, not ':'.
2001-09-20 15:51:52 +00:00
Tim Van Holder
a12d3d6319 * doc/autoconf.texi (File System Conventions): Clarify the use of
PATH_SEPARATOR.
  (Special Shell Variables[PATH_SEPARATOR]): Ditto.
  (Special Shell Variables[CDPATH]): Mention that $PATH_SEPRATOR should
  be used instead of ':'.
* lib/autotest/general.m4: Replace occurrences of ':' in
  AUTOTEST_PATH with $PATH_SEPARATOR at test suite startup.
2001-09-20 15:39:46 +00:00
Tim Van Holder
da693d44b0 * tests/atgeneral.m4: Add basic support for test ranges (e.g. 7-34) as
arguments.  Fixed a typo.
2001-09-20 15:08:21 +00:00
Tim Van Holder
df7160f880 * man/Makefile.am (.x.1): Use @PATH_SEPARATOR@, not ':' to set up
$PATH.  Also set AUTOM4TE_CFG, so we can process autom4te properly.
2001-09-20 15:00:13 +00:00
Tim Van Holder
79bc254fde * bin/autoscan.in: Add 'exec-perl-if-not-run-by-perl'.
* bin/autoupdate.in: Ditto.
* bin/autoheader.in: Reworded a few comments.
* bin/autoconf.in: Reworded help text for a few options.
* bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in,
* bin/autoscan.in, bin/autoupdate.in: Ditto.
2001-09-20 14:55:49 +00:00
Tim Van Holder
6cd8d1f6c1 * lib/Autom4te/XFile.pm (open): Simplified the error message (we
already have $file).  Set output files to binary mode (helps avoid
  CR issues on DOSish systems).
2001-09-20 14:52:57 +00:00
Akim Demaille
9b50021469 * lib/autotest/general.m4: Englishoes.
From Tim Van Holder and Alexey Mahotkin.
2001-09-19 07:22:24 +00:00
Paul Eggert
5185780199 * doc/autoconf.texi (Common Shell Constructs):
New node, documenting AS_DIRNAME.
(Limitations of Usual Tools): Refer to it when discussing dirname.
Also, update discussion of POSIX standard to reflect latest draft.
2001-09-18 18:47:34 +00:00
Paul Eggert
307d40fa4f * lib/autoconf/c.m4:
(AC_LANG_INT_SAVE(C)): Also support negative values, down to LONG_MIN.

* lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE):
Do not pass a first argument with leading '-'
to expr, by parenthesizing initial integers that might be negative.
2001-09-18 17:57:30 +00:00
Paul Eggert
a0cf3824a4 * doc/autoconf.texi (Particular Functions): AC_FUNC_GETPGRP
now merely checks whether it is an error to pass an argument
to getpgrp.

* lib/autoconf/functions.m4 (_AC_FUNC_GETPGRP_TEST): Remove.
(AC_FUNC_GETPGRP): Don't bother with a runtime test.  Just check
whether it is a (compile-time) error to pass an argument to
getpgrp.  This simpler test supports the revised documentation,
and is all that AC_FUNC_GETPGRP's users really need.
2001-09-18 16:23:11 +00:00
Akim Demaille
8eed079c5e * doc/autoconf.texi (Limitations of Make) <$<>: New. 2001-09-18 14:31:26 +00:00
Akim Demaille
8ef39f1b94 * doc/autoconf.texi (Limitations of Usual Tools) <find>: More about
`{}'.
* lib/autotest/general.m4 (AT_INIT): Adjust.
2001-09-18 14:21:51 +00:00
Akim Demaille
bfa90014d7 * tests/m4sh.at: Ensure that AS_DIRNAME handles '/', '//' and '///'
correctly.
Add test for AS_BASENAME.
* lib/m4sugar/m4sh.m4: Fix AS_BASENAME so that it passes the previous
added test. It now correctly handles /1/2/3/, returning '3' not ''.
Added AS_BASENAME_SED to make the interface the same as AS_DIRNAME.
* tests/base.at: Fixed the expected responses. The old ones were
one line out...
* lib/autoconf/general.m4: Fixed AC_PREFIX_PROGRAM, it now behaves as
the documentation claims it should (and how it behaved in 2.13).
2001-09-18 12:26:36 +00:00
Akim Demaille
01bbecaa0a * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): No INIT-CMDS in
the AC_CONFIG_COMMANDS invocation.
This also solves the name clash problems.
Don't set the package's ID.
* lib/m4sugar/Makefile.am (version.m4): Revamp.
No longer to be shipped.
(version.in): Remove.
* lib/m4sugar/m4sugar.m4, lib/autoconf/general.m4,
* lib/autoconf/status.m4: Adjust.
Use `m4_PACKAGE_STRING'.
* lib/autotest/general.m4 (AT_INIT): N-th signature change: now
the only optional argument is the name of the test suite.
Expect `package.m4' to define the package signature.
* lib/autom4te.in (Autotest): Add `package.m4?'.
* tests/Makefile.am (package.m4): New.
* tests/suite.at: ifnames is a victim.
2001-09-18 09:03:18 +00:00
Akim Demaille
72c26bb441 * lib/autom4te.in (Autoconf): Preselect AM_CONDITIONAL,
AC_LIBSOURCE, AC_CONFIG_FILES.
* lib/autotest/general.m4 (AT_INIT): Don't abort when a tested
program version string doesn't match the package's.
* lib/autoconf/general.m4 (AC_CACHE_VAL): Reestablish the space
after `(cached)'.
2001-09-18 08:58:56 +00:00
Paul Eggert
3bf9fd606e (AC_LANG_INT_SAVE(C)): Allow expression to return any value that can
fit into unsigned long (not int, as before).  Check for output errors.


From Bruno Haible:

(AC_LANG_INT_SAVE(C)): Always include <stdio.h> and
<stdlib.h>. Evaluate the expression in an extra function before these
includes. Call fprintf "%d" only after ensuring the argument is of
type 'int'.  Reported by Wayne Chapeskie <waynec@spinnaker.com>.
2001-09-17 21:52:40 +00:00
Paul Eggert
8638d098f3 Fix bug reported by Paul Townsend on AIX 4.3.3.0 with CFLAGS=-O4
or CFLAGS=-O5.  In that case, the linker has a relaxed view of
fatal errors, and AC_CHECK_LIB causes it to include libraries even
when they don't exist.

* lib/autoconf/headers.m4 (AC_HEADER_DIRENT): Use AC_SEARCH_LIBS,
not AC_CHECK_LIB, so that we don't use -ldir or -lx if we don't
need it.

* lib/autoconf/specific.m4 (AC_ISC_POSIX): Replace the old, crufty
version with the version used by fileutils 4.1, except use
AC_SEARCH_LIBS, not AC_CHECK_LIB, so that we don't use -lcposix if
we don't need it.

* doc/autoconf.texi (AC_ISC_POSIX): Describe new behavior.
2001-09-17 19:42:12 +00:00
Akim Demaille
cf951e25b3 * tests/base.at, tests/m4sh.at: Be sure to issue the bangshe line
_first_.
Reported by Gerrit P. Haase.
2001-09-13 15:47:34 +00:00
Akim Demaille
39c8e277ec * lib/autotest/general.m4 (AT_INIT): Reset `AT_victims' so that
m4_defn'ing is valid.
2001-09-13 10:18:07 +00:00
Akim Demaille
1d5fcaa394 Regen. and typo. 2001-09-13 09:59:47 +00:00
Akim Demaille
0638570e79 * lib/m4sugar/m4sugar.m4 (m4_append_uniq): New.
* lib/autotest/general.m4 (AT_VICTIMS, AT_KEYWORDS, _AT_CLEANUP_FILE):
Use it.
2001-09-13 06:57:45 +00:00
Akim Demaille
fcd2734d6a * lib/m4sugar/m4sugar.m4 (_AS_QUOTE_IFELSE, _AS_BOX_INDIR): Use
m4_match.
(m4_re_escape): New.
* lib/autoconf/status.m4 (AC_CONFIG_IF_MEMBER): Use it.
* lib/autoconf/general.m4 (AC_CACHE_SAVE): Use m4_match.
* lib/autoconf/status.m4 (AC_CONFIG_IF_MEMBER, AC_CONFIG_LINKS):
Likewise.
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P)
(_AC_CHECK_TYPE_MAYBE_TYPE_P, AC_CHECK_MEMBER): Likewise.
* lib/autotest/general.m4 (AT_INIT): Rename AT_TESTS_ALL as
AT_tests_all for consistency.
Set at_victims.
(AT_VICTIMS): Similar to AT_KEYWORDS.
(_AT_CLEANUP_FILE_IF): Use m4_match and m4_re_escape.
2001-09-13 06:57:29 +00:00
Akim Demaille
a1c1be5c45 * lib/autotest/general.m4 (AT_INIT): Fix stupid bugs. 2001-09-13 06:57:14 +00:00
Akim Demaille
b13885b690 * lib/autotest/general.m4 (AT_INIT): Create and remove
`$as_me.[0-9]+' instead of `debug-[0-9]+.sh', so that multiple
test suites can cohabit.
2001-09-13 06:57:01 +00:00
Akim Demaille
935420e97b * tests/mktests.sh: Don't output banners for empty test files. 2001-09-13 06:56:44 +00:00
Akim Demaille
5216ece6a8 Test suites can be run independently of configure.
* lib/m4sugar/m4sh.m4 (_AS_ECHO, _AS_ECHO_N_PREPARE): New.
* lib/autoconf/programs.m4 (_AC_PROG_ECHO): Remove.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Adjust: AC_SUBST
ECHO_N etc.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't ask for at_n
and at_c.
* lib/autotest/general.m4: Use ECHO_*.
2001-09-13 06:56:31 +00:00
Akim Demaille
c737451f8c * bin/ifnames.in: Rewrite in Perl.
* configure.ac: Don't look for AWK.
* tests/tools.at (AWK portability): Remove.
(Syntax of the shell scripts): Don't check ifnames.
(AT_CHECK_PERL_SYNTAX): New.
(Syntax of the Perl scripts): Check ifnames.
* tests/ifnames: New.
2001-09-13 06:54:35 +00:00
Akim Demaille
c77d29d43d * lib/autotest/general.m4 (AT_INIT): Let --keywords also match
test group titles.
* tests/atspecific.m4 (AT_CHECK_AU_MACRO): AT_KEYWORDS(autoupdate).
Remove all the other keywords.
2001-09-13 06:53:19 +00:00
Akim Demaille
10b30c8904 * lib/autotest/general.m4 (AT_INIT): Remove the diversion HELP and
SETUP: no longer used.
Support -k, --keywords.
<at_help>: Be `no', `short', or `long'.
<at_help_all>: New variable.
(AT_KEYWORDS): New.
(AT_CLEANUP_FILE_IFELSE, AT_CLEANUP_FILE): Rename as...
(_AT_CLEANUP_FILE_IF, _AT_CLEANUP_FILE): these.
(_AT_CLEANUP_FILE_IF): Simplify the regexp.
(AT_SETUP): Reset AT_line, AT_keywords, AT_description.
No longer fill the HELP diversion.
(AT_CLEANUP): Use them.
* lib/m4sugar/m4sugar.m4 (m4_append): Support a separator.
(m4_list_append): Remove.
Spread a few keywords in the Autoconf test suite.
2001-09-10 07:18:17 +00:00
Akim Demaille
4494f57cd6 * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't pass
PATH_SEPARATOR, let M4sh compute it.
* lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): New.
* lib/autoconf/programs.m4 (AC_SHELL_PATH_WALK): Use PATH_SEPARATOR.
Move to...
* lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Here.
Simplify when the path is not a literal.
(AS_UNAME): Use it to report PATH.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Remove.
(_AC_INIT_DEFAULTS): AC_SUBST PATH_SEPARATOR.
* lib/autoconf/programs.m4 (AC_PROG_INSTALL): Use _AS_PATH_WALK.
* lib/autotest/general.m4 (AT_INIT): Use _AS_PATH_WALK to
normalize the path, and to look for victims.
* tests/semantics.at (AC_PATH_PROG & AC_PATH_PROGS)
(AC_CHECK_PROG & AC_CHECK_PROGS): Use PATH_SEPARATOR.
2001-09-10 07:17:41 +00:00
Akim Demaille
5fd6e6f70a * bin/autom4te.in (&handle_m4): `< /dev/null' so that GNU M4 1.5
doesn't neutralize SIGINT, making autoconf etc. non interruptible.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Move the package
related variables into `at_package_*'.
* lib/autotest/general.m4 (AT_VICTIMS): New.
(AT_INIT): Adjust for stand-alone/embedded test suites.
(AS_MESSAGE_LOG_FD): Define and use it.
* tests/suite.at (AT_VICTIMS): Use it.
* tests/tools.at (autoupdating AC_PREREQ): Don't depend upon
at_version.
2001-09-07 08:26:57 +00:00
Akim Demaille
c7ae939c1d Move toward possibly stand-alone test suites.
* lib/autotest/general.m4: Stop displaying srcdir everywhere as,
in addition, it introduces useless differences in logs.
(AT_INIT): Let atconfig and atlocal be both optional.
Adjust PATH computation.
* lib/m4sugar/m4sh.m4 (AS_UNAME): More readable display of PATH.
2001-09-07 07:20:26 +00:00
Akim Demaille
62f5d3573e * lib/autoconf/Makefile.am (autoconf.m4f): Depends upon
m4sugar/version.m4.
2001-09-07 07:20:07 +00:00
Akim Demaille
503e11606c * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use `_array_'
to avoid GCC warnings.
From Uwe Seimet.
2001-09-05 08:46:53 +00:00
Akim Demaille
15d0a48936 * bin/autom4te.in: --language is -l, not -s. 2001-09-05 07:48:11 +00:00
Akim Demaille
bd98563273 Typos. 2001-09-05 07:22:18 +00:00
Akim Demaille
7d6abb82f3 Be ready to handle filenames as stupid as `dnl.at', for if even
the maintainer is dumb enough to do that...
* lib/autotest/general.m4 (AT_SETUP, AT_LINE): Demonstrates your
excellence in M4 quotation: consider `__file__' is active.
And BTW, when invoking m4, pass the --include in the right order:
the wrong one.
* bin/autom4te.in, bin/autoupdate.in: Use reverse when kingtal to
4m.
2001-09-05 07:06:58 +00:00
Akim Demaille
d134e3aa8d * lib/Autom4te/XFile.pm: New lib file.
* bin/autoupdate.in, bin/autoscan.pl, bin/autom4te.in,
* bin/autoheader.in: Use it.
2001-09-05 07:06:40 +00:00