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"
126 *load\(device_config\)*)
127 conf_file="$DEVICE_VARS_FILE"
128 if [ ! -f "$conf_file" ]; then
129 echo "WARNING: Unable to find file $conf_file" >&2
132 getQMakeConf1 "$conf_file"
144 values["LITERAL_WHITESPACE"] = " "
145 values["LITERAL_DOLLAR"] = "$"
147 /^[_A-Z0-9.]+[ \t]*\+?=/ {
148 valStart = index($0, "=") + 1
151 if (substr($0, valStart - 2, 1) == "+") {
155 variable = substr($0, 0, valStart - 2 - append)
156 value = substr($0, valStart)
157 gsub("[ \t]+", "", variable)
158 gsub("^[ \t]+", "", value)
159 gsub("[ \t]+$", "", value)
162 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
163 ovalue = ovalue substr(value, 1, RSTART - 1)
164 var = substr(value, RSTART + 2, RLENGTH - 2)
165 value = substr(value, RSTART + RLENGTH)
167 var = substr(var, 2, length(var) - 2)
169 ovalue = ovalue values[var]
171 ovalue = ovalue value
173 combinedValue = values[variable]
174 if (append == 1 && length(combinedValue) > 0) {
175 combinedValue = combinedValue " " ovalue
177 combinedValue = ovalue
179 values[variable] = combinedValue
182 for (var in values) {
183 print var "=" values[var]
191 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
194 # relies on $QMAKESPEC being set correctly. parses include statements in
195 # qmake.conf and prints out the expanded file
198 if [ -z "$specvals" ]; then
199 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$specvals"
206 if [ -z "$xspecvals" ]; then
207 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
209 getQMakeConf3 "$1" "$xspecvals"
212 # relies on $TEST_COMPILER being set correctly
213 compilerSupportsFlag()
215 cat >conftest.cpp <<EOF
216 int main() { return 0; }
218 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
220 rm -f conftest.cpp conftest.o
224 # relies on $TEST_COMPILER being set correctly
230 safe_flag=`shellEscape "$flag"`
231 lflags=$lflags,$safe_flag
233 compilerSupportsFlag "$lflags" >/dev/null 2>&1
236 #-------------------------------------------------------------------------------
238 #-------------------------------------------------------------------------------
246 echo >&2 "BUG: wrong command to QMakeVar: $1"
250 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
253 resolveDeviceMkspec()
255 result=$(find "$relpath/mkspecs/devices/" -type d -name "*$1*" | sed "s,^$relpath/mkspecs/,,")
256 match_count=$(echo "$result" | wc -w)
257 if [ "$match_count" -gt 1 ]; then
258 echo >&2 "Error: Multiple matches for device '$1'. Candidates are:"
259 tabbed_result=$(echo "$result" | sed "s,^, ,")
260 echo >&2 "$tabbed_result"
262 elif [ "$match_count" -eq 0 ]; then
263 echo >&2 "Error: No device matching '$1'"
270 #-------------------------------------------------------------------------------
271 # operating system detection
272 #-------------------------------------------------------------------------------
274 # need that throughout the script
275 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
276 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
277 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
278 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
280 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
281 if echo '\c' | grep '\c' >/dev/null; then
287 #-------------------------------------------------------------------------------
288 # window system detection
289 #-------------------------------------------------------------------------------
293 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
298 #-----------------------------------------------------------------------------
299 # Qt version detection
300 #-----------------------------------------------------------------------------
301 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
305 if [ -n "$QT_VERSION" ]; then
306 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
307 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
308 if [ -n "$MAJOR" ]; then
309 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
310 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
311 QT_MAJOR_VERSION="$MAJOR"
312 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
313 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
316 if [ -z "$QT_MAJOR_VERSION" ]; then
317 echo "Cannot process version from qglobal.h: $QT_VERSION"
318 echo "Cannot proceed."
322 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
323 if [ -z "$QT_PACKAGEDATE" ]; then
324 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
325 echo "Cannot proceed"
329 #-------------------------------------------------------------------------------
331 #-------------------------------------------------------------------------------
335 EditionString=Commercial
339 # parse the arguments, setting things to "yes" or "no"
340 while [ "$#" -gt 0 ]; do
344 #Autoconf style options
346 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
350 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
354 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
355 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
358 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
361 -h|help|--help|-help)
362 if [ "$VAL" = "yes" ]; then
364 COMMERCIAL_USER="no" #doesn't matter we will display the help
367 COMMERCIAL_USER="no" #doesn't matter we will display the help
371 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
375 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
382 if [ "$UNKNOWN_ARG" = "yes" ]; then
394 COMMERCIAL_USER="yes"
408 if [ "$COMMERCIAL_USER" = "ask" ]; then
410 echo "Which edition of Qt do you want to use ?"
412 echo "Type 'c' if you want to use the Commercial Edition."
413 echo "Type 'o' if you want to use the Open Source Edition."
417 if [ "$commercial" = "c" ]; then
418 COMMERCIAL_USER="yes"
420 elif [ "$commercial" = "o" ]; then
427 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
428 # Commercial preview release
429 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
432 QT_EDITION="QT_EDITION_DESKTOP"
433 LicenseType="Technology Preview"
434 elif [ $COMMERCIAL_USER = "yes" ]; then
435 # one of commercial editions
436 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
438 # read in the license file
439 if [ -f "$LICENSE_FILE" ]; then
440 . "$LICENSE_FILE" >/dev/null 2>&1
441 if [ -z "$LicenseKeyExt" ]; then
443 echo "You are using an old license file."
445 echo "Please install the license file supplied by Nokia,"
446 echo "or install the Qt Open Source Edition if you intend to"
447 echo "develop free software."
450 if [ -z "$Licensee" ]; then
452 echo "Invalid license key. Please check the license key."
456 if [ -z "$LicenseKeyExt" ]; then
458 echo $ECHO_N "Please enter your license key: $ECHO_C"
460 Licensee="Unknown user"
465 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
466 && LicenseValid="yes" \
468 if [ "$LicenseValid" != "yes" ]; then
470 echo "Invalid license key. Please check the license key."
473 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
474 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
475 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
476 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
478 # determine which edition we are licensed to use
479 case "$LicenseTypeCode" in
481 LicenseType="Commercial"
485 QT_EDITION="QT_EDITION_UNIVERSAL"
488 Edition="FullFramework"
489 EditionString="Full Framework"
490 QT_EDITION="QT_EDITION_DESKTOP"
493 Edition="GUIFramework"
494 EditionString="GUI Framework"
495 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
500 LicenseType="Evaluation"
501 QMakeVar add DEFINES QT_EVAL
505 QT_EDITION="QT_EDITION_EVALUATION"
510 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
512 echo "Invalid license key. Please check the license key."
516 # verify that we are licensed to use Qt on this platform
518 case "$PlatformCode" in
521 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
525 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
528 ### EMBEDDED_QPA logic missing ###
529 case "$PlatformCode,$PLATFORM_MAC" in
530 X9,* | XC,* | XU,* | XW,* | XM,*)
532 LICENSE_EXTENSION="-ALLOS"
534 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
535 # Qt for Embedded Linux
536 LICENSE_EXTENSION="-EMBEDDED"
538 6M,* | N7,* | N9,* | NX,*)
540 LICENSE_EXTENSION="-EMBEDDED"
542 FM,* | LM,yes | ZM,no)
544 LICENSE_EXTENSION="-DESKTOP"
548 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
550 echo "You are not licensed for the $Platform platform."
552 echo "Please contact qt-info@nokia.com to upgrade your license to"
553 echo "include the $Platform platform, or install the Qt Open Source Edition"
554 echo "if you intend to develop free software."
559 if test -r "$relpath/.LICENSE"; then
560 # Generic, non-final license
562 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
567 *TECHNOLOGY?PREVIEW*)
574 echo >&2 "Invalid license files; cannot continue"
579 EditionString="$Edition"
580 QT_EDITION="QT_EDITION_DESKTOP"
583 case "$LicenseFeatureCode" in
586 case "$LicenseType" in
588 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
591 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
597 case "$LicenseType" in
599 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
602 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
608 echo "Invalid license key. Please check the license key."
612 case "$LicenseFeatureCode" in
620 if [ '!' -f "$outpath/LICENSE" ]; then
621 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
622 echo "this software has disappeared."
624 echo "Sorry, you are not licensed to use this software."
625 echo "Try re-installing."
629 elif [ $COMMERCIAL_USER = "no" ]; then
630 # Open Source edition - may only be used under the terms of the GPL or LGPL.
631 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
632 Licensee="Open Source"
634 EditionString="Open Source"
635 QT_EDITION="QT_EDITION_OPENSOURCE"
638 #-------------------------------------------------------------------------------
639 # initalize variables
640 #-------------------------------------------------------------------------------
642 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
643 for varname in $SYSTEM_VARIABLES; do
644 qmakevarname="${varname}"
645 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
646 if [ "${varname}" = "LDFLAGS" ]; then
647 qmakevarname="LFLAGS"
648 elif [ "${varname}" = "LD" ]; then
652 'if [ -n "\$'${varname}'" ]; then
653 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
657 # Use CC/CXX to run config.tests
658 mkdir -p "$outpath/config.tests"
659 rm -f "$outpath/config.tests/.qmake.cache"
660 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
662 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
664 # QTDIR may be set and point to an old or system-wide Qt installation
667 # the minimum version of libdbus-1 that we require:
668 MIN_DBUS_1_VERSION=0.93
670 # initalize internal variables
671 CFG_CONFIGURE_EXIT_ON_ERROR=yes
673 CFG_GUI=auto # (yes|no|auto)
699 CFG_OPENVG_LC_INCLUDES=no
700 CFG_OPENVG_SHIVA=auto
701 CFG_OPENVG_ON_OPENGL=auto
707 QT_DEFAULT_BUILD_PARTS="libs examples"
711 CFG_AUDIO_BACKEND=auto
714 CFG_JAVASCRIPTCORE_JIT=auto
717 # Target architecture
720 # Host architecture, same as CFG_ARCH when not cross-compiling
722 CFG_HOST_CPUFEATURES=
723 # Set when the -arch or -host-arch arguments are used
724 OPT_OBSOLETE_HOST_ARG=no
736 CFG_OBSOLETE_WAYLAND=no
748 CFG_SEPARATE_DEBUG_INFO=no
749 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
750 CFG_REDUCE_EXPORTS=auto
758 CFG_REDUCE_RELOCATIONS=auto
759 CFG_ACCESSIBILITY=auto
764 CFG_CLOCK_GETTIME=auto
765 CFG_CLOCK_MONOTONIC=auto
773 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
775 CFG_PREFIX_INSTALL=yes
785 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
786 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
791 OPT_CONFIRM_LICENSE=no
804 QPA_PLATFORM_GUARD=yes
807 # initalize variables used for installation
816 QT_INSTALL_TRANSLATIONS=
825 #flags for SQL drivers
833 QT_LFLAGS_ODBC="-lodbc"
836 # flags for libdbus-1
840 # flags for Glib (X11 only)
844 # flags for GStreamer (X11 only)
848 # default qpa platform
849 QT_QPA_DEFAULT_PLATFORM=
851 #-------------------------------------------------------------------------------
852 # check SQL drivers available in this package
853 #-------------------------------------------------------------------------------
855 # opensource version removes some drivers, so force them to be off
861 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
862 for a in "$relpath/src/plugins/sqldrivers/"*; do
864 base_a=`basename "$a"`
865 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
866 eval "CFG_SQL_${base_a}=auto"
871 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
872 if [ -d "$relpath/src/plugins/imageformats" ]; then
873 for a in "$relpath/src/plugins/imageformats/"*; do
875 base_a=`basename "$a"`
876 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
881 #-------------------------------------------------------------------------------
882 # parse command line arguments
883 #-------------------------------------------------------------------------------
885 # parse the arguments, setting things to "yes" or "no"
886 while [ "$#" -gt 0 ]; do
890 #Autoconf style options
892 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
896 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
900 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
901 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
904 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
908 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
912 -no-*-*|-plugin-*-*|-qt-*-*)
913 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
914 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
918 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
921 #Qt style options that pass an argument
922 -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|-qconfig)
923 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
927 #Qt style complex options in one command
928 -enable-*|-disable-*)
929 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
930 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
932 #Qt Builtin/System style options
933 -no-*|-system-*|-qt-*)
934 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
935 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
937 #Options that cannot be generalized
944 # this option may or may not be followed by an argument
945 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
954 # this option may or may not be followed by an argument
955 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
963 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
964 # this option may or may not be followed by an argument
965 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
984 if [ "$1" = "-D" ]; then
988 VAL=`echo $1 | sed 's,-D,,'`
993 # this option may or may not be followed by an argument
994 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1003 if [ "$1" = "-I" ]; then
1007 VAL=`echo $1 | sed 's,-I,,'`
1012 if [ "$1" = "-L" ]; then
1016 VAL=`echo $1 | sed 's,-L,,'`
1021 if [ "$1" = "-R" ]; then
1025 VAL=`echo $1 | sed 's,-R,,'`
1030 if [ "$1" = "-l" ]; then
1034 VAL=`echo $1 | sed 's,-l,,'`
1039 if [ "$1" = "-F" ]; then
1043 VAL=`echo $1 | sed 's,-F,,'`
1048 if [ "$1" = "-fw" ]; then
1052 VAL=`echo $1 | sed 's,-fw,,'`
1059 #General options, including Qt style yes options
1061 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1068 if [ "$UNKNOWN_ARG" = "yes" ]; then
1069 echo "$1: unknown argument"
1080 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1081 CFG_ACCESSIBILITY="$VAL"
1090 CFG_USE_GNUMAKE="$VAL"
1093 CFG_MYSQL_CONFIG="$VAL"
1096 QT_INSTALL_PREFIX="$VAL"
1099 QT_HOST_PREFIX="$VAL"
1108 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1109 CFG_PKGCONFIG="$VAL"
1115 CFG_PKGCONFIG="force"
1118 QT_INSTALL_DOCS="$VAL"
1121 QT_INSTALL_HEADERS="$VAL"
1124 QT_INSTALL_PLUGINS="$VAL"
1127 QT_INSTALL_IMPORTS="$VAL"
1130 QT_INSTALL_DATA="$VAL"
1133 QT_INSTALL_LIBS="$VAL"
1142 QT_INSTALL_TRANSLATIONS="$VAL"
1144 sysconfdir|settingsdir)
1145 QT_INSTALL_SETTINGS="$VAL"
1148 QT_INSTALL_EXAMPLES="$VAL"
1151 QT_INSTALL_TESTS="$VAL"
1160 QT_INSTALL_BINS="$VAL"
1163 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1170 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1171 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1172 [ "$VAL" = "es2" ]; then
1179 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1186 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1189 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1192 if [ "$BUILD_ON_MAC" = "yes" ]; then
1199 OPT_OBSOLETE_HOST_ARG=yes
1202 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1203 CFG_MAC_HARFBUZZ="$VAL"
1210 if [ "$BUILD_ON_MAC" = "yes" ]; then
1211 CFG_FRAMEWORK="$VAL"
1217 if [ "$VAL" = "yes" ]; then
1219 QMakeVar add QMAKE_CFLAGS -pg
1220 QMakeVar add QMAKE_CXXFLAGS -pg
1221 QMakeVar add QMAKE_LFLAGS -pg
1222 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1228 if [ "$VAL" = "yes" ]; then
1229 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1234 # keep compatibility with old platform names
1240 PLATFORM=hpux-acc-o64
1243 PLATFORM=hpux-acc-64
1246 PLATFORM=hpux-acc-64
1258 PLATFORM=reliant-cds-64
1261 PLATFORM=solaris-cc-64
1264 PLATFORM=unixware-cc
1267 PLATFORM=unixware-g++
1270 PLATFORM=unixware-cc
1273 PLATFORM=unixware-g++
1279 i386) NATIVE_64_ARCH="x86_64" ;;
1280 powerpc) NATIVE_64_ARCH="ppc64" ;;
1281 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1283 if [ ! -z "$NATIVE_64_ARCH" ]; then
1284 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1291 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1294 XPLATFORM=`resolveDeviceMkspec $VAL`
1295 [ "$XPLATFORM" = "undefined" ] && exit 101
1298 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1299 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1300 DeviceVar set $DEV_VAR $DEV_VAL
1303 QT_QPA_DEFAULT_PLATFORM="$VAL"
1306 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1307 CFG_DEBUG_RELEASE="$VAL"
1313 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1314 CFG_RELEASE_QMAKE="$VAL"
1320 if [ "$VAL" = "yes" ]; then
1322 elif [ "$VAL" = "no" ]; then
1329 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1330 CFG_PREFIX_INSTALL="$VAL"
1338 developer-build|commercial|opensource)
1339 # These switches have been dealt with already
1342 if [ "$VAL" = "yes" ]; then
1344 elif [ "$VAL" = "no" ]; then
1351 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1352 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1358 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1359 if [ "$VAL" = "no" ]; then
1360 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1361 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1362 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1368 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1375 if [ "$VAL" = "no" ]; then
1382 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1390 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1397 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1404 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1411 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1418 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1425 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1432 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1439 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1440 CFG_PRECOMPILE="$VAL"
1445 separate-debug-info)
1446 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1447 CFG_SEPARATE_DEBUG_INFO="$VAL"
1448 elif [ "$VAL" = "nocopy" ] ; then
1449 CFG_SEPARATE_DEBUG_INFO="yes"
1450 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1456 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1457 CFG_REDUCE_EXPORTS="$VAL"
1463 if [ "$VAL" = "no" ]; then
1470 if [ "$VAL" = "no" ]; then
1477 if [ "$VAL" = "no" ]; then
1484 if [ "$VAL" = "no" ]; then
1491 if [ "$VAL" = "no" ]; then
1498 if [ "$VAL" = "no" ]; then
1505 if [ "$VAL" = "no" ]; then
1515 if [ "$VAL" = "no" ]; then
1522 if [ "$VAL" = "no" ]; then
1529 if [ "$VAL" = "no" ]; then
1530 CFG_MIPS_DSPR2="$VAL"
1536 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1537 CFG_REDUCE_RELOCATIONS="$VAL"
1543 [ "$VAL" = "qt" ] && VAL=yes
1544 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1549 # No longer supported:
1550 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1553 if [ "$VAL" = "system" ]; then
1560 [ "$VAL" = "yes" ] && VAL=qt
1561 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1568 [ "$VAL" = "yes" ] && VAL=qt
1569 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1576 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1583 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1590 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1597 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1604 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1611 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1612 CFG_FONTCONFIG="$VAL"
1618 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1625 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1632 CFG_OBSOLETE_WAYLAND=yes
1635 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1642 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1656 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1663 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1684 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1685 CFG_GSTREAMER="$VAL"
1691 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1692 CFG_QGTKSTYLE="$VAL"
1698 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1701 if [ "$VAL" = "no" ]; then
1709 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1711 elif [ "$VAL" = "no" ]; then
1718 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1719 QPA_PLATFORM_GUARD="$VAL"
1725 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1727 elif [ "$VAL" = "runtime" ]; then
1734 if [ "$VAL" = "yes" ]; then
1741 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1748 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1749 CFG_LARGEFILE="$VAL"
1755 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1762 if [ "$VAL" = "yes" ]; then
1763 CFG_OPENSSL="linked"
1769 if [ "$VAL" = "yes" ]; then
1772 if [ "$VAL" = "no" ]; then
1780 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1781 CFG_JAVASCRIPTCORE_JIT="$VAL"
1787 if [ "$VAL" = "yes" ]; then
1788 OPT_CONFIRM_LICENSE="$VAL"
1794 if [ "$VAL" = "yes" ]; then
1800 sql-*|imageformat-*)
1801 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1802 # if autoconf style options were used, $VAL can be "yes" or "no"
1803 [ "$VAL" = "yes" ] && VAL=qt
1804 # now $VAL should be "no", "qt", or "plugin"... double-check
1805 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1808 # now $VAL is "no", "qt", or "plugin"
1810 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1811 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1813 # Grab the available values
1816 avail="$CFG_SQL_AVAILABLE"
1819 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1820 if [ "$OPT" != "plugin" ]; then
1821 # png is always built in
1827 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1831 # Check that that user's value is available.
1834 if [ "$VAL" = "$d" ]; then
1839 [ "$found" = yes ] || ERROR=yes
1841 if [ "$VAR" = "sql" ]; then
1842 # set the CFG_SQL_driver
1843 eval "CFG_SQL_$VAL=\$OPT"
1845 elif [ "$VAR" = "imageformat" ]; then
1846 [ "$OPT" = "qt" ] && OPT=yes
1847 VAL="`echo $VAL |tr a-z A-Z`"
1848 eval "CFG_$VAL=$OPT"
1852 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1853 if [ "$OPT" = "plugin" ]; then
1856 QMakeVar add "${VAR}s" "${VAL}"
1857 elif [ "$OPT" = "no" ]; then
1858 PLUG_VAR="${VAR}-plugin"
1860 QMakeVar del "${IN_VAR}s" "$VAL"
1861 QMakeVar del "${PLUG_VAR}s" "$VAL"
1863 if [ "$ERROR" = "yes" ]; then
1864 echo "$CURRENT_OPT: unknown argument"
1869 if [ "$VAL" = "yes" ]; then
1870 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1871 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1875 elif [ "$VAL" = "no" ]; then
1876 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1877 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1886 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1893 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1900 DEFINES="$DEFINES \"$VAL\""
1901 D_FLAGS="$D_FLAGS -D\"$VAL\""
1904 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1907 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1910 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1913 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1916 if [ "$BUILD_ON_MAC" = "yes" ]; then
1917 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1918 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1924 if [ "$BUILD_ON_MAC" = "yes" ]; then
1925 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1931 W_FLAGS="$W_FLAGS \"${VAL}\""
1937 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1938 CFG_PHONON_BACKEND="$VAL"
1950 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1951 CFG_AUDIO_BACKEND="$VAL"
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1965 CFG_FORCE_ASSERTS="$VAL"
1971 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1978 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1988 if [ "$UNKNOWN_OPT" = "yes" ]; then
1989 echo "${CURRENT_OPT}: invalid command-line switch"
1995 # update QT_CONFIG to show our current predefined configuration
1996 case "$CFG_QCONFIG" in
1997 minimal|small|medium|large|full)
1998 # these are a sequence of increasing functionality
1999 for c in minimal small medium large full; do
2000 QT_CONFIG="$QT_CONFIG $c-config"
2001 [ "$CFG_QCONFIG" = $c ] && break
2005 # not known to be sufficient for anything
2006 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2007 echo >&2 "Error: configuration file not found:"
2008 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2010 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2015 #-------------------------------------------------------------------------------
2016 # build tree initialization
2017 #-------------------------------------------------------------------------------
2019 # where to find which..
2020 unixtests="$relpath/config.tests/unix"
2021 mactests="$relpath/config.tests/mac"
2022 WHICH="$unixtests/which.test"
2024 PERL=`$WHICH perl 2>/dev/null`
2026 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2028 for e in gawk nawk awk; do
2029 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2036 PERL="/usr/bin/perl"
2037 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2041 ### skip this if the user just needs help...
2042 if [ "$OPT_HELP" != "yes" ]; then
2044 # is this a shadow build?
2045 if [ "$OPT_SHADOW" = "maybe" ]; then
2047 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2048 if [ -h "$outpath" ]; then
2049 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2055 if [ "$OPT_SHADOW" = "yes" ]; then
2056 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2057 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2058 echo >&2 "Cannot proceed."
2061 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2064 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2066 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2067 echo "Qt can be built in release mode with separate debug information, so"
2068 echo "-debug-and-release is not necessary anymore"
2072 if [ "$CFG_SILENT" = "yes" ]; then
2073 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2076 # if the source tree is different from the build tree,
2077 # symlink or copy part of the sources
2078 if [ "$OPT_SHADOW" = "yes" ]; then
2079 echo "Preparing build tree..."
2081 if [ -z "$PERL" ]; then
2083 echo "You need perl in your PATH to make a shadow build."
2084 echo "Cannot proceed."
2088 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2090 # make a syncqt script that can be used in the shadow
2091 rm -f "$outpath/bin/syncqt"
2092 if [ -x "$relpath/bin/syncqt" ]; then
2093 mkdir -p "$outpath/bin"
2094 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2095 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2096 chmod 755 "$outpath/bin/syncqt"
2099 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2100 rm -f "$outpath/bin/$i"
2101 if [ -x "$relpath/bin/$i" ]; then
2102 mkdir -p "$outpath/bin"
2103 echo "#!/bin/sh" >"$outpath/bin/$i"
2104 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2105 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2106 chmod 755 "$outpath/bin/$i"
2110 # save a pre-existing mkspecs/modules dir
2111 test -d "$outpath/mkspecs/modules" && \
2112 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2114 # symlink the mkspecs directory
2115 mkdir -p "$outpath/mkspecs"
2116 rm -rf "$outpath"/mkspecs/*
2117 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2118 rm -f "$outpath/mkspecs/default"
2122 rm -rf "$outpath/mkspecs/$1"
2123 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2124 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2127 # Special case for mkspecs/features directory.
2128 # To be able to place .prf files into a shadow build directory,
2129 # we're creating links for files only. The directory structure is reproduced.
2130 ShadowMkspecs features
2132 # The modules dir is special, too.
2133 if test -d "$outpath/mkspecs-modules"; then
2134 rm -rf "$outpath/mkspecs/modules"
2135 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2137 ShadowMkspecs modules
2140 # symlink the doc directory
2141 rm -rf "$outpath/doc"
2142 ln -s "$relpath/doc" "$outpath/doc"
2145 # symlink fonts to be able to run application from build directory
2146 if [ ! -d "${outpath}/lib/fonts" ]; then
2147 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2148 mkdir -p "${outpath}/lib"
2149 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2153 if [ "$OPT_FAST" = "auto" ]; then
2154 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2161 # find a make command
2162 if [ -z "$MAKE" ]; then
2164 for mk in gmake make; do
2165 if "$WHICH" $mk >/dev/null 2>&1; then
2170 if [ -z "$MAKE" ]; then
2171 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2172 echo >&2 "Cannot proceed."
2175 # export MAKE, we need it later in the config.tests
2181 #-------------------------------------------------------------------------------
2182 # auto-detect all that hasn't been specified in the arguments
2183 #-------------------------------------------------------------------------------
2185 if [ -z "$PLATFORM" ]; then
2187 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2189 OSX_VERSION=`uname -r | cut -d. -f1`
2190 # Select compiler. Use g++ unless we find a usable Clang version
2192 if [ "$OSX_VERSION" -ge 12 ]; then
2193 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2195 elif [ "$OSX_VERSION" -eq 11 ]; then
2196 # We're on Lion. Check if we have a supported Clang version
2197 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2200 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2207 #PLATFORM=aix-g++-64
2209 #PLATFORM=aix-xlc-64
2211 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2221 # PLATFORM=dynix-g++
2227 PLATFORM=freebsd-g++
2229 - Also available for FreeBSD: freebsd-icc
2233 PLATFORM=openbsd-g++
2244 #PLATFORM=irix-cc-64
2246 - Also available for IRIX: irix-g++ irix-cc-64
2250 case "$UNAME_MACHINE" in
2252 #PLATFORM=hpuxi-acc-32
2253 PLATFORM=hpuxi-acc-64
2255 - Also available for HP-UXi: hpuxi-acc-32
2261 #PLATFORM=hpux-acc-64
2263 #PLATFORM=hpux-acc-o64
2265 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2274 - Also available for Tru64: tru64-g++
2278 case "$UNAME_MACHINE" in
2280 PLATFORM=linux-g++-64
2287 - Also available for Linux: linux-kcc linux-icc linux-cxx
2291 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2292 PLATFORM="solaris-g++"
2294 #PLATFORM=solaris-g++
2296 #PLATFORM=solaris-cc64
2299 - Also available for Solaris: solaris-g++ solaris-cc-64
2302 ReliantUNIX-*:*|SINIX-*:*)
2303 PLATFORM=reliant-cds
2304 #PLATFORM=reliant-cds-64
2306 - Also available for Reliant UNIX: reliant-cds-64
2316 #PLATFORM=unixware-g++
2317 PLATFORM=unixware-cc
2319 - Also available for OpenUNIX: unixware-g++
2323 #PLATFORM=unixware-g++
2324 PLATFORM=unixware-cc
2326 - Also available for UnixWare: unixware-g++
2333 - Also available for SCO OpenServer: sco-g++
2337 PLATFORM=unixware-g++
2340 PLATFORM=unsupported/qnx-g++
2343 if [ "$OPT_HELP" != "yes" ]; then
2345 echo " The build script does not currently recognize all" >&2
2346 echo " platforms supported by Qt." >&2
2347 echo " Rerun this script with a -platform option listed to" >&2
2348 echo " set the system/compiler combination you use." >&2
2355 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2357 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2358 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2359 case "$XPLATFORM" in *qnx-*|*blackberry-*) XPLATFORM_QNX=yes;; esac
2361 if [ -d "$PLATFORM" ]; then
2362 QMAKESPEC="$PLATFORM"
2364 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2366 if [ -d "$XPLATFORM" ]; then
2367 XQMAKESPEC="$XPLATFORM"
2369 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2371 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2372 QT_CROSS_COMPILE=yes
2373 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2374 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2377 if [ "$BUILD_ON_MAC" = "yes" ]; then
2378 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2380 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2381 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2382 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2383 echo " built with 'macx-g++'" >&2
2389 # check specified platforms are supported
2390 if [ '!' -d "$QMAKESPEC" ]; then
2392 echo " The specified system/compiler is not supported:"
2396 echo " Please see the README file for a complete list."
2400 if [ '!' -d "$XQMAKESPEC" ]; then
2402 echo " The specified system/compiler is not supported:"
2406 echo " Please see the README file for a complete list."
2410 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2412 echo " The specified system/compiler port is not complete:"
2414 echo " $XQMAKESPEC/qplatformdefs.h"
2416 echo " Please contact qt-info@nokia.com."
2421 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2422 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2423 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2424 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2425 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2429 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2430 case `basename "$XPLATFORM"` in
2433 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2435 echo "Please contact qt-info@nokia.com to upgrade your license to"
2436 echo "include this platform, or install the Qt Open Source Edition"
2437 echo "if you intend to develop free software."
2443 #-------------------------------------------------------------------------------
2444 # tests that don't need qmake (must be run before displaying help)
2445 #-------------------------------------------------------------------------------
2447 # detect build style
2448 if [ "$CFG_DEBUG" = "auto" ]; then
2449 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2450 CFG_DEBUG_RELEASE=yes
2452 elif [ "$CFG_DEV" = "yes" ]; then
2453 CFG_DEBUG_RELEASE=no
2456 CFG_DEBUG_RELEASE=no
2460 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2461 QT_CONFIG="$QT_CONFIG build_all debug_and_release"
2464 # pass on $CFG_SDK to the configure tests.
2465 if [ '!' -z "$CFG_SDK" ]; then
2466 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2469 # find the default framework value
2470 if [ "$BUILD_ON_MAC" = "yes" ]; then
2471 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2472 CFG_FRAMEWORK="$CFG_SHARED"
2473 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2475 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2483 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2485 TEST_COMPILER=$QMAKE_CONF_COMPILER
2486 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2487 if [ -z "$TEST_COMPILER" ]; then
2488 echo "ERROR: Cannot set the compiler for the configuration tests"
2494 case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
2495 if [ -n "$GCC_MACHINE_DUMP" ]; then
2496 DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
2499 if [ -n "$CFG_SYSROOT" ]; then
2500 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2504 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2506 # auto-detect precompiled header support
2507 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2508 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2515 # auto-detect support for separate debug info in objcopy
2516 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2517 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2518 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2519 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2520 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2521 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2522 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2523 CFG_SEPARATE_DEBUG_INFO=no
2527 # binutils on HP-UX is buggy; default to no.
2528 CFG_SEPARATE_DEBUG_INFO=no
2531 CFG_SEPARATE_DEBUG_INFO=yes
2537 # auto-detect -fvisibility support
2538 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2539 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2540 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2541 echo "-reduce-exports was requested but this compiler does not support it"
2542 echo "Re-run configure with -v for more information"
2545 CFG_REDUCE_EXPORTS=no
2547 CFG_REDUCE_EXPORTS=yes
2551 # detect the availability of the -Bsymbolic-functions linker optimization
2552 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2553 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2554 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2555 echo "-reduce-relocations was requested but this compiler does not support it"
2556 echo "Re-run configure with -v for more information"
2559 CFG_REDUCE_RELOCATIONS=no
2561 CFG_REDUCE_RELOCATIONS=yes
2565 # auto-detect GNU make support
2566 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2570 # find the default framework value
2571 if [ "$BUILD_ON_MAC" = "yes" ]; then
2572 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2573 CFG_FRAMEWORK="$CFG_SHARED"
2574 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2576 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2584 #setup the build parts
2585 if [ -z "$CFG_BUILD_PARTS" ]; then
2586 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2588 # build tests by default, if a developer build
2589 if [ "$CFG_DEV" = "yes" ]; then
2590 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2593 # don't build tools by default when cross-compiling
2594 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2595 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2598 for nobuild in $CFG_NOBUILD_PARTS; do
2599 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2601 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2603 # echo "WARNING: libs is a required part of the build."
2605 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2608 #-------------------------------------------------------------------------------
2609 # post process QT_INSTALL_* variables
2610 #-------------------------------------------------------------------------------
2612 if [ -z "$QT_INSTALL_PREFIX" ]; then
2613 if [ "$CFG_DEV" = "yes" ]; then
2614 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2616 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2619 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2621 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2622 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2623 if [ "$BUILD_ON_MAC" = "yes" ]; then
2624 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2627 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2630 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2632 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2633 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2634 if [ "$BUILD_ON_MAC" = "yes" ]; then
2635 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2640 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2643 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2645 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2646 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2647 if [ "$BUILD_ON_MAC" = "yes" ]; then
2648 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2649 QT_INSTALL_LIBS="/Libraries/Frameworks"
2653 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2655 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2657 if [ -z "$QT_INSTALL_BINS" ]; then #default
2658 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2659 if [ "$BUILD_ON_MAC" = "yes" ]; then
2660 QT_INSTALL_BINS="/Developer/Applications/Qt"
2663 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2665 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2667 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2668 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2669 if [ "$BUILD_ON_MAC" = "yes" ]; then
2670 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2673 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2675 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2677 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2678 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2679 if [ "$BUILD_ON_MAC" = "yes" ]; then
2680 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2683 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2685 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2687 if [ -z "$QT_INSTALL_DATA" ]; then #default
2688 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2690 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2692 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2693 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2695 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2697 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2698 if [ "$BUILD_ON_MAC" = "yes" ]; then
2699 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2701 QT_INSTALL_SETTINGS=/etc/xdg
2704 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2706 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2707 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2708 if [ "$BUILD_ON_MAC" = "yes" ]; then
2709 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2712 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2714 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2717 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2718 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2719 if [ "$BUILD_ON_MAC" = "yes" ]; then
2720 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2723 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2725 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2727 #------- host paths --------
2729 if [ -z "$QT_HOST_PREFIX" ]; then
2730 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2733 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2737 if [ -z "$QT_HOST_BINS" ]; then #default
2739 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2740 if [ "$BUILD_ON_MAC" = "yes" ]; then
2741 QT_HOST_BINS="/Developer/Applications/Qt"
2744 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2746 QT_HOST_BINS="$QT_INSTALL_BINS"
2749 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2751 if [ -z "$QT_HOST_DATA" ]; then #default
2753 QT_HOST_DATA="$QT_HOST_PREFIX"
2755 QT_HOST_DATA="$QT_INSTALL_DATA"
2758 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2761 #-------------------------------------------------------------------------------
2762 # help - interactive parts of the script _after_ this section please
2763 #-------------------------------------------------------------------------------
2765 # next, emit a usage message if something failed.
2766 if [ "$OPT_HELP" = "yes" ]; then
2767 [ "x$ERROR" = "xyes" ] && echo
2768 if [ "$CFG_NIS" = "no" ]; then
2775 if [ "$CFG_CUPS" = "no" ]; then
2782 if [ "$CFG_ICONV" = "no" ]; then
2789 if [ "$CFG_LARGEFILE" = "no" ]; then
2796 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2804 if [ "$CFG_XCB" = "no" ]; then
2812 if [ "$CFG_EGLFS" = "no" ]; then
2820 if [ "$CFG_DIRECTFB" = "no" ]; then
2827 if [ "$CFG_XINPUT2" = "no" ]; then
2835 if [ "$CFG_DBUS" = "no" ]; then
2843 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2851 if [ "$CFG_GLIB" = "no" ]; then
2860 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2861 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2862 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2863 [-release] [-debug] [-debug-and-release] [-c++11] [-no-c++11]
2864 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2865 [-largefile] [-no-accessibility] [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2866 [-plugin-sql-<driver>] [-system-sqlite]
2867 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2868 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2869 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2870 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2871 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2872 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2873 [-no-separate-debug-info] [-no-sse2]
2874 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2875 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2876 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2877 [-no-audio-backend] [-audio-backend]
2878 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2879 [-no-optimized-qmake] [-optimized-qmake]
2880 [-no-openssl] [-openssl] [-openssl-linked]
2881 [-no-gtkstyle] [-gtkstyle]
2882 [-qt-pcre] [-system-pcre]
2883 [-device <name>] [-device-option <key=value>]
2884 [additional platform specific options (see below)]
2887 Installation options:
2889 These are optional, but you may specify install directories.
2891 -prefix <dir> ...... This will install everything relative to <dir>
2892 (default $QT_INSTALL_PREFIX)
2894 -hostprefix [dir] .. Tools and libraries needed when developing
2895 applications are installed in [dir]. If [dir] is
2896 not given, the current build directory will be used.
2899 * -prefix-install .... Force a sandboxed "local" installation of
2900 Qt. This will install into
2901 $QT_INSTALL_PREFIX, if this option is
2902 disabled then some platforms will attempt a
2903 "system" install by placing default values to
2904 be placed in a system location other than
2907 You may use these to separate different parts of the install:
2909 -bindir <dir> ......... Executables will be installed to <dir>
2910 (default PREFIX/bin)
2911 -libdir <dir> ......... Libraries will be installed to <dir>
2912 (default PREFIX/lib)
2913 -docdir <dir> ......... Documentation will be installed to <dir>
2914 (default PREFIX/doc)
2915 -headerdir <dir> ...... Headers will be installed to <dir>
2916 (default PREFIX/include)
2917 -plugindir <dir> ...... Plugins will be installed to <dir>
2918 (default PREFIX/plugins)
2919 -importdir <dir> ...... Imports for QML will be installed to <dir>
2920 (default PREFIX/imports)
2921 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2923 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2924 (default PREFIX/translations)
2925 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2926 (default PREFIX/etc/settings)
2927 -examplesdir <dir> .... Examples will be installed to <dir>
2928 (default PREFIX/examples)
2929 -testsdir <dir> ....... Tests will be installed to <dir>
2930 (default PREFIX/tests)
2932 -hostbindir <dir> .. Host executables will be installed to <dir>
2933 (default HOSTPREFIX/bin)
2934 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2935 (default HOSTPREFIX)
2939 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2940 that needs to be evaluated. If the evaluation succeeds, the feature is
2941 included. Here is a short explanation of each option:
2943 * -release ........... Compile and link Qt with debugging turned off.
2944 -debug ............. Compile and link Qt with debugging turned on.
2945 -debug-and-release . Compile and link two versions of Qt, with and without
2946 debugging turned on (Mac only).
2948 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2950 -opensource ........ Compile and link the Open-Source Edition of Qt.
2951 -commercial ........ Compile and link the Commercial Edition of Qt.
2953 -no-c++11 .......... Do not compile Qt with C++11 support enabled.
2954 + -c++11 ............. Compile Qt with C++11 support enabled.
2956 * -shared ............ Create and use shared Qt libraries.
2957 -static ............ Create and use static Qt libraries.
2959 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2961 -fast .............. Configure Qt quickly by generating Makefiles only for
2962 library and subdirectory targets. All other Makefiles
2963 are created as wrappers, which will in turn run qmake.
2965 -no-largefile ...... Disables large file support.
2966 + -largefile ......... Enables Qt to access files larger than 4 GB.
2968 -no-accessibility .. Do not compile Accessibility support.
2969 * -accessibility ..... Compile Accessibility support.
2971 -no-sql-<driver> ... Disable SQL <driver> entirely.
2972 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2974 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2977 Possible values for <driver>:
2978 [ $CFG_SQL_AVAILABLE ]
2980 -system-sqlite ..... Use sqlite from the operating system.
2982 -no-phonon-backend.. Do not build the platform phonon plugin.
2983 + -phonon-backend..... Build the platform phonon plugin.
2985 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
2986 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
2988 -no-qml-debug ...... Do not build the in-process QML debugging support.
2989 + -qml-debug ......... Build the QML debugging support.
2991 -platform target ... The operating system and compiler you are building
2994 See the README file for a list of supported
2995 operating systems and compilers.
2997 -no-sse2 ........... Do not compile with use of SSE2 instructions.
2998 -no-sse3 ........... Do not compile with use of SSE3 instructions.
2999 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3000 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3001 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3002 -no-avx ............ Do not compile with use of AVX instructions.
3003 -no-avx2 ........... Do not compile with use of AVX2 instructions.
3004 -no-neon ........... Do not compile with use of NEON instructions.
3005 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3006 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3008 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3009 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3011 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3013 -D <string> ........ Add an explicit define to the preprocessor.
3014 -I <string> ........ Add an explicit include path.
3015 -L <string> ........ Add an explicit library path.
3017 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
3018 configure determines whether to use pkg-config or not with
3019 some heuristics such as checking the environment variables.
3020 -no-pkg-config ..... Disable use of pkg-config.
3021 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
3022 detection heuristic).
3024 -help, -h .......... Display this information.
3026 Third Party Libraries:
3028 -qt-zlib ........... Use the zlib bundled with Qt.
3029 + -system-zlib ....... Use zlib from the operating system.
3030 See http://www.gzip.org/zlib
3032 -no-gif ............ Do not compile GIF reading support.
3034 -no-libpng ......... Do not compile PNG support.
3035 -qt-libpng ......... Use the libpng bundled with Qt.
3036 + -system-libpng ..... Use libpng from the operating system.
3037 See http://www.libpng.org/pub/png
3039 -no-libjpeg ........ Do not compile JPEG support.
3040 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3041 + -system-libjpeg .... Use libjpeg from the operating system.
3042 See http://www.ijg.org
3044 -no-openssl ........ Do not compile support for OpenSSL.
3045 + -openssl ........... Enable run-time OpenSSL support.
3046 -openssl-linked .... Enabled linked OpenSSL support.
3048 -qt-pcre ........... Use the PCRE library bundled with Qt.
3049 + -system-pcre ....... Use the PCRE library from the operating system.
3053 -make <part> ....... Add part to the list of parts to be built at make time.
3054 ($QT_DEFAULT_BUILD_PARTS)
3055 -nomake <part> ..... Exclude part from the list of parts to be built.
3057 -R <string> ........ Add an explicit runtime library path to the Qt
3059 -l <string> ........ Add an explicit library.
3061 -no-rpath .......... Do not use the library install path as a runtime
3063 + -rpath ............. Link Qt libraries and executables using the library
3064 install path as a runtime library path. Equivalent
3065 to -R install_libpath
3067 -continue .......... Continue as far as possible if an error occurs.
3069 -verbose, -v ....... Print verbose information about each step of the
3072 -silent ............ Reduce the build output so that warnings and errors
3073 can be seen more easily.
3075 * -no-optimized-qmake ... Do not build qmake optimized.
3076 -optimized-qmake ...... Build qmake optimized.
3078 -no-gui ............ Don't build the Qt GUI library
3080 $NSN -no-nis ............ Do not compile NIS support.
3081 $NSY -nis ............... Compile NIS support.
3083 $CUN -no-cups ........... Do not compile CUPS support.
3084 $CUY -cups .............. Compile CUPS support.
3085 Requires cups/cups.h and libcups.so.2.
3087 $CIN -no-iconv .......... Do not compile support for iconv(3).
3088 $CIY -iconv ............. Compile support for iconv(3).
3090 $PHN -no-pch ............ Do not use precompiled header support.
3091 $PHY -pch ............... Use precompiled header support.
3093 $DBN -no-dbus ........... Do not compile the QtDBus module.
3094 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3095 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3097 -reduce-relocations ..... Reduce relocations in the libraries through extra
3098 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3099 experimental; needs GNU ld >= 2.18).
3101 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3103 -device <name> ............... Cross-compile for device <name> (experimental)
3104 -device-option <key=value> ... Add device specific options for the device mkspec
3107 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3108 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3110 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3111 $XCBY -xcb ............... Compile Xcb support.
3113 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3114 $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
3116 $DFBN -no-directfb ....... Do not compile DirectFB support.
3117 $DFBY -directfb .......... Compile DirectFB support.
3119 -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
3121 -xplatform target ... The target platform when cross-compiling.
3123 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3125 -no-feature-<feature> Do not compile in <feature>.
3126 -feature-<feature> .. Compile in <feature>. The available features
3127 are described in src/corelib/global/qfeatures.txt
3129 -no-freetype ........ Do not compile in Freetype2 support.
3130 -qt-freetype ........ Use the libfreetype bundled with Qt.
3131 * -system-freetype .... Use libfreetype from the operating system.
3132 See http://www.freetype.org/
3134 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3135 default ($CFG_QCONFIG).
3137 -no-opengl .......... Do not support OpenGL.
3138 -opengl <api> ....... Enable OpenGL support
3139 With no parameter, this will attempt to auto-detect
3140 OpenGL ES 2, or regular desktop OpenGL.
3141 Use es2 for <api> to override auto-detection.
3143 $GBN -no-glib ........... Do not compile Glib support.
3144 $GBY -glib .............. Compile Glib support.
3147 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3150 $X2N -no-xinput2......... Do not compile XInput2 support.
3151 $X2Y -xinput2............ Compile XInput2 support.
3157 if [ "$BUILD_ON_MAC" = "yes" ]; then
3162 -Fstring ........... Add an explicit framework path.
3163 -fw string ......... Add an explicit framework.
3165 * -framework ......... Build Qt as a series of frameworks and
3166 link tools against those frameworks.
3167 -no-framework ...... Do not build Qt as a series of frameworks.
3169 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3170 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3172 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3173 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3174 QT_ENABLE_HARFBUZZ environment variable.
3179 [ "x$ERROR" = "xyes" ] && exit 1
3184 # -----------------------------------------------------------------------------
3185 # LICENSING, INTERACTIVE PART
3186 # -----------------------------------------------------------------------------
3189 echo "This is the Qt ${EditionString} Edition."
3192 if [ "$Edition" = "OpenSource" ]; then
3194 echo "You are licensed to use this software under the terms of"
3195 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3196 if [ -f "$relpath/LICENSE.GPL3" ]; then
3197 echo "You are also licensed to use this software under the terms of"
3198 echo "the GNU General Public License (GPL) versions 3."
3204 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3205 echo "You have already accepted the terms of the $LicenseType license."
3208 if [ -f "$relpath/LICENSE.GPL3" ]; then
3209 echo "Type '3' to view the GNU General Public License version 3."
3211 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3212 echo "Type 'yes' to accept this license offer."
3213 echo "Type 'no' to decline this license offer."
3215 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3219 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3221 elif [ "$acceptance" = "no" ]; then
3222 echo "You are not licensed to use this software."
3225 elif [ "$acceptance" = "3" ]; then
3226 more "$relpath/LICENSE.GPL3"
3227 elif [ "$acceptance" = "L" ]; then
3228 more "$relpath/LICENSE.LGPL"
3231 elif [ "$Edition" = "Preview" ]; then
3232 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3235 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3236 echo "You have already accepted the terms of the $LicenseType license."
3239 echo "You are licensed to use this software under the terms of"
3240 echo "the $TheLicense"
3242 echo "Type '?' to read the Preview License."
3243 echo "Type 'yes' to accept this license offer."
3244 echo "Type 'no' to decline this license offer."
3246 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3250 if [ "$acceptance" = "yes" ]; then
3252 elif [ "$acceptance" = "no" ] ;then
3253 echo "You are not licensed to use this software."
3256 elif [ "$acceptance" = "?" ]; then
3257 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3260 elif [ "$Edition" != "OpenSource" ]; then
3261 if [ -n "$ExpiryDate" ]; then
3262 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3263 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3264 Today=`date +%Y%m%d`
3265 if [ "$Today" -gt "$ExpiryDate" ]; then
3266 case "$LicenseType" in
3267 Commercial|Academic|Educational)
3268 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3270 echo "NOTICE NOTICE NOTICE NOTICE"
3272 echo " Your support and upgrade period has expired."
3274 echo " You are no longer licensed to use this version of Qt."
3275 echo " Please contact qt-info@nokia.com to renew your support"
3276 echo " and upgrades for this license."
3278 echo "NOTICE NOTICE NOTICE NOTICE"
3283 echo "WARNING WARNING WARNING WARNING"
3285 echo " Your support and upgrade period has expired."
3287 echo " You may continue to use your last licensed release"
3288 echo " of Qt under the terms of your existing license"
3289 echo " agreement. But you are not entitled to technical"
3290 echo " support, nor are you entitled to use any more recent"
3291 echo " Qt releases."
3293 echo " Please contact qt-info@nokia.com to renew your"
3294 echo " support and upgrades for this license."
3296 echo "WARNING WARNING WARNING WARNING"
3303 echo "NOTICE NOTICE NOTICE NOTICE"
3305 echo " Your Evaluation license has expired."
3307 echo " You are no longer licensed to use this software. Please"
3308 echo " contact qt-info@nokia.com to purchase license, or install"
3309 echo " the Qt Open Source Edition if you intend to develop free"
3312 echo "NOTICE NOTICE NOTICE NOTICE"
3319 TheLicense=`head -n 1 "$outpath/LICENSE"`
3321 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3322 echo "You have already accepted the terms of the $TheLicense."
3325 echo "You are licensed to use this software under the terms of"
3326 echo "the $TheLicense."
3328 echo "Type '?' to view the $TheLicense."
3329 echo "Type 'yes' to accept this license offer."
3330 echo "Type 'no' to decline this license offer."
3332 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3336 if [ "$acceptance" = "yes" ]; then
3338 elif [ "$acceptance" = "no" ]; then
3339 echo "You are not licensed to use this software."
3342 else [ "$acceptance" = "?" ]
3343 more "$outpath/LICENSE"
3348 # this should be moved somewhere else
3351 AIX_VERSION=`uname -v`
3352 if [ "$AIX_VERSION" -lt "5" ]; then
3353 QMakeVar add QMAKE_LIBS_X11 -lbind
3360 #-------------------------------------------------------------------------------
3361 # generate qconfig.cpp
3362 #-------------------------------------------------------------------------------
3363 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3365 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3367 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3368 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3370 /* Installation date */
3371 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3373 /* Installation Info */
3374 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3375 "qt_prfxpath=$QT_INSTALL_PREFIX",
3376 "qt_docspath=$QT_INSTALL_DOCS",
3377 "qt_hdrspath=$QT_INSTALL_HEADERS",
3378 "qt_libspath=$QT_INSTALL_LIBS",
3379 "qt_binspath=$QT_INSTALL_BINS",
3380 "qt_plugpath=$QT_INSTALL_PLUGINS",
3381 "qt_impspath=$QT_INSTALL_IMPORTS",
3382 "qt_datapath=$QT_INSTALL_DATA",
3383 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3384 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3385 "qt_tstspath=$QT_INSTALL_TESTS",
3386 #ifdef QT_BUILD_QMAKE
3387 "qt_ssrtpath=$CFG_SYSROOT",
3388 "qt_hpfxpath=$QT_HOST_PREFIX",
3389 "qt_hbinpath=$QT_HOST_BINS",
3390 "qt_hdatpath=$QT_HOST_DATA",
3393 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3396 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3398 /* strlen( "qt_lcnsxxxx" ) == 12 */
3399 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3400 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3402 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3405 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3406 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3407 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3409 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3410 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3411 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3414 # -----------------------------------------------------------------------------
3415 if [ "$LicenseType" = "Evaluation" ]; then
3416 EVALKEY=qt_qevalkey=$LicenseKeyExt
3417 elif echo "$DEFINES" | grep QT_EVAL >/dev/null 2>&1; then
3418 EVALKEY=qt_qevalkey=
3421 if [ -n "$EVALKEY" ]; then
3422 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3423 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3424 /* Evaluation license key */
3425 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3427 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3431 # -----------------------------------------------------------------------------
3433 # -----------------------------------------------------------------------------
3436 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3438 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3439 if [ "$OPT_SHADOW" = "yes" ]; then
3440 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3441 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3442 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3446 # $1: input variable name (awk regexp)
3447 # $2: optional output variable name
3448 # $3: optional value transformation (sed command)
3449 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3450 # is where the resulting variable is written to
3451 setBootstrapVariable()
3453 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3457 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3458 echo "Creating qmake. Please wait..."
3461 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3462 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3463 if [ -f "$QCONFIG_H" ]; then
3464 OLD_QCONFIG_H=$QCONFIG_H
3465 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3468 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3469 # when building qmake, we use #defines for the install paths,
3470 # however they are real functions in the library
3471 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3472 mkdir -p "$outpath/src/corelib/global"
3473 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3474 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3477 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3479 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3480 rm -rf mkspecs/default mkspecs/default-host
3481 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3482 ln -s `echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default-host
3483 mkdir -p "$outpath/qmake" || exit
3485 for mkfile in GNUmakefile Makefile; do
3488 in_mkfile="${mkfile}.in"
3489 if [ "$mkfile" = "Makefile" ]; then
3490 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3491 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3493 in_mkfile="${mkfile}.unix"
3495 in_mkfile="$relpath/qmake/$in_mkfile"
3496 mkfile="$outpath/qmake/$mkfile"
3497 if [ -f "$mkfile" ]; then
3498 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3501 [ -f "$in_mkfile" ] || continue
3503 echo "########################################################################" > "$mkfile"
3504 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3505 echo "########################################################################" >> "$mkfile"
3508 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3509 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3510 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3512 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3513 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3516 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3517 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3518 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3519 setBootstrapVariable QMAKE_CFLAGS
3520 setBootstrapVariable QMAKE_CXXFLAGS
3521 setBootstrapVariable QMAKE_LFLAGS
3523 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3524 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3525 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3527 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3528 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3529 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3530 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3531 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3532 elif [ "$CFG_DEBUG" = "yes" ]; then
3533 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3534 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3535 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3536 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3539 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3540 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3541 for rpath in $RPATH_FLAGS; do
3542 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3545 if [ "$BUILD_ON_MAC" = "yes" ]; then
3546 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3547 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3548 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3549 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3550 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3551 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3552 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3553 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3554 if [ '!' -z "$CFG_SDK" ]; then
3555 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3556 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3557 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3558 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3559 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3562 if [ '!' -z "$D_FLAGS" ]; then
3563 EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS"
3565 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3566 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3567 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3568 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3570 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3571 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3572 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3573 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3574 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3575 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3576 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3577 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3578 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3579 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3581 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3582 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3583 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3584 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3589 QMAKE_BUILD_ERROR=no
3590 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3591 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3592 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3593 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3596 #-------------------------------------------------------------------------------
3597 # create a qt.conf for the Qt build tree itself
3598 #-------------------------------------------------------------------------------
3600 QTCONFFILE="$outpath/bin/qt.conf"
3601 cat > "$QTCONFFILE" <<EOF
3606 #-------------------------------------------------------------------------------
3608 #-------------------------------------------------------------------------------
3609 if [ -z "$PKG_CONFIG" ]; then
3610 # See if PKG_CONFIG is set in the mkspec:
3611 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3613 if [ -z "$PKG_CONFIG" ]; then
3614 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3617 if [ "$CFG_PKGCONFIG" = "no" ]; then
3619 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3621 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3622 echo >&2 "a correctly setup pkg-config environment!"
3624 elif [ -n "$PKG_CONFIG" ]; then
3625 # found a pkg-config
3626 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3627 # when xcompiling, check environment to see if it's actually usable
3628 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3629 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3630 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3631 if [ -n "$GCC_MACHINE_DUMP" ]; then
3632 PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$CFG_SYSROOT/usr/lib/$GCC_MACHINE_DUMP/pkgconfig
3634 export PKG_CONFIG_LIBDIR
3635 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3636 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3637 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3638 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3639 echo >&2 "Set this variable to the directory that contains target .pc files"
3640 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3641 echo >&2 "use -force-pkg-config to override this test."
3645 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3648 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3649 if [ -n "$CFG_SYSROOT" ]; then
3650 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3651 export PKG_CONFIG_SYSROOT_DIR
3652 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3653 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3654 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3655 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3656 echo >&2 "or use -force-pkg-config to override this test."
3660 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3664 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3665 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3669 if [ -z "$PKG_CONFIG" ]; then
3670 QT_CONFIG="$QT_CONFIG no-pkg-config"
3673 #-------------------------------------------------------------------------------
3674 # write out device config before we run the test.
3675 #-------------------------------------------------------------------------------
3676 DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
3677 if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
3678 rm -f "$DEVICE_VARS_FILE"
3680 mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
3681 DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
3684 #-------------------------------------------------------------------------------
3685 # tests that need qmake
3686 #-------------------------------------------------------------------------------
3688 #-------------------------------------------------------------------------------
3689 # determine the target and host architectures
3690 #-------------------------------------------------------------------------------
3692 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3693 OUTFILE=$outpath/arch.result
3694 "$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG"
3695 if [ $? -eq 0 ]; then
3696 eval `cat "$OUTFILE"`
3699 echo "Could not determine the target architecture!"
3700 echo "Turn on verbose messaging (-v) to see the final report."
3702 rm -f "$OUTFILE" 2>/dev/null
3703 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3705 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3706 # Do the same test again, using the host compiler
3707 SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG_HOST"
3708 if [ $? -eq 0 ]; then
3709 eval `cat "$OUTFILE"`
3712 echo "Could not determine the host architecture!"
3713 echo "Turn on verbose messaging (-v) to see the final report."
3715 rm -f "$OUTFILE" 2>/dev/null
3716 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3718 # not cross compiling, host == target
3719 CFG_HOST_ARCH="$CFG_ARCH"
3720 CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES"
3724 if [ "$OPT_VERBOSE" = "yes" ]; then
3725 echo "System architecture: '$CFG_ARCH'"
3726 echo "Host architecture: '$CFG_HOST_ARCH'"
3729 #-------------------------------------------------------------------------------
3730 # functionality tests
3731 #-------------------------------------------------------------------------------
3733 # Detect C++11 support
3734 if [ "$CFG_CXX11" != "no" ]; then
3735 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/c++11 "C++11" $L_FLAGS $I_FLAGS $l_FLAGS; then
3737 elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3738 echo "C++11 support cannot be enabled due to functionality tests!"
3739 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3740 echo " If you believe this message is in error you may use the continue"
3741 echo " switch (-continue) to $0 to continue."
3748 # detect availability of float math.h functions
3749 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3750 CFG_USE_FLOATMATH=yes
3752 CFG_USE_FLOATMATH=no
3755 # detect sse2 support
3756 if [ "${CFG_SSE2}" = "auto" ]; then
3757 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/common/sse2 "sse2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3764 # detect sse3 support
3765 if [ "${CFG_SSE3}" = "auto" ]; then
3766 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/common/sse3 "sse3" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3773 # detect ssse3 support
3774 if [ "${CFG_SSSE3}" = "auto" ]; then
3775 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/common/ssse3 "ssse3" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3782 # detect sse4.1 support
3783 if [ "${CFG_SSE4_1}" = "auto" ]; then
3784 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/common/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3791 # detect sse4.2 support
3792 if [ "${CFG_SSE4_2}" = "auto" ]; then
3793 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/common/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3800 # detect avx support
3801 if [ "${CFG_AVX}" = "auto" ]; then
3802 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/common/avx "avx" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3803 case "$XQMAKESPEC" in
3805 # Some clang versions produce internal compiler errors compiling Qt AVX code
3806 case `$TEST_COMPILER --version` in
3807 Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
3809 if [ "$OPT_VERBOSE" = "yes" ]; then
3810 echo 'AVX support disabled for blacklisted clang compiler'
3827 # detect avx2 support
3828 if [ "${CFG_AVX}" = "no" ]; then
3831 if [ "${CFG_AVX2}" = "auto" ]; then
3832 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/common/avx2 "avx2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3839 # check iWMMXt support
3840 if [ "$CFG_IWMMXT" = "yes" ]; then
3841 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
3842 if [ $? != "0" ]; then
3843 echo "The iWMMXt functionality test failed!"
3844 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3849 # detect neon support
3850 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3851 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3856 elif [ "$CFG_ARCH" != "arm" ]; then
3860 # detect mips_dsp support
3861 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3867 # detect mips_dspr2 support
3868 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3874 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3877 if [ "$CFG_ZLIB" = "no" ]; then
3878 # Note: Qt no longer support builds without zlib
3879 # So we force a "no" to be "auto" here.
3880 # If you REALLY really need no zlib support, you can still disable
3881 # it by doing the following:
3882 # add "no-zlib" to mkspecs/qconfig.pri
3883 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3885 # There's no guarantee that Qt will build under those conditions
3890 if [ "$CFG_ZLIB" = "auto" ]; then
3891 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3898 if [ "$CFG_LARGEFILE" = "auto" ]; then
3899 #Large files should be enabled for all Linux systems
3903 if [ "$CFG_GUI" = "no" ]; then
3904 QPA_PLATFORM_GUARD=no
3907 # detect how jpeg should be built
3908 if [ "$CFG_JPEG" = "auto" ]; then
3909 if [ "$CFG_SHARED" = "yes" ]; then
3916 if [ "$CFG_LIBJPEG" = "auto" ]; then
3917 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libjpeg "libjpeg" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3924 # detect how gif should be built
3925 if [ "$CFG_GIF" = "auto" ]; then
3926 if [ "$CFG_SHARED" = "yes" ]; then
3934 if [ "$CFG_LIBPNG" = "auto" ]; then
3935 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libpng "libpng" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3942 # detect accessibility
3943 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3944 CFG_ACCESSIBILITY=yes
3947 if [ "$CFG_EGLFS" = "yes" ]; then
3948 if [ "$CFG_EGL" = "no" ]; then
3949 echo "The EGLFS plugin requires EGL support and cannot be built"
3952 if [ "$CFG_OPENGL" != "es2" ]; then
3953 echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
3960 # auto-detect SQL-modules support
3961 for _SQLDR in $CFG_SQL_AVAILABLE; do
3964 if [ "$CFG_SQL_mysql" != "no" ]; then
3965 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3966 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3967 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3968 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3969 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3970 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3971 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3973 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3974 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3975 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3976 echo " You need MySql 4 or higher."
3977 echo " If you believe this message is in error you may use the continue"
3978 echo " switch (-continue) to $0 to continue."
3983 QT_LFLAGS_MYSQL_R=""
3987 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3988 QMakeVar add CONFIG use_libmysqlclient_r
3989 if [ "$CFG_SQL_mysql" = "auto" ]; then
3990 CFG_SQL_mysql=plugin
3992 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3993 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3994 if [ "$CFG_SQL_mysql" = "auto" ]; then
3995 CFG_SQL_mysql=plugin
3998 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3999 echo "MySQL support cannot be enabled due to functionality tests!"
4000 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4001 echo " If you believe this message is in error you may use the continue"
4002 echo " switch (-continue) to $0 to continue."
4007 QT_LFLAGS_MYSQL_R=""
4015 if [ "$CFG_SQL_psql" != "no" ]; then
4016 # Be careful not to use native pg_config when cross building.
4017 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4018 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4019 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4021 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4022 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4023 # But, respect PSQL_LIBS if set
4024 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4025 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4026 if [ "$CFG_SQL_psql" = "auto" ]; then
4030 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4031 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4032 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4033 echo " If you believe this message is in error you may use the continue"
4034 echo " switch (-continue) to $0 to continue."
4045 if [ "$CFG_SQL_odbc" != "no" ]; then
4046 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4047 if [ "$CFG_SQL_odbc" = "auto" ]; then
4051 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4052 QT_LFLAGS_ODBC="-liodbc"
4053 if [ "$CFG_SQL_odbc" = "auto" ]; then
4057 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4058 echo "ODBC support cannot be enabled due to functionality tests!"
4059 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4060 echo " If you believe this message is in error you may use the continue"
4061 echo " switch (-continue) to $0 to continue."
4071 if [ "$CFG_SQL_oci" != "no" ]; then
4072 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4073 if [ "$CFG_SQL_oci" = "auto" ]; then
4077 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4078 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4079 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4080 echo " If you believe this message is in error you may use the continue"
4081 echo " switch (-continue) to $0 to continue."
4090 if [ "$CFG_SQL_tds" != "no" ]; then
4091 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4092 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4093 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4094 if [ "$CFG_SQL_tds" = "auto" ]; then
4098 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4099 echo "TDS support cannot be enabled due to functionality tests!"
4100 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4101 echo " If you believe this message is in error you may use the continue"
4102 echo " switch (-continue) to $0 to continue."
4111 if [ "$CFG_SQL_db2" != "no" ]; then
4112 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4113 if [ "$CFG_SQL_db2" = "auto" ]; then
4117 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4118 echo "ODBC support cannot be enabled due to functionality tests!"
4119 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4120 echo " If you believe this message is in error you may use the continue"
4121 echo " switch (-continue) to $0 to continue."
4130 if [ "$CFG_SQL_ibase" != "no" ]; then
4131 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4132 if [ "$CFG_SQL_ibase" = "auto" ]; then
4133 CFG_SQL_ibase=plugin
4136 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4137 echo "InterBase support cannot be enabled due to functionality tests!"
4138 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4139 echo " If you believe this message is in error you may use the continue"
4140 echo " switch (-continue) to $0 to continue."
4149 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4150 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4151 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4152 CFG_SQL_sqlite2=plugin
4155 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4156 echo "SQLite2 support cannot be enabled due to functionality tests!"
4157 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4158 echo " If you believe this message is in error you may use the continue"
4159 echo " switch (-continue) to $0 to continue."
4168 if [ "$CFG_SQL_sqlite" != "no" ]; then
4169 SQLITE_AUTODETECT_FAILED="no"
4170 if [ "$CFG_SQLITE" = "system" ]; then
4171 if [ -n "$PKG_CONFIG" ]; then
4172 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4173 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4175 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4176 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4177 CFG_SQL_sqlite=plugin
4179 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4181 SQLITE_AUTODETECT_FAILED="yes"
4184 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4185 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4186 CFG_SQL_sqlite=plugin
4189 SQLITE_AUTODETECT_FAILED="yes"
4193 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4194 echo "SQLite support cannot be enabled due to functionality tests!"
4195 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4196 echo " If you believe this message is in error you may use the continue"
4197 echo " switch (-continue) to $0 to continue."
4203 if [ "$OPT_VERBOSE" = "yes" ]; then
4204 echo "unknown SQL driver: $_SQLDR"
4210 # auto-detect NIS support
4211 if [ "$CFG_NIS" != "no" ]; then
4212 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4215 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4216 echo "NIS support cannot be enabled due to functionality tests!"
4217 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4218 echo " If you believe this message is in error you may use the continue"
4219 echo " switch (-continue) to $0 to continue."
4227 # auto-detect CUPS support
4228 if [ "$CFG_CUPS" != "no" ]; then
4229 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4232 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4233 echo "Cups support cannot be enabled due to functionality tests!"
4234 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4235 echo " If you believe this message is in error you may use the continue"
4236 echo " switch (-continue) to $0 to continue."
4244 # auto-detect iconv(3) support
4245 if [ "$CFG_ICONV" != "no" ]; then
4246 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4248 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4250 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/sun-libiconv" "SUN libiconv" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4252 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4255 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4256 echo "Iconv support cannot be enabled due to functionality tests!"
4257 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4258 echo " If you believe this message is in error you may use the continue"
4259 echo " switch (-continue) to $0 to continue."
4267 # auto-detect libdbus-1 support
4268 if [ "$CFG_DBUS" != "no" ]; then
4269 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4270 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4271 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4273 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then
4274 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4275 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4276 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4278 if [ "$CFG_DBUS" = "auto" ]; then
4280 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4281 # CFG_DBUS is "yes" or "linked" here
4283 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4284 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4285 echo " If you believe this message is in error you may use the continue"
4286 echo " switch (-continue) to $0 to continue."
4292 # auto-detect Glib support
4293 if [ "$CFG_GLIB" != "no" ]; then
4294 if [ -n "$PKG_CONFIG" ]; then
4295 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4296 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4298 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB; then
4300 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4301 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4303 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4304 echo "Glib support cannot be enabled due to functionality tests!"
4305 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4306 echo " If you believe this message is in error you may use the continue"
4307 echo " switch (-continue) to $0 to continue."
4315 # auto-detect GTK style support
4316 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4317 if [ -n "$PKG_CONFIG" ]; then
4318 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4319 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4321 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4323 QT_CONFIG="$QT_CONFIG gtkstyle"
4324 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4325 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4327 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4328 echo "Gtk theme support cannot be enabled due to functionality tests!"
4329 echo " Turn on verbose messaging (-v) to $0 to see the fin al report."
4330 echo " If you believe this message is in error you may use the continue"
4331 echo " switch (-continue) to $0 to continue."
4337 elif [ "$CFG_GLIB" = "no" ]; then
4342 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4343 if [ -n "$PKG_CONFIG" ]; then
4344 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4345 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4347 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER; then
4349 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4350 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4352 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4353 echo "Gstreamer support cannot be enabled due to functionality tests!"
4354 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4355 echo " If you believe this message is in error you may use the continue"
4356 echo " switch (-continue) to $0 to continue."
4362 elif [ "$CFG_GLIB" = "no" ]; then
4366 # auto-detect libicu support
4367 if [ "$CFG_ICU" != "no" ]; then
4368 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4369 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4371 if [ "$CFG_ICU" = "auto" ]; then
4373 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4376 echo "The ICU library support cannot be enabled."
4377 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4378 echo " If you believe this message is in error you may use the continue"
4379 echo " switch (-continue) to $0 to continue."
4385 # Auto-detect PulseAudio support
4386 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4387 if [ -n "$PKG_CONFIG" ]; then
4388 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4389 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4391 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO; then
4393 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4394 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4396 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4397 echo "PulseAudio support cannot be enabled due to functionality tests!"
4398 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4399 echo " If you believe this message is in error you may use the continue"
4400 echo " switch (-continue) to $0 to continue."
4409 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4410 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4411 if [ "$CFG_GUI" = "no" ]; then
4412 if [ "$CFG_OPENGL" = "auto" ]; then
4415 if [ "$CFG_OPENGL" != "no" ]; then
4416 echo "OpenGL enabled, but GUI disabled."
4417 echo " You might need to either enable the GUI or disable OpenGL"
4421 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4422 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4424 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4427 if [ "$CFG_OPENGL" = "yes" ]; then
4428 echo "All the OpenGL functionality tests failed!"
4429 echo " You might need to modify the include and library search paths by editing"
4430 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4431 echo " ${XQMAKESPEC}."
4438 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4439 if [ "$CFG_OPENGL" = "desktop" ]; then
4440 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4441 if [ $? != "0" ]; then
4442 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4449 elif [ "$CFG_OPENGL" = "es2" ]; then
4451 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4452 if [ $? != "0" ]; then
4453 echo "The OpenGL ES 2.0 functionality test failed!"
4454 echo " You might need to modify the include and library search paths by editing"
4455 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4456 echo " ${XQMAKESPEC}."
4459 elif [ "$CFG_OPENGL" = "desktop" ]; then
4460 # Desktop OpenGL support
4461 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4462 if [ $? != "0" ]; then
4463 echo "The OpenGL functionality test failed!"
4464 echo " You might need to modify the include and library search paths by editing"
4465 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4466 echo " ${XQMAKESPEC}."
4471 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4472 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4473 if [ $? != "0" ]; then
4474 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4481 fi # X11/MINGW OpenGL
4483 if [ "$BUILD_ON_MAC" = "yes" ]; then
4484 if [ "$CFG_PHONON" != "no" ]; then
4485 # Always enable Phonon (unless it was explicitly disabled)
4489 if [ "$CFG_COREWLAN" = "auto" ]; then
4490 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/corewlan "CoreWlan" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4498 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4499 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4500 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4502 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4505 if [ "$CFG_OPENGL" = "yes" ]; then
4506 echo "All the OpenGL functionality tests failed!"
4507 echo " You might need to modify the include and library search paths by editing"
4508 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4509 echo " ${XQMAKESPEC}."
4514 elif [ "$CFG_OPENGL" = "es2" ]; then
4516 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4517 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4518 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4519 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4520 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4521 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4522 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4523 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4526 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
4527 if [ $? != "0" ]; then
4528 echo "The OpenGL ES 2.0 functionality test failed!"
4529 echo " You might need to modify the include and library search paths by editing"
4530 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4531 echo " ${XQMAKESPEC}."
4534 elif [ "$CFG_OPENGL" = "desktop" ]; then
4535 # Desktop OpenGL support
4536 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4537 if [ $? != "0" ]; then
4538 echo "The OpenGL functionality test failed!"
4539 echo " You might need to modify the include and library search paths by editing"
4540 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4541 echo " ${XQMAKESPEC}."
4546 # auto-detect FontConfig support
4547 if [ "$CFG_FONTCONFIG" != "no" ]; then
4548 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4549 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4550 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4552 QT_CFLAGS_FONTCONFIG=
4553 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4555 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4556 QT_CONFIG="$QT_CONFIG fontconfig"
4557 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4558 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4560 CFG_LIBFREETYPE=system
4567 # Save these for a check later
4568 ORIG_CFG_XCB="$CFG_XCB"
4569 ORIG_CFG_EGLFS="$CFG_EGLFS"
4570 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4572 if [ "$CFG_LIBUDEV" != "no" ]; then
4573 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4574 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4575 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4576 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4577 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4579 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_INCDIR_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
4581 QT_CONFIG="$QT_CONFIG libudev"
4582 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4583 echo "The libudev functionality test failed!"
4587 QMakeVar add DEFINES QT_NO_LIBUDEV
4591 if [ "$CFG_EVDEV" != "no" ]; then
4592 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4594 QT_CONFIG="$QT_CONFIG evdev"
4595 elif [ "$CFG_EVDEV" = "yes" ]; then
4596 echo "The evdev functionality test failed!"
4600 QMakeVar add DEFINES QT_NO_EVDEV
4604 # Check we actually have X11 :-)
4605 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4606 QT_CONFIG="$QT_CONFIG xlib"
4609 # auto-detect Xrender support
4610 if [ "$CFG_XRENDER" != "no" ]; then
4611 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4613 QT_CONFIG="$QT_CONFIG xrender"
4615 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4616 echo "Xrender support cannot be enabled due to functionality tests!"
4617 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4618 echo " If you believe this message is in error you may use the continue"
4619 echo " switch (-continue) to $0 to continue."
4627 if [ "$CFG_XCB" != "no" ]; then
4628 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4629 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4630 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4632 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4634 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4635 QT_CONFIG="$QT_CONFIG xcb-render"
4638 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 $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4640 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4643 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4644 QT_CONFIG="$QT_CONFIG xcb-xlib"
4647 # auto-detect XInput2 support. Needed by xcb too.
4648 if [ "$CFG_XINPUT2" != "no" ]; then
4649 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4653 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4654 echo "XInput2 support cannot be enabled due to functionality tests!"
4655 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4656 echo " If you believe this message is in error you may use the continue"
4657 echo " switch (-continue) to $0 to continue."
4665 if [ "$CFG_XCB" = "yes" ]; then
4666 echo "The XCB test failed!"
4667 echo " You might need to install dependency packages."
4668 echo " See src/plugins/platforms/xcb/README."
4672 QMakeVar add DEFINES QT_NO_XCB
4676 if [ "$CFG_DIRECTFB" != "no" ]; then
4677 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4678 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4679 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4680 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/directfb" "DirectFB" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then
4682 elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4683 echo " DirectFB support cannot be enabled due to functionality tests!"
4684 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4685 echo " If you believe this message is in error you may use the continue"
4686 echo " switch (-continue) to $0 to continue."
4696 # Detect libxkbcommon
4697 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4698 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4699 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4700 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4701 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4703 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4707 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4708 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4709 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4710 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4711 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4712 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4713 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4714 fi # detect EGL support
4715 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/qpa/egl" "EGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
4717 elif [ "$CFG_EGL" = "yes" ]; then
4718 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4719 echo " You might need to modify the include and library search paths by editing"
4720 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4725 elif [ "$CFG_OPENGL" = "desktop" ]; then
4726 if [ "$CFG_EGL" = "yes" ]; then
4727 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4728 echo "Either disable EGL support or enable OpenGL ES support."
4734 if [ "$CFG_EGLFS" != "no" ]; then
4735 if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_EVDEV" = "yes" ]; then
4736 CFG_EGLFS="$CFG_EGL"
4742 # Determine the default QPA platform
4743 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4745 QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
4746 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4747 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4748 QT_QPA_DEFAULT_PLATFORM="windows"
4749 elif [ "$BUILD_ON_MAC" = "yes" ]; then
4750 QT_QPA_DEFAULT_PLATFORM="cocoa"
4751 elif [ "$UNAME_SYSTEM" = "QNX" ]; then
4752 QT_QPA_DEFAULT_PLATFORM="qnx"
4754 QT_QPA_DEFAULT_PLATFORM="xcb"
4759 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4760 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4761 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4762 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4764 if [ "$CFG_DIRECTFB" = "yes" ]; then
4765 QT_CONFIG="$QT_CONFIG directfb"
4766 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4767 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4770 if [ "$BUILD_ON_MAC" = "yes" ]; then
4771 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4772 QT_CONFIG="$QT_CONFIG coreservices"
4774 QMakeVar add DEFINES QT_NO_CORESERVICES
4778 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
4779 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4780 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4781 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4782 echo "No QPA platform plugin enabled!"
4783 echo " If you really want to build without a QPA platform plugin you must pass"
4784 echo " -no-qpa-platform-guard to configure. Doing this will"
4785 echo " produce a Qt that can not run GUI applications."
4786 echo " The dependencies needed for xcb to build are listed in"
4787 echo " src/plugins/platforms/xcb/README"
4793 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4796 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4797 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4798 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4799 CFG_LIBFREETYPE=system
4805 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS &&
4806 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4807 echo "STL functionality check failed! Cannot build Qt with this STL library."
4808 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4813 # detect POSIX clock_gettime()
4814 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4815 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4816 CFG_CLOCK_GETTIME=yes
4818 CFG_CLOCK_GETTIME=no
4822 # detect POSIX monotonic clocks
4823 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4824 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-monotonic "POSIX Monotonic Clock" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4825 CFG_CLOCK_MONOTONIC=yes
4827 CFG_CLOCK_MONOTONIC=no
4829 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4830 CFG_CLOCK_MONOTONIC=no
4834 if [ "$CFG_MREMAP" = "auto" ]; then
4835 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4842 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4843 if [ "$CFG_GETADDRINFO" != "no" ]; then
4844 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4847 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4848 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4849 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4850 echo " If you believe this message is in error you may use the continue"
4851 echo " switch (-continue) to $0 to continue."
4859 # find if the platform provides inotify
4860 if [ "$CFG_INOTIFY" != "no" ]; then
4861 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4864 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4865 echo "inotify support cannot be enabled due to functionality tests!"
4866 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4867 echo " If you believe this message is in error you may use the continue"
4868 echo " switch (-continue) to $0 to continue."
4876 # find if the platform provides if_nametoindex (ipv6 interface name support)
4877 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4878 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6ifname "IPv6 interface name" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4881 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4882 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4883 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4884 echo " If you believe this message is in error you may use the continue"
4885 echo " switch (-continue) to $0 to continue."
4893 # find if the platform provides getifaddrs (network interface enumeration)
4894 if [ "$CFG_GETIFADDRS" != "no" ]; then
4895 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4898 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4899 echo "getifaddrs support cannot be enabled due to functionality tests!"
4900 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4901 echo " If you believe this message is in error you may use the continue"
4902 echo " switch (-continue) to $0 to continue."
4911 if [ "$CFG_OPENSSL" != "no" ]; then
4912 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4913 if [ "$CFG_OPENSSL" = "auto" ]; then
4917 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4918 echo "OpenSSL support cannot be enabled due to functionality tests!"
4919 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4920 echo " If you believe this message is in error you may use the continue"
4921 echo " switch (-continue) to $0 to continue."
4930 if [ "$CFG_PCRE" != "qt" ]; then
4931 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4934 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4935 echo "PCRE support cannot be enabled due to functionality tests!"
4936 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4937 echo " If you believe this message is in error you may use the continue"
4938 echo " switch (-continue) to $0 to continue."
4946 # detect OpenVG support
4947 if [ "$CFG_OPENVG" != "no" ]; then
4948 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4949 if [ "$CFG_OPENVG" = "auto" ]; then
4952 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4953 if [ "$CFG_OPENVG" = "auto" ]; then
4956 CFG_OPENVG_ON_OPENGL=yes
4957 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 $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4958 if [ "$CFG_OPENVG" = "auto" ]; then
4961 CFG_OPENVG_LC_INCLUDES=yes
4962 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 $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4963 if [ "$CFG_OPENVG" = "auto" ]; then
4966 CFG_OPENVG_LC_INCLUDES=yes
4967 CFG_OPENVG_ON_OPENGL=yes
4969 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4970 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4971 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4972 echo " If you believe this message is in error you may use the continue"
4973 echo " switch (-continue) to $0 to continue."
4979 if [ "$CFG_OPENVG" = "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4980 CFG_OPENVG_SHIVA=yes
4984 if [ "$CFG_ALSA" = "auto" ]; then
4985 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4992 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4993 if [ "$CFG_ARCH" = "arm" ]; then
4994 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4995 if [ $? != "0" ]; then
4996 CFG_JAVASCRIPTCORE_JIT=no
4999 case "$XPLATFORM" in
5001 CFG_JAVASCRIPTCORE_JIT=no
5007 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5008 QMakeVar set JAVASCRIPTCORE_JIT yes
5009 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5010 QMakeVar set JAVASCRIPTCORE_JIT no
5013 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5014 CFG_AUDIO_BACKEND=yes
5017 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5018 echo "Warning: largefile support cannot be disabled for win32."
5022 #-------------------------------------------------------------------------------
5023 # ask for all that hasn't been auto-detected or specified in the arguments
5024 #-------------------------------------------------------------------------------
5026 [ "$CFG_CXX11" = "yes" ] && QT_CONFIG="$QT_CONFIG c++11"
5029 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5030 QT_CONFIG="$QT_CONFIG phonon-backend"
5033 # disable accessibility
5034 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5035 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5037 QT_CONFIG="$QT_CONFIG accessibility"
5041 if [ "$CFG_EGL" = "yes" ]; then
5042 QT_CONFIG="$QT_CONFIG egl"
5044 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5048 if [ "$CFG_EGLFS" = "yes" ]; then
5049 QT_CONFIG="$QT_CONFIG eglfs"
5051 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5055 if [ "$CFG_OPENVG" = "no" ]; then
5056 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5058 QT_CONFIG="$QT_CONFIG openvg"
5059 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5060 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5062 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5063 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5065 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5066 QT_CONFIG="$QT_CONFIG shivavg"
5067 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5072 if [ "$CFG_OPENGL" = "no" ]; then
5073 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5075 QT_CONFIG="$QT_CONFIG opengl"
5078 if [ "$CFG_OPENGL" = "es2" ]; then
5079 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5082 if [ "$CFG_OPENGL" = "es2" ]; then
5083 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5084 QT_CONFIG="$QT_CONFIG opengles2"
5087 # build up the variables for output
5088 if [ "$CFG_DEBUG" = "yes" ]; then
5089 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5090 elif [ "$CFG_DEBUG" = "no" ]; then
5091 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5093 if [ "$CFG_SHARED" = "yes" ]; then
5094 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5095 QT_CONFIG="$QT_CONFIG shared"
5096 elif [ "$CFG_SHARED" = "no" ]; then
5097 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5098 QT_CONFIG="$QT_CONFIG static"
5101 #FIXME: qpa is implicit this should all be removed
5102 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5103 QT_CONFIG="$QT_CONFIG qpa"
5104 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5105 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5107 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5108 # Do not set this here for Windows. Let qmake do it so
5109 # debug and release precompiled headers are kept separate.
5110 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5112 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5113 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5114 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5115 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5116 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5117 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5119 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5120 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5122 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5123 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5124 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5125 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5126 QMakeVar add QMAKE_CFLAGS -g
5127 QMakeVar add QMAKE_CXXFLAGS -g
5128 QT_CONFIG="$QT_CONFIG separate_debug_info"
5130 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5131 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5133 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5134 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5135 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5136 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5137 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5138 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5139 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5140 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5141 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5142 if [ "$CFG_ARCH" = "mips" ]; then
5143 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5144 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5146 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5147 QT_CONFIG="$QT_CONFIG clock-gettime"
5149 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5150 QT_CONFIG="$QT_CONFIG clock-monotonic"
5152 if [ "$CFG_MREMAP" = "yes" ]; then
5153 QT_CONFIG="$QT_CONFIG mremap"
5155 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5156 QT_CONFIG="$QT_CONFIG getaddrinfo"
5158 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5159 QT_CONFIG="$QT_CONFIG ipv6ifname"
5161 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5162 QT_CONFIG="$QT_CONFIG getifaddrs"
5164 if [ "$CFG_INOTIFY" = "yes" ]; then
5165 QT_CONFIG="$QT_CONFIG inotify"
5167 if [ "$CFG_LIBJPEG" = "no" ]; then
5169 elif [ "$CFG_LIBJPEG" = "system" ]; then
5170 QT_CONFIG="$QT_CONFIG system-jpeg"
5172 if [ "$CFG_JPEG" = "no" ]; then
5173 QT_CONFIG="$QT_CONFIG no-jpeg"
5174 elif [ "$CFG_JPEG" = "yes" ]; then
5175 QT_CONFIG="$QT_CONFIG jpeg"
5177 if [ "$CFG_LIBPNG" = "no" ]; then
5180 if [ "$CFG_LIBPNG" = "system" ]; then
5181 QT_CONFIG="$QT_CONFIG system-png"
5183 if [ "$CFG_PNG" = "no" ]; then
5184 QT_CONFIG="$QT_CONFIG no-png"
5185 elif [ "$CFG_PNG" = "yes" ]; then
5186 QT_CONFIG="$QT_CONFIG png"
5188 if [ "$CFG_GIF" = "no" ]; then
5189 QT_CONFIG="$QT_CONFIG no-gif"
5190 elif [ "$CFG_GIF" = "yes" ]; then
5191 QT_CONFIG="$QT_CONFIG gif"
5193 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5194 QT_CONFIG="$QT_CONFIG no-freetype"
5195 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5196 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5197 QT_CONFIG="$QT_CONFIG system-freetype"
5199 QT_CONFIG="$QT_CONFIG freetype"
5201 if [ "$CFG_GUI" = "auto" ]; then
5204 if [ "$CFG_GUI" = "no" ]; then
5205 QT_CONFIG="$QT_CONFIG no-gui"
5208 if [ "$CFG_WIDGETS" = "no" ]; then
5209 QT_CONFIG="$QT_CONFIG no-widgets"
5210 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5213 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5214 #On Mac we implicitly link against libz, so we
5215 #never use the 3rdparty stuff.
5216 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5218 if [ "$CFG_ZLIB" = "yes" ]; then
5219 QT_CONFIG="$QT_CONFIG zlib"
5220 elif [ "$CFG_ZLIB" = "system" ]; then
5221 QT_CONFIG="$QT_CONFIG system-zlib"
5224 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5225 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5226 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5227 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5228 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5229 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5230 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5231 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5232 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5233 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5234 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5235 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5236 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5237 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5239 [ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES"
5240 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5241 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5243 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5244 if [ "$CFG_RPATH" = "yes" ]; then
5245 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5246 # set the default rpath to the library installation directory
5247 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5249 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5250 if [ -n "$RPATH_FLAGS" ]; then
5252 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5256 elif [ "$CFG_RPATH" = "yes" ]; then
5257 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5261 if [ "$CFG_RPATH" = "yes" ]; then
5262 # set the default rpath to the library installation directory
5263 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5265 if [ -n "$RPATH_FLAGS" ]; then
5266 # add the user defined rpaths
5267 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5271 if [ '!' -z "$I_FLAGS" ]; then
5272 # add the user define include paths
5273 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5274 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5277 if [ '!' -z "$W_FLAGS" ]; then
5278 # add the user defined warning flags
5279 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5280 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5281 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5284 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5285 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5286 # Follow default behavior of configure.exe by overriding with "rtti".
5287 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5290 if [ "$CFG_ALSA" = "yes" ]; then
5291 QT_CONFIG="$QT_CONFIG alsa"
5294 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5295 QT_CONFIG="$QT_CONFIG pulseaudio"
5298 if [ "$CFG_COREWLAN" = "yes" ]; then
5299 QT_CONFIG="$QT_CONFIG corewlan"
5302 if [ "$CFG_ICU" = "yes" ]; then
5303 QT_CONFIG="$QT_CONFIG icu"
5306 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5307 QT_CONFIG="$QT_CONFIG force_asserts"
5310 if [ "$CFG_PCRE" = "qt" ]; then
5311 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5315 # Some Qt modules are too advanced in C++ for some old compilers
5316 # Detect here the platforms where they are known to work.
5318 # See Qt documentation for more information on which features are
5319 # supported and on which compilers.
5321 canBuildQtConcurrent="yes"
5322 canUseV8Snapshot="yes"
5324 case "$XPLATFORM" in
5326 # PA-RISC's assembly is too limited
5327 # gcc 3.4 on that platform can't build QtXmlPatterns
5328 # the assembly it generates cannot be compiled
5330 # Check gcc's version
5331 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5335 canBuildQtXmlPatterns="no"
5339 canBuildQtXmlPatterns="no"
5343 unsupported/vxworks-*-g++*)
5346 unsupported/vxworks-*-dcc*)
5348 canBuildQtXmlPatterns="no"
5351 # Check gcc's version
5352 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5360 canBuildQtXmlPatterns="no"
5365 # Check the compiler version
5366 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5369 canBuildQtXmlPatterns="no"
5370 canBuildQtConcurrent="no"
5374 canBuildQtConcurrent="no"
5380 canBuildQtXmlPatterns="no"
5381 canBuildQtConcurrent="no"
5387 # Get the xlC version
5388 cat > xlcver.c <<EOF
5392 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5397 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5398 xlcver=`./xlcver 2>/dev/null`
5401 if [ "$OPT_VERBOSE" = "yes" ]; then
5402 if [ -n "$xlcver" ]; then
5403 echo Found IBM xlC version: $xlcver.
5405 echo Could not determine IBM xlC version, assuming oldest supported.
5412 canBuildQtXmlPatterns="no"
5413 canBuildQtConcurrent="no"
5417 canBuildQtConcurrent="no"
5423 canBuildQtConcurrent="no"
5427 if [ "$CFG_GUI" = "no" ]; then
5428 # WebKit requires QtGui
5432 if [ "$CFG_SHARED" = "no" ]; then
5434 echo "WARNING: Using static linking will disable the WebKit module."
5439 CFG_CONCURRENT="yes"
5440 if [ "$canBuildQtConcurrent" = "no" ]; then
5441 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5444 QT_CONFIG="$QT_CONFIG concurrent"
5448 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5449 QT_CONFIG="$QT_CONFIG audio-backend"
5453 if [ "$CFG_WEBKIT" = "debug" ]; then
5454 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5458 QT_CONFIG="$QT_CONFIG v8"
5459 # Detect snapshot support
5460 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5461 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5464 *) canUseV8Snapshot="no"
5468 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5469 # QEMU crashes when building inside Scratchbox with an ARM target
5470 canUseV8Snapshot="no"
5473 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5474 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5476 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5477 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5480 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5481 QT_CONFIG="$QT_CONFIG v8snapshot"
5485 if [ "$CFG_QML_DEBUG" = "no" ]; then
5486 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5489 case "$QMAKE_CONF_COMPILER" in
5492 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5494 case "$COMPILER_VERSION" in
5496 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5497 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5498 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5501 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5502 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5503 QT_GCC_PATCH_VERSION=0
5513 #-------------------------------------------------------------------------------
5514 # part of configuration information goes into qconfig.h
5515 #-------------------------------------------------------------------------------
5517 case "$CFG_QCONFIG" in
5519 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5522 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5523 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5524 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5525 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5526 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5527 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5529 echo "#endif" >>"$tmpconfig"
5533 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5537 # define QT_EDITION $QT_EDITION
5541 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5542 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5544 if [ "$CFG_SHARED" = "no" ]; then
5545 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5546 /* Qt was configured for a static build */
5547 #if !defined(QT_SHARED) && !defined(QT_STATIC)
5554 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5555 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5558 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5559 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5562 if [ "$BUILD_ON_MAC" = "yes" ]; then
5563 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5564 #if defined(__LP64__)
5565 # define QT_POINTER_SIZE 8
5567 # define QT_POINTER_SIZE 4
5571 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5572 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5575 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5576 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5577 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5581 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5583 if [ "$CFG_DEV" = "yes" ]; then
5584 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5587 # Add QPA to config.h
5588 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5590 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5591 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5594 # Add turned on SQL drivers
5595 for DRIVER in $CFG_SQL_AVAILABLE; do
5596 eval "VAL=\$CFG_SQL_$DRIVER"
5599 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5600 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5601 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5604 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5610 QMakeVar set sql-drivers "$SQL_DRIVERS"
5611 QMakeVar set sql-plugins "$SQL_PLUGINS"
5613 # Add other configuration options to the qconfig.h file
5614 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5615 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5616 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5617 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5618 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5620 # X11/Unix/Mac only configs
5621 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5622 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5623 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5624 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5625 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5626 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5627 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5628 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5629 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5630 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5631 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5632 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5633 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5634 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5636 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5637 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5638 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5639 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5640 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5641 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5642 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5643 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5644 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5645 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5646 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5647 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5648 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5650 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5651 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5652 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5653 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5654 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5655 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5656 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5657 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5659 # sort QCONFIG_FLAGS for neatness if we can
5660 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5661 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5663 if [ -n "$QCONFIG_FLAGS" ]; then
5664 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5665 #ifndef QT_BOOTSTRAPPED
5668 for cfg in $QCONFIG_FLAGS; do
5669 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5670 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5671 # figure out define logic, so we can output the correct
5672 # ifdefs to override the global defines in a project
5674 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5675 # QT_NO_option can be forcefully turned on by QT_option
5676 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5677 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5678 # QT_option can be forcefully turned off by QT_NO_option
5679 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5682 if [ -z $cfgdNeg ]; then
5683 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5690 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5691 #if defined($cfgd) && defined($cfgdNeg)
5693 #elif !defined($cfgd) && !defined($cfgdNeg)
5700 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5701 #endif // QT_BOOTSTRAPPED
5706 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5707 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5708 #define QT_VISIBILITY_AVAILABLE
5713 if [ -n "$QT_LIBINFIX" ]; then
5714 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5715 #define QT_LIBINFIX "$QT_LIBINFIX"
5720 echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5722 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5723 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5724 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5726 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5727 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5728 chmod -w "$outpath/src/corelib/global/qconfig.h"
5729 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5730 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5734 #-------------------------------------------------------------------------------
5735 # save configuration into qconfig.pri
5736 #-------------------------------------------------------------------------------
5737 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5738 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5739 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5740 if [ "$CFG_DEBUG" = "yes" ]; then
5741 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5742 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5743 QT_CONFIG="$QT_CONFIG release"
5745 QT_CONFIG="$QT_CONFIG debug"
5746 elif [ "$CFG_DEBUG" = "no" ]; then
5747 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5748 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5749 QT_CONFIG="$QT_CONFIG debug"
5751 QT_CONFIG="$QT_CONFIG release"
5753 if [ "$CFG_FRAMEWORK" = "no" ]; then
5754 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5756 QT_CONFIG="$QT_CONFIG qt_framework"
5757 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5759 if [ "$CFG_DEV" = "yes" ]; then
5760 QT_CONFIG="$QT_CONFIG private_tests"
5763 cat >>"$QTCONFIG.tmp" <<EOF
5765 CONFIG += $QTCONFIG_CONFIG
5767 QT_HOST_ARCH = $CFG_HOST_ARCH
5768 QT_CPU_FEATURES = $CFG_CPUFEATURES
5769 QT_HOST_CPU_FEATURES = $CFG_HOST_CPUFEATURES
5770 QT_EDITION = $Edition
5771 QT_CONFIG += $QT_CONFIG
5774 QT_VERSION = $QT_VERSION
5775 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5776 QT_MINOR_VERSION = $QT_MINOR_VERSION
5777 QT_PATCH_VERSION = $QT_PATCH_VERSION
5780 QT_LIBINFIX = $QT_LIBINFIX
5781 QT_NAMESPACE = $QT_NAMESPACE
5785 if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
5786 echo "# pkgconfig" >> "$QTCONFIG.tmp"
5787 echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
5788 echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp"
5789 echo >> "$QTCONFIG.tmp"
5792 if [ -n "$CFG_SYSROOT" ]; then
5793 echo "# sysroot" >>"$QTCONFIG.tmp"
5794 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5795 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5796 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5797 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5798 echo "}" >> "$QTCONFIG.tmp"
5799 echo >> "$QTCONFIG.tmp"
5801 if [ -n "$RPATH_FLAGS" ]; then
5802 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5804 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5805 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5806 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5807 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5810 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5811 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5812 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5815 # replace qconfig.pri if it differs from the newly created temp file
5816 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5817 rm -f "$QTCONFIG.tmp"
5819 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5822 #-------------------------------------------------------------------------------
5823 # save configuration into qmodule.pri
5824 #-------------------------------------------------------------------------------
5825 QTMODULE="$outpath/mkspecs/qmodule.pri"
5827 echo "CONFIG += $QMAKE_CONFIG create_prl link_prl" >> "$QTMODULE.tmp"
5829 # Ensure we can link to uninistalled libraries
5830 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5831 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5833 if [ -n "$QT_CFLAGS_PSQL" ]; then
5834 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5836 if [ -n "$QT_LFLAGS_PSQL" ]; then
5837 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5839 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5840 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5842 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5843 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5845 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5846 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5848 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5849 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5851 if [ -n "$QT_LFLAGS_ODBC" ]; then
5852 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5854 if [ -n "$QT_LFLAGS_TDS" ]; then
5855 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5858 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5859 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5862 #dump in the OPENSSL_LIBS info
5863 if [ '!' -z "$OPENSSL_LIBS" ]; then
5864 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5865 elif [ "$CFG_OPENSSL" = "linked" ]; then
5866 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5869 #dump in the SDK info
5870 if [ '!' -z "$CFG_SDK" ]; then
5871 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5875 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5876 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5878 # replace qmodule.pri if it differs from the newly created temp file
5879 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5880 rm -f "$QTMODULE.tmp"
5882 mv -f "$QTMODULE.tmp" "$QTMODULE"
5885 #-------------------------------------------------------------------------------
5886 # save configuration into .qmake.cache
5887 #-------------------------------------------------------------------------------
5889 CACHEFILE="$outpath/.qmake.cache"
5890 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5891 cat >>"$CACHEFILE.tmp" <<EOF
5893 QT_SOURCE_TREE = \$\$quote($relpath)
5894 QT_BUILD_TREE = \$\$quote($outpath)
5895 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5897 include(\$\$PWD/mkspecs/qmodule.pri)
5898 CONFIG += dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5902 #dump the qmake spec
5903 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5904 echo "XQMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5906 echo "XQMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5908 if [ -d "$outpath/mkspecs/$PLATFORM" ]; then
5909 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$PLATFORM" >> "$CACHEFILE.tmp"
5911 echo "QMAKESPEC = $PLATFORM" >> "$CACHEFILE.tmp"
5914 # replace .qmake.cache if it differs from the newly created temp file
5915 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5916 rm -f "$CACHEFILE.tmp"
5918 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5921 #-------------------------------------------------------------------------------
5922 # give feedback on configuration
5923 #-------------------------------------------------------------------------------
5924 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5927 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5928 echo "Build type: $PLATFORM"
5930 echo "Building on: $PLATFORM"
5931 echo "Building for: $XPLATFORM"
5934 # the missing space before $CFG_FEATURES is intentional
5935 echo "Architecture: $CFG_ARCH, features:$CFG_CPUFEATURES"
5936 echo "Host architecture: $CFG_HOST_ARCH, features:$CFG_HOST_CPUFEATURES"
5938 if [ -n "$PLATFORM_NOTES" ]; then
5939 echo "Platform notes:"
5940 echo "$PLATFORM_NOTES"
5945 if [ "$OPT_VERBOSE" = "yes" ]; then
5946 echo $ECHO_N "qmake vars .......... $ECHO_C"
5947 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5948 echo "qmake switches ......... $QMAKE_SWITCHES"
5951 echo "Build .................. $CFG_BUILD_PARTS"
5952 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5953 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5954 echo "Debug .................. yes (combined)"
5955 if [ "$CFG_DEBUG" = "yes" ]; then
5956 echo "Default Link ........... debug"
5958 echo "Default Link ........... release"
5961 echo "Debug .................. $CFG_DEBUG"
5963 echo "C++11 support .......... $CFG_CXX11"
5964 if [ -n "$PKG_CONFIG" ]; then
5965 echo "pkg-config ............. yes"
5967 echo "pkg-config ............. no"
5969 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5970 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5971 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5972 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5973 echo "QtGui module ........... $CFG_GUI"
5974 echo "QtWidgets module ....... $CFG_WIDGETS"
5975 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5976 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5978 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5980 echo "QML debugging .......... $CFG_QML_DEBUG"
5981 echo "PCH support ............ $CFG_PRECOMPILE"
5982 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5983 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5984 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5985 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5986 elif [ "$CFG_ARCH" = "arm" ]; then
5987 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5988 echo "NEON support ........... ${CFG_NEON}"
5990 if [ "$CFG_ARCH" = "mips" ]; then
5991 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5993 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5994 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5995 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5996 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5997 echo "NIS support ............ $CFG_NIS"
5998 echo "CUPS support ........... $CFG_CUPS"
5999 echo "Iconv support .......... $CFG_ICONV"
6000 echo "Glib support ........... $CFG_GLIB"
6001 echo "GStreamer support ...... $CFG_GSTREAMER"
6002 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6003 echo "Large File support ..... $CFG_LARGEFILE"
6004 echo "GIF support ............ $CFG_GIF"
6005 if [ "$CFG_JPEG" = "no" ]; then
6006 echo "JPEG support ........... $CFG_JPEG"
6008 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6010 if [ "$CFG_PNG" = "no" ]; then
6011 echo "PNG support ............ $CFG_PNG"
6013 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6015 echo "zlib support ........... $CFG_ZLIB"
6016 echo "Session management ..... $CFG_SM"
6017 echo "libudev support ........ $CFG_LIBUDEV"
6019 if [ "$CFG_OPENGL" = "desktop" ]; then
6020 echo "OpenGL support ......... yes (Desktop OpenGL)"
6021 elif [ "$CFG_OPENGL" = "es2" ]; then
6022 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6024 echo "OpenGL support ......... no"
6027 if [ "$CFG_OPENVG" ]; then
6028 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6029 echo "OpenVG support ......... ShivaVG"
6031 echo "OpenVG support ......... $CFG_OPENVG"
6035 echo "XShape support ......... $CFG_XSHAPE"
6036 echo "XVideo support ......... $CFG_XVIDEO"
6037 echo "XSync support .......... $CFG_XSYNC"
6038 echo "Xinerama support ....... $CFG_XINERAMA"
6039 echo "Xcursor support ........ $CFG_XCURSOR"
6040 echo "Xfixes support ......... $CFG_XFIXES"
6041 echo "Xrandr support ......... $CFG_XRANDR"
6042 echo "Xi support ............. $CFG_XINPUT"
6043 echo "Xi2 support ............ $CFG_XINPUT2"
6044 echo "MIT-SHM support ........ $CFG_MITSHM"
6045 echo "FontConfig support ..... $CFG_FONTCONFIG"
6046 echo "XKB Support ............ $CFG_XKB"
6047 echo "immodule support ....... $CFG_IM"
6048 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6050 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6051 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6052 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6053 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6054 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6055 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6056 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6057 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6058 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6061 if [ "$CFG_OPENSSL" = "yes" ]; then
6062 OPENSSL_LINKAGE="(run-time)"
6063 elif [ "$CFG_OPENSSL" = "linked" ]; then
6064 OPENSSL_LINKAGE="(linked)"
6066 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6067 echo "Alsa support ........... $CFG_ALSA"
6068 if [ "$BUILD_ON_MAC" = "yes" ]; then
6069 echo "CoreWlan support ....... $CFG_COREWLAN"
6071 echo "libICU support ......... $CFG_ICU"
6072 echo "PCRE support ........... $CFG_PCRE"
6073 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6074 echo "Xcb support ............ limited (old version)"
6076 echo "Xcb support ............ $CFG_XCB"
6078 echo "Xrender support ........ $CFG_XRENDER"
6079 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6080 echo "XInput2 support ........ $CFG_XINPUT2"
6082 echo "EGLFS support .......... $CFG_EGLFS"
6083 echo "DirectFB support ....... $CFG_DIRECTFB"
6086 # complain about not being able to use dynamic plugins if we are using a static build
6087 if [ "$CFG_SHARED" = "no" ]; then
6089 echo "WARNING: Using static linking will disable the use of dynamically"
6090 echo "loaded plugins. Make sure to import all needed static plugins,"
6091 echo "or compile needed modules into the library."
6094 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6096 echo "NOTE: When linking against OpenSSL, you can override the default"
6097 echo "library names through OPENSSL_LIBS."
6099 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6103 exec 1>&3 3>&- # restore stdout
6104 cat $outpath/config.summary # display config feedback to user
6106 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6108 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6109 echo "if you want a pure debug build."
6114 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6119 #-------------------------------------------------------------------------------
6120 # build makefiles based on the configuration
6121 #-------------------------------------------------------------------------------
6123 if [ "$CFG_NOPROCESS" != "yes" ]; then
6124 echo "Creating makefiles. Please wait..."
6125 "$outpath/bin/qmake" -r ${OPT_FAST+CONFIG+=fast} "$relpath"
6128 if [ "$OPT_FAST" = "yes" ]; then
6130 for part in $CFG_BUILD_PARTS; do
6132 examples|tests) PART_ROOTS="$PART_ROOTS $part" ;;
6135 if [ "x$PART_ROOTS" != "x" ]; then
6137 echo "Creating stub makefiles. Please wait..."
6138 QMAKE="$outpath/bin/qmake"
6139 [ "$CFG_DEBUG_RELEASE" = "no" ] && first_tgt="first_target: first" || first_tgt=
6140 (cd "$relpath" && find $PART_ROOTS -name '*.pro') | grep -v /testdata/ | while read p; do
6142 test -f "$outpath/$d/Makefile" && continue
6143 echo " for $relpath/$p"
6145 mkdir -p "$outpath/$d" || exit
6146 cat > "$outpath/$d/Makefile" <<EOF || exit
6147 # $outpath/$d/Makefile: generated by configure
6149 # WARNING: This makefile will be replaced with a real makefile.
6150 # All changes made to this file will be lost.
6155 all clean install qmake first Makefile: FORCE
6156 \$(QMAKE) $QMAKE_SWITCHES "$relpath/$p"
6166 #-------------------------------------------------------------------------------
6167 # check for platforms that we don't yet know about
6168 #-------------------------------------------------------------------------------
6169 if [ "$CFG_ARCH" = "unknown" ]; then
6172 NOTICE: configure was unable to determine the architecture
6173 for the $XQMAKESPEC target.
6175 Qt will not use a specialized implementation for any atomic
6176 operations. Instead a generic implemention based on either GCC
6177 intrinsics or C++11 std::atomic<T> will be used (when
6178 available). The generic implementations are generally as fast
6179 as and always as safe as a specialized implementation.
6181 If no generic implementation is available, Qt will use a
6182 fallback UNIX implementation which uses a single
6183 pthread_mutex_t to protect all atomic operations. This
6184 implementation is the slow (but safe) fallback implementation
6185 for architectures Qt does not yet support.
6189 #-------------------------------------------------------------------------------
6190 # check if the user passed the -no-zlib option, which is no longer supported
6191 #-------------------------------------------------------------------------------
6192 if [ -n "$ZLIB_FORCED" ]; then
6193 which_zlib="supplied"
6194 if [ "$CFG_ZLIB" = "system" ]; then
6200 NOTICE: The -no-zlib option was supplied but is no longer
6203 Qt now requires zlib support in all builds, so the -no-zlib
6204 option was ignored. Qt will be built using the $which_zlib
6209 #-------------------------------------------------------------------------------
6210 # check if the user passed the obsoleted -wayland or -no-wayland flag
6211 #-------------------------------------------------------------------------------
6212 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6215 NOTICE: The -wayland and -no-wayland flags are now obsolete
6217 All configuring of QtWayland plugin and QtCompositor happens in the module
6221 #-------------------------------------------------------------------------------
6222 # check if the user passed the obsoleted -arch or -host-arch options
6223 #-------------------------------------------------------------------------------
6224 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6227 NOTICE: The -arch and -host-arch options are obsolete.
6229 Qt now detects the target and host architectures based on compiler
6230 output. Qt will be built using $CFG_ARCH for the target architecture
6231 and $CFG_HOST_ARCH for the host architecture (note that these two
6232 will be the same unless you are cross-compiling).
6236 #-------------------------------------------------------------------------------
6237 # finally save the executed command to another script
6238 #-------------------------------------------------------------------------------
6239 if [ `basename $0` != "config.status" ]; then
6240 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6242 # add the system variables
6243 for varname in $SYSTEM_VARIABLES; do
6245 'if [ -n "\$'${varname}'" ]; then
6246 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6251 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6253 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6254 echo "#!/bin/sh" > "$outpath/config.status"
6255 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6256 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6257 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6258 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6259 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6260 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6261 echo "else" >> "$outpath/config.status"
6262 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6263 echo "fi" >> "$outpath/config.status"
6264 chmod +x "$outpath/config.status"
6267 if [ -n "$RPATH_MESSAGE" ]; then
6269 echo "$RPATH_MESSAGE"
6272 MAKE=`basename "$MAKE"`
6274 echo Qt is now configured for building. Just run \'$MAKE\'.
6275 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6276 echo Once everything is built, Qt is installed.
6277 echo You should not run \'$MAKE install\'.
6279 echo Once everything is built, you must run \'$MAKE install\'.
6280 echo Qt will be installed into $QT_INSTALL_PREFIX
6283 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.