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'.
** 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
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
# 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)
])
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
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