summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-01-06 12:29:32 +0100
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-01-06 12:29:32 +0100
commite7274672bfddc6896dc7edbf57b555189e06ed55 (patch)
treefc772fe04c9289cb49999470f2f11708366878f8 /configure
parente2baf96da8881ed7c585e59e84efe39bbbd3d0d4 (diff)
downloadqt4-tools-e7274672bfddc6896dc7edbf57b555189e06ed55.tar.gz
Make Qt use Cocoa by default on Mac OS X
The "-cococa" option is now deprecated, "-carbon" is added. This is mostly a behind-the-scenes change, but has some implications: If you are developing on Snow Leopard Qt vill be built in x86_64 mode by default. This can be overridden by configuring with "-arch x86" Qt for Cocoa will not build on 10.4 Tiger, nor will Cocoa-based binaries deploy back to that platform. Configure with "-carbon" if you want to target 10.4.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure75
1 files changed, 38 insertions, 37 deletions
diff --git a/configure b/configure
index 7b4f832803..7744d51e7d 100755
--- a/configure
+++ b/configure
@@ -759,9 +759,9 @@ CFG_MAC_ARCHS=
MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
CFG_MAC_DWARF2=auto
CFG_MAC_XARCH=auto
-CFG_MAC_CARBON=yes
-CFG_MAC_COCOA=auto
-COMMANDLINE_MAC_COCOA=no
+CFG_MAC_CARBON=no
+CFG_MAC_COCOA=yes
+COMMANDLINE_MAC_CARBON=no
CFG_SXE=no
CFG_PREFIX_INSTALL=yes
CFG_SDK=
@@ -921,7 +921,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -1321,13 +1321,17 @@ while [ "$#" -gt 0 ]; do
fi
;;
cocoa)
+# do nothing - Cocoa is the default.
+ ;;
+ carbon)
if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
- CFG_MAC_COCOA="$VAL"
- COMMANDLINE_MAC_COCOA="$VAL"
+ CFG_MAC_CARBON="$VAL"
+ COMMANDLINE_MAC_CARBON="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
+
framework)
if [ "$PLATFORM_MAC" = "yes" ]; then
CFG_FRAMEWORK="$VAL"
@@ -3784,10 +3788,11 @@ Qt/Mac only:
-Fstring ........... Add an explicit framework path.
-fw string ......... Add an explicit framework.
- -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
- and -static is not supported with -cocoa. Specifying
- this option creates Qt binaries that requires Mac OS X
- 10.5 or higher.
+ -cocoa ............. [Deprecated] Cocoa is now enabled by default.
+
+ -carbon .............Build the Carbon version of Qt. 64-bit archs
+ are not supported by carbon and will be built
+ with cocoa
* -framework ......... Build Qt as a series of frameworks and
link tools against those frameworks.
@@ -3800,8 +3805,7 @@ Qt/Mac only:
-arch <arch> ....... Build Qt for <arch>
Example values for <arch>: x86 ppc x86_64 ppc64
- Multiple -arch arguments can be specified, 64-bit archs
- will be built with the Cocoa framework.
+ Multiple -arch arguments can be specified.
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
@@ -5942,14 +5946,14 @@ if [ "$CFG_MAC_DWARF2" = "yes" ]; then
QT_CONFIG="$QT_CONFIG dwarf2"
fi
-# Set the default arch.
-# Carbon builds: 32 bit x86/ppc.
-# For "-cocoa" builds on snow leopard : compiler default (64-bit).
-# For "-cocoa" builds on leopard : compiler default (32-bit).
+# Set the default arch if there are no "-arch" arguments on the configure line
+# For "-carbon" builds: 32 bit x86/ppc.
+# For builds on snow leopard : compiler default (64-bit).
+# For builds on leopard : compiler default (32-bit).
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
- if [ "$CFG_MAC_COCOA" != "yes" ]; then
+ if [ "$CFG_MAC_CARBON" = "yes" ]; then
if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
CFG_MAC_ARCHS=" x86"
elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
@@ -5965,25 +5969,23 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
fi
# enable cocoa and/or carbon on Mac
-if [ "$CFG_MAC_COCOA" = "yes" ]; then
-# -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
- CFG_MAC_CARBON="no"
-else
+if [ "$CFG_MAC_CARBON" = "yes" ]; then
+# -carbon on the command line disables Cocoa, except for 64b-bit archs
+ CFG_MAC_CARBON="YES"
+ CFG_MAC_COCOA="NO"
+fi
# check which archs are in use, enable cocoa if we find a 64-bit one
- if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
- CFG_MAC_COCOA="yes";
- CFG_MAC_CARBON="no";
- if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
- CFG_MAC_CARBON="yes";
- fi
- if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
- CFG_MAC_CARBON="yes";
- fi
- else
-# no 64-bit archs found.
- CFG_MAC_COCOA="no"
+if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
+ CFG_MAC_COCOA="yes";
+ CFG_MAC_CARBON="no";
+ if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
+ CFG_MAC_CARBON="yes";
+ fi
+ if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
+ CFG_MAC_CARBON="yes";
fi
-fi;
+fi
+
# set the global Mac deployment target. This is overridden on an arch-by-arch basis
# in some cases, see code further down
@@ -6579,9 +6581,8 @@ fi
# On Mac, set the minimum deployment target for the different architechtures
# using the Xarch compiler option when supported (10.5 and up). On 10.4 the
# deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
-# env. variable. "-cocoa" on the command line means Cocoa is used in 32-bit mode also,
-# in this case fall back on QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
-if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
+# env. variable.
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"