X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.ac;h=e4ab28b077263324b5f21e4e19ec6c75a8732136;hb=dc372329214c1e8ef32f1a20173c3e8cc6dc0572;hp=26cd8903cb0a863d844b62d3ae03cb8b4ec195d8;hpb=ab1cbc51f69101676412ab60021f7313f103b8be;p=ghc-base.git diff --git a/configure.ac b/configure.ac index 26cd890..e4ab28b 100644 --- a/configure.ac +++ b/configure.ac @@ -136,6 +136,17 @@ FP_SEARCH_LIBS_PROTO(iconv, AC_MSG_ERROR([iconv is required on non-Windows platforms]);; esac]) +# If possible, we use libcharset instead of nl_langinfo(CODESET) to +# determine the current locale's character encoding. +FP_SEARCH_LIBS_PROTO( + [locale_charset], + [#include ], + [const char* charset = locale_charset();], + [charset], + [AC_DEFINE([HAVE_LIBCHARSET], [1], [Define to 1 if you have libcharset.]) + EXTRA_LIBS="$EXTRA_LIBS $ac_lib"]) + + AC_SUBST(EXTRA_LIBS) AC_CONFIG_FILES([base.buildinfo])