Commit Graph

4264 Commits

Author SHA1 Message Date
Paolo Bonzini
9900c34046 Fix `recursion' test failure.
* tests/m4sugar.at (recursion): Use empty diversion, not 0.
2009-12-09 10:23:16 +01:00
Stefano Lattarini
d4fdf04459 Document Solaris/Heirloom sh set -e issue with command substitutions.
* doc/autoconf.texi (Limitations of Builtins): Fix typos `set -d'
in previous example.  Document failure to honor && lists with set -e
and a command substitution in the failing command.
Report and initial patch by Stefano Lattarini against Automake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-05 14:00:42 +01:00
Eric Blake
b4f0a5079d Warn if using unnamed diversion.
* lib/m4sugar/m4sugar.m4 (_m4_divert, m4_divert_push): Add
optional parameter, which controls warning.
(m4_divert_pop, m4_cleardivert, m4_divert_require)
(_m4_require_call): Adjust callers.
* lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise.
* tests/m4sh.at (AT_DATA_LINENO): Avoid triggering the warning.
* tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT, m4@&t@_append)
(m4@&t@_text_wrap, recursion): Likewise.
(m4@&t@_warn, m4@&t@_divert_stack): Adjust expected output.
* tests/tools.at (autom4te and whitespace in file names)
(autoconf: the empty token): Avoid triggering the warning.
(autoconf: AC_PRESERVE_HELP_ORDER): New test.
* tests/mktests.sh (ac_exclude_list): Retire prior test.
* NEWS: Document the warning.
* doc/autoconf.texi (Redefined M4 Macros) <m4_divert>,
<m4_undivert>: Make even more explicit that using these directly
is discouraged.
(Diversion support): Further warn against improper diversion
changes.
<m4_divert_text>: Give an example of proper use.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-12-04 21:18:07 -07:00
Ralf Wildenhues
8edd55bbea manual: AC_SEARCH_LIBS also prepends to LIBS.
* doc/autoconf.texi (Libraries): Document that AC_SEARCH_LIBS
prepends to LIBS, just like AC_CHECK_LIB.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-30 21:37:00 +01:00
Paolo Bonzini
4a814e40ee Bump m4.m4 serial number.
* m4/m4: Bump serial number to 10.
2009-11-27 15:17:29 +01:00
Harald van Dijk
7f75858f57 Fix m4 detection test on dash.
* m4/m4 (AC_PROG_GNU_M4): Use AS_ECHO.
2009-11-27 11:54:07 +01:00
Ralf Wildenhues
119e8f8a2d Fix AC_FUNC_MMAP regression with C++ compiler in 2.65.
* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Use const char*
for the constant string.  Cast void* to char* for assignment.
* NEWS, THANKS: Update.
Report by Michal Čihař.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-24 11:36:53 +01:00
Ralf Wildenhues
5372e97391 Add pgfortran to list of Fortran 95+ compilers.
* lib/autoconf/fortran.m4 (_AC_F95_FC): Add pgfortran before
pgf95.
Based on report by Jeff Squyres.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-24 11:13:47 +01:00
Paolo Bonzini
6e39718f9e Fix failure of test 35 when the user has a .autom4te.cfg file.
* tests/tools.at (autom4te cache creation): Skip the test if the
user has a .autom4te.cfg file.
2009-11-22 18:41:29 +01:00
Eric Blake
a352bb1568 Release Version 2.65.
* NEWS: Mention the release.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-21 06:53:03 -07:00
Eric Blake
1d1145256a Prepare for release.
* build-aux/announce-gen: Sync from upstream.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* cfg.mk (gnu_rel_host, url_dir_list): Move...
* maint.mk: ...here, copying ideas from gnulib.
(major): Rename...
(stable): ...to this, copying gnulib.
* HACKING (release): Document changes in process.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-21 06:52:48 -07:00
Eric Blake
f6ae910220 Avoid spurious newline in traced macros.
* bin/autoreconf.in (tracing): Drop newline before parsing traced
arguments; regression from 2009-11-14.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-21 06:46:24 -07:00
Eric Blake
d1af860e3f Allow absolute names in AT_TESTED.
* lib/autotest/general.m4 (AT_INIT) <PREPARE_TESTS>: Check for
absolute names before path walk.
* THANKS: Update.
Suggested by Allan Clark.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-20 15:29:38 -07:00
Ralf Wildenhues
8733bad075 Fix AC_CONFIG_SUBDIRS tracing in autoreconf.
* bin/autoreconf.in (autoreconf_current_directory): Collapse
newlines in the autoconf trace output, similar to how automake
invokes autoconf, so that newlines do not matter in the argument
to AC_CONFIG_SUBDIRS.
* tests/torture.at (Deep Package): Expose this issue in the
test.
* THANKS: Update.
Report by Nathan Schulte.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-14 14:18:48 +01:00
Eric Blake
19629fa9fc Fix AC_FUNC_MMAP for cygwin.
* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Make the test more
portable: Actually check for <sys/param.h>, and only use MAP_FIXED
on an address previously returned from mmap.
* THANKS: Update.
Reported by Corinna Vinschen.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-09 21:46:30 -07:00
Eric Blake
9d6e4a750d Redocument AS_DIRNAME, even with its flaws.
* doc/autoconf.texi (Common Shell Constructs) <AS_DIRNAME>:
Restore documenatation, since dirname mentions it.
Reported by Peter Johansson.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-04 19:44:38 -07:00
Eric Blake
cda3ab518c Update upstream files.
* build-aux/announce-gen: Synchronize from upstream.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/git-version-gen: Likewise.
* build-aux/texinfo.tex: Likewise.
* build-aux/update-copyright: Likewise.
* doc/standards.texi: Likewise.
* lib/Autom4te/Channels.pm: Likewise.
* lib/Autom4te/Configure_ac.pm: Likewise.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/Struct.pm: Likewise.
* lib/Autom4te/XFile.pm: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-04 19:38:49 -07:00
Ralf Wildenhues
7bfadd4153 Coverage for autom4te cache creation issues.
* tests/tools.at (autom4te cache creation): New test.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-04 19:42:58 +01:00
Ralf Wildenhues
1e90a10dbc Fix testsuite failures with SHELL=zsh.
* tests/statesave.m4 (AC_STATE_SAVE): Ignore argv and ARGC when
comparing configure variables.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-03 22:06:12 +01:00
Eric Blake
e92bd133de Update NEWS for recent fixes.
* NEWS: Add some entries.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-03 06:23:50 -07:00
Ralf Wildenhues
096220df5d Micro-optimization of config.status substitution.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): No need to
concatenate an empty second string, when we have exactly 148
characters to substitute.
* tests/torture.at (Substitute a 2000-byte string): Add test
exposure for runs of backslashes near the 148 character limit.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 01:04:31 +01:00
Ralf Wildenhues
0d37b401f1 Fix testsuite failure on AIX 4.3.3.
* lib/autoconf/general.m4 (_AC_RUN_LOG_LIMIT): Remove conftest.err
also if it is empty.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 01:03:21 +01:00
Ralf Wildenhues
c78135a4de Fix testsuite failure on IRIX and AIX.
* tests/torture.at (Substitute and define special characters):
Double the backslash before the double-quote in
AC_DEFINE_UNQUOTED, as documented for here-documents.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 01:02:18 +01:00
Ralf Wildenhues
5f17d8f0d3 Fix AC_OPENMP configure message for non-C compilers.
* lib/autoconf/lang.m4 (AC_LANG_DEFINE): Accept as additional
fourth arg the compiler variable name, defined in _AC_CC($1).
(_AC_CC): New language dispatch macro.
* lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Adjust.
* lib/autoconf/fortran.m4 (AC_LANG(Fortran 77), AC_LANG(Fortran)):
Likewise.
* lib/autoconf/c.m4 (AC_LANG(C), AC_LANG(C++))
(AC_LANG(Objective C), AC_LANG(Objective C++)): Likewise.
(AC_OPENMP): Use _AC_CC instead of $CC.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-31 16:01:04 +01:00
Eric Blake
8acd974e1a Fix cross-manual link to gcc.
* doc/autoconf.texi (Portable C and C++): Provide uref rather than
xref when building for html.
Reported via Karl Berry.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-31 06:57:46 -06:00
Eric Blake
97b31bcd0d Update authors.
* AUTHORS: Document recent copyright assignments.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-31 06:39:49 -06:00
Ralf Wildenhues
9c23356619 Do not fail OpenMP tests on systems without aclocal.
* tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Override
`ACLOCAL=true' for autoreconf, the tests don't need aclocal.
* tests/fortran.at (AC_OPENMP and Fortran 77)
(AC_OPENMP and Fortran): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-31 08:46:58 +01:00
Bruno Haible
d2fb059fd3 Improve cache variable documentation.
* doc/autoconf.texi (AC_PROG_AWK, AC_PROG_GREP, AC_PROG_EGREP,
AC_PROG_FGREP, AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_LEX,
AC_PROG_YACC, AC_CHECK_PROG, AC_CHECK_PROGS, AC_PATH_PROG,
AC_PATH_PROGS): Don't suggest to use the cache variable, only to
override it, or preferably, a non-cache variable associated with
the test.
(AC_PROG_SED): Likewise. Fix name of cache variable.
(AC_FUNC_GETMNTENT): Fix name cache variable.
(AC_FUNC_LSTAT): Fix typo.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-31 07:56:53 +01:00
Ralf Wildenhues
59f2fea80a Fix AC_OPENMP for Fortran (F77 and FC).
* lib/autoconf/fortran.m4 (AC_LANG_FUNC_LINK_TRY(Fortran): New.
* tests/c.at (AC_C_RESTRICT and C++, AC_OPENMP and C)
(AC_OPENMP and C++): New tests.
* tests/fortran.at (AC_OPENMP and Fortran 77)
(AC_OPENMP and Fortran): New tests.
* THANKS: Update.
Report by Bart Oldeman.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-31 02:24:09 +01:00
Ralf Wildenhues
931ae9f43a Perl coverage convenience targets.
* Makefile.am (PERL_COVERAGE_DB, PERL_COVERAGE_FLAGS)
(PERL_COVER): New variables.
(check-coverage, check-coverage-run, check-coverage-report)
(clean-coverage): New phony targets.
(clean-local): Depend on clean-coverage.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-31 02:22:04 +01:00
Eric Blake
81c80d1bf6 Fix corner cases in AS_LITERAL_IF and AS_TR_SH.
* lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Fix bug with unbalanced
parens.  Move guts...
(_AS_LITERAL_IF): into new helper.
(AS_TR_SH, AS_TR_CPP): Fix bugs with expansion of wrong macro.
Move guts...
(_AS_TR_SH, _AS_TR_SH_LITERAL, _AS_TR_SH_INDIR, _AS_TR_CPP)
(_AS_TR_CPP_LITERAL, _AS_TR_CPP_INDIR): ...into new helpers.
(AS_VAR_PUSHDEF): Hoist m4_require, by moving guts...
(_AS_VAR_PUSHDEF): ...into new helper.
* tests/m4sh.at (AS@&t@_LITERAL_IF): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-28 19:54:08 -06:00
Eric Blake
cff1fccb6e Minor optimizations to m4sh.
* lib/m4sugar/m4sh.m4 (AS_VAR_IF, AS_IDENTIFIER_IF)
(AS_LITERAL_IF): Parse fewer bytes during expansion, by visiting
if-true and if-false arguments only once.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-28 19:54:04 -06:00
Eric Blake
820a430f46 Optimize m4_escape for common case.
* lib/m4sugar/m4sugar.m4 (m4_escape): Don't use regex if string is
already sane, by copying from AS_LITERAL_IF.  Move guts...
(_m4_escape): ...into new helper.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-28 19:54:01 -06:00
Eric Blake
2943c63f52 Fix m4_text_wrap handling of quoted whitespace.
* lib/m4sugar/m4sugar.m4 (m4_escape): New macro.
(m4_text_wrap): Use it to avoid issues with embedded [ and ].
* tests/m4sugar.at (m4@&t@_text_wrap): Test it.
* NEWS: Document this.
* doc/autoconf.texi (Text processing Macros) <m4_escape>:
Likewise.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-28 19:53:58 -06:00
Eric Blake
693b541dea Mention another feature of AC_RUN_IFELSE.
* doc/autoconf.texi (Runtime) <AC_RUN_IFELSE>: Mention that
compiled test program still exists during if-true branch.
* THANKS: Update.
Reported by Stefano Lattarini, suggestion by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-27 20:17:11 -06:00
Paolo Bonzini
3abf99ae39 Pass Autom4te path down to programs that autoreconf invokes.
* bin/autoreconf.in (autom4te): New variable.  Export its value
as $ENV{'AUTOM4TE'}.  Suggested by Peter Johansson.
* THANKS: Update.
2009-10-27 09:09:26 +01:00
Eric Blake
15f8838bb6 Fix AC_TYPE_UINT64_T on Tru64 with gcc 3.4.4.
* lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT_BODY)
(_AC_TYPE_INT_BODY): Avoid undefined behavior of attempting shift
wider than type.
* NEWS: Document this.
Reported by Rainer Orth.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-20 18:44:49 -06:00
Ralf Wildenhues
b4d24c2af2 Fix a couple of index entries in the manual.
* doc/autoconf.texi (Polymorphic Variables): Fix index entries
for AS_VAR_APPEND, AS_VAR_ARITH.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-17 07:12:54 +02:00
Eric Blake
4b5062187d Fix typos in INSTALL.
* doc/install.texi (Basic Installation, Installation Names): Fix
typos in last patch.
Repored by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-15 18:43:45 -06:00
Eric Blake
97b5046ccd Improve INSTALL wording.
* doc/install.texi (Basic Installation): Clarify installcheck
behavior.
(Installation Names): Mention that --prefix only overrides
directory locations not specified on the command line.  Prefer
/alternate/directory over /path/to.  Remove a sentence targeted to
the developer, not the user.
* THANKS: Update.
Suggested by Alfred M. Szmidt.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-15 07:01:07 -06:00
Peter Breitenlohner
c60a1fdb4c Fix typos in documentation.
* doc/autoconf.texi (Cache Variable Index): Fix typo.
(Libraries) <AC_SEARCH_LIBS>: Mention 'none required' result.

Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-15 06:15:29 -06:00
Bruno Haible
81f4709a56 Recommend `sh -n' debugging, and public result variables for macros.
* doc/autoconf.texi (Debugging): Recommend to use "bash -n
configure".  Recommend the use of result variables as an
alternative to run-if-true/run-if-false parameters.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-09 05:37:06 +02:00
Bruno Haible
af6cdb40d8 manual: order `Particular Functions' node alphabetically.
* doc/autoconf.texi (Particular Functions): Swap sections about
AC_FUNC_MBRTOWC and AC_FUNC_MEMCMP.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-05 06:46:41 +02:00
Paolo Bonzini
dfc967906c Unconditionally check for junk ./--version after mkdir search loop.
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Always check for
presence of ./--version.  Reported by Eric Blake.
2009-10-01 08:20:13 +02:00
Ralf Wildenhues
fb332fa541 Clarify documentation about Solaris sed quantifier restriction.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>: '*' does
not work after subexpressions, \{M,N\} only after one-character
expressions.  From GCC PR 38923.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-22 07:36:04 +02:00
Eric Blake
f72e59f491 Fit configure output in 80 columns.
* lib/autoconf/functions.m4
(AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Shorten message.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-21 07:01:51 -06:00
Ralf Wildenhues
6e705c0478 Use consistent notation for cache variables.
* doc/autoconf.texi (Generic Programs): Remove `$' before
variable name.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:20:58 +02:00
Ralf Wildenhues
cb3638e5aa Documentation of specific and general cache variables.
* doc/autoconf.texi (Default Includes, Alternative Programs)
(Particular Programs, Generic Programs, Files, Libraries)
(Function Portability, Particular Functions, Generic Functions)
(Particular Headers, Generic Headers, Declarations)
(Generic Declarations, Particular Structures, Particular Types)
(Specific Compiler Characteristics)
(Generic Compiler Characteristics, C Compiler, System Services):
Document lots of cache variables.
* NEWS: Update.
Suggested by Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:19:59 +02:00
Ralf Wildenhues
57174765e6 New cache variable index in the manual.
* doc/autoconf.texi: Define new index `CA' for cache variables.
(caindex): New macro.
(Cache Variable Index): New appendix node.
(Top, Indices): Adjust menus.
(Cache Variable Names, Site Defaults): Adjust text.
* doc/Makefile.am (CLEANFILES): Add files generated for CA index.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:16:04 +02:00
Ralf Wildenhues
3ab3c9b357 New FAQ node: Debugging.
* doc/autoconf.texi (Debugging): New node.
(Top, FAQ): Adjust menus.
Report by Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:15:18 +02:00
Ralf Wildenhues
19e33ef7cf Document AM_MAKEFLAGS workaround to the macro override problem.
* doc/autoconf.texi (Macros and Submakes): Automake makefiles
provide AM_MAKEFLAGS to help with overriding macros in submake
invocations.
Prompted by bug report from Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:15:00 +02:00
Peter Breitenlohner
e5ddeae43a Implement and document Objective C++ support.
* lib/autoconf/c.m4 (AC_LANG(Objective C++), AC_LANG_OBJCXX)
(AC_LANG_PREPROC(Objective C++), AC_PROG_OBJCXXCPP)
(AC_LANG_COMPILER(Objective C++), AC_PROG_OBJCXX)
(_AC_PROG_OBJCXX_G): New macros.
(_AC_ARG_VAR_CPPFLAGS, _AC_ARG_VAR_LDFLAGS)
(_AC_ARG_VAR_LIBS): Adjusted.
* doc/autoconf.texi (Objective C++ Compiler): New node.
(Preset Output Variables): Document OBJCXXFLAGS.
(Language Choice): Document `Objective C++' language.
* NEWS: Updated.

