Commit Graph

4022 Commits

Author SHA1 Message Date
Romain Lenglet
dab22fbfe1 add AT_CHECK_EUNIT autotest macro
* lib/autotest/specific.m4: New file.
* lib/autotest/Makefile.am (dist_autotestlib_DATA): Add specific.m4.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Add definitions of
variables used by AT_CHECK_EUNIT macro: ERL, ERLC, ERLCFLAGS.
* tests/autotest.at (Erlang Eunit unit tests): Add test for macro
AT_CHECK_EUNIT.
* doc/autoconf.texi (Writing Testsuites): Document macro AT_CHECK_EUNIT.
* NEWS: Mention macro AT_CHECK_EUNIT.
2009-08-02 08:20:57 +02:00
Paolo Bonzini
9b849a97c6 Clarify comparison of echo, printf, and AS_ECHO*.
Discussed starting at
<http://lists.gnu.org/archive/html/bug-autoconf/2009-07/msg00025.html>.

* doc/autoconf.texi (Limitations of Builtins): In echo's entry,
give a reason why printf is better than echo.  In printf's
entry, cross-reference echo's entry.
2009-07-30 22:41:43 +02:00
Paolo Bonzini
a19e829e67 Add back AH_CHECK_HEADERS.
* lib/autoconf/general.m4 (AH_CHECK_HEADERS): New.
* NEWS: Add new section.
2009-07-30 22:41:43 +02:00
Ralf Wildenhues
4de8e583dd testsuite: avoid bogus hostname match from inner test logs.
* tests/autotest.at (Hard fail): Check more restrictively for
passed tests, so that hostnames recorded in the log file do not
wrongly match.
Report by Ludovic Courtès.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-07-29 19:54:57 +02:00
Eric Blake
936160f761 Release Version 2.64.
* NEWS: Mention the release.
* README: This release is stable.
* HACKING (release): Use dist-xz, not dist-lzma.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-26 21:27:21 -06:00
Eric Blake
4f8ae51842 Document some optional features in INSTALL.
* doc/install.texi (Basic Installation): Mention that INSTALL is
generic, and that not all packages implement all features.
Mention 'make distcheck' for maintainers, and 'make installcheck'
for users.  Mention the GNU Coding Standards.
(Installation Names): Mention DESTDIR vs. 'make prefix= install'
as ways to alter the configuration, with caveats of each.  Move
--program-prefix discussion...
(Optional Features): ...here.  Mention --enable-silent-rules and
use of make V=0.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-26 21:03:09 -06:00
Eric Blake
9b7d3d1676 Basic improvements to INSTALL.
* doc/install.texi (Basic Installation): Use better markup.
(Multiple Architectures): Introduce the term VPATH.
(Installation Names): Mention that --prefix must be absolute.
* doc/autoconf.texi (Preset Output Variables)
(Installation Directory Variables): Consistently refer to GNU
Coding Standards.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-26 21:02:38 -06:00
Eric Blake
cd61895662 Update some upstream files.
* build-aux/config.guess: Resynchronize from upstream.
* build-aux/config.sub: Likewise.
* build-aux/texinfo.tex: Likewise.
* build-aux/vc-list-files: Likewise.
* doc/standards.texi: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-26 19:45:19 -06:00
Eric Blake
32440e1605 Recognize new m4sugar keywords.
* lib/emacs/autoconf-mode.el (autoconf-current-defun): Recognize
m4_define_default, m4_defun_init, m4_defun_once.
(autoconf-font-lock-keywords):  Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 20:56:52 -06:00
Eric Blake
e18033c024 Require m4 1.4.6, and fix testsuite to support this version.
* m4/m4.m4 (AC_PROG_GNU_M4): Reject m4 1.4.5, now that we use
regexp it can't handle.
* NEWS: Mention minimum version bump.
* README: Likewise.
* README-hacking: Likewise.
* doc/autoconf.texi (Introduction, Why GNU M4): Likewise.
* tests/tools.at (autom4te --trace and whitespace): Update test so
still work with older m4 line numbers.
* tests/m4sugar.at (m4@&t@_require: nested): Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 17:24:47 -06:00
Bruno Haible
bd9c233305 Clarify autom4te debugging tips.
* doc/autoconf.texi (Debugging via autom4te): Fix example from
previous commit, and add clarification.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 09:38:39 -06:00
Eric Blake
de8a83c3e9 Document some autom4te debugging tips.
* doc/autoconf.texi (Debugging via autom4te): New node.
Suggested by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 06:51:59 -06:00
Eric Blake
3963d3ad3e Fix font-lock.
* configure.ac (ac_cv_unsupported_fs_chars): Make editing easier.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 06:24:49 -06:00
Eric Blake
77350bd98c Let autoheader see through m4 macros in AC_DEFINE.
* lib/autoconf/general.m4 (AC_DEFINE_TRACE): Expand macro before
tracing its name.
* lib/autoconf/autoheader.m4 (AH_VERBATIM, AH_TEMPLATE): Likewise,
for using the macro in a template file.
* tests/tools.at (autoheader and macros): New test.
* NEWS: Mention this.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 06:00:38 -06:00
Eric Blake
0fcbbc3080 Improve NEWS wording.
* NEWS: Use more accurate statement.
Suggestedy by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 05:19:13 -06:00
Eric Blake
3171783adb Fix AS_EXIT for FreeBSD sh.
* lib/m4sugar/m4sh.m4 (AS_EXIT): Always supply an argument to the
shell function, since $? is not reliable on function entry.
(_AS_EXIT_PREPARE): Simplify to assume argument.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-24 19:00:49 -06:00
Eric Blake
331729f7a8 Run more tests under Solaris.
* tests/local.at (AT_CHECK_AUTOCONF): Don't skip entire test
group when passing over syntax checks.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-23 21:03:55 -06:00
Romain Lenglet
8f3729e1a5 Clean up temporary files generated by Erlang macros.
* lib/autoconf/erlang.m4 (AC_ERLANG_CHECK_LIB)
(AC_ERLANG_SUBST_ROOT_DIR, AC_ERLANG_SUBST_LIB_DIR)
(AC_ERLANG_SUBST_ERTS_VER): Delete conftest.out; renamed
erlang_cv_* cache variables into ac_cv_erlang_*.
* lib/autoconf/general.m4 (AC_RUN_IFELSE): Delete conftest.beam
files generated by Erlang compiler.
* tests/local.at (AT_CHECK_ENV): Ignore variables defined by
Erlang macros.
* tests/erlang.at (AT_SETUP_ERLANG): Delete; replace all uses by
AT_CHECK_MACRO.
* tests/Makefile.am (AUTOCONF_FILES): Revert previous addition of
generated Erlang tests; they are all hand-tested.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-23 20:37:58 -06:00
Romain Lenglet
0f4806215f Add autotests for Erlang macros.
* tests/erlang.at: Added tests for all macros in erlang.m4.
* tests/Makefile.am: Added erlang.at.
* tests/suite.at: Likewise.
* tests/compile.at: Added test for extension of Erlang files.
* NEWS: Mention this.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-23 06:47:52 -06:00
Eric Blake
25853e5836 Fix test of autom4te from stdin.
* tests/tools.at (autom4te cache locking): Make stdin request
explicit, so that --force is properly used.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-22 06:50:14 -06:00
Eric Blake
497a186732 Don't hide leading space in autom4te --trace output.
* bin/autom4te.in (handle_traces): Don't flatten leading and
trailing space, since tracing spacing bugs can be useful.
* tests/tools.at (autom4te --trace and whitespace): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-16 06:24:21 -06:00
Eric Blake
f256382519 Document that $srcdir can be used during configure.
* doc/autoconf.texi (Preset Output Variables): Add a paragraph.
* THANKS: Update.
Reported by Monty Taylor.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 22:21:28 -06:00
Eric Blake
d8db042ad0 Disable asynchronous job notification for parallel tests.
* lib/autotest/general.m4 (AT_INIT) <Driver loop>: Turn off notify
mode, since zsh leaves it on after 'emulate sh'.
* doc/autoconf.texi (Limitations of Builtins) <set>: Document that
job control options are not portable.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 22:19:15 -06:00
Eric Blake
2b5b0dda48 Guarantee that exit status trumps output matching.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document this
better.
* tests/autotest.at (Skip, parallel skip): Enhance tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 22:03:27 -06:00
Eric Blake
c633d4a39a Fix nits in recent patches.
* configure.ac (ac_cv_dir_trailing_space): Avoid $status, for
zsh.
* doc/autoconf.texi (Writing Testsuites) <AT_FAIL_IF, AT_SKIP_IF>:
Tweak wording.
(Introduction): Recommend m4 1.4.13.
* README: Likewise.
* m4/m4.m4 (AC_PROG_GNU_M4): Likewise.  Use long option --gnu
rather than -g.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 21:59:47 -06:00
Paolo Bonzini
ac0fd199f9 introduce AT_SKIP_IF and AT_FAIL_IF
* NEWS: Mention AT_SKIP_IF and AT_FAIL_IF.
* doc/autoconf.texi (Autotest): Document them.
* lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF,
AT_FAIL_IF, _AT_CHECK_EXIT): New.
(AT_CHECK): Use _AT_LINE_ESCAPED.
* tests/autotest.st: Add tests for AT_SKIP_IF and AT_FAIL_IF.
Use AT_SKIP_IF.
* tests/local.st: Use AT_SKIP_IF.
2009-07-13 21:46:08 +02:00
Paolo Bonzini
93a2679e00 use m4 -g when available
M4sugar requires GNU m4 extensions to be enabled.  Override
POSIXLY_CORRECT using -g.

