|
@@ -452,6 +452,19 @@ AC_CHECK_HEADERS(locale.h, [],
|
|
|
################################
|
|
|
# Check for CODESET within nl_langinfo
|
|
|
################################
|
|
|
+AC_DEFUN([AM_LANGINFO_CODESET],
|
|
|
+[
|
|
|
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
|
|
|
+ [AC_TRY_LINK([#include <langinfo.h>],
|
|
|
+ [char* cs = nl_langinfo(CODESET); return !cs;],
|
|
|
+ [am_cv_langinfo_codeset=yes],
|
|
|
+ [am_cv_langinfo_codeset=no])
|
|
|
+ ])
|
|
|
+ if test $am_cv_langinfo_codeset = yes; then
|
|
|
+ AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
|
|
|
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
|
|
+ fi
|
|
|
+])
|
|
|
AM_LANGINFO_CODESET
|
|
|
|
|
|
################################
|