summaryrefslogtreecommitdiff
path: root/tests/torture.at
Commit message (Collapse)AuthorAgeFilesLines
* AS_INIT: try to ensure fds 0, 1, 2 are openZack Weinberg2020-08-271-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A patch was recently proposed for GNU libc to make *all* processes start up with file descriptors 0, 1, and 2 guaranteed to be open. Part of the rationale for this patch was that configure scripts fail catastrophically if these fds are closed, even if you just want to run --help or --version, e.g. $ ./configure --version <&-; echo $? ./configure: line 555: 0: Bad file descriptor 1 Obviously configure scripts cannot rely on behavior specific to GNU libc, so even if that patch gets committed, it might make sense for us to try to make configure scripts robust against being started up with closed stdin/stdout/stderr. This patch is a first attempt at adding this robustness. Detecting whether an fd is closed, readable, writable, or both, is trivial in C. In shell, on the other hand, I have not been able to find a technique that works to my satisfaction on a broad variety of Unixes. This patch uses /proc/<pid>/fdinfo when available (only on Linux, AFAIK). Otherwise, it relies on ‘exec 3>&n’, which can only detect whether an fd is *open*, not whether it is readable or writable. Worse, in some old shells (e.g. Solaris 10 /bin/sh) this construct will succeed regardless of whether fd ‘n’ is closed. (A questionably reliable old beard on Stack Overflow told me that this is a known bug in “the” Bourne shell, by which he presumably means the original implementation.) The second patch in this set adds logic to try using the ‘lsof’ and/or ‘fstat’ commands when available, which helps, but brings other problems and is possibly not worth the hassle. I’m asking for feedback on the code, suggestions for additional techniques to try, and opinions whether this is worth trying to do at all. The patchset is available as the ‘zack/ensure-standard-fds’ branch in git, if anyone would like to experiment with it. I’ve gotten clean testsuite runs on Debian unstable, Solaris 10, NetBSD 9, and FreeBSD 11 (the latter two are somewhat unusual installations) except as noted in the second patch. * lib/m4sugar/m4sh.m4 (_AS_ENSURE_STANDARD_FDS): New macro. (_AS_SHELL_SANITIZE): Move the “Unset variables that we do not need” and “NLS nuisances” blocks immediately after setting IFS; merge the unsetting of CDPATH into the main unsetting loop; move invocation of _AS_PATH_SEPARATOR_PREPARE to immediately above the “Find who we are” block; invoke _AS_ENSURE_STANDARD_FDS immediately before _AS_PATH_SEPARATOR_PREPARE. * tests/base.at (configure with closed standard fds): New test. * tests/torture.at (--help and --version in unwritable directory): New test.
* tests: New helper macro AT_CHECK_MAKE.Zack Weinberg2020-08-201-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This macro factors out some repeated code surrounding tests that run make, such as honoring $MAKE, *not* honoring $MAKEFLAGS, and normalizing the exit status. Partially addresses bug #110267 (problems with Sun’s make barfing on GNU make options from $MAKEFLAGS). Also addresses some unrelated problems I noticed while changing all the tests that run make to use this macro: The shtool test is now properly skipped if shtool is not available on the host system. Some of the Fortran tests would create an executable and then run it, others would create an executable and then the AT_CHECK operation that would run it was commented out. There’s no evidence in the changelog or the git history for why this was done. I uncommented all of the commented-out cases; this can be undone easily if it causes problems. (It can’t be an issue with cross-compilation because some of the tests do run the executable.) * tests/local.at (AT_CHECK_MAKE): New macro wrapping an AT_CHECK invocation of make. All tests that run make updated to use this macro. * tests/fortran.at: Uncomment all AT_CHECKs that run the just-compiled program. * tests/foreign.at (shtool): Skip the test if shtool is not available from the host system. Simplify shell logic.
* Warn if AC_INIT or AC_OUTPUT are missing from configure.ac (#107986)Zack Weinberg2020-08-181-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is almost always incorrect for a configure script to omit either AC_INIT or AC_OUTPUT. Issue warnings in the ‘syntax’ category for this. The implementation is, unfortunately, a bit of a kludge. To check for the _absence_ of a macro invocation, we can use m4_provide_if inside a m4_wrap hook. However, if we activate the m4_wrap hook directly from general.m4, we get spurious warnings at freeze time. We also get warnings whenever a script that’s missing AC_INIT and/or AC_OUTPUT is *traced*, which means we get double warnings from autoconf, and autoheader and aclocal complain about it too, which seems unnecessary. A clean way to deal with this would be to make the hook look for a special macro that’s defined only when autoconf (the program) is invoked without any --trace arguments. Unfortunately, autom4te doesn’t pass --define down to M4, and changing that would involve coordinating with Automake (the project), so instead I’ve gone for the kludge: a new file lib/autoconf/trailer.m4 that calls m4_wrap. This file is *not* included in autoconf.m4f, but it’s installed, and it’s added to the m4 invocation by autoconf (the program) only when not tracing. (It still uses m4_wrap, because we pass it to m4 *before* configure.ac, because otherwise we get nonsense locations for any *other* diagnostics coming out of this autoconf invocation. I don’t know why.) The additional checks in autoreconf are intended to make sure that if autoreconf skips a directory entirely, you get told why. Lots of tests in the testsuite didn’t bother with AC_OUTPUT, and somewhat fewer didn’t bother with AC_INIT; where possible I just added them. Suggested by David A. Wheeler, who submitted a patch, but I didn’t wind up using any of his code. (His implementation used an extra tracing pass, only checked for a missing AC_INIT, and invented a new command-line option to turn off this specific warning. I thought this was tidier overall, despite the kludge.) * lib/autoconf/general.m4 (_AC_FINALIZE): New macro: code to be run when generating configure, after the entire configure.ac is processed. Currently only checks that AC_INIT and AC_OUTPUT were called at some point, issuing syntax-category warnings if not. (AC_INIT, AC_OUTPUT): m4_provide self. * lib/autoconf/trailer.m4: New file that just calls m4_wrap([_AC_FINALIZE]). * lib/local.mk: Install new file. * bin/autoconf.as: Add trailer.m4 to the final invocation of autom4te, but only when not tracing. * bin/autoreconf.in (autoreconf_current_directory): Distinguish in diagnostics between “directory skipped because it doesn’t have a configure.ac or configure.in” (e.g. Cygnus configure) and “directory has a configure.ac but it doesn’t appear to be autoconf input.” * tests/*.at: Fix all tests affected by the new warnings.
* AC_REPLACE_FUNCS: invoke _AH_CHECK_FUNC and AC_LIBSOURCE unconditionally.Zack Weinberg2020-06-291-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating something else, I noticed that AC_REPLACE_FUNCS calls _AH_CHECK_FUNC and AC_LIBSOURCE in the success branch of an AC_CHECK_FUNC. This doesn’t work; both of those are marker macros that need to be expanded unconditionally at m4 time so that traces (placed by autoheader and automake, respectively) will fire. In order to fix this while keeping the code readable, I would up doing a major refactor. There are now four internal macros implementing AC_REPLACE_FUNCS. _AC_REPLACE_FUNC_U is called unconditionally for every shell word in the list passed to AC_REPLACE_FUNCS, and does _AH_CHECK_FUNC + AC_LIBSOURCE if it can, or issues a warning if it can’t. (It could make sense to make this a public function, if we think shell variables in the AC_REPLACE_FUNCS list need to be supported long-term. I dunno if there’s a use case that can’t be handled by AC_REPLACE_FUNCS inside a shell conditional just as well.) _AC_REPLACE_FUNC_L and _AC_REPLACE_FUNC_NL implement the actual test performed for each function to be replaced; the difference is that _L (for literal) can only be used on a function whose name is known at m4 expansion time, _NL (nonliteral) works regardless. _AC_REPLACE_FUNCS, which already existed, handles looping either at m4 time or shell time as appropriate. AC_REPLACE_FUNCS remains a thin wrapper that runs _AC_REPLACE_FUNCS(m4_flatten([$1])). The _bulk_ of the patch is changes to the testsuite so that it notices the original bug. Specifically, AT_CHECK_AUTOHEADER now takes an argument which is a whitespace-separated list of preprocessor macro names that ought to appear in the generated config.h.in. This can be set to ‘ignore’ to skip the test, and unfortunately that’s what the “trivial” per-macro tests have to do (AT_CHECK_MACRO and friends), so coverage is not ideal, but it’s better than what we had. Also, AT_CHECK_M4 now normalizes the backtrace lines that appear in the output of an AC_DIAGNOSE, e.g. configure.ac:6: warning: The macro `AC_LANG_SAVE' is obsolete. configure.ac:6: You should run autoupdate. ../../lib/autoconf/lang.m4:125: AC_LANG_SAVE is expanded from... configure.ac:6: the top level becomes configure.ac:6: warning: The macro `AC_LANG_SAVE' is obsolete. configure.ac:6: You should run autoupdate. lang.m4: AC_LANG_SAVE is expanded from... configure.ac:6: the top level This allows us to write tests for these diagnostics that don’t depend on the relationship between the source and build directories, and won’t break when unrelated patches change the line number of a macro definition. * lib/autoconf/functions.m4 (AC_REPLACE_FUNCS, _AC_REPLACE_FUNCS) (_AC_REPLACE_FUNC): Refactor into AC_REPLACE_FUNCS, _AC_REPLACE_FUNCS, _AC_REPLACE_FUNC_U, _AC_REPLACE_FUNC_L, _AC_REPLACE_FUNC_NL. Ensure that _AH_CHECK_FUNC and AC_LIBSOURCE are invoked unconditionally at m4 expansion time for each literal function name in the argument to AC_CHECK_FUNCS. Issue warnings about non-literal names. * tests/local.at (AT_CHECK_M4): Normalize backtrace lines from the output of AC_DIAGNOSE / m4_warn. (AT_CHECK_AUTOHEADER): Add arg EXPECTED-TMPLS giving a list of preprocessor macro names that should appear in the generated config.h.in. Use AT_CHECK_M4 to invoke autoheader. (_AT_CHECK_AC_MACRO, AT_CHECK_MACRO, AT_CHECK_AU_MACRO): Update uses of AT_CHECK_AUTOHEADER. * tests/fortran.at, tests/semantics.at, tests/tools.at * tests/torture.at: Update all uses of AT_CHECK_AUTOHEADER. * tests/semantics.at (AC_REPLACE_FUNCS test): Make somewhat more thorough, using new functionality of AT_CHECK_M4 and AT_CHECK_AUTOHEADER. Signed-off-by: Zack Weinberg <zackw@panix.com>
* maint: make update-copyrightJim Meyering2020-01-011-1/+1
|
* Prefer HTTPS to FTP and HTTPPaul Eggert2017-09-161-1/+1
|
* maint: update copyright dates for 2017Jim Meyering2017-01-011-1/+1
| | | | | * all files: Run "make update-copyright". * doc/autoconf.texi: Update manually.
* maint: make update-copyrightPaul Eggert2016-02-061-1/+1
|
* maint: bump copyright to 2015Paul Eggert2015-01-021-1/+1
| | | | * all files: Run 'make update-copyright'.
* maint: bump copyright to 2014Eric Blake2014-01-011-1/+1
| | | | | | | Done via 'make update-copyright', since all files are effectively modified and distributed this year via public version control. * all files: Update copyright year.
* maint: bump copyright to 2013Eric Blake2013-01-031-1/+1
| | | | | | | Done via 'make update-copyright', since all files are effectively modified and distributed this year via public version control. * all files: Update copyright year.
* tests: use configure.ac, not configure.in, with aclocal/automake involvedStefano Lattarini2012-07-211-15/+12
| | | | | | | | | | | | | | Do so because future automake and aclocal versions (starting from 1.13) drop support for 'configure.in' as the name of the Autoconf input file. Without this patch, the Autoconf testsuite experiences some spurious failures when run with the development version of aclocal and automake installed early enough in $PATH. * tests/torture.at: Rename 'configure.in' to 'configure.ac' throughout. Remove an obsolete comment about backward-compatibility. Helped-by: Jim Meyering <jim@meyering.net> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* maint: update copyright yearPaul Eggert2012-01-041-1/+1
| | | | All files changed to add 2012, via 'make update-copyright'.
* maint: update copyright yearEric Blake2011-01-041-2/+1
| | | | | | All files changed to add 2011, via 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* tests: XFAIL in the face of a MacOS X bugEric Blake2010-09-211-0/+3
| | | | | | | | | | | * doc/autoconf.texi (Limitations of Usual Tools) <sed>: Mention the issue. * tests/torture.at (Substitute and define special characters): Detect if sed cannot process 8-bit bytes in the C locale. * THANKS: Update. Reported by Rochan. Signed-off-by: Eric Blake <eblake@redhat.com>
* tests: simplify grepping of 'automake --version'.Stefano Lattarini2010-09-131-2/+2
| | | | | | | | | | * tests/tools.at (autom4te preselections): Remove minor redundancies in regular expressions used to grep the output 'automake --version' for test skipping. * tests/torture.at (Configuring subdirectories) (Unusual Automake input files): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* tests: skip broken automake wrapper on MirBSDEric Blake2010-09-131-2/+5
| | | | | | | | | | | | | | | | | On a fresh default install, MirBSD ships with an automake wrapper script that has bad behavior: $ automake --version; echo $? Provide an AUTOMAKE_VERSION environment variable, please 0 * tests/tools.at (autom4te preselections): Skip, rather than fail, if 'automake --version' succeeds without printing a version when an environment variable is not set. * tests/torture.at (Configuring subdirectories) (Unusual Automake input files): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* tests: avoid trashing /Eric Blake2010-08-301-1/+1
| | | | | | | | * tests/torture.at (AC_CONFIG_COMMANDS with temporary directory): Use a relative path, rather than risking issues with /. Reported by Ralf Wildenhues. Signed-off-by: Eric Blake <eblake@redhat.com>
* config.status: minimize use of $tmpEric Blake2010-08-301-0/+28
| | | | | | | | | | | * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP) (_AC_OUTPUT_FILES_PREPARE, _AC_OUTPUT_FILE) (_AC_OUTPUT_HEADERS_PREPARE, _AC_OUTPUT_HEADER): Use $ac_tmp internally, while preserving $tmp for existing users. * tests/torture.at (AC_CONFIG_COMMANDS with temporary directory): New test, that $tmp is available but not essential. Signed-off-by: Eric Blake <eblake@redhat.com>
* docs: mention another issue with variable expansionEric Blake2010-08-261-2/+2
| | | | | | | | | | | | | | | In particular, see http://austingroupbugs.net/view.php?id=221 and http://austingroupbugs.net/view.php?id=255. * doc/autoconf.texi (Shell Substitutions) <${var+value}>: New subsection. <${var=literal}>: Tweak wording. Add mention of an ambiguity allowed by POSIX. * tests/torture.at (Substitute and define special characters): Make test more robust; here, the outer "" is in a here-doc, and does not violate the quoting rules of thumb just documented. Signed-off-by: Eric Blake <eblake@redhat.com>
* docs: mention cost of globbing during variable expansionEric Blake2010-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | * doc/autoconf.texi (Shell Substitutions) <${var=literal}>: Recommend quoting substitutions that might trigger globbing. (Limitations of Builtins) <:>: Likewise. * bin/autoconf.as: Follow our own advice. * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Likewise. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Likewise. * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. * lib/autotest/general.m4 (_AT_FINISH): Likewise. * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Likewise. * tests/autotest.at (parallel autotest and signal handling): Likewise. * tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Likewise. * tests/foreign.at (shtool): Likewise. * tests/fortran.at: Likewise. * tests/tools.at (autom4te preselections): Likewise. * tests/torture.at (VPATH): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* Fix testsuite failure due to bugs in third-party aclocal macros.Ralf Wildenhues2010-08-051-6/+6
| | | | | | | | | | * tests/torture.at (Non-literal AC_CONFIG_SUBDIRS): Create a hand-written aclocal.m4 file, so the -Werror test doesn't fail over aclocal warnings about errors in third-party macro files. Simplify test accordingly, calling autoreconf throughout. Report by Bob Friesenhahn. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Another empty argument through expr workaround.Eric Blake2010-07-201-0/+6
| | | | | | | | | * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Detect empty arguments. Reject empty file argument. * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Check for missing argument. Signed-off-by: Eric Blake <eblake@redhat.com>
* Fix regression of AC_CONFIG_SUBDIRS with multiple arguments.Ralf Wildenhues2010-07-081-1/+53
| | | | | | | | | | | | * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Do not assume the argument is a single word. * tests/torture.at (Deep Package): Extend test to cover this. (Non-literal AC_CONFIG_SUBDIRS): New test. * doc/autoconf.texi (Subdirectories): Add example marker. * NEWS: Update. Report by Bruno Haible. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Fix testsuite to not trigger Solaris sh for bug.Ralf Wildenhues2010-07-041-5/+9
| | | | | | | | | | * tests/torture.at (Torturing config.status) (Substitute a 2000-byte string) (Substitute and define special characters) (Substitute a newline): Quote first argument in for list so that it does not look like an assignment. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Improve VPATH handling in config.status for non-Automake projects.Ralf Wildenhues2010-06-231-0/+86
| | | | | | | | | | * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Be sure not to remove references to a subdir of srcdir. Fix treatment of multiple colon-separated VPATH entries. * tests/torture.at (VPATH): New test. Report by Keith Marshall. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Accept any nonzero exit status upon config.status write failure.Ralf Wildenhues2010-06-231-2/+2
| | | | | | | | * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Normalize nonzero status to 1 for writing to /dev/full, for HP-UX 11.31 cat which exits 2. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Testsuite coverage for AC_CACHE_VAL and caching semantics.Ralf Wildenhues2010-06-081-0/+5
| | | | | | | | | | | | | | * tests/base.at (AC_CACHE_CHECK): Extend test. (AC_CACHE_LOAD): New test. * tests/torture.at (Configuring subdirectories): Also test --config-cache with AC_CONFIG_SUBDIRS. * doc/autoconf.texi (Caching Results): Annotate code snippets which are tested in the test suite. (Cache Files): Documented cache variables may be used on the configure command line to override individual entries in the cache file. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Error and warning message formatting cleanups.Ralf Wildenhues2010-04-261-1/+1
| | | | | | | | | | | | | | | | | * doc/autoconf.texi (Autoconf Language, Generic Structures): Do not capitalize the first word in error messages, do not end them with a period. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS, AC_MSG_FAILURE): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Likewise. * lib/autotest/general.m4 (AT_INIT, at_fn_group_prepare): Likewise. * m4/m4.m4 (AC_PROG_GNU_M4): Likewise. * tests/base.at (AC_TRY_COMMAND): Likewise. * tests/torture.at (datarootdir workaround): Adjust expected message. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Fix placing of ellipses in English text.Ralf Wildenhues2010-04-261-1/+1
| | | | | | | | | | | | | * lib/autoconf/general.m4 (_AC_INIT_HELP): Be sure to add a space before `...' in natural language text. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL_BODY): Likewise. * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Likewise. * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Likewise. * tests/suite.at: Likewise. * tests/torture.at (@%:@define header templates): Likewise. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Formatting cleanups in macro comments.Ralf Wildenhues2010-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | For a list of candidate unaligned underlines, use this script: for f in `git ls-files`; do awk '{ len[NR] = length($0) } /----*/ && len[NR-1] != 0 { if (len[NR-1] != len[NR]) print FILENAME ":" NR ":" $0 }' $f done * lib/autoconf/c.m4, lib/autoconf/erlang.m4, lib/autoconf/fortran.m4, lib/autoconf/functions.m4, lib/autoconf/general.m4, lib/autoconf/lang.m4, lib/autoconf/programs.m4, lib/autoconf/specific.m4, lib/autoconf/status.m4, lib/autoconf/types.m4, lib/autotest/general.m4, lib/autotest/specific.m4, lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4, tests/autotest.at, tests/local.at, tests/m4sh.at, tests/semantics.at, tests/tools.at, tests/torture.at: Fix macro comment format. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* config.status: consistent exit status with nonexistent config file input.Ralf Wildenhues2010-01-191-0/+9
| | | | | | | | | | * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Ensure we exit with status 1 rather than with that of 'false', for reproducibility. (AC_OUTPUT): Ensure to exit 1 in case of config.status failure. * tests/torture.at (Missing templates): Also test code path for $srcdir != '.'. Report by Tim Rice.
* Fix AC_CONFIG_LINKS to generated files when srcdir is absolute.Peter Breitenlohner2010-01-061-2/+71
| | | | | | | | | | | * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Check $ac_source, not $srcdir, for being relative or absolute. * tests/torture.at (AC_CONFIG_LINKS): New test. (AC_CONFIG_LINKS and identical files): Extend test, avoid some forks. Report, patch and testcase example by Peter Breitenlohner. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Update copyright year.Eric Blake2010-01-051-1/+1
| | | | | | All files changed to add 2010, via 'make update-copyright'. Signed-off-by: Eric Blake <ebb9@byu.net>
* Fix AC_CONFIG_SUBDIRS tracing in autoreconf.Ralf Wildenhues2009-11-141-1/+4
| | | | | | | | | | | | | * 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>
* Micro-optimization of config.status substitution.Ralf Wildenhues2009-11-011-1/+37
| | | | | | | | | | * 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>
* Fix testsuite failure on IRIX and AIX.Ralf Wildenhues2009-11-011-1/+1
| | | | | | | | * 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>
* testsuite: pass $configure_options to configure invocations.Ralf Wildenhues2009-09-141-28/+32
| | | | | | | | | | * 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>
* New config.status option --config.Ralf Wildenhues2009-09-111-2/+13
| | | | | | | | | | | * 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>
* Update License to GPLv3+ including new Autoconf Exception.Ralf Wildenhues2009-09-091-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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+.
* Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED.Eric Blake2009-04-241-2/+2
| | | | | | | | | | | | | | | * 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>
* Use URLs in --help output, part 2: configure.Eric Blake2009-01-271-3/+6
| | | | | | | | | | | | | | | | | | | * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump copyright date. (_AC_INIT_PACKAGE): Support optional URL parameter, mapped to AC_PACKAGE_URL. (_AC_INIT_DEFAULTS, _AC_INIT_PREPARE): Substitute it. (_AC_INIT_HELP): Use it in './configure --help' output. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, for './config.status --help'. Bump copyright date. * doc/autoconf.texi (Initializing configure) <AC_INIT>: Document new parameter. * NEWS: Likewise. * tests/tools.at (autoheader): Adjust test. * tests/torture.at (@%:@define header templates) (Torturing config.status): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Fix testsuite failure on Solaris.Eric Blake2008-11-221-1/+2
| | | | | | | * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Normalize failure status to 1. Signed-off-by: Eric Blake <ebb9@byu.net>
* Reduce forks in AC_DEFINE.Eric Blake2008-11-201-7/+37
| | | | | | | | | | | | | * lib/autoconf/general.m4 (_AC_DEFINE_Q_PRINT): New macro. (_AC_DEFINE_Q): Use it to avoid forks for all AC_DEFINE and most AC_DEFINE_UNQUOTED. * lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Properly quote #. * tests/torture.at (Substitute and define special characters): (Define to a 2000-byte string): Enhance tests to cover AC_DEFINE_UNQUOTED. (@%:@define header templates): Enhance test to cover #. Signed-off-by: Eric Blake <ebb9@byu.net>
* Adjust expected output.Eric Blake2008-11-041-1/+1
| | | | | | | * tests/torture.at (Missing templates): Reflect added quoting. Detected by Bob Proulx's buildbot. Signed-off-by: Eric Blake <ebb9@byu.net>
* Use AS_VAR_ARITH.Eric Blake2008-10-271-1/+1
| | | | | | | | | | | | * lib/autotest/general.m4 (at_func_arith): Delete; replace all clients with AS_VAR_ARITH instead. * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE): Use new macro. * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Likewise. * tests/torture.at (Torturing config.status): Likewise. * tests/tools.at (autom4te --force): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Format warning and error messages to match GCS.Peter Eisentraut2008-08-221-1/+1
| | | | | | | | | | | | | | * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK) (_AC_INIT_PARSE_ARGS, _AC_CACHE_DUMP): Start warning and error messages with a lowercase letter, end them without punctuation. * lib/autoconf/lang.m4 (AC_NO_EXECUTABLES): Likewise. * lib/autoconf/libs.m4 (AC_PATH_X): Likewise. * lib/autoconf/status.m4 (AC_OUTPUT, _AC_OUTPUT_MAIN_LOOP): Likewise. * tests/fortran.at (GNU Fortran): Likewise. * tests/torture.at (Deep Package): Likewise. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Fix AC_CONFIG_FILES([$var]) 2.62 regression.Ralf Wildenhues2008-08-041-0/+17
| | | | | | | | | | * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Flatten whitespace in $ac_config_files and $ac_config_headers. * tests/torture.at (Parameterized AC_CONFIG_FILES): New test. Report by Andreas Schwab and Per Øyvind Karlsen. * THANKS: Update. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Fix '#undef variable /* comment */' transform in config headers.Ralf Wildenhues2008-06-171-0/+4
| | | | | | | | | | | | * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): For undefined preprocessor macros that are followed by a comment in the header template, do not create nested comments in the output. * tests/torture.at (@%:@define header templates): Extend test. * NEWS: Update. Report by Karsten Hopp <karsten@redhat.com>. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Let AC_MSG_FAILURE report pwd.Ralf Wildenhues2008-05-121-0/+11
| | | | | | | * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): Output $ac_pwd along with fatal failure. * tests/torture.at (Deep Package): Extend test. Reported numerous times against GCC, and probably other packages.