]> git.ipfire.org Git - thirdparty/autoconf.git/log
thirdparty/autoconf.git
8 years agoAC_USE_SYSTEM_EXTENSIONS: port to recent ISO C
Paul Eggert [Wed, 14 Sep 2016 01:28:19 +0000 (18:28 -0700)] 
AC_USE_SYSTEM_EXTENSIONS: port to recent ISO C

* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
Also define __STDC_WANT_IEC_60559_BFP_EXT__,
__STDC_WANT_IEC_60559_FUNCS_EXT__, and __STDC_WANT_LIB_EXT2__.
* NEWS, doc/autoconf.texi (Posix Variants):
Document this.  Also, document other changes in this area
that were not properly documented before.

8 years agodoc: port to Texinfo 6.3
Paul Eggert [Wed, 14 Sep 2016 00:51:18 +0000 (17:51 -0700)] 
doc: port to Texinfo 6.3

* doc/autoconf.texi: Remove obsolete @setcontentsaftertitlepage
that provokes a warning from Texinfo 6.3.

8 years agodoc: use @xref correctly
Eric Blake [Tue, 13 Sep 2016 22:44:02 +0000 (17:44 -0500)] 
doc: use @xref correctly

Silences this warning from new-enough texinfo:
./doc/autoconf.texi:14236: warning: @xref node name should not contain `.'

* doc/autoconf.texi (Macro Definitions): No need for .info.

Signed-off-by: Eric Blake <eblake@redhat.com>
9 years agoPort AC_CHECK_HEADER_STDBOOL to C++11
Paul Eggert [Tue, 31 May 2016 15:57:20 +0000 (08:57 -0700)] 
Port AC_CHECK_HEADER_STDBOOL to C++11

* lib/autoconf/headers.m4: Port to C++11.
Problem reported by David Seifert in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-05/msg00052.html

9 years agoUse American spelling for "initialize"
Paul Eggert [Sun, 3 Apr 2016 20:57:17 +0000 (13:57 -0700)] 
Use American spelling for "initialize"

* lib/autoconf/c.m4: Prefer the spelling "initializer" in comments.

9 years agoautom4te: fix problem when tracing to '-'
Paul Eggert [Tue, 15 Mar 2016 17:51:26 +0000 (10:51 -0700)] 
autom4te: fix problem when tracing to '-'

* bin/autom4te.in (handle_traces): When $output is '-', use
stdout rather than creating a file named '-'.  This fixes a problem
introduced by the recent port to the new Autom4te::XFile API.

9 years agoAlso try clang
Paul Eggert [Tue, 15 Mar 2016 16:34:11 +0000 (09:34 -0700)] 
Also try clang

Problem reported by Václav Zeman in:
http://lists.gnu.org/archive/html/autoconf/2012-10/msg00000.html
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_OBJC): Also try clang.
(AC_PROG_CXX): Also try clang++.
These are at the end of the existing lists, to avoid compatibility
issues in older installations.

9 years agoPort C11 and C++11 testing to clang
Paul Eggert [Tue, 15 Mar 2016 15:56:43 +0000 (08:56 -0700)] 
Port C11 and C++11 testing to clang

* lib/autoconf/c.m4 (_AC_C_C99_TEST_HEADER):
Include stddef.h, for offsetof.
(_AC_PROG_CC_C11): Limit _Static_assert to integer constant
expressions.  Suggested by Nick Bowler in:
http://lists.gnu.org/archive/html/autoconf/2016-02/msg00009.html
(_AC_CXX_CXX11_TEST_BODY): Don't use string literals to initialize
non-const pointers.  Suggested by Mike Miller in:
http://lists.gnu.org/archive/html/autoconf/2016-02/msg00008.html

9 years agoFix broken URL to Unix history
Paul Eggert [Tue, 15 Mar 2016 15:15:35 +0000 (08:15 -0700)] 
Fix broken URL to Unix history

* doc/autoconf.texi (Systemology): Fix broken URL.
Reported by Tom Wilcox.

9 years agoAC_C_RESTRICT: port better to non-GCC + glibc
Paul Eggert [Tue, 23 Feb 2016 07:07:02 +0000 (23:07 -0800)] 
AC_C_RESTRICT: port better to non-GCC + glibc

Problem reported by Dwight Guth in:
http://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
* lib/autoconf/c.m4 (AC_C_RESTRICT): Prefer __restrict__ to __restrict.
Also, fix and update some comments.

9 years agoMove config.* man pages to its source tree
Paul Eggert [Sun, 7 Feb 2016 01:16:35 +0000 (17:16 -0800)] 
Move config.* man pages to its source tree

Suggested by Ben Elliston in:
https://lists.gnu.org/archive/html/autoconf-patches/2015-11/msg00000.html
* man/config.guess.x, man/config.sub.x: Remove.
* NEWS: Mention this.
* man/local.mk (dist_man_MANS): Remove them.
($(mansrcdir)/config.guess.1, $(mansrcdir)/config.sub.1): Remove rules.

9 years agomaint: make update-copyright
Paul Eggert [Sun, 7 Feb 2016 01:08:27 +0000 (17:08 -0800)] 
maint: make update-copyright

9 years agoport to new Autom4te::XFile API
Paul Eggert [Sat, 6 Feb 2016 20:56:55 +0000 (12:56 -0800)] 
port to new Autom4te::XFile API

9 years agomake fetch
Paul Eggert [Sat, 6 Feb 2016 20:39:10 +0000 (12:39 -0800)] 
make fetch

9 years agoPort better to gcc -fsanitize=address
Paul Eggert [Sat, 6 Feb 2016 18:13:50 +0000 (10:13 -0800)] 
Port better to gcc -fsanitize=address

* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
Free heap-allocated storage before exiting.

9 years agoFix memory leak in AC_FUNC_MMAP
Paul Eggert [Sat, 6 Feb 2016 05:06:20 +0000 (21:06 -0800)] 
Fix memory leak in AC_FUNC_MMAP

* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Fix memory leak
in test case, found by configuring with gcc -fsanitize=address.

9 years agoDocument dash ${*-unset} behavior
Paul Eggert [Fri, 5 Feb 2016 22:15:07 +0000 (14:15 -0800)] 
Document dash ${*-unset} behavior

* doc/autoconf.texi (Shell Substitutions): Document dash
incompatibility.  Problem reported by David Caldwell in:
http://bugs.gnu.org/22556

9 years agoAdd -mdir flag for NAG Fortran compiler
Thomas Jahns [Thu, 8 Oct 2015 08:12:41 +0000 (10:12 +0200)] 
Add -mdir flag for NAG Fortran compiler

* lib/autoconf/fortran.m4 (AC_FC_MODULE_OUTPUT_FLAG):
Also try -mdir.  Also, prefer autoconf macros instead of verbatim shell
code and make tests safer.
Copyright-paperwork-exempt: yes

9 years agotests: port to recent libtool diagnostics
Paul Eggert [Sat, 5 Sep 2015 14:55:52 +0000 (07:55 -0700)] 
tests: port to recent libtool diagnostics

Problem reported by Christian Fafard in:
http://lists.gnu.org/archive/html/bug-autoconf/2015-09/msg00009.html
* tests/foreign.at (libtool): Run the scripts in the C locale,
so that we need not worry about localized quotes in their output.

10 years agoAdd /opt/X11/include to X search path
Paul Eggert [Sat, 8 Aug 2015 01:09:17 +0000 (18:09 -0700)] 
Add /opt/X11/include to X search path

* lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT):
Add /opt/X11/include for OS X.
Problem reported by Daniel Macks at:
http://lists.gnu.org/archive/html/bug-autoconf/2015-08/msg00002.html

10 years agodoc: mention 'for' syntax issue on older shells
Eric Blake [Thu, 4 Jun 2015 20:00:29 +0000 (14:00 -0600)] 
doc: mention 'for' syntax issue on older shells

Based on a report by Michael Felt, via Paul Eggert on the
coreutils list.

* doc/autoconf.texi (Limitations of Builtins) <for>: Document
problem with 'for var in ;'.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoAC_CHECK_DECL, AC_CHECK_DECLS: port to the Clang compiler
Noah Misch [Thu, 14 May 2015 01:11:47 +0000 (21:11 -0400)] 
AC_CHECK_DECL, AC_CHECK_DECLS: port to the Clang compiler

* lib/autoconf/general.m4 (_AC_UNDECLARED_WARNING): New macro.
(_AC_CHECK_DECL_BODY): Call it once per language; treat warnings as
errors when its verdict indicates that.
* tests/semantics.at (AC_CHECK_DECLS): Add a macro call that relies on
the new semantics.  Avoid -Wmissing-variable-declarations warnings.
* doc/autoconf.texi (Generic Declarations): Document the implications.
* NEWS: Mention this change.

10 years agom4_pattern_forbid: better documentation
Matěj Týč [Thu, 16 Apr 2015 21:00:24 +0000 (23:00 +0200)] 
m4_pattern_forbid: better documentation

Give a more concrete description of what the m4_pattern_forbid
thingy that pretends it is a macro accepts as an argument.

Copyright-paper-exempt: Yes
Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agolib: use shorter way to test if variable is set
Eric Blake [Wed, 15 Apr 2015 22:31:34 +0000 (16:31 -0600)] 
lib: use shorter way to test if variable is set

Based on an idea by Bernhard Reutner-Fischer.

We frequently used the idiom of 'test "${var+set}" = set' to
test if $var was set to a non-empty string, but this can portably
be trimmed to a more compact 'test ${var+y}' for a smaller
configure file.  Testing that a variable is not set can be done
with '${var+false} :' (although the value of $? is not reliably
1 when the variable is set).

The code for AS_VAR_TEST_SET already used the form '${var+:} false',
but it is slightly longer, and does not guarantee $? of 1.

Tested on coreutils, where the resulting configure file is about
1k smaller.

* doc/autoconf.texi (Shell Substitutions): Prefer shorter sequence
for testing if a variable is set.
(Limitations of Builtins) <test (strings)>: Document it.
* configure.ac: Use it.
* lib/autoconf/c.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G)
(_AC_PROG_OBJC_G, _AC_PROG_OBJCXX_G): Likewise.
* lib/autoconf/fortran.m4 (_AC_PROG_FC_G): Likewise.
* lib/autoconf/general.m4 (_AC_ENABLE_IF_ACTION, AC_CACHE_SAVE):
Likewise.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Likewise.
* lib/autoconf/programs.m4 (AC_PROG_INSTALL, AC_PROG_MKDIR_P)
(_AC_PROG_LEX_YYTEXT_DECL): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Likewise.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* tests/base.at (AC_CACHE_CHECK): Likewise.
* tests/m4sh.at (LINENO): Likewise.
* lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE)
(_AS_DETECT_BETTER_SHELL, _AS_SHELL_SANITIZE)
(_AS_PATH_SEPARATOR_PREPARE): Likewise.
(AS_VAR_TEST_SET): Use shorter sequence.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agom4_set_foreach: minor optimization
Eric Blake [Tue, 21 Apr 2015 12:14:33 +0000 (06:14 -0600)] 
m4_set_foreach: minor optimization

As a minor optimization, most macros in m4sugar.m4 try to avoid
output of 'dnl' in the expansion, to reduce the number of macros
that must be expanded at each call site.

* lib/m4sugar/m4sugar.m4 (m4_set_foreach): Don't expand dnl in all
callers.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agom4sugar: fix pop typo in m4_set_foreach
Nick Bowler [Tue, 21 Apr 2015 06:57:18 +0000 (23:57 -0700)] 
m4sugar: fix pop typo in m4_set_foreach

* lib/m4sugar/m4sugar.m4 (m4_set_foreach): Pop macro definition.
Copyright-paperwork-exempt: Yes

10 years agoAC_PROG_MKDIR_P: reduce macro output size
Eric Blake [Thu, 9 Apr 2015 14:47:10 +0000 (08:47 -0600)] 
AC_PROG_MKDIR_P: reduce macro output size

Merging two case globs into one gives slightly smaller files and
less time spent in shell globbing on systems that lack GNU mkdir.

* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Combine two GNU cases.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoAC_PROG_MKDIR_P: Also accept BusyBox mkdir -p
Bernhard Reutner-Fischer [Thu, 9 Apr 2015 12:43:30 +0000 (14:43 +0200)] 
AC_PROG_MKDIR_P: Also accept BusyBox mkdir -p

* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Accept BusyBox.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
10 years agotests: avoid two false-positive parallel test failures
Jim Meyering [Sun, 1 Feb 2015 19:41:27 +0000 (11:41 -0800)] 
tests: avoid two false-positive parallel test failures

* tests/local.mk (check-local): Add a leading "+",
to void false-positive test failures when running
them in parallel.  Before this change, running e.g.,
"make check TESTSUITEFLAGS=--jobs=15" would always
fail the two "make"-invoking tests: "C unit tests"
and "C unit tests (EXEEXT)".
(installcheck-local): Likewise for "installcheck".

10 years agodoc: -f is now portable for cp and ln
Paul Eggert [Fri, 2 Jan 2015 21:02:48 +0000 (13:02 -0800)] 
doc: -f is now portable for cp and ln

This follows up on a comment by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00011.html
* doc/autoconf.texi (Limitations of Usual Tools):
Remove circa-1990 advice about avoiding cp -f and ln -f.
Although that advice was reasonable for the early 1990s, the -f
option is portable for both cp and ln nowadays.  These options
were standardized in POSIX 1003.2-1992, and pre-POSIX systems such
as SunOS 4 are no longer of practical concern.

10 years agomaint: bump copyright year
Paul Eggert [Fri, 2 Jan 2015 21:01:08 +0000 (13:01 -0800)] 
maint: bump copyright year

* doc/autoconf.texi: Update copyright year.
This had to be done by hand.

10 years agomaint: bump copyright to 2015
Paul Eggert [Fri, 2 Jan 2015 20:59:21 +0000 (12:59 -0800)] 
maint: bump copyright to 2015

* all files: Run 'make update-copyright'.

10 years agoFix spurious testsuite failure when /bin/sh is dash
Stefano Lattarini [Wed, 17 Dec 2014 12:03:35 +0000 (13:03 +0100)] 
Fix spurious testsuite failure when /bin/sh is dash

The testsuite used slightly different logic in the code employed to
decide whether a test should be skipped due to a limitation of the
selected shell, and in the code running the test itself.

* tests/autotest.at (Syntax error): Adjust.
(parallel syntax error): Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
10 years agotests: avoid spurious test failure with libtool 2.4.3
Gary V. Vaughan [Mon, 3 Nov 2014 06:25:03 +0000 (07:25 +0100)] 
tests: avoid spurious test failure with libtool 2.4.3

Based on a report by Bruce Dubbs.

* tests/foreign.at (Libtool): Be tolerant of 'quote' replacing the
older `quote'.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agodocs: mention that not all values can be exported
Eric Blake [Sun, 28 Sep 2014 00:24:06 +0000 (18:24 -0600)] 
docs: mention that not all values can be exported