* tests/local.at (AT_CHECK_ENV): Ignore AC_SUBSTed Objective C++
related variables.

Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-15 06:11:05 -06:00
Ralf Wildenhues
c8c7589040 Work around DJGPP shell function return bug with command substitutions.
DJGPP bash 2.04 has a bug in that `return $ac_retval' done in a
shell function which also contains a command substitution causes
the shell to barf.  For more details and a fix see:
<http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp-workers/2009/09/09/03:35:08>
Possible workaround include putting the `return' in a subshell
or calling another function to set the status.

* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY)
(_AC_COMPILE_IFELSE_BODY, _AC_LINK_IFELSE_BODY)
(_AC_RUN_IFELSE_BODY, _AC_COMPUTE_INT_BODY): Use AS_SET_STATUS
instead of `return'.
* doc/autoconf.texi (Common Shell Constructs, Shell Functions):
Document the issue.
* THANKS: Update.
Report by Rugxulo and Reuben Thomas.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-15 06:16:10 +02:00
Ralf Wildenhues
22ac64cd53 DJGPP fix: Do not redirect standard input in configure scripts.
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): If $DJGPP is
nonempty, do not dup fd 0 to AS_ORIGINAL_STDIN_FD, do not close
fd 0.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-15 06:13:50 +02:00
Eric Blake
6b22fb3155 Quote result of m4_toupper and m4_tolower.
* lib/m4sugar/m4sugar.m4 (m4_tolower, m4_toupper): Quote result.
* lib/autotest/general.m4 (AT_KEYWORDS): Adjust caller.
* tests/m4sugar.at (m4@&t@_toupper and m4@&t@_tolower): New test.
* NEWS: Document this.
* THANKS: Update.
Reported by Sam Steingold.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-14 13:05:46 -06:00
Ralf Wildenhues
ceff70a258 DJGPP fix: remove both conftest and conftest.exe.
The DJGPP compiler may create both `a.out' and `a.exe' without -o,
and both `conftest' and `conftest.exe' with `-o conftest', but not
with `-o conftest.exe'.

* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Also remove
`conftest' without $ac_exeext suffix.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-14 19:33:57 +02:00
Ralf Wildenhues
d9226f650c DJGPP fix: do not try to source /dev/null as cache or site file.
* lib/autoconf/general.m4 (AC_SITE_LOAD, AC_CACHE_LOAD): Do not
load the cache or site file if it is `/dev/null', as DJGPP treats
it as a regular file, but the shell then warns about it later.
Fixes several test suite failures on DJGPP.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-14 19:32:55 +02:00
Ralf Wildenhues
5d38833a3d testsuite: pass $configure_options to configure invocations.
* tests/local.at (AT_CHECK_CONFIGURE): Add $configure_options
to configure command line.
* tests/autotest.at, tests/base.at, tests/c.at, tests/torture.at:
Likewise for each configure invocation.
* README-hacking: Document configure_options.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-14 19:30:22 +02:00
Ralf Wildenhues
83989941d3 testsuite: improve Erlang tests portability, overridability.
* tests/autotest.at (Erlang Eunit unit tests): Use "no" as
value-if-not-found for Erlang tools.
* tests/erlang.at: Likewise.  Also, use AS_EXIT instead of plain
exit.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-14 19:29:35 +02:00
Ralf Wildenhues
3969a96406 * bin/autoupdate.in: Fix typos in comments.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-13 11:05:44 +02:00
Ralf Wildenhues
b4113eba0c Improve autotest testsuite summary message.
* lib/autotest/general.m4 (AT_INIT): Hint at the toplevel log
only if not $at_debug_p.  Always hint at the per-test output.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-13 10:05:10 +02:00
Ralf Wildenhues
52531c3002 Four new autoupdate tests, expected failures.
* tests/tools.at (autoupdating macros recursively)
(autoupdating with m4@&t@_pushdef, autoupdating with AC_REQUIRE)
(autoupdating with complex quoting): New tests.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-13 10:03:51 +02:00
Ralf Wildenhues
105fd64d1c Fix description of AC_CHECK_LIB regarding other deplibs.
* doc/autoconf.texi (Libraries): Library linking may not fail
even without missing additional libs.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-13 10:02:43 +02:00
Eric Blake
0ccf0c1022 Track recent copyright assignments.
* AUTHORS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-12 07:29:50 -06:00
Eric Blake
a30d5c4a22 Improve documentation on quoting.
* doc/autoconf.texi (Autoconf Language): Clarify quoting example.
* THANKS: Update.
Reported by santilín.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-12 07:27:53 -06:00
Ralf Wildenhues
bb09823ea7 New config.status option --config.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Implement
--config.
* doc/autoconf.texi (config.status Invocation): Document it.
* NEWS: Update.
* tests/torture.at (configure invocation): Test it.
Suggested several times, by several people, in the past.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-11 06:53:42 +02:00
Eric Blake
6ecb883bb1 Document that AS_INIT is automatically used.
* doc/autoconf.texi (Initialization Macros) <AS_INIT>: Add words
to clarify that only bare-bones scripts need a direct AS_INIT.
Suggested by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-10 20:18:59 -06:00
Eric Blake
98410813c9 Clarify portability pitfall of test.
* doc/autoconf.texi (Limitations of Builtins) <test>: Give more
reasons why -a and -o are not portable.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-10 20:18:39 -06:00
Ralf Wildenhues
9c16f1a80d Document sed limitation with escaped metacharacters.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>: Use `%'
rather than `/' as delimiter in an example `s' command.
Document inconsistent treatment of escaped metacharacters.
* THANKS: Update.
Report by Dave Korn, with additional input from Paolo Bonzini
and Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-10 06:57:58 +02:00
Ralf Wildenhues
672e09142c Document temporary directory `$tmp' for use in config.status.
* doc/autoconf.texi (Configuration Actions): Document `$tmp'.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-10 06:48:24 +02:00
Ralf Wildenhues
675a0c95df Update License to GPLv3+ including new Autoconf Exception.
* NEWS, README: Update licensing information.
* COPYING.EXCEPTION: New file.
* Makefile.am (EXTRA_DIST): Distribute it.
* cfg.mk (autom4te-update): Remove copyright change warning.
* lib/autoconf/autoconf.m4, lib/autoconf/autoheader.m4,
lib/autoconf/autoscan.m4, lib/autoconf/autotest.m4,
lib/autoconf/autoupdate.m4, lib/autoconf/c.m4,
lib/autoconf/erlang.m4, lib/autoconf/fortran.m4,
lib/autoconf/functions.m4, lib/autoconf/general.m4,
lib/autoconf/headers.m4, lib/autoconf/lang.m4,
lib/autoconf/libs.m4, lib/autoconf/oldnames.m4,
lib/autoconf/programs.m4, lib/autoconf/specific.m4,
lib/autoconf/status.m4, lib/autoconf/types.m4,
lib/autotest/autotest.m4, lib/autotest/general.m4,
lib/autotest/specific.m4, lib/m4sugar/foreach.m4,
lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4: Update exception
statement, bump to GPLv3.
* bin/autoconf.as, bin/autoheader.in, bin/autom4te.in,
bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in,
bin/ifnames.in: Bump to GPLv3+, adjust --version output
to reflect the GPLv3+ and the Autoconf Exception.
* lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm,
lib/Autom4te/General.pm, lib/Autom4te/Request.pm,
lib/autom4te.in, lib/autoscan/autoscan.pre,
lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el,
lib/freeze.mk, tests/atlocal.in, tests/autoscan.at,
tests/autotest.at, tests/base.at, tests/c.at,
tests/compile.at, tests/erlang.at, tests/foreign.at,
tests/fortran.at, tests/local.at, tests/m4sh.at,
tests/m4sugar.at, tests/mktests.sh, tests/semantics.at,
tests/statesave.m4, tests/suite.at, tests/tools.at,
tests/torture.at, tests/wrapper.as: Bump to GPLv3+.
2009-09-09 19:53:31 +02:00
Ralf Wildenhues
5b5d0c5842 Allow to work on systems without Fcntl::flock implementation.
* configure.ac (PERL_FLOCK): New substitution variable with test
whether Fcntl::flock is implemented by the system.
* bin/Makefile.am (edit): Substitute @PERL_FLOCK@.
* bin/autom4te.in: Call XFile::lock only if flock is
implemented.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-09 07:27:39 +02:00
Reuben Thomas
36a50d910d Mention the Autoconf archive.
* doc/autoconf.texi (Coding Style): Add a link.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 07:08:49 -06:00
Bruno Haible
129ac3155a Document another Solaris tr pitfall.
* doc/autoconf.texi (Limitations of Usual Tools) <tr>: Mention
that Solaris /usr/bin/tr does not only have problems with
replacing NUL bytes but discards all NUL bytes from the input.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 06:34:43 -06:00
Eric Blake
714bcc196f Improve wording about what goes before AC_INIT.
* doc/autoconf.texi (Initializing configure): Update wording.
(Versioning) <AC_PREREQ>: Remove misleading text, to match
autoupdate's behavior.
* THANKS: Update.
Reported by NightStrike, with input from Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 06:34:31 -06:00
Thomas Jahns
1fbc0eb114 Fix illegal tab character in Fortran source.
* lib/autoconf/fortran.m4 (AC_FC_SRCEXT): Change TAB back to
multiple spaces; regression introduced 2008-10-23.
* NEWS: Mention this.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 05:38:29 -06:00
Romain Lenglet
206564ac3e Fix AT_CHECK_EUNIT for versions of Erlang/OTP without init:stop/1.
* lib/autotest/specific.m4 (AT_CHECK_EUNIT): Support older
versions of Erlang/OTP with an erlang:stop() function that doesn't
take arguments.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-22 10:49:19 +02:00
Ralf Wildenhues
1c17608e79 Drop unneeded line in Eunit test.
* tests/autotest.at (Erlang Eunit unit tests): Do not copy
install-sh.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-22 10:45:10 +02:00
Ralf Wildenhues
62c0ca770a Fix build dependencies for Erlang macro files.
* lib/freeze.mk (autotest_m4f_dependencies): Add
$(src_libdir)/autotest/specific.m4.
* tests/Makefile.am (AUTOCONF_FILES): Add erlang.m4.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-22 10:43:51 +02:00
Paolo Bonzini
5c36d61f64 use a separate program to test whether the compiler works
* lib/autoconf/erlang.m4 (_AC_LANG_NULL_PROGRAM(Erlang)): New.
* lib/autoconf/lang.m4 (AC_LANG_DEFINE): Copy _AC_LANG_NULL_PROGRAM.
(_AC_LANG_NULL_PROGRAM(), _AC_LANG_NULL_PROGRAM): New.
(_AC_COMPILER_EXEEXT_DEFAULT): Print here "whether the xyz compiler works",
before exiting.
(_AC_COMPILER_EXEEXT_WORKS): Merge into _AC_COMPILER_EXEEXT_CROSS, remove
the "whether the xyz compiler works" message, use conftest$ac_cv_exeext
instead of $ac_file.
(_AC_COMPILER_EXEEXT): Try _AC_COMPILER_EXEEXT_DEFAULT using the
null program, and clean conftest.out only after _AC_COMPILER_EXEEXT_CROSS.
(AC_NO_EXECUTABLES): Use _AC_LANG_NULL_PROGRAM.
(_AC_COMPILER_OBJEXT): Use _AC_LANG_NULL_PROGRAM.
2009-08-19 15:01:39 +02:00
Bruno Haible
2d50a0ed98 Document Solaris tr range and NUL limitations.
* doc/autoconf.texi (Limitations of Usual Tools): Mention that
Solaris /usr/bin/tr does not support ranges, nor the '\0' octal
escape.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-18 22:17:51 +02:00
Eric Blake
4cdf58d4f0 Simplify version control metadata.
* .cvsignore: Delete.
* bin/.cvsignore: Likewise.
* config/.cvsignore: Likewise.
* doc/.cvsignore: Likewise.
* lib/.cvsignore: Likewise.
* lib/autoconf/.cvsignore: Likewise.
* lib/Autom4te/.cvsignore: Likewise.
* lib/autoscan/.cvsignore: Likewise.
* lib/autotest/.cvsignore: Likewise.
* lib/emacs/.cvsignore: Likewise.
* lib/m4sugar/.cvsignore: Likewise.
* man/.cvsignore: Likewise.
* tests/.cvsignore: Likewise.
* bin/.gitignore: Likewise.
* build-aux/.gitignore: Likewise.
* config/.gitignore: Likewise.
* doc/.gitignore: Likewise.
* lib/.gitignore: Likewise.
* lib/autoconf/.gitignore: Likewise.
* lib/Autom4te/.gitignore: Likewise.
* lib/autoscan/.gitignore: Likewise.
* lib/autotest/.gitignore: Likewise.
* lib/emacs/.gitignore: Likewise.
* lib/m4sugar/.gitignore: Likewise.
* man/.gitignore: Likewise.
* tests/.gitignore: Likewise.
* .gitignore: Consolidate all rules into one file.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-17 06:50:43 -06:00
Eric Blake
ac272f28c0 Normalize remaining copyright lines.
* BUGS: Reformat copyright line, using UPDATE_COPYRIGHT_FORCE.
* NEWS: Likewise.
* README-hacking: Likewise.
* TODO: Likewise.
* lib/Autom4te/ChannelDefs.pm: Likewise.
* lib/autoconf/fortran.m4: Likewise.
* lib/autoconf/general.m4: Likewise.
* lib/autoconf/lang.m4: Likewise.
* lib/autotest/general.m4: Likewise.
* maint.mk: Likewise.
* tests/compile.at: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-17 06:50:39 -06:00
Eric Blake
ff00dd00ea Improve copyright updating.
* build-aux/update-copyright: Resynchronize from upstream.
* maint.mk (update-copyright): Simplify based on gnulib.
(update-copyright-env): New variable.
* cfg.mk (update-copyright-exclude-regexp): Delete.
(update-copyright-env): New override.
* .x-update-copyright: New file.
* lib/Autom4te/Makefile.am: Add copyright.
* lib/Autom4te/Channels.pm: Revert copyright update to upstream
file.
* lib/Autom4te/Configure_ac.pm: Likewise.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/Struct.pm: Likewise.
* lib/Autom4te/XFile.pm: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-17 06:50:32 -06:00
Eric Blake
1c69422d88 Update copyright.
* AUTHORS: Include 2009 in copyright.
* lib/Autom4te/C4che.pm: Likewise.
* lib/Autom4te/Channels.pm: Likewise.
* lib/Autom4te/Configure_ac.pm: Likewise.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/General.pm: Likewise.
* lib/Autom4te/Request.pm: Likewise.
* lib/Autom4te/Struct.pm: Likewise.
* lib/autoconf/Makefile.am: Likewise.
* lib/autoconf/autoconf.m4: Likewise.
* lib/autoconf/autoscan.m4: Likewise.
* lib/autoconf/autoupdate.m4: Likewise.
* lib/autoconf/functions.m4: Likewise.
* lib/autoconf/libs.m4: Likewise.
* lib/autoconf/oldnames.m4: Likewise.
* lib/autoconf/types.m4: Likewise.
* lib/autoscan/Makefile.am: Likewise.
* lib/autoscan/autoscan.pre: Likewise.
* lib/autotest/Makefile.am: Likewise.
* lib/autotest/autotest.m4: Likewise.
* lib/emacs/autoconf-mode.el: Likewise.
* lib/emacs/autotest-mode.el: Likewise.
* lib/freeze.mk: Likewise.
* lib/m4sugar/foreach.m4: Likewise.
* man/Makefile.am: Likewise.
* tests/atlocal.in: Likewise.
* tests/autoscan.at: Likewise.
* tests/foreign.at: Likewise.
* tests/fortran.at: Likewise.
* tests/mktests.sh: Likewise.
* tests/semantics.at: Likewise.
* tests/suite.at: Likewise.
* tests/wrapper.as: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-14 07:31:43 -06:00
Eric Blake
f2b17001ac Prepare to bulk update copyright years.
* build-aux/update-copyright: New file.
* cfg.mk (gnulib-update): Sync it from gnulib.
(update-copyright-exclude-regexp): New varialbe.
(web-manual): Move...
* maint.mk (web-manual): ...here, to match gnulib.
(update-copyright): New target, copied from gnulib's
maint.mk (it would be nice to sync this file...).
(build_aux): New macro.
(VC_LIST, emit_upload_commands): Use it.
* build-aux/texinfo.tex: Resynchronize from upstream.
* lib/autoconf/general.m4 (_AC_COPYRIGHT_YEARS): Reformat to meet
expected pattern.
* lib/autotest/general.m4 (_AT_COPYRIGHT_YEARS): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-08-14 07:23:24 -06:00
Paolo Bonzini
c6aa493da4 Fix testsuite log capturing for tests 183 and 186.
* tests/autotest.at (AT_CHECK_AT_PREP): Prepend AT_dir to
testsuite log file for AT_CAPTURE_FILE.
2009-08-12 12:22:14 +02:00
Ralf Wildenhues
50e64b37cd Ensure we do not regress with AC_CHECK_MEMBERS.
* tests/semantics.at (AC_CHECK_MEMBERS): Expose the recent
AC_CHECK_MEMBERS fix.
(AC_CHECK_MEMBER): New test group.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-10 20:35:30 +02:00
Jeff Squyres
a2aeeaf0fd Fix typo in AC_REQUIRE description.
* doc/autoconf.texi (Prerequisite macros): Fix typo.
2009-08-10 20:05:19 +02:00
Paolo Bonzini
c6a777c434 Fix description of the macro generated by AC_CHECK_MEMBERS.
* lib/autoconf/types.m4 (_AC_CHECK_MEMBERS): Fix regex
replacement.  Reported by Bruno Haible.
2009-08-10 20:01:52 +02:00
Romain Lenglet
95af4dabfa Make AC_RUN_IFELSE fail for Erlang if the program doesn't compile.
* lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Make AC_RUN_IFELSE
fail if the test module doesn't compile.
2009-08-07 17:47:29 +02:00
Paolo Bonzini
683a0f1df7 Fix grep invocation in Erlang test.
* tests/autotest.at (Erlang Eunit unit tests): Fix grep invocation.
2009-08-02 08:24:48 +02:00
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
Romain Lenglet
9e380c5ada New AC_ERLANG_SUBST_ERTS_VER macro.
* lib/autoconf/erlang.m4: Add macro AC_ERLANG_SUBST_ERTS_VER.
* doc/autoconf.texi (Erlang Libraries): Document
AC_ERLANG_SUBST_ERTS_VER.
* NEWS: Likewise.
* AUTHORS: Update Romain Lenglet's email address.
* THANKS: Update.
Suggested by Ruslan Babayev.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-28 06:19:57 -06:00
Eric Blake
5f19cfb878 Sanitize more problematic environment variables.
* doc/autoconf.texi (Environment Variable Index): Add more
entries, particularly for precious variables and known culprit
variables.  Needed to avoid overfull vbox.
(Special Shell Variables) <CLICOLOR_FORCE, GREP_OPTIONS>: Add
variables known to cause misbehavior.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Unset variables
known to cause problems.
* THANKS: Update.
Based on reports from Ilya Bobir and Joey Mingrone.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-26 06:49:41 -06:00
Ralf Wildenhues
35e67f5c0d Document VPATH = $(variable) issue in VPATH chapter.
* doc/autoconf.texi (Variables listed in VPATH): New node.
(Top, VPATH and Make): Adjust menus.
(Build Directories): Refer to it.
Prompted by report from Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-21 14:18:39 +02:00
Eric Blake
6382b687fd Update uses of all-permissive license.
* ChangeLog: Relicense under GPL.
* ChangeLog.0: Likewise.
* ChangeLog.1: Likewise.
* ChangeLog.2: Likewise.
* THANKS: Likewise.
* m4/m4.m4: Use latest wording of FSF all-permissive license.
* m4/make-case.m4: Likewise.
* doc/install.texi: Likewise.
* tests/statesave.m4: Relicense to match rest of testsuite; this
file does not need all-permissive license since it is not designed
for reuse by other packages.
* BUGS: Relicense under all-permissive license.
* HACKING: Likewise.
* NEWS: Likewise.
* README: Likewise.
* README-alpha: Likewise.
* README-hacking: Likewise.
* TODO: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-20 06:02:49 -06:00
Eric Blake
6928fc64b2 Update some upstream files.
* build-aux/config.guess: Resynchronize from upstream.
* build-aux/gnupload: Likewise.
* build-aux/vc-list-files: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/gendocs_template: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-20 06:02:45 -06:00
Eric Blake
e86cec418e Don't mention undocumented interface in NEWS.
* NEWS: Correct earlier entry about AS_FOR.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-20 06:02:41 -06:00
Ralf Wildenhues
b29a07fffb New manual section `Parallel Make'.
* doc/autoconf.texi (Parallel Make): New node, document NetBSD
`make -jN' quirks.
(Top, Portable Make): Adjust menus.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-19 07:29:17 +02:00
Ralf Wildenhues
83d976a33f testsuite: skip `Multiple languages' test without C++ compiler.
* tests/compile.at (Multiple languages): Skip test on systems
without a C++ compiler.
Report by Jim Meyering.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-14 07:20:58 +02:00
Eric Blake
780a068d29 Document zsh bug with empty commands.
* doc/autoconf.texi (Special Shell Variables) <?>: Add mention of
more problems with $?.
2009-05-13 06:25:26 -06:00
Patrick Welche
80e62691c9 Also try X11R7 when looking for X11 files, for NetBSD.
* lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Also try directories
with X11R7 in the name.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-11 20:34:09 +02:00
Ralf Wildenhues
b26d51caf9 Limit stderr logging for C compiler version.
* lib/autoconf/general.m4 (_AC_RUN_LOG_LIMIT, _AC_DO_LIMIT): New
internal macros, equivalent to _AC_RUN_LOG and _AC_DO, but with
an optional additional argument to limit the number of lines of
stderr output logged, defaulting to 10.
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Use
_AC_DO_LIMIT for capturing compiler version output.  Also test
-qversion, for the IBM xlc compiler.
* lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
* THANKS: Update.
Report by Christian Rössel and John R. Cary against Libtool.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-01 10:58:58 +02:00
Eric Blake
3bec0c1d32 Fix quoting of m4 macros in AT_CHECK.
* lib/autotest/general.m4 (AT_CHECK): Expand prior to adding
escapes, to avoid shell syntax errors caused by late macro
expansion.
* NEWS: Document this change.
* tests/autotest.at (Metacharacters in command from M4 expansion):
New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:31 -06:00
Eric Blake
8eb0f6220d manual: Use consistent spelling of here-document.
* doc/autoconf.texi (Defining Symbols, Programming in M4sh)
(Common Shell Constructs, Macro Names, Writing Testsuites): Fix
spelling.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:28 -06:00
Eric Blake
5da9f24d55 Make AT_CHECK_UNQUOTED more like AC_DEFINE_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Keep older,
undocumented semantics, where unbalanced " cannot be used in the
stdout/stderr argument.
(AT_CHECK_UNQUOTED): Treat " in stdout/stderr as a literal, since
the text is used in double-quoted context.
* tests/autotest.at (unquoted output): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Mention which
shell expansions are handled.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:25 -06:00
Eric Blake
bcb6b3180d Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Deprecate, in favor
of new spelling...
(AT_CHECK_UNQUOTED): ...for consistency with AC_DEFINE_UNQUOTED.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
rename.
* NEWS: Likewise.
* tests/autotest.at (Binary output, Cleanup): Adjust tests.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:22 -06:00
Ralf Wildenhues
f4e756e351 New test to ensure autom4te cache file locking works.
* tests/tools.at (autom4te cache locking): New test.
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-23 19:46:59 +02:00
Paolo Bonzini
00d0543653 manual: another grammar improvement.
* doc/autoconf.texi (Fortran Compiler): Avoid dependency on
pronunciation of `FCFLAGS_f90'.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-23 19:46:58 +02:00
Eric Blake
ce153844ca Change FOO placeholder to use @var{text} instead.
* doc/autoconf.texi (Configuration Actions): Rename AC_CONFIG_FOOS
to AC_CONFIG_@var{ITEMS}.
* doc/autoconf.texi (config.status Invocation): Likewise.
(AC_FOO_IFELSE vs AC_TRY_FOO): Rename node...
(AC_ACT_IFELSE vs AC_TRY_ACT): ...to this.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-23 06:17:30 -06:00
Eric Blake
46e87ded26 Add m4_argn.
* lib/m4sugar/m4sugar.m4 (m4_argn): New macro.
* NEWS: Document it.
* doc/autoconf.texi (Looping constructs) <m4_argn>: Likewise.
<m4_car, m4_cdr>: Improve documentation.
* tests/m4sugar.at (m4 lists): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-22 20:51:28 -06:00
Ralf Wildenhues
d29bb704e5 Improve description of AC_PROG_CC_C89 and AC_PROG_CC_C99.
* doc/autoconf.texi (C Compiler): Document that AC_PROG_CC_C89
and AC_PROG_CC_C99 prefer extended over strict conformance modes.
Report by Vincent Lefèvre.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-22 07:35:12 +02:00
Ralf Wildenhues
9034f132cc Revert bogus change in last commit.
* doc/autoconf.texi (Initialization Macros): Revert change.
Spotted by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-21 22:59:42 +02:00
Ralf Wildenhues
ee4a036cda manual: fix trivial grammar errors.
* doc/autoconf.texi (Fortran Compiler, Initialization Macros)
(Limitations of Usual Tools, Pretty Help Strings)
(config.status Invocation): Fix `a' vs. `an' errors.
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-21 21:43:36 +02:00
Eric Blake
c474ab9084 Shuffle maintainer-specific rules.
* Makefile.am (maintainer-check-tests): Delete.
(autom4te-update): Move...
* cfg.mk (autom4te-update): ...here.
(fetch): Depend on autom4te-update.  Split...
(gnulib-update): ...into new rule.  Import move-if-change from
gnulib.
* maint.mk (maintainer-distcheck): Absorb former maintainer-check
rule.
* build-aux/move-if-change: New file, undistributed.
* .gitattributes: Handle new upstream file.
* .gitignore: Ignore maintainer cruft.
* HACKING: Update maintainer instructions.
* build-aux/config.guess: Update from upstream.
* build-aux/config.sub: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/gendocs_template: Likewise.
* doc/standards.texi: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-21 06:51:35 -06:00
Ralf Wildenhues
e430ff0ca6 Sync autom4te perl modules from Automake.
* lib/Autom4te/Channels.pm: Sync from Automake.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/XFile.pm: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 12:54:45 +02:00
Ralf Wildenhues
737b9ddc1b Adjust channel definitions for new Automake `ordered' flag.
* lib/Autom4te/ChannelDefs.pm (Autom4te::ChannelDefs): Set
`ordered' flag to zero for channels `fatal', `automake', and
`verb'.  This has currently no effect on actual semantics but
avoids a consistency check needed for Automake's usage of the
Channels.pm code.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 12:48:19 +02:00
Ralf Wildenhues
536f9ae3a4 manual: clarify m4_if synopsis.
* doc/autoconf.texi (Redefined M4 Macros): Rewrite synopsis of
m4_if in the presence of more than three arguments.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 01:16:56 +02:00
Ralf Wildenhues
e7c7a4735f Improve and clarify `config.status' usage documentation.
* doc/autoconf.texi (config.status Invocation): Fix markup in
synopsis.  Use `tag' instead of `file' notation for the
non-option arguments, to be consistent with the documentation
of the AC_CONFIG_* macros.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise,
use `tag' notation for non-option arguments.
Report by John Calcote.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 01:12:43 +02:00
Eric Blake
7ece247bdd Test that autotest handles binary output.
* tests/autotest.at (Binary output): New test.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:38:58 -06:00
Eric Blake
c241057ad4 Add stdout-nolog and ignore-nolog to AT_CHECK.
* lib/autotest/general.m4 (AT_DIFF_STDERR(stderr-nolog))
(AT_DIFF_STDERR(ignore-nolog), AT_DIFF_STDOUT(stdout-nolog))
(AT_DIFF_STDOUT(ignore-nolog)): New macros.
* tests/autotest.at (Logging): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
new logging actions.
* NEWS: Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:56 -06:00
Eric Blake
e8f34dca8c Teach AT_CHECK about hard failures.
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_skip>
<at_fn_check_status, at_fn_group_postprocess>: Handle hard
failures.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document
AT_CHECK_NOESCAPE and exit status 99.
* NEWS: Likewise.
* tests/autotest.at (Hard fail, Cleanup): New tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:24 -06:00
Eric Blake
bc79643383 Fix yesterday's regression in AS_IF.
* lib/m4sugar/m4sh.m4 (_AS_IF_ELSE): Don't corrupt $? in else
branch; it is up to the user to avoid syntax errors.
* tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Adjust test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-14 19:26:29 -06:00
Ralf Wildenhues
63d463427f Add traces for AM_SILENT_RULES.
* lib/autom4te.in (Automake-preselections): Trace
AM_SILENT_RULES.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-14 22:17:35 +02:00
Eric Blake
e9a5c2211a Improve documentation related to expanded-before-required.
* doc/autoconf.texi (Expanded Before Required): Add a case study.
(Running the Compiler) <AC_COMPILE_IFELSE>: Remind users that
running a compile test will AC_REQUIRE the compiler check.
(Macro Definitions) <AC_DEFUN>: Contrast AC_DEFUN and m4_define.
(C Compiler) <AC_PROG_CC>: Mention the fact that only first
invocation of this macro checks for $EXEEXT, and that many other
macros use it via AC_REQUIRE.
Reported by Andreas Schwab.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:44 -06:00
Eric Blake
d7f226ee0b Mention latest rules about make and set -e.
* doc/autoconf.texi (Failure in Make Rules): Posix is now clear
that make must use set -e.
(Limitations of Builtins) <set>: Clarify more about set -e
behavior.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:42 -06:00
Eric Blake
0cd7cde060 Improve documentation about if exit status.
* doc/autoconf.texi (Limitations of Builtins) <if>: Mention that
exit status bugs don't affect modern targets.
Reported by Andreas Schwab.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:39 -06:00
Eric Blake
ff97bd9a3f Add cross-reference to new macros.
* doc/autoconf.texi (Text processing Macros) <m4_normalize>
<m4_strip>: Reference the new m4_ifblank.
Suggested by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:37 -06:00
Eric Blake
52b83b8c37 Make AS_IF, AS_CASE, and AS_FOR more robust to blank arguments.
* lib/m4sugar/m4sh.m4 (_AS_CASE, _AS_CASE_DEFAULT, AS_FOR, _AS_IF)
(_AS_IF_ELSE, AS_IF): Avoid syntax error on blank argument,
including a macro with an empty expansion.
* NEWS: Mention this.
* tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE, AS@&t@_FOR): Update
tests.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:34 -06:00
Eric Blake
723c9e5c0f Add m4_blank and friends.
* lib/m4sugar/m4sugar.m4 (m4_blank, m4_nblank, m4_default_nblank)
(m4_default_nblank_quoted): New macros.
* NEWS: Document them.
* doc/autoconf.texi (Conditional constructs): Likewise.
* tests/m4sugar.at (m4sugar shorthand conditionals): New test.
Suggested by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:32 -06:00
Eric Blake
15163ab08a Finish upgrade to GFDL 1.3.
* doc/autoconf.texi (copying): Use correct license; comment change
was missed on 2008-11-04.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 06:00:30 -06:00
Eric Blake
08fdbe95ea Test parallel handling of syntax error.
* tests/autotest.at (parallel syntax error): New test.
Suggested by Ralf Wildenhues

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-10 13:16:18 -06:00
Ralf Wildenhues
7cff5c9787 Document awk and config.status line length limitations.
* doc/autoconf.texi (Configuration Actions): The input to
config.status should have reasonable line length.
(Limitations of Usual Tools): Document IRIX, HP-UX awk input
line length limit.
Report by Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-10 16:46:42 +02:00
Ralf Wildenhues
e65a39811a Skip `Multiple languages' test if CC is a C++ compiler.
* tests/compile.at (Multiple languages): Before starting the
test proper, build and run a configure script that tests the
C compiler only, and skips the test if this is found to be a
C++ compiler.
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-10 16:44:08 +02:00
Ralf Wildenhues
d882037ec0 Note that AC_DEFUN is needed for aclocal.
* doc/autoconf.texi (Coding Style): Public third-party macros
should be AC_DEFUN'ed.
Report by John Calcote.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-10 16:37:41 +02:00
Eric Blake
ef8940d9b5 Add undocumented _AS_CLEAN_DIR.
* lib/m4sugar/m4sh.m4 (_AS_CLEAN_DIR): New macro; fixes m4 quoting
in previous patch.
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_prepare>: Use new
macro.
* tests/m4sh.at (_AS@&t@_CLEAN_DIR): New test.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-10 06:26:33 -06:00
Eric Blake
1c34e5113f Avoid problems caused by deleting in-use directory.
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_prepare>: Only
remove the contents of $at_group_dir, not the directory itself.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-09 17:40:17 -06:00
Eric Blake
bd671cbd57 Fix regression in empty test.
* lib/autotest/general.m4 (AT_SETUP): Prep AT_ingroup for fallback
use in empty test.  Fixes regression introduced 2009-04-06.
(_AT_CHECK): Undo fallback when a test is not empty.
(AT_CLEANUP): Expand AT_ingroup before deleting.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-09 17:40:15 -06:00
Paolo Bonzini
fc5c85a6b2 Make a less conservative cross-compilation guess for AC_FUNC_UTIME_NULL.
* lib/autoconf/functions.m4 (AC_FUNC_UTIME_NULL): Assume
not crosscompiling to an obsolete system.
2009-04-09 23:14:27 +02:00
Ralf Wildenhues
34163e58d4 Automake relies on the undocumented `_AC_COMPILER_EXEEXT' macro.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Document that
Automake relies on this macro.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-09 00:00:30 +02:00
Eric Blake
31796ef989 Reduce testsuite size.
* tests/statesave.m4: New file.
* tests/Makefile.am (EXTRA_DIST): Distribute it.
* tests/local.at (AT_CONFIGURE_AC): Reuse file, rather than
repeating inline definition of AC_STATE_SAVE.
(AT_CHECK_ENV): Factor code...
(_AT_CHECK_ENV): ...into shell function.
* tests/m4sh.at (AT_DATA_LINENO): Avoid churn in testsuite.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-06 20:58:35 -06:00
Eric Blake
c283f62edb Handle shell comments in AT_CHECK.
* lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Handle # in
test correctly.  Latent bug in handling shell comment was first
fixed 2008-11-20, but regressed two patches later.
* tests/autotest.at (Shell comment in command): New test.
* NEWS: Document the fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-06 20:52:44 -06:00
Eric Blake
57e6f69b99 Hard fail any test with syntax errors.
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
Guarantee test failure on syntax error, rather than inheriting
status from previous test.
* tests/autotest.at (Syntax error): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-06 20:52:41 -06:00
Eric Blake
ddbb239f12 Beta Release Version 2.63b.
* NEWS: Mention the release.
* README: Clarify that this is a beta release.
* build-aux/texinfo.tex: Synchronize from upstream.
* .x-sc_trailing_blank: Exempt more upstream files.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-31 06:02:38 -06:00
Eric Blake
e7399cdcce Fix testsuite failures under zsh.
* tests/local.at (AT_CHECK_ENV): Exempt $argv and $ARGC, which are
set by zsh -c 'emulate sh'.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-30 22:12:36 -06:00
Eric Blake
d46e5d6844 For now, skip parallel tests under less-tested shells.
* tests/autotest.at (AT_CHECK_AT): Add pre-test argument.
(Tested programs, Startup error messages, AT_CHECK_AT_TITLE)
(Fallacy, Skip, errexit, Long test source lines)
(Debugging a successful test, Debugging script and environment)
(Debugging a failed test, Using atlocal)
(Choosing where testsuite is run): Adjust callers.
(AT_SKIP_PARALLEL_TESTS): New macro, to skip parallel tests except
under zsh, bash, or when TEST_PARALLEL_AUTOTEST is defined.  Makes
it easier to avoid testsuite hangs for users with dash or other
less-tested shell.
(parallel test execution, parallel truth, parallel fallacy)
(parallel skip, parallel errexit)
(parallel autotest and signal handling): Use it.
* BUGS: Mention this.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-30 08:11:09 -06:00
Andris Pavenis
bc9bc82a1e Fix awk substitution of carriage returns on DJGPP.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix typo in
generation of ac_cs_awk_cr.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-24 06:47:09 -06:00
Aaron W. LaFramboise
60e637d68f Work around cygwin bash igncr mode.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fall back to
bash carriage returns if ac_cr lost \r from ``.
* THANKS: Update.
Suggested by Eric Blake.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-24 06:40:23 -06:00
Eric Blake
dbcfd3b29f Fix underquoted example in manual.
* doc/autoconf.texi (Common Shell Constructs) <AS_TR_CPP>:
Properly m4-quote #.
* THANKS: Update spelling.
Reported by Matěj Týč.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-24 06:02:06 -06:00
Eric Blake
abee382683 Manual: mention more expr pitfalls.
* doc/autoconf.texi (Limitations of Usual Tools) <expr (:)>:
Mention HP-UX limitation, and $ ambiguity.
* THANKS: Update.
Reported by Jens Schmidt, in http://bugs.debian.org/466990.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-17 19:33:08 -06:00