]> git.ipfire.org Git - thirdparty/autoconf.git/log
thirdparty/autoconf.git
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>
12 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.

12 years agoAC_SYS_LARGEFILE: port better to Mac OS X 10.5.
Paul Eggert [Wed, 16 Jan 2013 17:27:15 +0000 (09:27 -0800)] 
AC_SYS_LARGEFILE: port better to Mac OS X 10.5.

* lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not
AH_VERBATIM, to define _DARWIN_USE_64_BIT_INODE, to avoid problems
with ino_t size being different for configuration time versus
build/run time.  Problem reported by PHO in
<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00040.html>.

12 years agoAC_PROG_CC: also check whether $CC supports "-c -o" together
Stefano Lattarini [Thu, 10 Jan 2013 14:14:24 +0000 (15:14 +0100)] 
AC_PROG_CC: also check whether $CC supports "-c -o" together

This is for Automake and its 'subdir-object' mode (see automake bug#13378,
in particular <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#73>), so
we make the new behavior available only if the special witness macro
'_AM_PROG_CC_C_O_HELPME' is defined (future Automake versions will define
it).  We might decide, at a later date, to make this behaviour public;
but then we'll have to discuss its usefulness and design more in depth,
and if they are agreed upon, adjust the documentation to match, and also
decide what to do with the macro AC_PROG_CC_C_O, with its similar (but
slightly incompatible) semantics; since doing so right now would bring us
off-track (and Automake needs this change *today*, or better, yesterday),
we proceed with this simpler hack.

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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: resync files from upstream
Eric Blake [Thu, 3 Jan 2013 22:13:04 +0000 (15:13 -0700)] 
maint: resync files from upstream

'make syntax-check' complained about something that was already
fixed upstream in doc/standards.texi, so I ran 'make update', and
omitted lib/Autom4te as that still has some issues to be sorted out.

* GNUmakefile: Resync from upstream.
* build-aux/announce-gen: Likewise.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/git-version-gen: Likewise.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/move-if-change: Likewise.
* build-aux/texinfo.tex: Likewise.
* build-aux/update-copyright: Likewise.
* build-aux/useless-if-before-free: Likewise.
* build-aux/vc-list-files: Likewise.
* doc/gendocs_template: Likewise.
* doc/standards.texi: Likewise.
* m4/autobuild.m4: Likewise.
* maint.mk: Likewise.

12 years agomaint: bump copyright to 2013
Eric Blake [Thu, 3 Jan 2013 21:58:52 +0000 (14:58 -0700)] 
maint: bump copyright to 2013

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

* all files: Update copyright year.

12 years agogo: fix checks for about I/O functions
Stefano Lattarini [Wed, 2 Jan 2013 16:01:05 +0000 (17:01 +0100)] 
go: fix checks for about I/O functions

Reference:
<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00000.html>

* lib/autoconf/go.m4 (_AC_LANG_IO_PROGRAM(Go), AC_LANG_INT_SAVE): Here,
correctly use 'os.OpenFile()' <http://golang.org/pkg/os/#OpenFile>
rather than 'os.Open()' <http://golang.org/pkg/os/#Open> (which has
more restricted semantics and incompatible signature).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agopreselections: update for Automake 1.13.
Stefano Lattarini [Sat, 29 Dec 2012 10:01:40 +0000 (11:01 +0100)] 
preselections: update for Automake 1.13.

Issue revealed by a failure in test "36: autom4te preselections".

* autoconf/lib/autom4te.in (Automake-preselections): Add
'AM_EXTRA_RECURSIVE_TARGETS', remove '_AM_EXTRA_RECURSIVE_TARGETS';
this latter is not, and will not be, present in any *released*
Automake version.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: sync some files from gnulib
Stefano Lattarini [Sat, 29 Dec 2012 09:32:24 +0000 (10:32 +0100)] 
maint: sync some files from gnulib

* build-aux/config.guess: Synced by "make gnulib-update".
* build-aux/config.sub: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/gendocs_template: Likewise.
* doc/standards.texi: Likewise.
* maint.mk: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: don't sync the 'Autom4te::Configure_ac' module from Automake
Stefano Lattarini [Sat, 29 Dec 2012 09:26:47 +0000 (10:26 +0100)] 
maint: don't sync the 'Autom4te::Configure_ac' module from Automake

