Merge branch 'configure-mac-arm'

Fix wxOSX build under ARM using configure.

See https://github.com/wxWidgets/wxWidgets/pull/1920
This commit is contained in:
Vadim Zeitlin
2020-07-02 14:51:05 +02:00
4 changed files with 15 additions and 33 deletions

2
3rdparty/catch vendored

18
configure vendored
View File

@@ -4015,18 +4015,8 @@ case "${host}" in
DEFAULT_DEFAULT_wxUSE_MSW=1
;;
arm-apple-darwin*)
USE_BSD=1
USE_DARWIN=1
$as_echo "#define __BSD__ 1" >>confdefs.h
$as_echo "#define __DARWIN__ 1" >>confdefs.h
DEFAULT_DEFAULT_wxUSE_OSX_IPHONE=1
;;
*-*-darwin* )
USE_BSD=1
USE_BSD=1
USE_DARWIN=1
$as_echo "#define __BSD__ 1" >>confdefs.h
@@ -40305,14 +40295,12 @@ case "${host}" in
;;
esac
dedup_flags () { printf %s "$@" | awk -v RS=' +' -v ORS=' ' '!seen[$0]++'; }
dedup_flags () { printf %s "$@" | awk -v RS=' +' -v ORS=' ' '$0=="-arch" || $0=="-framework" || !seen[$0]++'; }
WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
WX_CFLAGS=`dedup_flags "$CFLAGS"`
WX_CXXFLAGS=`dedup_flags "$CXXFLAGS"`
LDFLAGS=`printf %s "$LDFLAGS" | sed 's/-framework */-framework_/g'`
WX_LDFLAGS=`dedup_flags "$LDFLAGS" | sed 's/-framework_/-framework /g'`
WX_LDFLAGS=`dedup_flags "$LDFLAGS"`
CPPFLAGS=$USER_CPPFLAGS
CFLAGS=$USER_CFLAGS

View File

@@ -282,17 +282,9 @@ case "${host}" in
DEFAULT_DEFAULT_wxUSE_MSW=1
;;
arm-apple-darwin*)
dnl iPhone
USE_BSD=1
USE_DARWIN=1
AC_DEFINE(__BSD__)
AC_DEFINE(__DARWIN__)
DEFAULT_DEFAULT_wxUSE_OSX_IPHONE=1
;;
*-*-darwin* )
dnl Darwin based distributions (including Mac OS X)
dnl Some platform using Darwin, i.e. one of the Apple OS: we target macOS
dnl by default on them, use --with-osx_iphone explicitly for iOS.
USE_BSD=1
USE_DARWIN=1
AC_DEFINE(__BSD__)
@@ -8257,17 +8249,15 @@ dnl Set the flags to be used for the library build itself using the flag names
dnl used everywhere above.
dnl
dnl Also get rid of duplicates in the flags, which results in dramatically
dnl shorter build logs and so is well worth it.
dedup_flags () { printf %s "$@" | awk -v RS=' +' -v ORS=' ' '!seen[[$0]]++'; }
dnl shorter build logs and so is well worth it (but preserve some special
dnl flags which are explicitly allowed to occur multiple times, as all their
dnl occurrences must be preserved).
dedup_flags () { printf %s "$@" | awk -v RS=' +' -v ORS=' ' '$0=="-arch" || $0=="-framework" || !seen[[$0]]++'; }
WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
WX_CFLAGS=`dedup_flags "$CFLAGS"`
WX_CXXFLAGS=`dedup_flags "$CXXFLAGS"`
dnl For link flags we can use "-framework" multiple times and all of their
dnl occurrences need to be preserved, so add extra pre/post-processing.
LDFLAGS=`printf %s "$LDFLAGS" | sed 's/-framework */-framework_/g'`
WX_LDFLAGS=`dedup_flags "$LDFLAGS" | sed 's/-framework_/-framework /g'`
WX_LDFLAGS=`dedup_flags "$LDFLAGS"`
dnl Restore the original user-specified flags values, we won't run any tests
dnl using them any more.

View File

@@ -189,6 +189,10 @@ INCOMPATIBLE CHANGES SINCE 3.1.3:
aliases for the libraries have been added using the 'wx::' namespace. For
example, the core library is now named wxcore and has alias wx::core.
- Building on ARM Apple platforms using configure now targets macOS by
default, and not iOS. Please use --with-osx_iphone explicitly if you need
the latter.
3.1.3: (released 2019-10-28)
----------------------------