Oops, actually commit the configure.in change I thought I did in my
[platform/upstream/glib.git] / aclibcharset.m4
1 dnl From libcharset 1.1
2 #serial 2
3
4 dnl From Bruno Haible.
5
6 AC_DEFUN(jm_LANGINFO_CODESET,
7 [
8   AC_CHECK_HEADERS(langinfo.h)
9   AC_CHECK_FUNCS(nl_langinfo)
10
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)
16     ])
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).])
20   fi
21 ])
22 #serial 2
23
24 # Test for the GNU C Library, version 2.1 or newer.
25 # From Bruno Haible.
26
27 AC_DEFUN(jm_GLIBC21,
28   [
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],
32         [
33 #include <features.h>
34 #ifdef __GNU_LIBRARY__
35  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
36   Lucky GNU user
37  #endif
38 #endif
39         ],
40         ac_cv_gnu_library_2_1=yes,
41         ac_cv_gnu_library_2_1=no)
42       ]
43     )
44     AC_SUBST(GLIBC21)
45     GLIBC21="$ac_cv_gnu_library_2_1"
46   ]
47 )