That file has been removed in the master branch of Automake, since
Automake 1.14 will remove support for 'configure.in' as a name for
Autoconf input files.  See commits 'v1.13-17-gbff57c8' and
'v1.13-21-g7626e63' in the Automake repository.

* cfg.mk (autom4te_files): Remove 'Autom4te/Configure_ac.pm'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoAC_C__GENERIC: New macro.
Paul Eggert [Thu, 27 Dec 2012 22:34:07 +0000 (14:34 -0800)] 
AC_C__GENERIC: New macro.

* NEWS, doc/autoconf.texi (C Compiler): Document it.
* lib/autoconf/c.m4 (AC_C__GENERIC): Implement it.

12 years agoautotest: enable usage of EXEEXT in AT_TESTED
Paolo Bonzini [Fri, 7 Dec 2012 13:00:19 +0000 (14:00 +0100)] 
autotest: enable usage of EXEEXT in AT_TESTED

Together with Linux's binfmt-misc feature, Wine can be used to test
cross-compiled programs as if they were native.  However, the shell
will not perform the "magic" addition of the .exe extension after a
program name when searching for an executable.  These simple patches
let the user work around this by specifying $EXEEXT in the AT_CHECK
and AT_TESTED argument.  (More care is needed because of carriage
returns, but this is beyond the scope of this series).

* tests/autotest.at (AT_INIT): Expand contents of $at_tested.
(AT_TESTED): Quote each program that is passed to the function.
* lib/autotest/general.m4 (C unit tests): Add AT_TESTED invocation
and keyword.
* doc/autoconf.texi (Writing testsuites): Document usage of variables
in AT_TESTED.
* NEWS: Document change.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
12 years agoautotest: add a simple test suite that runs a C program
Paolo Bonzini [Fri, 7 Dec 2012 12:47:06 +0000 (13:47 +0100)] 
autotest: add a simple test suite that runs a C program

* tests/autotest.at (C unit tests): New testcase.
* NEWS: Document change.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
12 years agoautotest: annotate tests that use AC_CONFIG_TESTDIR
Paolo Bonzini [Fri, 7 Dec 2012 12:56:12 +0000 (13:56 +0100)] 
autotest: annotate tests that use AC_CONFIG_TESTDIR

* tests/autotest.at (srcdir propagation, Erlang Eunit unit tests):
Add a keyword for AC_CONFIG_TESTDIR.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
12 years agoAC_FUNC_ALLOCA: port to recent BSDs and remove obsolete AIX
Paul Eggert [Fri, 21 Dec 2012 05:21:04 +0000 (21:21 -0800)] 
AC_FUNC_ALLOCA: port to recent BSDs and remove obsolete AIX

* doc/autoconf.texi (Particular Functions): Remove the AIX case
from the recommended code, as the most recent version of the AIX
compiler that IBM still supports (V10.1 as of this writing) has
<alloca.h> and thus longer needs this, and the old suggestion
wasn't completely working anyway.  Remove obsolete discussion of
SVR3 libPW alloca and of SVR4 libucb alloca.
* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA):
Rework to match documentation, including abovementioned AIX change.
Inconsistency with documentation reported by Steven G. Johnson in
<http://lists.gnu.org/archive/html/autoconf/2003-03/msg00179.html>.
As this adds stdlib.h, it should also fix the problems on recent
BSD platforms noted by Patrick Welche in
http://lists.gnu.org/archive/html/autoconf-patches/2012-12/msg00009.html
though the fix differs from NetBSD's current workaround.
Also, don't bother checking for alloca if <alloca.h> works,
as the latter implies the former.

12 years agoAC_PROG_CC_C99: avoid unused-var warning
Paul Eggert [Mon, 10 Dec 2012 18:06:10 +0000 (10:06 -0800)] 
AC_PROG_CC_C99: avoid unused-var warning

* lib/autoconf/c.m4 (_AC_C_C99_TEST_HEADER): Rewrite to use vars.
Problem reported by ChangZhuo Chen in
<http://lists.gnu.org/archive/html/bug-autoconf/2012-12/msg00000.html>.

12 years agoautotest: define AT_DATA_UNQUOTED
Paolo Bonzini [Fri, 7 Dec 2012 12:21:59 +0000 (13:21 +0100)] 
autotest: define AT_DATA_UNQUOTED