There has been a LOT of news about bash's Shell Shock bug lately.
Document some of the ramifications it has on portable scripting.

* doc/autoconf.texi (Limitations of Builtins) <export>: Add some
details about Shell Shock CVE-2014-6271.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agodoc: distinguish GCC from GNU C, etc.
Paul Eggert [Mon, 8 Sep 2014 17:15:34 +0000 (10:15 -0700)] 
doc: distinguish GCC from GNU C, etc.

* doc/autoconf.texi (C Compiler, Objective C Compiler)
(Objective C++ Compiler, Fortran Compiler): Be more careful about
distinguishing GNU C from GCC, and similarly for other languages.
Problem reported by Marko Lindqvist in:
http://lists.gnu.org/archive/html/autoconf/2014-09/msg00027.html

10 years agoautoconf: clarify "checking" message for GNU-compatible compiliers
Paul Eggert [Mon, 8 Sep 2014 16:25:08 +0000 (09:25 -0700)] 
autoconf: clarify "checking" message for GNU-compatible compiliers

Problem reported by Bastien Chevreux in:
http://lists.gnu.org/archive/html/autoconf/2014-09/msg00022.html
and idea for fix by Eric Blake in:
http://lists.gnu.org/archive/html/autoconf/2014-09/msg00025.html
* doc/autoconf.texi (Running the Preprocessor)
(Present But Cannot Be Compiled):
Adjust examples to match current behavior.
* lib/autoconf/lang.m4 (_AC_LANG_COMPILER_GNU): Say
"checking whether the compiler supports GNU C", not
"checking whether we are using the GNU C compiler".

