summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure258
1 files changed, 132 insertions, 126 deletions
diff --git a/configure b/configure
index 8ea494d4ff..886e7239dd 100755
--- a/configure
+++ b/configure
@@ -892,6 +892,7 @@ CFG_EGL=auto
CFG_SSE=auto
CFG_FONTCONFIG=auto
CFG_LIBFREETYPE=auto
+CFG_HARFBUZZ=no
CFG_SQL_AVAILABLE=
QT_ALL_BUILD_PARTS=" libs tools examples tests "
QT_DEFAULT_BUILD_PARTS="libs tools examples"
@@ -901,7 +902,6 @@ CFG_SKIP_MODULES=""
CFG_COMPILE_EXAMPLES=yes
CFG_RELEASE_QMAKE=no
CFG_AUDIO_BACKEND=auto
-CFG_V8SNAPSHOT=auto
CFG_QML_DEBUG=yes
CFG_JAVASCRIPTCORE_JIT=auto
CFG_PKGCONFIG=auto
@@ -970,7 +970,6 @@ CFG_INOTIFY=auto
CFG_EVENTFD=auto
CFG_RPATH=yes
CFG_FRAMEWORK=auto
-CFG_MAC_HARFBUZZ=no
DEFINES=
D_FLAGS=
I_FLAGS=
@@ -1496,8 +1495,9 @@ while [ "$#" -gt 0 ]; do
OPT_OBSOLETE_HOST_ARG=yes
;;
harfbuzz)
- if ([ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]) || [ "$VAL" = "no" ]; then
- CFG_MAC_HARFBUZZ="$VAL"
+ [ "$VAL" = "yes" ] && VAL=qt
+ if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
+ CFG_HARFBUZZ="$VAL"
else
UNKNOWN_OPT=yes
fi
@@ -1533,6 +1533,11 @@ while [ "$#" -gt 0 ]; do
QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
fi
;;
+ gcov)
+ if [ "$VAL" = "yes" ]; then
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG gcov"
+ fi
+ ;;
platform)
PLATFORM="$VAL"
# keep compatibility with old platform names
@@ -2472,47 +2477,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then
[ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
- # save a pre-existing mkspecs/modules dir
- test -d "$outpath/mkspecs/modules" && \
- mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
- # ditto for mkspecs/modules-inst
- test -d "$outpath/mkspecs/modules-inst" && \
- mv "$outpath/mkspecs/modules-inst" "$outpath/mkspecs-modules-inst"
-
- # symlink the mkspecs directory
mkdir -p "$outpath/mkspecs"
- rm -rf "$outpath"/mkspecs/*
- ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
-
- ShadowMkspecs()
- {
- rm -rf "$outpath/mkspecs/$1"
- find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
- find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
- }
-
- # Special case for mkspecs/features directory.
- # To be able to place .prf files into a shadow build directory,
- # we're creating links for files only. The directory structure is reproduced.
- ShadowMkspecs features
-
- # The modules dir is special, too.
- if test -d "$outpath/mkspecs-modules"; then
- rm -rf "$outpath/mkspecs/modules"
- mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
- else
- ShadowMkspecs modules
- fi
-
- # The modules-inst dir is not quite as special, but still.
- if test -d "$outpath/mkspecs-modules-inst"; then
- rm -rf "$outpath/mkspecs/modules-inst"
- mv "$outpath/mkspecs-modules-inst" "$outpath/mkspecs/modules-inst"
- fi
-
- # Prepare doc directory
- mkdir -p "$outpath/doc"
- ln -f -s "$relpath"/doc/global "$outpath/doc"
fi
# symlink fonts to be able to run application from build directory
@@ -2816,9 +2781,9 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
echo >&2
echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
- echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
- echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
- echo " built with 'macx-g++'" >&2
+ echo " Please build Qt/Mac with 'macx-clang' or 'macx-g++', then use" >&2
+ echo " the 'macx-xcode' spec for your application, and it will link to" >&2
+ echo " the Qt/Mac build using the settings of the original mkspec." >&2
echo >&2
exit 2
fi
@@ -2909,7 +2874,7 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples tests"
CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store
CFG_CXX11="no" # C++11 support disabled for now
- CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtdeclarative qtquickcontrols qtwebkit qtgraphicaleffects qtdoc qtmultimedia qtwebkit-examples qttools"
+ CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtquickcontrols qtwebkit qtgraphicaleffects qtdoc qtmultimedia qtwebkit-examples qttools"
fi
# disable GTK style support auto-detection on Mac
@@ -3054,21 +3019,44 @@ else
fi
# auto-detect default include and library search paths
-gccout=`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null`
-# extract from one line like 'LIBRARY_PATH=/one/path:/another/path:...'
-libdirs=`echo "$gccout" | sed -n -e 's/^LIBRARY_PATH=\(.*\)/\1/p'`
-DEFAULT_LIBDIRS=`IFS=${HOST_DIRLIST_SEP}; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done`
-# extract from indented lines between '#include <...> search starts here:' and 'End of search list.'
-DEFAULT_INCDIRS=`echo "$gccout" | $AWK '
-/^End of search/ { yup=0 }
+unset tty
+[ "$OPT_VERBOSE" = "yes" ] && tty=/dev/stderr
+
+eval `LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK '
+BEGIN { ORS = ""; FS = "="; incs = 0; libs = 0; }
+function quote(s)
+{
+ # We only handle spaces
+ if (match(s, " ") != 0)
+ return "\\\\\"" s "\\\\\"";
+ return s;
+}
+
+# extract include paths from indented lines between
+# #include <...> search starts here:
+# and
+# End of search list.
+/^\#include </ { yup=1; print "DEFAULT_INCDIRS=\""; next }
+/^End of search/ { yup=0; print "\"\n" }
/ \(framework directory\)$/ { next }
-yup { print substr($0, 2) }
-/^\#include </ { yup=1 }
-'`
-test -z "$DEFAULT_LIBDIRS" && DEFAULT_LIBDIRS="/lib
-/usr/lib"
-test -z "$DEFAULT_INCDIRS" && DEFAULT_INCDIRS="/usr/include
-/usr/local/include"
+yup { print quote(substr($0, 2)) " "; ++incs }
+
+# extract from one line like LIBRARY_PATH=/one/path:/another/path:...
+$1 == "LIBRARY_PATH" {
+ libs = split($2, library_paths, ":");
+ print "DEFAULT_LIBDIRS=\"";
+ for (lib in library_paths)
+ print quote(library_paths[lib]) " ";
+ print "\"\n"
+}
+
+END {
+ if (incs == 0)
+ print "DEFAULT_INCDIRS=\"/usr/include /usr/local/include\"\n";
+ if (libs == 0)
+ print "DEFAULT_LIBDIRS=\"/lib /usr/lib\"\n";
+}' | tee $tty`
+unset tty
#setup the build parts
if [ -z "$CFG_BUILD_PARTS" ]; then
@@ -3514,6 +3502,7 @@ Configure options:
-qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
-testcocoon ........ Instrument Qt with the TestCocoon code coverage tool.
+ -gcov .............. Instrument Qt with the GCov code coverage tool.
-D <string> ........ Add an explicit define to the preprocessor.
-I <string> ........ Add an explicit include path.
@@ -3546,6 +3535,14 @@ Third Party Libraries:
+ -system-libjpeg .... Use libjpeg from the operating system.
See http://www.ijg.org
+ * -no-harfbuzz ....... Do not compile HarfBuzz-NG support.
+ -qt-harfbuzz ....... (experimental) Use HarfBuzz-NG bundled with Qt
+ to do text shaping. It can still be disabled
+ by setting QT_HARFBUZZ environment variable to "old".
+ -system-harfbuzz ... (experimental) Use HarfBuzz-NG from the operating system
+ to do text shaping. It can still be disabled
+ by setting QT_HARFBUZZ environment variable to "old".
+
-no-openssl ........ Do not compile support for OpenSSL.
+ -openssl ........... Enable run-time OpenSSL support.
-openssl-linked .... Enabled linked OpenSSL support.
@@ -3714,10 +3711,6 @@ Qt/Mac only:
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. The argument should be
one of the available SDKs as listed by 'xcodebuild -showsdks'.
- -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
- * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
- QT_ENABLE_HARFBUZZ environment variable.
-
EOF
fi
@@ -4200,6 +4193,12 @@ cat > "$QTCONFFILE" <<EOF
[EffectivePaths]
Prefix=..
EOF
+if [ x"$relpath" != x"$outpath" ]; then
+ cat >> "$QTCONFFILE" <<EOF
+[EffectiveSourcePaths]
+Prefix=$relpath
+EOF
+fi
#-------------------------------------------------------------------------------
# write out device config before we run the test.
@@ -4474,8 +4473,7 @@ fi
# detect neon support
if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
- # The iOS toolchain has trouble building the pixman NEON draw-helpers
- if [ "$XPLATFORM_IOS" != "yes" ] && compileTest unix/neon "neon"; then
+ if compileTest unix/neon "neon"; then
CFG_NEON=yes
else
CFG_NEON=no
@@ -5274,29 +5272,6 @@ if [ "$CFG_TSLIB" != "no" ]; then
fi
fi
-# Check we actually have X11 :-)
-if compileTest x11/xlib "XLib"; then
- QT_CONFIG="$QT_CONFIG xlib"
-fi
-
-# auto-detect Xrender support
-if [ "$CFG_XRENDER" != "no" ]; then
- if compileTest x11/xrender "Xrender"; then
- CFG_XRENDER=yes
- QT_CONFIG="$QT_CONFIG xrender"
- else
- if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "Xrender support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_XRENDER=no
- fi
- fi
-fi
-
if [ "$CFG_XCB" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
@@ -5342,10 +5317,39 @@ if [ "$CFG_XCB" != "no" ]; then
fi
fi
+ # Check for X11. Eventually we should port everything to XCB,
+ # but for now the port is incomplete and Xlib is a requirement.
+ if compileTest x11/xlib "XLib"; then
+ QT_CONFIG="$QT_CONFIG xlib"
+ else
+ echo "The test for linking against Xlib failed!"
+ echo " You might need to install dependency packages."
+ echo " See src/plugins/platforms/xcb/README."
+ exit 1
+ fi
+
if compileTest qpa/xcb-xlib "xcb-xlib" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
QT_CONFIG="$QT_CONFIG xcb-xlib"
fi
+ # auto-detect Xrender support
+ if [ "$CFG_XRENDER" != "no" ]; then
+ if compileTest x11/xrender "Xrender"; then
+ CFG_XRENDER=yes
+ QT_CONFIG="$QT_CONFIG xrender"
+ else
+ if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Xrender support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XRENDER=no
+ fi
+ fi
+ fi
+
# auto-detect XInput2 support. Needed by xcb too.
if [ "$CFG_XINPUT2" != "no" ]; then
if compileTest x11/xinput2 "XInput2"; then
@@ -5589,6 +5593,16 @@ if [ "$CFG_LIBFREETYPE" = "auto" ]; then
fi
fi
+# harfbuzz support
+[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_HARFBUZZ" = "auto" ] && CFG_HARFBUZZ=no
+if [ "$CFG_HARFBUZZ" = "auto" ]; then
+ if compileTest unix/harfbuzz "HarfBuzz"; then
+ CFG_HARFBUZZ=system
+ else
+ CFG_HARFBUZZ=yes
+ fi
+fi
+
if ! compileTest unix/stl "STL" &&
[ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "STL functionality check failed! Cannot build Qt with this STL library."
@@ -6003,6 +6017,14 @@ elif [ "$CFG_LIBFREETYPE" = "system" ]; then
else
QT_CONFIG="$QT_CONFIG freetype"
fi
+if [ "$CFG_HARFBUZZ" = "no" ]; then
+ QT_CONFIG="$QT_CONFIG no-harfbuzz"
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_HARFBUZZ"
+elif [ "$CFG_HARFBUZZ" = "system" ]; then
+ QT_CONFIG="$QT_CONFIG system-harfbuzz"
+else
+ QT_CONFIG="$QT_CONFIG harfbuzz"
+fi
if [ "$CFG_GUI" = "auto" ]; then
CFG_GUI="yes"
fi
@@ -6037,7 +6059,6 @@ fi
[ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
[ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
[ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
-[ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
[ "$CFG_XCB" != "no" ] && QT_CONFIG="$QT_CONFIG xcb"
[ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
[ "$CFG_SYSTEM_PROXIES" = "yes" ] && QT_CONFIG="$QT_CONFIG system-proxies"
@@ -6122,7 +6143,6 @@ fi
# supported and on which compilers.
#
canBuildQtConcurrent="yes"
-canUseV8Snapshot="yes"
case "$XPLATFORM" in
hpux-g++*)
@@ -6258,33 +6278,6 @@ if [ "$CFG_WEBKIT" = "debug" ]; then
fi
# ### Vestige
-QT_CONFIG="$QT_CONFIG v8"
-# Detect snapshot support
-if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
- case "$CFG_HOST_ARCH,$CFG_ARCH" in
- i386,arm)
- ;;
- *) canUseV8Snapshot="no"
- ;;
- esac
-else
- if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
- # QEMU crashes when building inside Scratchbox with an ARM target
- canUseV8Snapshot="no"
- fi
-fi
-if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
- CFG_V8SNAPSHOT="$canUseV8Snapshot"
-fi
-if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
- echo "Error: V8 snapshot was requested, but is not supported on this platform."
- exit 1
-fi
-if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG v8snapshot"
-fi
-
-# ### Vestige
if [ "$CFG_QML_DEBUG" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
fi
@@ -6610,12 +6603,14 @@ fi
cat >>"$QTCONFIG.tmp" <<EOF
#configuration
CONFIG += $QTCONFIG_CONFIG
-QT_ARCH = $CFG_ARCH
-QT_HOST_ARCH = $CFG_HOST_ARCH
-QT_CPU_FEATURES = $CFG_CPUFEATURES
-QT_HOST_CPU_FEATURES = $CFG_HOST_CPUFEATURES
-QMAKE_DEFAULT_LIBDIRS = `echo "$DEFAULT_LIBDIRS" | sed 's,^,",;s,$,",' | tr '\n' ' '`
-QMAKE_DEFAULT_INCDIRS = `echo "$DEFAULT_INCDIRS" | sed 's,^,",;s,$,",' | tr '\n' ' '`
+host_build {
+ QT_ARCH = $CFG_HOST_ARCH
+ QT_TARGET_ARCH = $CFG_ARCH
+} else {
+ QT_ARCH = $CFG_ARCH
+ QMAKE_DEFAULT_LIBDIRS = $DEFAULT_LIBDIRS
+ QMAKE_DEFAULT_INCDIRS = $DEFAULT_INCDIRS
+}
QT_EDITION = $Edition
QT_CONFIG += $QT_CONFIG
@@ -6697,6 +6692,14 @@ if [ -n "$CFG_SKIP_MODULES" ]; then
echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES" >> "$QTMODULE.tmp"
fi
+cat >>"$QTMODULE.tmp" <<EOF
+host_build {
+ QT_CPU_FEATURES.$CFG_HOST_ARCH = $CFG_HOST_CPUFEATURES
+} else {
+ QT_CPU_FEATURES.$CFG_ARCH = $CFG_CPUFEATURES
+}
+EOF
+
if [ -n "$QT_CFLAGS_PSQL" ]; then
echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
fi
@@ -6867,6 +6870,9 @@ report_support " CUPS ..................." "$CFG_CUPS"
[ "$XPLATFORM_MINGW" = "yes" ] && \
report_support " DirectWrite ............" "$CFG_DIRECTWRITE"
report_support " FontConfig ............." "$CFG_FONTCONFIG"
+report_support " FreeType ..............." "$CFG_FREETYPE"
+[ "$CFG_HARFBUZZ" != "no" ] && \
+ report_support " HarfBuzz ..............." "$CFG_HARFBUZZ"
report_support " Iconv .................." "$CFG_ICONV"
report_support " ICU ...................." "$CFG_ICU"
report_support " Image formats:"