* lib/autotest/general.m4 (AT_DATA_UNQUOTED): New macro, paralleling
AT_DATA but not quoting the contents.
* doc/autoconf.texi (Writing Testsuites): Document it.
* tests/autotest.at (AT_DATA_UNQUOTED): Test it.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
12 years agoAC_CHECK_FILES: improve documentation
Paul Eggert [Sat, 17 Nov 2012 19:06:05 +0000 (11:06 -0800)] 
AC_CHECK_FILES: improve documentation

* doc/autoconf.texi (Files): Document AC_CHECK_FILES better.
Reported by Christophe Curis in
<http://savannah.gnu.org/support/?108182>.

12 years agosyntax-check: remove SPACE-TAB sequence
Stefano Lattarini [Fri, 16 Nov 2012 10:36:10 +0000 (11:36 +0100)] 
syntax-check: remove SPACE-TAB sequence

* lib/autoconf/c.m4 (_AC_PROG_CC_C99): Here.  Was causing a
failure in the 'space_tab' syntax check.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: fix unneeded workaround for AC_CONFIG_LINKS old bud
Stefano Lattarini [Fri, 16 Nov 2012 10:27:55 +0000 (11:27 +0100)] 
build: fix unneeded workaround for AC_CONFIG_LINKS old bud

* configure.ac: The Automake NEWS entry for version 1.11 states that

    For AC_CONFIG_LINKS, if source and destination are equal, do
    not remove the file in a non-VPATH build.  Such setups work
    with Autoconf 2.62 or newer.

Since our build system requires autoconf >= 2.62 and automake >= 1.11
already, we can get rid of the workaround for that long-fixed bug.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: require autoconf >= 2.62, and related simplifications
Stefano Lattarini [Fri, 16 Nov 2012 10:22:21 +0000 (11:22 +0100)] 
build: require autoconf >= 2.62, and related simplifications

* configure.ac: Require 2.62, and remove obsolescent comments.
We are not imposing an new restriction in doing so, since we already
require Automake 1.11 or later, and that requires Autoconf 2.62.
Simplify code for symlinking of GNUmakefile in VPATH builds, in
accordance with the existing "TODO" comments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoAC_CONFIG_MACRO_DIRS: improve tracing and add sanity checks
Eric Blake [Fri, 9 Nov 2012 22:41:18 +0000 (15:41 -0700)] 
AC_CONFIG_MACRO_DIRS: improve tracing and add sanity checks

Too many legacy tools exist for us to unilaterally quit supporting
AC_CONFIG_MACRO_DIR - it is feasible for someone to want their
package to bootstrap with both automake 1.13 and libtool 2.4.2,
where the newer automake will only trace the new style of multiple
directory listings, but the older libtool does a sed and settles
on the one use of the old name.  So, we let both macros forward
to a new tracing macro, which also has the benefit of sanitizing
calls into one directory per trace; we also ensure that the old
macro is always traced, and appears at most once and before any
use of the new macro.

* doc/autoconf.texi (Input) <AC_CONFIG_MACRO_DIRS>: Document how
to trace this macro.
* lib/autom4te.in (Autoreconf-preselections)
(Automake-preselections): Preselect this trace.
* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR_TRACE): New trace.
(_AC_CONFIG_MACRO_DIRS_USED, _AC_CONFIG_MACRO_DIRS): New internal
macros.
(AC_CONFIG_MACRO_DIRS, AC_CONFIG_MACRO_DIR): Use them.
* tests/tools.at (autoconf --trace: AC_CONFIG_MACRO_DIRS): New
test.

12 years agowarn: allow aclocal to silence m4_require warnings
Stefano Lattarini [Sat, 3 Nov 2012 12:05:09 +0000 (13:05 +0100)] 
warn: allow aclocal to silence m4_require warnings

We introduce a new witness macro, m4_require_silent_probe, for use by
aclocal during the Autoconf-without-aclocal-m4 language.  This will let
aclocal process AC_CONFIG_MACRO_DIRS without emitting spurious warnings.
In fact, if aclocal doesn't suppress require warnings, then, when some macro
expanded in configure.ac calls AC_REQUIRE on another macro that is defined
in one of the local m4 macro dirs specified with AC_CONFIG_MACRO_DIRS, the
*first* autom4te invocation issued by aclocal, not yet being able to "see"
the m4 macro definitions in the local m4 dirs, will print spurious
warnings like:

    configure.ac:4: warning: MY_BAR is m4_require'd but not m4_defun'd
    configure.ac:3: MY_FOO is expanded from...

