Merged 47742 from trunk:
Implement --with-macosx-sdk[=SDK] and --with-macosx-version-min[=VER]. Deprecate --enable-universal_binary but support it by adding the -arch flags as before and automatically setting the SDK using the new --with-macosx-sdk. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
313
configure
vendored
313
configure
vendored
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.in Id: configure.in 47942 2007-08-07 22:29:07Z VZ .
|
||||
# From configure.in Id: configure.in 48113 2007-08-15 17:43:50Z DE .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.59 for wxWidgets 2.8.4.
|
||||
#
|
||||
@@ -962,7 +962,7 @@ Optional Features:
|
||||
--enable-permissive compile code disregarding strict ANSI
|
||||
--enable-no_deps create code without dependency information
|
||||
--disable-vararg_macros don't use vararg macros, even if they are supported
|
||||
--enable-universal_binary[=SDK] create Mac PowerPC and Intel Universal binary (not yet working)
|
||||
--enable-universal_binary create Mac PowerPC and Intel Universal binary (not yet working)
|
||||
--enable-compat24 enable wxWidgets 2.4 compatibility
|
||||
--disable-compat26 disable wxWidgets 2.6 compatibility
|
||||
--disable-rpath disable use of rpath for uninstalled builds
|
||||
@@ -1184,6 +1184,8 @@ Optional Packages:
|
||||
--with-zlib use zlib for LZW compression
|
||||
--with-odbc use the IODBC and wxODBC classes
|
||||
--with-expat enable XML support using expat parser
|
||||
--with-macosx-sdk=PATH use an OS X SDK at PATH
|
||||
--with-macosx-version-min=VER build binaries which require at least this OS X version
|
||||
--with-flavour=NAME specify a name to identify this build
|
||||
--with-gtk-prefix=PFX Prefix where GTK is installed (optional)
|
||||
--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)
|
||||
@@ -3792,6 +3794,59 @@ echo "$as_me: error: Invalid value for --with-expat: should be yes, no, sys, or
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for --with-macosx-sdk" >&5
|
||||
echo $ECHO_N "checking for --with-macosx-sdk... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-macosx-sdk or --without-macosx-sdk was given.
|
||||
if test "${with_macosx_sdk+set}" = set; then
|
||||
withval="$with_macosx_sdk"
|
||||
|
||||
wxUSE_MACOSX_SDK=$withval
|
||||
wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval"
|
||||
echo "wxUSE_MACOSX_SDK=$wxUSE_MACOSX_SDK" >> ${wx_arg_cache_file}.tmp
|
||||
|
||||
else
|
||||
|
||||
# NOTE: Empty string on purpose so that --without-macosx-sdk (thus no)
|
||||
# will override --enable-universal_binary's automatic SDK usage.
|
||||
wxUSE_MACOSX_SDK=
|
||||
LINE=`grep "^wxUSE_MACOSX_SDK=" ${wx_arg_cache_file}`
|
||||
if test "x$LINE" != x ; then
|
||||
eval "$LINE"
|
||||
echo "$LINE" >> ${wx_arg_cache_file}.tmp
|
||||
fi
|
||||
|
||||
fi;
|
||||
echo "$as_me:$LINENO: result: $wxUSE_MACOSX_SDK" >&5
|
||||
echo "${ECHO_T}$wxUSE_MACOSX_SDK" >&6
|
||||
|
||||
echo "$as_me:$LINENO: checking for --with-macosx-version-min" >&5
|
||||
echo $ECHO_N "checking for --with-macosx-version-min... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-macosx-version-min or --without-macosx-version-min was given.
|
||||
if test "${with_macosx_version_min+set}" = set; then
|
||||
withval="$with_macosx_version_min"
|
||||
|
||||
wxUSE_MACOSX_VERSION_MIN=$withval
|
||||
wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval"
|
||||
echo "wxUSE_MACOSX_VERSION_MIN=$wxUSE_MACOSX_VERSION_MIN" >> ${wx_arg_cache_file}.tmp
|
||||
|
||||
else
|
||||
|
||||
# default "yes" because when not using an SDK it means the same as no
|
||||
# but when using an SDK it means to use the SDK version
|
||||
wxUSE_MACOSX_VERSION_MIN=yes
|
||||
# See if there is a value in the cache
|
||||
LINE=`grep "^wxUSE_MACOSX_VERSION_MIN=" ${wx_arg_cache_file}`
|
||||
if test "x$LINE" != x ; then
|
||||
eval "$LINE"
|
||||
echo "$LINE" >> ${wx_arg_cache_file}.tmp
|
||||
fi
|
||||
|
||||
fi;
|
||||
echo "$as_me:$LINENO: result: $wxUSE_MACOSX_VERSION_MIN" >&5
|
||||
echo "${ECHO_T}$wxUSE_MACOSX_VERSION_MIN" >&6
|
||||
|
||||
|
||||
|
||||
enablestring=
|
||||
@@ -15528,6 +15583,243 @@ case ${INSTALL} in
|
||||
INSTALL=`pwd`/${INSTALL} ;;
|
||||
esac
|
||||
|
||||
retest_macosx_linking=no
|
||||
|
||||
#if test "$wxUSE_MAC" = 1; then
|
||||
if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
|
||||
if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
|
||||
# Implicitly turn on the new --with-macosx-sdk using the default
|
||||
# SDK which provides the behavior this option has always had.
|
||||
if test "x$wxUSE_MACOSX_SDK" = "x"; then
|
||||
{ echo "$as_me:$LINENO: WARNING: Enabling default SDK due to --enable-universal_binary." >&5
|
||||
echo "$as_me: WARNING: Enabling default SDK due to --enable-universal_binary." >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: If you don't want this, specify --without-macosx-sdk" >&5
|
||||
echo "$as_me: WARNING: If you don't want this, specify --without-macosx-sdk" >&2;}
|
||||
wxUSE_MACOSX_SDK=yes
|
||||
fi
|
||||
else
|
||||
# Complain to user if he specified an argument to --enable-universal_binary
|
||||
# and also 1) specified --with-macosx-sdk using the default (yes) or
|
||||
# 2) specified --with-macosx-sdk using a path or 3) specified
|
||||
# --without-macosx-sdk (no).
|
||||
if test "x$wxUSE_MACOSX_SDK" != "x" ; then
|
||||
{ { echo "$as_me:$LINENO: error: Please specify the new --with-macosx-sdk=PATH and do not specify an arg to --enable-universal_binary
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: Please specify the new --with-macosx-sdk=PATH and do not specify an arg to --enable-universal_binary
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
# Put the SDK path into the wxUSE_MACOSX_SDK. We don't have to
|
||||
# special-case the empty string because the below test simply
|
||||
# converts "no" to the empty string anyway.
|
||||
wxUSE_MACOSX_SDK="$wxUSE_UNIVERSAL_BINARY"
|
||||
{ echo "$as_me:$LINENO: WARNING: Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument" >&5
|
||||
echo "$as_me: WARNING: Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument" >&2;}
|
||||
fi
|
||||
fi
|
||||
OSX_UNIV_OPTS="-arch ppc -arch i386"
|
||||
CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
|
||||
CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
|
||||
LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
|
||||
retest_macosx_linking=yes
|
||||
|
||||
{ echo "$as_me:$LINENO: WARNING: Disabling precompiled headers due to universal binary build." >&5
|
||||
echo "$as_me: WARNING: Disabling precompiled headers due to universal binary build." >&2;}
|
||||
bk_use_pch=no
|
||||
fi
|
||||
#fi
|
||||
|
||||
if test "x$wxUSE_MACOSX_SDK" = "xno"; then
|
||||
wxUSE_MACOSX_SDK=
|
||||
elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
|
||||
# TODO: Search for most recent SDK and use it.
|
||||
wxUSE_MACOSX_SDK="/Developer/SDKs/MacOSX10.4u.sdk"
|
||||
fi
|
||||
|
||||
|
||||
if test "x$wxUSE_MACOSX_SDK" != "x"; then
|
||||
echo "$as_me:$LINENO: checking for SDK directory $wxUSE_MACOSX_SDK" >&5
|
||||
echo $ECHO_N "checking for SDK directory $wxUSE_MACOSX_SDK... $ECHO_C" >&6
|
||||
if ! test -d "$wxUSE_MACOSX_SDK"; then
|
||||
{ { echo "$as_me:$LINENO: error: not found
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: not found
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
echo "$as_me:$LINENO: result: exists" >&5
|
||||
echo "${ECHO_T}exists" >&6
|
||||
fi
|
||||
MACOSX_SDK_OPTS="-isysroot $wxUSE_MACOSX_SDK"
|
||||
eval "CC=\"$CC $MACOSX_SDK_OPTS\""
|
||||
eval "CXX=\"$CXX $MACOSX_SDK_OPTS\""
|
||||
eval "LD=\"$LD $MACOSX_SDK_OPTS\""
|
||||
retest_macosx_linking=yes
|
||||
fi
|
||||
|
||||
if test "x$wxUSE_MACOSX_VERSION_MIN" = "xno"; then
|
||||
wxUSE_MACOSX_VERSION_MIN=
|
||||
elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then
|
||||
if test "x$wxUSE_MACOSX_SDK" != "x"; then
|
||||
echo "$as_me:$LINENO: checking SDK deployment version" >&5
|
||||
echo $ECHO_N "checking SDK deployment version... $ECHO_C" >&6
|
||||
|
||||
MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
|
||||
|
||||
if test "x$MACOSX_SDK_PLIST_VERSION_MIN" != "x"; then
|
||||
wxUSE_MACOSX_VERSION_MIN=$MACOSX_SDK_PLIST_VERSION_MIN
|
||||
echo "$as_me:$LINENO: result: $wxUSE_MACOSX_VERSION_MIN" >&5
|
||||
echo "${ECHO_T}$wxUSE_MACOSX_VERSION_MIN" >&6
|
||||
else
|
||||
{ echo "$as_me:$LINENO: WARNING: Could not determine deployment target from SDKSettings.plist" >&5
|
||||
echo "$as_me: WARNING: Could not determine deployment target from SDKSettings.plist" >&2;}
|
||||
wxUSE_MACOSX_VERSION_MIN=
|
||||
fi
|
||||
else
|
||||
wxUSE_MACOSX_VERSION_MIN=
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then
|
||||
MACOSX_VERSION_MIN_OPTS="-mmacosx-version-min=$wxUSE_MACOSX_VERSION_MIN"
|
||||
eval "CC=\"$CC $MACOSX_VERSION_MIN_OPTS\""
|
||||
eval "CXX=\"$CXX $MACOSX_VERSION_MIN_OPTS\""
|
||||
eval "LD=\"$LD $MACOSX_VERSION_MIN_OPTS\""
|
||||
retest_macosx_linking=yes
|
||||
fi
|
||||
|
||||
if test "x$retest_macosx_linking" = "xyes"; then
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
echo "$as_me:$LINENO: checking if C compiler works with SDK/version options" >&5
|
||||
echo $ECHO_N "checking if C compiler works with SDK/version options... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ { echo "$as_me:$LINENO: error: no. Try a different SDK
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: no. Try a different SDK
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }; exit 1
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
ac_ext=cc
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
echo "$as_me:$LINENO: checking if C++ compiler works with SDK/version options" >&5
|
||||
echo $ECHO_N "checking if C++ compiler works with SDK/version options... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ { echo "$as_me:$LINENO: error: no. Try a different SDK
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: no. Try a different SDK
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }; exit 1
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
fi
|
||||
|
||||
|
||||
case "${host}" in
|
||||
|
||||
@@ -45925,23 +46217,6 @@ if test "$wxUSE_WINE" = "yes"; then
|
||||
BAKEFILE_FORCE_PLATFORM=win32
|
||||
fi
|
||||
|
||||
if test "$wxUSE_MAC" = 1 ; then
|
||||
if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
|
||||
if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
|
||||
OSX_UNIV_OPTS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
||||
else
|
||||
OSX_UNIV_OPTS=${wxUSE_UNIVERSAL_BINARY:+"-isysroot '$wxUSE_UNIVERSAL_BINARY'"}
|
||||
fi
|
||||
OSX_UNIV_OPTS="$OSX_UNIV_OPTS -arch ppc -arch i386"
|
||||
CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
|
||||
CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
|
||||
LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
|
||||
bk_use_pch=no
|
||||
fi
|
||||
# TODO: where do we add "-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" for libtool (static builds only)?
|
||||
# The makefile currently uses AR and RANLIB, which libtool apparently supercedes.
|
||||
fi
|
||||
|
||||
if test "$wxUSE_UNICODE" = yes -a "$GCC" = yes -a "$bk_use_pch" != no
|
||||
then
|
||||
echo "$as_me:$LINENO: checking for gcc precompiled header bug" >&5
|
||||
|
Reference in New Issue
Block a user