Merge branch 'xlocale-checks'
Fix build on systems which don't have full x-locale support even though they do have <xlocale.h>, such as OpenIndiana. Closes https://github.com/wxWidgets/wxWidgets/pull/461
This commit is contained in:
31
configure.in
31
configure.in
@@ -4117,7 +4117,9 @@ if test "$TOOLKIT" != "MSW"; then
|
||||
|
||||
dnl check for available version of iconv()
|
||||
if test "$wxUSE_LIBICONV" != "no" ; then
|
||||
AC_LANG_PUSH(C++)
|
||||
AM_ICONV
|
||||
AC_LANG_POP()
|
||||
LIBS="$LIBICONV $LIBS"
|
||||
fi
|
||||
|
||||
@@ -5719,10 +5721,31 @@ if test "$wxUSE_INTL" = "yes" ; then
|
||||
fi
|
||||
|
||||
if test "$wxUSE_XLOCALE" = "yes" ; then
|
||||
AC_DEFINE(wxUSE_XLOCALE)
|
||||
AC_CHECK_TYPES(locale_t,,,
|
||||
[#include <xlocale.h>
|
||||
#include <locale.h>])
|
||||
dnl even if xlocale.h exists, it may not contain all that
|
||||
dnl wx needs. check if strtod_l() really is available.
|
||||
AC_CACHE_CHECK([for complete xlocale],
|
||||
wx_cv_func_strtod_l,
|
||||
[
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include <xlocale.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
],
|
||||
[
|
||||
locale_t t;
|
||||
strtod_l(NULL, NULL, t);
|
||||
],
|
||||
wx_cv_func_strtod_l=yes,
|
||||
wx_cv_func_strtod_l=no
|
||||
)
|
||||
AC_LANG_POP()
|
||||
])
|
||||
|
||||
if test "$wx_cv_func_strtod_l" = "yes" ; then
|
||||
AC_DEFINE(wxUSE_XLOCALE)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_LOG" = "yes"; then
|
||||
|
Reference in New Issue
Block a user