10 years agoautoconf: fix typo in previous change
Paul Eggert [Tue, 2 Sep 2014 19:08:24 +0000 (12:08 -0700)] 
autoconf: fix typo in previous change

* lib/autoconf/c.m4 (AC_C_RESTRICT): Fix typo in previous change.

10 years agoautoconf: port 'restrict' to GCC 4.2.1
Paul Eggert [Tue, 2 Sep 2014 18:43:32 +0000 (11:43 -0700)] 
autoconf: port 'restrict' to GCC 4.2.1

* lib/autoconf/c.m4 (AC_C_RESTRICT): Detect GCC bug 14050.
Problem reported by Marco Munari for OpenBSD 5.5.

11 years agocross-compiling: handling modern platforms able to run foreign binaries.
Jehan [Wed, 2 Oct 2013 05:53:50 +0000 (18:53 +1300)] 
cross-compiling: handling modern platforms able to run foreign binaries.

* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_CROSS):
When only --host is set, and no --build, but in the end, the resulting
computed $build and $host are different, set $cross_compiling = yes.
Indeed we can't rely only on a successful test program run, because false
positives occur on some platforms. In particular modern GNU/Linux
distributions set Wine to automatically handle Windows binaries.
Consequently $cross_compiling gets set to "no" even though we are in an
obvious cross-compilation case.
(tiny change)

11 years agoautoconf: modernize AC_C_VARARRAYS for C11
Paul Eggert [Fri, 8 Aug 2014 00:16:40 +0000 (17:16 -0700)] 
autoconf: modernize AC_C_VARARRAYS for C11

* lib/autoconf/c.m4 (AC_C_VARARRAYS): Define __STDC_NO_VLA__ if
VLAs are not supported, as this is what C11 does.  The old macro
HAVE_C_VARARRAYS is still defined if they are supported, but is
now obsolescent.  Also, check for VLA bug in GCC 3.4.3.
* doc/autoconf.texi (C Compiler), NEWS: Document the above.

11 years agodoc: Solaris 11 supports $(...)
Paul Eggert [Thu, 7 Aug 2014 23:08:49 +0000 (16:08 -0700)] 
doc: Solaris 11 supports $(...)

* doc/autoconf.texi (Shell Substitutions): Say that $(...) isn't
working in Solaris 10 and earlier, not in "recent releases".

11 years agodoc: modernize character encoding
Paul Eggert [Thu, 7 Aug 2014 22:03:38 +0000 (15:03 -0700)] 
doc: modernize character encoding

* doc/autoconf.texi: Specify @documentencoding UTF-8.  Don't abuse
'`' to mean open quote, unless Texinfo already interprets it that
way.  Be more careful about hyphen versus minus versus endash
versus emdash.

11 years agom4sh: allow trailing newlines in shell conditions
Eric Blake [Thu, 17 Jul 2014 20:52:57 +0000 (14:52 -0600)] 
m4sh: allow trailing newlines in shell conditions

Dimitrios Apostolou reported getting a shell syntax error for
this construct in his configure.ac:

AM_CONDITIONAL([HAVE_LIBXML2],
    [test "x$with_libxml2" != xno &&
     test "x$ac_cv_lib_xml2_xmlFirstElementChild" = xyes]
)

