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 #-------------------------------------------------------------------------------
270 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
275 #-----------------------------------------------------------------------------
276 # Qt version detection
277 #-----------------------------------------------------------------------------
278 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
282 if [ -n "$QT_VERSION" ]; then
283 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
284 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
285 if [ -n "$MAJOR" ]; then
286 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
287 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
288 QT_MAJOR_VERSION="$MAJOR"
289 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
290 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
293 if [ -z "$QT_MAJOR_VERSION" ]; then
294 echo "Cannot process version from qglobal.h: $QT_VERSION"
295 echo "Cannot proceed."
299 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
300 if [ -z "$QT_PACKAGEDATE" ]; then
301 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
302 echo "Cannot proceed"
306 #-------------------------------------------------------------------------------
308 #-------------------------------------------------------------------------------
312 EditionString=Commercial
316 # parse the arguments, setting things to "yes" or "no"
317 while [ "$#" -gt 0 ]; do
321 #Autoconf style options
323 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
327 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
331 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
332 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
335 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
340 # this option may or may not be followed by an argument
341 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
348 -h|help|--help|-help)
349 if [ "$VAL" = "yes" ]; then
351 COMMERCIAL_USER="no" #doesn't matter we will display the help
354 COMMERCIAL_USER="no" #doesn't matter we will display the help
358 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
362 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
369 if [ "$UNKNOWN_ARG" = "yes" ]; then
378 if [ "$PLATFORM_QPA" != "no" ]; then
379 if [ "$PLATFORM_QPA" = "maybe" ]; then
384 echo "No license exists to enable Qt QPA. Disabling."
391 COMMERCIAL_USER="yes"
405 if [ "$COMMERCIAL_USER" = "ask" ]; then
407 echo "Which edition of Qt do you want to use ?"
409 echo "Type 'c' if you want to use the Commercial Edition."
410 echo "Type 'o' if you want to use the Open Source Edition."
414 if [ "$commercial" = "c" ]; then
415 COMMERCIAL_USER="yes"
417 elif [ "$commercial" = "o" ]; then
424 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
425 # Commercial preview release
426 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
429 QT_EDITION="QT_EDITION_DESKTOP"
430 LicenseType="Technology Preview"
431 elif [ $COMMERCIAL_USER = "yes" ]; then
432 # one of commercial editions
433 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
434 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
436 # read in the license file
437 if [ -f "$LICENSE_FILE" ]; then
438 . "$LICENSE_FILE" >/dev/null 2>&1
439 if [ -z "$LicenseKeyExt" ]; then
441 echo "You are using an old license file."
443 echo "Please install the license file supplied by Nokia,"
444 echo "or install the Qt Open Source Edition if you intend to"
445 echo "develop free software."
448 if [ -z "$Licensee" ]; then
450 echo "Invalid license key. Please check the license key."
454 if [ -z "$LicenseKeyExt" ]; then
456 echo $ECHO_N "Please enter your license key: $ECHO_C"
458 Licensee="Unknown user"
463 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
464 && LicenseValid="yes" \
466 if [ "$LicenseValid" != "yes" ]; then
468 echo "Invalid license key. Please check the license key."
471 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
472 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
473 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
474 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
476 # determine which edition we are licensed to use
477 case "$LicenseTypeCode" in
479 LicenseType="Commercial"
483 QT_EDITION="QT_EDITION_UNIVERSAL"
486 Edition="FullFramework"
487 EditionString="Full Framework"
488 QT_EDITION="QT_EDITION_DESKTOP"
491 Edition="GUIFramework"
492 EditionString="GUI Framework"
493 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
498 LicenseType="Evaluation"
499 QMakeVar add DEFINES QT_EVAL
503 QT_EDITION="QT_EDITION_EVALUATION"
508 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
510 echo "Invalid license key. Please check the license key."
514 # verify that we are licensed to use Qt on this platform
516 case "$PlatformCode" in
519 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
523 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
526 ### EMBEDDED_QPA logic missing ###
527 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
528 X9,* | XC,* | XU,* | XW,* | XM,*)
530 LICENSE_EXTENSION="-ALLOS"
532 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
533 # Qt for Embedded Linux
534 LICENSE_EXTENSION="-EMBEDDED"
536 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
538 LICENSE_EXTENSION="-EMBEDDED"
540 FM,*,no | LM,yes,* | ZM,no,no)
542 LICENSE_EXTENSION="-DESKTOP"
546 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
548 echo "You are not licensed for the $Platform platform."
550 echo "Please contact qt-info@nokia.com to upgrade your license to"
551 echo "include the $Platform platform, or install the Qt Open Source Edition"
552 echo "if you intend to develop free software."
557 if test -r "$relpath/.LICENSE"; then
558 # Generic, non-final license
560 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
565 *TECHNOLOGY?PREVIEW*)
572 echo >&2 "Invalid license files; cannot continue"
577 EditionString="$Edition"
578 QT_EDITION="QT_EDITION_DESKTOP"
581 case "$LicenseFeatureCode" in
584 case "$LicenseType" in
586 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
589 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
595 case "$LicenseType" in
597 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
600 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
606 echo "Invalid license key. Please check the license key."
610 case "$LicenseFeatureCode" in
618 if [ '!' -f "$outpath/LICENSE" ]; then
619 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
620 echo "this software has disappeared."
622 echo "Sorry, you are not licensed to use this software."
623 echo "Try re-installing."
627 elif [ $COMMERCIAL_USER = "no" ]; then
628 # Open Source edition - may only be used under the terms of the GPL or LGPL.
629 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
630 Licensee="Open Source"
632 EditionString="Open Source"
633 QT_EDITION="QT_EDITION_OPENSOURCE"
636 #-------------------------------------------------------------------------------
637 # initalize variables
638 #-------------------------------------------------------------------------------
640 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
641 for varname in $SYSTEM_VARIABLES; do
642 qmakevarname="${varname}"
643 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
644 if [ "${varname}" = "LDFLAGS" ]; then
645 qmakevarname="LFLAGS"
646 elif [ "${varname}" = "LD" ]; then
650 'if [ -n "\$'${varname}'" ]; then
651 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
655 # Use CC/CXX to run config.tests
656 mkdir -p "$outpath/config.tests"
657 rm -f "$outpath/config.tests/.qmake.cache"
658 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
660 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
662 # QTDIR may be set and point to an old or system-wide Qt installation
665 # the minimum version of libdbus-1 that we require:
666 MIN_DBUS_1_VERSION=0.93
668 # initalize internal variables
669 CFG_CONFIGURE_EXIT_ON_ERROR=yes
671 CFG_EXCEPTIONS=unspecified
672 CFG_GUI=auto # (yes|no|auto)
698 CFG_OPENVG_LC_INCLUDES=no
699 CFG_OPENVG_SHIVA=auto
700 CFG_OPENVG_ON_OPENGL=auto
706 QT_DEFAULT_BUILD_PARTS="libs examples"
710 CFG_AUDIO_BACKEND=auto
712 CFG_DECLARATIVE_DEBUG=yes
713 CFG_JAVASCRIPTCORE_JIT=auto
715 # Target architecture
717 # Host architecture, same as CFG_ARCH when not cross-compiling
719 # Set when the -arch or -host-arch arguments are used
720 OPT_OBSOLETE_HOST_ARG=no
731 CFG_OBSOLETE_WAYLAND=no
744 CFG_SEPARATE_DEBUG_INFO=no
745 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
746 CFG_REDUCE_EXPORTS=auto
756 CFG_REDUCE_RELOCATIONS=auto
757 CFG_ACCESSIBILITY=auto
762 CFG_CLOCK_GETTIME=auto
763 CFG_CLOCK_MONOTONIC=auto
771 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
775 CFG_PREFIX_INSTALL=yes
784 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
785 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
789 OPT_CONFIRM_LICENSE=no
802 QPA_PLATFORM_GUARD=yes
804 # initalize variables used for installation
813 QT_INSTALL_TRANSLATIONS=
822 #flags for SQL drivers
830 QT_LFLAGS_ODBC="-lodbc"
833 # flags for libdbus-1
837 # flags for Glib (X11 only)
841 # flags for GStreamer (X11 only)
845 #-------------------------------------------------------------------------------
846 # check SQL drivers available in this package
847 #-------------------------------------------------------------------------------
849 # opensource version removes some drivers, so force them to be off
855 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
856 for a in "$relpath/src/plugins/sqldrivers/"*; do
858 base_a=`basename "$a"`
859 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
860 eval "CFG_SQL_${base_a}=auto"
865 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
866 if [ -d "$relpath/src/plugins/imageformats" ]; then
867 for a in "$relpath/src/plugins/imageformats/"*; do
869 base_a=`basename "$a"`
870 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
875 #-------------------------------------------------------------------------------
876 # parse command line arguments
877 #-------------------------------------------------------------------------------
879 # parse the arguments, setting things to "yes" or "no"
880 while [ "$#" -gt 0 ]; do
884 #Autoconf style options
886 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
890 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
894 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
895 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
898 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
902 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
906 -no-*-*|-plugin-*-*|-qt-*-*)
907 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
908 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
912 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
915 #Qt style yes options
916 -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|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
917 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
920 #Qt style options that pass an argument
922 if [ "$PLATFORM_QPA" != "yes" ]; then
924 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
928 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
932 -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)
933 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
937 #Qt style complex options in one command
938 -enable-*|-disable-*)
939 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
940 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
942 #Qt Builtin/System style options
943 -no-*|-system-*|-qt-*)
944 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
945 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
947 #Options that cannot be generalized
954 # this option may or may not be followed by an argument
955 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
964 # this option may or may not be followed by an argument
965 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
974 # this option may or may not be followed by an argument
975 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
983 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
984 # this option may or may not be followed by an argument
985 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1004 if [ "$1" = "-D" ]; then
1008 VAL=`echo $1 | sed 's,-D,,'`
1013 # this option may or may not be followed by an argument
1014 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1023 if [ "$1" = "-I" ]; then
1027 VAL=`echo $1 | sed 's,-I,,'`
1032 if [ "$1" = "-L" ]; then
1036 VAL=`echo $1 | sed 's,-L,,'`
1041 if [ "$1" = "-R" ]; then
1045 VAL=`echo $1 | sed 's,-R,,'`
1050 VAL=`echo $1 | sed 's,-l,,'`
1054 if [ "$1" = "-F" ]; then
1058 VAL=`echo $1 | sed 's,-F,,'`
1063 if [ "$1" = "-fw" ]; then
1067 VAL=`echo $1 | sed 's,-fw,,'`
1075 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1082 if [ "$UNKNOWN_ARG" = "yes" ]; then
1083 echo "$1: unknown argument"
1094 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1095 CFG_ACCESSIBILITY="$VAL"
1104 CFG_USE_GNUMAKE="$VAL"
1107 CFG_MYSQL_CONFIG="$VAL"
1110 QT_INSTALL_PREFIX="$VAL"
1113 QT_HOST_PREFIX="$VAL"
1122 QT_FORCE_PKGCONFIG=yes
1125 QT_INSTALL_DOCS="$VAL"
1128 QT_INSTALL_HEADERS="$VAL"
1131 QT_INSTALL_PLUGINS="$VAL"
1134 QT_INSTALL_IMPORTS="$VAL"
1137 QT_INSTALL_DATA="$VAL"
1140 QT_INSTALL_LIBS="$VAL"
1149 QT_INSTALL_TRANSLATIONS="$VAL"
1151 sysconfdir|settingsdir)
1152 QT_INSTALL_SETTINGS="$VAL"
1155 QT_INSTALL_EXAMPLES="$VAL"
1158 QT_INSTALL_TESTS="$VAL"
1167 QT_INSTALL_BINS="$VAL"
1177 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1184 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1185 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1186 [ "$VAL" = "es2" ]; then
1193 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1200 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1203 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1211 if [ "$BUILD_ON_MAC" = "yes" ]; then
1218 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1219 CFG_MAC_DWARF2="$VAL"
1225 OPT_OBSOLETE_HOST_ARG=yes
1228 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1229 CFG_MAC_HARFBUZZ="$VAL"
1236 if [ "$BUILD_ON_MAC" = "yes" ]; then
1237 CFG_FRAMEWORK="$VAL"
1243 if [ "$VAL" = "yes" ]; then
1245 QMakeVar add QMAKE_CFLAGS -pg
1246 QMakeVar add QMAKE_CXXFLAGS -pg
1247 QMakeVar add QMAKE_LFLAGS -pg
1248 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1254 if [ "$VAL" = "yes" ]; then
1255 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1258 exceptions|g++-exceptions)
1259 if [ "$VAL" = "no" ]; then
1261 elif [ "$VAL" = "yes" ]; then
1269 # keep compatibility with old platform names
1275 PLATFORM=hpux-acc-o64
1278 PLATFORM=hpux-acc-64
1281 PLATFORM=hpux-acc-64
1293 PLATFORM=reliant-cds-64
1296 PLATFORM=solaris-cc-64
1299 PLATFORM=unixware-cc
1302 PLATFORM=unixware-g++
1305 PLATFORM=unixware-cc
1308 PLATFORM=unixware-g++
1314 i386) NATIVE_64_ARCH="x86_64" ;;
1315 powerpc) NATIVE_64_ARCH="ppc64" ;;
1316 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1318 if [ ! -z "$NATIVE_64_ARCH" ]; then
1319 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1326 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1329 XPLATFORM="devices/$VAL"
1332 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1333 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1334 DeviceVar set $DEV_VAR $DEV_VAL
1337 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1338 CFG_DEBUG_RELEASE="$VAL"
1344 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1345 CFG_RELEASE_QMAKE="$VAL"
1351 if [ "$VAL" = "yes" ]; then
1353 elif [ "$VAL" = "no" ]; then
1360 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1361 CFG_PREFIX_INSTALL="$VAL"
1369 developer-build|commercial|opensource)
1370 # These switches have been dealt with already
1373 if [ "$VAL" = "yes" ]; then
1375 elif [ "$VAL" = "no" ]; then
1382 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1383 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1389 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1390 if [ "$VAL" = "no" ]; then
1391 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1392 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1393 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1399 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1406 if [ "$VAL" = "no" ]; then
1413 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1421 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1428 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1435 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1442 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1449 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1456 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1463 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1470 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1477 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1478 CFG_PRECOMPILE="$VAL"
1483 separate-debug-info)
1484 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1485 CFG_SEPARATE_DEBUG_INFO="$VAL"
1486 elif [ "$VAL" = "nocopy" ] ; then
1487 CFG_SEPARATE_DEBUG_INFO="yes"
1488 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1494 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1495 CFG_REDUCE_EXPORTS="$VAL"
1501 if [ "$VAL" = "no" ]; then
1508 if [ "$VAL" = "no" ]; then
1515 if [ "$VAL" = "no" ]; then
1522 if [ "$VAL" = "no" ]; then
1529 if [ "$VAL" = "no" ]; then
1536 if [ "$VAL" = "no" ]; then
1543 if [ "$VAL" = "no" ]; then
1550 if [ "$VAL" = "no" ]; then
1557 if [ "$VAL" = "no" ]; then
1567 if [ "$VAL" = "no" ]; then
1574 if [ "$VAL" = "no" ]; then
1581 if [ "$VAL" = "no" ]; then
1582 CFG_MIPS_DSPR2="$VAL"
1588 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1589 CFG_REDUCE_RELOCATIONS="$VAL"
1595 [ "$VAL" = "qt" ] && VAL=yes
1596 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1601 # No longer supported:
1602 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1605 if [ "$VAL" = "system" ]; then
1612 [ "$VAL" = "yes" ] && VAL=qt
1613 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1620 [ "$VAL" = "yes" ] && VAL=qt
1621 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1628 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1635 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1642 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1656 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1663 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1664 CFG_FONTCONFIG="$VAL"
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1684 CFG_OBSOLETE_WAYLAND=yes
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1694 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1701 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1708 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1715 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1722 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1729 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1730 CFG_GSTREAMER="$VAL"
1736 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1737 CFG_QGTKSTYLE="$VAL"
1743 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1746 if [ "$VAL" = "no" ]; then
1754 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1756 elif [ "$VAL" = "no" ]; then
1763 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1764 QPA_PLATFORM_GUARD="$VAL"
1770 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1772 elif [ "$VAL" = "runtime" ]; then
1779 if [ "$VAL" = "yes" ]; then
1786 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1793 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1794 CFG_LARGEFILE="$VAL"
1800 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1807 if [ "$VAL" = "yes" ]; then
1808 CFG_OPENSSL="linked"
1814 if [ "$VAL" = "yes" ]; then
1815 CFG_DECLARATIVE_DEBUG="yes"
1817 if [ "$VAL" = "no" ]; then
1818 CFG_DECLARATIVE_DEBUG="no"
1825 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1826 CFG_JAVASCRIPTCORE_JIT="$VAL"
1832 if [ "$VAL" = "yes" ]; then
1833 OPT_CONFIRM_LICENSE="$VAL"
1839 if [ "$VAL" = "yes" ]; then
1845 sql-*|imageformat-*)
1846 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1847 # if autoconf style options were used, $VAL can be "yes" or "no"
1848 [ "$VAL" = "yes" ] && VAL=qt
1849 # now $VAL should be "no", "qt", or "plugin"... double-check
1850 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1853 # now $VAL is "no", "qt", or "plugin"
1855 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1856 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1858 # Grab the available values
1861 avail="$CFG_SQL_AVAILABLE"
1864 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1865 if [ "$OPT" != "plugin" ]; then
1866 # png is always built in
1872 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1876 # Check that that user's value is available.
1879 if [ "$VAL" = "$d" ]; then
1884 [ "$found" = yes ] || ERROR=yes
1886 if [ "$VAR" = "sql" ]; then
1887 # set the CFG_SQL_driver
1888 eval "CFG_SQL_$VAL=\$OPT"
1890 elif [ "$VAR" = "imageformat" ]; then
1891 [ "$OPT" = "qt" ] && OPT=yes
1892 VAL="`echo $VAL |tr a-z A-Z`"
1893 eval "CFG_$VAL=$OPT"
1897 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1898 if [ "$OPT" = "plugin" ]; then
1901 QMakeVar add "${VAR}s" "${VAL}"
1902 elif [ "$OPT" = "no" ]; then
1903 PLUG_VAR="${VAR}-plugin"
1905 QMakeVar del "${IN_VAR}s" "$VAL"
1906 QMakeVar del "${PLUG_VAR}s" "$VAL"
1908 if [ "$ERROR" = "yes" ]; then
1909 echo "$CURRENT_OPT: unknown argument"
1914 if [ "$VAL" = "yes" ]; then
1915 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1916 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1920 elif [ "$VAL" = "no" ]; then
1921 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1922 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1931 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1938 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1945 D_FLAGS="$D_FLAGS \"$VAL\""
1948 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1951 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1954 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1957 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1960 if [ "$BUILD_ON_MAC" = "yes" ]; then
1961 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1962 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1968 if [ "$BUILD_ON_MAC" = "yes" ]; then
1969 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1975 W_FLAGS="$W_FLAGS \"${VAL}\""
1981 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1982 CFG_PHONON_BACKEND="$VAL"
1994 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1995 CFG_AUDIO_BACKEND="$VAL"
2001 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2008 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2009 CFG_FORCE_ASSERTS="$VAL"
2015 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2025 if [ "$UNKNOWN_OPT" = "yes" ]; then
2026 echo "${CURRENT_OPT}: invalid command-line switch"
2032 # update QT_CONFIG to show our current predefined configuration
2033 case "$CFG_QCONFIG" in
2034 minimal|small|medium|large|full)
2035 # these are a sequence of increasing functionality
2036 for c in minimal small medium large full; do
2037 QT_CONFIG="$QT_CONFIG $c-config"
2038 [ "$CFG_QCONFIG" = $c ] && break
2042 # not known to be sufficient for anything
2043 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2044 echo >&2 "Error: configuration file not found:"
2045 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2047 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2052 #-------------------------------------------------------------------------------
2053 # build tree initialization
2054 #-------------------------------------------------------------------------------
2056 # where to find which..
2057 unixtests="$relpath/config.tests/unix"
2058 mactests="$relpath/config.tests/mac"
2059 WHICH="$unixtests/which.test"
2061 PERL=`$WHICH perl 2>/dev/null`
2063 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2065 for e in gawk nawk awk; do
2066 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2073 PERL="/usr/bin/perl"
2074 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2078 ### skip this if the user just needs help...
2079 if [ "$OPT_HELP" != "yes" ]; then
2081 # is this a shadow build?
2082 if [ "$OPT_SHADOW" = "maybe" ]; then
2084 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2085 if [ -h "$outpath" ]; then
2086 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2092 if [ "$OPT_SHADOW" = "yes" ]; then
2093 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2094 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2095 echo >&2 "Cannot proceed."
2098 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2101 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2103 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2104 echo "Qt can be built in release mode with separate debug information, so"
2105 echo "-debug-and-release is not necessary anymore"
2109 if [ "$CFG_SILENT" = "yes" ]; then
2110 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2113 # if the source tree is different from the build tree,
2114 # symlink or copy part of the sources
2115 if [ "$OPT_SHADOW" = "yes" ]; then
2116 echo "Preparing build tree..."
2118 if [ -z "$PERL" ]; then
2120 echo "You need perl in your PATH to make a shadow build."
2121 echo "Cannot proceed."
2125 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2127 # make a syncqt script that can be used in the shadow
2128 rm -f "$outpath/bin/syncqt"
2129 if [ -x "$relpath/bin/syncqt" ]; then
2130 mkdir -p "$outpath/bin"
2131 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2132 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2133 chmod 755 "$outpath/bin/syncqt"
2136 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2137 rm -f "$outpath/bin/$i"
2138 if [ -x "$relpath/bin/$i" ]; then
2139 mkdir -p "$outpath/bin"
2140 echo "#!/bin/sh" >"$outpath/bin/$i"
2141 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2142 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2143 chmod 755 "$outpath/bin/$i"
2147 # symlink the mkspecs directory
2148 mkdir -p "$outpath/mkspecs"
2149 rm -rf "$outpath"/mkspecs/*
2150 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2151 rm -f "$outpath/mkspecs/default"
2155 rm -rf "$outpath/mkspecs/$1"
2156 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2157 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2160 # Special case for mkspecs/features directory.
2161 # To be able to place .prf files into a shadow build directory,
2162 # we're creating links for files only. The directory structure is reproduced.
2163 ShadowMkspecs features
2165 # The modules dir is special, too.
2166 ShadowMkspecs modules
2168 # symlink the doc directory
2169 rm -rf "$outpath/doc"
2170 ln -s "$relpath/doc" "$outpath/doc"
2173 # symlink fonts to be able to run application from build directory
2174 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2175 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2176 mkdir -p "${outpath}/lib"
2177 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2181 if [ "$OPT_FAST" = "auto" ]; then
2182 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2189 # find a make command
2190 if [ -z "$MAKE" ]; then
2192 for mk in gmake make; do
2193 if "$WHICH" $mk >/dev/null 2>&1; then
2198 if [ -z "$MAKE" ]; then
2199 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2200 echo >&2 "Cannot proceed."
2203 # export MAKE, we need it later in the config.tests
2209 #-------------------------------------------------------------------------------
2210 # auto-detect all that hasn't been specified in the arguments
2211 #-------------------------------------------------------------------------------
2213 if [ -z "$PLATFORM" ]; then
2215 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2217 if [ "$PLATFORM_QPA" = "yes" ]; then
2218 OSX_VERSION=`uname -r | cut -d. -f1`
2219 if [ "$OSX_VERSION" -ge 11 ]; then
2220 # We're on Lion or above. Check if we have a supported Clang version
2221 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2224 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2239 #PLATFORM=aix-g++-64
2241 #PLATFORM=aix-xlc-64
2243 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2253 # PLATFORM=dynix-g++
2259 PLATFORM=freebsd-g++
2261 - Also available for FreeBSD: freebsd-icc
2265 PLATFORM=openbsd-g++
2276 #PLATFORM=irix-cc-64
2278 - Also available for IRIX: irix-g++ irix-cc-64
2282 case "$UNAME_MACHINE" in
2284 #PLATFORM=hpuxi-acc-32
2285 PLATFORM=hpuxi-acc-64
2287 - Also available for HP-UXi: hpuxi-acc-32
2293 #PLATFORM=hpux-acc-64
2295 #PLATFORM=hpux-acc-o64
2297 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2306 - Also available for Tru64: tru64-g++
2310 case "$UNAME_MACHINE" in
2312 PLATFORM=linux-g++-64
2319 - Also available for Linux: linux-kcc linux-icc linux-cxx
2323 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2324 PLATFORM="solaris-g++"
2326 #PLATFORM=solaris-g++
2328 #PLATFORM=solaris-cc64
2331 - Also available for Solaris: solaris-g++ solaris-cc-64
2334 ReliantUNIX-*:*|SINIX-*:*)
2335 PLATFORM=reliant-cds
2336 #PLATFORM=reliant-cds-64
2338 - Also available for Reliant UNIX: reliant-cds-64
2348 #PLATFORM=unixware-g++
2349 PLATFORM=unixware-cc
2351 - Also available for OpenUNIX: unixware-g++
2355 #PLATFORM=unixware-g++
2356 PLATFORM=unixware-cc
2358 - Also available for UnixWare: unixware-g++
2365 - Also available for SCO OpenServer: sco-g++
2369 PLATFORM=unixware-g++
2372 PLATFORM=unsupported/qnx-g++
2375 if [ "$OPT_HELP" != "yes" ]; then
2377 for p in $PLATFORMS; do
2378 echo " $relconf $* -platform $p"
2381 echo " The build script does not currently recognize all" >&2
2382 echo " platforms supported by Qt." >&2
2383 echo " Rerun this script with a -platform option listed to" >&2
2384 echo " set the system/compiler combination you use." >&2
2391 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2393 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2395 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2396 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2398 if [ -d "$PLATFORM" ]; then
2399 QMAKESPEC="$PLATFORM"
2401 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2403 if [ -d "$XPLATFORM" ]; then
2404 XQMAKESPEC="$XPLATFORM"
2406 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2408 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2409 QT_CROSS_COMPILE=yes
2410 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2411 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2414 if [ "$BUILD_ON_MAC" = "yes" ]; then
2415 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2417 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2418 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2419 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2420 echo " built with 'macx-g++'" >&2
2426 # check specified platforms are supported
2427 if [ '!' -d "$QMAKESPEC" ]; then
2429 echo " The specified system/compiler is not supported:"
2433 echo " Please see the README file for a complete list."
2437 if [ '!' -d "$XQMAKESPEC" ]; then
2439 echo " The specified system/compiler is not supported:"
2443 echo " Please see the README file for a complete list."
2447 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2449 echo " The specified system/compiler port is not complete:"
2451 echo " $XQMAKESPEC/qplatformdefs.h"
2453 echo " Please contact qt-info@nokia.com."
2458 # now look at the configs and figure out what platform we are config'd for
2459 [ "$PLATFORM_QPA" != "yes" ] \
2460 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2462 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2464 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2465 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2466 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2467 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2468 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2472 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2473 case `basename "$XPLATFORM"` in
2476 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2478 echo "Please contact qt-info@nokia.com to upgrade your license to"
2479 echo "include this platform, or install the Qt Open Source Edition"
2480 echo "if you intend to develop free software."
2486 #-------------------------------------------------------------------------------
2487 # write out device config before we run the test.
2488 #-------------------------------------------------------------------------------
2489 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
2490 rm -f "$DEVICE_VARS_FILE"
2492 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
2495 #-------------------------------------------------------------------------------
2496 # tests that don't need qmake (must be run before displaying help)
2497 #-------------------------------------------------------------------------------
2499 # detect build style
2500 if [ "$CFG_DEBUG" = "auto" ]; then
2501 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2502 CFG_DEBUG_RELEASE=yes
2504 elif [ "$CFG_DEV" = "yes" ]; then
2505 CFG_DEBUG_RELEASE=no
2508 CFG_DEBUG_RELEASE=no
2512 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2513 QT_CONFIG="$QT_CONFIG build_all"
2516 if [ -z "$PKG_CONFIG" ]; then
2517 # See if PKG_CONFIG is set in the mkspec:
2518 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2520 if [ -z "$PKG_CONFIG" ]; then
2521 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2524 # Work out if we can use pkg-config
2525 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2526 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2528 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2529 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2530 echo >&2 "environment!"
2532 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2534 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2535 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2536 echo >&2 "This is probably not what you want."
2538 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2540 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2541 echo >&2 "been set. This means your toolchain's .pc files must contain"
2542 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2543 echo >&2 "tests are failing, please check these files."
2548 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2549 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2550 echo >&2 "dependencies"
2556 if [ ! -n "$PKG_CONFIG" ]; then
2557 QT_CONFIG="$QT_CONFIG no-pkg-config"
2560 # pass on $CFG_SDK to the configure tests.
2561 if [ '!' -z "$CFG_SDK" ]; then
2562 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2565 # find the default framework value
2566 if [ "$BUILD_ON_MAC" = "yes" ]; then
2567 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2568 CFG_FRAMEWORK="$CFG_SHARED"
2569 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2571 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2579 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2581 TEST_COMPILER=$QMAKE_CONF_COMPILER
2582 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2583 if [ -z "$TEST_COMPILER" ]; then
2584 echo "ERROR: Cannot set the compiler for the configuration tests"
2590 if [ -n "$CFG_SYSROOT" ]; then
2591 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2592 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2593 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2595 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2599 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2601 # auto-detect precompiled header support
2602 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2603 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2610 #auto-detect DWARF2 on the mac
2611 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2612 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2619 # don't autodetect support for separate debug info on objcopy when
2620 # cross-compiling as lots of toolchains seems to have problems with this
2621 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2622 CFG_SEPARATE_DEBUG_INFO="no"
2625 # auto-detect support for separate debug info in objcopy
2626 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2627 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2628 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2629 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2630 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2631 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2632 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2633 CFG_SEPARATE_DEBUG_INFO=no
2637 # binutils on HP-UX is buggy; default to no.
2638 CFG_SEPARATE_DEBUG_INFO=no
2641 CFG_SEPARATE_DEBUG_INFO=yes
2647 # auto-detect -fvisibility support
2648 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2649 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2650 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2651 echo "-reduce-exports was requested but this compiler does not support it"
2652 echo "Re-run configure with -v for more information"
2655 CFG_REDUCE_EXPORTS=no
2657 CFG_REDUCE_EXPORTS=yes
2661 # detect the availability of the -Bsymbolic-functions linker optimization
2662 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2663 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2664 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2665 echo "-reduce-relocations was requested but this compiler does not support it"
2666 echo "Re-run configure with -v for more information"
2669 CFG_REDUCE_RELOCATIONS=no
2671 CFG_REDUCE_RELOCATIONS=yes
2675 # auto-detect GNU make support
2676 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2680 # find the default framework value
2681 if [ "$BUILD_ON_MAC" = "yes" ]; then
2682 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2683 CFG_FRAMEWORK="$CFG_SHARED"
2684 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2686 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2694 # x11 tests are done after qmake is built
2697 #setup the build parts
2698 if [ -z "$CFG_BUILD_PARTS" ]; then
2699 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2701 # build tests by default, if a developer build
2702 if [ "$CFG_DEV" = "yes" ]; then
2703 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2706 # don't build tools by default when cross-compiling
2707 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2708 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2711 for nobuild in $CFG_NOBUILD_PARTS; do
2712 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2714 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2716 # echo "WARNING: libs is a required part of the build."
2718 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2721 #-------------------------------------------------------------------------------
2722 # post process QT_INSTALL_* variables
2723 #-------------------------------------------------------------------------------
2725 if [ -z "$QT_INSTALL_PREFIX" ]; then
2726 if [ "$CFG_DEV" = "yes" ]; then
2727 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2729 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2732 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2734 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2735 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2736 if [ "$BUILD_ON_MAC" = "yes" ]; then
2737 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2740 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2743 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2745 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2746 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2747 if [ "$BUILD_ON_MAC" = "yes" ]; then
2748 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2753 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2756 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2758 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2759 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2760 if [ "$BUILD_ON_MAC" = "yes" ]; then
2761 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2762 QT_INSTALL_LIBS="/Libraries/Frameworks"
2766 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2768 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2770 if [ -z "$QT_INSTALL_BINS" ]; then #default
2771 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2772 if [ "$BUILD_ON_MAC" = "yes" ]; then
2773 QT_INSTALL_BINS="/Developer/Applications/Qt"
2776 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2778 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2780 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2781 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2782 if [ "$BUILD_ON_MAC" = "yes" ]; then
2783 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2786 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2788 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2790 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2791 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2792 if [ "$BUILD_ON_MAC" = "yes" ]; then
2793 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2796 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2798 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2800 if [ -z "$QT_INSTALL_DATA" ]; then #default
2801 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2803 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2805 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2806 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2808 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2810 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2811 if [ "$BUILD_ON_MAC" = "yes" ]; then
2812 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2814 QT_INSTALL_SETTINGS=/etc/xdg
2817 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2819 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2820 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2821 if [ "$BUILD_ON_MAC" = "yes" ]; then
2822 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2825 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2827 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2830 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2831 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2832 if [ "$BUILD_ON_MAC" = "yes" ]; then
2833 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2836 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2838 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2840 #------- host paths --------
2842 if [ -z "$QT_HOST_PREFIX" ]; then
2843 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2846 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2850 if [ -z "$QT_HOST_BINS" ]; then #default
2852 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2853 if [ "$BUILD_ON_MAC" = "yes" ]; then
2854 QT_HOST_BINS="/Developer/Applications/Qt"
2857 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2859 QT_HOST_BINS="$QT_INSTALL_BINS"
2862 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2864 if [ -z "$QT_HOST_DATA" ]; then #default
2866 QT_HOST_DATA="$QT_HOST_PREFIX"
2868 QT_HOST_DATA="$QT_INSTALL_DATA"
2871 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2874 #-------------------------------------------------------------------------------
2875 # help - interactive parts of the script _after_ this section please
2876 #-------------------------------------------------------------------------------
2878 # next, emit a usage message if something failed.
2879 if [ "$OPT_HELP" = "yes" ]; then
2880 [ "x$ERROR" = "xyes" ] && echo
2881 if [ "$CFG_NIS" = "no" ]; then
2888 if [ "$CFG_CUPS" = "no" ]; then
2895 if [ "$CFG_ICONV" = "no" ]; then
2902 if [ "$CFG_LARGEFILE" = "no" ]; then
2909 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
2916 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2924 if [ "$CFG_XCB" = "no" ]; then
2932 if [ "$CFG_EGLFS" = "no" ]; then
2940 if [ "$CFG_XINPUT2" = "no" ]; then
2949 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2950 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2951 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2952 [-release] [-debug] [-debug-and-release]
2953 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2954 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2955 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
2956 [-plugin-sql-<driver>] [-system-sqlite]
2957 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2958 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2959 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2960 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2961 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2962 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2963 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
2964 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2965 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2966 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2967 [-no-audio-backend] [-audio-backend]
2968 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
2969 [-no-optimized-qmake] [-optimized-qmake]
2970 [-no-openssl] [-openssl] [-openssl-linked]
2971 [-no-gtkstyle] [-gtkstyle]
2972 [-qt-pcre] [-system-pcre]
2973 [-device <name>] [-device-option <key=value>]
2974 [additional platform specific options (see below)]
2977 Installation options:
2979 -qpa ................ This will enable the QPA build.
2980 QPA is a window system agnostic implementation of Qt.
2982 These are optional, but you may specify install directories.
2984 -prefix <dir> ...... This will install everything relative to <dir>
2985 (default $QT_INSTALL_PREFIX)
2987 if [ "$PLATFORM_QPA" = "yes" ]; then
2990 -hostprefix [dir] .. Tools and libraries needed when developing
2991 applications are installed in [dir]. If [dir] is
2992 not given, the current build directory will be used.
2998 * -prefix-install .... Force a sandboxed "local" installation of
2999 Qt. This will install into
3000 $QT_INSTALL_PREFIX, if this option is
3001 disabled then some platforms will attempt a
3002 "system" install by placing default values to
3003 be placed in a system location other than
3006 You may use these to separate different parts of the install:
3008 -bindir <dir> ......... Executables will be installed to <dir>
3009 (default PREFIX/bin)
3010 -libdir <dir> ......... Libraries will be installed to <dir>
3011 (default PREFIX/lib)
3012 -docdir <dir> ......... Documentation will be installed to <dir>
3013 (default PREFIX/doc)
3014 -headerdir <dir> ...... Headers will be installed to <dir>
3015 (default PREFIX/include)
3016 -plugindir <dir> ...... Plugins will be installed to <dir>
3017 (default PREFIX/plugins)
3018 -importdir <dir> ...... Imports for QML will be installed to <dir>
3019 (default PREFIX/imports)
3020 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3022 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3023 (default PREFIX/translations)
3024 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3025 (default PREFIX/etc/settings)
3026 -examplesdir <dir> .... Examples will be installed to <dir>
3027 (default PREFIX/examples)
3028 -testsdir <dir> ....... Tests will be installed to <dir>
3029 (default PREFIX/tests)
3031 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3034 -hostbindir <dir> .. Host executables will be installed to <dir>
3035 (default HOSTPREFIX/bin)
3036 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
3037 (default HOSTPREFIX)
3044 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3045 that needs to be evaluated. If the evaluation succeeds, the feature is
3046 included. Here is a short explanation of each option:
3048 * -release ........... Compile and link Qt with debugging turned off.
3049 -debug ............. Compile and link Qt with debugging turned on.
3050 -debug-and-release . Compile and link two versions of Qt, with and without
3051 debugging turned on (Mac only).
3053 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3055 -opensource ........ Compile and link the Open-Source Edition of Qt.
3056 -commercial ........ Compile and link the Commercial Edition of Qt.
3059 * -shared ............ Create and use shared Qt libraries.
3060 -static ............ Create and use static Qt libraries.
3062 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3064 -fast .............. Configure Qt quickly by generating Makefiles only for
3065 library and subdirectory targets. All other Makefiles
3066 are created as wrappers, which will in turn run qmake.
3068 -no-largefile ...... Disables large file support.
3069 + -largefile ......... Enables Qt to access files larger than 4 GB.
3072 if [ "$PLATFORM_QPA" = "yes" ]; then
3079 if [ "$CFG_DBUS" = "no" ]; then
3088 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3089 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3091 -no-accessibility .. Do not compile Accessibility support.
3092 * -accessibility ..... Compile Accessibility support.
3094 $SHN -no-stl ............ Do not compile STL support.
3095 $SHY -stl ............... Compile STL support.
3097 -no-sql-<driver> ... Disable SQL <driver> entirely.
3098 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3100 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3103 Possible values for <driver>:
3104 [ $CFG_SQL_AVAILABLE ]
3106 -system-sqlite ..... Use sqlite from the operating system.
3108 -no-phonon-backend.. Do not build the platform phonon plugin.
3109 + -phonon-backend..... Build the platform phonon plugin.
3111 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3112 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3114 -no-declarative-debug ..... Do not build the declarative debugging support.
3115 + -declarative-debug ....... Build the declarative debugging support.
3117 -platform target ... The operating system and compiler you are building
3120 See the README file for a list of supported
3121 operating systems and compilers.
3124 if [ "${PLATFORM_QPA}" != "yes" ]; then
3126 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3127 raster - Software rasterizer
3128 opengl - Rendering via OpenGL, Experimental!
3129 openvg - Rendering via OpenVG, Experimental!
3136 -no-mmx ............ Do not compile with use of MMX instructions.
3137 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3138 -no-sse ............ Do not compile with use of SSE instructions.
3139 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3140 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3141 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3142 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3143 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3144 -no-avx ............ Do not compile with use of AVX instructions.
3145 -no-neon ........... Do not compile with use of NEON instructions.
3146 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3147 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3149 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3150 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3152 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3154 -D <string> ........ Add an explicit define to the preprocessor.
3155 -I <string> ........ Add an explicit include path.
3156 -L <string> ........ Add an explicit library path.
3158 -help, -h .......... Display this information.
3160 Third Party Libraries:
3162 -qt-zlib ........... Use the zlib bundled with Qt.
3163 + -system-zlib ....... Use zlib from the operating system.
3164 See http://www.gzip.org/zlib
3166 -no-gif ............ Do not compile GIF reading support.
3168 -no-libpng ......... Do not compile PNG support.
3169 -qt-libpng ......... Use the libpng bundled with Qt.
3170 + -system-libpng ..... Use libpng from the operating system.
3171 See http://www.libpng.org/pub/png
3173 -no-libjpeg ........ Do not compile JPEG support.
3174 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3175 + -system-libjpeg .... Use libjpeg from the operating system.
3176 See http://www.ijg.org
3178 -no-openssl ........ Do not compile support for OpenSSL.
3179 + -openssl ........... Enable run-time OpenSSL support.
3180 -openssl-linked .... Enabled linked OpenSSL support.
3182 -qt-pcre ........... Use the PCRE library bundled with Qt.
3183 + -system-pcre ....... Use the PCRE library from the operating system.
3187 -make <part> ....... Add part to the list of parts to be built at make time.
3188 ($QT_DEFAULT_BUILD_PARTS)
3189 -nomake <part> ..... Exclude part from the list of parts to be built.
3191 -R <string> ........ Add an explicit runtime library path to the Qt
3193 -l <string> ........ Add an explicit library.
3195 -no-rpath .......... Do not use the library install path as a runtime
3197 + -rpath ............. Link Qt libraries and executables using the library
3198 install path as a runtime library path. Equivalent
3199 to -R install_libpath
3201 -continue .......... Continue as far as possible if an error occurs.
3203 -verbose, -v ....... Print verbose information about each step of the
3206 -silent ............ Reduce the build output so that warnings and errors
3207 can be seen more easily.
3209 * -no-optimized-qmake ... Do not build qmake optimized.
3210 -optimized-qmake ...... Build qmake optimized.
3212 -no-gui ............ Don't build the Qt GUI library
3214 $NSN -no-nis ............ Do not compile NIS support.
3215 $NSY -nis ............... Compile NIS support.
3217 $CUN -no-cups ........... Do not compile CUPS support.
3218 $CUY -cups .............. Compile CUPS support.
3219 Requires cups/cups.h and libcups.so.2.
3221 $CIN -no-iconv .......... Do not compile support for iconv(3).
3222 $CIY -iconv ............. Compile support for iconv(3).
3224 $PHN -no-pch ............ Do not use precompiled header support.
3225 $PHY -pch ............... Use precompiled header support.
3227 $DBN -no-dbus ........... Do not compile the QtDBus module.
3228 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3229 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3231 -reduce-relocations ..... Reduce relocations in the libraries through extra
3232 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3233 experimental; needs GNU ld >= 2.18).
3235 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3237 -device <name> ............... Cross-compile for device <name> (experimental)
3238 -device-option <key=value> ... Add device specific options for the device mkspec
3243 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3244 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3251 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3259 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3263 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3264 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3266 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3267 $XCBY -xcb ............... Compile Xcb support.
3269 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3270 $EGLFSY -eglfs ............. Compile EGLFS support.
3276 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3280 $X2N -no-xinput2......... Do not compile XInput2 support.
3281 $X2Y -xinput2............ Compile XInput2 support.
3287 if [ "$PLATFORM_X11" = "yes" ]; then
3288 if [ "$CFG_SM" = "no" ]; then
3295 if [ "$CFG_XSHAPE" = "no" ]; then
3302 if [ "$CFG_XVIDEO" = "no" ]; then
3309 if [ "$CFG_XINERAMA" = "no" ]; then
3316 if [ "$CFG_FONTCONFIG" = "no" ]; then
3323 if [ "$CFG_XCURSOR" = "no" ]; then
3330 if [ "$CFG_XFIXES" = "no" ]; then
3337 if [ "$CFG_XRANDR" = "no" ]; then
3344 if [ "$CFG_XRENDER" = "no" ]; then
3351 if [ "$CFG_MITSHM" = "no" ]; then
3358 if [ "$CFG_XINPUT" = "no" ]; then
3365 if [ "$CFG_XKB" = "no" ]; then
3372 if [ "$CFG_IM" = "no" ]; then
3383 -no-gtkstyle ....... Do not build the GTK theme integration.
3384 + -gtkstyle .......... Build the GTK theme integration.
3386 * -no-nas-sound ...... Do not compile in NAS sound support.
3387 -system-nas-sound .. Use NAS libaudio from the operating system.
3388 See http://radscan.com/nas.html
3390 -no-opengl ......... Do not support OpenGL.
3391 + -opengl <api> ...... Enable OpenGL support.
3392 With no parameter, this will auto-detect the "best"
3393 OpenGL API to use. If desktop OpenGL is available, it
3394 will be used. Use desktop or es2 for <api>
3395 to force the use of the Desktop OpenGL or
3396 OpenGL ES 2 APIs instead.
3398 -no-openvg ........ Do not support OpenVG.
3399 + -openvg ........... Enable OpenVG support.
3400 Requires EGL support, typically supplied by an OpenGL
3401 or other graphics implementation.
3403 $SMN -no-sm ............. Do not support X Session Management.
3404 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3406 $SHN -no-xshape ......... Do not compile XShape support.
3407 $SHY -xshape ............ Compile XShape support.
3408 Requires X11/extensions/shape.h.
3410 $XVN -no-xvideo ......... Do not compile XVideo support.
3411 $XVY -xvideo ............ Compile XVideo support.
3412 Requires X11/extensions/Xv.h & Xvlib.h.
3414 $SHN -no-xsync .......... Do not compile XSync support.
3415 $SHY -xsync ............. Compile XSync support.
3416 Requires X11/extensions/sync.h.
3418 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3419 $XAY -xinerama .......... Compile Xinerama support.
3420 Requires X11/extensions/Xinerama.h and libXinerama.
3421 By default, Xinerama support will be compiled if
3422 available and the shared libraries are dynamically
3425 $XCN -no-xcursor ........ Do not compile Xcursor support.
3426 $XCY -xcursor ........... Compile Xcursor support.
3427 Requires X11/Xcursor/Xcursor.h and libXcursor.
3428 By default, Xcursor support will be compiled if
3429 available and the shared libraries are dynamically
3432 $XFN -no-xfixes ......... Do not compile Xfixes support.
3433 $XFY -xfixes ............ Compile Xfixes support.
3434 Requires X11/extensions/Xfixes.h and libXfixes.
3435 By default, Xfixes support will be compiled if
3436 available and the shared libraries are dynamically
3439 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3440 $XZY -xrandr ............ Compile Xrandr support.
3441 Requires X11/extensions/Xrandr.h and libXrandr.
3443 $XRN -no-xrender ........ Do not compile Xrender support.
3444 $XRY -xrender ........... Compile Xrender support.
3445 Requires X11/extensions/Xrender.h and libXrender.
3447 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3448 $XMY -mitshm ............ Compile MIT-SHM support.
3449 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3451 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3452 $FCGY -fontconfig ........ Compile FontConfig support.
3453 Requires fontconfig/fontconfig.h, libfontconfig,
3454 freetype.h and libfreetype.
3456 $XIN -no-xinput ......... Do not compile Xinput support.
3457 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3458 which requires IRIX with wacom.h and libXi or
3459 XFree86 with X11/extensions/XInput.h and libXi.
3461 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3462 $XKY -xkb ............... Compile XKB support.
3467 if [ "$BUILD_ON_MAC" = "yes" ]; then
3472 -Fstring ........... Add an explicit framework path.
3473 -fw string ......... Add an explicit framework.
3475 * -framework ......... Build Qt as a series of frameworks and
3476 link tools against those frameworks.
3477 -no-framework ...... Do not build Qt as a series of frameworks.
3479 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3480 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3482 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3483 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3485 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3486 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3487 QT_ENABLE_HARFBUZZ environment variable.
3492 if [ "$PLATFORM_QPA" = "yes" ]; then
3498 if [ "$PLATFORM_QPA" = "yes" ]; then
3501 -xplatform target ... The target platform when cross-compiling.
3503 -no-feature-<feature> Do not compile in <feature>.
3504 -feature-<feature> .. Compile in <feature>. The available features
3505 are described in src/corelib/global/qfeatures.txt
3507 -no-freetype ........ Do not compile in Freetype2 support.
3508 -qt-freetype ........ Use the libfreetype bundled with Qt.
3509 * -system-freetype .... Use libfreetype from the operating system.
3510 See http://www.freetype.org/
3512 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3513 default ($CFG_QCONFIG).
3515 -no-opengl .......... Do not support OpenGL.
3516 -opengl <api> ....... Enable OpenGL ES support
3517 With no parameter, this will attempt to auto-detect
3518 OpenGL ES 2, or regular desktop OpenGL.
3519 Use es2 for <api> to override auto-detection.
3523 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3524 if [ "$CFG_GLIB" = "no" ]; then
3532 $GBN -no-glib ........... Do not compile Glib support.
3533 $GBY -glib .............. Compile Glib support.
3538 [ "x$ERROR" = "xyes" ] && exit 1
3543 # -----------------------------------------------------------------------------
3544 # LICENSING, INTERACTIVE PART
3545 # -----------------------------------------------------------------------------
3547 if [ "$PLATFORM_QPA" = "yes" ]; then
3548 Platform="Qt Lighthouse"
3549 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3550 Platform="Qt for Windows"
3551 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3553 Platform="Qt for Linux/X11"
3557 echo "This is the $Platform ${EditionString} Edition."
3560 if [ "$Edition" = "OpenSource" ]; then
3562 echo "You are licensed to use this software under the terms of"
3563 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3564 if [ -f "$relpath/LICENSE.GPL3" ]; then
3565 echo "You are also licensed to use this software under the terms of"
3566 echo "the GNU General Public License (GPL) versions 3."
3572 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3573 echo "You have already accepted the terms of the $LicenseType license."
3576 if [ -f "$relpath/LICENSE.GPL3" ]; then
3577 echo "Type '3' to view the GNU General Public License version 3."
3579 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3580 echo "Type 'yes' to accept this license offer."
3581 echo "Type 'no' to decline this license offer."
3583 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3587 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3589 elif [ "$acceptance" = "no" ]; then
3590 echo "You are not licensed to use this software."
3593 elif [ "$acceptance" = "3" ]; then
3594 more "$relpath/LICENSE.GPL3"
3595 elif [ "$acceptance" = "L" ]; then
3596 more "$relpath/LICENSE.LGPL"
3599 elif [ "$Edition" = "Preview" ]; then
3600 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3603 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3604 echo "You have already accepted the terms of the $LicenseType license."
3607 echo "You are licensed to use this software under the terms of"
3608 echo "the $TheLicense"
3610 echo "Type '?' to read the Preview License."
3611 echo "Type 'yes' to accept this license offer."
3612 echo "Type 'no' to decline this license offer."
3614 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3618 if [ "$acceptance" = "yes" ]; then
3620 elif [ "$acceptance" = "no" ] ;then
3621 echo "You are not licensed to use this software."
3624 elif [ "$acceptance" = "?" ]; then
3625 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3628 elif [ "$Edition" != "OpenSource" ]; then
3629 if [ -n "$ExpiryDate" ]; then
3630 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3631 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3632 Today=`date +%Y%m%d`
3633 if [ "$Today" -gt "$ExpiryDate" ]; then
3634 case "$LicenseType" in
3635 Commercial|Academic|Educational)
3636 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3638 echo "NOTICE NOTICE NOTICE NOTICE"
3640 echo " Your support and upgrade period has expired."
3642 echo " You are no longer licensed to use this version of Qt."
3643 echo " Please contact qt-info@nokia.com to renew your support"
3644 echo " and upgrades for this license."
3646 echo "NOTICE NOTICE NOTICE NOTICE"
3651 echo "WARNING WARNING WARNING WARNING"
3653 echo " Your support and upgrade period has expired."
3655 echo " You may continue to use your last licensed release"
3656 echo " of Qt under the terms of your existing license"
3657 echo " agreement. But you are not entitled to technical"
3658 echo " support, nor are you entitled to use any more recent"
3659 echo " Qt releases."
3661 echo " Please contact qt-info@nokia.com to renew your"
3662 echo " support and upgrades for this license."
3664 echo "WARNING WARNING WARNING WARNING"
3671 echo "NOTICE NOTICE NOTICE NOTICE"
3673 echo " Your Evaluation license has expired."
3675 echo " You are no longer licensed to use this software. Please"
3676 echo " contact qt-info@nokia.com to purchase license, or install"
3677 echo " the Qt Open Source Edition if you intend to develop free"
3680 echo "NOTICE NOTICE NOTICE NOTICE"
3687 TheLicense=`head -n 1 "$outpath/LICENSE"`
3689 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3690 echo "You have already accepted the terms of the $TheLicense."
3693 echo "You are licensed to use this software under the terms of"
3694 echo "the $TheLicense."
3696 echo "Type '?' to view the $TheLicense."
3697 echo "Type 'yes' to accept this license offer."
3698 echo "Type 'no' to decline this license offer."
3700 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3704 if [ "$acceptance" = "yes" ]; then
3706 elif [ "$acceptance" = "no" ]; then
3707 echo "You are not licensed to use this software."
3710 else [ "$acceptance" = "?" ]
3711 more "$outpath/LICENSE"
3716 # this should be moved somewhere else
3719 AIX_VERSION=`uname -v`
3720 if [ "$AIX_VERSION" -lt "5" ]; then
3721 QMakeVar add QMAKE_LIBS_X11 -lbind
3728 #-------------------------------------------------------------------------------
3729 # generate qconfig.cpp
3730 #-------------------------------------------------------------------------------
3731 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3733 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3735 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3736 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3738 /* Installation date */
3739 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3741 /* Installation Info */
3742 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3743 "qt_prfxpath=$QT_INSTALL_PREFIX",
3744 "qt_docspath=$QT_INSTALL_DOCS",
3745 "qt_hdrspath=$QT_INSTALL_HEADERS",
3746 "qt_libspath=$QT_INSTALL_LIBS",
3747 "qt_binspath=$QT_INSTALL_BINS",
3748 "qt_plugpath=$QT_INSTALL_PLUGINS",
3749 "qt_impspath=$QT_INSTALL_IMPORTS",
3750 "qt_datapath=$QT_INSTALL_DATA",
3751 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3752 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3753 "qt_tstspath=$QT_INSTALL_TESTS",
3754 #ifdef QT_BUILD_QMAKE
3755 "qt_ssrtpath=$CFG_SYSROOT",
3756 "qt_hpfxpath=$QT_HOST_PREFIX",
3757 "qt_hbinpath=$QT_HOST_BINS",
3758 "qt_hdatpath=$QT_HOST_DATA",
3761 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3764 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3766 /* strlen( "qt_lcnsxxxx" ) == 12 */
3767 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3768 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3770 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3773 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3774 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3775 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3777 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3778 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3779 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3782 # -----------------------------------------------------------------------------
3783 if [ "$LicenseType" = "Evaluation" ]; then
3784 EVALKEY=qt_qevalkey=$LicenseKeyExt
3785 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3786 EVALKEY=qt_qevalkey=
3789 if [ -n "$EVALKEY" ]; then
3790 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3791 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3792 /* Evaluation license key */
3793 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3795 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3799 # -----------------------------------------------------------------------------
3801 # -----------------------------------------------------------------------------
3804 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3806 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3807 if [ "$OPT_SHADOW" = "yes" ]; then
3808 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3809 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3810 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3814 # $1: input variable name (awk regexp)
3815 # $2: optional output variable name
3816 # $3: optional value transformation (sed command)
3817 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3818 # is where the resulting variable is written to
3819 setBootstrapVariable()
3821 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3825 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3826 echo "Creating qmake. Please wait..."
3829 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3830 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3831 if [ -f "$QCONFIG_H" ]; then
3832 OLD_QCONFIG_H=$QCONFIG_H
3833 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3836 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3837 # when building qmake, we use #defines for the install paths,
3838 # however they are real functions in the library
3839 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3840 mkdir -p "$outpath/src/corelib/global"
3841 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3842 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3845 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3847 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3848 rm -rf mkspecs/default
3849 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3850 mkdir -p "$outpath/qmake" || exit
3852 for mkfile in GNUmakefile Makefile; do
3855 in_mkfile="${mkfile}.in"
3856 if [ "$mkfile" = "Makefile" ]; then
3857 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3858 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3860 in_mkfile="${mkfile}.unix"
3862 in_mkfile="$relpath/qmake/$in_mkfile"
3863 mkfile="$outpath/qmake/$mkfile"
3864 if [ -f "$mkfile" ]; then
3865 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3868 [ -f "$in_mkfile" ] || continue
3870 echo "########################################################################" > "$mkfile"
3871 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3872 echo "########################################################################" >> "$mkfile"
3875 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3876 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3877 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3879 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3880 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3883 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3884 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3885 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3886 setBootstrapVariable QMAKE_CFLAGS
3887 setBootstrapVariable QMAKE_CXXFLAGS
3888 setBootstrapVariable QMAKE_LFLAGS
3890 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3891 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3892 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3894 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3895 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3896 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3897 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3898 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3899 elif [ "$CFG_DEBUG" = "yes" ]; then
3900 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3901 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3902 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3903 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3906 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3907 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3908 for rpath in $RPATH_FLAGS; do
3909 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3912 if [ "$BUILD_ON_MAC" = "yes" ]; then
3913 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3914 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3915 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3916 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3917 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3918 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3919 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3920 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3921 if [ '!' -z "$CFG_SDK" ]; then
3922 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3923 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3924 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3925 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3926 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3929 if [ '!' -z "$D_FLAGS" ]; then
3930 for DEF in $D_FLAGS; do
3931 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3934 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3935 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3936 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3937 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3939 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3940 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3941 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3942 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3943 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3944 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3945 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3946 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3947 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3948 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3950 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3951 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3952 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3953 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3958 QMAKE_BUILD_ERROR=no
3959 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3960 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3961 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3962 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3965 #-------------------------------------------------------------------------------
3966 # tests that need qmake
3967 #-------------------------------------------------------------------------------
3969 #-------------------------------------------------------------------------------
3970 # determine the target and host architectures
3971 #-------------------------------------------------------------------------------
3973 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3974 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'`
3976 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3977 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3978 # Do the same test again, using the host compiler
3979 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'`
3980 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3982 # not cross compiling, host == target
3983 CFG_HOST_ARCH="$CFG_ARCH"
3986 if [ "$OPT_VERBOSE" = "yes" ]; then
3987 echo "System architecture: '$CFG_ARCH'"
3988 if [ "$PLATFORM_QPA" = "yes" ]; then
3989 echo "Host architecture: '$CFG_HOST_ARCH'"
3993 #-------------------------------------------------------------------------------
3994 # functionality tests
3995 #-------------------------------------------------------------------------------
3997 # detect availability of float math.h functions
3998 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3999 CFG_USE_FLOATMATH=yes
4001 CFG_USE_FLOATMATH=no
4004 # detect mmx support
4005 if [ "${CFG_MMX}" = "auto" ]; then
4006 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4013 # detect 3dnow support
4014 if [ "${CFG_3DNOW}" = "auto" ]; then
4015 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4022 # detect sse support
4023 if [ "${CFG_SSE}" = "auto" ]; then
4024 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4031 # detect sse2 support
4032 if [ "${CFG_SSE2}" = "auto" ]; then
4033 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4040 # detect sse3 support
4041 if [ "${CFG_SSE3}" = "auto" ]; then
4042 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4049 # detect ssse3 support
4050 if [ "${CFG_SSSE3}" = "auto" ]; then
4051 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4058 # detect sse4.1 support
4059 if [ "${CFG_SSE4_1}" = "auto" ]; then
4060 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
4067 # detect sse4.2 support
4068 if [ "${CFG_SSE4_2}" = "auto" ]; then
4069 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
4076 # detect avx support
4077 if [ "${CFG_AVX}" = "auto" ]; then
4078 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4085 # check iWMMXt support
4086 if [ "$CFG_IWMMXT" = "yes" ]; then
4087 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4088 if [ $? != "0" ]; then
4089 echo "The iWMMXt functionality test failed!"
4090 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4095 # detect neon support
4096 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4097 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
4102 elif [ "$CFG_ARCH" != "arm" ]; then
4106 # detect mips_dsp support
4107 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
4113 # detect mips_dspr2 support
4114 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
4120 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4123 if [ "$CFG_ZLIB" = "no" ]; then
4124 # Note: Qt no longer support builds without zlib
4125 # So we force a "no" to be "auto" here.
4126 # If you REALLY really need no zlib support, you can still disable
4127 # it by doing the following:
4128 # add "no-zlib" to mkspecs/qconfig.pri
4129 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4131 # There's no guarantee that Qt will build under those conditions
4136 if [ "$CFG_ZLIB" = "auto" ]; then
4137 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
4144 if [ "$CFG_LARGEFILE" = "auto" ]; then
4145 #Large files should be enabled for all Linux systems
4149 if [ "$CFG_GUI" = "no" ]; then
4150 QPA_PLATFORM_GUARD=no
4153 # detect how jpeg should be built
4154 if [ "$CFG_JPEG" = "auto" ]; then
4155 if [ "$CFG_SHARED" = "yes" ]; then
4162 if [ "$CFG_LIBJPEG" = "auto" ]; then
4163 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
4170 # detect how gif should be built
4171 if [ "$CFG_GIF" = "auto" ]; then
4172 if [ "$CFG_SHARED" = "yes" ]; then
4180 if [ "$CFG_LIBPNG" = "auto" ]; then
4181 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
4188 # detect accessibility
4189 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4190 CFG_ACCESSIBILITY=yes
4193 if [ "$CFG_EGLFS" = "yes" ]; then
4194 if [ "$CFG_EGL" = "no" ]; then
4195 echo "The EGLFS plugin requires EGL support and cannot be built"
4201 # auto-detect SQL-modules support
4202 for _SQLDR in $CFG_SQL_AVAILABLE; do
4205 if [ "$CFG_SQL_mysql" != "no" ]; then
4206 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4207 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4208 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4209 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4210 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4211 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4212 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4214 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4215 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4216 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4217 echo " You need MySql 4 or higher."
4218 echo " If you believe this message is in error you may use the continue"
4219 echo " switch (-continue) to $0 to continue."
4224 QT_LFLAGS_MYSQL_R=""
4228 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
4229 QMakeVar add CONFIG use_libmysqlclient_r
4230 if [ "$CFG_SQL_mysql" = "auto" ]; then
4231 CFG_SQL_mysql=plugin
4233 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4234 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
4235 if [ "$CFG_SQL_mysql" = "auto" ]; then
4236 CFG_SQL_mysql=plugin
4239 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4240 echo "MySQL support cannot be enabled due to functionality tests!"
4241 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4242 echo " If you believe this message is in error you may use the continue"
4243 echo " switch (-continue) to $0 to continue."
4248 QT_LFLAGS_MYSQL_R=""
4256 if [ "$CFG_SQL_psql" != "no" ]; then
4257 # Be careful not to use native pg_config when cross building.
4258 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4259 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4260 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4262 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4263 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4264 # But, respect PSQL_LIBS if set
4265 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4266 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
4267 if [ "$CFG_SQL_psql" = "auto" ]; then
4271 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4272 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4273 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4274 echo " If you believe this message is in error you may use the continue"
4275 echo " switch (-continue) to $0 to continue."
4286 if [ "$CFG_SQL_odbc" != "no" ]; then
4287 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
4288 if [ "$CFG_SQL_odbc" = "auto" ]; then
4292 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
4293 QT_LFLAGS_ODBC="-liodbc"
4294 if [ "$CFG_SQL_odbc" = "auto" ]; then
4298 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4299 echo "ODBC support cannot be enabled due to functionality tests!"
4300 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4301 echo " If you believe this message is in error you may use the continue"
4302 echo " switch (-continue) to $0 to continue."
4312 if [ "$CFG_SQL_oci" != "no" ]; then
4313 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
4314 if [ "$CFG_SQL_oci" = "auto" ]; then
4318 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4319 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4320 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4321 echo " If you believe this message is in error you may use the continue"
4322 echo " switch (-continue) to $0 to continue."
4331 if [ "$CFG_SQL_tds" != "no" ]; then
4332 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4333 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4334 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
4335 if [ "$CFG_SQL_tds" = "auto" ]; then
4339 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4340 echo "TDS support cannot be enabled due to functionality tests!"
4341 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4342 echo " If you believe this message is in error you may use the continue"
4343 echo " switch (-continue) to $0 to continue."
4352 if [ "$CFG_SQL_db2" != "no" ]; then
4353 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
4354 if [ "$CFG_SQL_db2" = "auto" ]; then
4358 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4359 echo "ODBC support cannot be enabled due to functionality tests!"
4360 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4361 echo " If you believe this message is in error you may use the continue"
4362 echo " switch (-continue) to $0 to continue."
4371 if [ "$CFG_SQL_ibase" != "no" ]; then
4372 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
4373 if [ "$CFG_SQL_ibase" = "auto" ]; then
4374 CFG_SQL_ibase=plugin
4377 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4378 echo "InterBase support cannot be enabled due to functionality tests!"
4379 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4380 echo " If you believe this message is in error you may use the continue"
4381 echo " switch (-continue) to $0 to continue."
4390 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4391 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
4392 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4393 CFG_SQL_sqlite2=plugin
4396 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4397 echo "SQLite2 support cannot be enabled due to functionality tests!"
4398 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4399 echo " If you believe this message is in error you may use the continue"
4400 echo " switch (-continue) to $0 to continue."
4409 if [ "$CFG_SQL_sqlite" != "no" ]; then
4410 SQLITE_AUTODETECT_FAILED="no"
4411 if [ "$CFG_SQLITE" = "system" ]; then
4412 if [ -n "$PKG_CONFIG" ]; then
4413 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4414 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4416 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
4417 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4418 CFG_SQL_sqlite=plugin
4420 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4422 SQLITE_AUTODETECT_FAILED="yes"
4425 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4426 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4427 CFG_SQL_sqlite=plugin
4430 SQLITE_AUTODETECT_FAILED="yes"
4434 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4435 echo "SQLite support cannot be enabled due to functionality tests!"
4436 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4437 echo " If you believe this message is in error you may use the continue"
4438 echo " switch (-continue) to $0 to continue."
4444 if [ "$OPT_VERBOSE" = "yes" ]; then
4445 echo "unknown SQL driver: $_SQLDR"
4451 # auto-detect NIS support
4452 if [ "$CFG_NIS" != "no" ]; then
4453 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
4456 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4457 echo "NIS support cannot be enabled due to functionality tests!"
4458 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4459 echo " If you believe this message is in error you may use the continue"
4460 echo " switch (-continue) to $0 to continue."
4468 # auto-detect CUPS support
4469 if [ "$CFG_CUPS" != "no" ]; then
4470 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
4473 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4474 echo "Cups support cannot be enabled due to functionality tests!"
4475 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4476 echo " If you believe this message is in error you may use the continue"
4477 echo " switch (-continue) to $0 to continue."
4485 # auto-detect iconv(3) support
4486 if [ "$CFG_ICONV" != "no" ]; then
4487 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4489 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
4491 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
4493 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
4496 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4497 echo "Iconv support cannot be enabled due to functionality tests!"
4498 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4499 echo " If you believe this message is in error you may use the continue"
4500 echo " switch (-continue) to $0 to continue."
4508 # auto-detect libdbus-1 support
4509 if [ "$CFG_DBUS" != "no" ]; then
4510 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4511 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4512 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4514 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
4515 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4516 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4517 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4519 if [ "$CFG_DBUS" = "auto" ]; then
4521 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4522 # CFG_DBUS is "yes" or "linked" here
4524 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4525 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4526 echo " If you believe this message is in error you may use the continue"
4527 echo " switch (-continue) to $0 to continue."
4534 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4536 # auto-detect Glib support
4537 if [ "$CFG_GLIB" != "no" ]; then
4538 if [ -n "$PKG_CONFIG" ]; then
4539 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4540 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4542 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 $X11TESTS_FLAGS ; then
4544 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4545 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4547 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4548 echo "Glib support cannot be enabled due to functionality tests!"
4549 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4550 echo " If you believe this message is in error you may use the continue"
4551 echo " switch (-continue) to $0 to continue."
4560 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4561 if [ -n "$PKG_CONFIG" ]; then
4562 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4563 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4565 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 $X11TESTS_FLAGS; then
4567 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4568 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4570 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4571 echo "Gstreamer support cannot be enabled due to functionality tests!"
4572 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4573 echo " If you believe this message is in error you may use the continue"
4574 echo " switch (-continue) to $0 to continue."
4580 elif [ "$CFG_GLIB" = "no" ]; then
4584 # auto-detect libicu support
4585 if [ "$CFG_ICU" != "no" ]; then
4586 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4587 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4589 if [ "$CFG_ICU" = "auto" ]; then
4591 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4594 echo "The ICU library support cannot be enabled."
4595 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4596 echo " If you believe this message is in error you may use the continue"
4597 echo " switch (-continue) to $0 to continue."
4603 # Auto-detect PulseAudio support
4604 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4605 if [ -n "$PKG_CONFIG" ]; then
4606 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4607 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4609 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 $X11TESTS_FLAGS; then
4611 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4612 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4614 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4615 echo "PulseAudio support cannot be enabled due to functionality tests!"
4616 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4617 echo " If you believe this message is in error you may use the continue"
4618 echo " switch (-continue) to $0 to continue."
4628 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4629 x11tests="$relpath/config.tests/x11"
4632 # work around broken X11 headers when using GCC 2.95 or later
4634 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4635 if [ $NOTYPE = "yes" ]; then
4636 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4637 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4640 # Check we actually have X11 :-)
4641 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4642 if [ $? != "0" ]; then
4643 echo "Basic XLib functionality test failed!"
4644 echo " You might need to modify the include and library search paths by editing"
4645 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4651 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4652 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4653 if [ "$CFG_GUI" = "no" ]; then
4654 if [ "$CFG_OPENGL" = "auto" ]; then
4657 if [ "$CFG_OPENGL" != "no" ]; then
4658 echo "OpenGL enabled, but GUI disabled."
4659 echo " You might need to either enable the GUI or disable OpenGL"
4663 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4664 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4666 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
4669 if [ "$CFG_OPENGL" = "yes" ]; then
4670 echo "All the OpenGL functionality tests failed!"
4671 echo " You might need to modify the include and library search paths by editing"
4672 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4673 echo " ${XQMAKESPEC}."
4680 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4681 if [ "$CFG_OPENGL" = "desktop" ]; then
4682 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4683 if [ $? != "0" ]; then
4684 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4691 elif [ "$CFG_OPENGL" = "es2" ]; then
4693 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4694 if [ $? != "0" ]; then
4695 echo "The OpenGL ES 2.0 functionality test failed!"
4696 echo " You might need to modify the include and library search paths by editing"
4697 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4698 echo " ${XQMAKESPEC}."
4701 elif [ "$CFG_OPENGL" = "desktop" ]; then
4702 # Desktop OpenGL support
4703 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4704 if [ $? != "0" ]; then
4705 echo "The OpenGL functionality test failed!"
4706 echo " You might need to modify the include and library search paths by editing"
4707 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4708 echo " ${XQMAKESPEC}."
4713 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4714 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4715 if [ $? != "0" ]; then
4716 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4723 fi # X11/MINGW OpenGL
4726 if [ "$PLATFORM_X11" = "yes" ]; then
4727 # auto-detect Xcursor support
4728 if [ "$CFG_XCURSOR" != "no" ]; then
4729 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xcursor "Xcursor" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4730 if [ "$CFG_XCURSOR" != "runtime" ]; then
4734 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4735 echo "Xcursor support cannot be enabled due to functionality tests!"
4736 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4737 echo " If you believe this message is in error you may use the continue"
4738 echo " switch (-continue) to $0 to continue."
4746 # auto-detect Xfixes support
4747 if [ "$CFG_XFIXES" != "no" ]; then
4748 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4749 if [ "$CFG_XFIXES" != "runtime" ]; then
4753 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4754 echo "Xfixes support cannot be enabled due to functionality tests!"
4755 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4756 echo " If you believe this message is in error you may use the continue"
4757 echo " switch (-continue) to $0 to continue."
4765 # auto-detect Xrandr support (resize and rotate extension)
4766 if [ "$CFG_XRANDR" != "no" ]; then
4767 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrandr "Xrandr" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4768 if [ "$CFG_XRANDR" != "runtime" ]; then
4772 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4773 echo "Xrandr support cannot be enabled due to functionality tests!"
4774 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4775 echo " If you believe this message is in error you may use the continue"
4776 echo " switch (-continue) to $0 to continue."
4784 # auto-detect Xrender support
4785 if [ "$CFG_XRENDER" != "no" ]; then
4786 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4789 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4790 echo "Xrender support cannot be enabled due to functionality tests!"
4791 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4792 echo " If you believe this message is in error you may use the continue"
4793 echo " switch (-continue) to $0 to continue."
4801 # auto-detect MIT-SHM support
4802 if [ "$CFG_MITSHM" != "no" ]; then
4803 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/mitshm "mitshm" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4806 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4807 echo "MITSHM support cannot be enabled due to functionality tests!"
4808 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4809 echo " If you believe this message is in error you may use the continue"
4810 echo " switch (-continue) to $0 to continue."
4818 # auto-detect Session Management support
4819 if [ "$CFG_SM" = "auto" ]; then
4820 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/sm "Session Management" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4823 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4824 echo "Session Management support cannot be enabled due to functionality tests!"
4825 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4826 echo " If you believe this message is in error you may use the continue"
4827 echo " switch (-continue) to $0 to continue."
4835 # auto-detect SHAPE support
4836 if [ "$CFG_XSHAPE" != "no" ]; then
4837 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xshape "XShape" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4840 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4841 echo "XShape support cannot be enabled due to functionality tests!"
4842 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4843 echo " If you believe this message is in error you may use the continue"
4844 echo " switch (-continue) to $0 to continue."
4852 # auto-detect XVideo support
4853 if [ "$CFG_XVIDEO" != "no" ]; then
4854 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xvideo "XVideo" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4857 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4858 echo "XVideo support cannot be enabled due to functionality tests!"
4859 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4860 echo " If you believe this message is in error you may use the continue"
4861 echo " switch (-continue) to $0 to continue."
4869 # auto-detect XSync support
4870 if [ "$CFG_XSYNC" != "no" ]; then
4871 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4874 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4875 echo "XSync support cannot be enabled due to functionality tests!"
4876 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4877 echo " If you believe this message is in error you may use the continue"
4878 echo " switch (-continue) to $0 to continue."
4886 # auto-detect Xinerama support
4887 if [ "$CFG_XINERAMA" != "no" ]; then
4888 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinerama "Xinerama" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4889 if [ "$CFG_XINERAMA" != "runtime" ]; then
4893 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4894 echo "Xinerama support cannot be enabled due to functionality tests!"
4895 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4896 echo " If you believe this message is in error you may use the continue"
4897 echo " switch (-continue) to $0 to continue."
4905 # auto-detect Xinput support
4906 if [ "$CFG_XINPUT" != "no" ]; then
4907 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput "XInput" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4908 if [ "$CFG_XINPUT" != "runtime" ]; then
4912 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4913 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4914 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4915 echo " If you believe this message is in error you may use the continue"
4916 echo " switch (-continue) to $0 to continue."
4924 # auto-detect XKB support
4925 if [ "$CFG_XKB" != "no" ]; then
4926 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xkb "XKB" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4929 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4930 echo "XKB support cannot be enabled due to functionality tests!"
4931 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4932 echo " If you believe this message is in error you may use the continue"
4933 echo " switch (-continue) to $0 to continue."
4941 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4942 if [ -n "$PKG_CONFIG" ]; then
4943 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4944 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4946 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4948 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4949 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4951 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4952 echo "Gtk theme support cannot be enabled due to functionality tests!"
4953 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4954 echo " If you believe this message is in error you may use the continue"
4955 echo " switch (-continue) to $0 to continue."
4961 elif [ "$CFG_GLIB" = "no" ]; then
4966 # auto-detect FontConfig support
4967 if [ "$CFG_FONTCONFIG" != "no" ]; then
4968 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4969 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4970 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4972 QT_CFLAGS_FONTCONFIG=
4973 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4975 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4977 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4978 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4979 CFG_LIBFREETYPE=system
4981 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4982 echo "FontConfig support cannot be enabled due to functionality tests!"
4983 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4984 echo " If you believe this message is in error you may use the continue"
4985 echo " switch (-continue) to $0 to continue."
4994 if [ "$BUILD_ON_MAC" = "yes" ]; then
4995 if [ "$CFG_PHONON" != "no" ]; then
4996 # Always enable Phonon (unless it was explicitly disabled)
5000 if [ "$CFG_COREWLAN" = "auto" ]; then
5001 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
5009 if [ "$PLATFORM_QPA" = "yes" ]; then
5010 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5011 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5012 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5014 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
5017 if [ "$CFG_OPENGL" = "yes" ]; then
5018 echo "All the OpenGL functionality tests failed!"
5019 echo " You might need to modify the include and library search paths by editing"
5020 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5021 echo " ${XQMAKESPEC}."
5026 elif [ "$CFG_OPENGL" = "es2" ]; then
5028 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5029 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5030 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5031 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5032 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5033 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5034 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5035 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5038 "$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
5039 if [ $? != "0" ]; then
5040 echo "The OpenGL ES 2.0 functionality test failed!"
5041 echo " You might need to modify the include and library search paths by editing"
5042 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5043 echo " ${XQMAKESPEC}."
5046 elif [ "$CFG_OPENGL" = "desktop" ]; then
5047 # Desktop OpenGL support
5048 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5049 if [ $? != "0" ]; then
5050 echo "The OpenGL functionality test failed!"
5051 echo " You might need to modify the include and library search paths by editing"
5052 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5053 echo " ${XQMAKESPEC}."
5058 # auto-detect FontConfig support
5059 if [ "$CFG_FONTCONFIG" != "no" ]; then
5060 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5061 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5062 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5064 QT_CFLAGS_FONTCONFIG=
5065 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5067 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
5068 QT_CONFIG="$QT_CONFIG fontconfig"
5069 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5070 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5071 CFG_LIBFREETYPE=system
5076 # Save these for a check later
5077 ORIG_CFG_XCB="$CFG_XCB"
5078 ORIG_CFG_EGLFS="$CFG_EGLFS"
5080 if [ "$CFG_LIBUDEV" != "no" ]; then
5081 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5082 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5083 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5084 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5085 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5087 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
5089 QT_CONFIG="$QT_CONFIG libudev"
5090 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5091 echo "The libudev functionality test failed!"
5095 QMakeVar add DEFINES QT_NO_LIBUDEV
5099 if [ "$CFG_EVDEV" != "no" ]; then
5100 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5102 QT_CONFIG="$QT_CONFIG evdev"
5103 elif [ "$CFG_EVDEV" = "yes" ]; then
5104 echo "The evdev functionality test failed!"
5108 QMakeVar add DEFINES QT_NO_EVDEV
5112 # Check we actually have X11 :-)
5113 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5114 QT_CONFIG="$QT_CONFIG xlib"
5117 # auto-detect Xrender support
5118 if [ "$CFG_XRENDER" != "no" ]; then
5119 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5121 QT_CONFIG="$QT_CONFIG xrender"
5123 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5124 echo "Xrender support cannot be enabled due to functionality tests!"
5125 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5126 echo " If you believe this message is in error you may use the continue"
5127 echo " switch (-continue) to $0 to continue."
5135 if [ "$CFG_XCB" != "no" ]; then
5136 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
5137 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5138 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5140 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
5142 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
5143 QT_CONFIG="$QT_CONFIG xcb-render"
5146 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
5148 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5151 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
5152 QT_CONFIG="$QT_CONFIG xcb-xlib"
5155 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5156 # auto-detect XInput2/Xinput support
5157 if [ "$CFG_XINPUT2" != "no" ]; then
5158 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5162 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5163 echo "XInput2 support cannot be enabled due to functionality tests!"
5164 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5165 echo " If you believe this message is in error you may use the continue"
5166 echo " switch (-continue) to $0 to continue."
5175 if [ "$CFG_XCB" = "yes" ]; then
5176 echo "The XCB test failed!"
5177 echo " You might need to install dependency packages."
5178 echo " See src/plugins/platforms/xcb/README."
5182 QMakeVar add DEFINES QT_NO_XCB
5186 # Detect libxkbcommon
5187 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5188 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5189 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5190 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5191 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5193 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5197 if [ "$CFG_EGL" != "no" ]; then
5198 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
5199 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5200 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
5201 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
5202 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
5203 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
5204 fi # detect EGL support
5205 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
5207 elif [ "$CFG_EGL" = "yes" ]; then
5208 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
5209 echo " You might need to modify the include and library search paths by editing"
5210 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
5217 if [ "$CFG_EGLFS" != "no" ]; then
5218 CFG_EGLFS="$CFG_EGL"
5221 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5222 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5223 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5224 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5227 if [ "$BUILD_ON_MAC" = "yes" ]; then
5228 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
5229 QT_CONFIG="$QT_CONFIG coreservices"
5231 QMakeVar add DEFINES QT_NO_CORESERVICES
5235 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5236 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
5237 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
5238 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
5239 echo "No QPA platform plugin enabled!"
5240 echo " If you really want to build without a QPA platform plugin you must pass"
5241 echo " -no-xcb and -no-eglfs to configure. Doing this will"
5242 echo " produce a Qt that cannot run GUI applications."
5243 echo " The dependencies needed for xcb to build are listed in"
5244 echo " src/plugins/platforms/xcb/README"
5252 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5255 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5256 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5257 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
5258 CFG_LIBFREETYPE=system
5265 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5269 if [ "$CFG_STL" != "no" ]; then
5270 if [ "$HAVE_STL" = "yes" ]; then
5273 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5274 echo "STL support cannot be enabled due to functionality tests!"
5275 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5276 echo " If you believe this message is in error you may use the continue"
5277 echo " switch (-continue) to $0 to continue."
5285 # detect POSIX clock_gettime()
5286 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5287 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
5288 CFG_CLOCK_GETTIME=yes
5290 CFG_CLOCK_GETTIME=no
5294 # detect POSIX monotonic clocks
5295 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5296 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
5297 CFG_CLOCK_MONOTONIC=yes
5299 CFG_CLOCK_MONOTONIC=no
5301 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5302 CFG_CLOCK_MONOTONIC=no
5306 if [ "$CFG_MREMAP" = "auto" ]; then
5307 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5314 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5315 if [ "$CFG_GETADDRINFO" != "no" ]; then
5316 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5319 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5320 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5321 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5322 echo " If you believe this message is in error you may use the continue"
5323 echo " switch (-continue) to $0 to continue."
5331 # find if the platform provides inotify
5332 if [ "$CFG_INOTIFY" != "no" ]; then
5333 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5336 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5337 echo "inotify support cannot be enabled due to functionality tests!"
5338 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5339 echo " If you believe this message is in error you may use the continue"
5340 echo " switch (-continue) to $0 to continue."
5348 # find if the platform provides if_nametoindex (ipv6 interface name support)
5349 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5350 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
5353 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5354 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5355 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5356 echo " If you believe this message is in error you may use the continue"
5357 echo " switch (-continue) to $0 to continue."
5365 # find if the platform provides getifaddrs (network interface enumeration)
5366 if [ "$CFG_GETIFADDRS" != "no" ]; then
5367 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5370 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5371 echo "getifaddrs support cannot be enabled due to functionality tests!"
5372 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5373 echo " If you believe this message is in error you may use the continue"
5374 echo " switch (-continue) to $0 to continue."
5383 if [ "$CFG_OPENSSL" != "no" ]; then
5384 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
5385 if [ "$CFG_OPENSSL" = "auto" ]; then
5389 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5390 echo "OpenSSL support cannot be enabled due to functionality tests!"
5391 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5392 echo " If you believe this message is in error you may use the continue"
5393 echo " switch (-continue) to $0 to continue."
5402 if [ "$CFG_PCRE" != "qt" ]; then
5403 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5406 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5407 echo "PCRE support cannot be enabled due to functionality tests!"
5408 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5409 echo " If you believe this message is in error you may use the continue"
5410 echo " switch (-continue) to $0 to continue."
5418 # detect OpenVG support
5419 if [ "$CFG_OPENVG" != "no" ]; then
5420 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
5421 if [ "$CFG_OPENVG" = "auto" ]; then
5424 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
5425 if [ "$CFG_OPENVG" = "auto" ]; then
5428 CFG_OPENVG_ON_OPENGL=yes
5429 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
5430 if [ "$CFG_OPENVG" = "auto" ]; then
5433 CFG_OPENVG_LC_INCLUDES=yes
5434 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
5435 if [ "$CFG_OPENVG" = "auto" ]; then
5438 CFG_OPENVG_LC_INCLUDES=yes
5439 CFG_OPENVG_ON_OPENGL=yes
5441 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5442 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5443 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5444 echo " If you believe this message is in error you may use the continue"
5445 echo " switch (-continue) to $0 to continue."
5451 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
5452 CFG_OPENVG_SHIVA=yes
5456 if [ "$CFG_ALSA" = "auto" ]; then
5457 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5464 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5465 if [ "$CFG_ARCH" = "arm" ]; then
5466 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5467 if [ $? != "0" ]; then
5468 CFG_JAVASCRIPTCORE_JIT=no
5471 case "$XPLATFORM" in
5473 CFG_JAVASCRIPTCORE_JIT=no
5479 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5480 QMakeVar set JAVASCRIPTCORE_JIT yes
5481 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5482 QMakeVar set JAVASCRIPTCORE_JIT no
5485 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5486 CFG_AUDIO_BACKEND=yes
5489 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5490 echo "Warning: largefile support cannot be disabled for win32."
5494 #-------------------------------------------------------------------------------
5495 # ask for all that hasn't been auto-detected or specified in the arguments
5496 #-------------------------------------------------------------------------------
5498 # enable dwarf2 support on Mac
5499 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5500 QT_CONFIG="$QT_CONFIG dwarf2"
5503 # Detect the default arch (x86 or x86_64) on Mac OS X
5504 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5506 case `file "${outpath}/bin/qmake"` in
5514 # unsupported/unknown
5518 if [ -n "$DEFAULT_ARCH" ]; then
5519 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5520 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5521 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5522 # Make the application arch follow the Qt arch
5523 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5528 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5529 QT_CONFIG="$QT_CONFIG phonon-backend"
5532 # disable accessibility
5533 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5534 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5536 QT_CONFIG="$QT_CONFIG accessibility"
5540 if [ "$CFG_EGL" = "yes" ]; then
5541 QT_CONFIG="$QT_CONFIG egl"
5543 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5547 if [ "$CFG_EGLFS" = "yes" ]; then
5548 QT_CONFIG="$QT_CONFIG eglfs"
5550 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5554 if [ "$CFG_OPENVG" = "no" ]; then
5555 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5557 QT_CONFIG="$QT_CONFIG openvg"
5558 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5559 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5561 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5562 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5564 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5565 QT_CONFIG="$QT_CONFIG shivavg"
5566 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5571 if [ "$CFG_OPENGL" = "no" ]; then
5572 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5574 QT_CONFIG="$QT_CONFIG opengl"
5577 if [ "$CFG_OPENGL" = "es2" ]; then
5578 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5581 if [ "$CFG_OPENGL" = "es2" ]; then
5582 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5583 QT_CONFIG="$QT_CONFIG opengles2"
5586 # safe execution environment
5587 if [ "$CFG_SXE" != "no" ]; then
5588 QT_CONFIG="$QT_CONFIG sxe"
5591 # build up the variables for output
5592 if [ "$CFG_DEBUG" = "yes" ]; then
5593 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5594 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5595 elif [ "$CFG_DEBUG" = "no" ]; then
5596 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5597 QMAKE_CONFIG="$QMAKE_CONFIG release"
5599 if [ "$CFG_SHARED" = "yes" ]; then
5600 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5601 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5602 elif [ "$CFG_SHARED" = "no" ]; then
5603 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5604 QMAKE_CONFIG="$QMAKE_CONFIG static"
5606 if [ "$PLATFORM_QPA" = "yes" ]; then
5607 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5608 QT_CONFIG="$QT_CONFIG qpa"
5609 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5610 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5613 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5614 # Do not set this here for Windows. Let qmake do it so
5615 # debug and release precompiled headers are kept separate.
5616 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5618 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5619 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5620 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5621 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5622 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5623 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5625 if [ "$CFG_STL" = "no" ]; then
5626 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5628 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5630 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5631 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5633 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5634 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5635 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5636 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5637 QMakeVar add QMAKE_CFLAGS -g
5638 QMakeVar add QMAKE_CXXFLAGS -g
5639 QT_CONFIG="$QT_CONFIG separate_debug_info"
5641 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5642 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5644 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5645 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5646 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5647 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5648 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5649 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5650 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5651 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5652 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5653 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5654 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5655 if [ "$CFG_ARCH" = "mips" ]; then
5656 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5657 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5659 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5660 QT_CONFIG="$QT_CONFIG clock-gettime"
5662 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5663 QT_CONFIG="$QT_CONFIG clock-monotonic"
5665 if [ "$CFG_MREMAP" = "yes" ]; then
5666 QT_CONFIG="$QT_CONFIG mremap"
5668 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5669 QT_CONFIG="$QT_CONFIG getaddrinfo"
5671 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5672 QT_CONFIG="$QT_CONFIG ipv6ifname"
5674 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5675 QT_CONFIG="$QT_CONFIG getifaddrs"
5677 if [ "$CFG_INOTIFY" = "yes" ]; then
5678 QT_CONFIG="$QT_CONFIG inotify"
5680 if [ "$CFG_LIBJPEG" = "no" ]; then
5682 elif [ "$CFG_LIBJPEG" = "system" ]; then
5683 QT_CONFIG="$QT_CONFIG system-jpeg"
5685 if [ "$CFG_JPEG" = "no" ]; then
5686 QT_CONFIG="$QT_CONFIG no-jpeg"
5687 elif [ "$CFG_JPEG" = "yes" ]; then
5688 QT_CONFIG="$QT_CONFIG jpeg"
5690 if [ "$CFG_LIBPNG" = "no" ]; then
5693 if [ "$CFG_LIBPNG" = "system" ]; then
5694 QT_CONFIG="$QT_CONFIG system-png"
5696 if [ "$CFG_PNG" = "no" ]; then
5697 QT_CONFIG="$QT_CONFIG no-png"
5698 elif [ "$CFG_PNG" = "yes" ]; then
5699 QT_CONFIG="$QT_CONFIG png"
5701 if [ "$CFG_GIF" = "no" ]; then
5702 QT_CONFIG="$QT_CONFIG no-gif"
5703 elif [ "$CFG_GIF" = "yes" ]; then
5704 QT_CONFIG="$QT_CONFIG gif"
5706 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5707 QT_CONFIG="$QT_CONFIG no-freetype"
5708 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5709 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5710 QT_CONFIG="$QT_CONFIG system-freetype"
5712 QT_CONFIG="$QT_CONFIG freetype"
5714 if [ "$CFG_GUI" = "auto" ]; then
5717 if [ "$CFG_GUI" = "no" ]; then
5718 QT_CONFIG="$QT_CONFIG no-gui"
5721 if [ "$CFG_WIDGETS" = "no" ]; then
5722 QT_CONFIG="$QT_CONFIG no-widgets"
5723 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5726 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5727 #On Mac we implicitly link against libz, so we
5728 #never use the 3rdparty stuff.
5729 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5731 if [ "$CFG_ZLIB" = "yes" ]; then
5732 QT_CONFIG="$QT_CONFIG zlib"
5733 elif [ "$CFG_ZLIB" = "system" ]; then
5734 QT_CONFIG="$QT_CONFIG system-zlib"
5737 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5738 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5739 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5740 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5741 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5742 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5743 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5744 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5745 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5746 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5747 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5748 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5749 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5750 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5752 if [ "$PLATFORM_X11" = "yes" ]; then
5753 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5755 # for some reason, the following libraries are not always built shared,
5756 # so *every* program/lib (including Qt) has to link against them
5757 if [ "$CFG_XSHAPE" = "yes" ]; then
5758 QT_CONFIG="$QT_CONFIG xshape"
5760 if [ "$CFG_XVIDEO" = "yes" ]; then
5761 QT_CONFIG="$QT_CONFIG xvideo"
5763 if [ "$CFG_XSYNC" = "yes" ]; then
5764 QT_CONFIG="$QT_CONFIG xsync"
5766 if [ "$CFG_XINERAMA" = "yes" ]; then
5767 QT_CONFIG="$QT_CONFIG xinerama"
5768 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5770 if [ "$CFG_XCURSOR" = "yes" ]; then
5771 QT_CONFIG="$QT_CONFIG xcursor"
5772 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5774 if [ "$CFG_XFIXES" = "yes" ]; then
5775 QT_CONFIG="$QT_CONFIG xfixes"
5776 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5778 if [ "$CFG_XRANDR" = "yes" ]; then
5779 QT_CONFIG="$QT_CONFIG xrandr"
5780 if [ "$CFG_XRENDER" != "yes" ]; then
5781 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5782 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5784 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5787 if [ "$CFG_XRENDER" = "yes" ]; then
5788 QT_CONFIG="$QT_CONFIG xrender"
5789 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5791 if [ "$CFG_MITSHM" = "yes" ]; then
5792 QT_CONFIG="$QT_CONFIG mitshm"
5794 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5795 QT_CONFIG="$QT_CONFIG fontconfig"
5797 if [ "$CFG_XINPUT" = "yes" ]; then
5798 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5800 if [ "$CFG_XINPUT" = "yes" ]; then
5801 QT_CONFIG="$QT_CONFIG xinput tablet"
5803 if [ "$CFG_XKB" = "yes" ]; then
5804 QT_CONFIG="$QT_CONFIG xkb"
5808 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5809 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5810 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5812 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5813 if [ "$CFG_RPATH" = "yes" ]; then
5814 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5815 # set the default rpath to the library installation directory
5816 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5818 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5819 if [ -n "$RPATH_FLAGS" ]; then
5821 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5825 elif [ "$CFG_RPATH" = "yes" ]; then
5826 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5830 if [ "$CFG_RPATH" = "yes" ]; then
5831 # set the default rpath to the library installation directory
5832 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5834 if [ -n "$RPATH_FLAGS" ]; then
5835 # add the user defined rpaths
5836 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5840 if [ '!' -z "$I_FLAGS" ]; then
5841 # add the user define include paths
5842 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5843 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5846 if [ '!' -z "$W_FLAGS" ]; then
5847 # add the user defined warning flags
5848 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5849 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5850 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5853 # turn off exceptions for the compilers that support it
5854 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5855 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5857 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5860 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5861 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5864 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5865 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5866 # Follow default behavior of configure.exe by overriding with "rtti".
5867 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5870 if [ "$CFG_ALSA" = "yes" ]; then
5871 QT_CONFIG="$QT_CONFIG alsa"
5874 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5875 QT_CONFIG="$QT_CONFIG pulseaudio"
5878 if [ "$CFG_COREWLAN" = "yes" ]; then
5879 QT_CONFIG="$QT_CONFIG corewlan"
5882 if [ "$CFG_ICU" = "yes" ]; then
5883 QT_CONFIG="$QT_CONFIG icu"
5886 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5887 QT_CONFIG="$QT_CONFIG force_asserts"
5890 if [ "$CFG_PCRE" = "qt" ]; then
5891 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5895 # Some Qt modules are too advanced in C++ for some old compilers
5896 # Detect here the platforms where they are known to work.
5898 # See Qt documentation for more information on which features are
5899 # supported and on which compilers.
5901 canBuildQtConcurrent="yes"
5902 canUseV8Snapshot="yes"
5904 case "$XPLATFORM" in
5906 # PA-RISC's assembly is too limited
5907 # gcc 3.4 on that platform can't build QtXmlPatterns
5908 # the assembly it generates cannot be compiled
5910 # Check gcc's version
5911 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5915 canBuildQtXmlPatterns="no"
5919 canBuildQtXmlPatterns="no"
5923 unsupported/vxworks-*-g++*)
5926 unsupported/vxworks-*-dcc*)
5928 canBuildQtXmlPatterns="no"
5931 # Check gcc's version
5932 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5940 canBuildQtXmlPatterns="no"
5945 # Check the compiler version
5946 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5949 canBuildQtXmlPatterns="no"
5950 canBuildQtConcurrent="no"
5954 canBuildQtConcurrent="no"
5960 canBuildQtXmlPatterns="no"
5961 canBuildQtConcurrent="no"
5967 # Get the xlC version
5968 cat > xlcver.c <<EOF
5972 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5977 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5978 xlcver=`./xlcver 2>/dev/null`
5981 if [ "$OPT_VERBOSE" = "yes" ]; then
5982 if [ -n "$xlcver" ]; then
5983 echo Found IBM xlC version: $xlcver.
5985 echo Could not determine IBM xlC version, assuming oldest supported.
5992 canBuildQtXmlPatterns="no"
5993 canBuildQtConcurrent="no"
5997 canBuildQtConcurrent="no"
6003 canBuildQtConcurrent="no"
6007 if [ "$CFG_GUI" = "no" ]; then
6008 # WebKit requires QtGui
6012 if [ "$CFG_SHARED" = "no" ]; then
6014 echo "WARNING: Using static linking will disable the WebKit module."
6019 CFG_CONCURRENT="yes"
6020 if [ "$canBuildQtConcurrent" = "no" ]; then
6021 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6024 QT_CONFIG="$QT_CONFIG concurrent"
6028 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6029 QT_CONFIG="$QT_CONFIG audio-backend"
6033 if [ "$CFG_WEBKIT" = "debug" ]; then
6034 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6038 QT_CONFIG="$QT_CONFIG v8"
6039 # Detect snapshot support
6040 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6041 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6044 *) canUseV8Snapshot="no"
6048 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6049 # QEMU crashes when building inside Scratchbox with an ARM target
6050 canUseV8Snapshot="no"
6053 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6054 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6056 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6057 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6060 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6061 QT_CONFIG="$QT_CONFIG v8snapshot"
6065 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6066 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6069 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6072 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6073 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6074 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6079 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6080 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6081 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6088 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6094 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6096 case "$COMPILER_VERSION" in
6098 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6099 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6100 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6103 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6104 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6105 QT_GCC_PATCH_VERSION=0
6115 #-------------------------------------------------------------------------------
6116 # part of configuration information goes into qconfig.h
6117 #-------------------------------------------------------------------------------
6119 case "$CFG_QCONFIG" in
6121 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6124 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6125 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6126 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6127 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6128 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6129 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6131 echo "#endif" >>"$tmpconfig"
6135 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6139 # define QT_EDITION $QT_EDITION
6143 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6144 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6146 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6147 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6150 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6151 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6154 if [ "$BUILD_ON_MAC" = "yes" ]; then
6155 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6156 #if defined(__LP64__)
6157 # define QT_POINTER_SIZE 8
6159 # define QT_POINTER_SIZE 4
6163 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6164 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6167 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6168 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6169 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6173 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6175 if [ "$CFG_DEV" = "yes" ]; then
6176 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6179 if [ "$PLATFORM_QPA" = "yes" ]; then
6180 # Add QPA to config.h
6181 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6184 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6185 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6188 # Add turned on SQL drivers
6189 for DRIVER in $CFG_SQL_AVAILABLE; do
6190 eval "VAL=\$CFG_SQL_$DRIVER"
6193 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6194 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6195 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6198 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6204 QMakeVar set sql-drivers "$SQL_DRIVERS"
6205 QMakeVar set sql-plugins "$SQL_PLUGINS"
6207 # Add other configuration options to the qconfig.h file
6208 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6209 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6210 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6211 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6212 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6213 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6214 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6216 # X11/Unix/Mac only configs
6217 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6218 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6219 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6220 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6221 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6222 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6223 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6224 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6225 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6226 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6227 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6228 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6229 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6230 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6232 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6233 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6234 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6235 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6236 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6237 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6238 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6239 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6240 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6241 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6242 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6243 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6244 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6246 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6247 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6248 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6249 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6250 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6251 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6252 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6253 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6255 # sort QCONFIG_FLAGS for neatness if we can
6256 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6257 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6259 if [ -n "$QCONFIG_FLAGS" ]; then
6260 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6261 #ifndef QT_BOOTSTRAPPED
6264 for cfg in $QCONFIG_FLAGS; do
6265 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6266 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6267 # figure out define logic, so we can output the correct
6268 # ifdefs to override the global defines in a project
6270 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6271 # QT_NO_option can be forcefully turned on by QT_option
6272 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6273 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6274 # QT_option can be forcefully turned off by QT_NO_option
6275 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6278 if [ -z $cfgdNeg ]; then
6279 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6286 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6287 #if defined($cfgd) && defined($cfgdNeg)
6289 #elif !defined($cfgd) && !defined($cfgdNeg)
6296 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6297 #endif // QT_BOOTSTRAPPED
6302 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6303 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6304 #define QT_VISIBILITY_AVAILABLE
6309 if [ -n "$QT_LIBINFIX" ]; then
6310 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6311 #define QT_LIBINFIX "$QT_LIBINFIX"
6316 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6317 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6318 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6320 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6321 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6322 chmod -w "$outpath/src/corelib/global/qconfig.h"
6323 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6324 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6328 #-------------------------------------------------------------------------------
6329 # save configuration into qconfig.pri
6330 #-------------------------------------------------------------------------------
6331 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6332 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6333 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6334 if [ "$CFG_DEBUG" = "yes" ]; then
6335 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6336 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6337 QT_CONFIG="$QT_CONFIG release"
6339 QT_CONFIG="$QT_CONFIG debug"
6340 elif [ "$CFG_DEBUG" = "no" ]; then
6341 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6342 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6343 QT_CONFIG="$QT_CONFIG debug"
6345 QT_CONFIG="$QT_CONFIG release"
6347 if [ "$CFG_STL" = "yes" ]; then
6348 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6350 if [ "$CFG_FRAMEWORK" = "no" ]; then
6351 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6353 QT_CONFIG="$QT_CONFIG qt_framework"
6354 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6356 if [ "$CFG_DEV" = "yes" ]; then
6357 QT_CONFIG="$QT_CONFIG private_tests"
6360 cat >>"$QTCONFIG.tmp" <<EOF
6362 CONFIG += $QTCONFIG_CONFIG
6364 QT_HOST_ARCH = $CFG_HOST_ARCH
6365 QT_EDITION = $Edition
6366 QT_CONFIG += $QT_CONFIG
6369 QT_VERSION = $QT_VERSION
6370 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6371 QT_MINOR_VERSION = $QT_MINOR_VERSION
6372 QT_PATCH_VERSION = $QT_PATCH_VERSION
6375 QT_LIBINFIX = $QT_LIBINFIX
6376 QT_NAMESPACE = $QT_NAMESPACE
6379 if [ -n "$CFG_SYSROOT" ]; then
6380 echo "# sysroot" >>"$QTCONFIG.tmp"
6381 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6382 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6383 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6384 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6385 echo "}" >> "$QTCONFIG.tmp"
6386 echo >> "$QTCONFIG.tmp"
6388 if [ -n "$RPATH_FLAGS" ]; then
6389 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
6391 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6392 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6393 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6394 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6397 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6398 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6399 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6402 # replace qconfig.pri if it differs from the newly created temp file
6403 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6404 rm -f "$QTCONFIG.tmp"
6406 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6409 #-------------------------------------------------------------------------------
6410 # save configuration into qmodule.pri
6411 #-------------------------------------------------------------------------------
6412 QTMODULE="$outpath/mkspecs/qmodule.pri"
6414 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6416 # Ensure we can link to uninistalled libraries
6417 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6418 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6420 if [ -n "$QT_CFLAGS_PSQL" ]; then
6421 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6423 if [ -n "$QT_LFLAGS_PSQL" ]; then
6424 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6426 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6427 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6429 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6430 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6432 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6433 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6435 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6436 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6438 if [ -n "$QT_LFLAGS_ODBC" ]; then
6439 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6441 if [ -n "$QT_LFLAGS_TDS" ]; then
6442 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6445 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6446 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6449 #dump in the OPENSSL_LIBS info
6450 if [ '!' -z "$OPENSSL_LIBS" ]; then
6451 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6452 elif [ "$CFG_OPENSSL" = "linked" ]; then
6453 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6456 #dump in the SDK info
6457 if [ '!' -z "$CFG_SDK" ]; then
6458 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6462 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6463 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6465 # replace qmodule.pri if it differs from the newly created temp file
6466 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6467 rm -f "$QTMODULE.tmp"
6469 mv -f "$QTMODULE.tmp" "$QTMODULE"
6472 #-------------------------------------------------------------------------------
6473 # save configuration into .qmake.cache
6474 #-------------------------------------------------------------------------------
6476 CACHEFILE="$outpath/.qmake.cache"
6477 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6478 cat >>"$CACHEFILE.tmp" <<EOF
6480 QT_SOURCE_TREE = \$\$quote($relpath)
6481 QT_BUILD_TREE = \$\$quote($outpath)
6482 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6484 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6485 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6486 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6488 include(\$\$PWD/mkspecs/qmodule.pri)
6489 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6493 #dump the qmake spec
6494 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6495 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6497 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6500 # replace .qmake.cache if it differs from the newly created temp file
6501 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6502 rm -f "$CACHEFILE.tmp"
6504 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6507 #-------------------------------------------------------------------------------
6508 # give feedback on configuration
6509 #-------------------------------------------------------------------------------
6513 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6516 This target is using the GNU C++ compiler ($PLATFORM).
6518 Recent versions of this compiler automatically include code for
6519 exceptions, which increase both the size of the Qt libraries and
6520 the amount of memory taken by your applications.
6522 You may choose to re-run `basename $0` with the -no-exceptions
6523 option to compile Qt without exceptions. This is completely binary
6524 compatible, and existing applications will continue to work.
6532 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6535 This target is using the MIPSpro C++ compiler ($PLATFORM).
6537 You may choose to re-run `basename $0` with the -no-exceptions
6538 option to compile Qt without exceptions. This will make the
6539 size of the Qt library smaller and reduce the amount of memory
6540 taken by your applications.
6552 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6553 echo "Build type: $PLATFORM"
6555 echo "Building on: $PLATFORM"
6556 echo "Building for: $XPLATFORM"
6559 echo "Architecture: $CFG_ARCH"
6560 if [ "$PLATFORM_QPA" = "yes" ]; then
6561 echo "Host architecture: $CFG_HOST_ARCH"
6564 if [ -n "$PLATFORM_NOTES" ]; then
6565 echo "Platform notes:"
6566 echo "$PLATFORM_NOTES"
6571 if [ "$OPT_VERBOSE" = "yes" ]; then
6572 echo $ECHO_N "qmake vars .......... $ECHO_C"
6573 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6574 echo "qmake switches ......... $QMAKE_SWITCHES"
6577 echo "Build .................. $CFG_BUILD_PARTS"
6578 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6579 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6580 echo "Debug .................. yes (combined)"
6581 if [ "$CFG_DEBUG" = "yes" ]; then
6582 echo "Default Link ........... debug"
6584 echo "Default Link ........... release"
6587 echo "Debug .................. $CFG_DEBUG"
6589 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6590 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6591 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6592 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6593 echo "QtGui module ........... $CFG_GUI"
6594 echo "QtWidgets module ....... $CFG_WIDGETS"
6595 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6596 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6598 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6600 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6601 echo "STL support ............ $CFG_STL"
6602 echo "PCH support ............ $CFG_PRECOMPILE"
6603 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6604 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6605 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6606 echo "AVX..................... ${CFG_AVX}"
6607 elif [ "$CFG_ARCH" = "arm" ]; then
6608 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6609 echo "NEON support ........... ${CFG_NEON}"
6611 if [ "$CFG_ARCH" = "mips" ]; then
6612 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
6614 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6615 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6616 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6617 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6618 echo "NIS support ............ $CFG_NIS"
6619 echo "CUPS support ........... $CFG_CUPS"
6620 echo "Iconv support .......... $CFG_ICONV"
6621 echo "Glib support ........... $CFG_GLIB"
6622 echo "GStreamer support ...... $CFG_GSTREAMER"
6623 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6624 echo "Large File support ..... $CFG_LARGEFILE"
6625 echo "GIF support ............ $CFG_GIF"
6626 if [ "$CFG_JPEG" = "no" ]; then
6627 echo "JPEG support ........... $CFG_JPEG"
6629 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6631 if [ "$CFG_PNG" = "no" ]; then
6632 echo "PNG support ............ $CFG_PNG"
6634 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6636 echo "zlib support ........... $CFG_ZLIB"
6637 echo "Session management ..... $CFG_SM"
6638 echo "libudev support ........ $CFG_LIBUDEV"
6640 if [ "$CFG_OPENGL" = "desktop" ]; then
6641 echo "OpenGL support ......... yes (Desktop OpenGL)"
6642 elif [ "$CFG_OPENGL" = "es2" ]; then
6643 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6645 echo "OpenGL support ......... no"
6648 if [ "$CFG_OPENVG" ]; then
6649 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6650 echo "OpenVG support ......... ShivaVG"
6652 echo "OpenVG support ......... $CFG_OPENVG"
6655 if [ "$PLATFORM_X11" = "yes" ]; then
6656 echo "NAS sound support ...... $CFG_NAS"
6657 echo "XShape support ......... $CFG_XSHAPE"
6658 echo "XVideo support ......... $CFG_XVIDEO"
6659 echo "XSync support .......... $CFG_XSYNC"
6660 echo "Xinerama support ....... $CFG_XINERAMA"
6661 echo "Xcursor support ........ $CFG_XCURSOR"
6662 echo "Xfixes support ......... $CFG_XFIXES"
6663 echo "Xrandr support ......... $CFG_XRANDR"
6664 echo "Xi support ............. $CFG_XINPUT"
6665 echo "MIT-SHM support ........ $CFG_MITSHM"
6666 echo "FontConfig support ..... $CFG_FONTCONFIG"
6667 echo "XKB Support ............ $CFG_XKB"
6668 echo "immodule support ....... $CFG_IM"
6669 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6671 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6672 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6673 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6674 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6675 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6676 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6677 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6678 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6679 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6682 if [ "$CFG_OPENSSL" = "yes" ]; then
6683 OPENSSL_LINKAGE="(run-time)"
6684 elif [ "$CFG_OPENSSL" = "linked" ]; then
6685 OPENSSL_LINKAGE="(linked)"
6687 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6688 echo "Alsa support ........... $CFG_ALSA"
6689 if [ "$BUILD_ON_MAC" = "yes" ]; then
6690 echo "CoreWlan support ....... $CFG_COREWLAN"
6692 echo "libICU support ......... $CFG_ICU"
6693 echo "PCRE support ........... $CFG_PCRE"
6694 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6695 echo "Xcb support ............ limited (old version)"
6697 echo "Xcb support ............ $CFG_XCB"
6699 echo "Xrender support ........ $CFG_XRENDER"
6700 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6701 echo "XInput2 support ........ $CFG_XINPUT2"
6703 echo "EGLFS support .......... $CFG_EGLFS"
6706 # complain about not being able to use dynamic plugins if we are using a static build
6707 if [ "$CFG_SHARED" = "no" ]; then
6709 echo "WARNING: Using static linking will disable the use of dynamically"
6710 echo "loaded plugins. Make sure to import all needed static plugins,"
6711 echo "or compile needed modules into the library."
6714 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6716 echo "NOTE: When linking against OpenSSL, you can override the default"
6717 echo "library names through OPENSSL_LIBS."
6719 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6722 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6724 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6725 echo "if you want a pure debug build."
6730 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6735 #-------------------------------------------------------------------------------
6736 # build makefiles based on the configuration
6737 #-------------------------------------------------------------------------------
6739 echo "Finding project files. Please wait..."
6740 if [ "$CFG_NOPROCESS" != "yes" ]; then
6741 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6742 if [ -f "${relpath}/qtbase.pro" ]; then
6743 mkfile="${outpath}/Makefile"
6744 [ -f "$mkfile" ] && chmod +w "$mkfile"
6745 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6749 # .projects -> projects to process
6750 # .projects.1 -> qt and moc
6751 # .projects.2 -> subdirs and libs
6752 # .projects.3 -> the rest
6753 rm -f .projects .projects.1 .projects.2 .projects.3
6755 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6756 if [ -z "$AWK" ]; then
6757 for p in `echo $QMAKE_PROJECTS`; do
6758 echo "$p" >> .projects
6761 cat >projects.awk <<EOF
6767 first = "./.projects.1.tmp"
6768 second = "./.projects.2.tmp"
6769 third = "./.projects.3.tmp"
6774 if ( ! target_file )
6776 print input_file >target_file
6781 input_file = FILENAME
6786 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6789 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6790 target_file = second
6795 matched_target == 0 && /^(TEMPLATE.*=)/ {
6796 if ( \$3 == "subdirs" )
6797 target_file = second
6798 else if ( \$3 == "lib" )
6804 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6805 if ( \$0 ~ /plugin/ )
6808 target_file = second
6813 if ( ! target_file )
6815 print input_file >>target_file
6822 for p in `echo $QMAKE_PROJECTS`; do
6823 echo "$p" >> .projects.all
6826 # if you get errors about the length of the command line to awk, change the -l arg
6828 split -l 100 .projects.all .projects.all.
6829 for p in .projects.all.*; do
6830 "$AWK" -f projects.awk `cat $p`
6831 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6832 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6833 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6834 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6836 rm -f .projects.all* projects.awk
6838 [ -f .projects.1 ] && cat .projects.1 >>.projects
6839 [ -f .projects.2 ] && cat .projects.2 >>.projects
6840 rm -f .projects.1 .projects.2
6841 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6842 cat .projects.3 >>.projects
6846 # don't sort Qt and MOC in with the other project files
6847 # also work around a segfaulting uniq(1)
6848 if [ -f .sorted.projects.2 ]; then
6849 sort .sorted.projects.2 > .sorted.projects.2.new
6850 mv -f .sorted.projects.2.new .sorted.projects.2
6851 cat .sorted.projects.2 >> .sorted.projects.1
6853 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6854 rm -f .sorted.projects.2 .sorted.projects.1
6858 if [ -f .projects ]; then
6859 uniq .projects >.tmp
6860 mv -f .tmp .projects
6861 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6863 if [ -f .projects.3 ]; then
6864 uniq .projects.3 >.tmp
6865 mv -f .tmp .projects.3
6866 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6868 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6872 for part in $CFG_BUILD_PARTS; do
6874 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6875 libs) PART_ROOTS="$PART_ROOTS src" ;;
6876 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6877 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6882 if [ "$CFG_DEV" = "yes" ]; then
6883 PART_ROOTS="$PART_ROOTS tests"
6886 echo "Creating makefiles. Please wait..."
6887 for file in .projects .projects.3; do
6888 [ '!' -f "$file" ] && continue
6889 for a in `cat $file`; do
6891 for r in $PART_ROOTS; do
6892 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6897 [ "$IN_ROOT" = "no" ] && continue
6900 *winmain/winmain.pro)
6901 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6905 */qmake/qmake.pro) continue ;;
6906 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6907 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6913 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6914 test -d "$dir" || mkdir -p "$dir"
6915 OUTDIR="$outpath/$dir"
6916 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6917 # fast configure - the makefile exists, skip it
6918 # since the makefile exists, it was generated by qmake, which means we
6919 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6921 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6924 QMAKE_SPEC_ARGS="-spec $SPEC"
6925 echo $ECHO_N " for $a$ECHO_C"
6927 QMAKE="$outpath/bin/qmake"
6928 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6929 if [ "$file" = ".projects.3" ]; then
6932 cat >"${OUTDIR}/Makefile" <<EOF
6933 # ${OUTDIR}/Makefile: generated by configure
6935 # WARNING: This makefile will be replaced with a real makefile.
6936 # All changes made to this file will be lost.
6938 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6940 cat >>"${OUTDIR}/Makefile" <<EOF
6942 all clean install qmake first Makefile: FORCE
6943 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6951 if [ "$OPT_VERBOSE" = "yes" ]; then
6952 echo " (`basename $SPEC`)"
6953 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6958 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6959 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6963 rm -f .projects .projects.3
6965 #-------------------------------------------------------------------------------
6966 # check for platforms that we don't yet know about
6967 #-------------------------------------------------------------------------------
6968 if [ "$CFG_ARCH" = "unknown" ]; then
6971 NOTICE: configure was unable to determine the architecture
6972 for the $XQMAKESPEC target.
6974 Qt will not use a specialized implementation for any atomic
6975 operations. Instead a generic implemention based on either GCC
6976 intrinsics or C++11 std::atomic<T> will be used (when
6977 available). The generic implementations are generally as fast
6978 as and always as safe as a specialized implementation.
6980 If no generic implementation is available, Qt will use a
6981 fallback UNIX implementation which uses a single
6982 pthread_mutex_t to protect all atomic operations. This
6983 implementation is the slow (but safe) fallback implementation
6984 for architectures Qt does not yet support.
6988 #-------------------------------------------------------------------------------
6989 # check if the user passed the -no-zlib option, which is no longer supported
6990 #-------------------------------------------------------------------------------
6991 if [ -n "$ZLIB_FORCED" ]; then
6992 which_zlib="supplied"
6993 if [ "$CFG_ZLIB" = "system" ]; then
6999 NOTICE: The -no-zlib option was supplied but is no longer
7002 Qt now requires zlib support in all builds, so the -no-zlib
7003 option was ignored. Qt will be built using the $which_zlib
7008 #-------------------------------------------------------------------------------
7009 # check if the user passed the obsoleted -wayland or -no-wayland flag
7010 #-------------------------------------------------------------------------------
7011 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
7014 NOTICE: The -wayland and -no-wayland flags are now obsolete
7016 All configuring of QtWayland plugin and QtCompositor happens in the module
7020 #-------------------------------------------------------------------------------
7021 # check if the user passed the obsoleted -arch or -host-arch options
7022 #-------------------------------------------------------------------------------
7023 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
7026 NOTICE: The -arch and -host-arch options are obsolete.
7028 Qt now detects the target and host architectures based on compiler
7029 output. Qt will be built using $CFG_ARCH for the target architecture
7030 and $CFG_HOST_ARCH for the host architecture (note that these two
7031 will be the same unless you are cross-compiling).
7035 #-------------------------------------------------------------------------------
7036 # finally save the executed command to another script
7037 #-------------------------------------------------------------------------------
7038 if [ `basename $0` != "config.status" ]; then
7039 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7041 # add the system variables
7042 for varname in $SYSTEM_VARIABLES; do
7044 'if [ -n "\$'${varname}'" ]; then
7045 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7050 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7052 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7053 echo "#!/bin/sh" > "$outpath/config.status"
7054 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
7055 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
7056 [ -n "$PKG_CONFIG_LIBDIR" ] && \
7057 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
7058 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7059 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7060 echo "else" >> "$outpath/config.status"
7061 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7062 echo "fi" >> "$outpath/config.status"
7063 chmod +x "$outpath/config.status"
7066 if [ -n "$RPATH_MESSAGE" ]; then
7068 echo "$RPATH_MESSAGE"
7071 MAKE=`basename "$MAKE"`
7073 echo Qt is now configured for building. Just run \'$MAKE\'.
7074 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7075 echo Once everything is built, Qt is installed.
7076 echo You should not run \'$MAKE install\'.
7078 echo Once everything is built, you must run \'$MAKE install\'.
7079 echo Qt will be installed into $QT_INSTALL_PREFIX
7082 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.