diff --git a/configure b/configure index 8b0ecc8421..a337e832fa 100755 --- a/configure +++ b/configure @@ -967,6 +967,7 @@ Optional Features: --disable-compat26 disable wxWidgets 2.6 compatibility --disable-rpath disable use of rpath for uninstalled builds --enable-objc_uniquifying enable Objective-C class name uniquifying + --enable-abi-incompatible-features Enables features that break ABI compatibility --enable-intl use internationalization system --enable-config use wxConfig (and derived) classes --enable-protocols use wxProtocol and derived classes @@ -4662,6 +4663,53 @@ echo "${ECHO_T}no" >&6 fi +if test "x$wxUSE_SHARED" = "xno"; then + DEFAULT_wxUSE_ABI_INCOMPATIBLE_FEATURES=yes +else + DEFAULT_wxUSE_ABI_INCOMPATIBLE_FEATURES=no +fi + + enablestring= + echo "$as_me:$LINENO: checking for --${enablestring:-enable}-abi-incompatible-features" >&5 +echo $ECHO_N "checking for --${enablestring:-enable}-abi-incompatible-features... $ECHO_C" >&6 + no_cache=0 + # Check whether --enable-abi-incompatible-features or --disable-abi-incompatible-features was given. +if test "${enable_abi_incompatible_features+set}" = set; then + enableval="$enable_abi_incompatible_features" + + if test "$enableval" = yes; then + wx_cv_use_abi_incompatible_features='wxUSE_ABI_INCOMPATIBLE_FEATURES=yes' + else + wx_cv_use_abi_incompatible_features='wxUSE_ABI_INCOMPATIBLE_FEATURES=no' + fi + +else + + LINE=`grep "wxUSE_ABI_INCOMPATIBLE_FEATURES" ${wx_arg_cache_file}` + if test "x$LINE" != x ; then + eval "DEFAULT_$LINE" + else + no_cache=1 + fi + + wx_cv_use_abi_incompatible_features='wxUSE_ABI_INCOMPATIBLE_FEATURES='$DEFAULT_wxUSE_ABI_INCOMPATIBLE_FEATURES + +fi; + + eval "$wx_cv_use_abi_incompatible_features" + if test "$no_cache" != 1; then + echo $wx_cv_use_abi_incompatible_features >> ${wx_arg_cache_file}.tmp + fi + + if test "$wxUSE_ABI_INCOMPATIBLE_FEATURES" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + enablestring= @@ -42207,6 +42255,13 @@ _ACEOF fi +if test "$wxUSE_ABI_INCOMPATIBLE_FEATURES" = "yes"; then + cat >>confdefs.h <<\_ACEOF +#define wxUSE_ABI_INCOMPATIBLE_FEATURES 1 +_ACEOF + +fi + if test "$wxUSE_DATETIME" = "yes"; then echo "$as_me:$LINENO: checking for strptime" >&5 diff --git a/configure.in b/configure.in index bc1c9b4446..b683d9e098 100644 --- a/configure.in +++ b/configure.in @@ -947,6 +947,14 @@ WX_ARG_ENABLE(rpath, [ --disable-rpath disable use of rpath for WX_ARG_ENABLE(objc_uniquifying,[ --enable-objc_uniquifying enable Objective-C class name uniquifying], wxUSE_OBJC_UNIQUIFYING) +dnl If user didn't specify --enable/disable-abi-incompatible-features then set it based on wxUSE_SHARED +if test "x$wxUSE_SHARED" = "xno"; then + DEFAULT_wxUSE_ABI_INCOMPATIBLE_FEATURES=yes +else + DEFAULT_wxUSE_ABI_INCOMPATIBLE_FEATURES=no +fi +WX_ARG_ENABLE(abi-incompatible-features,[ --enable-abi-incompatible-features Enables features that break ABI compatibility], wxUSE_ABI_INCOMPATIBLE_FEATURES) + dnl --------------------------------------------------------------------------- dnl (small) optional non GUI classes dnl --------------------------------------------------------------------------- @@ -6089,6 +6097,10 @@ if test "$wxUSE_OBJC_UNIQUIFYING" = "yes"; then AC_DEFINE(wxUSE_OBJC_UNIQUIFYING) fi +if test "$wxUSE_ABI_INCOMPATIBLE_FEATURES" = "yes"; then + AC_DEFINE(wxUSE_ABI_INCOMPATIBLE_FEATURES) +fi + dnl --------------------------------------------------------------------------- dnl time/date functions dnl --------------------------------------------------------------------------- diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index fd3d2abf96..22c9155397 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -56,6 +56,11 @@ # define wxUSE_GUI 1 #endif /* !defined(wxUSE_GUI) */ +/* Turn off wxUSE_ABI_INCOMPATIBLE_FEATURES if not specified. */ +#if !defined(wxUSE_ABI_INCOMPATIBLE_FEATURES) +# define wxUSE_ABI_INCOMPATIBLE_FEATURES 0 +#endif /* !defined(wxUSE_ABI_INCOMPATIBLE_FEATURES) */ + /* If we're compiling without support for threads/exceptions we have to disable the corresponding features. diff --git a/setup.h.in b/setup.h.in index 6deed3fd67..e7d2c9ff7d 100644 --- a/setup.h.in +++ b/setup.h.in @@ -752,6 +752,11 @@ */ #define wxUSE_OBJC_UNIQUIFYING 0 +/* + * ABI incompatible features + */ +#define wxUSE_ABI_INCOMPATIBLE_FEATURES 0 + /* * The const keyword is being introduced more in wxWindows. * You can use this setting to maintain backward compatibility.