2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
74 DEVICE_VARS_FILE=.device.vars
77 :> "$DEVICE_VARS_FILE"
79 #-------------------------------------------------------------------------------
81 #-------------------------------------------------------------------------------
85 echo "$@" | sed 's/ /\ /g'
88 # Adds a new qmake variable to the cache
89 # Usage: QMakeVar mode varname contents
90 # where mode is one of: set, add, del
104 echo >&2 "BUG: wrong command to QMakeVar: $1"
108 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
111 # Helper function for getQMakeConf. It parses include statements in
112 # qmake.conf and prints out the expanded file
115 while read line; do case "$line" in
117 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
118 current_dir=`dirname "$1"`
119 conf_file="$current_dir/$inc_file"
120 if [ ! -f "$conf_file" ]; then
121 echo "WARNING: Unable to find file $conf_file" >&2
124 getQMakeConf1 "$conf_file"
136 values["LITERAL_WHITESPACE"] = " "
137 values["LITERAL_DOLLAR"] = "$"
139 /^[_A-Z0-9.]+[ \t]*\+?=/ {
140 valStart = index($0, "=") + 1
143 if (substr($0, valStart - 2, 1) == "+") {
147 variable = substr($0, 0, valStart - 2 - append)
148 value = substr($0, valStart)
149 gsub("[ \t]+", "", variable)
150 gsub("^[ \t]+", "", value)
151 gsub("[ \t]+$", "", value)
154 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
155 ovalue = ovalue substr(value, 1, RSTART - 1)
156 var = substr(value, RSTART + 2, RLENGTH - 2)
157 value = substr(value, RSTART + RLENGTH)
159 var = substr(var, 2, length(var) - 2)
161 ovalue = ovalue values[var]
163 ovalue = ovalue value
165 combinedValue = values[variable]
166 if (append == 1 && length(combinedValue) > 0) {
167 combinedValue = combinedValue " " ovalue
169 combinedValue = ovalue
171 values[variable] = combinedValue
174 for (var in values) {
175 print var "=" values[var]
183 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
186 # relies on $QMAKESPEC being set correctly. parses include statements in
187 # qmake.conf and prints out the expanded file
190 if [ -z "$specvals" ]; then
191 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
193 getQMakeConf3 "$1" "$specvals"
198 if [ -z "$xspecvals" ]; then
199 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$xspecvals"
204 # relies on $TEST_COMPILER being set correctly
205 compilerSupportsFlag()
207 cat >conftest.cpp <<EOF
208 int main() { return 0; }
210 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
212 rm -f conftest.cpp conftest.o
216 # relies on $TEST_COMPILER being set correctly
222 safe_flag=`shellEscape "$flag"`
223 lflags=$lflags,$safe_flag
225 compilerSupportsFlag "$lflags" >/dev/null 2>&1
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
238 echo >&2 "BUG: wrong command to QMakeVar: $1"
242 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
245 #-------------------------------------------------------------------------------
246 # operating system detection
247 #-------------------------------------------------------------------------------
249 # need that throughout the script
250 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
251 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
252 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
253 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
255 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
256 if echo '\c' | grep '\c' >/dev/null; then
262 #-------------------------------------------------------------------------------
263 # window system detection
264 #-------------------------------------------------------------------------------
268 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
273 #-----------------------------------------------------------------------------
274 # Qt version detection
275 #-----------------------------------------------------------------------------
276 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
280 if [ -n "$QT_VERSION" ]; then
281 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
282 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
283 if [ -n "$MAJOR" ]; then
284 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
285 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
286 QT_MAJOR_VERSION="$MAJOR"
287 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
288 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
291 if [ -z "$QT_MAJOR_VERSION" ]; then
292 echo "Cannot process version from qglobal.h: $QT_VERSION"
293 echo "Cannot proceed."
297 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
298 if [ -z "$QT_PACKAGEDATE" ]; then
299 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
300 echo "Cannot proceed"
304 #-------------------------------------------------------------------------------
306 #-------------------------------------------------------------------------------
310 EditionString=Commercial
314 # parse the arguments, setting things to "yes" or "no"
315 while [ "$#" -gt 0 ]; do
319 #Autoconf style options
321 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
325 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
329 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
330 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
333 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
336 -h|help|--help|-help)
337 if [ "$VAL" = "yes" ]; then
339 COMMERCIAL_USER="no" #doesn't matter we will display the help
342 COMMERCIAL_USER="no" #doesn't matter we will display the help
346 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
350 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
357 if [ "$UNKNOWN_ARG" = "yes" ]; then
369 COMMERCIAL_USER="yes"
383 if [ "$COMMERCIAL_USER" = "ask" ]; then
385 echo "Which edition of Qt do you want to use ?"
387 echo "Type 'c' if you want to use the Commercial Edition."
388 echo "Type 'o' if you want to use the Open Source Edition."
392 if [ "$commercial" = "c" ]; then
393 COMMERCIAL_USER="yes"
395 elif [ "$commercial" = "o" ]; then
402 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
403 # Commercial preview release
404 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
407 QT_EDITION="QT_EDITION_DESKTOP"
408 LicenseType="Technology Preview"
409 elif [ $COMMERCIAL_USER = "yes" ]; then
410 # one of commercial editions
411 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
413 # read in the license file
414 if [ -f "$LICENSE_FILE" ]; then
415 . "$LICENSE_FILE" >/dev/null 2>&1
416 if [ -z "$LicenseKeyExt" ]; then
418 echo "You are using an old license file."
420 echo "Please install the license file supplied by Nokia,"
421 echo "or install the Qt Open Source Edition if you intend to"
422 echo "develop free software."
425 if [ -z "$Licensee" ]; then
427 echo "Invalid license key. Please check the license key."
431 if [ -z "$LicenseKeyExt" ]; then
433 echo $ECHO_N "Please enter your license key: $ECHO_C"
435 Licensee="Unknown user"
440 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
441 && LicenseValid="yes" \
443 if [ "$LicenseValid" != "yes" ]; then
445 echo "Invalid license key. Please check the license key."
448 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
449 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
450 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
451 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
453 # determine which edition we are licensed to use
454 case "$LicenseTypeCode" in
456 LicenseType="Commercial"
460 QT_EDITION="QT_EDITION_UNIVERSAL"
463 Edition="FullFramework"
464 EditionString="Full Framework"
465 QT_EDITION="QT_EDITION_DESKTOP"
468 Edition="GUIFramework"
469 EditionString="GUI Framework"
470 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
475 LicenseType="Evaluation"
476 QMakeVar add DEFINES QT_EVAL
480 QT_EDITION="QT_EDITION_EVALUATION"
485 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
487 echo "Invalid license key. Please check the license key."
491 # verify that we are licensed to use Qt on this platform
493 case "$PlatformCode" in
496 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
500 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
503 ### EMBEDDED_QPA logic missing ###
504 case "$PlatformCode,$PLATFORM_MAC" in
505 X9,* | XC,* | XU,* | XW,* | XM,*)
507 LICENSE_EXTENSION="-ALLOS"
509 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
510 # Qt for Embedded Linux
511 LICENSE_EXTENSION="-EMBEDDED"
513 6M,* | N7,* | N9,* | NX,*)
515 LICENSE_EXTENSION="-EMBEDDED"
517 FM,* | LM,yes | ZM,no)
519 LICENSE_EXTENSION="-DESKTOP"
523 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
525 echo "You are not licensed for the $Platform platform."
527 echo "Please contact qt-info@nokia.com to upgrade your license to"
528 echo "include the $Platform platform, or install the Qt Open Source Edition"
529 echo "if you intend to develop free software."
534 if test -r "$relpath/.LICENSE"; then
535 # Generic, non-final license
537 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
542 *TECHNOLOGY?PREVIEW*)
549 echo >&2 "Invalid license files; cannot continue"
554 EditionString="$Edition"
555 QT_EDITION="QT_EDITION_DESKTOP"
558 case "$LicenseFeatureCode" in
561 case "$LicenseType" in
563 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
566 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
572 case "$LicenseType" in
574 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
577 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
583 echo "Invalid license key. Please check the license key."
587 case "$LicenseFeatureCode" in
595 if [ '!' -f "$outpath/LICENSE" ]; then
596 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
597 echo "this software has disappeared."
599 echo "Sorry, you are not licensed to use this software."
600 echo "Try re-installing."
604 elif [ $COMMERCIAL_USER = "no" ]; then
605 # Open Source edition - may only be used under the terms of the GPL or LGPL.
606 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
607 Licensee="Open Source"
609 EditionString="Open Source"
610 QT_EDITION="QT_EDITION_OPENSOURCE"
613 #-------------------------------------------------------------------------------
614 # initalize variables
615 #-------------------------------------------------------------------------------
617 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
618 for varname in $SYSTEM_VARIABLES; do
619 qmakevarname="${varname}"
620 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
621 if [ "${varname}" = "LDFLAGS" ]; then
622 qmakevarname="LFLAGS"
623 elif [ "${varname}" = "LD" ]; then
627 'if [ -n "\$'${varname}'" ]; then
628 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
632 # Use CC/CXX to run config.tests
633 mkdir -p "$outpath/config.tests"
634 rm -f "$outpath/config.tests/.qmake.cache"
635 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
637 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
639 # QTDIR may be set and point to an old or system-wide Qt installation
642 # the minimum version of libdbus-1 that we require:
643 MIN_DBUS_1_VERSION=0.93
645 # initalize internal variables
646 CFG_CONFIGURE_EXIT_ON_ERROR=yes
648 CFG_EXCEPTIONS=unspecified
649 CFG_GUI=auto # (yes|no|auto)
675 CFG_OPENVG_LC_INCLUDES=no
676 CFG_OPENVG_SHIVA=auto
677 CFG_OPENVG_ON_OPENGL=auto
683 QT_DEFAULT_BUILD_PARTS="libs examples"
687 CFG_AUDIO_BACKEND=auto
690 CFG_JAVASCRIPTCORE_JIT=auto
692 # Target architecture
694 # Host architecture, same as CFG_ARCH when not cross-compiling
696 # Set when the -arch or -host-arch arguments are used
697 OPT_OBSOLETE_HOST_ARG=no
708 CFG_OBSOLETE_WAYLAND=no
721 CFG_SEPARATE_DEBUG_INFO=no
722 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
723 CFG_REDUCE_EXPORTS=auto
733 CFG_REDUCE_RELOCATIONS=auto
734 CFG_ACCESSIBILITY=auto
739 CFG_CLOCK_GETTIME=auto
740 CFG_CLOCK_MONOTONIC=auto
748 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
752 CFG_PREFIX_INSTALL=yes
761 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
762 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
766 OPT_CONFIRM_LICENSE=no
779 QPA_PLATFORM_GUARD=yes
781 # initalize variables used for installation
790 QT_INSTALL_TRANSLATIONS=
799 #flags for SQL drivers
807 QT_LFLAGS_ODBC="-lodbc"
810 # flags for libdbus-1
814 # flags for Glib (X11 only)
818 # flags for GStreamer (X11 only)
822 #-------------------------------------------------------------------------------
823 # check SQL drivers available in this package
824 #-------------------------------------------------------------------------------
826 # opensource version removes some drivers, so force them to be off
832 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
833 for a in "$relpath/src/plugins/sqldrivers/"*; do
835 base_a=`basename "$a"`
836 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
837 eval "CFG_SQL_${base_a}=auto"
842 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
843 if [ -d "$relpath/src/plugins/imageformats" ]; then
844 for a in "$relpath/src/plugins/imageformats/"*; do
846 base_a=`basename "$a"`
847 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
852 #-------------------------------------------------------------------------------
853 # parse command line arguments
854 #-------------------------------------------------------------------------------
856 # parse the arguments, setting things to "yes" or "no"
857 while [ "$#" -gt 0 ]; do
861 #Autoconf style options
863 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
867 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
871 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
872 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
875 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
879 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
883 -no-*-*|-plugin-*-*|-qt-*-*)
884 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
885 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
889 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
892 #Qt style yes options
893 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
894 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
897 #Qt style options that pass an argument
900 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
904 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
905 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
909 #Qt style complex options in one command
910 -enable-*|-disable-*)
911 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
912 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
914 #Qt Builtin/System style options
915 -no-*|-system-*|-qt-*)
916 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
917 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
919 #Options that cannot be generalized
926 # this option may or may not be followed by an argument
927 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
936 # this option may or may not be followed by an argument
937 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
945 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
946 # this option may or may not be followed by an argument
947 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
966 if [ "$1" = "-D" ]; then
970 VAL=`echo $1 | sed 's,-D,,'`
975 # this option may or may not be followed by an argument
976 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
985 if [ "$1" = "-I" ]; then
989 VAL=`echo $1 | sed 's,-I,,'`
994 if [ "$1" = "-L" ]; then
998 VAL=`echo $1 | sed 's,-L,,'`
1003 if [ "$1" = "-R" ]; then
1007 VAL=`echo $1 | sed 's,-R,,'`
1012 VAL=`echo $1 | sed 's,-l,,'`
1016 if [ "$1" = "-F" ]; then
1020 VAL=`echo $1 | sed 's,-F,,'`
1025 if [ "$1" = "-fw" ]; then
1029 VAL=`echo $1 | sed 's,-fw,,'`
1037 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1044 if [ "$UNKNOWN_ARG" = "yes" ]; then
1045 echo "$1: unknown argument"
1056 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1057 CFG_ACCESSIBILITY="$VAL"
1066 CFG_USE_GNUMAKE="$VAL"
1069 CFG_MYSQL_CONFIG="$VAL"
1072 QT_INSTALL_PREFIX="$VAL"
1075 QT_HOST_PREFIX="$VAL"
1084 QT_FORCE_PKGCONFIG=yes
1087 QT_INSTALL_DOCS="$VAL"
1090 QT_INSTALL_HEADERS="$VAL"
1093 QT_INSTALL_PLUGINS="$VAL"
1096 QT_INSTALL_IMPORTS="$VAL"
1099 QT_INSTALL_DATA="$VAL"
1102 QT_INSTALL_LIBS="$VAL"
1111 QT_INSTALL_TRANSLATIONS="$VAL"
1113 sysconfdir|settingsdir)
1114 QT_INSTALL_SETTINGS="$VAL"
1117 QT_INSTALL_EXAMPLES="$VAL"
1120 QT_INSTALL_TESTS="$VAL"
1129 QT_INSTALL_BINS="$VAL"
1135 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1142 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1143 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1144 [ "$VAL" = "es2" ]; then
1151 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1158 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1161 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1164 if [ "$BUILD_ON_MAC" = "yes" ]; then
1171 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1172 CFG_MAC_DWARF2="$VAL"
1178 OPT_OBSOLETE_HOST_ARG=yes
1181 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1182 CFG_MAC_HARFBUZZ="$VAL"
1189 if [ "$BUILD_ON_MAC" = "yes" ]; then
1190 CFG_FRAMEWORK="$VAL"
1196 if [ "$VAL" = "yes" ]; then
1198 QMakeVar add QMAKE_CFLAGS -pg
1199 QMakeVar add QMAKE_CXXFLAGS -pg
1200 QMakeVar add QMAKE_LFLAGS -pg
1201 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1207 if [ "$VAL" = "yes" ]; then
1208 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1211 exceptions|g++-exceptions)
1212 if [ "$VAL" = "no" ]; then
1214 elif [ "$VAL" = "yes" ]; then
1222 # keep compatibility with old platform names
1228 PLATFORM=hpux-acc-o64
1231 PLATFORM=hpux-acc-64
1234 PLATFORM=hpux-acc-64
1246 PLATFORM=reliant-cds-64
1249 PLATFORM=solaris-cc-64
1252 PLATFORM=unixware-cc
1255 PLATFORM=unixware-g++
1258 PLATFORM=unixware-cc
1261 PLATFORM=unixware-g++
1267 i386) NATIVE_64_ARCH="x86_64" ;;
1268 powerpc) NATIVE_64_ARCH="ppc64" ;;
1269 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1271 if [ ! -z "$NATIVE_64_ARCH" ]; then
1272 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1279 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1282 XPLATFORM="devices/$VAL"
1285 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1286 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1287 DeviceVar set $DEV_VAR $DEV_VAL
1290 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1291 CFG_DEBUG_RELEASE="$VAL"
1297 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1298 CFG_RELEASE_QMAKE="$VAL"
1304 if [ "$VAL" = "yes" ]; then
1306 elif [ "$VAL" = "no" ]; then
1313 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1314 CFG_PREFIX_INSTALL="$VAL"
1322 developer-build|commercial|opensource)
1323 # These switches have been dealt with already
1326 if [ "$VAL" = "yes" ]; then
1328 elif [ "$VAL" = "no" ]; then
1335 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1336 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1342 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1343 if [ "$VAL" = "no" ]; then
1344 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1345 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1346 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1352 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1359 if [ "$VAL" = "no" ]; then
1366 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1374 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1381 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1388 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1395 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1402 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1409 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1416 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1423 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1430 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1431 CFG_PRECOMPILE="$VAL"
1436 separate-debug-info)
1437 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1438 CFG_SEPARATE_DEBUG_INFO="$VAL"
1439 elif [ "$VAL" = "nocopy" ] ; then
1440 CFG_SEPARATE_DEBUG_INFO="yes"
1441 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1447 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1448 CFG_REDUCE_EXPORTS="$VAL"
1454 if [ "$VAL" = "no" ]; then
1461 if [ "$VAL" = "no" ]; then
1468 if [ "$VAL" = "no" ]; then
1475 if [ "$VAL" = "no" ]; then
1482 if [ "$VAL" = "no" ]; then
1489 if [ "$VAL" = "no" ]; then
1496 if [ "$VAL" = "no" ]; then
1503 if [ "$VAL" = "no" ]; then
1510 if [ "$VAL" = "no" ]; then
1520 if [ "$VAL" = "no" ]; then
1527 if [ "$VAL" = "no" ]; then
1534 if [ "$VAL" = "no" ]; then
1535 CFG_MIPS_DSPR2="$VAL"
1541 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1542 CFG_REDUCE_RELOCATIONS="$VAL"
1548 [ "$VAL" = "qt" ] && VAL=yes
1549 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1554 # No longer supported:
1555 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1558 if [ "$VAL" = "system" ]; then
1565 [ "$VAL" = "yes" ] && VAL=qt
1566 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1573 [ "$VAL" = "yes" ] && VAL=qt
1574 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1581 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1588 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1595 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1602 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1609 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1616 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1617 CFG_FONTCONFIG="$VAL"
1623 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1630 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1637 CFG_OBSOLETE_WAYLAND=yes
1640 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1647 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1654 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1661 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1668 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1675 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1682 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1683 CFG_GSTREAMER="$VAL"
1689 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1690 CFG_QGTKSTYLE="$VAL"
1696 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1699 if [ "$VAL" = "no" ]; then
1707 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1709 elif [ "$VAL" = "no" ]; then
1716 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1717 QPA_PLATFORM_GUARD="$VAL"
1723 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1725 elif [ "$VAL" = "runtime" ]; then
1732 if [ "$VAL" = "yes" ]; then
1739 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1746 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1747 CFG_LARGEFILE="$VAL"
1753 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1760 if [ "$VAL" = "yes" ]; then
1761 CFG_OPENSSL="linked"
1767 if [ "$VAL" = "yes" ]; then
1770 if [ "$VAL" = "no" ]; then
1778 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1779 CFG_JAVASCRIPTCORE_JIT="$VAL"
1785 if [ "$VAL" = "yes" ]; then
1786 OPT_CONFIRM_LICENSE="$VAL"
1792 if [ "$VAL" = "yes" ]; then
1798 sql-*|imageformat-*)
1799 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1800 # if autoconf style options were used, $VAL can be "yes" or "no"
1801 [ "$VAL" = "yes" ] && VAL=qt
1802 # now $VAL should be "no", "qt", or "plugin"... double-check
1803 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1806 # now $VAL is "no", "qt", or "plugin"
1808 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1809 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1811 # Grab the available values
1814 avail="$CFG_SQL_AVAILABLE"
1817 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1818 if [ "$OPT" != "plugin" ]; then
1819 # png is always built in
1825 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1829 # Check that that user's value is available.
1832 if [ "$VAL" = "$d" ]; then
1837 [ "$found" = yes ] || ERROR=yes
1839 if [ "$VAR" = "sql" ]; then
1840 # set the CFG_SQL_driver
1841 eval "CFG_SQL_$VAL=\$OPT"
1843 elif [ "$VAR" = "imageformat" ]; then
1844 [ "$OPT" = "qt" ] && OPT=yes
1845 VAL="`echo $VAL |tr a-z A-Z`"
1846 eval "CFG_$VAL=$OPT"
1850 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1851 if [ "$OPT" = "plugin" ]; then
1854 QMakeVar add "${VAR}s" "${VAL}"
1855 elif [ "$OPT" = "no" ]; then
1856 PLUG_VAR="${VAR}-plugin"
1858 QMakeVar del "${IN_VAR}s" "$VAL"
1859 QMakeVar del "${PLUG_VAR}s" "$VAL"
1861 if [ "$ERROR" = "yes" ]; then
1862 echo "$CURRENT_OPT: unknown argument"
1867 if [ "$VAL" = "yes" ]; then
1868 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1869 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1873 elif [ "$VAL" = "no" ]; then
1874 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1875 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1884 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1891 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1898 D_FLAGS="$D_FLAGS \"$VAL\""
1901 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1904 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1907 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1910 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1913 if [ "$BUILD_ON_MAC" = "yes" ]; then
1914 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1915 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1921 if [ "$BUILD_ON_MAC" = "yes" ]; then
1922 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1928 W_FLAGS="$W_FLAGS \"${VAL}\""
1934 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1935 CFG_PHONON_BACKEND="$VAL"
1947 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1948 CFG_AUDIO_BACKEND="$VAL"
1954 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1961 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1962 CFG_FORCE_ASSERTS="$VAL"
1968 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1978 if [ "$UNKNOWN_OPT" = "yes" ]; then
1979 echo "${CURRENT_OPT}: invalid command-line switch"
1985 # update QT_CONFIG to show our current predefined configuration
1986 case "$CFG_QCONFIG" in
1987 minimal|small|medium|large|full)
1988 # these are a sequence of increasing functionality
1989 for c in minimal small medium large full; do
1990 QT_CONFIG="$QT_CONFIG $c-config"
1991 [ "$CFG_QCONFIG" = $c ] && break
1995 # not known to be sufficient for anything
1996 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
1997 echo >&2 "Error: configuration file not found:"
1998 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2000 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2005 #-------------------------------------------------------------------------------
2006 # build tree initialization
2007 #-------------------------------------------------------------------------------
2009 # where to find which..
2010 unixtests="$relpath/config.tests/unix"
2011 mactests="$relpath/config.tests/mac"
2012 WHICH="$unixtests/which.test"
2014 PERL=`$WHICH perl 2>/dev/null`
2016 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2018 for e in gawk nawk awk; do
2019 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2026 PERL="/usr/bin/perl"
2027 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2031 ### skip this if the user just needs help...
2032 if [ "$OPT_HELP" != "yes" ]; then
2034 # is this a shadow build?
2035 if [ "$OPT_SHADOW" = "maybe" ]; then
2037 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2038 if [ -h "$outpath" ]; then
2039 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2045 if [ "$OPT_SHADOW" = "yes" ]; then
2046 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2047 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2048 echo >&2 "Cannot proceed."
2051 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2054 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2056 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2057 echo "Qt can be built in release mode with separate debug information, so"
2058 echo "-debug-and-release is not necessary anymore"
2062 if [ "$CFG_SILENT" = "yes" ]; then
2063 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2066 # if the source tree is different from the build tree,
2067 # symlink or copy part of the sources
2068 if [ "$OPT_SHADOW" = "yes" ]; then
2069 echo "Preparing build tree..."
2071 if [ -z "$PERL" ]; then
2073 echo "You need perl in your PATH to make a shadow build."
2074 echo "Cannot proceed."
2078 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2080 # make a syncqt script that can be used in the shadow
2081 rm -f "$outpath/bin/syncqt"
2082 if [ -x "$relpath/bin/syncqt" ]; then
2083 mkdir -p "$outpath/bin"
2084 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2085 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2086 chmod 755 "$outpath/bin/syncqt"
2089 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2090 rm -f "$outpath/bin/$i"
2091 if [ -x "$relpath/bin/$i" ]; then
2092 mkdir -p "$outpath/bin"
2093 echo "#!/bin/sh" >"$outpath/bin/$i"
2094 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2095 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2096 chmod 755 "$outpath/bin/$i"
2100 # save a pre-existing mkspecs/modules dir
2101 test -d "$outpath/mkspecs/modules" && \
2102 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2104 # symlink the mkspecs directory
2105 mkdir -p "$outpath/mkspecs"
2106 rm -rf "$outpath"/mkspecs/*
2107 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2108 rm -f "$outpath/mkspecs/default"
2112 rm -rf "$outpath/mkspecs/$1"
2113 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2114 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2117 # Special case for mkspecs/features directory.
2118 # To be able to place .prf files into a shadow build directory,
2119 # we're creating links for files only. The directory structure is reproduced.
2120 ShadowMkspecs features
2122 # The modules dir is special, too.
2123 if test -d "$outpath/mkspecs-modules"; then
2124 rm -rf "$outpath/mkspecs/modules"
2125 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2127 ShadowMkspecs modules
2130 # symlink the doc directory
2131 rm -rf "$outpath/doc"
2132 ln -s "$relpath/doc" "$outpath/doc"
2135 # symlink fonts to be able to run application from build directory
2136 if [ ! -d "${outpath}/lib/fonts" ]; then
2137 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2138 mkdir -p "${outpath}/lib"
2139 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2143 if [ "$OPT_FAST" = "auto" ]; then
2144 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2151 # find a make command
2152 if [ -z "$MAKE" ]; then
2154 for mk in gmake make; do
2155 if "$WHICH" $mk >/dev/null 2>&1; then
2160 if [ -z "$MAKE" ]; then
2161 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2162 echo >&2 "Cannot proceed."
2165 # export MAKE, we need it later in the config.tests
2171 #-------------------------------------------------------------------------------
2172 # auto-detect all that hasn't been specified in the arguments
2173 #-------------------------------------------------------------------------------
2175 if [ -z "$PLATFORM" ]; then
2177 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2179 OSX_VERSION=`uname -r | cut -d. -f1`
2180 if [ "$OSX_VERSION" -ge 11 ]; then
2181 # We're on Lion or above. Check if we have a supported Clang version
2182 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2185 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2197 #PLATFORM=aix-g++-64
2199 #PLATFORM=aix-xlc-64
2201 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2211 # PLATFORM=dynix-g++
2217 PLATFORM=freebsd-g++
2219 - Also available for FreeBSD: freebsd-icc
2223 PLATFORM=openbsd-g++
2234 #PLATFORM=irix-cc-64
2236 - Also available for IRIX: irix-g++ irix-cc-64
2240 case "$UNAME_MACHINE" in
2242 #PLATFORM=hpuxi-acc-32
2243 PLATFORM=hpuxi-acc-64
2245 - Also available for HP-UXi: hpuxi-acc-32
2251 #PLATFORM=hpux-acc-64
2253 #PLATFORM=hpux-acc-o64
2255 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2264 - Also available for Tru64: tru64-g++
2268 case "$UNAME_MACHINE" in
2270 PLATFORM=linux-g++-64
2277 - Also available for Linux: linux-kcc linux-icc linux-cxx
2281 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2282 PLATFORM="solaris-g++"
2284 #PLATFORM=solaris-g++
2286 #PLATFORM=solaris-cc64
2289 - Also available for Solaris: solaris-g++ solaris-cc-64
2292 ReliantUNIX-*:*|SINIX-*:*)
2293 PLATFORM=reliant-cds
2294 #PLATFORM=reliant-cds-64
2296 - Also available for Reliant UNIX: reliant-cds-64
2306 #PLATFORM=unixware-g++
2307 PLATFORM=unixware-cc
2309 - Also available for OpenUNIX: unixware-g++
2313 #PLATFORM=unixware-g++
2314 PLATFORM=unixware-cc
2316 - Also available for UnixWare: unixware-g++
2323 - Also available for SCO OpenServer: sco-g++
2327 PLATFORM=unixware-g++
2330 PLATFORM=unsupported/qnx-g++
2333 if [ "$OPT_HELP" != "yes" ]; then
2335 for p in $PLATFORMS; do
2336 echo " $relconf $* -platform $p"
2339 echo " The build script does not currently recognize all" >&2
2340 echo " platforms supported by Qt." >&2
2341 echo " Rerun this script with a -platform option listed to" >&2
2342 echo " set the system/compiler combination you use." >&2
2349 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2351 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2353 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2354 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2356 if [ -d "$PLATFORM" ]; then
2357 QMAKESPEC="$PLATFORM"
2359 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2361 if [ -d "$XPLATFORM" ]; then
2362 XQMAKESPEC="$XPLATFORM"
2364 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2366 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2367 QT_CROSS_COMPILE=yes
2368 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2369 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2372 if [ "$BUILD_ON_MAC" = "yes" ]; then
2373 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2375 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2376 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2377 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2378 echo " built with 'macx-g++'" >&2
2384 # check specified platforms are supported
2385 if [ '!' -d "$QMAKESPEC" ]; then
2387 echo " The specified system/compiler is not supported:"
2391 echo " Please see the README file for a complete list."
2395 if [ '!' -d "$XQMAKESPEC" ]; then
2397 echo " The specified system/compiler is not supported:"
2401 echo " Please see the README file for a complete list."
2405 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2407 echo " The specified system/compiler port is not complete:"
2409 echo " $XQMAKESPEC/qplatformdefs.h"
2411 echo " Please contact qt-info@nokia.com."
2416 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2417 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2418 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2419 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2420 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2424 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2425 case `basename "$XPLATFORM"` in
2428 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2430 echo "Please contact qt-info@nokia.com to upgrade your license to"
2431 echo "include this platform, or install the Qt Open Source Edition"
2432 echo "if you intend to develop free software."
2438 #-------------------------------------------------------------------------------
2439 # write out device config before we run the test.
2440 #-------------------------------------------------------------------------------
2441 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
2442 rm -f "$DEVICE_VARS_FILE"
2444 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
2447 #-------------------------------------------------------------------------------
2448 # tests that don't need qmake (must be run before displaying help)
2449 #-------------------------------------------------------------------------------
2451 # detect build style
2452 if [ "$CFG_DEBUG" = "auto" ]; then
2453 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2454 CFG_DEBUG_RELEASE=yes
2456 elif [ "$CFG_DEV" = "yes" ]; then
2457 CFG_DEBUG_RELEASE=no
2460 CFG_DEBUG_RELEASE=no
2464 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2465 QT_CONFIG="$QT_CONFIG build_all"
2468 if [ -z "$PKG_CONFIG" ]; then
2469 # See if PKG_CONFIG is set in the mkspec:
2470 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2472 if [ -z "$PKG_CONFIG" ]; then
2473 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2476 # Work out if we can use pkg-config
2477 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2478 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2480 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2481 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2482 echo >&2 "environment!"
2484 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2486 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2487 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2488 echo >&2 "This is probably not what you want."
2490 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2492 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2493 echo >&2 "been set. This means your toolchain's .pc files must contain"
2494 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2495 echo >&2 "tests are failing, please check these files."
2500 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2501 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2502 echo >&2 "dependencies"
2508 if [ ! -n "$PKG_CONFIG" ]; then
2509 QT_CONFIG="$QT_CONFIG no-pkg-config"
2512 # pass on $CFG_SDK to the configure tests.
2513 if [ '!' -z "$CFG_SDK" ]; then
2514 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2517 # find the default framework value
2518 if [ "$BUILD_ON_MAC" = "yes" ]; then
2519 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2520 CFG_FRAMEWORK="$CFG_SHARED"
2521 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2523 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2531 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2533 TEST_COMPILER=$QMAKE_CONF_COMPILER
2534 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2535 if [ -z "$TEST_COMPILER" ]; then
2536 echo "ERROR: Cannot set the compiler for the configuration tests"
2541 if [ -n "$CFG_SYSROOT" ]; then
2542 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2546 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2548 # auto-detect precompiled header support
2549 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2550 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2557 #auto-detect DWARF2 on the mac
2558 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2559 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2566 # auto-detect support for separate debug info in objcopy
2567 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2568 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2569 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2570 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2571 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2572 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2573 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2574 CFG_SEPARATE_DEBUG_INFO=no
2578 # binutils on HP-UX is buggy; default to no.
2579 CFG_SEPARATE_DEBUG_INFO=no
2582 CFG_SEPARATE_DEBUG_INFO=yes
2588 # auto-detect -fvisibility support
2589 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2590 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2591 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2592 echo "-reduce-exports was requested but this compiler does not support it"
2593 echo "Re-run configure with -v for more information"
2596 CFG_REDUCE_EXPORTS=no
2598 CFG_REDUCE_EXPORTS=yes
2602 # detect the availability of the -Bsymbolic-functions linker optimization
2603 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2604 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2605 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2606 echo "-reduce-relocations was requested but this compiler does not support it"
2607 echo "Re-run configure with -v for more information"
2610 CFG_REDUCE_RELOCATIONS=no
2612 CFG_REDUCE_RELOCATIONS=yes
2616 # auto-detect GNU make support
2617 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2621 # find the default framework value
2622 if [ "$BUILD_ON_MAC" = "yes" ]; then
2623 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2624 CFG_FRAMEWORK="$CFG_SHARED"
2625 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2627 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2635 #setup the build parts
2636 if [ -z "$CFG_BUILD_PARTS" ]; then
2637 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2639 # build tests by default, if a developer build
2640 if [ "$CFG_DEV" = "yes" ]; then
2641 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2644 # don't build tools by default when cross-compiling
2645 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2646 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2649 for nobuild in $CFG_NOBUILD_PARTS; do
2650 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2652 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2654 # echo "WARNING: libs is a required part of the build."
2656 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2659 #-------------------------------------------------------------------------------
2660 # post process QT_INSTALL_* variables
2661 #-------------------------------------------------------------------------------
2663 if [ -z "$QT_INSTALL_PREFIX" ]; then
2664 if [ "$CFG_DEV" = "yes" ]; then
2665 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2667 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2670 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2672 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2673 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2674 if [ "$BUILD_ON_MAC" = "yes" ]; then
2675 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2678 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2681 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2683 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2684 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2685 if [ "$BUILD_ON_MAC" = "yes" ]; then
2686 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2691 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2694 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2696 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2697 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2698 if [ "$BUILD_ON_MAC" = "yes" ]; then
2699 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2700 QT_INSTALL_LIBS="/Libraries/Frameworks"
2704 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2706 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2708 if [ -z "$QT_INSTALL_BINS" ]; then #default
2709 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2710 if [ "$BUILD_ON_MAC" = "yes" ]; then
2711 QT_INSTALL_BINS="/Developer/Applications/Qt"
2714 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2716 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2718 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2719 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2720 if [ "$BUILD_ON_MAC" = "yes" ]; then
2721 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2724 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2726 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2728 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2729 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2730 if [ "$BUILD_ON_MAC" = "yes" ]; then
2731 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2734 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2736 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2738 if [ -z "$QT_INSTALL_DATA" ]; then #default
2739 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2741 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2743 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2744 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2746 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2748 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2749 if [ "$BUILD_ON_MAC" = "yes" ]; then
2750 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2752 QT_INSTALL_SETTINGS=/etc/xdg
2755 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2757 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2758 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2759 if [ "$BUILD_ON_MAC" = "yes" ]; then
2760 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2763 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2765 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2768 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2769 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2770 if [ "$BUILD_ON_MAC" = "yes" ]; then
2771 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2774 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2776 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2778 #------- host paths --------
2780 if [ -z "$QT_HOST_PREFIX" ]; then
2781 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2784 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2788 if [ -z "$QT_HOST_BINS" ]; then #default
2790 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2791 if [ "$BUILD_ON_MAC" = "yes" ]; then
2792 QT_HOST_BINS="/Developer/Applications/Qt"
2795 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2797 QT_HOST_BINS="$QT_INSTALL_BINS"
2800 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2802 if [ -z "$QT_HOST_DATA" ]; then #default
2804 QT_HOST_DATA="$QT_HOST_PREFIX"
2806 QT_HOST_DATA="$QT_INSTALL_DATA"
2809 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2812 #-------------------------------------------------------------------------------
2813 # help - interactive parts of the script _after_ this section please
2814 #-------------------------------------------------------------------------------
2816 # next, emit a usage message if something failed.
2817 if [ "$OPT_HELP" = "yes" ]; then
2818 [ "x$ERROR" = "xyes" ] && echo
2819 if [ "$CFG_NIS" = "no" ]; then
2826 if [ "$CFG_CUPS" = "no" ]; then
2833 if [ "$CFG_ICONV" = "no" ]; then
2840 if [ "$CFG_LARGEFILE" = "no" ]; then
2847 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
2854 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2862 if [ "$CFG_XCB" = "no" ]; then
2870 if [ "$CFG_EGLFS" = "no" ]; then
2878 if [ "$CFG_XINPUT2" = "no" ]; then
2886 if [ "$CFG_DBUS" = "no" ]; then
2894 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2902 if [ "$CFG_GLIB" = "no" ]; then
2911 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2912 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2913 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2914 [-release] [-debug] [-debug-and-release]
2915 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2916 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2917 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
2918 [-plugin-sql-<driver>] [-system-sqlite]
2919 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2920 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2921 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2922 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2923 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2924 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2925 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
2926 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2927 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2928 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2929 [-no-audio-backend] [-audio-backend]
2930 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2931 [-no-optimized-qmake] [-optimized-qmake]
2932 [-no-openssl] [-openssl] [-openssl-linked]
2933 [-no-gtkstyle] [-gtkstyle]
2934 [-qt-pcre] [-system-pcre]
2935 [-device <name>] [-device-option <key=value>]
2936 [additional platform specific options (see below)]
2939 Installation options:
2941 These are optional, but you may specify install directories.
2943 -prefix <dir> ...... This will install everything relative to <dir>
2944 (default $QT_INSTALL_PREFIX)
2946 -hostprefix [dir] .. Tools and libraries needed when developing
2947 applications are installed in [dir]. If [dir] is
2948 not given, the current build directory will be used.
2951 * -prefix-install .... Force a sandboxed "local" installation of
2952 Qt. This will install into
2953 $QT_INSTALL_PREFIX, if this option is
2954 disabled then some platforms will attempt a
2955 "system" install by placing default values to
2956 be placed in a system location other than
2959 You may use these to separate different parts of the install:
2961 -bindir <dir> ......... Executables will be installed to <dir>
2962 (default PREFIX/bin)
2963 -libdir <dir> ......... Libraries will be installed to <dir>
2964 (default PREFIX/lib)
2965 -docdir <dir> ......... Documentation will be installed to <dir>
2966 (default PREFIX/doc)
2967 -headerdir <dir> ...... Headers will be installed to <dir>
2968 (default PREFIX/include)
2969 -plugindir <dir> ...... Plugins will be installed to <dir>
2970 (default PREFIX/plugins)
2971 -importdir <dir> ...... Imports for QML will be installed to <dir>
2972 (default PREFIX/imports)
2973 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2975 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2976 (default PREFIX/translations)
2977 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2978 (default PREFIX/etc/settings)
2979 -examplesdir <dir> .... Examples will be installed to <dir>
2980 (default PREFIX/examples)
2981 -testsdir <dir> ....... Tests will be installed to <dir>
2982 (default PREFIX/tests)
2984 -hostbindir <dir> .. Host executables will be installed to <dir>
2985 (default HOSTPREFIX/bin)
2986 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2987 (default HOSTPREFIX)
2991 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2992 that needs to be evaluated. If the evaluation succeeds, the feature is
2993 included. Here is a short explanation of each option:
2995 * -release ........... Compile and link Qt with debugging turned off.
2996 -debug ............. Compile and link Qt with debugging turned on.
2997 -debug-and-release . Compile and link two versions of Qt, with and without
2998 debugging turned on (Mac only).
3000 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3002 -opensource ........ Compile and link the Open-Source Edition of Qt.
3003 -commercial ........ Compile and link the Commercial Edition of Qt.
3006 * -shared ............ Create and use shared Qt libraries.
3007 -static ............ Create and use static Qt libraries.
3009 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3011 -fast .............. Configure Qt quickly by generating Makefiles only for
3012 library and subdirectory targets. All other Makefiles
3013 are created as wrappers, which will in turn run qmake.
3015 -no-largefile ...... Disables large file support.
3016 + -largefile ......... Enables Qt to access files larger than 4 GB.
3018 -no-exceptions ..... Disable exceptions on compilers that support it.
3019 * -exceptions ........ Enable exceptions on compilers that support it.
3021 -no-accessibility .. Do not compile Accessibility support.
3022 * -accessibility ..... Compile Accessibility support.
3024 $SHN -no-stl ............ Do not compile STL support.
3025 $SHY -stl ............... Compile STL support.
3027 -no-sql-<driver> ... Disable SQL <driver> entirely.
3028 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3030 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3033 Possible values for <driver>:
3034 [ $CFG_SQL_AVAILABLE ]
3036 -system-sqlite ..... Use sqlite from the operating system.
3038 -no-phonon-backend.. Do not build the platform phonon plugin.
3039 + -phonon-backend..... Build the platform phonon plugin.
3041 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3042 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3044 -no-qml-debug ...... Do not build the in-process QML debugging support.
3045 + -qml-debug ......... Build the QML debugging support.
3047 -platform target ... The operating system and compiler you are building
3050 See the README file for a list of supported
3051 operating systems and compilers.
3053 -no-mmx ............ Do not compile with use of MMX instructions.
3054 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3055 -no-sse ............ Do not compile with use of SSE instructions.
3056 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3057 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3058 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3059 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3060 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3061 -no-avx ............ Do not compile with use of AVX instructions.
3062 -no-neon ........... Do not compile with use of NEON instructions.
3063 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3064 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3066 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3067 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3069 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3071 -D <string> ........ Add an explicit define to the preprocessor.
3072 -I <string> ........ Add an explicit include path.
3073 -L <string> ........ Add an explicit library path.
3075 -help, -h .......... Display this information.
3077 Third Party Libraries:
3079 -qt-zlib ........... Use the zlib bundled with Qt.
3080 + -system-zlib ....... Use zlib from the operating system.
3081 See http://www.gzip.org/zlib
3083 -no-gif ............ Do not compile GIF reading support.
3085 -no-libpng ......... Do not compile PNG support.
3086 -qt-libpng ......... Use the libpng bundled with Qt.
3087 + -system-libpng ..... Use libpng from the operating system.
3088 See http://www.libpng.org/pub/png
3090 -no-libjpeg ........ Do not compile JPEG support.
3091 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3092 + -system-libjpeg .... Use libjpeg from the operating system.
3093 See http://www.ijg.org
3095 -no-openssl ........ Do not compile support for OpenSSL.
3096 + -openssl ........... Enable run-time OpenSSL support.
3097 -openssl-linked .... Enabled linked OpenSSL support.
3099 -qt-pcre ........... Use the PCRE library bundled with Qt.
3100 + -system-pcre ....... Use the PCRE library from the operating system.
3104 -make <part> ....... Add part to the list of parts to be built at make time.
3105 ($QT_DEFAULT_BUILD_PARTS)
3106 -nomake <part> ..... Exclude part from the list of parts to be built.
3108 -R <string> ........ Add an explicit runtime library path to the Qt
3110 -l <string> ........ Add an explicit library.
3112 -no-rpath .......... Do not use the library install path as a runtime
3114 + -rpath ............. Link Qt libraries and executables using the library
3115 install path as a runtime library path. Equivalent
3116 to -R install_libpath
3118 -continue .......... Continue as far as possible if an error occurs.
3120 -verbose, -v ....... Print verbose information about each step of the
3123 -silent ............ Reduce the build output so that warnings and errors
3124 can be seen more easily.
3126 * -no-optimized-qmake ... Do not build qmake optimized.
3127 -optimized-qmake ...... Build qmake optimized.
3129 -no-gui ............ Don't build the Qt GUI library
3131 $NSN -no-nis ............ Do not compile NIS support.
3132 $NSY -nis ............... Compile NIS support.
3134 $CUN -no-cups ........... Do not compile CUPS support.
3135 $CUY -cups .............. Compile CUPS support.
3136 Requires cups/cups.h and libcups.so.2.
3138 $CIN -no-iconv .......... Do not compile support for iconv(3).
3139 $CIY -iconv ............. Compile support for iconv(3).
3141 $PHN -no-pch ............ Do not use precompiled header support.
3142 $PHY -pch ............... Use precompiled header support.
3144 $DBN -no-dbus ........... Do not compile the QtDBus module.
3145 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3146 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3148 -reduce-relocations ..... Reduce relocations in the libraries through extra
3149 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3150 experimental; needs GNU ld >= 2.18).
3152 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3154 -device <name> ............... Cross-compile for device <name> (experimental)
3155 -device-option <key=value> ... Add device specific options for the device mkspec
3158 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3159 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3161 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3162 $XCBY -xcb ............... Compile Xcb support.
3164 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3165 $EGLFSY -eglfs ............. Compile EGLFS support.
3167 -xplatform target ... The target platform when cross-compiling.
3169 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3171 -no-feature-<feature> Do not compile in <feature>.
3172 -feature-<feature> .. Compile in <feature>. The available features
3173 are described in src/corelib/global/qfeatures.txt
3175 -no-freetype ........ Do not compile in Freetype2 support.
3176 -qt-freetype ........ Use the libfreetype bundled with Qt.
3177 * -system-freetype .... Use libfreetype from the operating system.
3178 See http://www.freetype.org/
3180 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3181 default ($CFG_QCONFIG).
3183 -no-opengl .......... Do not support OpenGL.
3184 -opengl <api> ....... Enable OpenGL support
3185 With no parameter, this will attempt to auto-detect
3186 OpenGL ES 2, or regular desktop OpenGL.
3187 Use es2 for <api> to override auto-detection.
3189 $GBN -no-glib ........... Do not compile Glib support.
3190 $GBY -glib .............. Compile Glib support.
3193 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3196 $X2N -no-xinput2......... Do not compile XInput2 support.
3197 $X2Y -xinput2............ Compile XInput2 support.
3203 if [ "$BUILD_ON_MAC" = "yes" ]; then
3208 -Fstring ........... Add an explicit framework path.
3209 -fw string ......... Add an explicit framework.
3211 * -framework ......... Build Qt as a series of frameworks and
3212 link tools against those frameworks.
3213 -no-framework ...... Do not build Qt as a series of frameworks.
3215 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3216 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3218 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3219 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3221 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3222 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3223 QT_ENABLE_HARFBUZZ environment variable.
3228 [ "x$ERROR" = "xyes" ] && exit 1
3233 # -----------------------------------------------------------------------------
3234 # LICENSING, INTERACTIVE PART
3235 # -----------------------------------------------------------------------------
3238 echo "This is the Qt ${EditionString} Edition."
3241 if [ "$Edition" = "OpenSource" ]; then
3243 echo "You are licensed to use this software under the terms of"
3244 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3245 if [ -f "$relpath/LICENSE.GPL3" ]; then
3246 echo "You are also licensed to use this software under the terms of"
3247 echo "the GNU General Public License (GPL) versions 3."
3253 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3254 echo "You have already accepted the terms of the $LicenseType license."
3257 if [ -f "$relpath/LICENSE.GPL3" ]; then
3258 echo "Type '3' to view the GNU General Public License version 3."
3260 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3261 echo "Type 'yes' to accept this license offer."
3262 echo "Type 'no' to decline this license offer."
3264 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3268 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3270 elif [ "$acceptance" = "no" ]; then
3271 echo "You are not licensed to use this software."
3274 elif [ "$acceptance" = "3" ]; then
3275 more "$relpath/LICENSE.GPL3"
3276 elif [ "$acceptance" = "L" ]; then
3277 more "$relpath/LICENSE.LGPL"
3280 elif [ "$Edition" = "Preview" ]; then
3281 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3284 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3285 echo "You have already accepted the terms of the $LicenseType license."
3288 echo "You are licensed to use this software under the terms of"
3289 echo "the $TheLicense"
3291 echo "Type '?' to read the Preview License."
3292 echo "Type 'yes' to accept this license offer."
3293 echo "Type 'no' to decline this license offer."
3295 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3299 if [ "$acceptance" = "yes" ]; then
3301 elif [ "$acceptance" = "no" ] ;then
3302 echo "You are not licensed to use this software."
3305 elif [ "$acceptance" = "?" ]; then
3306 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3309 elif [ "$Edition" != "OpenSource" ]; then
3310 if [ -n "$ExpiryDate" ]; then
3311 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3312 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3313 Today=`date +%Y%m%d`
3314 if [ "$Today" -gt "$ExpiryDate" ]; then
3315 case "$LicenseType" in
3316 Commercial|Academic|Educational)
3317 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3319 echo "NOTICE NOTICE NOTICE NOTICE"
3321 echo " Your support and upgrade period has expired."
3323 echo " You are no longer licensed to use this version of Qt."
3324 echo " Please contact qt-info@nokia.com to renew your support"
3325 echo " and upgrades for this license."
3327 echo "NOTICE NOTICE NOTICE NOTICE"
3332 echo "WARNING WARNING WARNING WARNING"
3334 echo " Your support and upgrade period has expired."
3336 echo " You may continue to use your last licensed release"
3337 echo " of Qt under the terms of your existing license"
3338 echo " agreement. But you are not entitled to technical"
3339 echo " support, nor are you entitled to use any more recent"
3340 echo " Qt releases."
3342 echo " Please contact qt-info@nokia.com to renew your"
3343 echo " support and upgrades for this license."
3345 echo "WARNING WARNING WARNING WARNING"
3352 echo "NOTICE NOTICE NOTICE NOTICE"
3354 echo " Your Evaluation license has expired."
3356 echo " You are no longer licensed to use this software. Please"
3357 echo " contact qt-info@nokia.com to purchase license, or install"
3358 echo " the Qt Open Source Edition if you intend to develop free"
3361 echo "NOTICE NOTICE NOTICE NOTICE"
3368 TheLicense=`head -n 1 "$outpath/LICENSE"`
3370 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3371 echo "You have already accepted the terms of the $TheLicense."
3374 echo "You are licensed to use this software under the terms of"
3375 echo "the $TheLicense."
3377 echo "Type '?' to view the $TheLicense."
3378 echo "Type 'yes' to accept this license offer."
3379 echo "Type 'no' to decline this license offer."
3381 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3385 if [ "$acceptance" = "yes" ]; then
3387 elif [ "$acceptance" = "no" ]; then
3388 echo "You are not licensed to use this software."
3391 else [ "$acceptance" = "?" ]
3392 more "$outpath/LICENSE"
3397 # this should be moved somewhere else
3400 AIX_VERSION=`uname -v`
3401 if [ "$AIX_VERSION" -lt "5" ]; then
3402 QMakeVar add QMAKE_LIBS_X11 -lbind
3409 #-------------------------------------------------------------------------------
3410 # generate qconfig.cpp
3411 #-------------------------------------------------------------------------------
3412 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3414 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3416 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3417 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3419 /* Installation date */
3420 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3422 /* Installation Info */
3423 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3424 "qt_prfxpath=$QT_INSTALL_PREFIX",
3425 "qt_docspath=$QT_INSTALL_DOCS",
3426 "qt_hdrspath=$QT_INSTALL_HEADERS",
3427 "qt_libspath=$QT_INSTALL_LIBS",
3428 "qt_binspath=$QT_INSTALL_BINS",
3429 "qt_plugpath=$QT_INSTALL_PLUGINS",
3430 "qt_impspath=$QT_INSTALL_IMPORTS",
3431 "qt_datapath=$QT_INSTALL_DATA",
3432 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3433 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3434 "qt_tstspath=$QT_INSTALL_TESTS",
3435 #ifdef QT_BUILD_QMAKE
3436 "qt_ssrtpath=$CFG_SYSROOT",
3437 "qt_hpfxpath=$QT_HOST_PREFIX",
3438 "qt_hbinpath=$QT_HOST_BINS",
3439 "qt_hdatpath=$QT_HOST_DATA",
3442 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3445 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3447 /* strlen( "qt_lcnsxxxx" ) == 12 */
3448 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3449 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3451 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3454 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3455 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3456 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3458 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3459 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3460 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3463 # -----------------------------------------------------------------------------
3464 if [ "$LicenseType" = "Evaluation" ]; then
3465 EVALKEY=qt_qevalkey=$LicenseKeyExt
3466 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3467 EVALKEY=qt_qevalkey=
3470 if [ -n "$EVALKEY" ]; then
3471 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3472 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3473 /* Evaluation license key */
3474 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3476 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3480 # -----------------------------------------------------------------------------
3482 # -----------------------------------------------------------------------------
3485 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3487 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3488 if [ "$OPT_SHADOW" = "yes" ]; then
3489 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3490 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3491 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3495 # $1: input variable name (awk regexp)
3496 # $2: optional output variable name
3497 # $3: optional value transformation (sed command)
3498 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3499 # is where the resulting variable is written to
3500 setBootstrapVariable()
3502 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3506 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3507 echo "Creating qmake. Please wait..."
3510 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3511 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3512 if [ -f "$QCONFIG_H" ]; then
3513 OLD_QCONFIG_H=$QCONFIG_H
3514 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3517 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3518 # when building qmake, we use #defines for the install paths,
3519 # however they are real functions in the library
3520 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3521 mkdir -p "$outpath/src/corelib/global"
3522 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3523 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3526 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3528 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3529 rm -rf mkspecs/default
3530 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3531 mkdir -p "$outpath/qmake" || exit
3533 for mkfile in GNUmakefile Makefile; do
3536 in_mkfile="${mkfile}.in"
3537 if [ "$mkfile" = "Makefile" ]; then
3538 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3539 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3541 in_mkfile="${mkfile}.unix"
3543 in_mkfile="$relpath/qmake/$in_mkfile"
3544 mkfile="$outpath/qmake/$mkfile"
3545 if [ -f "$mkfile" ]; then
3546 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3549 [ -f "$in_mkfile" ] || continue
3551 echo "########################################################################" > "$mkfile"
3552 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3553 echo "########################################################################" >> "$mkfile"
3556 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3557 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3558 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3560 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3561 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3564 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3565 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3566 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3567 setBootstrapVariable QMAKE_CFLAGS
3568 setBootstrapVariable QMAKE_CXXFLAGS
3569 setBootstrapVariable QMAKE_LFLAGS
3571 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3572 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3573 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3575 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3576 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3577 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3578 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3579 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3580 elif [ "$CFG_DEBUG" = "yes" ]; then
3581 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3582 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3583 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3584 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3587 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3588 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3589 for rpath in $RPATH_FLAGS; do
3590 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3593 if [ "$BUILD_ON_MAC" = "yes" ]; then
3594 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3595 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3596 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3597 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3598 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3599 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3600 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3601 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3602 if [ '!' -z "$CFG_SDK" ]; then
3603 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3604 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3605 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3606 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3607 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3610 if [ '!' -z "$D_FLAGS" ]; then
3611 for DEF in $D_FLAGS; do
3612 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3615 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3616 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3617 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3618 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3620 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3621 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3622 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3623 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3624 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3625 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3626 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3627 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3628 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3629 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3631 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3632 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3633 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3634 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3639 QMAKE_BUILD_ERROR=no
3640 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3641 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3642 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3643 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3646 #-------------------------------------------------------------------------------
3647 # tests that need qmake
3648 #-------------------------------------------------------------------------------
3650 #-------------------------------------------------------------------------------
3651 # determine the target and host architectures
3652 #-------------------------------------------------------------------------------
3654 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3655 CFG_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3657 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3658 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3659 # Do the same test again, using the host compiler
3660 CFG_HOST_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3661 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3663 # not cross compiling, host == target
3664 CFG_HOST_ARCH="$CFG_ARCH"
3667 if [ "$OPT_VERBOSE" = "yes" ]; then
3668 echo "System architecture: '$CFG_ARCH'"
3669 echo "Host architecture: '$CFG_HOST_ARCH'"
3672 #-------------------------------------------------------------------------------
3673 # functionality tests
3674 #-------------------------------------------------------------------------------
3676 # detect availability of float math.h functions
3677 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3678 CFG_USE_FLOATMATH=yes
3680 CFG_USE_FLOATMATH=no
3683 # detect mmx support
3684 if [ "${CFG_MMX}" = "auto" ]; then
3685 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
3692 # detect 3dnow support
3693 if [ "${CFG_3DNOW}" = "auto" ]; then
3694 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
3701 # detect sse support
3702 if [ "${CFG_SSE}" = "auto" ]; then
3703 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
3710 # detect sse2 support
3711 if [ "${CFG_SSE2}" = "auto" ]; then
3712 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3719 # detect sse3 support
3720 if [ "${CFG_SSE3}" = "auto" ]; then
3721 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3728 # detect ssse3 support
3729 if [ "${CFG_SSSE3}" = "auto" ]; then
3730 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3737 # detect sse4.1 support
3738 if [ "${CFG_SSE4_1}" = "auto" ]; then
3739 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.1"; then
3746 # detect sse4.2 support
3747 if [ "${CFG_SSE4_2}" = "auto" ]; then
3748 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.2"; then
3755 # detect avx support
3756 if [ "${CFG_AVX}" = "auto" ]; then
3757 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
3764 # check iWMMXt support
3765 if [ "$CFG_IWMMXT" = "yes" ]; then
3766 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
3767 if [ $? != "0" ]; then
3768 echo "The iWMMXt functionality test failed!"
3769 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3774 # detect neon support
3775 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3776 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then
3781 elif [ "$CFG_ARCH" != "arm" ]; then
3785 # detect mips_dsp support
3786 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3792 # detect mips_dspr2 support
3793 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3799 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3802 if [ "$CFG_ZLIB" = "no" ]; then
3803 # Note: Qt no longer support builds without zlib
3804 # So we force a "no" to be "auto" here.
3805 # If you REALLY really need no zlib support, you can still disable
3806 # it by doing the following:
3807 # add "no-zlib" to mkspecs/qconfig.pri
3808 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3810 # There's no guarantee that Qt will build under those conditions
3815 if [ "$CFG_ZLIB" = "auto" ]; then
3816 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3823 if [ "$CFG_LARGEFILE" = "auto" ]; then
3824 #Large files should be enabled for all Linux systems
3828 if [ "$CFG_GUI" = "no" ]; then
3829 QPA_PLATFORM_GUARD=no
3832 # detect how jpeg should be built
3833 if [ "$CFG_JPEG" = "auto" ]; then
3834 if [ "$CFG_SHARED" = "yes" ]; then
3841 if [ "$CFG_LIBJPEG" = "auto" ]; then
3842 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libjpeg "libjpeg" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3849 # detect how gif should be built
3850 if [ "$CFG_GIF" = "auto" ]; then
3851 if [ "$CFG_SHARED" = "yes" ]; then
3859 if [ "$CFG_LIBPNG" = "auto" ]; then
3860 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libpng "libpng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3867 # detect accessibility
3868 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3869 CFG_ACCESSIBILITY=yes
3872 if [ "$CFG_EGLFS" = "yes" ]; then
3873 if [ "$CFG_EGL" = "no" ]; then
3874 echo "The EGLFS plugin requires EGL support and cannot be built"
3880 # auto-detect SQL-modules support
3881 for _SQLDR in $CFG_SQL_AVAILABLE; do
3884 if [ "$CFG_SQL_mysql" != "no" ]; then
3885 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3886 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3887 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3888 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3889 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3890 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3891 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3893 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3894 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3895 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3896 echo " You need MySql 4 or higher."
3897 echo " If you believe this message is in error you may use the continue"
3898 echo " switch (-continue) to $0 to continue."
3903 QT_LFLAGS_MYSQL_R=""
3907 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3908 QMakeVar add CONFIG use_libmysqlclient_r
3909 if [ "$CFG_SQL_mysql" = "auto" ]; then
3910 CFG_SQL_mysql=plugin
3912 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3913 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3914 if [ "$CFG_SQL_mysql" = "auto" ]; then
3915 CFG_SQL_mysql=plugin
3918 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3919 echo "MySQL support cannot be enabled due to functionality tests!"
3920 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3921 echo " If you believe this message is in error you may use the continue"
3922 echo " switch (-continue) to $0 to continue."
3927 QT_LFLAGS_MYSQL_R=""
3935 if [ "$CFG_SQL_psql" != "no" ]; then
3936 # Be careful not to use native pg_config when cross building.
3937 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
3938 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
3939 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
3941 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
3942 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
3943 # But, respect PSQL_LIBS if set
3944 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
3945 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3946 if [ "$CFG_SQL_psql" = "auto" ]; then
3950 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3951 echo "PostgreSQL support cannot be enabled due to functionality tests!"
3952 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3953 echo " If you believe this message is in error you may use the continue"
3954 echo " switch (-continue) to $0 to continue."
3965 if [ "$CFG_SQL_odbc" != "no" ]; then
3966 if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3967 if [ "$CFG_SQL_odbc" = "auto" ]; then
3971 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3972 QT_LFLAGS_ODBC="-liodbc"
3973 if [ "$CFG_SQL_odbc" = "auto" ]; then
3977 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3978 echo "ODBC support cannot be enabled due to functionality tests!"
3979 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3980 echo " If you believe this message is in error you may use the continue"
3981 echo " switch (-continue) to $0 to continue."
3991 if [ "$CFG_SQL_oci" != "no" ]; then
3992 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3993 if [ "$CFG_SQL_oci" = "auto" ]; then
3997 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3998 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
3999 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4000 echo " If you believe this message is in error you may use the continue"
4001 echo " switch (-continue) to $0 to continue."
4010 if [ "$CFG_SQL_tds" != "no" ]; then
4011 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4012 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4013 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4014 if [ "$CFG_SQL_tds" = "auto" ]; then
4018 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4019 echo "TDS support cannot be enabled due to functionality tests!"
4020 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4021 echo " If you believe this message is in error you may use the continue"
4022 echo " switch (-continue) to $0 to continue."
4031 if [ "$CFG_SQL_db2" != "no" ]; then
4032 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4033 if [ "$CFG_SQL_db2" = "auto" ]; then
4037 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4038 echo "ODBC support cannot be enabled due to functionality tests!"
4039 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4040 echo " If you believe this message is in error you may use the continue"
4041 echo " switch (-continue) to $0 to continue."
4050 if [ "$CFG_SQL_ibase" != "no" ]; then
4051 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4052 if [ "$CFG_SQL_ibase" = "auto" ]; then
4053 CFG_SQL_ibase=plugin
4056 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4057 echo "InterBase support cannot be enabled due to functionality tests!"
4058 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4059 echo " If you believe this message is in error you may use the continue"
4060 echo " switch (-continue) to $0 to continue."
4069 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4070 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4071 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4072 CFG_SQL_sqlite2=plugin
4075 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4076 echo "SQLite2 support cannot be enabled due to functionality tests!"
4077 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4078 echo " If you believe this message is in error you may use the continue"
4079 echo " switch (-continue) to $0 to continue."
4088 if [ "$CFG_SQL_sqlite" != "no" ]; then
4089 SQLITE_AUTODETECT_FAILED="no"
4090 if [ "$CFG_SQLITE" = "system" ]; then
4091 if [ -n "$PKG_CONFIG" ]; then
4092 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4093 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4095 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4096 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4097 CFG_SQL_sqlite=plugin
4099 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4101 SQLITE_AUTODETECT_FAILED="yes"
4104 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4105 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4106 CFG_SQL_sqlite=plugin
4109 SQLITE_AUTODETECT_FAILED="yes"
4113 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4114 echo "SQLite support cannot be enabled due to functionality tests!"
4115 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4116 echo " If you believe this message is in error you may use the continue"
4117 echo " switch (-continue) to $0 to continue."
4123 if [ "$OPT_VERBOSE" = "yes" ]; then
4124 echo "unknown SQL driver: $_SQLDR"
4130 # auto-detect NIS support
4131 if [ "$CFG_NIS" != "no" ]; then
4132 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4135 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4136 echo "NIS support cannot be enabled due to functionality tests!"
4137 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4138 echo " If you believe this message is in error you may use the continue"
4139 echo " switch (-continue) to $0 to continue."
4147 # auto-detect CUPS support
4148 if [ "$CFG_CUPS" != "no" ]; then
4149 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4152 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4153 echo "Cups support cannot be enabled due to functionality tests!"
4154 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4155 echo " If you believe this message is in error you may use the continue"
4156 echo " switch (-continue) to $0 to continue."
4164 # auto-detect iconv(3) support
4165 if [ "$CFG_ICONV" != "no" ]; then
4166 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4168 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4170 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/sun-libiconv" "SUN libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4172 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4175 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4176 echo "Iconv support cannot be enabled due to functionality tests!"
4177 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4178 echo " If you believe this message is in error you may use the continue"
4179 echo " switch (-continue) to $0 to continue."
4187 # auto-detect libdbus-1 support
4188 if [ "$CFG_DBUS" != "no" ]; then
4189 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4190 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4191 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4193 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then
4194 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4195 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4196 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4198 if [ "$CFG_DBUS" = "auto" ]; then
4200 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4201 # CFG_DBUS is "yes" or "linked" here
4203 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4204 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4205 echo " If you believe this message is in error you may use the continue"
4206 echo " switch (-continue) to $0 to continue."
4212 # auto-detect Glib support
4213 if [ "$CFG_GLIB" != "no" ]; then
4214 if [ -n "$PKG_CONFIG" ]; then
4215 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4216 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4218 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB; then
4220 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4221 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4223 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4224 echo "Glib support cannot be enabled due to functionality tests!"
4225 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4226 echo " If you believe this message is in error you may use the continue"
4227 echo " switch (-continue) to $0 to continue."
4236 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4237 if [ -n "$PKG_CONFIG" ]; then
4238 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4239 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4241 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER; then
4243 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4244 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4246 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4247 echo "Gstreamer support cannot be enabled due to functionality tests!"
4248 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4249 echo " If you believe this message is in error you may use the continue"
4250 echo " switch (-continue) to $0 to continue."
4256 elif [ "$CFG_GLIB" = "no" ]; then
4260 # auto-detect libicu support
4261 if [ "$CFG_ICU" != "no" ]; then
4262 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4263 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4265 if [ "$CFG_ICU" = "auto" ]; then
4267 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4270 echo "The ICU library support cannot be enabled."
4271 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4272 echo " If you believe this message is in error you may use the continue"
4273 echo " switch (-continue) to $0 to continue."
4279 # Auto-detect PulseAudio support
4280 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4281 if [ -n "$PKG_CONFIG" ]; then
4282 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4283 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4285 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO; then
4287 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4288 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4290 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4291 echo "PulseAudio support cannot be enabled due to functionality tests!"
4292 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4293 echo " If you believe this message is in error you may use the continue"
4294 echo " switch (-continue) to $0 to continue."
4303 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4304 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4305 if [ "$CFG_GUI" = "no" ]; then
4306 if [ "$CFG_OPENGL" = "auto" ]; then
4309 if [ "$CFG_OPENGL" != "no" ]; then
4310 echo "OpenGL enabled, but GUI disabled."
4311 echo " You might need to either enable the GUI or disable OpenGL"
4315 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4316 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4318 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
4321 if [ "$CFG_OPENGL" = "yes" ]; then
4322 echo "All the OpenGL functionality tests failed!"
4323 echo " You might need to modify the include and library search paths by editing"
4324 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4325 echo " ${XQMAKESPEC}."
4332 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4333 if [ "$CFG_OPENGL" = "desktop" ]; then
4334 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4335 if [ $? != "0" ]; then
4336 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4343 elif [ "$CFG_OPENGL" = "es2" ]; then
4345 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4346 if [ $? != "0" ]; then
4347 echo "The OpenGL ES 2.0 functionality test failed!"
4348 echo " You might need to modify the include and library search paths by editing"
4349 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4350 echo " ${XQMAKESPEC}."
4353 elif [ "$CFG_OPENGL" = "desktop" ]; then
4354 # Desktop OpenGL support
4355 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4356 if [ $? != "0" ]; then
4357 echo "The OpenGL functionality test failed!"
4358 echo " You might need to modify the include and library search paths by editing"
4359 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4360 echo " ${XQMAKESPEC}."
4365 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4366 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4367 if [ $? != "0" ]; then
4368 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4375 fi # X11/MINGW OpenGL
4377 if [ "$BUILD_ON_MAC" = "yes" ]; then
4378 if [ "$CFG_PHONON" != "no" ]; then
4379 # Always enable Phonon (unless it was explicitly disabled)
4383 if [ "$CFG_COREWLAN" = "auto" ]; then
4384 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/corewlan "CoreWlan" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4392 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4393 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4394 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4396 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
4399 if [ "$CFG_OPENGL" = "yes" ]; then
4400 echo "All the OpenGL functionality tests failed!"
4401 echo " You might need to modify the include and library search paths by editing"
4402 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4403 echo " ${XQMAKESPEC}."
4408 elif [ "$CFG_OPENGL" = "es2" ]; then
4410 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4411 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4412 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4413 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4414 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4415 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4416 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4417 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4420 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
4421 if [ $? != "0" ]; then
4422 echo "The OpenGL ES 2.0 functionality test failed!"
4423 echo " You might need to modify the include and library search paths by editing"
4424 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4425 echo " ${XQMAKESPEC}."
4428 elif [ "$CFG_OPENGL" = "desktop" ]; then
4429 # Desktop OpenGL support
4430 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4431 if [ $? != "0" ]; then
4432 echo "The OpenGL functionality test failed!"
4433 echo " You might need to modify the include and library search paths by editing"
4434 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4435 echo " ${XQMAKESPEC}."
4440 # auto-detect FontConfig support
4441 if [ "$CFG_FONTCONFIG" != "no" ]; then
4442 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4443 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4444 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4446 QT_CFLAGS_FONTCONFIG=
4447 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4449 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4450 QT_CONFIG="$QT_CONFIG fontconfig"
4451 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4452 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4453 CFG_LIBFREETYPE=system
4458 # Save these for a check later
4459 ORIG_CFG_XCB="$CFG_XCB"
4460 ORIG_CFG_EGLFS="$CFG_EGLFS"
4462 if [ "$CFG_LIBUDEV" != "no" ]; then
4463 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4464 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4465 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4466 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4467 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4469 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_INCDIR_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
4471 QT_CONFIG="$QT_CONFIG libudev"
4472 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4473 echo "The libudev functionality test failed!"
4477 QMakeVar add DEFINES QT_NO_LIBUDEV
4481 if [ "$CFG_EVDEV" != "no" ]; then
4482 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
4484 QT_CONFIG="$QT_CONFIG evdev"
4485 elif [ "$CFG_EVDEV" = "yes" ]; then
4486 echo "The evdev functionality test failed!"
4490 QMakeVar add DEFINES QT_NO_EVDEV
4494 # Check we actually have X11 :-)
4495 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS; then
4496 QT_CONFIG="$QT_CONFIG xlib"
4499 # auto-detect Xrender support
4500 if [ "$CFG_XRENDER" != "no" ]; then
4501 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS; then
4503 QT_CONFIG="$QT_CONFIG xrender"
4505 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4506 echo "Xrender support cannot be enabled due to functionality tests!"
4507 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4508 echo " If you believe this message is in error you may use the continue"
4509 echo " switch (-continue) to $0 to continue."
4517 if [ "$CFG_XCB" != "no" ]; then
4518 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4519 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4520 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4522 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4524 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4525 QT_CONFIG="$QT_CONFIG xcb-render"
4528 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4530 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4533 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4534 QT_CONFIG="$QT_CONFIG xcb-xlib"
4537 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4538 # auto-detect XInput2/Xinput support
4539 if [ "$CFG_XINPUT2" != "no" ]; then
4540 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4544 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4545 echo "XInput2 support cannot be enabled due to functionality tests!"
4546 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4547 echo " If you believe this message is in error you may use the continue"
4548 echo " switch (-continue) to $0 to continue."
4557 if [ "$CFG_XCB" = "yes" ]; then
4558 echo "The XCB test failed!"
4559 echo " You might need to install dependency packages."
4560 echo " See src/plugins/platforms/xcb/README."
4564 QMakeVar add DEFINES QT_NO_XCB
4568 # Detect libxkbcommon
4569 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4570 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4571 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4572 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4573 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4575 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4579 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4580 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4581 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4582 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4583 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4584 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4585 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4586 fi # detect EGL support
4587 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/qpa/egl" "EGL" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
4589 elif [ "$CFG_EGL" = "yes" ]; then
4590 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4591 echo " You might need to modify the include and library search paths by editing"
4592 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4597 elif [ "$CFG_OPENGL" = "desktop" ]; then
4598 if [ "$CFG_EGL" = "yes" ]; then
4599 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4600 echo "Either disable EGL support or enable OpenGL ES support."
4606 if [ "$CFG_EGLFS" != "no" ]; then
4607 CFG_EGLFS="$CFG_EGL"
4610 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4611 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4612 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4613 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4616 if [ "$BUILD_ON_MAC" = "yes" ]; then
4617 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4618 QT_CONFIG="$QT_CONFIG coreservices"
4620 QMakeVar add DEFINES QT_NO_CORESERVICES
4624 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
4625 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
4626 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4627 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
4628 echo "No QPA platform plugin enabled!"
4629 echo " If you really want to build without a QPA platform plugin you must pass"
4630 echo " -no-xcb and -no-eglfs to configure. Doing this will"
4631 echo " produce a Qt that cannot run GUI applications."
4632 echo " The dependencies needed for xcb to build are listed in"
4633 echo " src/plugins/platforms/xcb/README"
4639 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4642 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4643 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4644 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4645 CFG_LIBFREETYPE=system
4652 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4656 if [ "$CFG_STL" != "no" ]; then
4657 if [ "$HAVE_STL" = "yes" ]; then
4660 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4661 echo "STL support cannot be enabled due to functionality tests!"
4662 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4663 echo " If you believe this message is in error you may use the continue"
4664 echo " switch (-continue) to $0 to continue."
4672 # detect POSIX clock_gettime()
4673 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4674 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $l_FLAGS; then
4675 CFG_CLOCK_GETTIME=yes
4677 CFG_CLOCK_GETTIME=no
4681 # detect POSIX monotonic clocks
4682 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4683 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-monotonic "POSIX Monotonic Clock" $L_FLAGS $I_FLAGS $l_FLAGS; then
4684 CFG_CLOCK_MONOTONIC=yes
4686 CFG_CLOCK_MONOTONIC=no
4688 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4689 CFG_CLOCK_MONOTONIC=no
4693 if [ "$CFG_MREMAP" = "auto" ]; then
4694 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
4701 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4702 if [ "$CFG_GETADDRINFO" != "no" ]; then
4703 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
4706 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4707 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4708 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4709 echo " If you believe this message is in error you may use the continue"
4710 echo " switch (-continue) to $0 to continue."
4718 # find if the platform provides inotify
4719 if [ "$CFG_INOTIFY" != "no" ]; then
4720 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
4723 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4724 echo "inotify support cannot be enabled due to functionality tests!"
4725 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4726 echo " If you believe this message is in error you may use the continue"
4727 echo " switch (-continue) to $0 to continue."
4735 # find if the platform provides if_nametoindex (ipv6 interface name support)
4736 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4737 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6ifname "IPv6 interface name" $L_FLAGS $I_FLAGS $l_FLAGS; then
4740 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4741 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4742 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4743 echo " If you believe this message is in error you may use the continue"
4744 echo " switch (-continue) to $0 to continue."
4752 # find if the platform provides getifaddrs (network interface enumeration)
4753 if [ "$CFG_GETIFADDRS" != "no" ]; then
4754 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
4757 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4758 echo "getifaddrs support cannot be enabled due to functionality tests!"
4759 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4760 echo " If you believe this message is in error you may use the continue"
4761 echo " switch (-continue) to $0 to continue."
4770 if [ "$CFG_OPENSSL" != "no" ]; then
4771 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4772 if [ "$CFG_OPENSSL" = "auto" ]; then
4776 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4777 echo "OpenSSL support cannot be enabled due to functionality tests!"
4778 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4779 echo " If you believe this message is in error you may use the continue"
4780 echo " switch (-continue) to $0 to continue."
4789 if [ "$CFG_PCRE" != "qt" ]; then
4790 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
4793 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4794 echo "PCRE support cannot be enabled due to functionality tests!"
4795 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4796 echo " If you believe this message is in error you may use the continue"
4797 echo " switch (-continue) to $0 to continue."
4805 # detect OpenVG support
4806 if [ "$CFG_OPENVG" != "no" ]; then
4807 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4808 if [ "$CFG_OPENVG" = "auto" ]; then
4811 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4812 if [ "$CFG_OPENVG" = "auto" ]; then
4815 CFG_OPENVG_ON_OPENGL=yes
4816 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4817 if [ "$CFG_OPENVG" = "auto" ]; then
4820 CFG_OPENVG_LC_INCLUDES=yes
4821 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4822 if [ "$CFG_OPENVG" = "auto" ]; then
4825 CFG_OPENVG_LC_INCLUDES=yes
4826 CFG_OPENVG_ON_OPENGL=yes
4828 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4829 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4830 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4831 echo " If you believe this message is in error you may use the continue"
4832 echo " switch (-continue) to $0 to continue."
4838 if [ "$CFG_OPENVG" = "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4839 CFG_OPENVG_SHIVA=yes
4843 if [ "$CFG_ALSA" = "auto" ]; then
4844 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
4851 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4852 if [ "$CFG_ARCH" = "arm" ]; then
4853 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
4854 if [ $? != "0" ]; then
4855 CFG_JAVASCRIPTCORE_JIT=no
4858 case "$XPLATFORM" in
4860 CFG_JAVASCRIPTCORE_JIT=no
4866 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
4867 QMakeVar set JAVASCRIPTCORE_JIT yes
4868 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
4869 QMakeVar set JAVASCRIPTCORE_JIT no
4872 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
4873 CFG_AUDIO_BACKEND=yes
4876 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
4877 echo "Warning: largefile support cannot be disabled for win32."
4881 #-------------------------------------------------------------------------------
4882 # ask for all that hasn't been auto-detected or specified in the arguments
4883 #-------------------------------------------------------------------------------
4885 # enable dwarf2 support on Mac
4886 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
4887 QT_CONFIG="$QT_CONFIG dwarf2"
4890 # Detect the default arch (x86 or x86_64) on Mac OS X
4891 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
4893 case `file "${outpath}/bin/qmake"` in
4901 # unsupported/unknown
4905 if [ -n "$DEFAULT_ARCH" ]; then
4906 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
4907 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
4908 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
4909 # Make the application arch follow the Qt arch
4910 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
4915 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
4916 QT_CONFIG="$QT_CONFIG phonon-backend"
4919 # disable accessibility
4920 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
4921 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
4923 QT_CONFIG="$QT_CONFIG accessibility"
4927 if [ "$CFG_EGL" = "yes" ]; then
4928 QT_CONFIG="$QT_CONFIG egl"
4930 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
4934 if [ "$CFG_EGLFS" = "yes" ]; then
4935 QT_CONFIG="$QT_CONFIG eglfs"
4937 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
4941 if [ "$CFG_OPENVG" = "no" ]; then
4942 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
4944 QT_CONFIG="$QT_CONFIG openvg"
4945 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
4946 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
4948 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
4949 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
4951 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
4952 QT_CONFIG="$QT_CONFIG shivavg"
4953 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
4958 if [ "$CFG_OPENGL" = "no" ]; then
4959 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
4961 QT_CONFIG="$QT_CONFIG opengl"
4964 if [ "$CFG_OPENGL" = "es2" ]; then
4965 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
4968 if [ "$CFG_OPENGL" = "es2" ]; then
4969 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
4970 QT_CONFIG="$QT_CONFIG opengles2"
4973 # safe execution environment
4974 if [ "$CFG_SXE" != "no" ]; then
4975 QT_CONFIG="$QT_CONFIG sxe"
4978 # build up the variables for output
4979 if [ "$CFG_DEBUG" = "yes" ]; then
4980 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
4981 QMAKE_CONFIG="$QMAKE_CONFIG debug"
4982 elif [ "$CFG_DEBUG" = "no" ]; then
4983 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
4984 QMAKE_CONFIG="$QMAKE_CONFIG release"
4986 if [ "$CFG_SHARED" = "yes" ]; then
4987 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
4988 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
4989 elif [ "$CFG_SHARED" = "no" ]; then
4990 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
4991 QMAKE_CONFIG="$QMAKE_CONFIG static"
4994 #FIXME: qpa is implicit this should all be removed
4995 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
4996 QT_CONFIG="$QT_CONFIG qpa"
4997 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
4998 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5000 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5001 # Do not set this here for Windows. Let qmake do it so
5002 # debug and release precompiled headers are kept separate.
5003 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5005 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5006 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5007 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5008 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5009 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5010 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5012 if [ "$CFG_STL" = "no" ]; then
5013 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5015 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5017 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5018 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5020 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5021 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5022 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5023 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5024 QMakeVar add QMAKE_CFLAGS -g
5025 QMakeVar add QMAKE_CXXFLAGS -g
5026 QT_CONFIG="$QT_CONFIG separate_debug_info"
5028 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5029 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5031 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5032 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5033 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5034 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5035 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5036 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5037 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5038 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5039 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5040 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5041 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5042 if [ "$CFG_ARCH" = "mips" ]; then
5043 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5044 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5046 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5047 QT_CONFIG="$QT_CONFIG clock-gettime"
5049 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5050 QT_CONFIG="$QT_CONFIG clock-monotonic"
5052 if [ "$CFG_MREMAP" = "yes" ]; then
5053 QT_CONFIG="$QT_CONFIG mremap"
5055 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5056 QT_CONFIG="$QT_CONFIG getaddrinfo"
5058 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5059 QT_CONFIG="$QT_CONFIG ipv6ifname"
5061 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5062 QT_CONFIG="$QT_CONFIG getifaddrs"
5064 if [ "$CFG_INOTIFY" = "yes" ]; then
5065 QT_CONFIG="$QT_CONFIG inotify"
5067 if [ "$CFG_LIBJPEG" = "no" ]; then
5069 elif [ "$CFG_LIBJPEG" = "system" ]; then
5070 QT_CONFIG="$QT_CONFIG system-jpeg"
5072 if [ "$CFG_JPEG" = "no" ]; then
5073 QT_CONFIG="$QT_CONFIG no-jpeg"
5074 elif [ "$CFG_JPEG" = "yes" ]; then
5075 QT_CONFIG="$QT_CONFIG jpeg"
5077 if [ "$CFG_LIBPNG" = "no" ]; then
5080 if [ "$CFG_LIBPNG" = "system" ]; then
5081 QT_CONFIG="$QT_CONFIG system-png"
5083 if [ "$CFG_PNG" = "no" ]; then
5084 QT_CONFIG="$QT_CONFIG no-png"
5085 elif [ "$CFG_PNG" = "yes" ]; then
5086 QT_CONFIG="$QT_CONFIG png"
5088 if [ "$CFG_GIF" = "no" ]; then
5089 QT_CONFIG="$QT_CONFIG no-gif"
5090 elif [ "$CFG_GIF" = "yes" ]; then
5091 QT_CONFIG="$QT_CONFIG gif"
5093 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5094 QT_CONFIG="$QT_CONFIG no-freetype"
5095 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5096 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5097 QT_CONFIG="$QT_CONFIG system-freetype"
5099 QT_CONFIG="$QT_CONFIG freetype"
5101 if [ "$CFG_GUI" = "auto" ]; then
5104 if [ "$CFG_GUI" = "no" ]; then
5105 QT_CONFIG="$QT_CONFIG no-gui"
5108 if [ "$CFG_WIDGETS" = "no" ]; then
5109 QT_CONFIG="$QT_CONFIG no-widgets"
5110 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5113 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5114 #On Mac we implicitly link against libz, so we
5115 #never use the 3rdparty stuff.
5116 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5118 if [ "$CFG_ZLIB" = "yes" ]; then
5119 QT_CONFIG="$QT_CONFIG zlib"
5120 elif [ "$CFG_ZLIB" = "system" ]; then
5121 QT_CONFIG="$QT_CONFIG system-zlib"
5124 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5125 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5126 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5127 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5128 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5129 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5130 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5131 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5132 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5133 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5134 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5135 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5136 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5137 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5139 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5140 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5141 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5143 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5144 if [ "$CFG_RPATH" = "yes" ]; then
5145 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5146 # set the default rpath to the library installation directory
5147 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5149 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5150 if [ -n "$RPATH_FLAGS" ]; then
5152 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5156 elif [ "$CFG_RPATH" = "yes" ]; then
5157 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5161 if [ "$CFG_RPATH" = "yes" ]; then
5162 # set the default rpath to the library installation directory
5163 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5165 if [ -n "$RPATH_FLAGS" ]; then
5166 # add the user defined rpaths
5167 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5171 if [ '!' -z "$I_FLAGS" ]; then
5172 # add the user define include paths
5173 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5174 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5177 if [ '!' -z "$W_FLAGS" ]; then
5178 # add the user defined warning flags
5179 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5180 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5181 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5184 # turn off exceptions for the compilers that support it
5185 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5186 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5188 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5191 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5192 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5195 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5196 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5197 # Follow default behavior of configure.exe by overriding with "rtti".
5198 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5201 if [ "$CFG_ALSA" = "yes" ]; then
5202 QT_CONFIG="$QT_CONFIG alsa"
5205 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5206 QT_CONFIG="$QT_CONFIG pulseaudio"
5209 if [ "$CFG_COREWLAN" = "yes" ]; then
5210 QT_CONFIG="$QT_CONFIG corewlan"
5213 if [ "$CFG_ICU" = "yes" ]; then
5214 QT_CONFIG="$QT_CONFIG icu"
5217 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5218 QT_CONFIG="$QT_CONFIG force_asserts"
5221 if [ "$CFG_PCRE" = "qt" ]; then
5222 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5226 # Some Qt modules are too advanced in C++ for some old compilers
5227 # Detect here the platforms where they are known to work.
5229 # See Qt documentation for more information on which features are
5230 # supported and on which compilers.
5232 canBuildQtConcurrent="yes"
5233 canUseV8Snapshot="yes"
5235 case "$XPLATFORM" in
5237 # PA-RISC's assembly is too limited
5238 # gcc 3.4 on that platform can't build QtXmlPatterns
5239 # the assembly it generates cannot be compiled
5241 # Check gcc's version
5242 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5246 canBuildQtXmlPatterns="no"
5250 canBuildQtXmlPatterns="no"
5254 unsupported/vxworks-*-g++*)
5257 unsupported/vxworks-*-dcc*)
5259 canBuildQtXmlPatterns="no"
5262 # Check gcc's version
5263 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5271 canBuildQtXmlPatterns="no"
5276 # Check the compiler version
5277 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5280 canBuildQtXmlPatterns="no"
5281 canBuildQtConcurrent="no"
5285 canBuildQtConcurrent="no"
5291 canBuildQtXmlPatterns="no"
5292 canBuildQtConcurrent="no"
5298 # Get the xlC version
5299 cat > xlcver.c <<EOF
5303 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5308 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5309 xlcver=`./xlcver 2>/dev/null`
5312 if [ "$OPT_VERBOSE" = "yes" ]; then
5313 if [ -n "$xlcver" ]; then
5314 echo Found IBM xlC version: $xlcver.
5316 echo Could not determine IBM xlC version, assuming oldest supported.
5323 canBuildQtXmlPatterns="no"
5324 canBuildQtConcurrent="no"
5328 canBuildQtConcurrent="no"
5334 canBuildQtConcurrent="no"
5338 if [ "$CFG_GUI" = "no" ]; then
5339 # WebKit requires QtGui
5343 if [ "$CFG_SHARED" = "no" ]; then
5345 echo "WARNING: Using static linking will disable the WebKit module."
5350 CFG_CONCURRENT="yes"
5351 if [ "$canBuildQtConcurrent" = "no" ]; then
5352 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5355 QT_CONFIG="$QT_CONFIG concurrent"
5359 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5360 QT_CONFIG="$QT_CONFIG audio-backend"
5364 if [ "$CFG_WEBKIT" = "debug" ]; then
5365 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5369 QT_CONFIG="$QT_CONFIG v8"
5370 # Detect snapshot support
5371 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5372 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5375 *) canUseV8Snapshot="no"
5379 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5380 # QEMU crashes when building inside Scratchbox with an ARM target
5381 canUseV8Snapshot="no"
5384 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5385 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5387 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5388 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5391 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5392 QT_CONFIG="$QT_CONFIG v8snapshot"
5396 if [ "$CFG_QML_DEBUG" = "no" ]; then
5397 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5400 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5403 QMakeVar add QMAKE_CFLAGS -fno-exceptions
5404 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
5405 QMakeVar add QMAKE_LFLAGS -fno-exceptions
5410 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
5411 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
5412 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
5419 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
5425 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5427 case "$COMPILER_VERSION" in
5429 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5430 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5431 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5434 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5435 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5436 QT_GCC_PATCH_VERSION=0
5446 #-------------------------------------------------------------------------------
5447 # part of configuration information goes into qconfig.h
5448 #-------------------------------------------------------------------------------
5450 case "$CFG_QCONFIG" in
5452 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5455 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5456 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5457 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5458 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5459 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5460 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5462 echo "#endif" >>"$tmpconfig"
5466 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5470 # define QT_EDITION $QT_EDITION
5474 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5475 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5477 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5478 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5481 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5482 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5485 if [ "$BUILD_ON_MAC" = "yes" ]; then
5486 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5487 #if defined(__LP64__)
5488 # define QT_POINTER_SIZE 8
5490 # define QT_POINTER_SIZE 4
5494 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5495 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5498 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5499 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5500 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5504 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5506 if [ "$CFG_DEV" = "yes" ]; then
5507 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5510 # Add QPA to config.h
5511 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5513 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5514 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5517 # Add turned on SQL drivers
5518 for DRIVER in $CFG_SQL_AVAILABLE; do
5519 eval "VAL=\$CFG_SQL_$DRIVER"
5522 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5523 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5524 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5527 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5533 QMakeVar set sql-drivers "$SQL_DRIVERS"
5534 QMakeVar set sql-plugins "$SQL_PLUGINS"
5536 # Add other configuration options to the qconfig.h file
5537 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5538 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5539 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5540 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5541 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
5542 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5543 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5545 # X11/Unix/Mac only configs
5546 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5547 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5548 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5549 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5550 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5551 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5552 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5553 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5554 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5555 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5556 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5557 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5558 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5559 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5561 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5562 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5563 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5564 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5565 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5566 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5567 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5568 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5569 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5570 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5571 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5572 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5573 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5575 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5576 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5577 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5578 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5579 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5580 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5581 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5582 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5584 # sort QCONFIG_FLAGS for neatness if we can
5585 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5586 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5588 if [ -n "$QCONFIG_FLAGS" ]; then
5589 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5590 #ifndef QT_BOOTSTRAPPED
5593 for cfg in $QCONFIG_FLAGS; do
5594 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5595 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5596 # figure out define logic, so we can output the correct
5597 # ifdefs to override the global defines in a project
5599 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5600 # QT_NO_option can be forcefully turned on by QT_option
5601 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5602 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5603 # QT_option can be forcefully turned off by QT_NO_option
5604 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5607 if [ -z $cfgdNeg ]; then
5608 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5615 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5616 #if defined($cfgd) && defined($cfgdNeg)
5618 #elif !defined($cfgd) && !defined($cfgdNeg)
5625 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5626 #endif // QT_BOOTSTRAPPED
5631 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5632 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5633 #define QT_VISIBILITY_AVAILABLE
5638 if [ -n "$QT_LIBINFIX" ]; then
5639 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5640 #define QT_LIBINFIX "$QT_LIBINFIX"
5645 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5646 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5647 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5649 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5650 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5651 chmod -w "$outpath/src/corelib/global/qconfig.h"
5652 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5653 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5657 #-------------------------------------------------------------------------------
5658 # save configuration into qconfig.pri
5659 #-------------------------------------------------------------------------------
5660 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5661 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5662 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5663 if [ "$CFG_DEBUG" = "yes" ]; then
5664 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5665 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5666 QT_CONFIG="$QT_CONFIG release"
5668 QT_CONFIG="$QT_CONFIG debug"
5669 elif [ "$CFG_DEBUG" = "no" ]; then
5670 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5671 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5672 QT_CONFIG="$QT_CONFIG debug"
5674 QT_CONFIG="$QT_CONFIG release"
5676 if [ "$CFG_STL" = "yes" ]; then
5677 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
5679 if [ "$CFG_FRAMEWORK" = "no" ]; then
5680 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5682 QT_CONFIG="$QT_CONFIG qt_framework"
5683 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5685 if [ "$CFG_DEV" = "yes" ]; then
5686 QT_CONFIG="$QT_CONFIG private_tests"
5689 cat >>"$QTCONFIG.tmp" <<EOF
5691 CONFIG += $QTCONFIG_CONFIG
5693 QT_HOST_ARCH = $CFG_HOST_ARCH
5694 QT_EDITION = $Edition
5695 QT_CONFIG += $QT_CONFIG
5698 QT_VERSION = $QT_VERSION
5699 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5700 QT_MINOR_VERSION = $QT_MINOR_VERSION
5701 QT_PATCH_VERSION = $QT_PATCH_VERSION
5704 QT_LIBINFIX = $QT_LIBINFIX
5705 QT_NAMESPACE = $QT_NAMESPACE
5708 if [ -n "$CFG_SYSROOT" ]; then
5709 echo "# sysroot" >>"$QTCONFIG.tmp"
5710 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5711 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5712 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5713 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5714 echo "}" >> "$QTCONFIG.tmp"
5715 echo >> "$QTCONFIG.tmp"
5717 if [ -n "$RPATH_FLAGS" ]; then
5718 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5720 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5721 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5722 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5723 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5726 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5727 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5728 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5731 # replace qconfig.pri if it differs from the newly created temp file
5732 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5733 rm -f "$QTCONFIG.tmp"
5735 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5738 #-------------------------------------------------------------------------------
5739 # save configuration into qmodule.pri
5740 #-------------------------------------------------------------------------------
5741 QTMODULE="$outpath/mkspecs/qmodule.pri"
5743 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
5745 # Ensure we can link to uninistalled libraries
5746 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5747 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5749 if [ -n "$QT_CFLAGS_PSQL" ]; then
5750 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5752 if [ -n "$QT_LFLAGS_PSQL" ]; then
5753 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5755 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5756 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5758 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5759 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5761 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5762 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5764 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5765 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5767 if [ -n "$QT_LFLAGS_ODBC" ]; then
5768 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5770 if [ -n "$QT_LFLAGS_TDS" ]; then
5771 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5774 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5775 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5778 #dump in the OPENSSL_LIBS info
5779 if [ '!' -z "$OPENSSL_LIBS" ]; then
5780 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5781 elif [ "$CFG_OPENSSL" = "linked" ]; then
5782 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5785 #dump in the SDK info
5786 if [ '!' -z "$CFG_SDK" ]; then
5787 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5791 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5792 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5794 # replace qmodule.pri if it differs from the newly created temp file
5795 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5796 rm -f "$QTMODULE.tmp"
5798 mv -f "$QTMODULE.tmp" "$QTMODULE"
5801 #-------------------------------------------------------------------------------
5802 # save configuration into .qmake.cache
5803 #-------------------------------------------------------------------------------
5805 CACHEFILE="$outpath/.qmake.cache"
5806 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5807 cat >>"$CACHEFILE.tmp" <<EOF
5809 QT_SOURCE_TREE = \$\$quote($relpath)
5810 QT_BUILD_TREE = \$\$quote($outpath)
5811 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5813 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5814 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5815 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5817 include(\$\$PWD/mkspecs/qmodule.pri)
5818 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5822 #dump the qmake spec
5823 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5824 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5826 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5829 # replace .qmake.cache if it differs from the newly created temp file
5830 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5831 rm -f "$CACHEFILE.tmp"
5833 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5836 #-------------------------------------------------------------------------------
5837 # give feedback on configuration
5838 #-------------------------------------------------------------------------------
5839 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5843 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5846 This target is using the GNU C++ compiler ($PLATFORM).
5848 Recent versions of this compiler automatically include code for
5849 exceptions, which increase both the size of the Qt libraries and
5850 the amount of memory taken by your applications.
5852 You may choose to re-run `basename $0` with the -no-exceptions
5853 option to compile Qt without exceptions. This is completely binary
5854 compatible, and existing applications will continue to work.
5862 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5865 This target is using the MIPSpro C++ compiler ($PLATFORM).
5867 You may choose to re-run `basename $0` with the -no-exceptions
5868 option to compile Qt without exceptions. This will make the
5869 size of the Qt library smaller and reduce the amount of memory
5870 taken by your applications.
5882 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5883 echo "Build type: $PLATFORM"
5885 echo "Building on: $PLATFORM"
5886 echo "Building for: $XPLATFORM"
5889 echo "Architecture: $CFG_ARCH"
5890 echo "Host architecture: $CFG_HOST_ARCH"
5892 if [ -n "$PLATFORM_NOTES" ]; then
5893 echo "Platform notes:"
5894 echo "$PLATFORM_NOTES"
5899 if [ "$OPT_VERBOSE" = "yes" ]; then
5900 echo $ECHO_N "qmake vars .......... $ECHO_C"
5901 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5902 echo "qmake switches ......... $QMAKE_SWITCHES"
5905 echo "Build .................. $CFG_BUILD_PARTS"
5906 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5907 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5908 echo "Debug .................. yes (combined)"
5909 if [ "$CFG_DEBUG" = "yes" ]; then
5910 echo "Default Link ........... debug"
5912 echo "Default Link ........... release"
5915 echo "Debug .................. $CFG_DEBUG"
5917 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5918 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5919 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5920 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5921 echo "QtGui module ........... $CFG_GUI"
5922 echo "QtWidgets module ....... $CFG_WIDGETS"
5923 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5924 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5926 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5928 echo "QML debugging .......... $CFG_QML_DEBUG"
5929 echo "STL support ............ $CFG_STL"
5930 echo "PCH support ............ $CFG_PRECOMPILE"
5931 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5932 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
5933 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5934 echo "AVX..................... ${CFG_AVX}"
5935 elif [ "$CFG_ARCH" = "arm" ]; then
5936 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5937 echo "NEON support ........... ${CFG_NEON}"
5939 if [ "$CFG_ARCH" = "mips" ]; then
5940 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5942 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5943 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5944 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5945 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5946 echo "NIS support ............ $CFG_NIS"
5947 echo "CUPS support ........... $CFG_CUPS"
5948 echo "Iconv support .......... $CFG_ICONV"
5949 echo "Glib support ........... $CFG_GLIB"
5950 echo "GStreamer support ...... $CFG_GSTREAMER"
5951 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
5952 echo "Large File support ..... $CFG_LARGEFILE"
5953 echo "GIF support ............ $CFG_GIF"
5954 if [ "$CFG_JPEG" = "no" ]; then
5955 echo "JPEG support ........... $CFG_JPEG"
5957 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
5959 if [ "$CFG_PNG" = "no" ]; then
5960 echo "PNG support ............ $CFG_PNG"
5962 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
5964 echo "zlib support ........... $CFG_ZLIB"
5965 echo "Session management ..... $CFG_SM"
5966 echo "libudev support ........ $CFG_LIBUDEV"
5968 if [ "$CFG_OPENGL" = "desktop" ]; then
5969 echo "OpenGL support ......... yes (Desktop OpenGL)"
5970 elif [ "$CFG_OPENGL" = "es2" ]; then
5971 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
5973 echo "OpenGL support ......... no"
5976 if [ "$CFG_OPENVG" ]; then
5977 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5978 echo "OpenVG support ......... ShivaVG"
5980 echo "OpenVG support ......... $CFG_OPENVG"
5984 echo "XShape support ......... $CFG_XSHAPE"
5985 echo "XVideo support ......... $CFG_XVIDEO"
5986 echo "XSync support .......... $CFG_XSYNC"
5987 echo "Xinerama support ....... $CFG_XINERAMA"
5988 echo "Xcursor support ........ $CFG_XCURSOR"
5989 echo "Xfixes support ......... $CFG_XFIXES"
5990 echo "Xrandr support ......... $CFG_XRANDR"
5991 echo "Xi support ............. $CFG_XINPUT"
5992 echo "MIT-SHM support ........ $CFG_MITSHM"
5993 echo "FontConfig support ..... $CFG_FONTCONFIG"
5994 echo "XKB Support ............ $CFG_XKB"
5995 echo "immodule support ....... $CFG_IM"
5996 echo "GTK theme support ...... $CFG_QGTKSTYLE"
5998 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
5999 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6000 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6001 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6002 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6003 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6004 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6005 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6006 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6009 if [ "$CFG_OPENSSL" = "yes" ]; then
6010 OPENSSL_LINKAGE="(run-time)"
6011 elif [ "$CFG_OPENSSL" = "linked" ]; then
6012 OPENSSL_LINKAGE="(linked)"
6014 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6015 echo "Alsa support ........... $CFG_ALSA"
6016 if [ "$BUILD_ON_MAC" = "yes" ]; then
6017 echo "CoreWlan support ....... $CFG_COREWLAN"
6019 echo "libICU support ......... $CFG_ICU"
6020 echo "PCRE support ........... $CFG_PCRE"
6021 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6022 echo "Xcb support ............ limited (old version)"
6024 echo "Xcb support ............ $CFG_XCB"
6026 echo "Xrender support ........ $CFG_XRENDER"
6027 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6028 echo "XInput2 support ........ $CFG_XINPUT2"
6030 echo "EGLFS support .......... $CFG_EGLFS"
6033 # complain about not being able to use dynamic plugins if we are using a static build
6034 if [ "$CFG_SHARED" = "no" ]; then
6036 echo "WARNING: Using static linking will disable the use of dynamically"
6037 echo "loaded plugins. Make sure to import all needed static plugins,"
6038 echo "or compile needed modules into the library."
6041 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6043 echo "NOTE: When linking against OpenSSL, you can override the default"
6044 echo "library names through OPENSSL_LIBS."
6046 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6050 exec 1>&3 3>&- # restore stdout
6051 cat $outpath/config.summary # display config feedback to user
6053 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6055 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6056 echo "if you want a pure debug build."
6061 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6066 #-------------------------------------------------------------------------------
6067 # build makefiles based on the configuration
6068 #-------------------------------------------------------------------------------
6070 echo "Finding project files. Please wait..."
6071 if [ "$CFG_NOPROCESS" != "yes" ]; then
6072 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6073 if [ -f "${relpath}/qtbase.pro" ]; then
6074 mkfile="${outpath}/Makefile"
6075 [ -f "$mkfile" ] && chmod +w "$mkfile"
6076 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6080 # .projects -> projects to process
6081 # .projects.1 -> qt and moc
6082 # .projects.2 -> subdirs and libs
6083 # .projects.3 -> the rest
6084 rm -f .projects .projects.1 .projects.2 .projects.3
6086 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6087 if [ -z "$AWK" ]; then
6088 for p in `echo $QMAKE_PROJECTS`; do
6089 echo "$p" >> .projects
6092 cat >projects.awk <<EOF
6098 first = "./.projects.1.tmp"
6099 second = "./.projects.2.tmp"
6100 third = "./.projects.3.tmp"
6105 if ( ! target_file )
6107 print input_file >target_file
6112 input_file = FILENAME
6117 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6120 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6121 target_file = second
6126 matched_target == 0 && /^(TEMPLATE.*=)/ {
6127 if ( \$3 == "subdirs" )
6128 target_file = second
6129 else if ( \$3 == "lib" )
6135 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6136 if ( \$0 ~ /plugin/ )
6139 target_file = second
6144 if ( ! target_file )
6146 print input_file >>target_file
6153 for p in `echo $QMAKE_PROJECTS`; do
6154 echo "$p" >> .projects.all
6157 # if you get errors about the length of the command line to awk, change the -l arg
6159 split -l 100 .projects.all .projects.all.
6160 for p in .projects.all.*; do
6161 "$AWK" -f projects.awk `cat $p`
6162 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6163 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6164 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6165 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6167 rm -f .projects.all* projects.awk
6169 [ -f .projects.1 ] && cat .projects.1 >>.projects
6170 [ -f .projects.2 ] && cat .projects.2 >>.projects
6171 rm -f .projects.1 .projects.2
6172 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6173 cat .projects.3 >>.projects
6177 # don't sort Qt and MOC in with the other project files
6178 # also work around a segfaulting uniq(1)
6179 if [ -f .sorted.projects.2 ]; then
6180 sort .sorted.projects.2 > .sorted.projects.2.new
6181 mv -f .sorted.projects.2.new .sorted.projects.2
6182 cat .sorted.projects.2 >> .sorted.projects.1
6184 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6185 rm -f .sorted.projects.2 .sorted.projects.1
6189 if [ -f .projects ]; then
6190 uniq .projects >.tmp
6191 mv -f .tmp .projects
6192 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6194 if [ -f .projects.3 ]; then
6195 uniq .projects.3 >.tmp
6196 mv -f .tmp .projects.3
6197 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6199 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6203 for part in $CFG_BUILD_PARTS; do
6205 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6206 libs) PART_ROOTS="$PART_ROOTS src" ;;
6207 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6208 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6213 if [ "$CFG_DEV" = "yes" ]; then
6214 PART_ROOTS="$PART_ROOTS tests"
6217 echo "Creating makefiles. Please wait..."
6218 for file in .projects .projects.3; do
6219 [ '!' -f "$file" ] && continue
6220 for a in `cat $file`; do
6222 for r in $PART_ROOTS; do
6223 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6228 [ "$IN_ROOT" = "no" ] && continue
6231 *winmain/winmain.pro)
6232 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6236 */qmake/qmake.pro) continue ;;
6237 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6238 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6244 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6245 test -d "$dir" || mkdir -p "$dir"
6246 OUTDIR="$outpath/$dir"
6247 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6248 # fast configure - the makefile exists, skip it
6249 # since the makefile exists, it was generated by qmake, which means we
6250 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6252 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6255 QMAKE_SPEC_ARGS="-spec $SPEC"
6256 echo $ECHO_N " for $a$ECHO_C"
6258 QMAKE="$outpath/bin/qmake"
6259 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6260 if [ "$file" = ".projects.3" ]; then
6263 cat >"${OUTDIR}/Makefile" <<EOF
6264 # ${OUTDIR}/Makefile: generated by configure
6266 # WARNING: This makefile will be replaced with a real makefile.
6267 # All changes made to this file will be lost.
6269 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6271 cat >>"${OUTDIR}/Makefile" <<EOF
6273 all clean install qmake first Makefile: FORCE
6274 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6282 if [ "$OPT_VERBOSE" = "yes" ]; then
6283 echo " (`basename $SPEC`)"
6284 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6289 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6290 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6294 rm -f .projects .projects.3
6296 #-------------------------------------------------------------------------------
6297 # check for platforms that we don't yet know about
6298 #-------------------------------------------------------------------------------
6299 if [ "$CFG_ARCH" = "unknown" ]; then
6302 NOTICE: configure was unable to determine the architecture
6303 for the $XQMAKESPEC target.
6305 Qt will not use a specialized implementation for any atomic
6306 operations. Instead a generic implemention based on either GCC
6307 intrinsics or C++11 std::atomic<T> will be used (when
6308 available). The generic implementations are generally as fast
6309 as and always as safe as a specialized implementation.
6311 If no generic implementation is available, Qt will use a
6312 fallback UNIX implementation which uses a single
6313 pthread_mutex_t to protect all atomic operations. This
6314 implementation is the slow (but safe) fallback implementation
6315 for architectures Qt does not yet support.
6319 #-------------------------------------------------------------------------------
6320 # check if the user passed the -no-zlib option, which is no longer supported
6321 #-------------------------------------------------------------------------------
6322 if [ -n "$ZLIB_FORCED" ]; then
6323 which_zlib="supplied"
6324 if [ "$CFG_ZLIB" = "system" ]; then
6330 NOTICE: The -no-zlib option was supplied but is no longer
6333 Qt now requires zlib support in all builds, so the -no-zlib
6334 option was ignored. Qt will be built using the $which_zlib
6339 #-------------------------------------------------------------------------------
6340 # check if the user passed the obsoleted -wayland or -no-wayland flag
6341 #-------------------------------------------------------------------------------
6342 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6345 NOTICE: The -wayland and -no-wayland flags are now obsolete
6347 All configuring of QtWayland plugin and QtCompositor happens in the module
6351 #-------------------------------------------------------------------------------
6352 # check if the user passed the obsoleted -arch or -host-arch options
6353 #-------------------------------------------------------------------------------
6354 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6357 NOTICE: The -arch and -host-arch options are obsolete.
6359 Qt now detects the target and host architectures based on compiler
6360 output. Qt will be built using $CFG_ARCH for the target architecture
6361 and $CFG_HOST_ARCH for the host architecture (note that these two
6362 will be the same unless you are cross-compiling).
6366 #-------------------------------------------------------------------------------
6367 # finally save the executed command to another script
6368 #-------------------------------------------------------------------------------
6369 if [ `basename $0` != "config.status" ]; then
6370 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6372 # add the system variables
6373 for varname in $SYSTEM_VARIABLES; do
6375 'if [ -n "\$'${varname}'" ]; then
6376 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6381 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6383 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6384 echo "#!/bin/sh" > "$outpath/config.status"
6385 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6386 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6387 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6388 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6389 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6390 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6391 echo "else" >> "$outpath/config.status"
6392 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6393 echo "fi" >> "$outpath/config.status"
6394 chmod +x "$outpath/config.status"
6397 if [ -n "$RPATH_MESSAGE" ]; then
6399 echo "$RPATH_MESSAGE"
6402 MAKE=`basename "$MAKE"`
6404 echo Qt is now configured for building. Just run \'$MAKE\'.
6405 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6406 echo Once everything is built, Qt is installed.
6407 echo You should not run \'$MAKE install\'.
6409 echo Once everything is built, you must run \'$MAKE install\'.
6410 echo Qt will be installed into $QT_INSTALL_PREFIX
6413 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.