He analyzed it to a root cause: his trailing newline, coupled
with an 'if $2; then' construct in the macro body, resulted in
configure containing:
if test ... xyes
; then
where the semicolon is a syntax error in shell; and proposed
a patch to automake to fix his use case.

While that macro is not under our control, it does highlight
the fact that the shell can use either ; or newline to
terminate a conditional prior to the next keyword in a compound
statement.  If we use newline, we gain two benefits - the
configure file is slightly smaller (more lines, but fewer
bytes), and any user that doesn't realize that unquoted
trailing newlines in a macro argument are still significant
can still generate valid shell code when their argument is
used in a shell compound statement.

* lib/m4sugar/m4sh.m4 (AS_IF, _AS_IF, _AS_CLEAN_DIR): Prefer
newline over semicolon to end user-supplied conditionals.
* lib/autoconf/general.m4 (AC_CONFIG_AUX_DIRS): Likewise.
* lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Likewise.
* lib/autoconf/programs.m4 (_AC_PATH_PROGS_FEATURE_CHECK):
Likewise.
* tests/m4sh.at (AS_IF and AS_CASE): Test it.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agomaint: add to THANKS
Eric Blake [Fri, 30 May 2014 15:03:10 +0000 (09:03 -0600)] 
maint: add to THANKS

* THANKS: Update.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoAC_INIT: quote invalid feature names
Eric Blake [Fri, 30 May 2014 14:55:10 +0000 (08:55 -0600)] 
AC_INIT: quote invalid feature names

Changes:
   configure: error: invalid feature name: debug