* m4/m4.m4: Unset POSIXLY_CORRECT during first test.  Test for -g.
Warn user if he has POSIXLY_CORRECT set but -g is not supported.
* bin/Makefile.am: Substitute @M4_GNU@ into generated files.
* bin/autom4te.in: Pass @M4_GNU@ to m4.
2009-07-13 21:46:08 +02:00
Eric Blake
81abbb1137 Fix previous patch.
* lib/autotest/general.m4 (at_fn_check_prepare_notrace): Use
proper m4 quoting.
(_AT_DECIDE_TRACEABLE): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 12:55:54 -06:00
Paolo Bonzini
b22c5fde55 Simplify handling of autotest tracing
* lib/autotest/general.m4 (at_fn_check_prepare_notrace): Use
$at_trace_echo.  Add new REASON argument.
(at_fn_check_prepare_trace): Do not call at_fn_check_prepare_notrace.
Use $at_check_filter_trace.
(at_fn_check_prepare_dynamic): Use at_fn_check_prepare_notrace.
(at_traceon): Initialize to ':'.
(at_traceoff): Remove, use 'set +x' instead throughout.
(at_check_filter_trace, at_trace_echo): New shell variables.
Initialize them if tracing is requested.
(_AT_DECIDE_TRACEABLE): Adjust call to at_fn_check_prepare_notrace.
2009-07-13 14:16:15 +02:00
Paolo Bonzini
87a4d6ae61 Move atlocal feature tests to configure
This test makes atlocal code use configure tests instead.  This
is best practice and could make diagnosing autoconf bugs easier.

