From 38cc8498d1814380127a3c3669ebbdfe1f619268 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 10 Dec 2017 00:18:38 +0100 Subject: [PATCH] Fix wxXLocale availability detection in configure This was broken by 9507bc430e2faf16b589958be91a462ca8e69813 which stopped defining HAVE_LOCALE_T in configure but didn't update the code using it. Restore the old behaviour by continuing to define HAVE_LOCALE_T even if we don't test (just) for it any longer. See https://github.com/wxWidgets/wxWidgets/pull/461 --- configure | 5 ++++- configure.in | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure index fa8141305a..ca5b78ace9 100755 --- a/configure +++ b/configure @@ -32627,6 +32627,9 @@ $as_echo "$as_me: WARNING: I18n code requires wxFile... disabled" >&2;} fi if test "$wxUSE_XLOCALE" = "yes" ; then + $as_echo "#define wxUSE_XLOCALE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete xlocale" >&5 $as_echo_n "checking for complete xlocale... " >&6; } if ${wx_cv_func_strtod_l+:} false; then : @@ -32676,7 +32679,7 @@ fi $as_echo "$wx_cv_func_strtod_l" >&6; } if test "$wx_cv_func_strtod_l" = "yes" ; then - $as_echo "#define wxUSE_XLOCALE 1" >>confdefs.h + $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h fi fi diff --git a/configure.in b/configure.in index 9b0bbd969e..8eb3571261 100644 --- a/configure.in +++ b/configure.in @@ -5747,6 +5747,8 @@ if test "$wxUSE_INTL" = "yes" ; then fi if test "$wxUSE_XLOCALE" = "yes" ; then + AC_DEFINE(wxUSE_XLOCALE) + 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], @@ -5770,7 +5772,9 @@ if test "$wxUSE_XLOCALE" = "yes" ; then ]) if test "$wx_cv_func_strtod_l" = "yes" ; then - AC_DEFINE(wxUSE_XLOCALE) + dnl We don't test (just) for locale_t existence, but we still define + dnl this symbol to avoid changing the existing code using it. + AC_DEFINE(HAVE_LOCALE_T) fi fi