summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Update release advicePaul Eggert2020-06-291-2/+1
|
* Stop using up_to_date_pPaul Eggert2020-06-291-9/+22
| | | | | * bin/autom4te.in (up_to_date): Rewrite to stop using up_to_date_p, which has been removed from Automake.
* make fetchPaul Eggert2020-06-2923-2861/+3610
|
* Save and check Autom4te version in cachePaul Eggert2020-06-292-7/+23
| | | | | | | Problem reported in <https://bugs.debian.org/219621>. * bin/autom4te.in: Save and check autom4te version number into cache index. * lib/Autom4te/C4che.pm (save): New arg $version. All callers changed. (good_version): New sub.
* Fix undefined behavior in AC_SYS_LARGEFILEPaul Eggert2020-06-291-1/+1
| | | | | | * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES): Avoid undefined behavior on platforms where off_t is 32 bits. See: https://bugs.debian.org/742780
* Look for AM_PROG_LIBTOOL tooAndreas Barth2020-06-292-0/+3
| | | | | | | | This helps out dh-autoreconf on Debian <https://bugs.debian.org/759739>. * bin/autoreconf.in (autoreconf_current_directory): * lib/autom4te.in (args): Look for AM_PROG_LIBTOOL too. Copyright-paperwork-exempt: Yes
* Define $as_echo and $as_echo_n for backward compatibility.Zack Weinberg2020-03-133-5/+103
| | | | | | | | | | | | | Commit 2b59b6f8a79b8bf77e178ff4e5aa0ede433d39cf removed the internal shell variables $as_echo and $as_echo_n. It turns out that these are used by several widely-used third-party m4 files (notably both gnulib-common.m4 from gnulib, and ax_pthread.m4 from the Autoconf macro archive) as well as any number of existing configure.ac’s. Restore these shell variables, unconditionally defining them to use printf. Issue -Wobsolete warnings if they are used, recommending the use of AS_ECHO and AS_ECHO_N respectively. Add a test which checks both that they do work and that they trigger warnings.
* _AS_REEXEC_WITH_SHELL: don’t use AS_EXIT.Zack Weinberg2020-03-131-1/+4
| | | | | | | | | | | | | | | | | | | | | If _AS_REEXEC_WITH_SHELL fails to exec the selected “better” shell interpreter, and that failure somehow doesn’t terminate the process, it calls AS_EXIT([255]). This expands to an invocation of as_fn_exit. However, the definition of as_fn_exit goes into the M4SH-INIT-FN diversion, whereas _AS_REEXEC_WITH_SHELL goes into the M4SH-SANITIZE diversion, so as_fn_exit won’t be defined at the point of this use. We can’t move the definition of as_fn_exit earlier, because we don’t know that the shell supports shell functions until after we get to the end of the M4SH-SANITIZE diversion. This is only a theoretical bug because, as the comments say, “all the known shells bail out after a failed exec.” However, a shell that doesn’t bail out will instead give the user a flood of nonsensical error messages (starting with “as_fn_exit: not found” and then going on to choke on the rest of the script) so I think we should fix it anyway. There shouldn’t be any problem with using a plain ‘exit’ at this point; no traps are active yet, and we are exiting with an explicit error code.
* README-hacking: re-configure from scratch during bootstrap.Zack Weinberg2020-03-131-0/+2
| | | | | | | | | When building autoconf from a git checkout, recommend running ‘make distclean’ and a second ‘./configure’ after regenerating autoconf’s own configure script using the just-built autoconf. If one only runs ‘make check’ at that point, some configure-time tests will not be repeated using the new code, such as detection of a “better” shell.
* Fix _AS_DETECT_BETTER_SHELL breakagePaul Eggert2020-03-121-1/+1
| | | | | | | | Problem reported by Zack Weinberg in: https://lists.gnu.org/r/autoconf/2020-03/msg00017.html * lib/m4sugar/m4sh.m4 (_AS_RUN): Use sh -c instead of the no-longer-existent $as_echo. This fixes a bug introduced in 2013-01-28T03:44:45Z!gary@gnu.org.
* Fix `make syntax-check'.Zack Weinberg2020-02-262-3/+3
| | | | | | | | | | | | | | | | | | | | | There are two errors caught by make syntax-check currently. First, the recent make update-copyright (d78a7dd95fed24e417dfb4d08124a9ce7c1f7d1e) missed autoconf.texi, I think because there are a bunch of .texi files in doc/ whose copyright years should *not* be updated (e.g. standards.texi, fdl.texi) and the exclusion pattern is too broad. I can't actually *find* the exclusion pattern in the twisty maze of .mk files, all alike, so I just manually updated autoconf.texi. Second, it objects to an edit to an old section of NEWS. This is because of d3dcd5895d64f6c86275c9333e2760a867e540e7, which is a legitimate change (replacing http:// with https:// in a URL) so the correct action is to change old_NEWS_hash to match. * doc/autoconf.texi: Update copyright year. * cfg.mk (old_NEWS_hash): Update to acknowledge commit d3dcd5895d64f6c86275c9333e2760a867e540e7.
* Mention 32-bit GNU/Linux 64-bit inodesPaul Eggert2020-02-211-0/+3
| | | | | | * lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): In a comment, mention 64-bit inode problem on 32-bit GNU/Linux. This is taken from Gnulib.
* Remove definition of _DARWIN_USE_64_BIT_INODEPaul Eggert2020-02-211-3/+0
| | | | | | | | | It’s not needed in currently-supported macOS versions, and was problematic anyway in MacOS X 10.5 which was the only version that could use it. Problem reported by Peter Eisentraut in: https://lists.gnu.org/r/bug-autoconf/2020-02/msg00004.html * lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): Don’t define _DARWIN_USE_64_BIT_INODE.
* maint: make update-copyrightJim Meyering2020-01-0183-99/+119
|
* Document AIX 7.2 printf command gotchaPaul Eggert2019-12-251-0/+6
| | | | | * doc/autoconf.texi (Limitations of Builtins): Document AIX 7.2 sh printf problem with octal escapes.
* Fix terminology typo in mkdir -p checkPaul Eggert2019-10-061-2/+2
| | | | | | * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Say “race-free”, not “thread-safe”. Problem reported by Reuben Thomas in: https://lists.gnu.org/r/bug-autoconf/2019-09/msg00003.html
* Port tests to Bash 5Ondrej Dubaj2019-09-102-3/+6
| | | | | | | | * tests/local.at (AT_CHECK_ENV, AT_CONFIG_CMP): Add BASH_ARGC, BASH_ARGV to list of variables to be ignored when comparing variable space dumps. (AT_CONFIG_CMP): Also ignore LINENO. * tests/m4sh.at: Also unset LINENO in 'reference' and 'test/test-1'.
* Port AC_C_BIGENDIAN to recent clangPaul Eggert2019-05-291-4/+4
| | | | | | | Problem and trivial patch reported by Matthieu Gautier in: https://lists.gnu.org/r/bug-autoconf/2019-05/msg00006.html * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Use unsigned short for values greater than 2**15 - 1.
* doc/autoconf.texi: fix spelling/grammar nitsJim Meyering2018-12-151-39/+84
|
* AC_CHECK_DECL: when cached, don't overwrite a werror flagNoah Misch2018-11-242-2/+6
| | | | | | | | * lib/autoconf/general.m4 (_AC_CHECK_DECL_BODY): Restore werror flags inside the AC_CACHE_CHECK that saves them. Commit 82ef7805faffa151e724aa76c245ec590d174580 broke this. From Tom Lane (trivial change). * tests/semantics.at (AC_CHECK_DECLS): Test this.
* lib: use list of unsafe chars, not safe onesPaul Eggert2018-03-192-7/+13
| | | | | | | | | | * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Rely on list of unsafe chars instead of list of safe ones. This corresponds more closely to POSIX and should result in less quoting. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Adjust to this change. x
* fix quotingDaniel Colascione2018-03-193-2/+22
|
* Fix test suite with modern PerlDaniel Colascione2018-03-191-1/+1
|
* lib: fix update_file timestampsPaul Eggert2017-10-291-11/+10
| | | | | | | Problem reported by Bruno Haible in: https://savannah.gnu.org/support/?109406 * lib/Autom4te/FileUtils.pm (update_file): Use rename + system instead of move, since move truncates file timestamps.
* maint: update URLsPaul Eggert2017-09-2311-67/+55
| | | | Most of this is replacing http: with https: when either will do.
* lib: check ‘install file dir/’Paul Eggert2017-09-231-1/+1
| | | | | | | | * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Check that the system install program works when the destination name has a trailing slash. This helped catch problems in an experimental and never-published version of GNU Coreutils, and is a good thing to check in general.
* maint: sync from AutomakePaul Eggert2017-09-234-70/+2
| | | | This just updates comments, notably URLs.
* Prefer HTTPS to FTP and HTTPPaul Eggert2017-09-1682-255/+255
|
* make fetchPaul Eggert2017-09-1621-1985/+2516
|
* "time stamp" -> "timestamp", as per POSIXPaul Eggert2017-09-166-12/+12
|
* doc: emphasize that config.h must be firstEric Blake2017-01-251-7/+16
| | | | | | | | | | * doc/autoconf.texi (C and Posix Variants, System Services): Remind user to include config.h first. (Configuration Headers): Give another reason why config.h must be first, and mention that only .c files need it. Based on discussion on bugs.debian.org/158969 Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update copyright dates for 2017Jim Meyering2017-01-0184-85/+85
| | | | | * all files: Run "make update-copyright". * doc/autoconf.texi: Update manually.
* doc: Mention effect of 'autoreconf -fi' on INSTALLEric Blake2016-12-232-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | Several projects have a bootstrap script that invokes 'autoreconf -fi' as part of a fresh version control checkout, in order to avoid storing common files in version control, while also allowing contributors to rerun bootstrap to pick up the benefits of any upgrade of one of the autotools. However, the documentation did not make it obvious that such a setup will overwrite any customizations to files like INSTALL, if those files are stored in version control, when automake still considers that file to be standard based on AM_INIT_AUTOMAKE settings. In such a case, a mere 'autoreconf -i' is good for the bootstrap script, while a separate 'autoreconf -f' is good for picking up on an upgrade of any autotools. * bin/autoreconf.in (help): Mention standard files. * doc/autoconf.texi (autoreconf Invocation): Add more text, including warning that mixing --force and --install may undo customizations, and that the set of files impacted is controlled by automake. Reported by Emil Laine <laine.emil@gmail.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* doc: Patterns in m4_pattern_forbid cause error, not warningEric Blake2016-12-221-12/+21
| | | | | | | | | | | | | | The example text regarding a desired literal AC_DC in output claimed that the result would trigger a warning if one does not use creative quoting; but in reality, autoconf's use of m4_pattern_forbid to reserve the entire AC_ namespace makes it a hard error. Reword the section to mention the use of m4_pattern_allow() as the fix, and beef up the example to better demonstrate the problem. * doc/autoconf.texi (Autoconf Language): Improve AC_DC example. Reported by Gavin Smith <gavinsmith0123@gmail.com>. Signed-off-by: Eric Blake <eblake@redhat.com>
* autoheader: check templates of all config headersDaniel Elstner2016-12-213-11/+56
| | | | | | | | | | | | | * bin/autoheader.in: When checking for missing templates, take all config headers into account, not just the one generated by autoheader. This makes it possible to use AC_DEFINE() for secondary headers without duplicating the template into the first header. * tests/tools.at: Add a check for autoheader with multiple config headers. * NEWS: Document the new behavior. Message-Id: <1482336946.31331.2.camel@gmail.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* autoconf: prefer an unrolled loop for trivial AC_CHECK_HEADERSPaolo Bonzini2016-12-211-6/+10
| | | | | | | | | | | | | | | | | | An unrolled loop avoids the cost of spawning sed in AS_TR_SH and AS_TR_CPP. Prefer it if there is nothing in the second and third argument of AC_CHECK_HEADERS and the first argument is a literal. * lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Unroll loop if safe. (_AC_CHECK_HEADERS): Move basic implementation here. (AC_CHECK_INCLUDES_DEFAULT): Remove unnecessary arguments after the first. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Message-Id: <1477933688-4884-3-git-send-email-bonzini@gnu.org> [eblake: perform AC_CHECK_HEADERS_ONCE changes separately, use dnl to reduce generated blank lines] Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* autoconf: prefer an unrolled loop for trivial AC_CHECK_FUNCSPaolo Bonzini2016-12-211-4/+9
| | | | | | | | | | | | | | | An unrolled loop avoids the cost of spawning sed in AS_TR_SH and AS_TR_CPP. Prefer it if there is nothing in the second and third argument of AC_CHECK_FUNCS and the first argument is a literal. * lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Unroll loop if safe. (_AC_CHECK_FUNCS): Move basic implementation here. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Message-Id: <1477933688-4884-2-git-send-email-bonzini@gnu.org> [eblake: perform AC_CHECK_FUNCS_ONCE changes separately, use dnl to reduce generated blank lines] Signed-off-by: Eric Blake <eblake@redhat.com>
* AC_CHECK_HEADERS_ONCE: hoist cache name computation to m4 timeEric Blake2016-12-211-9/+18
| | | | | | | | | | | | | | | | | | | | Rather than perform a sed script on each element of the $ac_header_c_list to compute the corresponding cache name, we can inline enough of AC_CHECK_HEADER to bypass the normal polymorphic code, and instead directly use the literal header and cache name that we are consuming from the list. The resulting configure script is roughly unchanged in size, but performs slightly faster. * lib/autoconf/headers.m4 (AC_CHECK_HEADER_COMPILE): Split out shell function registration... (_AC_CHECK_HEADER_COMPILE_FN): ...to here. (_AC_HEADERS_EXPANSION): Use it to inline enough of AC_CHECK_HEADER to operate on a literal rather than a shell variable, for fewer sed calls. Signed-off-by: Eric Blake <eblake@redhat.com>
* AC_CHECK_FUNCS_ONCE: hoist cache name computation to m4 timeEric Blake2016-12-211-7/+17
| | | | | | | | | | | | | | | | | | | | | | | Rather than perform a sed script on each element of the $ac_func_c_list to compute the corresponding cache name, we can inline enough of AC_CHECK_FUNC to bypass the normal polymorphic code, and instead directly use the literal function name that we are consuming from the list. While at it, we can use echo instead of cat to append to confdefs.h, for another process shaved. The resulting configure script is roughly unchanged in size, but performs slightly faster. * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Split out shell function registration... (_AC_CHECK_FUNC_FN): ...to here. (_AC_FUNCS_EXPANSION): Use it to inline enough of AC_CHECK_FUNC to operate on a literal rather than a shell variable, for fewer sed calls. Signed-off-by: Eric Blake <eblake@redhat.com>
* AC_CHECK_HEADERS_ONCE: hoist CPP name computation to m4 timeEric Blake2016-12-211-4/+16
| | | | | | | | | | | | | | | | | | | | | | Rather than perform a sed script on each element of the $ac_header_c_list to compute the corresponding CPP name, we can make the list store a series of triples of header names, shell-safe names, and CPP names all computed at m4 time. The resulting configure script is slightly larger based on how many headers are checked once, but also performs slightly faster. There is still a sed call in AC_CHECK_HEADER for computing the cache variable name; that will be dealt with next. That patch will also be the one that takes advantage of the shell-safe name. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_ONCE): Track the shell and CPP name in the list... (_AC_HEADERS_EXPANSION): ...and rewrite the list walk to parse off triples of arguments, for fewer sed calls. Signed-off-by: Eric Blake <eblake@redhat.com>
* AC_CHECK_FUNCS_ONCE: hoist CPP name computation to m4 timeEric Blake2016-12-211-3/+13
| | | | | | | | | | | | | | | | | | | | | Rather than perform a sed script on each element of the $ac_func_c_list to compute the corresponding CPP name, we can make the list store a series of pairs of function names and CPP names all computed at m4 time. The resulting configure script is slightly larger based on how many function names are checked once, but also performs slightly faster. There is still a sed call in AC_CHECK_FUNC for computing the cache variable name; that will be dealt with next. * lib/autoconf/functions.m4 (_AC_CHECK_FUNC_ONCE): Track the CPP name in the list... (_AC_FUNCS_EXPANSION): ...and rewrite the list walk to parse off pairs of arguments, for fewer sed calls. Signed-off-by: Eric Blake <eblake@redhat.com>
* AC_CHECK_HEADERS_ONCE: honor current AC_LANGEric Blake2016-12-212-11/+14
| | | | | | | | | | | | | | | | | | | | | | Previously, AC_CHECK_HEADERS_ONCE collected a list of header names to check, but ran the checks using the AC_LANG that was active during the first encounter of the macro. In practice, this is usually the C language, and we haven't had actual reports of projects attempting to use AC_CHECK_HEADERS_ONCE across multiple languages, rather this was discovered by code inspection. With this patch, the code now tracks a separate per-language list of names to check. Note, however, that it is only possible to check for a given header name in one language; attempting to add a name again under AC_CHECK_HEADERS_ONCE while a different language is active is a no-op (this still makes sense because the side-effect of defining the CPP macro HAVE_HEADER does not include a language prefix). * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_ONCE) (_AC_HEADERS_EXPANSION): * NEWS: Mention it. Signed-off-by: Eric Blake <eblake@redhat.com>
* AC_CHECK_FUNCS_ONCE: honor current AC_LANGEric Blake2016-12-202-8/+13
| | | | | | | | | | | | | | | | | | | | | | Previously, AC_CHECK_FUNCS_ONCE collected a list of function names to check, but ran the checks using the AC_LANG that was active during the first encounter of the macro. In practice, this is usually the C language, and we haven't had actual reports of projects attempting to use AC_CHECK_FUNCS_ONCE across multiple languages, rather this was discovered by code inspection. With this patch, the code now tracks a separate per-language list of names to check. Note, however, that it is only possible to check for a given function name in one language; attempting to add a name again under AC_CHECK_FUNCS_ONCE while a different language is active is a no-op (this still makes sense because the side-effect of defining the CPP macro HAVE_FUNC does not include a language prefix). * lib/autoconf/functions.m4 (_AC_CHECK_FUNC_ONCE) (_AC_FUNCS_EXPANSION): * NEWS: Mention it. Signed-off-by: Eric Blake <eblake@redhat.com>
* * doc/autoconf.texi (Using Autotest): Stop mentioning Free Recode.Bruno Haible2016-12-141-1/+1
| | | | Free Wdiff is now GNU Wdiff again.
* autoconf: refine quadrigraph test in _AC_DEFINE_UNQUOTEDPaolo Bonzini2016-11-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | It is a very common case that a quadrigraph appears in the argument of _AC_DEFINE_UNQUOTED, because "#define" is expanded through a quadrigraph. Therefore, restrict the quadrigraph tests to "$" (for "$(" and "${") and "(" (for "$("). At the same time, "#" should not be used inside AC_ECHO because it confuses m4's comment parsing. This pre-existing latent bug is caught by test 251: AC_DEFINE_UNQUOTED([bar], [[%!_!# X]]) Previously the quadrigraph in "@%:@define bar %!_!# X" made Autoconf fall back to cat anyway. Now that Autoconf is not fooled by the quadrigraph, the test catches that "#" is not special-cased. Kudos to Eric for coming up with it! * lib/autoconf/general (_AC_DEFINE_UNQUOTED): Do not blindly use cat on all quadrigraphs. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Message-Id: <1477933688-4884-4-git-send-email-bonzini@gnu.org>
* doc: fix an infinitely recursing exampleQuinn Grier2016-11-021-4/+4
| | | | | | | | | | | | | The "single" macro infinitely recurses because its expansion contains the unquoted text " single-". The "double" macro almost has the same problem, but it is protected by extra quotes. In any case, the macro names being repeated in the macro definitions is not necessary. This commit changes the macro names to "foo" and "bar", which are taken from a very similar example in the GNU M4 1.4.17 manual. See lines 1971 to 1980 of v1.4.17:doc/m4.texi in the GNU M4 Git repository. * doc/autoconf.texi (Quoting and Parameters): Fix broken example.
* doc: detail inconsistencies in sed word boundary handlingPádraig Brady2016-11-011-0/+12
| | | | | | * doc/autoconf.texi (Limitations of usual tools): Display a table showing where the various syntaxes for word boundaries are supported.
* AC_USE_SYSTEM_EXTENSIONS: Remove stray TR in docPaul Eggert2016-09-152-2/+2
|
* AC_USE_SYSTEM_EXTENSIONS: port to more ISO C TSesPaul Eggert2016-09-153-25/+64
| | | | | | | | | | | * doc/autoconf.texi (C and Posix Variants): Rename from "Posix Variants", and document updated behavior. * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Also define __STDC_WANT_IEC_60559_ATTRIBS_EXT__, __STDC_WANT_IEC_60559_DFP_EXT__, __STDC_WANT_IEC_60559_TYPES_EXT__, and __STDC_WANT_MATH_SPEC_FUNCS__. From a suggestion by Joseph Myers in: http://lists.gnu.org/archive/html/autoconf-patches/2016-09/msg00011.html
* AC_HEADER_MAJOR: port to glibc 2.25Eric Blake2016-09-152-20/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glibc 2.25 is deprecating the namespace pollution of <sys/types.h> injecting major(), minor(), and makedev() into the compilation environment, with a warning that insists that users include <sys/sysmacros.h> instead. However, because the expansion of AC_HEADER_MAJOR didn't bother checking sys/sysmacros.h until after probing whether sys/types.h pollutes the namespace, it was not defining MAJOR_IN_SYSMACROS, with the result that code compiled with -Werror chokes on the deprecation warnings because it was not including sysmacros.h. In addition to fixing autoconf (which only benefits projects that rebuild configure after this fix is released), we can also give a hint to distros on how they can populate config.site with a cache variable to force pre-existing configure scripts without the updated macro to behave sanely in the presence of glibc 2.25 (the documentation is especially useful since that cache variable is no longer present in autoconf after this patch). Note that mingw lacks major/minor/makedev in any of its standard headers; for that platform, the behavior of this macro is unchanged (code using the recommended include formula will get a compile error when trying to use major(), whether before or after this patch); but for now, it is assumed that programs actually concerned with creating devices are not worried about portability to mingw. If desired, a later patch could tighten AC_HEADER_MAJOR to fail at configure time if the macros are unavailable in any of the three system headers, but that semantic change is not worth mixing into this patch. * lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Drop check for major within sys/types.h; it interferes with the need to check sysmacros.h first. * doc/autoconf.texi (Particular Headers) <AC_HEADER_MAJOR>: Expand details on usage, and on workarounds for non-updated projects. Signed-off-by: Eric Blake <eblake@redhat.com>