Test for vasnprintf in the macro that need it.
authorBruno Haible <bruno@clisp.org>
Wed, 7 Mar 2007 01:34:55 +0000 (01:34 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 7 Mar 2007 01:34:55 +0000 (01:34 +0000)
ChangeLog
m4/vasnprintf-posix.m4
m4/vasnprintf.m4
m4/vasprintf-posix.m4

index 3827171..9a749e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-03-06  Bruno Haible  <bruno@clisp.org>
 
+       * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
+       * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
+
+2007-03-06  Bruno Haible  <bruno@clisp.org>
+
        * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
        (asinl): Declare also if HAVE_DECL_ASINL is set.
        (atanl): Declare also if HAVE_DECL_ATANL is set.
index 8556794..a79a267 100644 (file)
@@ -1,4 +1,4 @@
-# vasnprintf-posix.m4 serial 1
+# vasnprintf-posix.m4 serial 2
 dnl Copyright (C) 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,7 @@ AC_DEFUN([gl_FUNC_VASNPRINTF_POSIX],
   AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
   AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
   AC_REQUIRE([gl_PRINTF_POSITIONS])
-  AC_CHECK_FUNCS([vasnprintf])
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
   if expr "$gl_cv_func_printf_sizes_c99" : ".*yes" > /dev/null \
      && expr "$gl_cv_func_printf_directive_a" : ".*yes" > /dev/null \
      && expr "$gl_cv_func_printf_directive_n" : ".*yes" > /dev/null \
index e7b51dc..5aa05bc 100644 (file)
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 8
+# vasnprintf.m4 serial 9
 dnl Copyright (C) 2002-2004, 2006-2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_VASNPRINTF],
 [
   AC_REQUIRE([gl_EOVERFLOW])
-  AC_CHECK_FUNCS([vasnprintf])
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
   if test $ac_cv_func_vasnprintf = no; then
     gl_REPLACE_VASNPRINTF
   fi
@@ -15,6 +15,7 @@ AC_DEFUN([gl_FUNC_VASNPRINTF],
 
 AC_DEFUN([gl_REPLACE_VASNPRINTF],
 [
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
   AC_LIBOBJ([vasnprintf])
   AC_LIBOBJ([printf-args])
   AC_LIBOBJ([printf-parse])
index ac024f2..6c5fc58 100644 (file)
@@ -1,4 +1,4 @@
-# vasprintf-posix.m4 serial 1
+# vasprintf-posix.m4 serial 2
 dnl Copyright (C) 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,7 +19,6 @@ AC_DEFUN([gl_FUNC_VASPRINTF_POSIX],
      && test $ac_cv_func_vasprintf = yes; then
     : # vasprintf exists and is already POSIX compliant.
   else
-    AC_CHECK_FUNCS([vasnprintf])
     if ! expr "$gl_cv_func_printf_directive_a" : ".*yes" > /dev/null; then
       AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], 1,
         [Define if the vasnprintf implementation needs special code for