X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fduplocale.m4;h=6096f5c56929f95f90d4994bde1ad47ab8207205;hb=f0b08ae92b4d606bd95773c2b3c263d0b83e1172;hp=e7e784e691764159a91341cdf903f0d5ff9d0ee6;hpb=ba62d45bdf79356e0899aea78f682fd2665df2e2;p=gnulib.git diff --git a/m4/duplocale.m4 b/m4/duplocale.m4 index e7e784e69..6096f5c56 100644 --- a/m4/duplocale.m4 +++ b/m4/duplocale.m4 @@ -1,5 +1,5 @@ -# duplocale.m4 serial 3 -dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. +# duplocale.m4 serial 7 +dnl Copyright (C) 2009-2012 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. @@ -17,7 +17,8 @@ AC_DEFUN([gl_FUNC_DUPLOCALE], AC_REQUIRE([gl_LOCALE_H]) AC_CACHE_CHECK([whether duplocale(LC_GLOBAL_LOCALE) works], [gl_cv_func_duplocale_works], - [AC_TRY_RUN([ + [AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #if HAVE_XLOCALE_H # include @@ -27,18 +28,23 @@ int main () if (duplocale (LC_GLOBAL_LOCALE) == (locale_t)0) return 1; return 0; -}], [gl_cv_func_duplocale_works=yes], [gl_cv_func_duplocale_works=no], - [dnl Guess it works except on glibc < 2.12 and AIX. +}]])], + [gl_cv_func_duplocale_works=yes], + [gl_cv_func_duplocale_works=no], + [dnl Guess it works except on glibc < 2.12, uClibc, and AIX. case "$host_os" in aix*) gl_cv_func_duplocale_works="guessing no";; *-gnu*) - AC_EGREP_CPP([Unlucky GNU user], [ + AC_EGREP_CPP([Unlucky], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12) Unlucky GNU user #endif #endif +#ifdef __UCLIBC__ + Unlucky user +#endif ], [gl_cv_func_duplocale_works="guessing no"], [gl_cv_func_duplocale_works="guessing yes"]) @@ -53,11 +59,6 @@ int main () else HAVE_DUPLOCALE=0 fi - if test $REPLACE_DUPLOCALE = 1; then - gl_REPLACE_LOCALE_H - AC_LIBOBJ([duplocale]) - gl_PREREQ_DUPLOCALE - fi ]) # Prerequisites of lib/duplocale.c.