to
   configure: error: invalid feature name: `debug '
to make it obvious if trailing space is the reason why a feature
name was rejected; similar to existing error messages elsewhere
about invalid shell variable names.

* lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE2): Add quotes.
Reported by Noel Grandin.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoautoconf: fix typo in description generated by AC_RUN_IFELSE
Paul Eggert [Mon, 12 May 2014 05:15:40 +0000 (22:15 -0700)] 
autoconf: fix typo in description generated by AC_RUN_IFELSE

* lib/autoconf/general.m4 (_AC_RUN_IFELSE): "run" not "link"
in description.

11 years agoChange main () to main (void) for C/C++
Vincent Lefevre [Sun, 5 Jan 2014 03:50:02 +0000 (04:50 +0100)] 
Change main () to main (void) for C/C++

This patch changes "main ()" to "main (void)" for C/C++.
See: http://lists.gnu.org/archive/html/bug-autoconf/2014-01/msg00005.html

On my machine, before this patch, 3 tests were failing:

  38: tools.at:1329      autom4te cache locking
 218: autotest.at:1893   C unit tests
      ac_config_testdir at_tested autotest
 219: autotest.at:1948   C unit tests (EXEEXT)
      ac_config_testdir at_tested autotest

With this patch, 2 tests were failing:

 218: autotest.at:1893   C unit tests
      ac_config_testdir at_tested autotest
 219: autotest.at:1948   C unit tests (EXEEXT)
      ac_config_testdir at_tested autotest

(I suspect that 38 is unrelated.)

Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
Copyright-paperwork-exempt: Yes

11 years agodoc: give an example of using the macro for pkg-config
Eric Blake [Mon, 27 Jan 2014 18:33:07 +0000 (11:33 -0700)] 
doc: give an example of using the macro for pkg-config

The autoconf manual doesn't mention any examples of actually
using m4_pattern_forbid.  Yet this is the perfect macro for
avoiding the all-too-common failure mode of configure dying with:

      checking if libxml2 is present... ./configure: line 11586: syntax
 error
 near unexpected token `LIBXML2,'
      ./configure: line 11586: `PKG_CHECK_MODULES(LIBXML2, libxml-2.0>=
 2.6.19,'

for developers that forgot to install pkg-config.  While we don't
necessarily advertise the use of PKG_CHECK_MODULES, it is a
common enough situation that the manual should make it easier to
help developers learn about missing third-party macros.

Based on a mailing list report by Daniel Pocock:
http://lists.gnu.org/archive/html/autoconf/2014-01/msg00030.html

* doc/autoconf.texi (Forbidden Patterns): Add examples.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agotests: don't let config.site affect testsuite
Eric Blake [Wed, 1 Jan 2014 23:46:48 +0000 (16:46 -0700)] 
tests: don't let config.site affect testsuite

Test 236 "configure directories" failed for me on 64-bit Fedora 20;
it boiled down to the system's config.site causing libdir to
default to /usr/lib64 instead of the autoconf default of /usr/lib.

* tests/base.at (configure directories): Neutralize any preinstalled
config.site from the system.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agomaint: fix 'make syntax-check' findings
Eric Blake [Wed, 1 Jan 2014 23:32:04 +0000 (16:32 -0700)] 
maint: fix 'make syntax-check' findings

Fix syntax check warnings that are unrelated to the new copyright
year.

* lib/local.mk (lib/autoscan/autoscan.list): Reduce indent, to
avoid mix of tab and 8 spaces.
* bin/local.mk (bin/autoconf.in): Likewise.
* lib/autoconf/c.m4 (_AC_CXX_CXX98_TEST_BODY): Use consistent case
in message.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agomaint: bump copyright to 2014
Eric Blake [Thu, 3 Jan 2013 21:58:52 +0000 (14:58 -0700)] 
maint: bump copyright to 2014

Done via 'make update-copyright', since all files are effectively
modified and distributed this year via public version control.

* all files: Update copyright year.

11 years agoExpose the checks done by AC_INCLUDES_DEFAULT as a public macro.
Zack Weinberg [Sun, 15 Sep 2013 21:16:18 +0000 (17:16 -0400)] 
Expose the checks done by AC_INCLUDES_DEFAULT as a public macro.

 * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
   Rename to AC_CHECK_INCLUDES_DEFAULT.  All callers changed.
   (AC_HEADER_STDC, AC_UNISTD_H): Use AC_CHECK_INCLUDES_DEFAULT instead
   of previous kludge.

 * doc/autoconf.texi, NEWS: Document AC_CHECK_INCLUDES_DEFAULT.

11 years agoUse AC_CHECK_{DECLS,FUNCS,HEADERS}_ONCE more in specific-check macros.
Zack Weinberg [Sun, 15 Sep 2013 16:24:45 +0000 (12:24 -0400)] 
Use AC_CHECK_{DECLS,FUNCS,HEADERS}_ONCE more in specific-check macros.

 * lib/autoconf/functions.m4 (AC_FUNC_CHOWN): No need to check for unistd.h.
   (_AC_LIBOBJ_FNMATCH): Use AC_CHECK_DECLS_ONCE and AC_CHECK_FUNCS_ONCE.
   (_AC_LIBOBJ_GETLOADAVG): Use AC_CHECK_FUNCS_ONCE for setlocale.
   (AC_FUNC_MMAP): Use AC_CHECK_FUNCS_ONCE for getpagesize.
   (AC_FUNC_SELECT_ARGTYPES): Use AC_CHECK_HEADERS_ONCE for sys/select.h and
   sys/socket.h.
   (AC_FUNC_STRERROR_R): Use AC_CHECK_DECLS_ONCE + AC_CHECK_FUNCS_ONCE for
   strerror_r.
   (AC_FUNC_UTIME_NULL): Use AC_CHECK_HEADERS_ONCE for utime.h.
   (AC_FUNC_FORK): Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE.
   (AC_FUNC_VPRINTF): Use AC_CHECK_FUNCS_ONCE for vprintf (but not _doprnt).

 * lib/autoconf/headers.m4 (AC_HEADER_TIME, AC_MEMORY_H): Use
   AC_CHECK_HEADERS_ONCE.

11 years agoUse AC_CHECK_HEADERS_ONCE for the tests done by AC_INCLUDES_DEFAULT.
Zack Weinberg [Sat, 14 Sep 2013 16:42:15 +0000 (12:42 -0400)] 
Use AC_CHECK_HEADERS_ONCE for the tests done by AC_INCLUDES_DEFAULT.

 * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): Divide into a public
   macro that AC_REQUIREs _AC_INCLUDES_DEFAULT_REQUIREMENTS, and ...
   (_AC_CHECK_HEADERS_ONCE): ... a private macro, that doesn't.
   (_AC_HEADERS_EXPANSION): Use $ac_includes_default, not
   AC_INCLUDES_DEFAULT.
   (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Use AC_CHECK_HEADERS_ONCE.

11 years agoModernize AC_INCLUDES_DEFAULT and friends.
Zack Weinberg [Sat, 14 Sep 2013 16:22:49 +0000 (12:22 -0400)] 
Modernize AC_INCLUDES_DEFAULT and friends.

 * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
   Include stddef.h, stdlib.h, and string.h unconditionally.
   Don't include memory.h at all.
   Don't use AC_HEADER_STDC.
   Don't check for stddef.h, stdlib.h, string.h, or memory.h.
   For compatibility, unconditionally define STDC_HEADERS,
   HAVE_STDLIB_H, and HAVE_STRING_H.
   (AN_HEADER list): Remove C89 headers, and memory.h from list.
   (AC_HEADER_STDC, AC_UNISTD_H): AU_DEFUN to trigger
   _AC_INCLUDES_DEFAULT_REQUIREMENTS if it hasn't already happened,
   and do nothing else.
   (AC_HEADER_TIME): AU_DEFUN, and define TIME_WITH_SYS_TIME unconditionally
   as long as sys/time.h is present.
   (AC_USG, AC_MEMORY_H): Assume existence of string.h.
 * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
   Don't use AC_HEADER_STDC. Assume stdlib.h exists.
   (AC_FUNC_MKTIME): Don't use AC_HEADER_TIME.  Assume time.h exists.
   (AC_FUNC_ALLOCA): Assume stdlib.h exists.
   (_AC_LIBOBJ_FNMATCH): Assume wchar.h and wctype.h exist.
   (_AC_LIBOBJ_GETLOADAVG): Assume locale.h exists.
   (AC_FUNC_MMAP): Assume stdlib.h exists.
 * tests/tools.at: Use AC_WORDS_BIGENDIAN instead of AC_STDC_HEADERS in
   autoupdate test.

 * NEWS, doc/autoconf.texi: Document changes. Remove obsolete advice.

11 years agoAC_CHECK_HEADER/AC_CHECK_HEADERS: complete transition to compile tests.
Zack Weinberg [Sat, 14 Sep 2013 00:42:04 +0000 (20:42 -0400)] 
AC_CHECK_HEADER/AC_CHECK_HEADERS: complete transition to compile tests.

* lib/autoconf/headers.m4 (AC_CHECK_HEADER): Use _AC_CHECK_HEADER_COMPILE
  by default.  Continue to use _AC_CHECK_HEADER_PREPROC if fourth arg is '-'.
  (_AC_CHECK_HEADER_PREPROC): Issue a deprecation warning.
  (_AC_CHECK_HEADER_MONGREL, _AC_CHECK_HEADER_MONGREL_BODY): Remove.

* tests/c.at, tests/semantics.at: Update uses of AC_CHECK_HEADER(S).
* doc/autoconf.texi, NEWS: Document change.

11 years ago* tests/local.at (AT_CHECK_M4): Support 'stderr' as fourth argument.
Zack Weinberg [Fri, 13 Sep 2013 15:26:08 +0000 (11:26 -0400)] 
* tests/local.at (AT_CHECK_M4): Support 'stderr' as fourth argument.

11 years agoadmin: mention recent copyright assignments
Eric Blake [Thu, 13 Oct 2011 20:51:29 +0000 (14:51 -0600)] 
admin: mention recent copyright assignments

* AUTHORS: Update list.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoAC_INIT: add --runstatedir option to configure
Eric Blake [Thu, 12 Sep 2013 21:11:29 +0000 (15:11 -0600)] 
AC_INIT: add --runstatedir option to configure

http://lwn.net/Articles/436012/ documents that many distros
are now preferring to use /run rather than /var/run for
storage of pid files and other per-process temporary files
that must not be cleaned out during arbitrary TMPDIR sweeps.
As such, the GNU Coding Standards were recently changed to
recommend a new configure option to make it easy to choose
this directory at configure time.  This patch adds support
for the option to all configure scripts built by autoconf.

* general.m4 (_AC_INIT_PARSE_ARGS): Add new directory option.
(_AC_INIT_HELP): Document it.
* doc/autoconf.texi (Installation Directory Variables): Document
new option.
(Site Defaults): Mention typical use within a distro.
* NEWS: Mention the addition.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agoAC_PROG_CC: also try $CC -version, for cl6x compiler
Eric Blake [Thu, 12 Sep 2013 15:23:35 +0000 (09:23 -0600)] 
AC_PROG_CC: also try $CC -version, for cl6x compiler

Anaïs Bouque reported that the cl6x compiler only understands -version:
https://lists.gnu.org/archive/html/bug-autoconf/2013-07/msg00003.html

* c.m4 (AC_PROG_CC): Add another version probe.
* THANKS: Update.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agodoc: mention how to set early defaults
Eric Blake [Thu, 5 Sep 2013 20:14:55 +0000 (14:14 -0600)] 
doc: mention how to set early defaults

Jonathan Lebon reported an issue to me off-list about a regression
in libvirt's configure script, which I traced to a patch that
rearranged code that was checking $with_library compared to the
AC_ARG_WITH that actually set $with_library [1].  As the whole point
of the libvirt patch was to refactor code to make maintenance
easier by hiding the AC_ARG_WITH in a helper macro for a net
reduction in lines, it makes sense to actually document how to
check what value a variable has prior to the AC_ARG_WITH usage.

Alas, although the functionality for this has been present in
autoconf for ages, the documentation has been lacking.

[1] libvirt.org/git/?p=libvirt.git;a=commitdiff;h=654c709

* doc/autoconf.texi (Diversion support) <m4_divert_text>: Add
anchor.
(External Software) <AC_ARG_WITH>: Demonstrate how to use DEFAULTS
diversion, for earlier defaults.
(Package Options) <AC_ARG_ENABLE>: Likewise.
* THANKS: Add Jonathan Lebon.

Signed-off-by: Eric Blake <eblake@redhat.com>
11 years agodoc: 'configure && make', not 'configure; make' (Bug#15066)
Paul Eggert [Sat, 10 Aug 2013 15:12:07 +0000 (08:12 -0700)] 
doc: 'configure && make', not 'configure; make' (Bug#15066)

* doc/install.texi (Basic Installation): Say '&&', not ';'.

12 years agodoc: don't push 'static inline'
Paul Eggert [Sun, 30 Jun 2013 00:49:27 +0000 (17:49 -0700)] 
doc: don't push 'static inline'

* doc/autoconf.texi (Function Portability): Use plain 'static',
not 'static inline', in example.  These days, 'static' is enough;
optimizing compilers can figure out the 'inline' on their own.

12 years ago* lib/autoconf/functions.m4 (HAVE_DOPRNT): Fix missing-comma typo.
Paul Eggert [Fri, 21 Jun 2013 18:00:38 +0000 (11:00 -0700)] 
* lib/autoconf/functions.m4 (HAVE_DOPRNT): Fix missing-comma typo.

Reported by Peter Breitenlohner in:
http://lists.gnu.org/archive/html/autoconf-patches/2013-06/msg00007.html

12 years agoAC_PROG_CC: don't check whether $CC supports "-c -o" together
Stefano Lattarini [Sun, 26 May 2013 21:25:45 +0000 (23:25 +0200)] 
AC_PROG_CC: don't check whether $CC supports "-c -o" together

This reverts commit ce48964f.  The extra code added by that commit was
planned to be used by future version of Automake, but the implementation
and future directions there have in the meantime be changed in a way
that makes the extra code in Autoconf superfluous.  Just get rid of it.

* lib/autoconf/c.m4 (AC_PROG_CC): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: sync few files from upstream
Stefano Lattarini [Sun, 26 May 2013 20:49:49 +0000 (22:49 +0200)] 
maint: sync few files from upstream

* build-aux/config.guess: This file.
* lib/Autom4te/Channels.pm: And this one.
* maint.mk: And this one.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: remove refs to obsolescent 'mkinstalldir' script and variable
Stefano Lattarini [Mon, 6 May 2013 09:21:08 +0000 (11:21 +0200)] 
build: remove refs to obsolescent 'mkinstalldir' script and variable

* .gitignore: Here.
* Makefile.am (check-coverage-run): Use $(MKDIR_P) rather than
$(mkinstalldirs).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: remove last make recursion (for subdir 'man')
Stefano Lattarini [Sun, 5 May 2013 21:11:52 +0000 (23:11 +0200)] 
build: remove last make recursion (for subdir 'man')

* Makefile.am (SUBDIRS): Remove (its last component 'man' has just
been removed).
(SUFFIXES): New, defined to empty, to be updated later by included
files.
($(srcdir)/man/local.mk): Include this.
* configure.ac (AC_CONFIG_FILES): Drop 'man/Makefile'.
* lib/freeze.mk (SUFFIXES): Extend with '+=' rather than defining
with '='.
* man/Makefile.am: Rename ...
* man/local.mk: ... like this, and adjust throughout.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'tests' subdir
Stefano Lattarini [Sun, 5 May 2013 19:43:54 +0000 (21:43 +0200)] 
build: no more recursion for 'tests' subdir

* Makefile.am (SUBDIRS): Drop 'tests'.  Adjust comments.
(DISTCLEANFILES, MAINTAINERCLEANFILES): Define to empty, to be
updated later.
(MAINTAINERCLEANFILES): Adjust later definition to use '+='
rather than '='.
($(srcdir)/tests/local.mk): Include this.
* configure.ac (AC_CONFIG_FILES): Drop 'tests/Makefile'.
* lib/freeze.mk ($(AUTOM4TE_CFG)): Drop now-redundant remake rule.
($(build_libdir)/m4sugar/version.m4): Likewise.
* tests/Makefile.am: Rename ...
* tests/local.mk: ... like this, and adjust (quite heavily).
* tests/mktests.sh: Adjust to generate output files and temporary
files in the tests subdirectory rather than in the current
directory.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: fixup: don't define ETAGS_ARGS multiple times
Stefano Lattarini [Sun, 5 May 2013 19:26:15 +0000 (21:26 +0200)] 
build: fixup: don't define ETAGS_ARGS multiple times

* Makefile.am (ETAGS_ARGS): Define to empty, to be updated later.
* bin/local.mk (ETAGS_ARGS): Append to it, rather than re-defining it.
* lib/local.mk (ETAGS_ARGS): Likewise.  Also, do not bother appending
"--lang=perl" once again, as that is already done in 'bin/local.mk'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: avoid repeating the same etags args several times
Stefano Lattarini [Sun, 5 May 2013 19:20:55 +0000 (21:20 +0200)] 
build: avoid repeating the same etags args several times

* lib/local.mk: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for lib 'subdir'
Stefano Lattarini [Sun, 5 May 2013 19:05:43 +0000 (21:05 +0200)] 
build: no more recursion for lib 'subdir'

* Makefile.am (SUBDIRS): Drop 'lib'.
(edit): New, shared among the recipes in 'lib/local.mk' and
'bin/local.mk'.
(CLEANFILES): New, will be updated later in included files.
($(srcdir)/lib/local.mk): Include it.
($(srcdir)/lib/freeze.mk): Likewise.
* lib/Makefile.am: Rename ...
* lib/local.mk: .. like this, with several adjustments.  In
particular ...
(edit): Drop this definition, subsumed by the one in the
top-level Makefile.am.
* bin/local.mk (edit): Drop definition, that is already present
in the top-level Makefile.am now.
($(srcdir)/lib/freeze.mk): Drop inclusion; that is already done
in the top-level Makefile.am now.
* doc/local.mk (CLEANFILES): Adjust: append to it, do not define
it.
* lib/freeze.mk ($(AUTOM4TE_CFG)): Adjust recipe.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: define RELEASE_YEAR with AC_SUBST
Stefano Lattarini [Sun, 5 May 2013 18:16:25 +0000 (20:16 +0200)] 
build: define RELEASE_YEAR with AC_SUBST

Rather than reading it dynamically from the ChangeLog -- that,
remember, is only a dummy in a Git checkout!  To avoid risking
the definition to get out-of-sync, let's enhance the maintainer
target 'update-copyright' to update it automatically (the same
way it's done in the Automake build system).

* configure.ac (RELEASE_YEAR): New AC_SUBST'd variable.
* cfg.mk (update-release-year): New maintainer-specific target
to automatically update the value of that variable.
(update-copyright): Depend on the new target.
* bin/local.mk (RELEASE_YEAR): Drop definition.
(edit): Simplify quoting of $(RELEASE_YEAR).
* lib/Makefile.am (RELEASE_YEAR): Drop definition.
(m4sugar/version.m4): Simplify quoting of $(RELEASE_YEAR).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'lib/Autom4te' subdir
Stefano Lattarini [Sun, 5 May 2013 18:02:31 +0000 (20:02 +0200)] 
build: no more recursion for 'lib/Autom4te' subdir

* lib/Autom4te/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Delete (last component 'Autom4te' has been dropped).
* configure.ac (AC_CONFIG_FILES): Drop 'lib/Autom4te/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for' lib/autoconf' subdir
Stefano Lattarini [Sun, 5 May 2013 17:57:27 +0000 (19:57 +0200)] 
build: no more recursion for' lib/autoconf' subdir

* lib/autoconf/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'autoconf'.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/autoconf/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'lib/m4sugar' subdir
Stefano Lattarini [Sun, 5 May 2013 17:37:01 +0000 (19:37 +0200)] 
build: no more recursion for 'lib/m4sugar' subdir

* lib/m4sugar/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'lib/m4sugar'.
Other related adjustments and re-organizations.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/m4sugar/Makefile'.
* lib/freeze.mk ($(build_libdir)/m4sugar/version.m4): Adjust
recipe.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'lib/autotest' subdir
Stefano Lattarini [Sun, 5 May 2013 16:10:15 +0000 (18:10 +0200)] 
build: no more recursion for 'lib/autotest' subdir

* lib/autotest/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'autotest'.
Other minor related modifications.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/autotest/Makefile'.
* lib/freeze.mk (MY_AUTOM4TE): Small required adjustments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'lib/autoscan' subdir
Stefano Lattarini [Sun, 5 May 2013 15:35:51 +0000 (17:35 +0200)] 
build: no more recursion for 'lib/autoscan' subdir

* lib/autoscan/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'autoscan'.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/autoscan/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'lib/emacs' subdir
Stefano Lattarini [Sun, 5 May 2013 14:53:54 +0000 (16:53 +0200)] 
build: no more recursion for 'lib/emacs' subdir

* lib/emacs/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'emacs'.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/emacs/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more make recursion for 'bin' subdir
Stefano Lattarini [Sun, 5 May 2013 14:40:10 +0000 (16:40 +0200)] 
build: no more make recursion for 'bin' subdir

* Makefile.am (MOSTLYCLEANFILES): New, to be extended later by
included files.
($(srcdir)/doc/local.mk): New include.
(SUBDIRS): Drop 'bin'.  Adjust comments.
* bin/Makefile.am: Rename ...
* bin/local.mk: ... like this, and adjust.
* configure.ac (AC_CONFIG_FILES): Drop 'bin/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more make recursion for 'doc' subdir
Stefano Lattarini [Sun, 5 May 2013 14:14:06 +0000 (16:14 +0200)] 
build: no more make recursion for 'doc' subdir

* .gitignore: Adjust.
* Makefile.am ($(srcdir)/doc/local.mk): New include.
(SUBDIRS): Drop 'doc'.
(AM_MAKEINFOFLAGS): Rename ...
(custom_MAKEINFOFLAGS): ... like this, to avoid conflicting with
the AM_MAKEINFOFLAGS defined in the included 'doc/local.mk'
($(srcdir)/INSTALL): Adjust recipe.
* doc/Makefile.am: Rename ...
* doc/local.mk: ... like this, and adjust.
* configure.ac (AC_CONFIG_FILES): Drop 'doc/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: don't distribute lib/freeze.mk explicitly
Stefano Lattarini [Sun, 5 May 2013 15:18:00 +0000 (17:18 +0200)] 
build: don't distribute lib/freeze.mk explicitly

It is automatically distributed by Automake, being included by
other Makefile.am files.

* lib/Makefile.am (EXTRA_DIST): Drop 'freeze.mk'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agosync: some files from upstream
Stefano Lattarini [Sun, 5 May 2013 14:13:10 +0000 (16:13 +0200)] 
sync: some files from upstream

* build-aux/config.guess: This.
* build-aux/config.sub: And this.
* build-aux/gendocs.sh: And this.
* build-aux/gnupload: And this.
* build-aux/texinfo.tex: And this.
* doc/standards.texi: And this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agodoc: add missing semicolons to make rules
Paul Eggert [Wed, 24 Apr 2013 04:42:41 +0000 (21:42 -0700)] 
doc: add missing semicolons to make rules

Problem reported by Peter Eisentraut in
<http://lists.gnu.org/archive/html/bug-autoconf/2013-04/msg00007.html>.
* doc/autoconf.texi (Automatic Remaking): Append semicolons
to rules that need empty commands.

12 years agoAC_PROG_CC etc: avoid warnings when removing conftest* on OS X
Paul Eggert [Tue, 19 Mar 2013 18:22:16 +0000 (11:22 -0700)] 
AC_PROG_CC etc: avoid warnings when removing conftest* on OS X

I forgot one of the fixes Mr. Nakada reported for the 2013-03-08 fix.
* lib/autoconf/general.m4 (AC_EGREP_CPP):
Use rm -rf, not just rm -f, when removing conftest*.

12 years agoAC_PROG_YACC: don't force Bison to warn against its own features
Akim Demaille [Tue, 19 Mar 2013 18:19:17 +0000 (11:19 -0700)] 
AC_PROG_YACC: don't force Bison to warn against its own features

When invoked with -y/--yacc, Bison warns when its extensions over
POSIX Yacc are used.  Yet many packages requiring GNU Bison use
Autoconf/Automake's Yacc support, which passes -y to Bison.  It
turns out that passing '-o y.tab.c' has exactly the desired
effect: generating not only y.tab.c but also y.tab.h with -d and
y.output with -v.  See:
http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00100.html
* lib/autoconf/programs.m4 (AC_PROG_YACC): Use bison -o y.tab.c.
* NEWS, doc/autoconf.texi: Document this change.

12 years agodoc: explain why single-quoting is better
Paul Eggert [Fri, 8 Mar 2013 17:22:48 +0000 (09:22 -0800)] 
doc: explain why single-quoting is better

* doc/autoconf.texi (Build Directories): Explain single-quoting.
Reported by Markus Elfring in
<http://savannah.gnu.org/support/?108262>.

12 years agoAC_PROG_CC etc: avoid warnings when removing conftest* on OS X
Paul Eggert [Fri, 8 Mar 2013 16:56:18 +0000 (08:56 -0800)] 
AC_PROG_CC etc: avoid warnings when removing conftest* on OS X

Reported by Nobuyoshi Nakada in:
http://lists.gnu.org/archive/html/autoconf-patches/2013-03/msg00003.html
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CC_C_O, AC_PROG_CXX_C_O):
* lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O):
* lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES):
Use rm -rf, not just rm -f, when removing conftest*.

12 years agodocs: configure.in still mentioned in manpages
Pavel Raiskup [Tue, 5 Mar 2013 07:09:41 +0000 (08:09 +0100)] 
docs: configure.in still mentioned in manpages

* man/autoupdate.x: Mention configure.ac as preferred name.
* man/autoscan.x: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoAC_FUNC_GETLOADAVG: doc fix
Paul Eggert [Sat, 23 Feb 2013 19:14:49 +0000 (11:14 -0800)] 
AC_FUNC_GETLOADAVG: doc fix

* doc/autoconf.texi (Particular Functions):
Omit incorrect mention of @var{dir} before getloadavg.c.
Problem reported by Patricke Welche in:
http://lists.gnu.org/archive/html/autoconf-patches/2013-02/msg00006.html

12 years agoAC_FUNC_SETPGRP: work even when cross-compiling
Paul Eggert [Thu, 14 Feb 2013 07:28:21 +0000 (23:28 -0800)] 
AC_FUNC_SETPGRP: work even when cross-compiling

* lib/autoconf/functions.m4 (AC_FUNC_SETPGRP):
Use AC_COMPILE_IFELSE rather than AC_RUN_IFELSE.
Problem reported by Alvaro Soliverez in
<http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00002.html>.

12 years agoAC_USE_SYSTEM_EXTENSIONS: improve port to HP-UX
Paul Eggert [Fri, 8 Feb 2013 21:01:15 +0000 (13:01 -0800)] 
AC_USE_SYSTEM_EXTENSIONS: improve port to HP-UX

* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
On hosts that need _XOPEN_SOURCE, define it when configuring, too,
so that it's compatible with the value used when compiling.

12 years agoAC_USE_SYSTEM_EXTENSIONS: port to HP-UX, MINUX 3, OS X.
Paul Eggert [Thu, 7 Feb 2013 06:46:49 +0000 (22:46 -0800)] 
AC_USE_SYSTEM_EXTENSIONS: port to HP-UX, MINUX 3, OS X.

* NEWS: Mention this.
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
Define _NETBSD_HOST on MINUX, for MINUX 3.
Define _DARWIN_C_SOURCE, for OS X.
On HP-UX, define _XOPEN_SOURCE.

12 years agoautoscan: port to perl 5.17
Paul Eggert [Tue, 29 Jan 2013 21:46:48 +0000 (13:46 -0800)] 
autoscan: port to perl 5.17

* bin/autoscan.in (scan_sh_file): Escape '{'.  This avoids a
feature that is deprecated in Perl 5.17.  Reported by Ray Lauff in
<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00059.html>.

12 years agom4sugar: fix AS_VAR_GET regression.
Gary V. Vaughan [Tue, 29 Jan 2013 12:17:04 +0000 (19:17 +0700)] 
m4sugar: fix AS_VAR_GET regression.

AS_VAR_GET expands AS_ECHO inside en evaled single quoted string,
which causes the single quotes in "printf '%s\n'" to expose the
%s\n to the shell which expands "\n" to simply "n" before passing
it to printf.
* lib/m4sugar/m4sh.m4 (AS_ECHO): Use double quotes around the
format string.
* doc/autoconf.texi (Limitations of Shell Builtins): Show double
quotes to match AS_ECHO expansion.
* NEWS: Likewise.

12 years agom4sugar: factor away _AS_ECHO_PREPARE.
Gary V. Vaughan [Mon, 28 Jan 2013 03:44:45 +0000 (10:44 +0700)] 
m4sugar: factor away _AS_ECHO_PREPARE.

"printf '%s\n' ..." has been a fine replacement for plain "echo"
for at least 5 years (probably more like 10), even with most
museum-piece shells.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Remove.
(_AS_SHELL_SANITIZE): Keep as_nl setting originally from
_AS_ECHO_PREPARE here where it more properly belongs.
(AS_ECHO, AS_ECHO_N): Use printf unconditionally.
* doc/autoconf.texi (Limitations of Shell Builtins): Document
preference for 'printf' over working around 'echo' bugs.
* NEWS: Updated.
Reported by Jim Meyering.

12 years agoAC_PROG_CXX: document change
Paul Eggert [Tue, 29 Jan 2013 06:57:51 +0000 (22:57 -0800)] 
AC_PROG_CXX: document change

* NEWS: Document recent change to AC_PROG_CXX.

12 years agoAC_PROG_CXX: Add checks for C++11, C++98TR1 and C++98
Roger Leigh [Sun, 20 Jan 2013 18:50:49 +0000 (18:50 +0000)] 
AC_PROG_CXX: Add checks for C++11, C++98TR1 and C++98

These checks are the C++ equivalent of the existing C
standards checks.
* doc/autoconf.texi (C++ Compiler): Document new behavior.
* lib/autoconf/c.m4 (AC_PROG_CXX): Try for C++11,
falling back to C++98.
(_AC_CXX_STD_TRY, _AC_CXX_CXX98_TEST_HEADER, _AC_CXX_CXX98_TEST_BODY)
(_AC_CXX_CXX11_TEST_HEADER, _AC_CXX_CXX11_TEST_BODY)
(_AC_PROG_CXX_CXX98, _AC_PROG_CXX_CXX11):
New macros.

12 years agoAT_TESTED: fix regression in word splitting
Eric Blake [Thu, 3 Jan 2013 23:56:59 +0000 (16:56 -0700)] 
AT_TESTED: fix regression in word splitting

Regression introduced in commit 851ef51.

* lib/autotest/general.m4 (AT_TESTED): Rework loop to quote each
element, not the entire argument.