1 dnl From libcharset 1.1
6 AC_DEFUN(jm_LANGINFO_CODESET,
8 AC_CHECK_HEADERS(langinfo.h)
9 AC_CHECK_FUNCS(nl_langinfo)
11 AC_CACHE_CHECK([for nl_langinfo and CODESET], jm_cv_langinfo_codeset,
12 [AC_TRY_LINK([#include <langinfo.h>],
13 [char* cs = nl_langinfo(CODESET);],
14 jm_cv_langinfo_codeset=yes,
15 jm_cv_langinfo_codeset=no)
17 if test $jm_cv_langinfo_codeset = yes; then
18 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
19 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
24 # Test for the GNU C Library, version 2.1 or newer.
29 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
30 ac_cv_gnu_library_2_1,
31 [AC_EGREP_CPP([Lucky GNU user],
34 #ifdef __GNU_LIBRARY__
35 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
40 ac_cv_gnu_library_2_1=yes,
41 ac_cv_gnu_library_2_1=no)
45 GLIBC21="$ac_cv_gnu_library_2_1"