Expose the use of this macro in our testsuite.

Originally reported by Nick Bowler; see point (4) of:
<http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>

* lib/m4sugar/m4sugar.m4 (_m4_require_call): Make warnings in the
-Wsyntax category depend on the witness macro.
* tests/m4sugar.at (m4@&t@_require: warning message): New test.
* doc/autoconf.texi (Prerequisite Macros): Document how aclocal
can silence AC_REQUIRE (m4_require) warnings.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agodocs: ACLOCAL_AMFLAGS will become obsolescent in Automake 1.13
Stefano Lattarini [Sat, 3 Nov 2012 12:05:08 +0000 (13:05 +0100)] 
docs: ACLOCAL_AMFLAGS will become obsolescent in Automake 1.13

See commit 'v1.12.1-165-gcd1a9cc' "aclocal: deprecate ACLOCAL_AMFLAGS,
trace AC_CONFIG_MACRO_DIR instead" in the Automake git repository.

See also follow-up discussion at:
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00010.html>

* doc/autoconf.texi (@node Input @defmac AC_CONFIG_MACRO_DIRS): Adjust.
(autoreconf Invocation): Warn about the possible future removal of
ACLOCAL_AMFLAGS support from Automake.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoAC_CONFIG_MACRO_DIRS: new macro, mostly for aclocal
Stefano Lattarini [Wed, 17 Oct 2012 10:15:56 +0000 (12:15 +0200)] 
AC_CONFIG_MACRO_DIRS: new macro, mostly for aclocal

Similar to AC_CONFIG_MACRO_DIR, but accepts more than one argument.
This will allow projects to use several m4 macro local dirs.  This is
especially important for projects that are used as nested subpackages
of larger projects.

See also:
<http://lists.gnu.org/archive/html/autoconf/2011-12/msg00037.html>
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00010.html>

* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIRS): New.  Expands to the
empty anyway, since it is only meant to be traced by tools like aclocal
and autoreconf.
(AC_CONFIG_MACRO_DIR): Updated comments.
* doc/autoconf.texi (@node "Input"): Document AC_CONFIG_MACRO_DIRS as
preferred over AC_CONFIG_MACRO_DIR.
* NEWS: Update.

Suggested-by: Eric Blake <eblake@redhat.com>
Helped-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agocosmetics: slightly improve a comment
Stefano Lattarini [Sat, 22 Sep 2012 07:48:30 +0000 (09:48 +0200)] 
cosmetics: slightly improve a comment

* lib/autom4te.in: Here, the comment about 'AM_PROG_MKDIR_P'.

Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautom4te: update Automake preselections to reflect upcoming 1.13
Stefano Lattarini [Sat, 27 Oct 2012 10:03:44 +0000 (12:03 +0200)] 
autom4te: update Automake preselections to reflect upcoming 1.13

Issue revealed by a failure in test "35: tools.at: autom4te preselections"

* lib/autom4te.in ("Automake-preselections"): Add automake-provided
macro '_AM_EXTRA_RECURSIVE_TARGETS'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoAC_PROG_CC_C89, AC_PROG_CC_C99: Use AU_DEFUN
Paul Eggert [Wed, 24 Oct 2012 22:28:24 +0000 (15:28 -0700)] 
AC_PROG_CC_C89, AC_PROG_CC_C99: Use AU_DEFUN

* tests/mktests.sh (au_exclude_list): Exclude AC_PROG_CC_C89
and AC_PROG_CC_C99 too.  Suggested by Adrian Bunk.

12 years agoAC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_DEFUN
Paul Eggert [Wed, 24 Oct 2012 19:25:34 +0000 (12:25 -0700)] 
AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_DEFUN

