From: Bruno Haible Date: Mon, 19 Jul 2010 23:10:51 +0000 (+0200) Subject: Modernize AC_TRY_RUN invocations. X-Git-Tag: v0.18.2~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c1b144cfe6223caa640ddf6cf3744fb78c9e1a6;p=thirdparty%2Fgettext.git Modernize AC_TRY_RUN invocations. --- diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog index b3fa5810a..4cc615e03 100644 --- a/gettext-runtime/m4/ChangeLog +++ b/gettext-runtime/m4/ChangeLog @@ -1,3 +1,11 @@ +2010-07-19 Bruno Haible + + Modernize AC_TRY_RUN invocations. + * iconv.m4 (AM_ICONV_LINK): Use AC_RUN_IFELSE instead of AC_TRY_RUN. + * intdiv0.m4 (gt_INTDIV0): Likewise. + * printf-posix.m4 (gt_PRINTF_POSIX): Likewise. + * threadlib.m4 (gl_THREADLIB_BODY): Likewise. + 2010-07-19 Bruno Haible Modernize AC_TRY_LINK invocations. diff --git a/gettext-runtime/m4/iconv.m4 b/gettext-runtime/m4/iconv.m4 index abba95bcf..ffa037396 100644 --- a/gettext-runtime/m4/iconv.m4 +++ b/gettext-runtime/m4/iconv.m4 @@ -71,7 +71,8 @@ AC_DEFUN([AM_ICONV_LINK], if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #include int main () @@ -146,7 +147,9 @@ int main () && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; -}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], +}]])], + [am_cv_func_iconv_works=yes], + [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; diff --git a/gettext-runtime/m4/intdiv0.m4 b/gettext-runtime/m4/intdiv0.m4 index 289c4df5e..9b27ff1b7 100644 --- a/gettext-runtime/m4/intdiv0.m4 +++ b/gettext-runtime/m4/intdiv0.m4 @@ -1,5 +1,5 @@ -# intdiv0.m4 serial 3 (gettext-0.18) -dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc. +# intdiv0.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2002, 2007-2008, 2010 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. @@ -29,7 +29,8 @@ changequote(,)dnl esac changequote([,])dnl if test -z "$gt_cv_int_divbyzero_sigfpe"; then - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #include @@ -61,7 +62,9 @@ int main () nan = y / y; exit (1); } -], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no], +]])], + [gt_cv_int_divbyzero_sigfpe=yes], + [gt_cv_int_divbyzero_sigfpe=no], [ # Guess based on the CPU. changequote(,)dnl diff --git a/gettext-runtime/m4/printf-posix.m4 b/gettext-runtime/m4/printf-posix.m4 index 1eacf95ac..2dc52a486 100644 --- a/gettext-runtime/m4/printf-posix.m4 +++ b/gettext-runtime/m4/printf-posix.m4 @@ -1,4 +1,4 @@ -# printf-posix.m4 serial 5 (gettext-0.18) +# printf-posix.m4 serial 6 (gettext-0.18.2) dnl Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -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,16 +26,18 @@ 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) diff --git a/gettext-runtime/m4/threadlib.m4 b/gettext-runtime/m4/threadlib.m4 index 01ee9ddb1..bff01bc5e 100644 --- a/gettext-runtime/m4/threadlib.m4 +++ b/gettext-runtime/m4/threadlib.m4 @@ -120,13 +120,16 @@ AC_DEFUN([gl_THREADLIB_BODY], if test $gl_cv_have_weak = maybe; then dnl Second, test whether it actually works. On Cygwin 1.7.2, with dnl gcc 4.3, symbols declared weak always evaluate to the address 0. - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #pragma weak fputs int main () { return (fputs == NULL); -}], [gl_cv_have_weak=yes], [gl_cv_have_weak=no], +}]])], + [gl_cv_have_weak=yes], + [gl_cv_have_weak=no], [dnl When cross-compiling, assume that only ELF platforms support dnl weak symbols. AC_EGREP_CPP([Extensible Linking Format],