Commit Graph

6009 Commits

Author SHA1 Message Date
Ralf Wildenhues
59f2fea80a Fix AC_OPENMP for Fortran (F77 and FC).
* lib/autoconf/fortran.m4 (AC_LANG_FUNC_LINK_TRY(Fortran): New.
* tests/c.at (AC_C_RESTRICT and C++, AC_OPENMP and C)
(AC_OPENMP and C++): New tests.
* tests/fortran.at (AC_OPENMP and Fortran 77)
(AC_OPENMP and Fortran): New tests.
* THANKS: Update.
Report by Bart Oldeman.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:15:00 +02:00
Jim Meyering
44483f0242 AC_INIT: Use correct value for PACKAGE_TARNAME.
* lib/autoconf/general.m4 (AC_PACKAGE_NAME): Remove what are excess
quotes around the package name, now that m4_tolower's result is quoted.
* tests/base.at (AC_INIT): Test for this.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 05:38:29 -06:00
Eric Blake
ef9e3bf13a * .gitignore: Ignore html files.
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 05:23:39 -06:00