diff --git a/acinclude.m4 b/acinclude.m4 index bd17ead502..258428c48b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -367,9 +367,16 @@ dnl this macro checks for a three-valued command line --with argument: dnl possible arguments are 'yes', 'no', 'sys', or 'builtin' dnl usage: WX_ARG_SYS_WITH(option, helpmessage, variable-name) dnl -dnl the default value (used if the option is not specified at all) is the value -dnl of wxUSE_ALL_FEATURES (which is "yes" by default but can be changed by -dnl giving configure --disable-all-features option) +dnl the default value (used if the option is not specified at all) is +dnl determined in the following way: +dnl 1. If default value for the given library (DEFAULT_wxUSE_LIBXXX) exists, +dnl it is used: this allows to disable some libraries by default. +dnl 2. If wxUSE_ALL_FEATURES is turned off, the use of the library is turned +dnl off as well: this ensures that minimal builds are really minimal. +dnl 3. If wxUSE_SYS_LIBS is turned off, then "builtin" is used: this allows +dnl to prevent system libraries from being used by using a single option. +dnl 4. Otherwise the default value is "yes", meaning that either the system +dnl (preferred) or builtin version of the library will be used. AC_DEFUN([WX_ARG_SYS_WITH], [ AC_MSG_CHECKING([for --with-$1]) @@ -388,7 +395,17 @@ AC_DEFUN([WX_ARG_SYS_WITH], fi ], [ - AS_TR_SH(wx_cv_use_$1)='$3=${'DEFAULT_$3":-$wxUSE_ALL_FEATURES}" + if test "DEFAULT_$3" = no; then + value=no + elif test "$wxUSE_ALL_FEATURES" = no; then + value=no + elif test "$wxUSE_SYS_LIBS" = no; then + value=builtin + else + value=yes + fi + + AS_TR_SH(wx_cv_use_$1)="$3=$value" ]) eval "$AS_TR_SH(wx_cv_use_$1)" diff --git a/configure b/configure index 081167ff71..f4e7db22ca 100755 --- a/configure +++ b/configure @@ -1070,6 +1070,7 @@ with_flavour enable_official_build enable_vendor enable_all_features +enable_sys_libs enable_universal with_themes with_gtk @@ -2035,6 +2036,7 @@ Optional Features: --enable-official_build official build of wxWidgets (win32 DLL only) --enable-vendor=VENDOR vendor name (win32 DLL only) --disable-all-features disable all optional features to build minimal library + --disable-sys-libs disable all use of system libraries, use only built-in ones --enable-universal use wxWidgets GUI controls instead of native ones --enable-nanox use NanoX --enable-gpe use GNOME PDA Environment features if possible @@ -4377,6 +4379,50 @@ fi $as_echo "$result" >&6; } + enablestring=disable + defaultval= + if test -z "$defaultval"; then + if test x"$enablestring" = xdisable; then + defaultval=yes + else + defaultval=no + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --${enablestring:-enable}-sys-libs" >&5 +$as_echo_n "checking for --${enablestring:-enable}-sys-libs... " >&6; } + # Check whether --enable-sys-libs was given. +if test "${enable_sys_libs+set}" = set; then : + enableval=$enable_sys_libs; + if test "$enableval" = yes; then + wx_cv_use_sys_libs='wxUSE_SYS_LIBS=yes' + else + wx_cv_use_sys_libs='wxUSE_SYS_LIBS=no' + fi + +else + + wx_cv_use_sys_libs='wxUSE_SYS_LIBS=${'DEFAULT_wxUSE_SYS_LIBS":-$defaultval}" + +fi + + + eval "$wx_cv_use_sys_libs" + + if test x"$enablestring" = xdisable; then + if test $wxUSE_SYS_LIBS = no; then + result=yes + else + result=no + fi + else + result=$wxUSE_SYS_LIBS + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 +$as_echo "$result" >&6; } + + if test "$wxUSE_ALL_FEATURES" = "no"; then DEFAULT_wxUSE_ARTPROVIDER_TANGO=no DEFAULT_wxUSE_MEDIACTRL=no @@ -4723,7 +4769,17 @@ if test "${with_libpng+set}" = set; then : else - wx_cv_use_libpng='wxUSE_LIBPNG=${'DEFAULT_wxUSE_LIBPNG":-$wxUSE_ALL_FEATURES}" + if test "DEFAULT_wxUSE_LIBPNG" = no; then + value=no + elif test "$wxUSE_ALL_FEATURES" = no; then + value=no + elif test "$wxUSE_SYS_LIBS" = no; then + value=builtin + else + value=yes + fi + + wx_cv_use_libpng="wxUSE_LIBPNG=$value" fi @@ -4767,7 +4823,17 @@ if test "${with_libjpeg+set}" = set; then : else - wx_cv_use_libjpeg='wxUSE_LIBJPEG=${'DEFAULT_wxUSE_LIBJPEG":-$wxUSE_ALL_FEATURES}" + if test "DEFAULT_wxUSE_LIBJPEG" = no; then + value=no + elif test "$wxUSE_ALL_FEATURES" = no; then + value=no + elif test "$wxUSE_SYS_LIBS" = no; then + value=builtin + else + value=yes + fi + + wx_cv_use_libjpeg="wxUSE_LIBJPEG=$value" fi @@ -4811,7 +4877,17 @@ if test "${with_libtiff+set}" = set; then : else - wx_cv_use_libtiff='wxUSE_LIBTIFF=${'DEFAULT_wxUSE_LIBTIFF":-$wxUSE_ALL_FEATURES}" + if test "DEFAULT_wxUSE_LIBTIFF" = no; then + value=no + elif test "$wxUSE_ALL_FEATURES" = no; then + value=no + elif test "$wxUSE_SYS_LIBS" = no; then + value=builtin + else + value=yes + fi + + wx_cv_use_libtiff="wxUSE_LIBTIFF=$value" fi @@ -4943,7 +5019,17 @@ if test "${with_libxpm+set}" = set; then : else - wx_cv_use_libxpm='wxUSE_LIBXPM=${'DEFAULT_wxUSE_LIBXPM":-$wxUSE_ALL_FEATURES}" + if test "DEFAULT_wxUSE_LIBXPM" = no; then + value=no + elif test "$wxUSE_ALL_FEATURES" = no; then + value=no + elif test "$wxUSE_SYS_LIBS" = no; then + value=builtin + else + value=yes + fi + + wx_cv_use_libxpm="wxUSE_LIBXPM=$value" fi @@ -5386,7 +5472,17 @@ if test "${with_regex+set}" = set; then : else - wx_cv_use_regex='wxUSE_REGEX=${'DEFAULT_wxUSE_REGEX":-$wxUSE_ALL_FEATURES}" + if test "DEFAULT_wxUSE_REGEX" = no; then + value=no + elif test "$wxUSE_ALL_FEATURES" = no; then + value=no + elif test "$wxUSE_SYS_LIBS" = no; then + value=builtin + else + value=yes + fi + + wx_cv_use_regex="wxUSE_REGEX=$value" fi @@ -5430,7 +5526,17 @@ if test "${with_zlib+set}" = set; then : else - wx_cv_use_zlib='wxUSE_ZLIB=${'DEFAULT_wxUSE_ZLIB":-$wxUSE_ALL_FEATURES}" + if test "DEFAULT_wxUSE_ZLIB" = no; then + value=no + elif test "$wxUSE_ALL_FEATURES" = no; then + value=no + elif test "$wxUSE_SYS_LIBS" = no; then + value=builtin + else + value=yes + fi + + wx_cv_use_zlib="wxUSE_ZLIB=$value" fi @@ -5474,7 +5580,17 @@ if test "${with_expat+set}" = set; then : else - wx_cv_use_expat='wxUSE_EXPAT=${'DEFAULT_wxUSE_EXPAT":-$wxUSE_ALL_FEATURES}" + if test "DEFAULT_wxUSE_EXPAT" = no; then + value=no + elif test "$wxUSE_ALL_FEATURES" = no; then + value=no + elif test "$wxUSE_SYS_LIBS" = no; then + value=builtin + else + value=yes + fi + + wx_cv_use_expat="wxUSE_EXPAT=$value" fi @@ -36855,9 +36971,9 @@ fi elif test "$wxUSE_MAC" = 1; then if test "$wxUSE_OSX_IPHONE" = 1; then - GST_LIBS="-framework AVFoundation -framework CoreMedia" + GST_LIBS="-framework AVFoundation -framework CoreMedia" else - GST_LIBS="-framework QTKit" + GST_LIBS="-framework QTKit" fi fi diff --git a/configure.in b/configure.in index ed23baa975..5aff347634 100644 --- a/configure.in +++ b/configure.in @@ -401,6 +401,7 @@ if test "x$VENDOR" = "x"; then fi WX_ARG_DISABLE(all-features,[ --disable-all-features disable all optional features to build minimal library], wxUSE_ALL_FEATURES) +WX_ARG_DISABLE(sys-libs, [ --disable-sys-libs disable all use of system libraries, use only built-in ones], wxUSE_SYS_LIBS) if test "$wxUSE_ALL_FEATURES" = "no"; then dnl this is a bit ugly but currently we have no choice but to manually diff --git a/docs/changes.txt b/docs/changes.txt index 687ede23c3..0e5aade106 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -37,6 +37,10 @@ All: - Define wxOVERRIDE as override for supporting compilers (Thomas Goyne). - Allow specifying custom comparator for wxSortedArrayString (Catalin Raceanu). +Unix: + +- Add --disable-sys-libs configure option. + All (GUI): - XRC handler for wxAuiToolBar added (Kinaou Hervé, David Hart).