diff --git a/acinclude.m4 b/acinclude.m4 index 4fddd4e7f0df1ad29ad9bbaba2366e7cc8c16f0d..b2901ed1878f4ae9ad005f4dea6fd75586274d99 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1078,3 +1078,32 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) + +dnl this check it required by the gettext macro +#serial 2 + +# Test for the GNU C Library, version 2.1 or newer. +# From Bruno Haible. + +AC_DEFUN([jm_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) +