]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_REPLACE_FUNCS: restore shell loop for non-literal
authorEric Blake <eblake@redhat.com>
Tue, 21 Sep 2010 23:00:09 +0000 (17:00 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 21 Sep 2010 23:08:36 +0000 (17:08 -0600)
* lib/autoconf/functions.m4 (AC_REPLACE_FUNCS): Handle
non-literals, which was lost in 2010-02-26 optimization.
* tests/semantics.at (AC_REPLACE_FUNCS): Enhance test.
* NEWS: Document the fix.
* THANKS: Update.
Reported by Wiseman Jun.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
NEWS
THANKS
lib/autoconf/functions.m4
tests/semantics.at

index f705a59baec25a895c5641f04fa657e2c88e9ba5..27ab27d50d4c4e0c4695445009e6bc8683282f12 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-09-21  Eric Blake  <eblake@redhat.com>
 
+       AC_REPLACE_FUNCS: restore shell loop for non-literal
+       * lib/autoconf/functions.m4 (AC_REPLACE_FUNCS): Handle
+       non-literals, which was lost in 2010-02-26 optimization.
+       * tests/semantics.at (AC_REPLACE_FUNCS): Enhance test.
+       * NEWS: Document the fix.
+       * THANKS: Update.
+       Reported by Wiseman Jun.
+
        maint: resync upstream files
        * build-aux/gendocs.sh: Resync via 'make fetch'.
 
diff --git a/NEWS b/NEWS
index 65013c79aa9a1547c60ed0ff039650318ea31d1f..1cae249418931a1197b17336d54c9a1acfb8d27d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,12 +5,16 @@ GNU Autoconf NEWS - User visible changes.
 ** AC_MSG_ERROR (and AS_ERROR) can once again be followed immediately by
    `dnl'.  Regression introduced in 2.66.
 
-** AT_BANNER() with empty argument will cause visual separation from previous
-   test category.
-
 ** AC_INIT again allows URLs with '?' for its BUG-REPORT argument.
    Regression introduced in 2.66.
 
+** AC_REPLACE_FUNCS again allows a non-literal argument, such as a shell
+   variable that expands to a list of functions to check.  Regression
+   introduced in 2.66.
+
+** AT_BANNER() with empty argument will cause visual separation from previous
+   test category.
+
 ** The macros AC_PREPROC_IFELSE, AC_COMPILE_IFELSE, AC_LINK_IFELSE, and
    AC_RUN_IFELSE now warn if the first argument failed to use
    AC_LANG_SOURCE or AC_LANG_PROGRAM to generate the conftest file
diff --git a/THANKS b/THANKS
index 4acb36f63df34b13c388a8685290a431224f44dd..ed871a80d74986b99560915fcaf971b616da07e8 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -414,6 +414,7 @@ Wayne Chapeskie             waynec@spinnaker.com
 Werner Lemberg              wl@gnu.org
 Wilfredo Sanchez            wsanchez@apple.com
 William Pursell             bill.pursell@gmail.com
+Wiseman Jun                 junwiseman@gmail.com
 Wolfgang Mueller            Wolfgang.Mueller@cui.unige.ch
 Yaakov Selkowitz            yselkowitz@users.sourceforge.net
 Yavor Doganov               yavor@gnu.org
index f03991baedc9237b2c19fe3231db262eadfd7d81..ca0271245e30c507d24e1412a4b1d902fbbe7e97 100644 (file)
@@ -131,8 +131,12 @@ m4_define([_AC_REPLACE_FUNC],
 # equivalent of AC_CHECK_FUNC, then call AC_LIBOBJ if the function
 # was not found.
 AC_DEFUN([AC_REPLACE_FUNCS],
+[AS_LITERAL_IF([$1],
 [m4_map_args_w([$1], [_AC_REPLACE_FUNC(], [)
-])])
+])],
+[AC_CHECK_FUNCS([$1],
+  [_AH_CHECK_FUNC([$ac_func])AC_DEFINE(AS_TR_CPP([HAVE_$ac_func]))],
+  [_AC_LIBOBJ([$ac_func])])])])
 
 
 # AC_TRY_LINK_FUNC(FUNC, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
index 48136cd2f16251a815929431bdb093a377d1e985..9fd08e047b34ac8a169ce475dbfe62d93b67f831 100644 (file)
@@ -176,8 +176,13 @@ AT_DATA([config.in],
 ])
 
 AT_CONFIGURE_AC(
-[AC_CONFIG_FILES(config.libobjs:config.in)
-AC_REPLACE_FUNCS(printf autoconf_ftnirp)])
+[AC_CONFIG_FILES([config.libobjs:config.in])
+AC_REPLACE_FUNCS([printf autoconf_ftnirp])
+funcs='fprintf autoconf_ftnirpf'
+AH_TEMPLATE([HAVE_FPRINTF], [])
+AH_TEMPLATE([HAVE_AUTOCONF_FTNIRPF], [])
+AC_REPLACE_FUNCS([$funcs])
+AS_UNSET([funcs])])
 
 AT_CHECK_AUTOCONF([-W obsolete])
 AT_CHECK_AUTOHEADER
@@ -185,11 +190,13 @@ AT_CHECK_CONFIGURE
 AT_CHECK_ENV
 AT_CHECK_DEFINES(
 [/* #undef HAVE_AUTOCONF_FTNIRP */
+/* #undef HAVE_AUTOCONF_FTNIRPF */
+#define HAVE_FPRINTF 1
 #define HAVE_PRINTF 1
 ])
 
 AT_CHECK([sed 's/  */ /g;s/^ //;s/ $//' config.libobjs], [],
-        [${LIBOBJDIR}autoconf_ftnirp$U.o
+        [${LIBOBJDIR}autoconf_ftnirp$U.o ${LIBOBJDIR}autoconf_ftnirpf$U.o
 ])
 
 AT_CLEANUP