X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fprintf-posix.m4;h=a9b91f70056b08a60c75c83aacfc6d77467613f3;hb=66b7c686fa3df7e6546b2a2dcd918f524fd4af57;hp=8933ee399d0ed53b73a1cc42ca945edbd4f4afce;hpb=f655fd5741580b9992c18a1b1e410fabb173aa28;p=gnulib.git diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4 index 8933ee399..a9b91f700 100644 --- a/m4/printf-posix.m4 +++ b/m4/printf-posix.m4 @@ -1,5 +1,5 @@ -# printf-posix.m4 serial 4 (gettext-0.18) -dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. +# printf-posix.m4 serial 6 (gettext-0.18.2) +dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -14,7 +14,8 @@ AC_DEFUN([gt_PRINTF_POSIX], AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], gt_cv_func_printf_posix, [ - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's @@ -25,20 +26,22 @@ int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); -}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, - [ - AC_EGREP_CPP(notposix, [ +}]])], + [gt_cv_func_printf_posix=yes], + [gt_cv_func_printf_posix=no], + [ + AC_EGREP_CPP([notposix], [ #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ notposix #endif - ], - [gt_cv_func_printf_posix="guessing no"], - [gt_cv_func_printf_posix="guessing yes"]) - ]) + ], + [gt_cv_func_printf_posix="guessing no"], + [gt_cv_func_printf_posix="guessing yes"]) + ]) ]) case $gt_cv_func_printf_posix in *yes) - AC_DEFINE([HAVE_POSIX_PRINTF], 1, + AC_DEFINE([HAVE_POSIX_PRINTF], [1], [Define if your printf() function supports format strings with positions.]) ;; esac