From 475462195912c0512708b8274175084885989e5f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 21 Oct 2017 18:59:16 +0200 Subject: [PATCH 1/3] Do Mac-specific checks in configure for all ports under Darwin Configure options such as --enable-universal_binary or --with-macosx-version-min should be taken into account for any port being built under macOS, not just wxOSX itself. In particular, this ensures that PCH and dependencies tracking is correctly disabled automatically when building universal wxGTK libraries. Closes #15454. --- configure | 5 ++++- configure.in | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 648d42cafb..b86fe5a90e 100755 --- a/configure +++ b/configure @@ -17388,7 +17388,7 @@ fi fi -if test "$wxUSE_MAC" = 1; then +if test "$USE_DARWIN" = 1; then retest_macosx_linking=no @@ -17440,6 +17440,8 @@ $as_echo "$as_me: WARNING: Disabling precompiled headers due to universal binary LDFLAGS="$OSX_ARCH_OPTS $LDFLAGS" fi +if test "$wxUSE_MAC" = 1; then + if test "x$wxUSE_MACOSX_SDK" = "xno"; then wxUSE_MACOSX_SDK= elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then @@ -17464,6 +17466,7 @@ $as_echo "exists" >&6; } retest_macosx_linking=yes fi +fi if test "x$wxUSE_MACOSX_VERSION_MIN" = "xno"; then wxUSE_MACOSX_VERSION_MIN= elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then diff --git a/configure.in b/configure.in index dc964baae4..986921fda5 100644 --- a/configure.in +++ b/configure.in @@ -1121,7 +1121,10 @@ dnl --------------------------------------------------------------------------- dnl Mac-specific SDK/architectures checks dnl --------------------------------------------------------------------------- -if test "$wxUSE_MAC" = 1; then +dnl Note that some checks here are OS-specific, and need to be done for any +dnl port, while others are wxOSX-specific and are performed only for it inside +dnl another test below. +if test "$USE_DARWIN" = 1; then retest_macosx_linking=no @@ -1191,6 +1194,8 @@ if test "x$OSX_ARCH_OPTS" != "x"; then LDFLAGS="$OSX_ARCH_OPTS $LDFLAGS" fi +if test "$wxUSE_MAC" = 1; then + dnl Set up the Mac OS X SDK. We do this early so configure tests will occur dnl with the SDK in place. dnl NOTE: We clobber wxUSE_MACOSX_SDK with the SDK path @@ -1217,6 +1222,8 @@ if test "x$wxUSE_MACOSX_SDK" != "x"; then dnl if we ever did, be aware that you don't need to worry about it. fi +fi dnl wxUSE_MAC + dnl Set up the deployment target dnl No : Don't specify a min version even if using an SDK dnl Yes : Use the version from the SDK if used, otherwise same as no @@ -1294,7 +1301,7 @@ if test "x$retest_macosx_linking" = "xyes"; then AC_LANG_POP() fi -fi dnl wxUSE_MAC +fi dnl USE_DARWIN case "${host}" in From 7b373703f7fbbd9e6f584528b0b6981cdc541814 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 21 Oct 2017 19:04:20 +0200 Subject: [PATCH 2/3] Only use macOS-specific options when configuring for macOS Don't even check for options such as --with-macosx-xxx or --enable-universal_binaries when not targeting macOS, as they only make sense for this platform. --- configure | 6 +++++- configure.in | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure b/configure index b86fe5a90e..5aa56db3c6 100755 --- a/configure +++ b/configure @@ -5131,6 +5131,8 @@ fi eval "$wx_cv_use_expat" +if test "$USE_DARWIN" = 1; then + # Check whether --with-macosx-sdk was given. if test "${with_macosx_sdk+set}" = set; then : @@ -5151,6 +5153,7 @@ if test "${with_macosx_version_min+set}" = set; then : fi +fi # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : @@ -5869,6 +5872,7 @@ fi eval "$wx_cv_use_vararg_macros" +if test "$USE_DARWIN" = 1; then enablestring= # Check whether --enable-universal_binary was given. @@ -5901,7 +5905,7 @@ fi eval "$wx_cv_use_macosx_arch" - +fi enablestring= defaultval= diff --git a/configure.in b/configure.in index 986921fda5..723cfcdee3 100644 --- a/configure.in +++ b/configure.in @@ -553,6 +553,8 @@ WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB) WX_ARG_SYS_WITH(expat, [ --with-expat enable XML support using expat parser], wxUSE_EXPAT) +if test "$USE_DARWIN" = 1; then + AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], [ wxUSE_MACOSX_SDK=$withval wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval" @@ -563,6 +565,8 @@ AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build bina wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval" ]) +fi dnl USE_DARWIN + dnl --------------------------------------------------------------------------- dnl debugging options dnl --------------------------------------------------------------------------- @@ -656,8 +660,10 @@ WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++ WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE) WX_ARG_DISABLE(vararg_macros,[ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS) +if test "$USE_DARWIN" = 1; then WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary=archs create universal binary for the specified (or all supported) architectures]], wxUSE_UNIVERSAL_BINARY) WX_ARG_ENABLE_PARAM(macosx_arch, [[ --enable-macosx_arch=ARCH build for just the specified architecture]], wxUSE_MAC_ARCH) +fi dnl USE_DARWIN WX_ARG_ENABLE(compat28, [ --enable-compat28 enable wxWidgets 2.8 compatibility], WXWIN_COMPATIBILITY_2_8) WX_ARG_DISABLE(compat30, [ --disable-compat30 disable wxWidgets 3.0 compatibility], WXWIN_COMPATIBILITY_3_0) From d9e4f72fd2cbe3543e9a37622afab9cf9f5787f8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 21 Oct 2017 19:06:33 +0200 Subject: [PATCH 3/3] Remove unused configure --enable-objc_uniquifying option This was only ever used in the alternative wxCocoa port which was itself removed quite a long time ago. --- configure | 37 ------------------------- configure.in | 6 ---- docs/doxygen/mainpages/const_wxusedef.h | 7 ----- setup.h.in | 5 ---- setup.h_vms | 5 ---- 5 files changed, 60 deletions(-) diff --git a/configure b/configure index 5aa56db3c6..a3cab8af38 100755 --- a/configure +++ b/configure @@ -1137,7 +1137,6 @@ enable_macosx_arch enable_compat28 enable_compat30 enable_rpath -enable_objc_uniquifying enable_visibility enable_tls enable_repro_build @@ -2078,7 +2077,6 @@ Optional Features: --enable-compat28 enable wxWidgets 2.8 compatibility --disable-compat30 disable wxWidgets 3.0 compatibility --disable-rpath disable use of rpath for uninstalled builds - --enable-objc_uniquifying enable Objective-C class name uniquifying --disable-visibility disable use of ELF symbols visibility even if supported --disable-tls disable use of compiler TLS support --enable-repro-build enable reproducible build mode @@ -5996,36 +5994,6 @@ fi - enablestring= - defaultval= - if test -z "$defaultval"; then - if test x"$enablestring" = xdisable; then - defaultval=yes - else - defaultval=no - fi - fi - - # Check whether --enable-objc_uniquifying was given. -if test "${enable_objc_uniquifying+set}" = set; then : - enableval=$enable_objc_uniquifying; - if test "$enableval" = yes; then - wx_cv_use_objc_uniquifying='wxUSE_OBJC_UNIQUIFYING=yes' - else - wx_cv_use_objc_uniquifying='wxUSE_OBJC_UNIQUIFYING=no' - fi - -else - - wx_cv_use_objc_uniquifying='wxUSE_OBJC_UNIQUIFYING=${'DEFAULT_wxUSE_OBJC_UNIQUIFYING":-$defaultval}" - -fi - - - eval "$wx_cv_use_objc_uniquifying" - - - enablestring=disable defaultval= if test -z "$defaultval"; then @@ -32701,11 +32669,6 @@ if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then fi -if test "$wxUSE_OBJC_UNIQUIFYING" = "yes"; then - $as_echo "#define wxUSE_OBJC_UNIQUIFYING 1" >>confdefs.h - -fi - if test "$wxUSE_CONSOLE_EVENTLOOP" = "yes"; then $as_echo "#define wxUSE_CONSOLE_EVENTLOOP 1" >>confdefs.h diff --git a/configure.in b/configure.in index 723cfcdee3..408aa0a627 100644 --- a/configure.in +++ b/configure.in @@ -670,8 +670,6 @@ WX_ARG_DISABLE(compat30, [ --disable-compat30 disable wxWidgets 3.0 co WX_ARG_DISABLE(rpath, [ --disable-rpath disable use of rpath for uninstalled builds], wxUSE_RPATH) -WX_ARG_ENABLE(objc_uniquifying,[ --enable-objc_uniquifying enable Objective-C class name uniquifying], wxUSE_OBJC_UNIQUIFYING) - WX_ARG_DISABLE(visibility, [ --disable-visibility disable use of ELF symbols visibility even if supported], wxUSE_VISIBILITY) WX_ARG_DISABLE(tls, [ --disable-tls disable use of compiler TLS support], wxUSE_COMPILER_TLS) @@ -5801,10 +5799,6 @@ if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then AC_DEFINE(wxUSE_PRINTF_POS_PARAMS) fi -if test "$wxUSE_OBJC_UNIQUIFYING" = "yes"; then - AC_DEFINE(wxUSE_OBJC_UNIQUIFYING) -fi - dnl --------------------------------------------------------------------------- dnl console event loop stuff dnl --------------------------------------------------------------------------- diff --git a/docs/doxygen/mainpages/const_wxusedef.h b/docs/doxygen/mainpages/const_wxusedef.h index d414884997..259416c087 100644 --- a/docs/doxygen/mainpages/const_wxusedef.h +++ b/docs/doxygen/mainpages/const_wxusedef.h @@ -307,13 +307,6 @@ library: @endDefList -@section page_wxusedef_cocoa Cocoa Symbols - -@beginDefList -@itemdef{wxUSE_OBJC_UNIQUIFYING, Enable Objective-C class name uniquifying.} -@endDefList - - @section page_wxusedef_msw wxMSW Symbols @beginDefList diff --git a/setup.h.in b/setup.h.in index a4da53aa94..61f5bf7b1f 100644 --- a/setup.h.in +++ b/setup.h.in @@ -891,11 +891,6 @@ */ #define wxUSE_WEBKIT 0 -/* - * Objective-C class name uniquifying - */ -#define wxUSE_OBJC_UNIQUIFYING 0 - /* * The const keyword is being introduced more in wxWindows. * You can use this setting to maintain backward compatibility. diff --git a/setup.h_vms b/setup.h_vms index f327f42a5f..d1f7842057 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -980,11 +980,6 @@ typedef pid_t GPid; */ #define wxUSE_WEBKIT 1 -/* - * Objective-C class name uniquifying - */ -#define wxUSE_OBJC_UNIQUIFYING 0 - /* * The const keyword is being introduced more in wxWindows. * You can use this setting to maintain backward compatibility.