No tabs please.
[pspp] / m4 / vasnprintf.m4
index e7b51dc413203c29942d1ce832c4de2de83c06ef..8cc4f32e33d7a9b87e68f30a90eefd6af8cf7235 100644 (file)
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 8
+# vasnprintf.m4 serial 11
 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])
@@ -61,6 +62,22 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF],
   AC_CHECK_FUNCS(snprintf wcslen)
 ])
 
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+  case "$gl_cv_func_printf_directive_a" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], 1,
+        [Define if the vasnprintf implementation needs special code for
+         the 'a' and 'A' directives.])
+      AC_CHECK_FUNCS([nl_langinfo])
+      ;;
+  esac
+])
+
 # Prerequisites of lib/asnprintf.c.
 AC_DEFUN([gl_PREREQ_ASNPRINTF],
 [