Try to fix macOS build using cmake after xlocale changes
Commit bc13119494
removed the inclusion of
xlocale.h because it is not (and never was) needed under Linux with
glibc, but it is still needed under macOS, so this (silently) disabled
wxXLocale support under Mac when using configure and broke the build
when using cmake.
Fix both problems by using xlocale.h only if it's available, both in
configure and in cmake.
This commit is contained in:
@@ -5757,11 +5757,18 @@ if test "$wxUSE_INTL" = "yes" ; then
|
||||
fi
|
||||
|
||||
if test "$wxUSE_XLOCALE" = "yes" ; then
|
||||
dnl Some platforms (e.g. macOS) require an extra header, others (Linux)
|
||||
dnl don't, but it's simpler to just check for it under all of them.
|
||||
AC_CHECK_HEADERS([xlocale.h])
|
||||
|
||||
AC_CACHE_CHECK([for locale_t], wx_cv_type_locale_t,
|
||||
[
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#ifdef HAVE_XLOCALE_H
|
||||
#include <xlocale.h>
|
||||
#endif
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
],
|
||||
|
Reference in New Issue
Block a user