Move HAVE_WCSXXX from wx/osx/config_xcode.h to wx/osx/chkconf.h.

The latter file is also used when building from the command line while the
former is only used in Xcode build, as its name indicates (which didn't help
me to notice it, however).

Also restore the test for wcsftime() in configure as it is available even on
older systems but do not test for strnlen() -- as it is not.

These changes amend those of r74523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-07-15 16:42:10 +00:00
parent f2d8a2767e
commit 92e839baa4
4 changed files with 25 additions and 23 deletions

View File

@@ -4096,15 +4096,17 @@ if test "$WCSLEN_FOUND" = 1; then
AC_DEFINE(HAVE_WCSLEN)
fi
AC_CHECK_FUNCS(strnlen)
dnl Notice that unlike the functions below, this one seems to be present in all
dnl support OS X versions so it's OK to test for it here.
AC_CHECK_FUNCS(wcsftime)
dnl OS X provides the wide character functions starting from 10.7 so our tests
dnl would succeed if we're configuring under 10.7 or later, yet the compiled
dnl programs would fail if ran under 10.6 or earlier. To avoid this problem we
dnl define the corresponding HAVE_XXX in wx/osx/config_xcode.h instead of
dnl testing for them here.
dnl OS X provides the wide character functions (and also strnlen(), for some
dnl reason) only starting from 10.7 so our tests would succeed if we're
dnl configuring under 10.7 or later, yet the compiled programs would fail if
dnl ran under 10.6 or earlier. To avoid this problem, define the corresponding
dnl HAVE_XXX in wx/osx/config_xcode.h instead of testing for them here.
if test "$wxUSE_MAC" != 1; then
AC_CHECK_FUNCS([wcsdup wcsftime wcsnlen wcscasecmp wcsncasecmp])
AC_CHECK_FUNCS([strnlen wcsdup wcsnlen wcscasecmp wcsncasecmp])
fi
dnl On HP-UX aCC need this define to find mbstrtowcs() &c