X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fwcrtomb.m4;h=514aed63b37365a1c38adbd416def8231417b0c1;hb=82afcdd;hp=6a2d772a3269eb70a9b2e2131069b3ade7118d4d;hpb=b780e8dc0ca111f94e2c0fa0bc926fce87507b4b;p=gnulib.git diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4 index 6a2d772a3..514aed63b 100644 --- a/m4/wcrtomb.m4 +++ b/m4/wcrtomb.m4 @@ -1,4 +1,4 @@ -# wcrtomb.m4 serial 5 +# wcrtomb.m4 serial 7 dnl Copyright (C) 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, @@ -40,35 +40,37 @@ changequote(,)dnl esac changequote([,])dnl if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #include #include #include int main () { + int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) - return 1; + result |= 1; } if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) - return 1; + result |= 2; } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) - return 1; + result |= 4; } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) - return 1; + result |= 8; } - return 0; -}], + return result; +}]])], [gl_cv_func_wcrtomb_retval=yes], [gl_cv_func_wcrtomb_retval=no], [:])