2009-07-12  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Test for unsupported characters in files and
	directories here...
	* tests/atlocal.in: ... and not here.
2009-07-13 13:40:23 +02:00
Eric Blake
524a5c5152 Fix test typo.
* tests/m4sh.at (AS@&t@_INIT_GENERATED): Close fd, rather than
creating file named -.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-09 05:59:32 -06:00
Eric Blake
8fc3d4d960 Fix testsuite under dash.
* tests/m4sh.at (LINENO stack, AS@&t@_BASENAME, AS@&t@_DIRNAME)
(AS@&t@_ECHO and AS@&t@_ECHO_N, AS@&t@_EXIT, AS@&t@_MKDIR_P)
(AS@&t@_VERSION_COMPARE, as_me, Negated classes in globbing)
(Functions Support, Functions and return Support)
(Nested AS@&t@_REQUIRE_SHELL_FN, Nested AS@&t@_REQUIRE)
(AS@&t@_REQUIRE_SHELL_FN and m4@&t@_require, AS@&t@_HELP_STRING)
(AS@&t@_IF and AS@&t@_CASE, AS@&t@_FOR, AS@&t@_LITERAL_IF)
(AS@&t@_VAR basics, AS@&t@_VAR_APPEND, AS@&t@_VAR_ARITH)
(AS@&t@_INIT cleanup, AS@&t@_INIT_GENERATED, AS@&t@_MESSAGE_FD)
(_AS@&t@_CLEAN_DIR, ECHO_C): Allow testing different CONFIG_SHELL
options during the testsuite run.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-09 05:59:10 -06:00
Ralf Wildenhues
9c25a39c54 Ignore messages on stderr when testing for the zsh issue.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Ignore stderr.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-07-09 08:19:21 +02:00
Eric Blake
9a15f2f077 Skip parallel tests when zsh 'set -m' fails.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Skip test if set -m
is not supported.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-07 23:01:23 -06:00
Eric Blake
26f07a3351 Make parallel testsuite more portable.
* lib/autotest/general.m4 (AT_INIT) <AT_JOB_FIFO_FD>: Avoid <>;
instead open write descriptor in each group and read descriptor in
main driver.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Relax condition.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-07 22:42:50 -06:00
Eric Blake
1ba58ec955 Avoid syntax error in ash.
* lib/autotest/general.m4 (AT_INIT) <driver loop>: Avoid syntax
errors on shells that don't recognize <>.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Also skip parallel
tests for this reason.   Skip based on the shell to be tested,
not the shell driving the testsuite.
(parallel syntax error): Rearrange similar to previous patch.
(parallel test execution): Defer skip until after serial tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-03 06:42:30 -06:00
Eric Blake
596644ca29 Skip test on shells that can't catch syntax failure.
* tests/autotest.at (Syntax error): Skip test if shell aborts on
syntax error (AIX ksh88) or doesn't detect it (zsh).
* doc/autoconf.texi (Limitations of Builtins) <.>: Mention these
limitations.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-02 07:17:43 -06:00
Jan Madzik
06aeca6abe Avoid AIX 6.1 ksh88 ECHO_C command substitution bug.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): Ensure more than
one character is output with `\c'; reset echo output state
if buggy ksh was detected, and set ECHO_T instead of ECHO_C.
* doc/autoconf.texi (Limitations of Builtins): Document it.
* tests/m4sh.at (ECHO_C): New test.
* THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-30 20:48:59 +02:00
William Pursell
6c358e8f6a Fix grammaro in documenation.
* doc/autoconf.texi (Guidelines): Fix grammaro.
2009-06-27 13:06:02 +02:00
Eric Blake
01660aaecc Fix AC_CHECK_HEADER infloop for gcc.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW)
(_AC_CHECK_HEADER_OLD): Give up on AU_DEFUN, and manually warn
about obsoletion, to avoid infinite loop in gcc.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-17 06:27:45 -06:00
Eric Blake
ba32f02aed Add m4_copy_force, m4_rename_force.
* lib/m4sugar/m4sugar.m4 (m4_copy_force, m4_rename_force): New
macros.
* tests/m4sugar.at (m4@&t@_defn): Test them.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Document
them.
* NEWS: Likewise.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-15 06:59:03 -06:00
Eric Blake
a5a584d9e8 Reinstate _AC_CHECK_HEADER_OLD for gcc.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW)
(_AC_CHECK_HEADER_OLD): Provide autoupdate versions, since gcc and
others used these undocumented macros.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-15 06:59:00 -06:00
Ralf Wildenhues
cafdba3139 Fix concurrent autom4te.cache directory creation race.
* bin/autom4te.in: Do not error out if another `autom4te'
instance created the cache directory before we could.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-12 13:38:57 +02:00
Steven G. Johnson
ca47306861 Create a file in test program when detecting cross-compilation.
* lib/autoconf/lang.m4 (_AC_LANG_IO_PROGRAM): New macro, returns
program that creates a file.
(_AC_COMPILER_EXEEXT,_AC_COMPILER_EXEEXT_WORKS): Call new macro
and document why it's needed to robustly detect cross-compiling.
(AC_LANG_DEFINE): Copy implementation across similar languages.
* lib/autoconf/c.m4 (_AC_LANG_IO_PROGRAM(C)): Implement new macro.
* lib/autoconf/fortran.m4 (_AC_LANG_IO_PROGRAM(Fortran 77)):
Likewise.
* lib/autoconf/erlang.m4 (_AC_LANG_IO_PROGRAM(Erlang)): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-11 07:07:32 -06:00
Eric Blake
14c613a6c9 Simplify AC_LANG(Fortran).
* lib/autoconf/fortran.m4 (AC_LANG(Fortran)): Borrow from Fortran
77, which requires reordering portions of the file.
(AC_LANG_PROGRAM(Fortran), AC_LANG_CALL(Fortran)): Now defined
automatically.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-11 06:59:57 -06:00
Eric Blake
685b65a74f Clarify m4_copy semantics.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Update
documentation.
* tests/m4sugar.at (m4@&t@_defn): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-11 06:43:39 -06:00
Eric Blake
22e57e5c5e Improve documentation on trap pitfalls.
* doc/autoconf.texi (Limitations of Builtins) <trap>: Mention new
Posix 2008 requirement on trap, and dash bug in implementing it.
Mention various shell bugs with traps defined inside subshells.
Mention older bash limitation with single-command exit trap.
<set>: Mention another 'set -e' limitation.
Reported by Jens Schmidt.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-06 22:05:47 -06:00
Jim Meyering
73d519a40a Improve testsuite's --help output.
* lib/autotest/general.m4: Correct the example in ./testsuite --help.
Improve wording.
2009-06-06 21:26:09 +02:00
Eric Blake
bef5cc354c Document fallback behavior of AC_PROG_LEX.
* doc/autoconf.texi (Particular Programs) <AC_PROG_LEX>: Mention
why fallback is :, and that a --version check must be used to
determine whether flex was found.
Reported by Patrick Welche.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-06 10:41:47 -06:00
Jim Meyering
89f948d644 Fix syntax errors in autoconf.texi.
* doc/autoconf.texi (Erlang Libraries): @-escape curly braces
in example code.
2009-05-28 19:08:20 +02:00