diff options
| author | Sam Varshavchik | 2016-02-19 22:49:45 -0500 |
|---|---|---|
| committer | Sam Varshavchik | 2016-02-19 22:49:45 -0500 |
| commit | b964dd0896aa2aa10c22d0beccacafbfc2ffd092 (patch) | |
| tree | 1d1d8641f235396bc1d71842ab9c86bd5c0082ba /unicode/configure.ac | |
| parent | 8b796e70667895ddb180253353155a30a23f2318 (diff) | |
| download | courier-libs-b964dd0896aa2aa10c22d0beccacafbfc2ffd092.tar.bz2 | |
courier-unicode: better configure test for nl_langinfo_l().
Diffstat (limited to 'unicode/configure.ac')
| -rw-r--r-- | unicode/configure.ac | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/unicode/configure.ac b/unicode/configure.ac index d0d55d1..27f066c 100644 --- a/unicode/configure.ac +++ b/unicode/configure.ac @@ -34,12 +34,26 @@ AC_CHECK_HEADERS(stddef.h wchar.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. -AC_CHECK_FUNC(nl_langinfo_l, [ - AC_DEFINE(HAVE_LANGINFO_L,1,[nl_langinfo_l implemented]) - AC_SUBST(LANGINFO_L,1) - ], [ - AC_SUBST(LANGINFO_L,0) - ]) + +have_langinfo_l=0 + +AC_CHECK_FUNC(nl_langinfo_l,[ + AC_TRY_COMPILE([ +#include <langinfo.h> +],[ + nl_langinfo_l(CODESET, (locale_t)0); +],[ + have_langinfo_l=1 + ])]) + +if test "$have_langinfo_l" != 0 +then + AC_DEFINE(HAVE_LANGINFO_L,1,[nl_langinfo_l implemented]) + AC_SUBST(LANGINFO_L,1) +else + AC_SUBST(LANGINFO_L,0) +fi + AM_CONDITIONAL(UPDATE_UNICODE, test -f ${srcdir}/UnicodeData.txt) AC_SYS_LARGEFILE |