This fixes a bug introduced by the most recent change to c.m4.
Problem reported by Jim Meyering in
<http://lists.gnu.org/archive/html/autoconf/2012-10/msg00048.html>.
* lib/autoconf/c.m4 (AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
Use AU_DEFUN and AC_REQUIRE, not AU_ALIAS, as the latter is not
compatible with how Automake redefines AC_PROG_CC.

12 years agoAC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_ALIAS.
Paul Eggert [Tue, 16 Oct 2012 20:32:31 +0000 (13:32 -0700)] 
AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_ALIAS.

Based on a suggestion by Adrian Bunk in
http://lists.gnu.org/archive/html/autoconf-patches/2012-09/msg00040.html
* lib/autoconf/c.m4 (AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
Use AU_ALIAS, now that AC_PROG_CC is defined via AC_DEFUN_ONCE.

12 years agoAC_PROG_CC: define via AC_DEFUN_ONCE
Paul Eggert [Tue, 16 Oct 2012 20:20:58 +0000 (13:20 -0700)] 
AC_PROG_CC: define via AC_DEFUN_ONCE

Suggested by Adrian Bunk in
http://lists.gnu.org/archive/html/autoconf-patches/2012-09/msg00034.html
* NEWS:
* doc/autoconf.texi (C Compiler): Document it
* lib/autoconf/c.m4 (AC_PROG_CC): Implement it.

12 years agoAC_PROG_CC: clarify documentation, encourage -qlanglvl=extc1x
Paul Eggert [Fri, 28 Sep 2012 17:44:16 +0000 (10:44 -0700)] 
AC_PROG_CC: clarify documentation, encourage -qlanglvl=extc1x

* doc/autoconf.texi (C Compiler): Document the intent of AC_PROG_CC
better.  It's not meant to check for strict conformance, only to
get the latest version with extensions.
(Running the Preprocessor, Present But Cannot Be Compiled):
Document new diagnostic wording.
* lib/autoconf/c.m4 (_AC_C_STD_TRY): Change diagnostic wording from
"checking for gcc option to accept ISO C11" to
"checkint for gcc option to enable C11 features", as this better
reflects what is actually happening.
(_AC_PROG_CC_C99): Put -qlanglvl=extc1x here ...
(_AC_PROG_CC_C11): ... rather than here, as it doesn't pass the C11
test with IBM XL C V12.1, and the point is to enable features not to
test for strict conformance.

12 years agoAC_PROG_CC: try -qlanglvl=extc1x, for IBM XL C V12.1
Paul Eggert [Wed, 26 Sep 2012 14:49:59 +0000 (07:49 -0700)] 
AC_PROG_CC: try -qlanglvl=extc1x, for IBM XL C V12.1

* lib/autoconf/c.m4 (_AC_PROG_CC_C11): Add -qlanglvl=extc1x, for
IBM XL C V12.1.  It shouldn't pass the C11 test yet, since it's not
documented to support _Alignas, _Alignof, UTF-8 string literals,
and duplicate typedefs, but presumably it will eventually.

12 years agomaint: fix the comment at the end of _AC_FUNC_REALLOC_IF
Adrian Bunk [Tue, 25 Sep 2012 12:25:03 +0000 (15:25 +0300)] 
maint: fix the comment at the end of _AC_FUNC_REALLOC_IF

* lib/autoconf/functions.m4: fix the comment at the end of
_AC_FUNC_REALLOC_IF
Copyright-paperwork-exempt: yes

12 years agoAC_PROG_CC_C89, AC_PROG_CC_C99: now obsolete; defer to AC_PROG_CC
Paul Eggert [Sat, 22 Sep 2012 02:19:54 +0000 (19:19 -0700)] 
AC_PROG_CC_C89, AC_PROG_CC_C99: now obsolete; defer to AC_PROG_CC

* NEWS:
* doc/autoconf.texi (C Compiler, Running the Preprocessor)
(Limitations of Usual Tools, Present But Cannot Be Compiled)
(Obsolete Macros):
Document the changes described below.
* lib/autoconf/c.m4 (_AC_PROG_CC_FORCE_VERSION): Remove.
(AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
Just do AC_PROG_CC, but mark as obsolete.  This replaces my recent
ill-advised attempt to let AC_PROG_CC_C89 and AC_PROG_CC_C99 downgrade
the version of C supported.
* doc/autoconf.texi (Limitations of Usual Tools, Volatile Objects):
Document C11 more accurately.  In some cases this involves removing
some details about 'volatile', alas, since C11 changed this stuff.
Again.

12 years agotests: sort preselections to make test failures easier to read
Eric Blake [Fri, 21 Sep 2012 21:27:58 +0000 (15:27 -0600)] 
tests: sort preselections to make test failures easier to read

Prompted by Stefano Lattarini's report of a test failure due to
a missing preselection for automake 1.12.

* tests/tools.at (autom4te preselections): Sort before diffing.

12 years agomaint: resync most files from upstream
Stefano Lattarini [Fri, 21 Sep 2012 12:37:00 +0000 (14:37 +0200)] 
maint: resync most files from upstream

The files in lib/Autom4te/ are intentionally not synced at this point,
since automake commit v1.11-2114-g2d671e1 "perl refactor: use modern
semantics of 'open'":
<http://lists.gnu.org/archive/html/automake-patches/2012-03/msg00111.html>
would require wider adaptation of our scripts to the new XFile API, and
also exposes some latent bugs in autoconf where we use raw 'open' instead
of XFile::open.  We'll take care of that in a later patches (maybe).

* build-aux/announce-gen: Resync via 'make fetch'.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/make-stds.texi: Likewise.
* doc/standards.texi: Likewise.
* maint.mk: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: quote 'like this', not `like this'
Stefano Lattarini [Fri, 21 Sep 2012 10:34:48 +0000 (12:34 +0200)] 
build: quote 'like this', not `like this'

As per updated GCS recommendations.

* Makefile.am, configure.ac, lib/m4sugar/Makefile.am,
tests/Makefile.am, m4/m4.m4: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautom4te: update Automake preselections to reflect the changes in 1.12.x
Stefano Lattarini [Fri, 21 Sep 2012 19:28:34 +0000 (21:28 +0200)] 
autom4te: update Automake preselections to reflect the changes in 1.12.x

Issue revealed by a failure in test "35: tools.at: autom4te preselections":
<http://lists.gnu.org/archive/html/bug-autoconf/2012-09/msg00020.html>

* lib/autom4te.in: Add 'AM_PROG_MKDIR_P'.

Helped-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautoreconf: assume --force-missing automake option is supported
Stefano Lattarini [Fri, 21 Sep 2012 18:59:01 +0000 (20:59 +0200)] 
autoreconf: assume --force-missing automake option is supported

According to Automake's NEWS file, it is since at least Automake 1.8,
and in autoreconf we are already assuming aclocal >= 1.8 anyway.

* bin/autoreconf.in (parse_args): Simplify a little by just assuming
the automake option '--force-missing' is supported.
($automake_supports_force_missing): Delete, no longer needed.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautoreconf: minor simplifying refactoring
Stefano Lattarini [Fri, 21 Sep 2012 07:56:06 +0000 (09:56 +0200)] 
autoreconf: minor simplifying refactoring

* bin/autoreconf.in (run_aclocal): After the previous commit, this has
become just a useless wrapper around xsystem("$aclocal .."), so get rid
of it, and inline its expansion in the two places where it was used ...
(autoreconf_current_directory): ... in here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautoreconf: drop support for old (< 1.8) aclocal versions
Stefano Lattarini [Fri, 21 Sep 2012 07:51:33 +0000 (09:51 +0200)] 
autoreconf: drop support for old (< 1.8) aclocal versions

The minimal automake and aclocal version required by the "most"
conservative important real world-projects (like Gnulib and Libvirt)
is 1.9 anyway (which is the version installed on old but still
supported installations of stable Distros like RHEL 5), so this
change should be safe and justified by now.

* bin/autoreconf.in (parse_args): Simplify by just assuming the aclocal
options '--force' and '--no-force' are supported and works correctly.
($aclocal_supports_force): Delete, no longer needed.
(run_aclocal): Heavily simplify by assuming that aclocal properly creates
'aclocal.m4' as lazily as possible.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoscripts: quote 'like this', not `like this'
Stefano Lattarini [Fri, 21 Sep 2012 08:51:36 +0000 (10:51 +0200)] 
scripts: quote 'like this', not `like this'

As per updated GCS recommendations.

* bin/autoconf.as, bin/autoreconf.in, bin/autoscan.in, ifnames.in,
bin/autoupdate.in: Throughout these files.
* bin/autoheader.in, bin/autom4te.in: Likewise.  Also, remove some
useless escaping of the "'" single-quote characters, and reformat
some message for better line wrapping.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>