[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_USE_SYSTEM_EXTENSIONS should be AC_DEFUN_ONCEd
From: |
Eric Blake |
Subject: |
Re: AC_USE_SYSTEM_EXTENSIONS should be AC_DEFUN_ONCEd |
Date: |
Mon, 26 Jan 2009 21:16:30 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
> > Assuming the new semantics of AC_DEFUN_ONCE proposed by Paolo Bonzini and
> > Eric Blake, I think the macro AC_USE_SYSTEM_EXTENSIONS should be defined
> > through AC_DEFUN_ONCE.
>
> Agreed, and so should many other functions. But let's get AC_DEFUN_ONCE
> fixed and backported to gnulib before scrubbing autoconf macros for
> one-shot semantics.
>
> > For 2.64, defining AC_USE_SYSTEM_EXTENSIONS through AC_DEFUN_ONCE should fix
> > all these problems, IMO. But feel free to add these 4 test cases to the test
> > suite nevertheless
>
> Yes, the existing tests for AC_USE_SYSTEM_EXTENSIONS should be expanded as
> part of the fix.
Here's my first pass at this. I didn't touch functions.m4, types.m4, or most
of headers.m4, because most of those macros are dependent on the current
language (C or C++). Although they generally have no difference in effect
regardless of whether the current language was C or C++, I didn't want to rule
out the possibility of code that pushes a language, runs the test, then saves
the result of the run in differently-named variables before popping the
language, then reuses the macro in another language. If we made macros like
AC_FUNC_ALLOCA one-shot, then it cannot be reused in that manner.
I think for all of the functions I have touched here, that we can safely say
that the semantics are one-shot, and that they are either language independent
or tied to a particular language, such that there should never be a reason to
need to expand them twice. Speak up if you think I should exclude particular
macros from this list. I'll wait for either some feedback or 72 hours before
committing this.
Of all of these macros, AC_USE_SYSTEM_EXTENSIONS and AC_PROG_MKDIR_P made the
most difference to coreutils' configure file after converting them to proper
one-shot macros.
From: Eric Blake <address@hidden>
Date: Mon, 26 Jan 2009 13:55:06 -0700
Subject: [PATCH] Use AC_DEFUN_ONCE more liberally.
* lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Switch to
AC_DEFUN_ONCE, since this is a one-shot macro.
(AC_PROG_AWK, AC_PROG_GREP, AC_PROG_EGREP, AC_PROG_FGREP)
(AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_LN_S, AC_PROG_RANLIB)
(AC_PROG_SED, AC_PROG_YACC): Likewise.
* lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Likewise.
* lib/autoconf/lang.m4 (AC_LANG_WERROR): Likewise.
* lib/autoconf/c.m4 (AC_PROG_CC_C_O, AC_PROG_CPP)
(AC_PROG_CPP_WERROR, AC_PROG_CC_STDC, AC_PROG_CC_C89)
(AC_PROG_CC_C99, AC_PROG_GCC_TRADITIONAL, AC_PROG_CXXCPP)
(AC_PROG_CXX_C_O, AC_PROG_OBJCPP): Likewise.
* lib/autoconf/fortran.m4 (AC_PROG_F77_C_O, AC_PROG_FC_C_O)
(AC_F77_LIBRARY_LDFLAGS, AC_FC_LIBRARY_LDFLAGS, AC_F77_MAIN)
(AC_FC_MAIN, AC_F77_WRAPPERS, AC_FC_WRAPPERS): Likewise.
* lib/autoconf/libs.m4 (AC_PATH_X, AC_PATH_XTRA): Likewise.
* lib/autoconf/specific.m4 (AC_SYS_INTERPRETER)
(AC_SYS_LARGEFILE, AC_SYS_LONG_FILE_NAMES)
(AC_USE_SYSTEM_EXTENSIONS): Likewise.
* lib/autoconf/erlang.m4 (AC_ERLANG_SUBST_ROOT_DIR)
(AC_ERLANG_SUBST_LIB_DIR, AC_ERLANG_SUBST_INSTALL_LIB_DIR):
Likewise.
* lib/autoconf/general.m4 (AC_CANONICAL_BUILD)
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET, AC_PRESERVE_HELP_ORDER)
(AC_DISABLE_OPTION_CHECKING):
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 28 +++++++++++++++++
lib/autoconf/c.m4 | 24 +++++++-------
lib/autoconf/erlang.m4 | 74 +++++++++++++++++++++++-----------------------
lib/autoconf/fortran.m4 | 20 ++++++------
lib/autoconf/general.m4 | 13 ++++----
lib/autoconf/headers.m4 | 2 +-
lib/autoconf/lang.m4 | 6 ++--
lib/autoconf/libs.m4 | 7 ++--
lib/autoconf/programs.m4 | 25 ++++++++-------
lib/autoconf/specific.m4 | 12 ++++----
10 files changed, 121 insertions(+), 90 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e7d833f..6075b0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,33 @@
2009-01-26 Eric Blake <address@hidden>
+ Use AC_DEFUN_ONCE more liberally.
+ * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Switch to
+ AC_DEFUN_ONCE, since this is a one-shot macro.
+ (AC_PROG_AWK, AC_PROG_GREP, AC_PROG_EGREP, AC_PROG_FGREP)
+ (AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_LN_S, AC_PROG_RANLIB)
+ (AC_PROG_SED, AC_PROG_YACC): Likewise.
+ * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Likewise.
+ * lib/autoconf/lang.m4 (AC_LANG_WERROR): Likewise.
+ * lib/autoconf/c.m4 (AC_PROG_CC_C_O, AC_PROG_CPP)
+ (AC_PROG_CPP_WERROR, AC_PROG_CC_STDC, AC_PROG_CC_C89)
+ (AC_PROG_CC_C99, AC_PROG_GCC_TRADITIONAL, AC_PROG_CXXCPP)
+ (AC_PROG_CXX_C_O, AC_PROG_OBJCPP): Likewise.
+ * lib/autoconf/fortran.m4 (AC_PROG_F77_C_O, AC_PROG_FC_C_O)
+ (AC_F77_LIBRARY_LDFLAGS, AC_FC_LIBRARY_LDFLAGS, AC_F77_MAIN)
+ (AC_FC_MAIN, AC_F77_WRAPPERS, AC_FC_WRAPPERS): Likewise.
+ * lib/autoconf/libs.m4 (AC_PATH_X, AC_PATH_XTRA): Likewise.
+ * lib/autoconf/specific.m4 (AC_SYS_INTERPRETER)
+ (AC_SYS_LARGEFILE, AC_SYS_LONG_FILE_NAMES)
+ (AC_USE_SYSTEM_EXTENSIONS): Likewise.
+ * lib/autoconf/erlang.m4 (AC_ERLANG_SUBST_ROOT_DIR)
+ (AC_ERLANG_SUBST_LIB_DIR, AC_ERLANG_SUBST_INSTALL_LIB_DIR):
+ Likewise.
+ * lib/autoconf/general.m4 (AC_CANONICAL_BUILD)
+ (AC_CANONICAL_HOST, AC_CANONICAL_TARGET, AC_PRESERVE_HELP_ORDER)
+ (AC_DISABLE_OPTION_CHECKING):
+
+2009-01-26 Eric Blake <address@hidden>
+
Improve AC_DEFUN_ONCE semantics.
* lib/m4sugar/m4sugar.m4 (m4_defun_once): Rewrite to be no-op,
rather than warning, on second use, and make sure first use never
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index beaf0b1..56827a2 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -1,7 +1,7 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Programming languages support.
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free
-# Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -378,7 +378,7 @@ AS_IF([$ac_preproc_ok], [$1], [$2])
# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CC.
AN_MAKEVAR([CPP], [AC_PROG_CPP])
AN_PROGRAM([cpp], [AC_PROG_CPP])
-AC_DEFUN([AC_PROG_CPP],
+AC_DEFUN_ONCE([AC_PROG_CPP],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_ARG_VAR([CPP], [C preprocessor])dnl
_AC_ARG_VAR_CPPFLAGS()dnl
@@ -412,7 +412,7 @@ AC_LANG_POP(C)dnl
# AC_PROG_CPP_WERROR
# ------------------
# Treat warnings from the preprocessor as errors.
-AC_DEFUN([AC_PROG_CPP_WERROR],
+AC_DEFUN_ONCE([AC_PROG_CPP_WERROR],
[AC_REQUIRE([AC_PROG_CPP])dnl
ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
@@ -533,7 +533,7 @@ fi[]dnl
# AC_PROG_GCC_TRADITIONAL
# -----------------------
-AC_DEFUN([AC_PROG_GCC_TRADITIONAL],
+AC_DEFUN_ONCE([AC_PROG_GCC_TRADITIONAL],
[AC_REQUIRE([AC_PROG_CC])dnl
if test $ac_cv_c_compiler_gnu = yes; then
AC_CACHE_CHECK(whether $CC needs -traditional,
@@ -557,7 +557,7 @@ fi
# AC_PROG_CC_C_O
# --------------
-AC_DEFUN([AC_PROG_CC_C_O],
+AC_DEFUN_ONCE([AC_PROG_CC_C_O],
[AC_REQUIRE([AC_PROG_CC])dnl
if test "x$CC" != xcc; then
AC_MSG_CHECKING([whether $CC and cc understand -c and -o together])
@@ -626,7 +626,7 @@ AC_DEFUN([AC_LANG_PREPROC(C++)],
# Find a working C++ preprocessor.
# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency
# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CXX.
-AC_DEFUN([AC_PROG_CXXCPP],
+AC_DEFUN_ONCE([AC_PROG_CXXCPP],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_ARG_VAR([CXXCPP], [C++ preprocessor])dnl
_AC_ARG_VAR_CPPFLAGS()dnl
@@ -769,7 +769,7 @@ fi[]dnl
# ---------------
# Test if the C++ compiler accepts the options `-c' and `-o'
# simultaneously, and define `CXX_NO_MINUS_C_MINUS_O' if it does not.
-AC_DEFUN([AC_PROG_CXX_C_O],
+AC_DEFUN_ONCE([AC_PROG_CXX_C_O],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_LANG_PUSH([C++])dnl
AC_CACHE_CHECK([whether $CXX understands -c and -o together],
@@ -812,7 +812,7 @@ AC_DEFUN([AC_LANG_PREPROC(Objective C)],
# AC_PROG_OBJCPP
# --------------
# Find a working Objective C preprocessor.
-AC_DEFUN([AC_PROG_OBJCPP],
+AC_DEFUN_ONCE([AC_PROG_OBJCPP],
[AC_REQUIRE([AC_PROG_OBJC])dnl
AC_ARG_VAR([OBJCPP], [Objective C preprocessor])dnl
_AC_ARG_VAR_CPPFLAGS()dnl
@@ -1205,7 +1205,7 @@ dnl with extended modes being tried first.
# AC_PROG_CC_C89
# --------------
-AC_DEFUN([AC_PROG_CC_C89],
+AC_DEFUN_ONCE([AC_PROG_CC_C89],
[ AC_REQUIRE([AC_PROG_CC])dnl
_AC_PROG_CC_C89
])
@@ -1213,7 +1213,7 @@ AC_DEFUN([AC_PROG_CC_C89],
# AC_PROG_CC_C99
# --------------
-AC_DEFUN([AC_PROG_CC_C99],
+AC_DEFUN_ONCE([AC_PROG_CC_C99],
[ AC_REQUIRE([AC_PROG_CC])dnl
_AC_PROG_CC_C99
])
@@ -1221,7 +1221,7 @@ AC_DEFUN([AC_PROG_CC_C99],
# AC_PROG_CC_STDC
# ---------------
-AC_DEFUN([AC_PROG_CC_STDC],
+AC_DEFUN_ONCE([AC_PROG_CC_STDC],
[ AC_REQUIRE([AC_PROG_CC])dnl
AS_CASE([$ac_cv_prog_cc_stdc],
[no], [ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no],
diff --git a/lib/autoconf/erlang.m4 b/lib/autoconf/erlang.m4
index 7f6d92d..07d8730 100644
--- a/lib/autoconf/erlang.m4
+++ b/lib/autoconf/erlang.m4
@@ -1,6 +1,6 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Erlang/OTP language support.
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -163,7 +163,7 @@ $2
# Find the Erlang preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able.
AC_DEFUN([AC_LANG_PREPROC(Erlang)],
[m4_warn([syntax],
- [$0: No preprocessor defined for ]_AC_LANG)])
+ [$0: No preprocessor defined for ]_AC_LANG)])
# AC_LANG_COMPILER(Erlang)
# ------------------------
@@ -184,29 +184,29 @@ AC_CACHE_CHECK([for Erlang/OTP '$1' library subdirectory],
[erlang_cv_lib_dir_$1],
[AC_LANG_PUSH(Erlang)[]dnl
AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([], [dnl
- ReturnValue = case code:lib_dir("[$1]") of
- {error, bad_name} ->
- file:write_file("conftest.out", "not found\n"),
- 1;
- LibDir ->
- file:write_file("conftest.out", LibDir),
- 0
- end,
- halt(ReturnValue)])],
- [erlang_cv_lib_dir_$1=`cat conftest.out`],
- [if test ! -f conftest.out; then
- AC_MSG_FAILURE([test Erlang program execution failed])
- else
- erlang_cv_lib_dir_$1="not found"
- fi])
+ [AC_LANG_PROGRAM([], [dnl
+ ReturnValue = case code:lib_dir("[$1]") of
+ {error, bad_name} ->
+ file:write_file("conftest.out", "not found\n"),
+ 1;
+ LibDir ->
+ file:write_file("conftest.out", LibDir),
+ 0
+ end,
+ halt(ReturnValue)])],
+ [erlang_cv_lib_dir_$1=`cat conftest.out`],
+ [if test ! -f conftest.out; then
+ AC_MSG_FAILURE([test Erlang program execution failed])
+ else
+ erlang_cv_lib_dir_$1="not found"
+ fi])
AC_LANG_POP(Erlang)[]dnl
])
AC_CACHE_CHECK([for Erlang/OTP '$1' library version],
[erlang_cv_lib_ver_$1],
[AS_IF([test "$erlang_cv_lib_dir_$1" = "not found"],
- [erlang_cv_lib_ver_$1="not found"],
- [erlang_cv_lib_ver_$1=`AS_ECHO(["$erlang_cv_lib_dir_$1"]) | sed -n -
e 's,^.*-\([[^/-]]*\)$,\1,p'`])[]dnl
+ [erlang_cv_lib_ver_$1="not found"],
+ [erlang_cv_lib_ver_$1=`AS_ECHO(["$erlang_cv_lib_dir_$1"]) | sed -n -
e 's,^.*-\([[^/-]]*\)$,\1,p'`])[]dnl
])
AC_SUBST([ERLANG_LIB_DIR_$1], [$erlang_cv_lib_dir_$1])
AC_SUBST([ERLANG_LIB_VER_$1], [$erlang_cv_lib_ver_$1])
@@ -218,20 +218,20 @@ AS_IF([test "$erlang_cv_lib_dir_$1" = "not found"], [$3],
[$2])
# ------------------------
# Determines the Erlang/OTP root directory
#
-AC_DEFUN([AC_ERLANG_SUBST_ROOT_DIR],
+AC_DEFUN_ONCE([AC_ERLANG_SUBST_ROOT_DIR],
[AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl
AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl
AC_CACHE_CHECK([for Erlang/OTP root directory],
[erlang_cv_root_dir],
[AC_LANG_PUSH(Erlang)[]dnl
AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([], [dnl
- RootDir = code:root_dir(),
- file:write_file("conftest.out", RootDir),
- ReturnValue = 0,
- halt(ReturnValue)])],
- [erlang_cv_root_dir=`cat conftest.out`],
- [AC_MSG_FAILURE([test Erlang program execution failed])])
+ [AC_LANG_PROGRAM([], [dnl
+ RootDir = code:root_dir(),
+ file:write_file("conftest.out", RootDir),
+ ReturnValue = 0,
+ halt(ReturnValue)])],
+ [erlang_cv_root_dir=`cat conftest.out`],
+ [AC_MSG_FAILURE([test Erlang program execution failed])])
AC_LANG_POP(Erlang)[]dnl
])
AC_SUBST([ERLANG_ROOT_DIR], [$erlang_cv_root_dir])
@@ -240,20 +240,20 @@ AC_SUBST([ERLANG_ROOT_DIR], [$erlang_cv_root_dir])
# AC_ERLANG_SUBST_LIB_DIR
# -----------------------
-AC_DEFUN([AC_ERLANG_SUBST_LIB_DIR],
+AC_DEFUN_ONCE([AC_ERLANG_SUBST_LIB_DIR],
[AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl
AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl
AC_CACHE_CHECK([for Erlang/OTP library base directory],
[erlang_cv_lib_dir],
[AC_LANG_PUSH(Erlang)[]dnl
AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([], [dnl
- LibDir = code:lib_dir(),
- file:write_file("conftest.out", LibDir),
- ReturnValue = 0,
- halt(ReturnValue)])],
- [erlang_cv_lib_dir=`cat conftest.out`],
- [AC_MSG_FAILURE([test Erlang program execution failed])])
+ [AC_LANG_PROGRAM([], [dnl
+ LibDir = code:lib_dir(),
+ file:write_file("conftest.out", LibDir),
+ ReturnValue = 0,
+ halt(ReturnValue)])],
+ [erlang_cv_lib_dir=`cat conftest.out`],
+ [AC_MSG_FAILURE([test Erlang program execution failed])])
AC_LANG_POP(Erlang)[]dnl
])
AC_SUBST([ERLANG_LIB_DIR], [$erlang_cv_lib_dir])
@@ -267,7 +267,7 @@ AC_SUBST([ERLANG_LIB_DIR], [$erlang_cv_lib_dir])
# directories determined by running the Erlang/OTP installation that is used
# for building.
#
-AC_DEFUN([AC_ERLANG_SUBST_INSTALL_LIB_DIR],
+AC_DEFUN_ONCE([AC_ERLANG_SUBST_INSTALL_LIB_DIR],
[AC_MSG_CHECKING([for Erlang/OTP library installation base directory])
AC_ARG_VAR([ERLANG_INSTALL_LIB_DIR],
[Erlang/OTP library installation base directory [LIBDIR/erlang/lib]])
diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index f144c0e..d7339a1 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -1,7 +1,7 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Fortran languages support.
-# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+# Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -477,7 +477,7 @@ fi
# AC_PROG_F77_C_O
# ---------------
-AC_DEFUN([AC_PROG_F77_C_O],
+AC_DEFUN_ONCE([AC_PROG_F77_C_O],
[AC_REQUIRE([AC_PROG_F77])dnl
AC_LANG_PUSH(Fortran 77)dnl
_AC_PROG_FC_C_O
@@ -487,7 +487,7 @@ AC_LANG_POP(Fortran 77)dnl
# AC_PROG_FC_C_O
# ---------------
-AC_DEFUN([AC_PROG_FC_C_O],
+AC_DEFUN_ONCE([AC_PROG_FC_C_O],
[AC_REQUIRE([AC_PROG_FC])dnl
AC_LANG_PUSH(Fortran)dnl
_AC_PROG_FC_C_O
@@ -716,7 +716,7 @@ AC_SUBST([]_AC_LANG_PREFIX[]LIBS)
# AC_F77_LIBRARY_LDFLAGS
# ----------------------
-AC_DEFUN([AC_F77_LIBRARY_LDFLAGS],
+AC_DEFUN_ONCE([AC_F77_LIBRARY_LDFLAGS],
[AC_REQUIRE([AC_PROG_F77])dnl
AC_LANG_PUSH(Fortran 77)dnl
_AC_FC_LIBRARY_LDFLAGS
@@ -726,7 +726,7 @@ AC_LANG_POP(Fortran 77)dnl
# AC_FC_LIBRARY_LDFLAGS
# ----------------------
-AC_DEFUN([AC_FC_LIBRARY_LDFLAGS],
+AC_DEFUN_ONCE([AC_FC_LIBRARY_LDFLAGS],
[AC_REQUIRE([AC_PROG_FC])dnl
AC_LANG_PUSH(Fortran)dnl
_AC_FC_LIBRARY_LDFLAGS
@@ -880,7 +880,7 @@ AC_DEFINE_UNQUOTED([]_AC_FC[]_MAIN, $ac_cv_[]_AC_LANG_ABBREV
[]_main,
# AC_F77_MAIN
# -----------
-AC_DEFUN([AC_F77_MAIN],
+AC_DEFUN_ONCE([AC_F77_MAIN],
[AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])dnl
AC_LANG_PUSH(Fortran 77)dnl
_AC_FC_MAIN
@@ -890,7 +890,7 @@ AC_LANG_POP(Fortran 77)dnl
# AC_FC_MAIN
# ----------
-AC_DEFUN([AC_FC_MAIN],
+AC_DEFUN_ONCE([AC_FC_MAIN],
[AC_REQUIRE([AC_FC_LIBRARY_LDFLAGS])dnl
AC_LANG_PUSH(Fortran)dnl
_AC_FC_MAIN
@@ -1060,7 +1060,7 @@ esac
# AC_F77_WRAPPERS
# ---------------
-AC_DEFUN([AC_F77_WRAPPERS],
+AC_DEFUN_ONCE([AC_F77_WRAPPERS],
[AC_REQUIRE([_AC_F77_NAME_MANGLING])dnl
AC_LANG_PUSH(Fortran 77)dnl
_AC_FC_WRAPPERS
@@ -1070,7 +1070,7 @@ AC_LANG_POP(Fortran 77)dnl
# AC_FC_WRAPPERS
# --------------
-AC_DEFUN([AC_FC_WRAPPERS],
+AC_DEFUN_ONCE([AC_FC_WRAPPERS],
[AC_REQUIRE([_AC_FC_NAME_MANGLING])dnl
AC_LANG_PUSH(Fortran)dnl
_AC_FC_WRAPPERS
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index bcf8720..748f5af 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1,7 +1,8 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Parameterized macros.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -1419,7 +1420,7 @@ AC_LANG_PUSH(C)
# ----------------------
# Emit help strings in the order given, rather than grouping all --enable-FOO
# and all --with-BAR.
-AC_DEFUN([AC_PRESERVE_HELP_ORDER],
+AC_DEFUN_ONCE([AC_PRESERVE_HELP_ORDER],
[m4_divert_once([HELP_ENABLE], [[
Optional Features and Packages:
--disable-option-checking ignore unrecognized --enable/--with options
@@ -1483,7 +1484,7 @@ AU_DEFUN([AC_WITH],
# AC_DISABLE_OPTION_CHECKING
# --------------------------------------------------------------------
-AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
+AC_DEFUN_ONCE([AC_DISABLE_OPTION_CHECKING],
[m4_divert_once([DEFAULTS], [enable_option_checking=no])
])# AC_DISABLE_OPTION_CHECKING
@@ -1768,7 +1769,7 @@ AC_SUBST([$1_os])dnl
# AC_CANONICAL_BUILD
# ------------------
-AC_DEFUN([AC_CANONICAL_BUILD],
+AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_REQUIRE_AUX_FILE([config.sub])dnl
AC_REQUIRE_AUX_FILE([config.guess])dnl
@@ -1795,7 +1796,7 @@ _AC_CANONICAL_SPLIT(build)
# AC_CANONICAL_HOST
# -----------------
-AC_DEFUN([AC_CANONICAL_HOST],
+AC_DEFUN_ONCE([AC_CANONICAL_HOST],
[AC_REQUIRE([AC_CANONICAL_BUILD])dnl
m4_divert_once([HELP_CANON],
[[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])
dnl
@@ -1813,7 +1814,7 @@ _AC_CANONICAL_SPLIT([host])
# AC_CANONICAL_TARGET
# -------------------
-AC_DEFUN([AC_CANONICAL_TARGET],
+AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
m4_divert_once([HELP_CANON],
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index 3702a85..120adc9 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -431,7 +431,7 @@ AN_HEADER([wctype.h], [AC_CHECK_HEADERS])
# AC_HEADER_ASSERT
# ----------------
# Check whether to enable assertions.
-AC_DEFUN([AC_HEADER_ASSERT],
+AC_DEFUN_ONCE([AC_HEADER_ASSERT],
[
AC_MSG_CHECKING([whether to enable assertions])
AC_ARG_ENABLE([assert],
diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4
index 8bbe494..e64bda0 100644
--- a/lib/autoconf/lang.m4
+++ b/lib/autoconf/lang.m4
@@ -1,7 +1,7 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Programming languages support.
-# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free
-# Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -683,6 +683,6 @@ ac_objext=$OBJEXT
# ------------------
# Treat warnings from the current language's preprocessor, compiler, and
# linker as fatal errors.
-AC_DEFUN([AC_LANG_WERROR],
+AC_DEFUN_ONCE([AC_LANG_WERROR],
[m4_divert_text([DEFAULTS], [ac_[]_AC_LANG_ABBREV[]_werror_flag=])
ac_[]_AC_LANG_ABBREV[]_werror_flag=yes])# AC_LANG_WERROR
diff --git a/lib/autoconf/libs.m4 b/lib/autoconf/libs.m4
index cbc4218..834fb54 100644
--- a/lib/autoconf/libs.m4
+++ b/lib/autoconf/libs.m4
@@ -1,7 +1,8 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Checking for libraries.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation,
+# Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -338,7 +339,7 @@ esac])dnl
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
AN_HEADER([X11/Xlib.h], [AC_PATH_X])
-AC_DEFUN([AC_PATH_X],
+AC_DEFUN_ONCE([AC_PATH_X],
[dnl Document the X abnormal options inherited from history.
m4_divert_once([HELP_BEGIN], [
X features:
@@ -380,7 +381,7 @@ fi
# AC_PATH_XTRA
# ------------
# Find additional X libraries, magic flags, etc.
-AC_DEFUN([AC_PATH_XTRA],
+AC_DEFUN_ONCE([AC_PATH_XTRA],
[AC_REQUIRE([AC_PATH_X])dnl
if test "$no_x" = yes; then
# Not all programs may use this symbol, but it does not hurt to define it.
diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index 3f66ae3..a313f59 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -2,7 +2,8 @@
# Checking for programs.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -369,13 +370,13 @@ AN_PROGRAM([awk], [AC_PROG_AWK])
AN_PROGRAM([gawk], [AC_PROG_AWK])
AN_PROGRAM([mawk], [AC_PROG_AWK])
AN_PROGRAM([nawk], [AC_PROG_AWK])
-AC_DEFUN([AC_PROG_AWK],
+AC_DEFUN_ONCE([AC_PROG_AWK],
[AC_CHECK_PROGS(AWK, gawk mawk nawk awk, )])
# AC_PROG_EGREP
# -------------
-AC_DEFUN([AC_PROG_EGREP],
+AC_DEFUN_ONCE([AC_PROG_EGREP],
[AC_REQUIRE([AC_PROG_GREP])dnl
AC_CACHE_CHECK([for egrep], ac_cv_path_EGREP,
[if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -390,7 +391,7 @@ AC_CACHE_CHECK([for egrep], ac_cv_path_EGREP,
# AC_PROG_FGREP
# -------------
-AC_DEFUN([AC_PROG_FGREP],
+AC_DEFUN_ONCE([AC_PROG_FGREP],
[AC_REQUIRE([AC_PROG_GREP])dnl
AC_CACHE_CHECK([for fgrep], ac_cv_path_FGREP,
[if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -408,7 +409,7 @@ AC_CACHE_CHECK([for fgrep], ac_cv_path_FGREP,
# Check for a fully functional grep program that handles
# the longest lines possible and which respects multiple -e options.
# Prefer GNU grep if found.
-AC_DEFUN([AC_PROG_GREP],
+AC_DEFUN_ONCE([AC_PROG_GREP],
[AC_CACHE_CHECK([for grep that handles long lines and -e], ac_cv_path_GREP,
[_$0(GREP, [grep ggrep], [-e 'GREP$' -e '-(cannot match)-'])])
GREP="$ac_cv_path_GREP"
@@ -544,7 +545,7 @@ m4_ifval([$3],
# ---------------
AN_MAKEVAR([INSTALL], [AC_PROG_INSTALL])
AN_PROGRAM([install], [AC_PROG_INSTALL])
-AC_DEFUN([AC_PROG_INSTALL],
+AC_DEFUN_ONCE([AC_PROG_INSTALL],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_REQUIRE_AUX_FILE([install-sh])dnl
# Find a good install program. We prefer a C program (faster),
@@ -682,7 +683,7 @@ AC_SUBST(INSTALL_DATA)dnl
# recognize any option. It will interpret all options as
# directories to create.
AN_MAKEVAR([MKDIR_P], [AC_PROG_MKDIR_P])
-AC_DEFUN([AC_PROG_MKDIR_P],
+AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_REQUIRE_AUX_FILE([install-sh])dnl
AC_MSG_CHECKING([for a thread-safe mkdir -p])
@@ -817,7 +818,7 @@ AU_DEFUN([AC_DECL_YYTEXT], [AC_PROG_LEX])
# ------------
AN_MAKEVAR([LN], [AC_PROG_LN_S])
AN_PROGRAM([ln], [AC_PROG_LN_S])
-AC_DEFUN([AC_PROG_LN_S],
+AC_DEFUN_ONCE([AC_PROG_LN_S],
[AC_MSG_CHECKING([whether ln -s works])
AC_SUBST([LN_S], [$as_ln_s])dnl
if test "$LN_S" = "ln -s"; then
@@ -836,7 +837,7 @@ fi
# always wrong if `foomake' is not available or does not work.
AN_MAKEVAR([MAKE], [AC_PROG_MAKE_SET])
AN_PROGRAM([make], [AC_PROG_MAKE_SET])
-AC_DEFUN([AC_PROG_MAKE_SET],
+AC_DEFUN_ONCE([AC_PROG_MAKE_SET],
[AC_MSG_CHECKING([whether ${MAKE-make} sets \$(MAKE)])
set x ${MAKE-make}
ac_make=`AS_ECHO(["$[2]"]) | sed 's/+/p/g; s/[[^a-zA-Z0-9_]]/_/g'`
@@ -869,7 +870,7 @@ AC_SUBST([SET_MAKE])dnl
# --------------
AN_MAKEVAR([RANLIB], [AC_PROG_RANLIB])
AN_PROGRAM([ranlib], [AC_PROG_RANLIB])
-AC_DEFUN([AC_PROG_RANLIB],
+AC_DEFUN_ONCE([AC_PROG_RANLIB],
[AC_CHECK_TOOL(RANLIB, ranlib, :)])
@@ -885,7 +886,7 @@ adjust the code.])
# -----------
# Check for a fully functional sed program that truncates
# as few characters as possible. Prefer GNU sed if found.
-AC_DEFUN([AC_PROG_SED],
+AC_DEFUN_ONCE([AC_PROG_SED],
[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED,
[dnl ac_script should not contain more than 99 commands (for HP-UX sed),
dnl but more than about 7000 bytes, to catch a limit in Solaris
8 /usr/ucb/sed.
@@ -912,7 +913,7 @@ AN_MAKEVAR([YFLAGS], [AC_PROG_YACC])
AN_PROGRAM([yacc], [AC_PROG_YACC])
AN_PROGRAM([byacc], [AC_PROG_YACC])
AN_PROGRAM([bison], [AC_PROG_YACC])
-AC_DEFUN([AC_PROG_YACC],
+AC_DEFUN_ONCE([AC_PROG_YACC],
[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)dnl
AC_ARG_VAR(YACC,
[The `Yet Another C Compiler' implementation to use. Defaults to the first
diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
index 5fcfe37..8b9e3cd 100644
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -2,8 +2,8 @@
# Macros that test for specific, unclassified, features.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ AU_DEFUN([AC_DECL_SYS_SIGLIST],
# AC_SYS_INTERPRETER
# ------------------
-AC_DEFUN([AC_SYS_INTERPRETER],
+AC_DEFUN_ONCE([AC_SYS_INTERPRETER],
[AC_CACHE_CHECK(whether @%:@! works in shell scripts, ac_cv_sys_interpreter,
[echo '#! /bin/cat
exit 69
@@ -155,7 +155,7 @@ rm -rf conftest*[]dnl
# one must use special compiler options to get large-file access to work.
# For more details about this brain damage please see:
# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
-AC_DEFUN([AC_SYS_LARGEFILE],
+AC_DEFUN_ONCE([AC_SYS_LARGEFILE],
[AC_ARG_ENABLE(largefile,
[ --disable-largefile omit support for large files])
if test "$enable_largefile" != no; then
@@ -208,7 +208,7 @@ fi
# use of `mktemp' is probably inappropriate here since it would fail in
# attempting to create different file names differing after the 14th
# character on file systems without long file names.
-AC_DEFUN([AC_SYS_LONG_FILE_NAMES],
+AC_DEFUN_ONCE([AC_SYS_LONG_FILE_NAMES],
[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names,
[ac_cv_sys_long_file_names=yes
# Test for long file names in all the places we know might matter:
@@ -383,7 +383,7 @@ matches *mingw32*])# AC_MINGW32
# AC_DEFINE. The goal here is to define all known feature-enabling
# macros, then, if reports of conflicts are made, disable macros that
# cause problems on some platforms (such as __EXTENSIONS__).
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
--
1.6.0.4