2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
74 DEVICE_VARS_FILE=.device.vars
77 :> "$DEVICE_VARS_FILE"
79 #-------------------------------------------------------------------------------
81 #-------------------------------------------------------------------------------
85 echo "$@" | sed 's/ /\ /g'
88 # Adds a new qmake variable to the cache
89 # Usage: QMakeVar mode varname contents
90 # where mode is one of: set, add, del
104 echo >&2 "BUG: wrong command to QMakeVar: $1"
108 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
111 # Helper function for getQMakeConf. It parses include statements in
112 # qmake.conf and prints out the expanded file
115 while read line; do case "$line" in
117 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
118 current_dir=`dirname "$1"`
119 conf_file="$current_dir/$inc_file"
120 if [ ! -f "$conf_file" ]; then
121 echo "WARNING: Unable to find file $conf_file" >&2
124 getQMakeConf1 "$conf_file"
136 values["LITERAL_WHITESPACE"] = " "
137 values["LITERAL_DOLLAR"] = "$"
139 /^[_A-Z0-9.]+[ \t]*\+?=/ {
140 valStart = index($0, "=") + 1
143 if (substr($0, valStart - 2, 1) == "+") {
147 variable = substr($0, 0, valStart - 2 - append)
148 value = substr($0, valStart)
149 gsub("[ \t]+", "", variable)
150 gsub("^[ \t]+", "", value)
151 gsub("[ \t]+$", "", value)
154 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
155 ovalue = ovalue substr(value, 1, RSTART - 1)
156 var = substr(value, RSTART + 2, RLENGTH - 2)
157 value = substr(value, RSTART + RLENGTH)
159 var = substr(var, 2, length(var) - 2)
161 ovalue = ovalue values[var]
163 ovalue = ovalue value
165 combinedValue = values[variable]
166 if (append == 1 && length(combinedValue) > 0) {
167 combinedValue = combinedValue " " ovalue
169 combinedValue = ovalue
171 values[variable] = combinedValue
174 for (var in values) {
175 print var "=" values[var]
183 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
186 # relies on $QMAKESPEC being set correctly. parses include statements in
187 # qmake.conf and prints out the expanded file
190 if [ -z "$specvals" ]; then
191 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
193 getQMakeConf3 "$1" "$specvals"
198 if [ -z "$xspecvals" ]; then
199 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$xspecvals"
204 # relies on $TEST_COMPILER being set correctly
205 compilerSupportsFlag()
207 cat >conftest.cpp <<EOF
208 int main() { return 0; }
210 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
212 rm -f conftest.cpp conftest.o
216 # relies on $TEST_COMPILER being set correctly
222 safe_flag=`shellEscape "$flag"`
223 lflags=$lflags,$safe_flag
225 compilerSupportsFlag "$lflags" >/dev/null 2>&1
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
238 echo >&2 "BUG: wrong command to QMakeVar: $1"
242 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
245 #-------------------------------------------------------------------------------
246 # operating system detection
247 #-------------------------------------------------------------------------------
249 # need that throughout the script
250 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
251 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
252 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
253 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
255 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
256 if echo '\c' | grep '\c' >/dev/null; then
262 #-------------------------------------------------------------------------------
263 # window system detection
264 #-------------------------------------------------------------------------------
268 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
273 #-----------------------------------------------------------------------------
274 # Qt version detection
275 #-----------------------------------------------------------------------------
276 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
280 if [ -n "$QT_VERSION" ]; then
281 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
282 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
283 if [ -n "$MAJOR" ]; then
284 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
285 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
286 QT_MAJOR_VERSION="$MAJOR"
287 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
288 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
291 if [ -z "$QT_MAJOR_VERSION" ]; then
292 echo "Cannot process version from qglobal.h: $QT_VERSION"
293 echo "Cannot proceed."
297 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
298 if [ -z "$QT_PACKAGEDATE" ]; then
299 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
300 echo "Cannot proceed"
304 #-------------------------------------------------------------------------------
306 #-------------------------------------------------------------------------------
310 EditionString=Commercial
314 # parse the arguments, setting things to "yes" or "no"
315 while [ "$#" -gt 0 ]; do
319 #Autoconf style options
321 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
325 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
329 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
330 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
333 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
336 -h|help|--help|-help)
337 if [ "$VAL" = "yes" ]; then
339 COMMERCIAL_USER="no" #doesn't matter we will display the help
342 COMMERCIAL_USER="no" #doesn't matter we will display the help
346 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
350 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
357 if [ "$UNKNOWN_ARG" = "yes" ]; then
369 COMMERCIAL_USER="yes"
383 if [ "$COMMERCIAL_USER" = "ask" ]; then
385 echo "Which edition of Qt do you want to use ?"
387 echo "Type 'c' if you want to use the Commercial Edition."
388 echo "Type 'o' if you want to use the Open Source Edition."
392 if [ "$commercial" = "c" ]; then
393 COMMERCIAL_USER="yes"
395 elif [ "$commercial" = "o" ]; then
402 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
403 # Commercial preview release
404 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
407 QT_EDITION="QT_EDITION_DESKTOP"
408 LicenseType="Technology Preview"
409 elif [ $COMMERCIAL_USER = "yes" ]; then
410 # one of commercial editions
411 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
413 # read in the license file
414 if [ -f "$LICENSE_FILE" ]; then
415 . "$LICENSE_FILE" >/dev/null 2>&1
416 if [ -z "$LicenseKeyExt" ]; then
418 echo "You are using an old license file."
420 echo "Please install the license file supplied by Nokia,"
421 echo "or install the Qt Open Source Edition if you intend to"
422 echo "develop free software."
425 if [ -z "$Licensee" ]; then
427 echo "Invalid license key. Please check the license key."
431 if [ -z "$LicenseKeyExt" ]; then
433 echo $ECHO_N "Please enter your license key: $ECHO_C"
435 Licensee="Unknown user"
440 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
441 && LicenseValid="yes" \
443 if [ "$LicenseValid" != "yes" ]; then
445 echo "Invalid license key. Please check the license key."
448 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
449 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
450 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
451 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
453 # determine which edition we are licensed to use
454 case "$LicenseTypeCode" in
456 LicenseType="Commercial"
460 QT_EDITION="QT_EDITION_UNIVERSAL"
463 Edition="FullFramework"
464 EditionString="Full Framework"
465 QT_EDITION="QT_EDITION_DESKTOP"
468 Edition="GUIFramework"
469 EditionString="GUI Framework"
470 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
475 LicenseType="Evaluation"
476 QMakeVar add DEFINES QT_EVAL
480 QT_EDITION="QT_EDITION_EVALUATION"
485 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
487 echo "Invalid license key. Please check the license key."
491 # verify that we are licensed to use Qt on this platform
493 case "$PlatformCode" in
496 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
500 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
503 ### EMBEDDED_QPA logic missing ###
504 case "$PlatformCode,$PLATFORM_MAC" in
505 X9,* | XC,* | XU,* | XW,* | XM,*)
507 LICENSE_EXTENSION="-ALLOS"
509 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
510 # Qt for Embedded Linux
511 LICENSE_EXTENSION="-EMBEDDED"
513 6M,* | N7,* | N9,* | NX,*)
515 LICENSE_EXTENSION="-EMBEDDED"
517 FM,* | LM,yes | ZM,no)
519 LICENSE_EXTENSION="-DESKTOP"
523 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
525 echo "You are not licensed for the $Platform platform."
527 echo "Please contact qt-info@nokia.com to upgrade your license to"
528 echo "include the $Platform platform, or install the Qt Open Source Edition"
529 echo "if you intend to develop free software."
534 if test -r "$relpath/.LICENSE"; then
535 # Generic, non-final license
537 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
542 *TECHNOLOGY?PREVIEW*)
549 echo >&2 "Invalid license files; cannot continue"
554 EditionString="$Edition"
555 QT_EDITION="QT_EDITION_DESKTOP"
558 case "$LicenseFeatureCode" in
561 case "$LicenseType" in
563 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
566 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
572 case "$LicenseType" in
574 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
577 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
583 echo "Invalid license key. Please check the license key."
587 case "$LicenseFeatureCode" in
595 if [ '!' -f "$outpath/LICENSE" ]; then
596 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
597 echo "this software has disappeared."
599 echo "Sorry, you are not licensed to use this software."
600 echo "Try re-installing."
604 elif [ $COMMERCIAL_USER = "no" ]; then
605 # Open Source edition - may only be used under the terms of the GPL or LGPL.
606 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
607 Licensee="Open Source"
609 EditionString="Open Source"
610 QT_EDITION="QT_EDITION_OPENSOURCE"
613 #-------------------------------------------------------------------------------
614 # initalize variables
615 #-------------------------------------------------------------------------------
617 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
618 for varname in $SYSTEM_VARIABLES; do
619 qmakevarname="${varname}"
620 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
621 if [ "${varname}" = "LDFLAGS" ]; then
622 qmakevarname="LFLAGS"
623 elif [ "${varname}" = "LD" ]; then
627 'if [ -n "\$'${varname}'" ]; then
628 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
632 # Use CC/CXX to run config.tests
633 mkdir -p "$outpath/config.tests"
634 rm -f "$outpath/config.tests/.qmake.cache"
635 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
637 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
639 # QTDIR may be set and point to an old or system-wide Qt installation
642 # the minimum version of libdbus-1 that we require:
643 MIN_DBUS_1_VERSION=0.93
645 # initalize internal variables
646 CFG_CONFIGURE_EXIT_ON_ERROR=yes
648 CFG_GUI=auto # (yes|no|auto)
674 CFG_OPENVG_LC_INCLUDES=no
675 CFG_OPENVG_SHIVA=auto
676 CFG_OPENVG_ON_OPENGL=auto
682 QT_DEFAULT_BUILD_PARTS="libs examples"
686 CFG_AUDIO_BACKEND=auto
689 CFG_JAVASCRIPTCORE_JIT=auto
692 # Target architecture
694 # Host architecture, same as CFG_ARCH when not cross-compiling
696 # Set when the -arch or -host-arch arguments are used
697 OPT_OBSOLETE_HOST_ARG=no
709 CFG_OBSOLETE_WAYLAND=no
721 CFG_SEPARATE_DEBUG_INFO=no
722 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
723 CFG_REDUCE_EXPORTS=auto
731 CFG_REDUCE_RELOCATIONS=auto
732 CFG_ACCESSIBILITY=auto
737 CFG_CLOCK_GETTIME=auto
738 CFG_CLOCK_MONOTONIC=auto
746 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
749 CFG_PREFIX_INSTALL=yes
758 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
759 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
763 OPT_CONFIRM_LICENSE=no
776 QPA_PLATFORM_GUARD=yes
778 # initalize variables used for installation
787 QT_INSTALL_TRANSLATIONS=
796 #flags for SQL drivers
804 QT_LFLAGS_ODBC="-lodbc"
807 # flags for libdbus-1
811 # flags for Glib (X11 only)
815 # flags for GStreamer (X11 only)
819 # default qpa platform
820 QT_QPA_DEFAULT_PLATFORM=
822 #-------------------------------------------------------------------------------
823 # check SQL drivers available in this package
824 #-------------------------------------------------------------------------------
826 # opensource version removes some drivers, so force them to be off
832 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
833 for a in "$relpath/src/plugins/sqldrivers/"*; do
835 base_a=`basename "$a"`
836 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
837 eval "CFG_SQL_${base_a}=auto"
842 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
843 if [ -d "$relpath/src/plugins/imageformats" ]; then
844 for a in "$relpath/src/plugins/imageformats/"*; do
846 base_a=`basename "$a"`
847 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
852 #-------------------------------------------------------------------------------
853 # parse command line arguments
854 #-------------------------------------------------------------------------------
856 # parse the arguments, setting things to "yes" or "no"
857 while [ "$#" -gt 0 ]; do
861 #Autoconf style options
863 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
867 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
871 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
872 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
875 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
879 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
883 -no-*-*|-plugin-*-*|-qt-*-*)
884 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
885 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
889 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
892 #Qt style yes options
893 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-directfb|-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|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon)
894 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
897 #Qt style options that pass an argument
900 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
904 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa)
905 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
909 #Qt style complex options in one command
910 -enable-*|-disable-*)
911 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
912 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
914 #Qt Builtin/System style options
915 -no-*|-system-*|-qt-*)
916 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
917 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
919 #Options that cannot be generalized
926 # this option may or may not be followed by an argument
927 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
936 # this option may or may not be followed by an argument
937 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
945 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
946 # this option may or may not be followed by an argument
947 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
966 if [ "$1" = "-D" ]; then
970 VAL=`echo $1 | sed 's,-D,,'`
975 # this option may or may not be followed by an argument
976 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
985 if [ "$1" = "-I" ]; then
989 VAL=`echo $1 | sed 's,-I,,'`
994 if [ "$1" = "-L" ]; then
998 VAL=`echo $1 | sed 's,-L,,'`
1003 if [ "$1" = "-R" ]; then
1007 VAL=`echo $1 | sed 's,-R,,'`
1012 VAL=`echo $1 | sed 's,-l,,'`
1016 if [ "$1" = "-F" ]; then
1020 VAL=`echo $1 | sed 's,-F,,'`
1025 if [ "$1" = "-fw" ]; then
1029 VAL=`echo $1 | sed 's,-fw,,'`
1037 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1044 if [ "$UNKNOWN_ARG" = "yes" ]; then
1045 echo "$1: unknown argument"
1056 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1057 CFG_ACCESSIBILITY="$VAL"
1066 CFG_USE_GNUMAKE="$VAL"
1069 CFG_MYSQL_CONFIG="$VAL"
1072 QT_INSTALL_PREFIX="$VAL"
1075 QT_HOST_PREFIX="$VAL"
1084 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1085 CFG_PKGCONFIG="$VAL"
1091 CFG_PKGCONFIG="force"
1094 QT_INSTALL_DOCS="$VAL"
1097 QT_INSTALL_HEADERS="$VAL"
1100 QT_INSTALL_PLUGINS="$VAL"
1103 QT_INSTALL_IMPORTS="$VAL"
1106 QT_INSTALL_DATA="$VAL"
1109 QT_INSTALL_LIBS="$VAL"
1118 QT_INSTALL_TRANSLATIONS="$VAL"
1120 sysconfdir|settingsdir)
1121 QT_INSTALL_SETTINGS="$VAL"
1124 QT_INSTALL_EXAMPLES="$VAL"
1127 QT_INSTALL_TESTS="$VAL"
1136 QT_INSTALL_BINS="$VAL"
1142 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1149 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1150 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1151 [ "$VAL" = "es2" ]; then
1158 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1165 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1168 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1171 if [ "$BUILD_ON_MAC" = "yes" ]; then
1178 OPT_OBSOLETE_HOST_ARG=yes
1181 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1182 CFG_MAC_HARFBUZZ="$VAL"
1189 if [ "$BUILD_ON_MAC" = "yes" ]; then
1190 CFG_FRAMEWORK="$VAL"
1196 if [ "$VAL" = "yes" ]; then
1198 QMakeVar add QMAKE_CFLAGS -pg
1199 QMakeVar add QMAKE_CXXFLAGS -pg
1200 QMakeVar add QMAKE_LFLAGS -pg
1201 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1207 if [ "$VAL" = "yes" ]; then
1208 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1213 # keep compatibility with old platform names
1219 PLATFORM=hpux-acc-o64
1222 PLATFORM=hpux-acc-64
1225 PLATFORM=hpux-acc-64
1237 PLATFORM=reliant-cds-64
1240 PLATFORM=solaris-cc-64
1243 PLATFORM=unixware-cc
1246 PLATFORM=unixware-g++
1249 PLATFORM=unixware-cc
1252 PLATFORM=unixware-g++
1258 i386) NATIVE_64_ARCH="x86_64" ;;
1259 powerpc) NATIVE_64_ARCH="ppc64" ;;
1260 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1262 if [ ! -z "$NATIVE_64_ARCH" ]; then
1263 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1270 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1273 XPLATFORM="devices/$VAL"
1276 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1277 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1278 DeviceVar set $DEV_VAR $DEV_VAL
1281 QT_QPA_DEFAULT_PLATFORM="$VAL"
1284 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1285 CFG_DEBUG_RELEASE="$VAL"
1291 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1292 CFG_RELEASE_QMAKE="$VAL"
1298 if [ "$VAL" = "yes" ]; then
1300 elif [ "$VAL" = "no" ]; then
1307 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1308 CFG_PREFIX_INSTALL="$VAL"
1316 developer-build|commercial|opensource)
1317 # These switches have been dealt with already
1320 if [ "$VAL" = "yes" ]; then
1322 elif [ "$VAL" = "no" ]; then
1329 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1330 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1336 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1337 if [ "$VAL" = "no" ]; then
1338 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1339 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1340 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1346 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1353 if [ "$VAL" = "no" ]; then
1360 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1368 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1375 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1382 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1389 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1396 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1403 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1410 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1417 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1418 CFG_PRECOMPILE="$VAL"
1423 separate-debug-info)
1424 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1425 CFG_SEPARATE_DEBUG_INFO="$VAL"
1426 elif [ "$VAL" = "nocopy" ] ; then
1427 CFG_SEPARATE_DEBUG_INFO="yes"
1428 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1434 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1435 CFG_REDUCE_EXPORTS="$VAL"
1441 if [ "$VAL" = "no" ]; then
1448 if [ "$VAL" = "no" ]; then
1455 if [ "$VAL" = "no" ]; then
1462 if [ "$VAL" = "no" ]; then
1469 if [ "$VAL" = "no" ]; then
1476 if [ "$VAL" = "no" ]; then
1483 if [ "$VAL" = "no" ]; then
1493 if [ "$VAL" = "no" ]; then
1500 if [ "$VAL" = "no" ]; then
1507 if [ "$VAL" = "no" ]; then
1508 CFG_MIPS_DSPR2="$VAL"
1514 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1515 CFG_REDUCE_RELOCATIONS="$VAL"
1521 [ "$VAL" = "qt" ] && VAL=yes
1522 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1527 # No longer supported:
1528 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1531 if [ "$VAL" = "system" ]; then
1538 [ "$VAL" = "yes" ] && VAL=qt
1539 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1546 [ "$VAL" = "yes" ] && VAL=qt
1547 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1554 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1561 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1568 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1575 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1582 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1589 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1590 CFG_FONTCONFIG="$VAL"
1596 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1603 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1610 CFG_OBSOLETE_WAYLAND=yes
1613 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1620 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1627 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1634 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1641 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1648 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1655 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1662 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1663 CFG_GSTREAMER="$VAL"
1669 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1670 CFG_QGTKSTYLE="$VAL"
1676 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1679 if [ "$VAL" = "no" ]; then
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1689 elif [ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1697 QPA_PLATFORM_GUARD="$VAL"
1703 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1705 elif [ "$VAL" = "runtime" ]; then
1712 if [ "$VAL" = "yes" ]; then
1719 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1726 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1727 CFG_LARGEFILE="$VAL"
1733 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1740 if [ "$VAL" = "yes" ]; then
1741 CFG_OPENSSL="linked"
1747 if [ "$VAL" = "yes" ]; then
1750 if [ "$VAL" = "no" ]; then
1758 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1759 CFG_JAVASCRIPTCORE_JIT="$VAL"
1765 if [ "$VAL" = "yes" ]; then
1766 OPT_CONFIRM_LICENSE="$VAL"
1772 if [ "$VAL" = "yes" ]; then
1778 sql-*|imageformat-*)
1779 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1780 # if autoconf style options were used, $VAL can be "yes" or "no"
1781 [ "$VAL" = "yes" ] && VAL=qt
1782 # now $VAL should be "no", "qt", or "plugin"... double-check
1783 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1786 # now $VAL is "no", "qt", or "plugin"
1788 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1789 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1791 # Grab the available values
1794 avail="$CFG_SQL_AVAILABLE"
1797 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1798 if [ "$OPT" != "plugin" ]; then
1799 # png is always built in
1805 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1809 # Check that that user's value is available.
1812 if [ "$VAL" = "$d" ]; then
1817 [ "$found" = yes ] || ERROR=yes
1819 if [ "$VAR" = "sql" ]; then
1820 # set the CFG_SQL_driver
1821 eval "CFG_SQL_$VAL=\$OPT"
1823 elif [ "$VAR" = "imageformat" ]; then
1824 [ "$OPT" = "qt" ] && OPT=yes
1825 VAL="`echo $VAL |tr a-z A-Z`"
1826 eval "CFG_$VAL=$OPT"
1830 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1831 if [ "$OPT" = "plugin" ]; then
1834 QMakeVar add "${VAR}s" "${VAL}"
1835 elif [ "$OPT" = "no" ]; then
1836 PLUG_VAR="${VAR}-plugin"
1838 QMakeVar del "${IN_VAR}s" "$VAL"
1839 QMakeVar del "${PLUG_VAR}s" "$VAL"
1841 if [ "$ERROR" = "yes" ]; then
1842 echo "$CURRENT_OPT: unknown argument"
1847 if [ "$VAL" = "yes" ]; then
1848 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1849 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1853 elif [ "$VAL" = "no" ]; then
1854 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1855 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1864 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1871 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1878 D_FLAGS="$D_FLAGS \"$VAL\""
1881 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1884 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1887 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1890 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1893 if [ "$BUILD_ON_MAC" = "yes" ]; then
1894 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1895 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1901 if [ "$BUILD_ON_MAC" = "yes" ]; then
1902 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1908 W_FLAGS="$W_FLAGS \"${VAL}\""
1914 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1915 CFG_PHONON_BACKEND="$VAL"
1927 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1928 CFG_AUDIO_BACKEND="$VAL"
1934 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1941 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1942 CFG_FORCE_ASSERTS="$VAL"
1948 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1958 if [ "$UNKNOWN_OPT" = "yes" ]; then
1959 echo "${CURRENT_OPT}: invalid command-line switch"
1965 # update QT_CONFIG to show our current predefined configuration
1966 case "$CFG_QCONFIG" in
1967 minimal|small|medium|large|full)
1968 # these are a sequence of increasing functionality
1969 for c in minimal small medium large full; do
1970 QT_CONFIG="$QT_CONFIG $c-config"
1971 [ "$CFG_QCONFIG" = $c ] && break
1975 # not known to be sufficient for anything
1976 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
1977 echo >&2 "Error: configuration file not found:"
1978 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
1980 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
1985 #-------------------------------------------------------------------------------
1986 # build tree initialization
1987 #-------------------------------------------------------------------------------
1989 # where to find which..
1990 unixtests="$relpath/config.tests/unix"
1991 mactests="$relpath/config.tests/mac"
1992 WHICH="$unixtests/which.test"
1994 PERL=`$WHICH perl 2>/dev/null`
1996 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
1998 for e in gawk nawk awk; do
1999 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2006 PERL="/usr/bin/perl"
2007 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2011 ### skip this if the user just needs help...
2012 if [ "$OPT_HELP" != "yes" ]; then
2014 # is this a shadow build?
2015 if [ "$OPT_SHADOW" = "maybe" ]; then
2017 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2018 if [ -h "$outpath" ]; then
2019 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2025 if [ "$OPT_SHADOW" = "yes" ]; then
2026 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2027 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2028 echo >&2 "Cannot proceed."
2031 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2034 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2036 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2037 echo "Qt can be built in release mode with separate debug information, so"
2038 echo "-debug-and-release is not necessary anymore"
2042 if [ "$CFG_SILENT" = "yes" ]; then
2043 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2046 # if the source tree is different from the build tree,
2047 # symlink or copy part of the sources
2048 if [ "$OPT_SHADOW" = "yes" ]; then
2049 echo "Preparing build tree..."
2051 if [ -z "$PERL" ]; then
2053 echo "You need perl in your PATH to make a shadow build."
2054 echo "Cannot proceed."
2058 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2060 # make a syncqt script that can be used in the shadow
2061 rm -f "$outpath/bin/syncqt"
2062 if [ -x "$relpath/bin/syncqt" ]; then
2063 mkdir -p "$outpath/bin"
2064 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2065 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2066 chmod 755 "$outpath/bin/syncqt"
2069 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2070 rm -f "$outpath/bin/$i"
2071 if [ -x "$relpath/bin/$i" ]; then
2072 mkdir -p "$outpath/bin"
2073 echo "#!/bin/sh" >"$outpath/bin/$i"
2074 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2075 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2076 chmod 755 "$outpath/bin/$i"
2080 # save a pre-existing mkspecs/modules dir
2081 test -d "$outpath/mkspecs/modules" && \
2082 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2084 # symlink the mkspecs directory
2085 mkdir -p "$outpath/mkspecs"
2086 rm -rf "$outpath"/mkspecs/*
2087 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2088 rm -f "$outpath/mkspecs/default"
2092 rm -rf "$outpath/mkspecs/$1"
2093 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2094 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2097 # Special case for mkspecs/features directory.
2098 # To be able to place .prf files into a shadow build directory,
2099 # we're creating links for files only. The directory structure is reproduced.
2100 ShadowMkspecs features
2102 # The modules dir is special, too.
2103 if test -d "$outpath/mkspecs-modules"; then
2104 rm -rf "$outpath/mkspecs/modules"
2105 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2107 ShadowMkspecs modules
2110 # symlink the doc directory
2111 rm -rf "$outpath/doc"
2112 ln -s "$relpath/doc" "$outpath/doc"
2115 # symlink fonts to be able to run application from build directory
2116 if [ ! -d "${outpath}/lib/fonts" ]; then
2117 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2118 mkdir -p "${outpath}/lib"
2119 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2123 if [ "$OPT_FAST" = "auto" ]; then
2124 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2131 # find a make command
2132 if [ -z "$MAKE" ]; then
2134 for mk in gmake make; do
2135 if "$WHICH" $mk >/dev/null 2>&1; then
2140 if [ -z "$MAKE" ]; then
2141 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2142 echo >&2 "Cannot proceed."
2145 # export MAKE, we need it later in the config.tests
2151 #-------------------------------------------------------------------------------
2152 # auto-detect all that hasn't been specified in the arguments
2153 #-------------------------------------------------------------------------------
2155 if [ -z "$PLATFORM" ]; then
2157 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2159 OSX_VERSION=`uname -r | cut -d. -f1`
2160 # Select compiler. Use g++ unless we find a usable Clang version
2162 if [ "$OSX_VERSION" -ge 12 ]; then
2163 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2165 elif [ "$OSX_VERSION" -eq 11 ]; then
2166 # We're on Lion. Check if we have a supported Clang version
2167 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2170 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2177 #PLATFORM=aix-g++-64
2179 #PLATFORM=aix-xlc-64
2181 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2191 # PLATFORM=dynix-g++
2197 PLATFORM=freebsd-g++
2199 - Also available for FreeBSD: freebsd-icc
2203 PLATFORM=openbsd-g++
2214 #PLATFORM=irix-cc-64
2216 - Also available for IRIX: irix-g++ irix-cc-64
2220 case "$UNAME_MACHINE" in
2222 #PLATFORM=hpuxi-acc-32
2223 PLATFORM=hpuxi-acc-64
2225 - Also available for HP-UXi: hpuxi-acc-32
2231 #PLATFORM=hpux-acc-64
2233 #PLATFORM=hpux-acc-o64
2235 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2244 - Also available for Tru64: tru64-g++
2248 case "$UNAME_MACHINE" in
2250 PLATFORM=linux-g++-64
2257 - Also available for Linux: linux-kcc linux-icc linux-cxx
2261 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2262 PLATFORM="solaris-g++"
2264 #PLATFORM=solaris-g++
2266 #PLATFORM=solaris-cc64
2269 - Also available for Solaris: solaris-g++ solaris-cc-64
2272 ReliantUNIX-*:*|SINIX-*:*)
2273 PLATFORM=reliant-cds
2274 #PLATFORM=reliant-cds-64
2276 - Also available for Reliant UNIX: reliant-cds-64
2286 #PLATFORM=unixware-g++
2287 PLATFORM=unixware-cc
2289 - Also available for OpenUNIX: unixware-g++
2293 #PLATFORM=unixware-g++
2294 PLATFORM=unixware-cc
2296 - Also available for UnixWare: unixware-g++
2303 - Also available for SCO OpenServer: sco-g++
2307 PLATFORM=unixware-g++
2310 PLATFORM=unsupported/qnx-g++
2313 if [ "$OPT_HELP" != "yes" ]; then
2315 for p in $PLATFORMS; do
2316 echo " $relconf $* -platform $p"
2319 echo " The build script does not currently recognize all" >&2
2320 echo " platforms supported by Qt." >&2
2321 echo " Rerun this script with a -platform option listed to" >&2
2322 echo " set the system/compiler combination you use." >&2
2329 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2331 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2333 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2334 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2335 case "$XPLATFORM" in qnx-*) XPLATFORM_QNX=yes;; esac
2337 if [ -d "$PLATFORM" ]; then
2338 QMAKESPEC="$PLATFORM"
2340 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2342 if [ -d "$XPLATFORM" ]; then
2343 XQMAKESPEC="$XPLATFORM"
2345 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2347 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2348 QT_CROSS_COMPILE=yes
2349 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2350 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2353 if [ "$BUILD_ON_MAC" = "yes" ]; then
2354 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2356 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2357 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2358 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2359 echo " built with 'macx-g++'" >&2
2365 # check specified platforms are supported
2366 if [ '!' -d "$QMAKESPEC" ]; then
2368 echo " The specified system/compiler is not supported:"
2372 echo " Please see the README file for a complete list."
2376 if [ '!' -d "$XQMAKESPEC" ]; then
2378 echo " The specified system/compiler is not supported:"
2382 echo " Please see the README file for a complete list."
2386 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2388 echo " The specified system/compiler port is not complete:"
2390 echo " $XQMAKESPEC/qplatformdefs.h"
2392 echo " Please contact qt-info@nokia.com."
2397 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2398 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2399 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2400 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2401 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2405 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2406 case `basename "$XPLATFORM"` in
2409 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2411 echo "Please contact qt-info@nokia.com to upgrade your license to"
2412 echo "include this platform, or install the Qt Open Source Edition"
2413 echo "if you intend to develop free software."
2419 #-------------------------------------------------------------------------------
2420 # tests that don't need qmake (must be run before displaying help)
2421 #-------------------------------------------------------------------------------
2423 # detect build style
2424 if [ "$CFG_DEBUG" = "auto" ]; then
2425 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2426 CFG_DEBUG_RELEASE=yes
2428 elif [ "$CFG_DEV" = "yes" ]; then
2429 CFG_DEBUG_RELEASE=no
2432 CFG_DEBUG_RELEASE=no
2436 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2437 QT_CONFIG="$QT_CONFIG build_all"
2440 # pass on $CFG_SDK to the configure tests.
2441 if [ '!' -z "$CFG_SDK" ]; then
2442 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2445 # find the default framework value
2446 if [ "$BUILD_ON_MAC" = "yes" ]; then
2447 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2448 CFG_FRAMEWORK="$CFG_SHARED"
2449 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2451 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2459 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2461 TEST_COMPILER=$QMAKE_CONF_COMPILER
2462 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2463 if [ -z "$TEST_COMPILER" ]; then
2464 echo "ERROR: Cannot set the compiler for the configuration tests"
2469 if [ -n "$CFG_SYSROOT" ]; then
2470 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2474 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2476 # auto-detect precompiled header support
2477 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2478 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2485 # auto-detect support for separate debug info in objcopy
2486 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2487 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2488 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2489 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2490 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2491 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2492 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2493 CFG_SEPARATE_DEBUG_INFO=no
2497 # binutils on HP-UX is buggy; default to no.
2498 CFG_SEPARATE_DEBUG_INFO=no
2501 CFG_SEPARATE_DEBUG_INFO=yes
2507 # auto-detect -fvisibility support
2508 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2509 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2510 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2511 echo "-reduce-exports was requested but this compiler does not support it"
2512 echo "Re-run configure with -v for more information"
2515 CFG_REDUCE_EXPORTS=no
2517 CFG_REDUCE_EXPORTS=yes
2521 # detect the availability of the -Bsymbolic-functions linker optimization
2522 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2523 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2524 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2525 echo "-reduce-relocations was requested but this compiler does not support it"
2526 echo "Re-run configure with -v for more information"
2529 CFG_REDUCE_RELOCATIONS=no
2531 CFG_REDUCE_RELOCATIONS=yes
2535 # auto-detect GNU make support
2536 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2540 # find the default framework value
2541 if [ "$BUILD_ON_MAC" = "yes" ]; then
2542 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2543 CFG_FRAMEWORK="$CFG_SHARED"
2544 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2546 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2554 #setup the build parts
2555 if [ -z "$CFG_BUILD_PARTS" ]; then
2556 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2558 # build tests by default, if a developer build
2559 if [ "$CFG_DEV" = "yes" ]; then
2560 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2563 # don't build tools by default when cross-compiling
2564 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2565 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2568 for nobuild in $CFG_NOBUILD_PARTS; do
2569 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2571 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2573 # echo "WARNING: libs is a required part of the build."
2575 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2578 #-------------------------------------------------------------------------------
2579 # post process QT_INSTALL_* variables
2580 #-------------------------------------------------------------------------------
2582 if [ -z "$QT_INSTALL_PREFIX" ]; then
2583 if [ "$CFG_DEV" = "yes" ]; then
2584 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2586 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2589 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2591 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2592 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2593 if [ "$BUILD_ON_MAC" = "yes" ]; then
2594 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2597 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2600 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2602 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2603 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2604 if [ "$BUILD_ON_MAC" = "yes" ]; then
2605 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2610 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2613 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2615 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2616 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2617 if [ "$BUILD_ON_MAC" = "yes" ]; then
2618 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2619 QT_INSTALL_LIBS="/Libraries/Frameworks"
2623 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2625 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2627 if [ -z "$QT_INSTALL_BINS" ]; then #default
2628 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2629 if [ "$BUILD_ON_MAC" = "yes" ]; then
2630 QT_INSTALL_BINS="/Developer/Applications/Qt"
2633 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2635 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2637 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2638 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2639 if [ "$BUILD_ON_MAC" = "yes" ]; then
2640 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2643 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2645 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2647 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2648 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2649 if [ "$BUILD_ON_MAC" = "yes" ]; then
2650 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2653 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2655 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2657 if [ -z "$QT_INSTALL_DATA" ]; then #default
2658 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2660 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2662 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2663 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2665 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2667 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2668 if [ "$BUILD_ON_MAC" = "yes" ]; then
2669 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2671 QT_INSTALL_SETTINGS=/etc/xdg
2674 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2676 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2677 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2678 if [ "$BUILD_ON_MAC" = "yes" ]; then
2679 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2682 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2684 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2687 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2688 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2689 if [ "$BUILD_ON_MAC" = "yes" ]; then
2690 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2693 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2695 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2697 #------- host paths --------
2699 if [ -z "$QT_HOST_PREFIX" ]; then
2700 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2703 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2707 if [ -z "$QT_HOST_BINS" ]; then #default
2709 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2710 if [ "$BUILD_ON_MAC" = "yes" ]; then
2711 QT_HOST_BINS="/Developer/Applications/Qt"
2714 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2716 QT_HOST_BINS="$QT_INSTALL_BINS"
2719 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2721 if [ -z "$QT_HOST_DATA" ]; then #default
2723 QT_HOST_DATA="$QT_HOST_PREFIX"
2725 QT_HOST_DATA="$QT_INSTALL_DATA"
2728 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2731 #-------------------------------------------------------------------------------
2732 # help - interactive parts of the script _after_ this section please
2733 #-------------------------------------------------------------------------------
2735 # next, emit a usage message if something failed.
2736 if [ "$OPT_HELP" = "yes" ]; then
2737 [ "x$ERROR" = "xyes" ] && echo
2738 if [ "$CFG_NIS" = "no" ]; then
2745 if [ "$CFG_CUPS" = "no" ]; then
2752 if [ "$CFG_ICONV" = "no" ]; then
2759 if [ "$CFG_LARGEFILE" = "no" ]; then
2766 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2774 if [ "$CFG_XCB" = "no" ]; then
2782 if [ "$CFG_EGLFS" = "no" ]; then
2790 if [ "$CFG_DIRECTFB" = "no" ]; then
2797 if [ "$CFG_XINPUT2" = "no" ]; then
2805 if [ "$CFG_DBUS" = "no" ]; then
2813 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2821 if [ "$CFG_GLIB" = "no" ]; then
2830 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2831 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2832 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2833 [-release] [-debug] [-debug-and-release]
2834 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2835 [-largefile] [-no-accessibility] [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2836 [-plugin-sql-<driver>] [-system-sqlite]
2837 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2838 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2839 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2840 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2841 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2842 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2843 [-no-separate-debug-info] [-no-sse2]
2844 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2845 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2846 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2847 [-no-audio-backend] [-audio-backend]
2848 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2849 [-no-optimized-qmake] [-optimized-qmake]
2850 [-no-openssl] [-openssl] [-openssl-linked]
2851 [-no-gtkstyle] [-gtkstyle]
2852 [-qt-pcre] [-system-pcre]
2853 [-device <name>] [-device-option <key=value>]
2854 [additional platform specific options (see below)]
2857 Installation options:
2859 These are optional, but you may specify install directories.
2861 -prefix <dir> ...... This will install everything relative to <dir>
2862 (default $QT_INSTALL_PREFIX)
2864 -hostprefix [dir] .. Tools and libraries needed when developing
2865 applications are installed in [dir]. If [dir] is
2866 not given, the current build directory will be used.
2869 * -prefix-install .... Force a sandboxed "local" installation of
2870 Qt. This will install into
2871 $QT_INSTALL_PREFIX, if this option is
2872 disabled then some platforms will attempt a
2873 "system" install by placing default values to
2874 be placed in a system location other than
2877 You may use these to separate different parts of the install:
2879 -bindir <dir> ......... Executables will be installed to <dir>
2880 (default PREFIX/bin)
2881 -libdir <dir> ......... Libraries will be installed to <dir>
2882 (default PREFIX/lib)
2883 -docdir <dir> ......... Documentation will be installed to <dir>
2884 (default PREFIX/doc)
2885 -headerdir <dir> ...... Headers will be installed to <dir>
2886 (default PREFIX/include)
2887 -plugindir <dir> ...... Plugins will be installed to <dir>
2888 (default PREFIX/plugins)
2889 -importdir <dir> ...... Imports for QML will be installed to <dir>
2890 (default PREFIX/imports)
2891 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2893 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2894 (default PREFIX/translations)
2895 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2896 (default PREFIX/etc/settings)
2897 -examplesdir <dir> .... Examples will be installed to <dir>
2898 (default PREFIX/examples)
2899 -testsdir <dir> ....... Tests will be installed to <dir>
2900 (default PREFIX/tests)
2902 -hostbindir <dir> .. Host executables will be installed to <dir>
2903 (default HOSTPREFIX/bin)
2904 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2905 (default HOSTPREFIX)
2909 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2910 that needs to be evaluated. If the evaluation succeeds, the feature is
2911 included. Here is a short explanation of each option:
2913 * -release ........... Compile and link Qt with debugging turned off.
2914 -debug ............. Compile and link Qt with debugging turned on.
2915 -debug-and-release . Compile and link two versions of Qt, with and without
2916 debugging turned on (Mac only).
2918 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2920 -opensource ........ Compile and link the Open-Source Edition of Qt.
2921 -commercial ........ Compile and link the Commercial Edition of Qt.
2924 * -shared ............ Create and use shared Qt libraries.
2925 -static ............ Create and use static Qt libraries.
2927 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2929 -fast .............. Configure Qt quickly by generating Makefiles only for
2930 library and subdirectory targets. All other Makefiles
2931 are created as wrappers, which will in turn run qmake.
2933 -no-largefile ...... Disables large file support.
2934 + -largefile ......... Enables Qt to access files larger than 4 GB.
2936 -no-accessibility .. Do not compile Accessibility support.
2937 * -accessibility ..... Compile Accessibility support.
2939 -no-sql-<driver> ... Disable SQL <driver> entirely.
2940 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2942 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2945 Possible values for <driver>:
2946 [ $CFG_SQL_AVAILABLE ]
2948 -system-sqlite ..... Use sqlite from the operating system.
2950 -no-phonon-backend.. Do not build the platform phonon plugin.
2951 + -phonon-backend..... Build the platform phonon plugin.
2953 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
2954 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
2956 -no-qml-debug ...... Do not build the in-process QML debugging support.
2957 + -qml-debug ......... Build the QML debugging support.
2959 -platform target ... The operating system and compiler you are building
2962 See the README file for a list of supported
2963 operating systems and compilers.
2965 -no-sse2 ........... Do not compile with use of SSE2 instructions.
2966 -no-sse3 ........... Do not compile with use of SSE3 instructions.
2967 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
2968 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
2969 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
2970 -no-avx ............ Do not compile with use of AVX instructions.
2971 -no-avx2 ........... Do not compile with use of AVX2 instructions.
2972 -no-neon ........... Do not compile with use of NEON instructions.
2973 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
2974 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
2976 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
2977 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
2979 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
2981 -D <string> ........ Add an explicit define to the preprocessor.
2982 -I <string> ........ Add an explicit include path.
2983 -L <string> ........ Add an explicit library path.
2985 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
2986 configure determines whether to use pkg-config or not with
2987 some heuristics such as checking the environment variables.
2988 -no-pkg-config ..... Disable use of pkg-config.
2989 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
2990 detection heuristic).
2992 -help, -h .......... Display this information.
2994 Third Party Libraries:
2996 -qt-zlib ........... Use the zlib bundled with Qt.
2997 + -system-zlib ....... Use zlib from the operating system.
2998 See http://www.gzip.org/zlib
3000 -no-gif ............ Do not compile GIF reading support.
3002 -no-libpng ......... Do not compile PNG support.
3003 -qt-libpng ......... Use the libpng bundled with Qt.
3004 + -system-libpng ..... Use libpng from the operating system.
3005 See http://www.libpng.org/pub/png
3007 -no-libjpeg ........ Do not compile JPEG support.
3008 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3009 + -system-libjpeg .... Use libjpeg from the operating system.
3010 See http://www.ijg.org
3012 -no-openssl ........ Do not compile support for OpenSSL.
3013 + -openssl ........... Enable run-time OpenSSL support.
3014 -openssl-linked .... Enabled linked OpenSSL support.
3016 -qt-pcre ........... Use the PCRE library bundled with Qt.
3017 + -system-pcre ....... Use the PCRE library from the operating system.
3021 -make <part> ....... Add part to the list of parts to be built at make time.
3022 ($QT_DEFAULT_BUILD_PARTS)
3023 -nomake <part> ..... Exclude part from the list of parts to be built.
3025 -R <string> ........ Add an explicit runtime library path to the Qt
3027 -l <string> ........ Add an explicit library.
3029 -no-rpath .......... Do not use the library install path as a runtime
3031 + -rpath ............. Link Qt libraries and executables using the library
3032 install path as a runtime library path. Equivalent
3033 to -R install_libpath
3035 -continue .......... Continue as far as possible if an error occurs.
3037 -verbose, -v ....... Print verbose information about each step of the
3040 -silent ............ Reduce the build output so that warnings and errors
3041 can be seen more easily.
3043 * -no-optimized-qmake ... Do not build qmake optimized.
3044 -optimized-qmake ...... Build qmake optimized.
3046 -no-gui ............ Don't build the Qt GUI library
3048 $NSN -no-nis ............ Do not compile NIS support.
3049 $NSY -nis ............... Compile NIS support.
3051 $CUN -no-cups ........... Do not compile CUPS support.
3052 $CUY -cups .............. Compile CUPS support.
3053 Requires cups/cups.h and libcups.so.2.
3055 $CIN -no-iconv .......... Do not compile support for iconv(3).
3056 $CIY -iconv ............. Compile support for iconv(3).
3058 $PHN -no-pch ............ Do not use precompiled header support.
3059 $PHY -pch ............... Use precompiled header support.
3061 $DBN -no-dbus ........... Do not compile the QtDBus module.
3062 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3063 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3065 -reduce-relocations ..... Reduce relocations in the libraries through extra
3066 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3067 experimental; needs GNU ld >= 2.18).
3069 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3071 -device <name> ............... Cross-compile for device <name> (experimental)
3072 -device-option <key=value> ... Add device specific options for the device mkspec
3075 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3076 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3078 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3079 $XCBY -xcb ............... Compile Xcb support.
3081 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3082 $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
3084 $DFBN -no-directfb ....... Do not compile DirectFB support.
3085 $DFBY -directfb .......... Compile DirectFB support.
3087 -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
3089 -xplatform target ... The target platform when cross-compiling.
3091 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3093 -no-feature-<feature> Do not compile in <feature>.
3094 -feature-<feature> .. Compile in <feature>. The available features
3095 are described in src/corelib/global/qfeatures.txt
3097 -no-freetype ........ Do not compile in Freetype2 support.
3098 -qt-freetype ........ Use the libfreetype bundled with Qt.
3099 * -system-freetype .... Use libfreetype from the operating system.
3100 See http://www.freetype.org/
3102 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3103 default ($CFG_QCONFIG).
3105 -no-opengl .......... Do not support OpenGL.
3106 -opengl <api> ....... Enable OpenGL support
3107 With no parameter, this will attempt to auto-detect
3108 OpenGL ES 2, or regular desktop OpenGL.
3109 Use es2 for <api> to override auto-detection.
3111 $GBN -no-glib ........... Do not compile Glib support.
3112 $GBY -glib .............. Compile Glib support.
3115 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3118 $X2N -no-xinput2......... Do not compile XInput2 support.
3119 $X2Y -xinput2............ Compile XInput2 support.
3125 if [ "$BUILD_ON_MAC" = "yes" ]; then
3130 -Fstring ........... Add an explicit framework path.
3131 -fw string ......... Add an explicit framework.
3133 * -framework ......... Build Qt as a series of frameworks and
3134 link tools against those frameworks.
3135 -no-framework ...... Do not build Qt as a series of frameworks.
3137 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3138 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3140 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3141 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3142 QT_ENABLE_HARFBUZZ environment variable.
3147 [ "x$ERROR" = "xyes" ] && exit 1
3152 # -----------------------------------------------------------------------------
3153 # LICENSING, INTERACTIVE PART
3154 # -----------------------------------------------------------------------------
3157 echo "This is the Qt ${EditionString} Edition."
3160 if [ "$Edition" = "OpenSource" ]; then
3162 echo "You are licensed to use this software under the terms of"
3163 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3164 if [ -f "$relpath/LICENSE.GPL3" ]; then
3165 echo "You are also licensed to use this software under the terms of"
3166 echo "the GNU General Public License (GPL) versions 3."
3172 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3173 echo "You have already accepted the terms of the $LicenseType license."
3176 if [ -f "$relpath/LICENSE.GPL3" ]; then
3177 echo "Type '3' to view the GNU General Public License version 3."
3179 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3180 echo "Type 'yes' to accept this license offer."
3181 echo "Type 'no' to decline this license offer."
3183 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3187 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3189 elif [ "$acceptance" = "no" ]; then
3190 echo "You are not licensed to use this software."
3193 elif [ "$acceptance" = "3" ]; then
3194 more "$relpath/LICENSE.GPL3"
3195 elif [ "$acceptance" = "L" ]; then
3196 more "$relpath/LICENSE.LGPL"
3199 elif [ "$Edition" = "Preview" ]; then
3200 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3203 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3204 echo "You have already accepted the terms of the $LicenseType license."
3207 echo "You are licensed to use this software under the terms of"
3208 echo "the $TheLicense"
3210 echo "Type '?' to read the Preview License."
3211 echo "Type 'yes' to accept this license offer."
3212 echo "Type 'no' to decline this license offer."
3214 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3218 if [ "$acceptance" = "yes" ]; then
3220 elif [ "$acceptance" = "no" ] ;then
3221 echo "You are not licensed to use this software."
3224 elif [ "$acceptance" = "?" ]; then
3225 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3228 elif [ "$Edition" != "OpenSource" ]; then
3229 if [ -n "$ExpiryDate" ]; then
3230 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3231 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3232 Today=`date +%Y%m%d`
3233 if [ "$Today" -gt "$ExpiryDate" ]; then
3234 case "$LicenseType" in
3235 Commercial|Academic|Educational)
3236 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3238 echo "NOTICE NOTICE NOTICE NOTICE"
3240 echo " Your support and upgrade period has expired."
3242 echo " You are no longer licensed to use this version of Qt."
3243 echo " Please contact qt-info@nokia.com to renew your support"
3244 echo " and upgrades for this license."
3246 echo "NOTICE NOTICE NOTICE NOTICE"
3251 echo "WARNING WARNING WARNING WARNING"
3253 echo " Your support and upgrade period has expired."
3255 echo " You may continue to use your last licensed release"
3256 echo " of Qt under the terms of your existing license"
3257 echo " agreement. But you are not entitled to technical"
3258 echo " support, nor are you entitled to use any more recent"
3259 echo " Qt releases."
3261 echo " Please contact qt-info@nokia.com to renew your"
3262 echo " support and upgrades for this license."
3264 echo "WARNING WARNING WARNING WARNING"
3271 echo "NOTICE NOTICE NOTICE NOTICE"
3273 echo " Your Evaluation license has expired."
3275 echo " You are no longer licensed to use this software. Please"
3276 echo " contact qt-info@nokia.com to purchase license, or install"
3277 echo " the Qt Open Source Edition if you intend to develop free"
3280 echo "NOTICE NOTICE NOTICE NOTICE"
3287 TheLicense=`head -n 1 "$outpath/LICENSE"`
3289 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3290 echo "You have already accepted the terms of the $TheLicense."
3293 echo "You are licensed to use this software under the terms of"
3294 echo "the $TheLicense."
3296 echo "Type '?' to view the $TheLicense."
3297 echo "Type 'yes' to accept this license offer."
3298 echo "Type 'no' to decline this license offer."
3300 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3304 if [ "$acceptance" = "yes" ]; then
3306 elif [ "$acceptance" = "no" ]; then
3307 echo "You are not licensed to use this software."
3310 else [ "$acceptance" = "?" ]
3311 more "$outpath/LICENSE"
3316 # this should be moved somewhere else
3319 AIX_VERSION=`uname -v`
3320 if [ "$AIX_VERSION" -lt "5" ]; then
3321 QMakeVar add QMAKE_LIBS_X11 -lbind
3328 #-------------------------------------------------------------------------------
3329 # generate qconfig.cpp
3330 #-------------------------------------------------------------------------------
3331 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3333 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3335 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3336 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3338 /* Installation date */
3339 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3341 /* Installation Info */
3342 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3343 "qt_prfxpath=$QT_INSTALL_PREFIX",
3344 "qt_docspath=$QT_INSTALL_DOCS",
3345 "qt_hdrspath=$QT_INSTALL_HEADERS",
3346 "qt_libspath=$QT_INSTALL_LIBS",
3347 "qt_binspath=$QT_INSTALL_BINS",
3348 "qt_plugpath=$QT_INSTALL_PLUGINS",
3349 "qt_impspath=$QT_INSTALL_IMPORTS",
3350 "qt_datapath=$QT_INSTALL_DATA",
3351 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3352 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3353 "qt_tstspath=$QT_INSTALL_TESTS",
3354 #ifdef QT_BUILD_QMAKE
3355 "qt_ssrtpath=$CFG_SYSROOT",
3356 "qt_hpfxpath=$QT_HOST_PREFIX",
3357 "qt_hbinpath=$QT_HOST_BINS",
3358 "qt_hdatpath=$QT_HOST_DATA",
3361 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3364 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3366 /* strlen( "qt_lcnsxxxx" ) == 12 */
3367 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3368 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3370 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3373 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3374 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3375 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3377 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3378 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3379 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3382 # -----------------------------------------------------------------------------
3383 if [ "$LicenseType" = "Evaluation" ]; then
3384 EVALKEY=qt_qevalkey=$LicenseKeyExt
3385 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3386 EVALKEY=qt_qevalkey=
3389 if [ -n "$EVALKEY" ]; then
3390 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3391 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3392 /* Evaluation license key */
3393 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3395 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3399 # -----------------------------------------------------------------------------
3401 # -----------------------------------------------------------------------------
3404 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3406 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3407 if [ "$OPT_SHADOW" = "yes" ]; then
3408 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3409 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3410 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3414 # $1: input variable name (awk regexp)
3415 # $2: optional output variable name
3416 # $3: optional value transformation (sed command)
3417 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3418 # is where the resulting variable is written to
3419 setBootstrapVariable()
3421 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3425 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3426 echo "Creating qmake. Please wait..."
3429 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3430 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3431 if [ -f "$QCONFIG_H" ]; then
3432 OLD_QCONFIG_H=$QCONFIG_H
3433 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3436 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3437 # when building qmake, we use #defines for the install paths,
3438 # however they are real functions in the library
3439 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3440 mkdir -p "$outpath/src/corelib/global"
3441 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3442 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3445 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3447 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3448 rm -rf mkspecs/default
3449 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3450 mkdir -p "$outpath/qmake" || exit
3452 for mkfile in GNUmakefile Makefile; do
3455 in_mkfile="${mkfile}.in"
3456 if [ "$mkfile" = "Makefile" ]; then
3457 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3458 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3460 in_mkfile="${mkfile}.unix"
3462 in_mkfile="$relpath/qmake/$in_mkfile"
3463 mkfile="$outpath/qmake/$mkfile"
3464 if [ -f "$mkfile" ]; then
3465 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3468 [ -f "$in_mkfile" ] || continue
3470 echo "########################################################################" > "$mkfile"
3471 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3472 echo "########################################################################" >> "$mkfile"
3475 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3476 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3477 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3479 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3480 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3483 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3484 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3485 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3486 setBootstrapVariable QMAKE_CFLAGS
3487 setBootstrapVariable QMAKE_CXXFLAGS
3488 setBootstrapVariable QMAKE_LFLAGS
3490 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3491 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3492 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3494 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3495 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3496 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3497 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3498 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3499 elif [ "$CFG_DEBUG" = "yes" ]; then
3500 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3501 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3502 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3503 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3506 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3507 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3508 for rpath in $RPATH_FLAGS; do
3509 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3512 if [ "$BUILD_ON_MAC" = "yes" ]; then
3513 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3514 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3515 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3516 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3517 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3518 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3519 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3520 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3521 if [ '!' -z "$CFG_SDK" ]; then
3522 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3523 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3524 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3525 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3526 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3529 if [ '!' -z "$D_FLAGS" ]; then
3530 for DEF in $D_FLAGS; do
3531 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3534 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3535 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3536 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3537 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3539 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3540 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3541 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3542 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3543 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3544 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3545 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3546 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3547 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3548 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3550 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3551 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3552 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3553 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3558 QMAKE_BUILD_ERROR=no
3559 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3560 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3561 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3562 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3565 #-------------------------------------------------------------------------------
3567 #-------------------------------------------------------------------------------
3568 if [ -z "$PKG_CONFIG" ]; then
3569 # See if PKG_CONFIG is set in the mkspec:
3570 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3572 if [ -z "$PKG_CONFIG" ]; then
3573 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3576 if [ "$CFG_PKGCONFIG" = "no" ]; then
3578 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3580 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3581 echo >&2 "a correctly setup pkg-config environment!"
3583 elif [ -n "$PKG_CONFIG" ]; then
3584 # found a pkg-config
3585 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3586 # when xcompiling, check environment to see if it's actually usable
3587 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3588 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3589 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3590 export PKG_CONFIG_LIBDIR
3591 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3592 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3593 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3594 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3595 echo >&2 "Set this variable to the directory that contains target .pc files"
3596 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3597 echo >&2 "use -force-pkg-config to override this test."
3601 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3604 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3605 if [ -n "$CFG_SYSROOT" ]; then
3606 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3607 export PKG_CONFIG_SYSROOT_DIR
3608 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3609 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3610 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3611 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3612 echo >&2 "or use -force-pkg-config to override this test."
3616 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3620 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3621 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3625 if [ -z "$PKG_CONFIG" ]; then
3626 QT_CONFIG="$QT_CONFIG no-pkg-config"
3629 #-------------------------------------------------------------------------------
3630 # write out device config before we run the test.
3631 #-------------------------------------------------------------------------------
3632 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
3633 rm -f "$DEVICE_VARS_FILE"
3635 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
3638 #-------------------------------------------------------------------------------
3639 # tests that need qmake
3640 #-------------------------------------------------------------------------------
3642 #-------------------------------------------------------------------------------
3643 # determine the target and host architectures
3644 #-------------------------------------------------------------------------------
3646 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3647 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'`
3649 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3650 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3651 # Do the same test again, using the host compiler
3652 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'`
3653 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3655 # not cross compiling, host == target
3656 CFG_HOST_ARCH="$CFG_ARCH"
3659 if [ "$OPT_VERBOSE" = "yes" ]; then
3660 echo "System architecture: '$CFG_ARCH'"
3661 echo "Host architecture: '$CFG_HOST_ARCH'"
3664 #-------------------------------------------------------------------------------
3665 # functionality tests
3666 #-------------------------------------------------------------------------------
3668 # detect availability of float math.h functions
3669 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3670 CFG_USE_FLOATMATH=yes
3672 CFG_USE_FLOATMATH=no
3675 # detect sse2 support
3676 if [ "${CFG_SSE2}" = "auto" ]; then
3677 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3684 # detect sse3 support
3685 if [ "${CFG_SSE3}" = "auto" ]; then
3686 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3693 # detect ssse3 support
3694 if [ "${CFG_SSSE3}" = "auto" ]; then
3695 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3702 # detect sse4.1 support
3703 if [ "${CFG_SSE4_1}" = "auto" ]; then
3704 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
3711 # detect sse4.2 support
3712 if [ "${CFG_SSE4_2}" = "auto" ]; then
3713 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
3720 # detect avx support
3721 if [ "${CFG_AVX}" = "auto" ]; then
3722 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
3723 case "$XQMAKESPEC" in
3725 # Some clang versions produce internal compiler errors compiling Qt AVX code
3726 case `$TEST_COMPILER --version` in
3727 Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
3729 if [ "$OPT_VERBOSE" = "yes" ]; then
3730 echo 'AVX support disabled for blacklisted clang compiler'
3747 # detect avx2 support
3748 if [ "${CFG_AVX}" = "no" ]; then
3751 if [ "${CFG_AVX2}" = "auto" ]; then
3752 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx2 "avx2" $L_FLAGS $I_FLAGS $l_FLAGS "-march=core-avx2"; then
3759 # check iWMMXt support
3760 if [ "$CFG_IWMMXT" = "yes" ]; then
3761 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
3762 if [ $? != "0" ]; then
3763 echo "The iWMMXt functionality test failed!"
3764 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3769 # detect neon support
3770 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3771 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
3776 elif [ "$CFG_ARCH" != "arm" ]; then
3780 # detect mips_dsp support
3781 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3787 # detect mips_dspr2 support
3788 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3794 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3797 if [ "$CFG_ZLIB" = "no" ]; then
3798 # Note: Qt no longer support builds without zlib
3799 # So we force a "no" to be "auto" here.
3800 # If you REALLY really need no zlib support, you can still disable
3801 # it by doing the following:
3802 # add "no-zlib" to mkspecs/qconfig.pri
3803 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3805 # There's no guarantee that Qt will build under those conditions
3810 if [ "$CFG_ZLIB" = "auto" ]; then
3811 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
3818 if [ "$CFG_LARGEFILE" = "auto" ]; then
3819 #Large files should be enabled for all Linux systems
3823 if [ "$CFG_GUI" = "no" ]; then
3824 QPA_PLATFORM_GUARD=no
3827 # detect how jpeg should be built
3828 if [ "$CFG_JPEG" = "auto" ]; then
3829 if [ "$CFG_SHARED" = "yes" ]; then
3836 if [ "$CFG_LIBJPEG" = "auto" ]; then
3837 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
3844 # detect how gif should be built
3845 if [ "$CFG_GIF" = "auto" ]; then
3846 if [ "$CFG_SHARED" = "yes" ]; then
3854 if [ "$CFG_LIBPNG" = "auto" ]; then
3855 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
3862 # detect accessibility
3863 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3864 CFG_ACCESSIBILITY=yes
3867 if [ "$CFG_EGLFS" = "yes" ]; then
3868 if [ "$CFG_EGL" = "no" ]; then
3869 echo "The EGLFS plugin requires EGL support and cannot be built"
3872 if [ "$CFG_OPENGL" != "es2" ]; then
3873 echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
3880 # auto-detect SQL-modules support
3881 for _SQLDR in $CFG_SQL_AVAILABLE; do
3884 if [ "$CFG_SQL_mysql" != "no" ]; then
3885 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3886 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3887 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3888 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3889 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3890 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3891 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3893 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3894 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3895 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3896 echo " You need MySql 4 or higher."
3897 echo " If you believe this message is in error you may use the continue"
3898 echo " switch (-continue) to $0 to continue."
3903 QT_LFLAGS_MYSQL_R=""
3907 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3908 QMakeVar add CONFIG use_libmysqlclient_r
3909 if [ "$CFG_SQL_mysql" = "auto" ]; then
3910 CFG_SQL_mysql=plugin
3912 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3913 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3914 if [ "$CFG_SQL_mysql" = "auto" ]; then
3915 CFG_SQL_mysql=plugin
3918 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3919 echo "MySQL support cannot be enabled due to functionality tests!"
3920 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3921 echo " If you believe this message is in error you may use the continue"
3922 echo " switch (-continue) to $0 to continue."
3927 QT_LFLAGS_MYSQL_R=""
3935 if [ "$CFG_SQL_psql" != "no" ]; then
3936 # Be careful not to use native pg_config when cross building.
3937 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
3938 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
3939 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
3941 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
3942 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
3943 # But, respect PSQL_LIBS if set
3944 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
3945 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3946 if [ "$CFG_SQL_psql" = "auto" ]; then
3950 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3951 echo "PostgreSQL support cannot be enabled due to functionality tests!"
3952 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3953 echo " If you believe this message is in error you may use the continue"
3954 echo " switch (-continue) to $0 to continue."
3965 if [ "$CFG_SQL_odbc" != "no" ]; then
3966 if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3967 if [ "$CFG_SQL_odbc" = "auto" ]; then
3971 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3972 QT_LFLAGS_ODBC="-liodbc"
3973 if [ "$CFG_SQL_odbc" = "auto" ]; then
3977 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3978 echo "ODBC support cannot be enabled due to functionality tests!"
3979 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3980 echo " If you believe this message is in error you may use the continue"
3981 echo " switch (-continue) to $0 to continue."
3991 if [ "$CFG_SQL_oci" != "no" ]; then
3992 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3993 if [ "$CFG_SQL_oci" = "auto" ]; then
3997 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3998 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
3999 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4000 echo " If you believe this message is in error you may use the continue"
4001 echo " switch (-continue) to $0 to continue."
4010 if [ "$CFG_SQL_tds" != "no" ]; then
4011 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4012 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4013 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4014 if [ "$CFG_SQL_tds" = "auto" ]; then
4018 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4019 echo "TDS support cannot be enabled due to functionality tests!"
4020 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4021 echo " If you believe this message is in error you may use the continue"
4022 echo " switch (-continue) to $0 to continue."
4031 if [ "$CFG_SQL_db2" != "no" ]; then
4032 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4033 if [ "$CFG_SQL_db2" = "auto" ]; then
4037 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4038 echo "ODBC support cannot be enabled due to functionality tests!"
4039 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4040 echo " If you believe this message is in error you may use the continue"
4041 echo " switch (-continue) to $0 to continue."
4050 if [ "$CFG_SQL_ibase" != "no" ]; then
4051 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4052 if [ "$CFG_SQL_ibase" = "auto" ]; then
4053 CFG_SQL_ibase=plugin
4056 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4057 echo "InterBase support cannot be enabled due to functionality tests!"
4058 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4059 echo " If you believe this message is in error you may use the continue"
4060 echo " switch (-continue) to $0 to continue."
4069 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4070 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4071 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4072 CFG_SQL_sqlite2=plugin
4075 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4076 echo "SQLite2 support cannot be enabled due to functionality tests!"
4077 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4078 echo " If you believe this message is in error you may use the continue"
4079 echo " switch (-continue) to $0 to continue."
4088 if [ "$CFG_SQL_sqlite" != "no" ]; then
4089 SQLITE_AUTODETECT_FAILED="no"
4090 if [ "$CFG_SQLITE" = "system" ]; then
4091 if [ -n "$PKG_CONFIG" ]; then
4092 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4093 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4095 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4096 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4097 CFG_SQL_sqlite=plugin
4099 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4101 SQLITE_AUTODETECT_FAILED="yes"
4104 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4105 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4106 CFG_SQL_sqlite=plugin
4109 SQLITE_AUTODETECT_FAILED="yes"
4113 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4114 echo "SQLite support cannot be enabled due to functionality tests!"
4115 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4116 echo " If you believe this message is in error you may use the continue"
4117 echo " switch (-continue) to $0 to continue."
4123 if [ "$OPT_VERBOSE" = "yes" ]; then
4124 echo "unknown SQL driver: $_SQLDR"
4130 # auto-detect NIS support
4131 if [ "$CFG_NIS" != "no" ]; then
4132 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4135 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4136 echo "NIS support cannot be enabled due to functionality tests!"
4137 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4138 echo " If you believe this message is in error you may use the continue"
4139 echo " switch (-continue) to $0 to continue."
4147 # auto-detect CUPS support
4148 if [ "$CFG_CUPS" != "no" ]; then
4149 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4152 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4153 echo "Cups support cannot be enabled due to functionality tests!"
4154 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4155 echo " If you believe this message is in error you may use the continue"
4156 echo " switch (-continue) to $0 to continue."
4164 # auto-detect iconv(3) support
4165 if [ "$CFG_ICONV" != "no" ]; then
4166 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4168 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4170 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/sun-libiconv" "SUN libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4172 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4175 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4176 echo "Iconv support cannot be enabled due to functionality tests!"
4177 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4178 echo " If you believe this message is in error you may use the continue"
4179 echo " switch (-continue) to $0 to continue."
4187 # auto-detect libdbus-1 support
4188 if [ "$CFG_DBUS" != "no" ]; then
4189 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4190 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4191 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4193 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then
4194 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4195 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4196 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4198 if [ "$CFG_DBUS" = "auto" ]; then
4200 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4201 # CFG_DBUS is "yes" or "linked" here
4203 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4204 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4205 echo " If you believe this message is in error you may use the continue"
4206 echo " switch (-continue) to $0 to continue."
4212 # auto-detect Glib support
4213 if [ "$CFG_GLIB" != "no" ]; then
4214 if [ -n "$PKG_CONFIG" ]; then
4215 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4216 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4218 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB; then
4220 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4221 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4223 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4224 echo "Glib support cannot be enabled due to functionality tests!"
4225 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4226 echo " If you believe this message is in error you may use the continue"
4227 echo " switch (-continue) to $0 to continue."
4235 # auto-detect GTK style support
4236 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4237 if [ -n "$PKG_CONFIG" ]; then
4238 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4239 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4241 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4243 QT_CONFIG="$QT_CONFIG gtkstyle"
4244 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4245 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4247 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4248 echo "Gtk theme support cannot be enabled due to functionality tests!"
4249 echo " Turn on verbose messaging (-v) to $0 to see the fin al report."
4250 echo " If you believe this message is in error you may use the continue"
4251 echo " switch (-continue) to $0 to continue."
4257 elif [ "$CFG_GLIB" = "no" ]; then
4262 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4263 if [ -n "$PKG_CONFIG" ]; then
4264 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4265 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4267 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER; then
4269 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4270 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4272 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4273 echo "Gstreamer support cannot be enabled due to functionality tests!"
4274 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4275 echo " If you believe this message is in error you may use the continue"
4276 echo " switch (-continue) to $0 to continue."
4282 elif [ "$CFG_GLIB" = "no" ]; then
4286 # auto-detect libicu support
4287 if [ "$CFG_ICU" != "no" ]; then
4288 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4289 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4291 if [ "$CFG_ICU" = "auto" ]; then
4293 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4296 echo "The ICU library support cannot be enabled."
4297 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4298 echo " If you believe this message is in error you may use the continue"
4299 echo " switch (-continue) to $0 to continue."
4305 # Auto-detect PulseAudio support
4306 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4307 if [ -n "$PKG_CONFIG" ]; then
4308 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4309 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4311 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO; then
4313 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4314 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4316 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4317 echo "PulseAudio support cannot be enabled due to functionality tests!"
4318 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4319 echo " If you believe this message is in error you may use the continue"
4320 echo " switch (-continue) to $0 to continue."
4329 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4330 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4331 if [ "$CFG_GUI" = "no" ]; then
4332 if [ "$CFG_OPENGL" = "auto" ]; then
4335 if [ "$CFG_OPENGL" != "no" ]; then
4336 echo "OpenGL enabled, but GUI disabled."
4337 echo " You might need to either enable the GUI or disable OpenGL"
4341 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4342 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4344 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
4347 if [ "$CFG_OPENGL" = "yes" ]; then
4348 echo "All the OpenGL functionality tests failed!"
4349 echo " You might need to modify the include and library search paths by editing"
4350 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4351 echo " ${XQMAKESPEC}."
4358 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4359 if [ "$CFG_OPENGL" = "desktop" ]; then
4360 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4361 if [ $? != "0" ]; then
4362 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4369 elif [ "$CFG_OPENGL" = "es2" ]; then
4371 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4372 if [ $? != "0" ]; then
4373 echo "The OpenGL ES 2.0 functionality test failed!"
4374 echo " You might need to modify the include and library search paths by editing"
4375 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4376 echo " ${XQMAKESPEC}."
4379 elif [ "$CFG_OPENGL" = "desktop" ]; then
4380 # Desktop OpenGL support
4381 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4382 if [ $? != "0" ]; then
4383 echo "The OpenGL functionality test failed!"
4384 echo " You might need to modify the include and library search paths by editing"
4385 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4386 echo " ${XQMAKESPEC}."
4391 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4392 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4393 if [ $? != "0" ]; then
4394 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4401 fi # X11/MINGW OpenGL
4403 if [ "$BUILD_ON_MAC" = "yes" ]; then
4404 if [ "$CFG_PHONON" != "no" ]; then
4405 # Always enable Phonon (unless it was explicitly disabled)
4409 if [ "$CFG_COREWLAN" = "auto" ]; then
4410 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
4418 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4419 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4420 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4422 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
4425 if [ "$CFG_OPENGL" = "yes" ]; then
4426 echo "All the OpenGL functionality tests failed!"
4427 echo " You might need to modify the include and library search paths by editing"
4428 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4429 echo " ${XQMAKESPEC}."
4434 elif [ "$CFG_OPENGL" = "es2" ]; then
4436 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4437 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4438 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4439 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4440 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4441 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4442 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4443 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4446 "$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
4447 if [ $? != "0" ]; then
4448 echo "The OpenGL ES 2.0 functionality test failed!"
4449 echo " You might need to modify the include and library search paths by editing"
4450 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4451 echo " ${XQMAKESPEC}."
4454 elif [ "$CFG_OPENGL" = "desktop" ]; then
4455 # Desktop OpenGL support
4456 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4457 if [ $? != "0" ]; then
4458 echo "The OpenGL functionality test failed!"
4459 echo " You might need to modify the include and library search paths by editing"
4460 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4461 echo " ${XQMAKESPEC}."
4466 # auto-detect FontConfig support
4467 if [ "$CFG_FONTCONFIG" != "no" ]; then
4468 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4469 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4470 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4472 QT_CFLAGS_FONTCONFIG=
4473 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4475 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4476 QT_CONFIG="$QT_CONFIG fontconfig"
4477 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4478 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4479 CFG_LIBFREETYPE=system
4484 # Save these for a check later
4485 ORIG_CFG_XCB="$CFG_XCB"
4486 ORIG_CFG_EGLFS="$CFG_EGLFS"
4487 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4489 if [ "$CFG_LIBUDEV" != "no" ]; then
4490 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4491 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4492 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4493 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4494 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4496 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
4498 QT_CONFIG="$QT_CONFIG libudev"
4499 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4500 echo "The libudev functionality test failed!"
4504 QMakeVar add DEFINES QT_NO_LIBUDEV
4508 if [ "$CFG_EVDEV" != "no" ]; then
4509 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
4511 QT_CONFIG="$QT_CONFIG evdev"
4512 elif [ "$CFG_EVDEV" = "yes" ]; then
4513 echo "The evdev functionality test failed!"
4517 QMakeVar add DEFINES QT_NO_EVDEV
4521 # Check we actually have X11 :-)
4522 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS; then
4523 QT_CONFIG="$QT_CONFIG xlib"
4526 # auto-detect Xrender support
4527 if [ "$CFG_XRENDER" != "no" ]; then
4528 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS; then
4530 QT_CONFIG="$QT_CONFIG xrender"
4532 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4533 echo "Xrender support cannot be enabled due to functionality tests!"
4534 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4535 echo " If you believe this message is in error you may use the continue"
4536 echo " switch (-continue) to $0 to continue."
4544 if [ "$CFG_XCB" != "no" ]; then
4545 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4546 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4547 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4549 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
4551 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
4552 QT_CONFIG="$QT_CONFIG xcb-render"
4555 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
4557 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4560 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
4561 QT_CONFIG="$QT_CONFIG xcb-xlib"
4564 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4565 # auto-detect XInput2/Xinput support
4566 if [ "$CFG_XINPUT2" != "no" ]; then
4567 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4571 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4572 echo "XInput2 support cannot be enabled due to functionality tests!"
4573 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4574 echo " If you believe this message is in error you may use the continue"
4575 echo " switch (-continue) to $0 to continue."
4584 if [ "$CFG_XCB" = "yes" ]; then
4585 echo "The XCB test failed!"
4586 echo " You might need to install dependency packages."
4587 echo " See src/plugins/platforms/xcb/README."
4591 QMakeVar add DEFINES QT_NO_XCB
4595 if [ "$CFG_DIRECTFB" != "no" ]; then
4596 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4597 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4598 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4599 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/directfb" "DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then
4601 elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4602 echo " DirectFB support cannot be enabled due to functionality tests!"
4603 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4604 echo " If you believe this message is in error you may use the continue"
4605 echo " switch (-continue) to $0 to continue."
4615 # Detect libxkbcommon
4616 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4617 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4618 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4619 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4620 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4622 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4626 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4627 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4628 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4629 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4630 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4631 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4632 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4633 fi # detect EGL support
4634 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
4636 elif [ "$CFG_EGL" = "yes" ]; then
4637 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4638 echo " You might need to modify the include and library search paths by editing"
4639 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4644 elif [ "$CFG_OPENGL" = "desktop" ]; then
4645 if [ "$CFG_EGL" = "yes" ]; then
4646 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4647 echo "Either disable EGL support or enable OpenGL ES support."
4653 if [ "$CFG_EGLFS" != "no" ]; then
4654 if [ "$CFG_OPENGL" = "es2" ]; then
4655 CFG_EGLFS="$CFG_EGL"
4661 # Determine the default QPA platform
4662 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4664 QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
4665 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4666 if [ "$BUILD_ON_MAC" = "yes" ]; then
4667 QT_QPA_DEFAULT_PLATFORM="cocoa"
4668 elif [ "$UNAME_SYSTEM" = "QNX" ]; then
4669 QT_QPA_DEFAULT_PLATFORM="qnx"
4671 QT_QPA_DEFAULT_PLATFORM="xcb"
4676 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4677 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4678 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4679 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4681 if [ "$CFG_DIRECTFB" = "yes" ]; then
4682 QT_CONFIG="$QT_CONFIG directfb"
4683 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4684 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4687 if [ "$BUILD_ON_MAC" = "yes" ]; then
4688 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
4689 QT_CONFIG="$QT_CONFIG coreservices"
4691 QMakeVar add DEFINES QT_NO_CORESERVICES
4695 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
4696 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4697 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4698 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4699 echo "No QPA platform plugin enabled!"
4700 echo " If you really want to build without a QPA platform plugin you must pass"
4701 echo " -no-qpa-platform-guard to configure. Doing this will"
4702 echo " produce a Qt that can not run GUI applications."
4703 echo " The dependencies needed for xcb to build are listed in"
4704 echo " src/plugins/platforms/xcb/README"
4710 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4713 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4714 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4715 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
4716 CFG_LIBFREETYPE=system
4722 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS &&
4723 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4724 echo "STL functionality check failed! Cannot build Qt with this STL library."
4725 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4730 # detect POSIX clock_gettime()
4731 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4732 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
4733 CFG_CLOCK_GETTIME=yes
4735 CFG_CLOCK_GETTIME=no
4739 # detect POSIX monotonic clocks
4740 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4741 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
4742 CFG_CLOCK_MONOTONIC=yes
4744 CFG_CLOCK_MONOTONIC=no
4746 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4747 CFG_CLOCK_MONOTONIC=no
4751 if [ "$CFG_MREMAP" = "auto" ]; then
4752 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
4759 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4760 if [ "$CFG_GETADDRINFO" != "no" ]; then
4761 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
4764 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4765 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4766 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4767 echo " If you believe this message is in error you may use the continue"
4768 echo " switch (-continue) to $0 to continue."
4776 # find if the platform provides inotify
4777 if [ "$CFG_INOTIFY" != "no" ]; then
4778 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
4781 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4782 echo "inotify support cannot be enabled due to functionality tests!"
4783 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4784 echo " If you believe this message is in error you may use the continue"
4785 echo " switch (-continue) to $0 to continue."
4793 # find if the platform provides if_nametoindex (ipv6 interface name support)
4794 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4795 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
4798 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4799 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4800 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4801 echo " If you believe this message is in error you may use the continue"
4802 echo " switch (-continue) to $0 to continue."
4810 # find if the platform provides getifaddrs (network interface enumeration)
4811 if [ "$CFG_GETIFADDRS" != "no" ]; then
4812 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
4815 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4816 echo "getifaddrs support cannot be enabled due to functionality tests!"
4817 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4818 echo " If you believe this message is in error you may use the continue"
4819 echo " switch (-continue) to $0 to continue."
4828 if [ "$CFG_OPENSSL" != "no" ]; then
4829 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
4830 if [ "$CFG_OPENSSL" = "auto" ]; then
4834 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4835 echo "OpenSSL support cannot be enabled due to functionality tests!"
4836 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4837 echo " If you believe this message is in error you may use the continue"
4838 echo " switch (-continue) to $0 to continue."
4847 if [ "$CFG_PCRE" != "qt" ]; then
4848 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
4851 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4852 echo "PCRE support cannot be enabled due to functionality tests!"
4853 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4854 echo " If you believe this message is in error you may use the continue"
4855 echo " switch (-continue) to $0 to continue."
4863 # detect OpenVG support
4864 if [ "$CFG_OPENVG" != "no" ]; then
4865 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
4866 if [ "$CFG_OPENVG" = "auto" ]; then
4869 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
4870 if [ "$CFG_OPENVG" = "auto" ]; then
4873 CFG_OPENVG_ON_OPENGL=yes
4874 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
4875 if [ "$CFG_OPENVG" = "auto" ]; then
4878 CFG_OPENVG_LC_INCLUDES=yes
4879 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
4880 if [ "$CFG_OPENVG" = "auto" ]; then
4883 CFG_OPENVG_LC_INCLUDES=yes
4884 CFG_OPENVG_ON_OPENGL=yes
4886 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4887 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4888 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4889 echo " If you believe this message is in error you may use the continue"
4890 echo " switch (-continue) to $0 to continue."
4896 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
4897 CFG_OPENVG_SHIVA=yes
4901 if [ "$CFG_ALSA" = "auto" ]; then
4902 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
4909 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4910 if [ "$CFG_ARCH" = "arm" ]; then
4911 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
4912 if [ $? != "0" ]; then
4913 CFG_JAVASCRIPTCORE_JIT=no
4916 case "$XPLATFORM" in
4918 CFG_JAVASCRIPTCORE_JIT=no
4924 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
4925 QMakeVar set JAVASCRIPTCORE_JIT yes
4926 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
4927 QMakeVar set JAVASCRIPTCORE_JIT no
4930 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
4931 CFG_AUDIO_BACKEND=yes
4934 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
4935 echo "Warning: largefile support cannot be disabled for win32."
4939 #-------------------------------------------------------------------------------
4940 # ask for all that hasn't been auto-detected or specified in the arguments
4941 #-------------------------------------------------------------------------------
4944 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
4945 QT_CONFIG="$QT_CONFIG phonon-backend"
4948 # disable accessibility
4949 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
4950 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
4952 QT_CONFIG="$QT_CONFIG accessibility"
4956 if [ "$CFG_EGL" = "yes" ]; then
4957 QT_CONFIG="$QT_CONFIG egl"
4959 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
4963 if [ "$CFG_EGLFS" = "yes" ]; then
4964 QT_CONFIG="$QT_CONFIG eglfs"
4966 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
4970 if [ "$CFG_OPENVG" = "no" ]; then
4971 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
4973 QT_CONFIG="$QT_CONFIG openvg"
4974 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
4975 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
4977 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
4978 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
4980 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
4981 QT_CONFIG="$QT_CONFIG shivavg"
4982 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
4987 if [ "$CFG_OPENGL" = "no" ]; then
4988 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
4990 QT_CONFIG="$QT_CONFIG opengl"
4993 if [ "$CFG_OPENGL" = "es2" ]; then
4994 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
4997 if [ "$CFG_OPENGL" = "es2" ]; then
4998 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
4999 QT_CONFIG="$QT_CONFIG opengles2"
5002 # safe execution environment
5003 if [ "$CFG_SXE" != "no" ]; then
5004 QT_CONFIG="$QT_CONFIG sxe"
5007 # build up the variables for output
5008 if [ "$CFG_DEBUG" = "yes" ]; then
5009 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5010 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5011 elif [ "$CFG_DEBUG" = "no" ]; then
5012 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5013 QMAKE_CONFIG="$QMAKE_CONFIG release"
5015 if [ "$CFG_SHARED" = "yes" ]; then
5016 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5017 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5018 elif [ "$CFG_SHARED" = "no" ]; then
5019 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5020 QMAKE_CONFIG="$QMAKE_CONFIG static"
5023 #FIXME: qpa is implicit this should all be removed
5024 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5025 QT_CONFIG="$QT_CONFIG qpa"
5026 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5027 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5029 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5030 # Do not set this here for Windows. Let qmake do it so
5031 # debug and release precompiled headers are kept separate.
5032 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5034 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5035 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5036 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5037 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5038 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5039 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5041 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5042 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5044 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5045 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5046 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5047 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5048 QMakeVar add QMAKE_CFLAGS -g
5049 QMakeVar add QMAKE_CXXFLAGS -g
5050 QT_CONFIG="$QT_CONFIG separate_debug_info"
5052 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5053 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5055 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5056 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5057 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5058 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5059 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5060 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5061 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5062 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5063 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5064 if [ "$CFG_ARCH" = "mips" ]; then
5065 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5066 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5068 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5069 QT_CONFIG="$QT_CONFIG clock-gettime"
5071 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5072 QT_CONFIG="$QT_CONFIG clock-monotonic"
5074 if [ "$CFG_MREMAP" = "yes" ]; then
5075 QT_CONFIG="$QT_CONFIG mremap"
5077 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5078 QT_CONFIG="$QT_CONFIG getaddrinfo"
5080 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5081 QT_CONFIG="$QT_CONFIG ipv6ifname"
5083 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5084 QT_CONFIG="$QT_CONFIG getifaddrs"
5086 if [ "$CFG_INOTIFY" = "yes" ]; then
5087 QT_CONFIG="$QT_CONFIG inotify"
5089 if [ "$CFG_LIBJPEG" = "no" ]; then
5091 elif [ "$CFG_LIBJPEG" = "system" ]; then
5092 QT_CONFIG="$QT_CONFIG system-jpeg"
5094 if [ "$CFG_JPEG" = "no" ]; then
5095 QT_CONFIG="$QT_CONFIG no-jpeg"
5096 elif [ "$CFG_JPEG" = "yes" ]; then
5097 QT_CONFIG="$QT_CONFIG jpeg"
5099 if [ "$CFG_LIBPNG" = "no" ]; then
5102 if [ "$CFG_LIBPNG" = "system" ]; then
5103 QT_CONFIG="$QT_CONFIG system-png"
5105 if [ "$CFG_PNG" = "no" ]; then
5106 QT_CONFIG="$QT_CONFIG no-png"
5107 elif [ "$CFG_PNG" = "yes" ]; then
5108 QT_CONFIG="$QT_CONFIG png"
5110 if [ "$CFG_GIF" = "no" ]; then
5111 QT_CONFIG="$QT_CONFIG no-gif"
5112 elif [ "$CFG_GIF" = "yes" ]; then
5113 QT_CONFIG="$QT_CONFIG gif"
5115 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5116 QT_CONFIG="$QT_CONFIG no-freetype"
5117 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5118 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5119 QT_CONFIG="$QT_CONFIG system-freetype"
5121 QT_CONFIG="$QT_CONFIG freetype"
5123 if [ "$CFG_GUI" = "auto" ]; then
5126 if [ "$CFG_GUI" = "no" ]; then
5127 QT_CONFIG="$QT_CONFIG no-gui"
5130 if [ "$CFG_WIDGETS" = "no" ]; then
5131 QT_CONFIG="$QT_CONFIG no-widgets"
5132 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5135 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5136 #On Mac we implicitly link against libz, so we
5137 #never use the 3rdparty stuff.
5138 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5140 if [ "$CFG_ZLIB" = "yes" ]; then
5141 QT_CONFIG="$QT_CONFIG zlib"
5142 elif [ "$CFG_ZLIB" = "system" ]; then
5143 QT_CONFIG="$QT_CONFIG system-zlib"
5146 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5147 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5148 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5149 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5150 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5151 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5152 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5153 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5154 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5155 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5156 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5157 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5158 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5159 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5161 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5162 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5163 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5165 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5166 if [ "$CFG_RPATH" = "yes" ]; then
5167 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5168 # set the default rpath to the library installation directory
5169 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5171 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5172 if [ -n "$RPATH_FLAGS" ]; then
5174 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5178 elif [ "$CFG_RPATH" = "yes" ]; then
5179 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5183 if [ "$CFG_RPATH" = "yes" ]; then
5184 # set the default rpath to the library installation directory
5185 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5187 if [ -n "$RPATH_FLAGS" ]; then
5188 # add the user defined rpaths
5189 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5193 if [ '!' -z "$I_FLAGS" ]; then
5194 # add the user define include paths
5195 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5196 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5199 if [ '!' -z "$W_FLAGS" ]; then
5200 # add the user defined warning flags
5201 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5202 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5203 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5206 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5207 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5208 # Follow default behavior of configure.exe by overriding with "rtti".
5209 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5212 if [ "$CFG_ALSA" = "yes" ]; then
5213 QT_CONFIG="$QT_CONFIG alsa"
5216 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5217 QT_CONFIG="$QT_CONFIG pulseaudio"
5220 if [ "$CFG_COREWLAN" = "yes" ]; then
5221 QT_CONFIG="$QT_CONFIG corewlan"
5224 if [ "$CFG_ICU" = "yes" ]; then
5225 QT_CONFIG="$QT_CONFIG icu"
5228 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5229 QT_CONFIG="$QT_CONFIG force_asserts"
5232 if [ "$CFG_PCRE" = "qt" ]; then
5233 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5237 # Some Qt modules are too advanced in C++ for some old compilers
5238 # Detect here the platforms where they are known to work.
5240 # See Qt documentation for more information on which features are
5241 # supported and on which compilers.
5243 canBuildQtConcurrent="yes"
5244 canUseV8Snapshot="yes"
5246 case "$XPLATFORM" in
5248 # PA-RISC's assembly is too limited
5249 # gcc 3.4 on that platform can't build QtXmlPatterns
5250 # the assembly it generates cannot be compiled
5252 # Check gcc's version
5253 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5257 canBuildQtXmlPatterns="no"
5261 canBuildQtXmlPatterns="no"
5265 unsupported/vxworks-*-g++*)
5268 unsupported/vxworks-*-dcc*)
5270 canBuildQtXmlPatterns="no"
5273 # Check gcc's version
5274 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5282 canBuildQtXmlPatterns="no"
5287 # Check the compiler version
5288 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5291 canBuildQtXmlPatterns="no"
5292 canBuildQtConcurrent="no"
5296 canBuildQtConcurrent="no"
5302 canBuildQtXmlPatterns="no"
5303 canBuildQtConcurrent="no"
5309 # Get the xlC version
5310 cat > xlcver.c <<EOF
5314 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5319 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5320 xlcver=`./xlcver 2>/dev/null`
5323 if [ "$OPT_VERBOSE" = "yes" ]; then
5324 if [ -n "$xlcver" ]; then
5325 echo Found IBM xlC version: $xlcver.
5327 echo Could not determine IBM xlC version, assuming oldest supported.
5334 canBuildQtXmlPatterns="no"
5335 canBuildQtConcurrent="no"
5339 canBuildQtConcurrent="no"
5345 canBuildQtConcurrent="no"
5349 if [ "$CFG_GUI" = "no" ]; then
5350 # WebKit requires QtGui
5354 if [ "$CFG_SHARED" = "no" ]; then
5356 echo "WARNING: Using static linking will disable the WebKit module."
5361 CFG_CONCURRENT="yes"
5362 if [ "$canBuildQtConcurrent" = "no" ]; then
5363 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5366 QT_CONFIG="$QT_CONFIG concurrent"
5370 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5371 QT_CONFIG="$QT_CONFIG audio-backend"
5375 if [ "$CFG_WEBKIT" = "debug" ]; then
5376 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5380 QT_CONFIG="$QT_CONFIG v8"
5381 # Detect snapshot support
5382 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5383 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5386 *) canUseV8Snapshot="no"
5390 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5391 # QEMU crashes when building inside Scratchbox with an ARM target
5392 canUseV8Snapshot="no"
5395 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5396 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5398 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5399 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5402 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5403 QT_CONFIG="$QT_CONFIG v8snapshot"
5407 if [ "$CFG_QML_DEBUG" = "no" ]; then
5408 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5414 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5416 case "$COMPILER_VERSION" in
5418 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5419 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5420 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5423 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5424 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5425 QT_GCC_PATCH_VERSION=0
5435 #-------------------------------------------------------------------------------
5436 # part of configuration information goes into qconfig.h
5437 #-------------------------------------------------------------------------------
5439 case "$CFG_QCONFIG" in
5441 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5444 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5445 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5446 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5447 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5448 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5449 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5451 echo "#endif" >>"$tmpconfig"
5455 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5459 # define QT_EDITION $QT_EDITION
5463 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5464 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5466 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5467 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5470 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5471 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5474 if [ "$BUILD_ON_MAC" = "yes" ]; then
5475 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5476 #if defined(__LP64__)
5477 # define QT_POINTER_SIZE 8
5479 # define QT_POINTER_SIZE 4
5483 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5484 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5487 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5488 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5489 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5493 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5495 if [ "$CFG_DEV" = "yes" ]; then
5496 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5499 # Add QPA to config.h
5500 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5502 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5503 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5506 # Add turned on SQL drivers
5507 for DRIVER in $CFG_SQL_AVAILABLE; do
5508 eval "VAL=\$CFG_SQL_$DRIVER"
5511 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5512 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5513 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5516 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5522 QMakeVar set sql-drivers "$SQL_DRIVERS"
5523 QMakeVar set sql-plugins "$SQL_PLUGINS"
5525 # Add other configuration options to the qconfig.h file
5526 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5527 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5528 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5529 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5530 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5531 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5533 # X11/Unix/Mac only configs
5534 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5535 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5536 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5537 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5538 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5539 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5540 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5541 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5542 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5543 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5544 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5545 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5546 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5547 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5549 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5550 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5551 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5552 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5553 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5554 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5555 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5556 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5557 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5558 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5559 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5560 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5561 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5563 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5564 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5565 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5566 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5567 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5568 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5569 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5570 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5572 # sort QCONFIG_FLAGS for neatness if we can
5573 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5574 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5576 if [ -n "$QCONFIG_FLAGS" ]; then
5577 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5578 #ifndef QT_BOOTSTRAPPED
5581 for cfg in $QCONFIG_FLAGS; do
5582 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5583 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5584 # figure out define logic, so we can output the correct
5585 # ifdefs to override the global defines in a project
5587 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5588 # QT_NO_option can be forcefully turned on by QT_option
5589 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5590 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5591 # QT_option can be forcefully turned off by QT_NO_option
5592 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5595 if [ -z $cfgdNeg ]; then
5596 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5603 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5604 #if defined($cfgd) && defined($cfgdNeg)
5606 #elif !defined($cfgd) && !defined($cfgdNeg)
5613 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5614 #endif // QT_BOOTSTRAPPED
5619 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5620 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5621 #define QT_VISIBILITY_AVAILABLE
5626 if [ -n "$QT_LIBINFIX" ]; then
5627 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5628 #define QT_LIBINFIX "$QT_LIBINFIX"
5633 echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5635 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5636 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5637 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5639 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5640 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5641 chmod -w "$outpath/src/corelib/global/qconfig.h"
5642 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5643 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5647 #-------------------------------------------------------------------------------
5648 # save configuration into qconfig.pri
5649 #-------------------------------------------------------------------------------
5650 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5651 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5652 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5653 if [ "$CFG_DEBUG" = "yes" ]; then
5654 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5655 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5656 QT_CONFIG="$QT_CONFIG release"
5658 QT_CONFIG="$QT_CONFIG debug"
5659 elif [ "$CFG_DEBUG" = "no" ]; then
5660 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5661 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5662 QT_CONFIG="$QT_CONFIG debug"
5664 QT_CONFIG="$QT_CONFIG release"
5666 if [ "$CFG_FRAMEWORK" = "no" ]; then
5667 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5669 QT_CONFIG="$QT_CONFIG qt_framework"
5670 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5672 if [ "$CFG_DEV" = "yes" ]; then
5673 QT_CONFIG="$QT_CONFIG private_tests"
5676 cat >>"$QTCONFIG.tmp" <<EOF
5678 CONFIG += $QTCONFIG_CONFIG
5680 QT_HOST_ARCH = $CFG_HOST_ARCH
5681 QT_EDITION = $Edition
5682 QT_CONFIG += $QT_CONFIG
5685 QT_VERSION = $QT_VERSION
5686 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5687 QT_MINOR_VERSION = $QT_MINOR_VERSION
5688 QT_PATCH_VERSION = $QT_PATCH_VERSION
5691 QT_LIBINFIX = $QT_LIBINFIX
5692 QT_NAMESPACE = $QT_NAMESPACE
5696 if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
5697 echo "# pkgconfig" >> "$QTCONFIG.tmp"
5698 echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
5699 echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp"
5700 echo >> $"$QTCONFIG.tmp"
5703 if [ -n "$CFG_SYSROOT" ]; then
5704 echo "# sysroot" >>"$QTCONFIG.tmp"
5705 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5706 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5707 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5708 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5709 echo "}" >> "$QTCONFIG.tmp"
5710 echo >> "$QTCONFIG.tmp"
5712 if [ -n "$RPATH_FLAGS" ]; then
5713 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5715 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5716 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5717 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5718 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5721 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5722 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5723 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5726 # replace qconfig.pri if it differs from the newly created temp file
5727 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5728 rm -f "$QTCONFIG.tmp"
5730 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5733 #-------------------------------------------------------------------------------
5734 # save configuration into qmodule.pri
5735 #-------------------------------------------------------------------------------
5736 QTMODULE="$outpath/mkspecs/qmodule.pri"
5738 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
5740 # Ensure we can link to uninistalled libraries
5741 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5742 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5744 if [ -n "$QT_CFLAGS_PSQL" ]; then
5745 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5747 if [ -n "$QT_LFLAGS_PSQL" ]; then
5748 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5750 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5751 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5753 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5754 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5756 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5757 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5759 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5760 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5762 if [ -n "$QT_LFLAGS_ODBC" ]; then
5763 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5765 if [ -n "$QT_LFLAGS_TDS" ]; then
5766 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5769 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5770 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5773 #dump in the OPENSSL_LIBS info
5774 if [ '!' -z "$OPENSSL_LIBS" ]; then
5775 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5776 elif [ "$CFG_OPENSSL" = "linked" ]; then
5777 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5780 #dump in the SDK info
5781 if [ '!' -z "$CFG_SDK" ]; then
5782 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5786 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5787 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5789 # replace qmodule.pri if it differs from the newly created temp file
5790 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5791 rm -f "$QTMODULE.tmp"
5793 mv -f "$QTMODULE.tmp" "$QTMODULE"
5796 #-------------------------------------------------------------------------------
5797 # save configuration into .qmake.cache
5798 #-------------------------------------------------------------------------------
5800 CACHEFILE="$outpath/.qmake.cache"
5801 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5802 cat >>"$CACHEFILE.tmp" <<EOF
5804 QT_SOURCE_TREE = \$\$quote($relpath)
5805 QT_BUILD_TREE = \$\$quote($outpath)
5806 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5808 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5809 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5810 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5812 include(\$\$PWD/mkspecs/qmodule.pri)
5813 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5817 #dump the qmake spec
5818 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5819 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5821 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5824 # replace .qmake.cache if it differs from the newly created temp file
5825 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5826 rm -f "$CACHEFILE.tmp"
5828 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5831 #-------------------------------------------------------------------------------
5832 # give feedback on configuration
5833 #-------------------------------------------------------------------------------
5834 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5837 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5838 echo "Build type: $PLATFORM"
5840 echo "Building on: $PLATFORM"
5841 echo "Building for: $XPLATFORM"
5844 echo "Architecture: $CFG_ARCH"
5845 echo "Host architecture: $CFG_HOST_ARCH"
5847 if [ -n "$PLATFORM_NOTES" ]; then
5848 echo "Platform notes:"
5849 echo "$PLATFORM_NOTES"
5854 if [ "$OPT_VERBOSE" = "yes" ]; then
5855 echo $ECHO_N "qmake vars .......... $ECHO_C"
5856 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5857 echo "qmake switches ......... $QMAKE_SWITCHES"
5860 echo "Build .................. $CFG_BUILD_PARTS"
5861 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5862 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5863 echo "Debug .................. yes (combined)"
5864 if [ "$CFG_DEBUG" = "yes" ]; then
5865 echo "Default Link ........... debug"
5867 echo "Default Link ........... release"
5870 echo "Debug .................. $CFG_DEBUG"
5872 if [ -n "$PKG_CONFIG" ]; then
5873 echo "pkg-config ............. yes"
5875 echo "pkg-config ............. no"
5877 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5878 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5879 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5880 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5881 echo "QtGui module ........... $CFG_GUI"
5882 echo "QtWidgets module ....... $CFG_WIDGETS"
5883 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5884 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5886 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5888 echo "QML debugging .......... $CFG_QML_DEBUG"
5889 echo "PCH support ............ $CFG_PRECOMPILE"
5890 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5891 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5892 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5893 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5894 elif [ "$CFG_ARCH" = "arm" ]; then
5895 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5896 echo "NEON support ........... ${CFG_NEON}"
5898 if [ "$CFG_ARCH" = "mips" ]; then
5899 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5901 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5902 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5903 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5904 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5905 echo "NIS support ............ $CFG_NIS"
5906 echo "CUPS support ........... $CFG_CUPS"
5907 echo "Iconv support .......... $CFG_ICONV"
5908 echo "Glib support ........... $CFG_GLIB"
5909 echo "GStreamer support ...... $CFG_GSTREAMER"
5910 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
5911 echo "Large File support ..... $CFG_LARGEFILE"
5912 echo "GIF support ............ $CFG_GIF"
5913 if [ "$CFG_JPEG" = "no" ]; then
5914 echo "JPEG support ........... $CFG_JPEG"
5916 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
5918 if [ "$CFG_PNG" = "no" ]; then
5919 echo "PNG support ............ $CFG_PNG"
5921 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
5923 echo "zlib support ........... $CFG_ZLIB"
5924 echo "Session management ..... $CFG_SM"
5925 echo "libudev support ........ $CFG_LIBUDEV"
5927 if [ "$CFG_OPENGL" = "desktop" ]; then
5928 echo "OpenGL support ......... yes (Desktop OpenGL)"
5929 elif [ "$CFG_OPENGL" = "es2" ]; then
5930 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
5932 echo "OpenGL support ......... no"
5935 if [ "$CFG_OPENVG" ]; then
5936 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5937 echo "OpenVG support ......... ShivaVG"
5939 echo "OpenVG support ......... $CFG_OPENVG"
5943 echo "XShape support ......... $CFG_XSHAPE"
5944 echo "XVideo support ......... $CFG_XVIDEO"
5945 echo "XSync support .......... $CFG_XSYNC"
5946 echo "Xinerama support ....... $CFG_XINERAMA"
5947 echo "Xcursor support ........ $CFG_XCURSOR"
5948 echo "Xfixes support ......... $CFG_XFIXES"
5949 echo "Xrandr support ......... $CFG_XRANDR"
5950 echo "Xi support ............. $CFG_XINPUT"
5951 echo "MIT-SHM support ........ $CFG_MITSHM"
5952 echo "FontConfig support ..... $CFG_FONTCONFIG"
5953 echo "XKB Support ............ $CFG_XKB"
5954 echo "immodule support ....... $CFG_IM"
5955 echo "GTK theme support ...... $CFG_QGTKSTYLE"
5957 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
5958 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
5959 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
5960 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
5961 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
5962 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
5963 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
5964 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
5965 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
5968 if [ "$CFG_OPENSSL" = "yes" ]; then
5969 OPENSSL_LINKAGE="(run-time)"
5970 elif [ "$CFG_OPENSSL" = "linked" ]; then
5971 OPENSSL_LINKAGE="(linked)"
5973 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
5974 echo "Alsa support ........... $CFG_ALSA"
5975 if [ "$BUILD_ON_MAC" = "yes" ]; then
5976 echo "CoreWlan support ....... $CFG_COREWLAN"
5978 echo "libICU support ......... $CFG_ICU"
5979 echo "PCRE support ........... $CFG_PCRE"
5980 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
5981 echo "Xcb support ............ limited (old version)"
5983 echo "Xcb support ............ $CFG_XCB"
5985 echo "Xrender support ........ $CFG_XRENDER"
5986 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
5987 echo "XInput2 support ........ $CFG_XINPUT2"
5989 echo "EGLFS support .......... $CFG_EGLFS"
5990 echo "DirectFB support ....... $CFG_DIRECTFB"
5993 # complain about not being able to use dynamic plugins if we are using a static build
5994 if [ "$CFG_SHARED" = "no" ]; then
5996 echo "WARNING: Using static linking will disable the use of dynamically"
5997 echo "loaded plugins. Make sure to import all needed static plugins,"
5998 echo "or compile needed modules into the library."
6001 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6003 echo "NOTE: When linking against OpenSSL, you can override the default"
6004 echo "library names through OPENSSL_LIBS."
6006 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6010 exec 1>&3 3>&- # restore stdout
6011 cat $outpath/config.summary # display config feedback to user
6013 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6015 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6016 echo "if you want a pure debug build."
6021 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6026 #-------------------------------------------------------------------------------
6027 # build makefiles based on the configuration
6028 #-------------------------------------------------------------------------------
6030 echo "Finding project files. Please wait..."
6031 if [ "$CFG_NOPROCESS" != "yes" ]; then
6032 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6033 if [ -f "${relpath}/qtbase.pro" ]; then
6034 mkfile="${outpath}/Makefile"
6035 [ -f "$mkfile" ] && chmod +w "$mkfile"
6036 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6040 # .projects -> projects to process
6041 # .projects.1 -> qt and moc
6042 # .projects.2 -> subdirs and libs
6043 # .projects.3 -> the rest
6044 rm -f .projects .projects.1 .projects.2 .projects.3
6046 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6047 if [ -z "$AWK" ]; then
6048 for p in `echo $QMAKE_PROJECTS`; do
6049 echo "$p" >> .projects
6052 cat >projects.awk <<EOF
6058 first = "./.projects.1.tmp"
6059 second = "./.projects.2.tmp"
6060 third = "./.projects.3.tmp"
6065 if ( ! target_file )
6067 print input_file >target_file
6072 input_file = FILENAME
6077 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6080 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6081 target_file = second
6086 matched_target == 0 && /^(TEMPLATE.*=)/ {
6087 if ( \$3 == "subdirs" )
6088 target_file = second
6089 else if ( \$3 == "lib" )
6095 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6096 if ( \$0 ~ /plugin/ )
6099 target_file = second
6104 if ( ! target_file )
6106 print input_file >>target_file
6113 for p in `echo $QMAKE_PROJECTS`; do
6114 echo "$p" >> .projects.all
6117 # if you get errors about the length of the command line to awk, change the -l arg
6119 split -l 100 .projects.all .projects.all.
6120 for p in .projects.all.*; do
6121 "$AWK" -f projects.awk `cat $p`
6122 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6123 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6124 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6125 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6127 rm -f .projects.all* projects.awk
6129 [ -f .projects.1 ] && cat .projects.1 >>.projects
6130 [ -f .projects.2 ] && cat .projects.2 >>.projects
6131 rm -f .projects.1 .projects.2
6132 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6133 cat .projects.3 >>.projects
6137 # don't sort Qt and MOC in with the other project files
6138 # also work around a segfaulting uniq(1)
6139 if [ -f .sorted.projects.2 ]; then
6140 sort .sorted.projects.2 > .sorted.projects.2.new
6141 mv -f .sorted.projects.2.new .sorted.projects.2
6142 cat .sorted.projects.2 >> .sorted.projects.1
6144 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6145 rm -f .sorted.projects.2 .sorted.projects.1
6149 if [ -f .projects ]; then
6150 uniq .projects >.tmp
6151 mv -f .tmp .projects
6152 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6154 if [ -f .projects.3 ]; then
6155 uniq .projects.3 >.tmp
6156 mv -f .tmp .projects.3
6157 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6159 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6163 for part in $CFG_BUILD_PARTS; do
6165 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6166 libs) PART_ROOTS="$PART_ROOTS src" ;;
6167 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6168 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6173 if [ "$CFG_DEV" = "yes" ]; then
6174 PART_ROOTS="$PART_ROOTS tests"
6177 echo "Creating makefiles. Please wait..."
6178 for file in .projects .projects.3; do
6179 [ '!' -f "$file" ] && continue
6180 for a in `cat $file`; do
6182 for r in $PART_ROOTS; do
6183 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6188 [ "$IN_ROOT" = "no" ] && continue
6191 *winmain/winmain.pro)
6192 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6196 */qmake/qmake.pro) continue ;;
6197 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*|*tools/qdbusxml2cpp*|*tools/qdbuscpp2xml*) SPEC=$QMAKESPEC ;;
6198 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6204 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6205 test -d "$dir" || mkdir -p "$dir"
6206 OUTDIR="$outpath/$dir"
6207 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6208 # fast configure - the makefile exists, skip it
6209 # since the makefile exists, it was generated by qmake, which means we
6210 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6212 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6215 QMAKE_SPEC_ARGS="-spec $SPEC"
6216 echo $ECHO_N " for $a$ECHO_C"
6218 QMAKE="$outpath/bin/qmake"
6219 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6220 if [ "$file" = ".projects.3" ]; then
6223 cat >"${OUTDIR}/Makefile" <<EOF
6224 # ${OUTDIR}/Makefile: generated by configure
6226 # WARNING: This makefile will be replaced with a real makefile.
6227 # All changes made to this file will be lost.
6229 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6231 cat >>"${OUTDIR}/Makefile" <<EOF
6233 all clean install qmake first Makefile: FORCE
6234 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6242 if [ "$OPT_VERBOSE" = "yes" ]; then
6243 echo " (`basename $SPEC`)"
6244 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6249 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6250 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6254 rm -f .projects .projects.3
6256 #-------------------------------------------------------------------------------
6257 # check for platforms that we don't yet know about
6258 #-------------------------------------------------------------------------------
6259 if [ "$CFG_ARCH" = "unknown" ]; then
6262 NOTICE: configure was unable to determine the architecture
6263 for the $XQMAKESPEC target.
6265 Qt will not use a specialized implementation for any atomic
6266 operations. Instead a generic implemention based on either GCC
6267 intrinsics or C++11 std::atomic<T> will be used (when
6268 available). The generic implementations are generally as fast
6269 as and always as safe as a specialized implementation.
6271 If no generic implementation is available, Qt will use a
6272 fallback UNIX implementation which uses a single
6273 pthread_mutex_t to protect all atomic operations. This
6274 implementation is the slow (but safe) fallback implementation
6275 for architectures Qt does not yet support.
6279 #-------------------------------------------------------------------------------
6280 # check if the user passed the -no-zlib option, which is no longer supported
6281 #-------------------------------------------------------------------------------
6282 if [ -n "$ZLIB_FORCED" ]; then
6283 which_zlib="supplied"
6284 if [ "$CFG_ZLIB" = "system" ]; then
6290 NOTICE: The -no-zlib option was supplied but is no longer
6293 Qt now requires zlib support in all builds, so the -no-zlib
6294 option was ignored. Qt will be built using the $which_zlib
6299 #-------------------------------------------------------------------------------
6300 # check if the user passed the obsoleted -wayland or -no-wayland flag
6301 #-------------------------------------------------------------------------------
6302 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6305 NOTICE: The -wayland and -no-wayland flags are now obsolete
6307 All configuring of QtWayland plugin and QtCompositor happens in the module
6311 #-------------------------------------------------------------------------------
6312 # check if the user passed the obsoleted -arch or -host-arch options
6313 #-------------------------------------------------------------------------------
6314 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6317 NOTICE: The -arch and -host-arch options are obsolete.
6319 Qt now detects the target and host architectures based on compiler
6320 output. Qt will be built using $CFG_ARCH for the target architecture
6321 and $CFG_HOST_ARCH for the host architecture (note that these two
6322 will be the same unless you are cross-compiling).
6326 #-------------------------------------------------------------------------------
6327 # finally save the executed command to another script
6328 #-------------------------------------------------------------------------------
6329 if [ `basename $0` != "config.status" ]; then
6330 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6332 # add the system variables
6333 for varname in $SYSTEM_VARIABLES; do
6335 'if [ -n "\$'${varname}'" ]; then
6336 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6341 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6343 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6344 echo "#!/bin/sh" > "$outpath/config.status"
6345 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6346 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6347 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6348 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6349 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6350 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6351 echo "else" >> "$outpath/config.status"
6352 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6353 echo "fi" >> "$outpath/config.status"
6354 chmod +x "$outpath/config.status"
6357 if [ -n "$RPATH_MESSAGE" ]; then
6359 echo "$RPATH_MESSAGE"
6362 MAKE=`basename "$MAKE"`
6364 echo Qt is now configured for building. Just run \'$MAKE\'.
6365 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6366 echo Once everything is built, Qt is installed.
6367 echo You should not run \'$MAKE install\'.
6369 echo Once everything is built, you must run \'$MAKE install\'.
6370 echo Qt will be installed into $QT_INSTALL_PREFIX
6373 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.