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
776 CFG_PREFIX_INSTALL=yes
786 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
787 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
792 OPT_CONFIRM_LICENSE=no
805 QPA_PLATFORM_GUARD=yes
808 # initalize variables used for installation
817 QT_INSTALL_TRANSLATIONS=
826 #flags for SQL drivers
834 QT_LFLAGS_ODBC="-lodbc"
837 # flags for libdbus-1
841 # flags for Glib (X11 only)
845 # flags for GStreamer (X11 only)
849 # default qpa platform
850 QT_QPA_DEFAULT_PLATFORM=
852 #-------------------------------------------------------------------------------
853 # check SQL drivers available in this package
854 #-------------------------------------------------------------------------------
856 # opensource version removes some drivers, so force them to be off
862 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
863 for a in "$relpath/src/plugins/sqldrivers/"*; do
865 base_a=`basename "$a"`
866 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
867 eval "CFG_SQL_${base_a}=auto"
872 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
873 if [ -d "$relpath/src/plugins/imageformats" ]; then
874 for a in "$relpath/src/plugins/imageformats/"*; do
876 base_a=`basename "$a"`
877 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
882 #-------------------------------------------------------------------------------
883 # parse command line arguments
884 #-------------------------------------------------------------------------------
886 # parse the arguments, setting things to "yes" or "no"
887 while [ "$#" -gt 0 ]; do
891 #Autoconf style options
893 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
897 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
901 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
902 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
905 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
909 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
913 -no-*-*|-plugin-*-*|-qt-*-*)
914 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
915 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
919 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
922 #Qt style options that pass an argument
923 -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)
924 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
928 #Qt style complex options in one command
929 -enable-*|-disable-*)
930 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
931 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
933 #Qt Builtin/System style options
934 -no-*|-system-*|-qt-*)
935 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
936 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
938 #Options that cannot be generalized
945 # this option may or may not be followed by an argument
946 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
955 # this option may or may not be followed by an argument
956 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
964 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
965 # this option may or may not be followed by an argument
966 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
985 if [ "$1" = "-D" ]; then
989 VAL=`echo $1 | sed 's,-D,,'`
994 # this option may or may not be followed by an argument
995 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1004 if [ "$1" = "-I" ]; then
1008 VAL=`echo $1 | sed 's,-I,,'`
1013 if [ "$1" = "-L" ]; then
1017 VAL=`echo $1 | sed 's,-L,,'`
1022 if [ "$1" = "-R" ]; then
1026 VAL=`echo $1 | sed 's,-R,,'`
1031 if [ "$1" = "-l" ]; then
1035 VAL=`echo $1 | sed 's,-l,,'`
1040 if [ "$1" = "-F" ]; then
1044 VAL=`echo $1 | sed 's,-F,,'`
1049 if [ "$1" = "-fw" ]; then
1053 VAL=`echo $1 | sed 's,-fw,,'`
1060 #General options, including Qt style yes options
1062 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1069 if [ "$UNKNOWN_ARG" = "yes" ]; then
1070 echo "$1: unknown argument"
1081 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1082 CFG_ACCESSIBILITY="$VAL"
1091 CFG_USE_GNUMAKE="$VAL"
1094 CFG_MYSQL_CONFIG="$VAL"
1097 QT_INSTALL_PREFIX="$VAL"
1100 QT_HOST_PREFIX="$VAL"
1109 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1110 CFG_PKGCONFIG="$VAL"
1116 CFG_PKGCONFIG="force"
1119 QT_INSTALL_DOCS="$VAL"
1122 QT_INSTALL_HEADERS="$VAL"
1125 QT_INSTALL_PLUGINS="$VAL"
1128 QT_INSTALL_IMPORTS="$VAL"
1131 QT_INSTALL_DATA="$VAL"
1134 QT_INSTALL_LIBS="$VAL"
1143 QT_INSTALL_TRANSLATIONS="$VAL"
1145 sysconfdir|settingsdir)
1146 QT_INSTALL_SETTINGS="$VAL"
1149 QT_INSTALL_EXAMPLES="$VAL"
1152 QT_INSTALL_TESTS="$VAL"
1161 QT_INSTALL_BINS="$VAL"
1167 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1174 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1175 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1176 [ "$VAL" = "es2" ]; then
1183 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1190 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1193 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1196 if [ "$BUILD_ON_MAC" = "yes" ]; then
1203 OPT_OBSOLETE_HOST_ARG=yes
1206 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1207 CFG_MAC_HARFBUZZ="$VAL"
1214 if [ "$BUILD_ON_MAC" = "yes" ]; then
1215 CFG_FRAMEWORK="$VAL"
1221 if [ "$VAL" = "yes" ]; then
1223 QMakeVar add QMAKE_CFLAGS -pg
1224 QMakeVar add QMAKE_CXXFLAGS -pg
1225 QMakeVar add QMAKE_LFLAGS -pg
1226 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1232 if [ "$VAL" = "yes" ]; then
1233 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1238 # keep compatibility with old platform names
1244 PLATFORM=hpux-acc-o64
1247 PLATFORM=hpux-acc-64
1250 PLATFORM=hpux-acc-64
1262 PLATFORM=reliant-cds-64
1265 PLATFORM=solaris-cc-64
1268 PLATFORM=unixware-cc
1271 PLATFORM=unixware-g++
1274 PLATFORM=unixware-cc
1277 PLATFORM=unixware-g++
1283 i386) NATIVE_64_ARCH="x86_64" ;;
1284 powerpc) NATIVE_64_ARCH="ppc64" ;;
1285 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1287 if [ ! -z "$NATIVE_64_ARCH" ]; then
1288 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1295 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1298 XPLATFORM=`resolveDeviceMkspec $VAL`
1299 [ "$XPLATFORM" = "undefined" ] && exit 101
1302 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1303 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1304 DeviceVar set $DEV_VAR $DEV_VAL
1307 QT_QPA_DEFAULT_PLATFORM="$VAL"
1310 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1311 CFG_DEBUG_RELEASE="$VAL"
1317 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1318 CFG_RELEASE_QMAKE="$VAL"
1324 if [ "$VAL" = "yes" ]; then
1326 elif [ "$VAL" = "no" ]; then
1333 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1334 CFG_PREFIX_INSTALL="$VAL"
1342 developer-build|commercial|opensource)
1343 # These switches have been dealt with already
1346 if [ "$VAL" = "yes" ]; then
1348 elif [ "$VAL" = "no" ]; then
1355 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1356 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1362 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1363 if [ "$VAL" = "no" ]; then
1364 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1365 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1366 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1372 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1379 if [ "$VAL" = "no" ]; then
1386 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1394 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1401 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1408 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1415 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1422 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1429 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1436 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1443 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1444 CFG_PRECOMPILE="$VAL"
1449 separate-debug-info)
1450 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1451 CFG_SEPARATE_DEBUG_INFO="$VAL"
1452 elif [ "$VAL" = "nocopy" ] ; then
1453 CFG_SEPARATE_DEBUG_INFO="yes"
1454 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1460 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1461 CFG_REDUCE_EXPORTS="$VAL"
1467 if [ "$VAL" = "no" ]; then
1474 if [ "$VAL" = "no" ]; then
1481 if [ "$VAL" = "no" ]; then
1488 if [ "$VAL" = "no" ]; then
1495 if [ "$VAL" = "no" ]; then
1502 if [ "$VAL" = "no" ]; then
1509 if [ "$VAL" = "no" ]; then
1519 if [ "$VAL" = "no" ]; then
1526 if [ "$VAL" = "no" ]; then
1533 if [ "$VAL" = "no" ]; then
1534 CFG_MIPS_DSPR2="$VAL"
1540 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1541 CFG_REDUCE_RELOCATIONS="$VAL"
1547 [ "$VAL" = "qt" ] && VAL=yes
1548 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1553 # No longer supported:
1554 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1557 if [ "$VAL" = "system" ]; then
1564 [ "$VAL" = "yes" ] && VAL=qt
1565 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1572 [ "$VAL" = "yes" ] && VAL=qt
1573 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1580 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1587 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1594 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1601 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1608 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1615 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1616 CFG_FONTCONFIG="$VAL"
1622 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1629 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1636 CFG_OBSOLETE_WAYLAND=yes
1639 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1646 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1653 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1660 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1667 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1674 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1681 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1688 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1689 CFG_GSTREAMER="$VAL"
1695 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1696 CFG_QGTKSTYLE="$VAL"
1702 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1705 if [ "$VAL" = "no" ]; then
1713 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1715 elif [ "$VAL" = "no" ]; then
1722 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1723 QPA_PLATFORM_GUARD="$VAL"
1729 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1731 elif [ "$VAL" = "runtime" ]; then
1738 if [ "$VAL" = "yes" ]; then
1745 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1752 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1753 CFG_LARGEFILE="$VAL"
1759 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1766 if [ "$VAL" = "yes" ]; then
1767 CFG_OPENSSL="linked"
1773 if [ "$VAL" = "yes" ]; then
1776 if [ "$VAL" = "no" ]; then
1784 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1785 CFG_JAVASCRIPTCORE_JIT="$VAL"
1791 if [ "$VAL" = "yes" ]; then
1792 OPT_CONFIRM_LICENSE="$VAL"
1798 if [ "$VAL" = "yes" ]; then
1804 sql-*|imageformat-*)
1805 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1806 # if autoconf style options were used, $VAL can be "yes" or "no"
1807 [ "$VAL" = "yes" ] && VAL=qt
1808 # now $VAL should be "no", "qt", or "plugin"... double-check
1809 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1812 # now $VAL is "no", "qt", or "plugin"
1814 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1815 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1817 # Grab the available values
1820 avail="$CFG_SQL_AVAILABLE"
1823 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1824 if [ "$OPT" != "plugin" ]; then
1825 # png is always built in
1831 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1835 # Check that that user's value is available.
1838 if [ "$VAL" = "$d" ]; then
1843 [ "$found" = yes ] || ERROR=yes
1845 if [ "$VAR" = "sql" ]; then
1846 # set the CFG_SQL_driver
1847 eval "CFG_SQL_$VAL=\$OPT"
1849 elif [ "$VAR" = "imageformat" ]; then
1850 [ "$OPT" = "qt" ] && OPT=yes
1851 VAL="`echo $VAL |tr a-z A-Z`"
1852 eval "CFG_$VAL=$OPT"
1856 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1857 if [ "$OPT" = "plugin" ]; then
1860 QMakeVar add "${VAR}s" "${VAL}"
1861 elif [ "$OPT" = "no" ]; then
1862 PLUG_VAR="${VAR}-plugin"
1864 QMakeVar del "${IN_VAR}s" "$VAL"
1865 QMakeVar del "${PLUG_VAR}s" "$VAL"
1867 if [ "$ERROR" = "yes" ]; then
1868 echo "$CURRENT_OPT: unknown argument"
1873 if [ "$VAL" = "yes" ]; then
1874 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1875 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1879 elif [ "$VAL" = "no" ]; then
1880 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1881 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1890 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1897 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1904 DEFINES="$DEFINES \"$VAL\""
1905 D_FLAGS="$D_FLAGS -D\"$VAL\""
1908 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1911 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1914 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1917 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1920 if [ "$BUILD_ON_MAC" = "yes" ]; then
1921 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1922 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1928 if [ "$BUILD_ON_MAC" = "yes" ]; then
1929 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1935 W_FLAGS="$W_FLAGS \"${VAL}\""
1941 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1942 CFG_PHONON_BACKEND="$VAL"
1954 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1955 CFG_AUDIO_BACKEND="$VAL"
1961 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1968 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1969 CFG_FORCE_ASSERTS="$VAL"
1975 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1982 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1992 if [ "$UNKNOWN_OPT" = "yes" ]; then
1993 echo "${CURRENT_OPT}: invalid command-line switch"
1999 # update QT_CONFIG to show our current predefined configuration
2000 case "$CFG_QCONFIG" in
2001 minimal|small|medium|large|full)
2002 # these are a sequence of increasing functionality
2003 for c in minimal small medium large full; do
2004 QT_CONFIG="$QT_CONFIG $c-config"
2005 [ "$CFG_QCONFIG" = $c ] && break
2009 # not known to be sufficient for anything
2010 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2011 echo >&2 "Error: configuration file not found:"
2012 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2014 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2019 #-------------------------------------------------------------------------------
2020 # build tree initialization
2021 #-------------------------------------------------------------------------------
2023 # where to find which..
2024 unixtests="$relpath/config.tests/unix"
2025 mactests="$relpath/config.tests/mac"
2026 WHICH="$unixtests/which.test"
2028 PERL=`$WHICH perl 2>/dev/null`
2030 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2032 for e in gawk nawk awk; do
2033 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2040 PERL="/usr/bin/perl"
2041 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2045 ### skip this if the user just needs help...
2046 if [ "$OPT_HELP" != "yes" ]; then
2048 # is this a shadow build?
2049 if [ "$OPT_SHADOW" = "maybe" ]; then
2051 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2052 if [ -h "$outpath" ]; then
2053 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2059 if [ "$OPT_SHADOW" = "yes" ]; then
2060 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2061 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2062 echo >&2 "Cannot proceed."
2065 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2068 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2070 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2071 echo "Qt can be built in release mode with separate debug information, so"
2072 echo "-debug-and-release is not necessary anymore"
2076 if [ "$CFG_SILENT" = "yes" ]; then
2077 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2080 # if the source tree is different from the build tree,
2081 # symlink or copy part of the sources
2082 if [ "$OPT_SHADOW" = "yes" ]; then
2083 echo "Preparing build tree..."
2085 if [ -z "$PERL" ]; then
2087 echo "You need perl in your PATH to make a shadow build."
2088 echo "Cannot proceed."
2092 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2094 # make a syncqt script that can be used in the shadow
2095 rm -f "$outpath/bin/syncqt"
2096 if [ -x "$relpath/bin/syncqt" ]; then
2097 mkdir -p "$outpath/bin"
2098 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2099 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2100 chmod 755 "$outpath/bin/syncqt"
2103 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2104 rm -f "$outpath/bin/$i"
2105 if [ -x "$relpath/bin/$i" ]; then
2106 mkdir -p "$outpath/bin"
2107 echo "#!/bin/sh" >"$outpath/bin/$i"
2108 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2109 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2110 chmod 755 "$outpath/bin/$i"
2114 # save a pre-existing mkspecs/modules dir
2115 test -d "$outpath/mkspecs/modules" && \
2116 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2118 # symlink the mkspecs directory
2119 mkdir -p "$outpath/mkspecs"
2120 rm -rf "$outpath"/mkspecs/*
2121 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2122 rm -f "$outpath/mkspecs/default"
2126 rm -rf "$outpath/mkspecs/$1"
2127 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2128 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2131 # Special case for mkspecs/features directory.
2132 # To be able to place .prf files into a shadow build directory,
2133 # we're creating links for files only. The directory structure is reproduced.
2134 ShadowMkspecs features
2136 # The modules dir is special, too.
2137 if test -d "$outpath/mkspecs-modules"; then
2138 rm -rf "$outpath/mkspecs/modules"
2139 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2141 ShadowMkspecs modules
2144 # symlink the doc directory
2145 rm -rf "$outpath/doc"
2146 ln -s "$relpath/doc" "$outpath/doc"
2149 # symlink fonts to be able to run application from build directory
2150 if [ ! -d "${outpath}/lib/fonts" ]; then
2151 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2152 mkdir -p "${outpath}/lib"
2153 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2157 if [ "$OPT_FAST" = "auto" ]; then
2158 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2165 # find a make command
2166 if [ -z "$MAKE" ]; then
2168 for mk in gmake make; do
2169 if "$WHICH" $mk >/dev/null 2>&1; then
2174 if [ -z "$MAKE" ]; then
2175 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2176 echo >&2 "Cannot proceed."
2179 # export MAKE, we need it later in the config.tests
2185 #-------------------------------------------------------------------------------
2186 # auto-detect all that hasn't been specified in the arguments
2187 #-------------------------------------------------------------------------------
2189 if [ -z "$PLATFORM" ]; then
2191 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2193 OSX_VERSION=`uname -r | cut -d. -f1`
2194 # Select compiler. Use g++ unless we find a usable Clang version
2196 if [ "$OSX_VERSION" -ge 12 ]; then
2197 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2199 elif [ "$OSX_VERSION" -eq 11 ]; then
2200 # We're on Lion. Check if we have a supported Clang version
2201 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2204 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2211 #PLATFORM=aix-g++-64
2213 #PLATFORM=aix-xlc-64
2215 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2225 # PLATFORM=dynix-g++
2231 PLATFORM=freebsd-g++
2233 - Also available for FreeBSD: freebsd-icc
2237 PLATFORM=openbsd-g++
2248 #PLATFORM=irix-cc-64
2250 - Also available for IRIX: irix-g++ irix-cc-64
2254 case "$UNAME_MACHINE" in
2256 #PLATFORM=hpuxi-acc-32
2257 PLATFORM=hpuxi-acc-64
2259 - Also available for HP-UXi: hpuxi-acc-32
2265 #PLATFORM=hpux-acc-64
2267 #PLATFORM=hpux-acc-o64
2269 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2278 - Also available for Tru64: tru64-g++
2282 case "$UNAME_MACHINE" in
2284 PLATFORM=linux-g++-64
2291 - Also available for Linux: linux-kcc linux-icc linux-cxx
2295 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2296 PLATFORM="solaris-g++"
2298 #PLATFORM=solaris-g++
2300 #PLATFORM=solaris-cc64
2303 - Also available for Solaris: solaris-g++ solaris-cc-64
2306 ReliantUNIX-*:*|SINIX-*:*)
2307 PLATFORM=reliant-cds
2308 #PLATFORM=reliant-cds-64
2310 - Also available for Reliant UNIX: reliant-cds-64
2320 #PLATFORM=unixware-g++
2321 PLATFORM=unixware-cc
2323 - Also available for OpenUNIX: unixware-g++
2327 #PLATFORM=unixware-g++
2328 PLATFORM=unixware-cc
2330 - Also available for UnixWare: unixware-g++
2337 - Also available for SCO OpenServer: sco-g++
2341 PLATFORM=unixware-g++
2344 PLATFORM=unsupported/qnx-g++
2347 if [ "$OPT_HELP" != "yes" ]; then
2349 echo " The build script does not currently recognize all" >&2
2350 echo " platforms supported by Qt." >&2
2351 echo " Rerun this script with a -platform option listed to" >&2
2352 echo " set the system/compiler combination you use." >&2
2359 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2361 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2362 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2363 case "$XPLATFORM" in *qnx-*|*blackberry-*) XPLATFORM_QNX=yes;; esac
2365 if [ -d "$PLATFORM" ]; then
2366 QMAKESPEC="$PLATFORM"
2368 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2370 if [ -d "$XPLATFORM" ]; then
2371 XQMAKESPEC="$XPLATFORM"
2373 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2375 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2376 QT_CROSS_COMPILE=yes
2377 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2378 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2381 if [ "$BUILD_ON_MAC" = "yes" ]; then
2382 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2384 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2385 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2386 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2387 echo " built with 'macx-g++'" >&2
2393 # check specified platforms are supported
2394 if [ '!' -d "$QMAKESPEC" ]; then
2396 echo " The specified system/compiler is not supported:"
2400 echo " Please see the README file for a complete list."
2404 if [ '!' -d "$XQMAKESPEC" ]; then
2406 echo " The specified system/compiler is not supported:"
2410 echo " Please see the README file for a complete list."
2414 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2416 echo " The specified system/compiler port is not complete:"
2418 echo " $XQMAKESPEC/qplatformdefs.h"
2420 echo " Please contact qt-info@nokia.com."
2425 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2426 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2427 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2428 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2429 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2433 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2434 case `basename "$XPLATFORM"` in
2437 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2439 echo "Please contact qt-info@nokia.com to upgrade your license to"
2440 echo "include this platform, or install the Qt Open Source Edition"
2441 echo "if you intend to develop free software."
2447 #-------------------------------------------------------------------------------
2448 # tests that don't need qmake (must be run before displaying help)
2449 #-------------------------------------------------------------------------------
2451 # detect build style
2452 if [ "$CFG_DEBUG" = "auto" ]; then
2453 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2454 CFG_DEBUG_RELEASE=yes
2456 elif [ "$CFG_DEV" = "yes" ]; then
2457 CFG_DEBUG_RELEASE=no
2460 CFG_DEBUG_RELEASE=no
2464 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2465 QT_CONFIG="$QT_CONFIG build_all debug_and_release"
2468 # pass on $CFG_SDK to the configure tests.
2469 if [ '!' -z "$CFG_SDK" ]; then
2470 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2473 # find the default framework value
2474 if [ "$BUILD_ON_MAC" = "yes" ]; then
2475 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2476 CFG_FRAMEWORK="$CFG_SHARED"
2477 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2479 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2487 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2489 TEST_COMPILER=$QMAKE_CONF_COMPILER
2490 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2491 if [ -z "$TEST_COMPILER" ]; then
2492 echo "ERROR: Cannot set the compiler for the configuration tests"
2498 case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
2499 if [ -n "$GCC_MACHINE_DUMP" ]; then
2500 DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
2503 if [ -n "$CFG_SYSROOT" ]; then
2504 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2508 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2510 # auto-detect precompiled header support
2511 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2512 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2519 # auto-detect support for separate debug info in objcopy
2520 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2521 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2522 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2523 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2524 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2525 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2526 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2527 CFG_SEPARATE_DEBUG_INFO=no
2531 # binutils on HP-UX is buggy; default to no.
2532 CFG_SEPARATE_DEBUG_INFO=no
2535 CFG_SEPARATE_DEBUG_INFO=yes
2541 # auto-detect -fvisibility support
2542 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2543 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2544 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2545 echo "-reduce-exports was requested but this compiler does not support it"
2546 echo "Re-run configure with -v for more information"
2549 CFG_REDUCE_EXPORTS=no
2551 CFG_REDUCE_EXPORTS=yes
2555 # detect the availability of the -Bsymbolic-functions linker optimization
2556 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2557 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2558 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2559 echo "-reduce-relocations was requested but this compiler does not support it"
2560 echo "Re-run configure with -v for more information"
2563 CFG_REDUCE_RELOCATIONS=no
2565 CFG_REDUCE_RELOCATIONS=yes
2569 # auto-detect GNU make support
2570 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2574 # find the default framework value
2575 if [ "$BUILD_ON_MAC" = "yes" ]; then
2576 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2577 CFG_FRAMEWORK="$CFG_SHARED"
2578 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2580 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2588 #setup the build parts
2589 if [ -z "$CFG_BUILD_PARTS" ]; then
2590 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2592 # build tests by default, if a developer build
2593 if [ "$CFG_DEV" = "yes" ]; then
2594 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2597 # don't build tools by default when cross-compiling
2598 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2599 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2602 for nobuild in $CFG_NOBUILD_PARTS; do
2603 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2605 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2607 # echo "WARNING: libs is a required part of the build."
2609 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2612 #-------------------------------------------------------------------------------
2613 # post process QT_INSTALL_* variables
2614 #-------------------------------------------------------------------------------
2616 if [ -z "$QT_INSTALL_PREFIX" ]; then
2617 if [ "$CFG_DEV" = "yes" ]; then
2618 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2620 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2623 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2625 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2626 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2627 if [ "$BUILD_ON_MAC" = "yes" ]; then
2628 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2631 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2634 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2636 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2637 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2638 if [ "$BUILD_ON_MAC" = "yes" ]; then
2639 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2644 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2647 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2649 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2650 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2651 if [ "$BUILD_ON_MAC" = "yes" ]; then
2652 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2653 QT_INSTALL_LIBS="/Libraries/Frameworks"
2657 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2659 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2661 if [ -z "$QT_INSTALL_BINS" ]; then #default
2662 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2663 if [ "$BUILD_ON_MAC" = "yes" ]; then
2664 QT_INSTALL_BINS="/Developer/Applications/Qt"
2667 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2669 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2671 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2672 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2673 if [ "$BUILD_ON_MAC" = "yes" ]; then
2674 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2677 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2679 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2681 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2682 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2683 if [ "$BUILD_ON_MAC" = "yes" ]; then
2684 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2687 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2689 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2691 if [ -z "$QT_INSTALL_DATA" ]; then #default
2692 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2694 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2696 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2697 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2699 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2701 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2702 if [ "$BUILD_ON_MAC" = "yes" ]; then
2703 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2705 QT_INSTALL_SETTINGS=/etc/xdg
2708 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2710 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2711 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2712 if [ "$BUILD_ON_MAC" = "yes" ]; then
2713 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2716 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2718 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2721 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2722 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2723 if [ "$BUILD_ON_MAC" = "yes" ]; then
2724 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2727 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2729 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2731 #------- host paths --------
2733 if [ -z "$QT_HOST_PREFIX" ]; then
2734 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2737 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2741 if [ -z "$QT_HOST_BINS" ]; then #default
2743 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2744 if [ "$BUILD_ON_MAC" = "yes" ]; then
2745 QT_HOST_BINS="/Developer/Applications/Qt"
2748 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2750 QT_HOST_BINS="$QT_INSTALL_BINS"
2753 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2755 if [ -z "$QT_HOST_DATA" ]; then #default
2757 QT_HOST_DATA="$QT_HOST_PREFIX"
2759 QT_HOST_DATA="$QT_INSTALL_DATA"
2762 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2765 #-------------------------------------------------------------------------------
2766 # help - interactive parts of the script _after_ this section please
2767 #-------------------------------------------------------------------------------
2769 # next, emit a usage message if something failed.
2770 if [ "$OPT_HELP" = "yes" ]; then
2771 [ "x$ERROR" = "xyes" ] && echo
2772 if [ "$CFG_NIS" = "no" ]; then
2779 if [ "$CFG_CUPS" = "no" ]; then
2786 if [ "$CFG_ICONV" = "no" ]; then
2793 if [ "$CFG_LARGEFILE" = "no" ]; then
2800 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2808 if [ "$CFG_XCB" = "no" ]; then
2816 if [ "$CFG_EGLFS" = "no" ]; then
2824 if [ "$CFG_DIRECTFB" = "no" ]; then
2831 if [ "$CFG_XINPUT2" = "no" ]; then
2839 if [ "$CFG_DBUS" = "no" ]; then
2847 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2855 if [ "$CFG_GLIB" = "no" ]; then
2864 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2865 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2866 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2867 [-release] [-debug] [-debug-and-release] [-c++11] [-no-c++11]
2868 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2869 [-largefile] [-no-accessibility] [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2870 [-plugin-sql-<driver>] [-system-sqlite]
2871 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2872 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2873 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2874 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2875 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2876 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2877 [-no-separate-debug-info] [-no-sse2]
2878 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2879 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2880 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2881 [-no-audio-backend] [-audio-backend]
2882 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2883 [-no-optimized-qmake] [-optimized-qmake]
2884 [-no-openssl] [-openssl] [-openssl-linked]
2885 [-no-gtkstyle] [-gtkstyle]
2886 [-qt-pcre] [-system-pcre]
2887 [-device <name>] [-device-option <key=value>]
2888 [additional platform specific options (see below)]
2891 Installation options:
2893 These are optional, but you may specify install directories.
2895 -prefix <dir> ...... This will install everything relative to <dir>
2896 (default $QT_INSTALL_PREFIX)
2898 -hostprefix [dir] .. Tools and libraries needed when developing
2899 applications are installed in [dir]. If [dir] is
2900 not given, the current build directory will be used.
2903 * -prefix-install .... Force a sandboxed "local" installation of
2904 Qt. This will install into
2905 $QT_INSTALL_PREFIX, if this option is
2906 disabled then some platforms will attempt a
2907 "system" install by placing default values to
2908 be placed in a system location other than
2911 You may use these to separate different parts of the install:
2913 -bindir <dir> ......... Executables will be installed to <dir>
2914 (default PREFIX/bin)
2915 -libdir <dir> ......... Libraries will be installed to <dir>
2916 (default PREFIX/lib)
2917 -docdir <dir> ......... Documentation will be installed to <dir>
2918 (default PREFIX/doc)
2919 -headerdir <dir> ...... Headers will be installed to <dir>
2920 (default PREFIX/include)
2921 -plugindir <dir> ...... Plugins will be installed to <dir>
2922 (default PREFIX/plugins)
2923 -importdir <dir> ...... Imports for QML will be installed to <dir>
2924 (default PREFIX/imports)
2925 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2927 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2928 (default PREFIX/translations)
2929 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2930 (default PREFIX/etc/settings)
2931 -examplesdir <dir> .... Examples will be installed to <dir>
2932 (default PREFIX/examples)
2933 -testsdir <dir> ....... Tests will be installed to <dir>
2934 (default PREFIX/tests)
2936 -hostbindir <dir> .. Host executables will be installed to <dir>
2937 (default HOSTPREFIX/bin)
2938 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2939 (default HOSTPREFIX)
2943 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2944 that needs to be evaluated. If the evaluation succeeds, the feature is
2945 included. Here is a short explanation of each option:
2947 * -release ........... Compile and link Qt with debugging turned off.
2948 -debug ............. Compile and link Qt with debugging turned on.
2949 -debug-and-release . Compile and link two versions of Qt, with and without
2950 debugging turned on (Mac only).
2952 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2954 -opensource ........ Compile and link the Open-Source Edition of Qt.
2955 -commercial ........ Compile and link the Commercial Edition of Qt.
2957 -no-c++11 .......... Do not compile Qt with C++11 support enabled.
2958 + -c++11 ............. Compile Qt with C++11 support enabled.
2960 * -shared ............ Create and use shared Qt libraries.
2961 -static ............ Create and use static Qt libraries.
2963 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2965 -fast .............. Configure Qt quickly by generating Makefiles only for
2966 library and subdirectory targets. All other Makefiles
2967 are created as wrappers, which will in turn run qmake.
2969 -no-largefile ...... Disables large file support.
2970 + -largefile ......... Enables Qt to access files larger than 4 GB.
2972 -no-accessibility .. Do not compile Accessibility support.
2973 * -accessibility ..... Compile Accessibility support.
2975 -no-sql-<driver> ... Disable SQL <driver> entirely.
2976 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2978 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2981 Possible values for <driver>:
2982 [ $CFG_SQL_AVAILABLE ]
2984 -system-sqlite ..... Use sqlite from the operating system.
2986 -no-phonon-backend.. Do not build the platform phonon plugin.
2987 + -phonon-backend..... Build the platform phonon plugin.
2989 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
2990 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
2992 -no-qml-debug ...... Do not build the in-process QML debugging support.
2993 + -qml-debug ......... Build the QML debugging support.
2995 -platform target ... The operating system and compiler you are building
2998 See the README file for a list of supported
2999 operating systems and compilers.
3001 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3002 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3003 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3004 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3005 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3006 -no-avx ............ Do not compile with use of AVX instructions.
3007 -no-avx2 ........... Do not compile with use of AVX2 instructions.
3008 -no-neon ........... Do not compile with use of NEON instructions.
3009 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3010 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3012 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3013 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3015 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3017 -D <string> ........ Add an explicit define to the preprocessor.
3018 -I <string> ........ Add an explicit include path.
3019 -L <string> ........ Add an explicit library path.
3021 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
3022 configure determines whether to use pkg-config or not with
3023 some heuristics such as checking the environment variables.
3024 -no-pkg-config ..... Disable use of pkg-config.
3025 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
3026 detection heuristic).
3028 -help, -h .......... Display this information.
3030 Third Party Libraries:
3032 -qt-zlib ........... Use the zlib bundled with Qt.
3033 + -system-zlib ....... Use zlib from the operating system.
3034 See http://www.gzip.org/zlib
3036 -no-gif ............ Do not compile GIF reading support.
3038 -no-libpng ......... Do not compile PNG support.
3039 -qt-libpng ......... Use the libpng bundled with Qt.
3040 + -system-libpng ..... Use libpng from the operating system.
3041 See http://www.libpng.org/pub/png
3043 -no-libjpeg ........ Do not compile JPEG support.
3044 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3045 + -system-libjpeg .... Use libjpeg from the operating system.
3046 See http://www.ijg.org
3048 -no-openssl ........ Do not compile support for OpenSSL.
3049 + -openssl ........... Enable run-time OpenSSL support.
3050 -openssl-linked .... Enabled linked OpenSSL support.
3052 -qt-pcre ........... Use the PCRE library bundled with Qt.
3053 + -system-pcre ....... Use the PCRE library from the operating system.
3057 -make <part> ....... Add part to the list of parts to be built at make time.
3058 ($QT_DEFAULT_BUILD_PARTS)
3059 -nomake <part> ..... Exclude part from the list of parts to be built.
3061 -R <string> ........ Add an explicit runtime library path to the Qt
3063 -l <string> ........ Add an explicit library.
3065 -no-rpath .......... Do not use the library install path as a runtime
3067 + -rpath ............. Link Qt libraries and executables using the library
3068 install path as a runtime library path. Equivalent
3069 to -R install_libpath
3071 -continue .......... Continue as far as possible if an error occurs.
3073 -verbose, -v ....... Print verbose information about each step of the
3076 -silent ............ Reduce the build output so that warnings and errors
3077 can be seen more easily.
3079 * -no-optimized-qmake ... Do not build qmake optimized.
3080 -optimized-qmake ...... Build qmake optimized.
3082 -no-gui ............ Don't build the Qt GUI library
3084 $NSN -no-nis ............ Do not compile NIS support.
3085 $NSY -nis ............... Compile NIS support.
3087 $CUN -no-cups ........... Do not compile CUPS support.
3088 $CUY -cups .............. Compile CUPS support.
3089 Requires cups/cups.h and libcups.so.2.
3091 $CIN -no-iconv .......... Do not compile support for iconv(3).
3092 $CIY -iconv ............. Compile support for iconv(3).
3094 $PHN -no-pch ............ Do not use precompiled header support.
3095 $PHY -pch ............... Use precompiled header support.
3097 $DBN -no-dbus ........... Do not compile the QtDBus module.
3098 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3099 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3101 -reduce-relocations ..... Reduce relocations in the libraries through extra
3102 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3103 experimental; needs GNU ld >= 2.18).
3105 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3107 -device <name> ............... Cross-compile for device <name> (experimental)
3108 -device-option <key=value> ... Add device specific options for the device mkspec
3111 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3112 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3114 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3115 $XCBY -xcb ............... Compile Xcb support.
3117 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3118 $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
3120 $DFBN -no-directfb ....... Do not compile DirectFB support.
3121 $DFBY -directfb .......... Compile DirectFB support.
3123 -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
3125 -xplatform target ... The target platform when cross-compiling.
3127 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3129 -no-feature-<feature> Do not compile in <feature>.
3130 -feature-<feature> .. Compile in <feature>. The available features
3131 are described in src/corelib/global/qfeatures.txt
3133 -no-freetype ........ Do not compile in Freetype2 support.
3134 -qt-freetype ........ Use the libfreetype bundled with Qt.
3135 * -system-freetype .... Use libfreetype from the operating system.
3136 See http://www.freetype.org/
3138 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3139 default ($CFG_QCONFIG).
3141 -no-opengl .......... Do not support OpenGL.
3142 -opengl <api> ....... Enable OpenGL support
3143 With no parameter, this will attempt to auto-detect
3144 OpenGL ES 2, or regular desktop OpenGL.
3145 Use es2 for <api> to override auto-detection.
3147 $GBN -no-glib ........... Do not compile Glib support.
3148 $GBY -glib .............. Compile Glib support.
3151 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3154 $X2N -no-xinput2......... Do not compile XInput2 support.
3155 $X2Y -xinput2............ Compile XInput2 support.
3161 if [ "$BUILD_ON_MAC" = "yes" ]; then
3166 -Fstring ........... Add an explicit framework path.
3167 -fw string ......... Add an explicit framework.
3169 * -framework ......... Build Qt as a series of frameworks and
3170 link tools against those frameworks.
3171 -no-framework ...... Do not build Qt as a series of frameworks.
3173 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3174 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3176 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3177 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3178 QT_ENABLE_HARFBUZZ environment variable.
3183 [ "x$ERROR" = "xyes" ] && exit 1
3188 # -----------------------------------------------------------------------------
3189 # LICENSING, INTERACTIVE PART
3190 # -----------------------------------------------------------------------------
3193 echo "This is the Qt ${EditionString} Edition."
3196 if [ "$Edition" = "OpenSource" ]; then
3198 echo "You are licensed to use this software under the terms of"
3199 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3200 if [ -f "$relpath/LICENSE.GPL3" ]; then
3201 echo "You are also licensed to use this software under the terms of"
3202 echo "the GNU General Public License (GPL) versions 3."
3208 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3209 echo "You have already accepted the terms of the $LicenseType license."
3212 if [ -f "$relpath/LICENSE.GPL3" ]; then
3213 echo "Type '3' to view the GNU General Public License version 3."
3215 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3216 echo "Type 'yes' to accept this license offer."
3217 echo "Type 'no' to decline this license offer."
3219 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3223 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3225 elif [ "$acceptance" = "no" ]; then
3226 echo "You are not licensed to use this software."
3229 elif [ "$acceptance" = "3" ]; then
3230 more "$relpath/LICENSE.GPL3"
3231 elif [ "$acceptance" = "L" ]; then
3232 more "$relpath/LICENSE.LGPL"
3235 elif [ "$Edition" = "Preview" ]; then
3236 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3239 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3240 echo "You have already accepted the terms of the $LicenseType license."
3243 echo "You are licensed to use this software under the terms of"
3244 echo "the $TheLicense"
3246 echo "Type '?' to read the Preview License."
3247 echo "Type 'yes' to accept this license offer."
3248 echo "Type 'no' to decline this license offer."
3250 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3254 if [ "$acceptance" = "yes" ]; then
3256 elif [ "$acceptance" = "no" ] ;then
3257 echo "You are not licensed to use this software."
3260 elif [ "$acceptance" = "?" ]; then
3261 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3264 elif [ "$Edition" != "OpenSource" ]; then
3265 if [ -n "$ExpiryDate" ]; then
3266 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3267 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3268 Today=`date +%Y%m%d`
3269 if [ "$Today" -gt "$ExpiryDate" ]; then
3270 case "$LicenseType" in
3271 Commercial|Academic|Educational)
3272 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3274 echo "NOTICE NOTICE NOTICE NOTICE"
3276 echo " Your support and upgrade period has expired."
3278 echo " You are no longer licensed to use this version of Qt."
3279 echo " Please contact qt-info@nokia.com to renew your support"
3280 echo " and upgrades for this license."
3282 echo "NOTICE NOTICE NOTICE NOTICE"
3287 echo "WARNING WARNING WARNING WARNING"
3289 echo " Your support and upgrade period has expired."
3291 echo " You may continue to use your last licensed release"
3292 echo " of Qt under the terms of your existing license"
3293 echo " agreement. But you are not entitled to technical"
3294 echo " support, nor are you entitled to use any more recent"
3295 echo " Qt releases."
3297 echo " Please contact qt-info@nokia.com to renew your"
3298 echo " support and upgrades for this license."
3300 echo "WARNING WARNING WARNING WARNING"
3307 echo "NOTICE NOTICE NOTICE NOTICE"
3309 echo " Your Evaluation license has expired."
3311 echo " You are no longer licensed to use this software. Please"
3312 echo " contact qt-info@nokia.com to purchase license, or install"
3313 echo " the Qt Open Source Edition if you intend to develop free"
3316 echo "NOTICE NOTICE NOTICE NOTICE"
3323 TheLicense=`head -n 1 "$outpath/LICENSE"`
3325 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3326 echo "You have already accepted the terms of the $TheLicense."
3329 echo "You are licensed to use this software under the terms of"
3330 echo "the $TheLicense."
3332 echo "Type '?' to view the $TheLicense."
3333 echo "Type 'yes' to accept this license offer."
3334 echo "Type 'no' to decline this license offer."
3336 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3340 if [ "$acceptance" = "yes" ]; then
3342 elif [ "$acceptance" = "no" ]; then
3343 echo "You are not licensed to use this software."
3346 else [ "$acceptance" = "?" ]
3347 more "$outpath/LICENSE"
3352 # this should be moved somewhere else
3355 AIX_VERSION=`uname -v`
3356 if [ "$AIX_VERSION" -lt "5" ]; then
3357 QMakeVar add QMAKE_LIBS_X11 -lbind
3364 #-------------------------------------------------------------------------------
3365 # generate qconfig.cpp
3366 #-------------------------------------------------------------------------------
3367 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3369 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3371 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3372 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3374 /* Installation date */
3375 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3377 /* Installation Info */
3378 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3379 "qt_prfxpath=$QT_INSTALL_PREFIX",
3380 "qt_docspath=$QT_INSTALL_DOCS",
3381 "qt_hdrspath=$QT_INSTALL_HEADERS",
3382 "qt_libspath=$QT_INSTALL_LIBS",
3383 "qt_binspath=$QT_INSTALL_BINS",
3384 "qt_plugpath=$QT_INSTALL_PLUGINS",
3385 "qt_impspath=$QT_INSTALL_IMPORTS",
3386 "qt_datapath=$QT_INSTALL_DATA",
3387 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3388 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3389 "qt_tstspath=$QT_INSTALL_TESTS",
3390 #ifdef QT_BUILD_QMAKE
3391 "qt_ssrtpath=$CFG_SYSROOT",
3392 "qt_hpfxpath=$QT_HOST_PREFIX",
3393 "qt_hbinpath=$QT_HOST_BINS",
3394 "qt_hdatpath=$QT_HOST_DATA",
3397 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3400 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3402 /* strlen( "qt_lcnsxxxx" ) == 12 */
3403 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3404 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3406 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3409 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3410 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3411 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3413 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3414 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3415 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3418 # -----------------------------------------------------------------------------
3419 if [ "$LicenseType" = "Evaluation" ]; then
3420 EVALKEY=qt_qevalkey=$LicenseKeyExt
3421 elif echo "$DEFINES" | grep QT_EVAL >/dev/null 2>&1; then
3422 EVALKEY=qt_qevalkey=
3425 if [ -n "$EVALKEY" ]; then
3426 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3427 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3428 /* Evaluation license key */
3429 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3431 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3435 # -----------------------------------------------------------------------------
3437 # -----------------------------------------------------------------------------
3440 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3442 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3443 if [ "$OPT_SHADOW" = "yes" ]; then
3444 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3445 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3446 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3450 # $1: input variable name (awk regexp)
3451 # $2: optional output variable name
3452 # $3: optional value transformation (sed command)
3453 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3454 # is where the resulting variable is written to
3455 setBootstrapVariable()
3457 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3461 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3462 echo "Creating qmake. Please wait..."
3465 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3466 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3467 if [ -f "$QCONFIG_H" ]; then
3468 OLD_QCONFIG_H=$QCONFIG_H
3469 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3472 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3473 # when building qmake, we use #defines for the install paths,
3474 # however they are real functions in the library
3475 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3476 mkdir -p "$outpath/src/corelib/global"
3477 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3478 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3481 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3483 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3484 rm -rf mkspecs/default mkspecs/default-host
3485 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3486 ln -s `echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default-host
3487 mkdir -p "$outpath/qmake" || exit
3489 for mkfile in GNUmakefile Makefile; do
3492 in_mkfile="${mkfile}.in"
3493 if [ "$mkfile" = "Makefile" ]; then
3494 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3495 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3497 in_mkfile="${mkfile}.unix"
3499 in_mkfile="$relpath/qmake/$in_mkfile"
3500 mkfile="$outpath/qmake/$mkfile"
3501 if [ -f "$mkfile" ]; then
3502 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3505 [ -f "$in_mkfile" ] || continue
3507 echo "########################################################################" > "$mkfile"
3508 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3509 echo "########################################################################" >> "$mkfile"
3512 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3513 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3514 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3516 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3517 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3520 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3521 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3522 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3523 setBootstrapVariable QMAKE_CFLAGS
3524 setBootstrapVariable QMAKE_CXXFLAGS
3525 setBootstrapVariable QMAKE_LFLAGS
3527 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3528 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3529 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3531 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3532 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3533 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3534 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3535 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3536 elif [ "$CFG_DEBUG" = "yes" ]; then
3537 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3538 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3539 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3540 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3543 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3544 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3545 for rpath in $RPATH_FLAGS; do
3546 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3549 if [ "$BUILD_ON_MAC" = "yes" ]; then
3550 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3551 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3552 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3553 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3554 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3555 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3556 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3557 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3558 if [ '!' -z "$CFG_SDK" ]; then
3559 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3560 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3561 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3562 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3563 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3566 if [ '!' -z "$D_FLAGS" ]; then
3567 EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS"
3569 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3570 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3571 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3572 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3574 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3575 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3576 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3577 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3578 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3579 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3580 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3581 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3582 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3583 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3585 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3586 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3587 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3588 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3593 QMAKE_BUILD_ERROR=no
3594 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3595 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3596 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3597 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3600 #-------------------------------------------------------------------------------
3601 # create a qt.conf for the Qt build tree itself
3602 #-------------------------------------------------------------------------------
3604 QTCONFFILE="$outpath/bin/qt.conf"
3605 cat > "$QTCONFFILE" <<EOF
3610 #-------------------------------------------------------------------------------
3612 #-------------------------------------------------------------------------------
3613 if [ -z "$PKG_CONFIG" ]; then
3614 # See if PKG_CONFIG is set in the mkspec:
3615 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3617 if [ -z "$PKG_CONFIG" ]; then
3618 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3621 if [ "$CFG_PKGCONFIG" = "no" ]; then
3623 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3625 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3626 echo >&2 "a correctly setup pkg-config environment!"
3628 elif [ -n "$PKG_CONFIG" ]; then
3629 # found a pkg-config
3630 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3631 # when xcompiling, check environment to see if it's actually usable
3632 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3633 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3634 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3635 if [ -n "$GCC_MACHINE_DUMP" ]; then
3636 PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$CFG_SYSROOT/usr/lib/$GCC_MACHINE_DUMP/pkgconfig
3638 export PKG_CONFIG_LIBDIR
3639 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3640 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3641 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3642 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3643 echo >&2 "Set this variable to the directory that contains target .pc files"
3644 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3645 echo >&2 "use -force-pkg-config to override this test."
3649 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3652 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3653 if [ -n "$CFG_SYSROOT" ]; then
3654 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3655 export PKG_CONFIG_SYSROOT_DIR
3656 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3657 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3658 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3659 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3660 echo >&2 "or use -force-pkg-config to override this test."
3664 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3668 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3669 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3673 if [ -z "$PKG_CONFIG" ]; then
3674 QT_CONFIG="$QT_CONFIG no-pkg-config"
3677 #-------------------------------------------------------------------------------
3678 # write out device config before we run the test.
3679 #-------------------------------------------------------------------------------
3680 DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
3681 if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
3682 rm -f "$DEVICE_VARS_FILE"
3684 mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
3685 DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
3688 #-------------------------------------------------------------------------------
3689 # tests that need qmake
3690 #-------------------------------------------------------------------------------
3692 #-------------------------------------------------------------------------------
3693 # determine the target and host architectures
3694 #-------------------------------------------------------------------------------
3696 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3697 OUTFILE=$outpath/arch.result
3698 "$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG"
3699 if [ $? -eq 0 ]; then
3700 eval `cat "$OUTFILE"`
3703 echo "Could not determine the target architecture!"
3704 echo "Turn on verbose messaging (-v) to see the final report."
3706 rm -f "$OUTFILE" 2>/dev/null
3707 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3709 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3710 # Do the same test again, using the host compiler
3711 SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG_HOST"
3712 if [ $? -eq 0 ]; then
3713 eval `cat "$OUTFILE"`
3716 echo "Could not determine the host architecture!"
3717 echo "Turn on verbose messaging (-v) to see the final report."
3719 rm -f "$OUTFILE" 2>/dev/null
3720 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3722 # not cross compiling, host == target
3723 CFG_HOST_ARCH="$CFG_ARCH"
3724 CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES"
3728 if [ "$OPT_VERBOSE" = "yes" ]; then
3729 echo "System architecture: '$CFG_ARCH'"
3730 echo "Host architecture: '$CFG_HOST_ARCH'"
3733 #-------------------------------------------------------------------------------
3734 # functionality tests
3735 #-------------------------------------------------------------------------------
3737 # Detect C++11 support
3738 if [ "$CFG_CXX11" != "no" ]; then
3739 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
3741 elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3742 echo "C++11 support cannot be enabled due to functionality tests!"
3743 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3744 echo " If you believe this message is in error you may use the continue"
3745 echo " switch (-continue) to $0 to continue."
3752 # detect availability of float math.h functions
3753 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
3754 CFG_USE_FLOATMATH=yes
3756 CFG_USE_FLOATMATH=no
3759 # detect sse2 support
3760 if [ "${CFG_SSE2}" = "auto" ]; then
3761 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
3768 # detect sse3 support
3769 if [ "${CFG_SSE3}" = "auto" ]; then
3770 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
3777 # detect ssse3 support
3778 if [ "${CFG_SSSE3}" = "auto" ]; then
3779 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
3786 # detect sse4.1 support
3787 if [ "${CFG_SSE4_1}" = "auto" ]; then
3788 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
3795 # detect sse4.2 support
3796 if [ "${CFG_SSE4_2}" = "auto" ]; then
3797 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
3804 # detect avx support
3805 if [ "${CFG_AVX}" = "auto" ]; then
3806 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
3807 case "$XQMAKESPEC" in
3809 # Some clang versions produce internal compiler errors compiling Qt AVX code
3810 case `$TEST_COMPILER --version` in
3811 Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
3813 if [ "$OPT_VERBOSE" = "yes" ]; then
3814 echo 'AVX support disabled for blacklisted clang compiler'
3831 # detect avx2 support
3832 if [ "${CFG_AVX}" = "no" ]; then
3835 if [ "${CFG_AVX2}" = "auto" ]; then
3836 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
3843 # check iWMMXt support
3844 if [ "$CFG_IWMMXT" = "yes" ]; then
3845 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
3846 if [ $? != "0" ]; then
3847 echo "The iWMMXt functionality test failed!"
3848 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3853 # detect neon support
3854 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3855 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
3860 elif [ "$CFG_ARCH" != "arm" ]; then
3864 # detect mips_dsp support
3865 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3871 # detect mips_dspr2 support
3872 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3878 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3881 if [ "$CFG_ZLIB" = "no" ]; then
3882 # Note: Qt no longer support builds without zlib
3883 # So we force a "no" to be "auto" here.
3884 # If you REALLY really need no zlib support, you can still disable
3885 # it by doing the following:
3886 # add "no-zlib" to mkspecs/qconfig.pri
3887 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3889 # There's no guarantee that Qt will build under those conditions
3894 if [ "$CFG_ZLIB" = "auto" ]; then
3895 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
3902 if [ "$CFG_LARGEFILE" = "auto" ]; then
3903 #Large files should be enabled for all Linux systems
3907 if [ "$CFG_GUI" = "no" ]; then
3908 QPA_PLATFORM_GUARD=no
3911 # detect how jpeg should be built
3912 if [ "$CFG_JPEG" = "auto" ]; then
3913 if [ "$CFG_SHARED" = "yes" ]; then
3920 if [ "$CFG_LIBJPEG" = "auto" ]; then
3921 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
3928 # detect how gif should be built
3929 if [ "$CFG_GIF" = "auto" ]; then
3930 if [ "$CFG_SHARED" = "yes" ]; then
3938 if [ "$CFG_LIBPNG" = "auto" ]; then
3939 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
3946 # detect accessibility
3947 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3948 CFG_ACCESSIBILITY=yes
3951 if [ "$CFG_EGLFS" = "yes" ]; then
3952 if [ "$CFG_EGL" = "no" ]; then
3953 echo "The EGLFS plugin requires EGL support and cannot be built"
3956 if [ "$CFG_OPENGL" != "es2" ]; then
3957 echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
3964 # auto-detect SQL-modules support
3965 for _SQLDR in $CFG_SQL_AVAILABLE; do
3968 if [ "$CFG_SQL_mysql" != "no" ]; then
3969 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3970 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3971 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3972 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3973 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3974 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3975 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3977 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3978 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3979 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3980 echo " You need MySql 4 or higher."
3981 echo " If you believe this message is in error you may use the continue"
3982 echo " switch (-continue) to $0 to continue."
3987 QT_LFLAGS_MYSQL_R=""
3991 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
3992 QMakeVar add CONFIG use_libmysqlclient_r
3993 if [ "$CFG_SQL_mysql" = "auto" ]; then
3994 CFG_SQL_mysql=plugin
3996 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3997 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
3998 if [ "$CFG_SQL_mysql" = "auto" ]; then
3999 CFG_SQL_mysql=plugin
4002 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4003 echo "MySQL support cannot be enabled due to functionality tests!"
4004 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4005 echo " If you believe this message is in error you may use the continue"
4006 echo " switch (-continue) to $0 to continue."
4011 QT_LFLAGS_MYSQL_R=""
4019 if [ "$CFG_SQL_psql" != "no" ]; then
4020 # Be careful not to use native pg_config when cross building.
4021 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4022 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4023 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4025 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4026 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4027 # But, respect PSQL_LIBS if set
4028 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4029 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
4030 if [ "$CFG_SQL_psql" = "auto" ]; then
4034 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4035 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4036 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4037 echo " If you believe this message is in error you may use the continue"
4038 echo " switch (-continue) to $0 to continue."
4049 if [ "$CFG_SQL_odbc" != "no" ]; then
4050 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
4051 if [ "$CFG_SQL_odbc" = "auto" ]; then
4055 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
4056 QT_LFLAGS_ODBC="-liodbc"
4057 if [ "$CFG_SQL_odbc" = "auto" ]; then
4061 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4062 echo "ODBC support cannot be enabled due to functionality tests!"
4063 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4064 echo " If you believe this message is in error you may use the continue"
4065 echo " switch (-continue) to $0 to continue."
4075 if [ "$CFG_SQL_oci" != "no" ]; then
4076 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
4077 if [ "$CFG_SQL_oci" = "auto" ]; then
4081 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4082 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4083 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4084 echo " If you believe this message is in error you may use the continue"
4085 echo " switch (-continue) to $0 to continue."
4094 if [ "$CFG_SQL_tds" != "no" ]; then
4095 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4096 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4097 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
4098 if [ "$CFG_SQL_tds" = "auto" ]; then
4102 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4103 echo "TDS support cannot be enabled due to functionality tests!"
4104 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4105 echo " If you believe this message is in error you may use the continue"
4106 echo " switch (-continue) to $0 to continue."
4115 if [ "$CFG_SQL_db2" != "no" ]; then
4116 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
4117 if [ "$CFG_SQL_db2" = "auto" ]; then
4121 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4122 echo "ODBC support cannot be enabled due to functionality tests!"
4123 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4124 echo " If you believe this message is in error you may use the continue"
4125 echo " switch (-continue) to $0 to continue."
4134 if [ "$CFG_SQL_ibase" != "no" ]; then
4135 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
4136 if [ "$CFG_SQL_ibase" = "auto" ]; then
4137 CFG_SQL_ibase=plugin
4140 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4141 echo "InterBase support cannot be enabled due to functionality tests!"
4142 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4143 echo " If you believe this message is in error you may use the continue"
4144 echo " switch (-continue) to $0 to continue."
4153 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4154 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
4155 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4156 CFG_SQL_sqlite2=plugin
4159 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4160 echo "SQLite2 support cannot be enabled due to functionality tests!"
4161 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4162 echo " If you believe this message is in error you may use the continue"
4163 echo " switch (-continue) to $0 to continue."
4172 if [ "$CFG_SQL_sqlite" != "no" ]; then
4173 SQLITE_AUTODETECT_FAILED="no"
4174 if [ "$CFG_SQLITE" = "system" ]; then
4175 if [ -n "$PKG_CONFIG" ]; then
4176 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4177 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4179 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
4180 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4181 CFG_SQL_sqlite=plugin
4183 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4185 SQLITE_AUTODETECT_FAILED="yes"
4188 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4189 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4190 CFG_SQL_sqlite=plugin
4193 SQLITE_AUTODETECT_FAILED="yes"
4197 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4198 echo "SQLite support cannot be enabled due to functionality tests!"
4199 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4200 echo " If you believe this message is in error you may use the continue"
4201 echo " switch (-continue) to $0 to continue."
4207 if [ "$OPT_VERBOSE" = "yes" ]; then
4208 echo "unknown SQL driver: $_SQLDR"
4214 # auto-detect NIS support
4215 if [ "$CFG_NIS" != "no" ]; then
4216 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
4219 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4220 echo "NIS support cannot be enabled due to functionality tests!"
4221 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4222 echo " If you believe this message is in error you may use the continue"
4223 echo " switch (-continue) to $0 to continue."
4231 # auto-detect CUPS support
4232 if [ "$CFG_CUPS" != "no" ]; then
4233 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
4236 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4237 echo "Cups support cannot be enabled due to functionality tests!"
4238 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4239 echo " If you believe this message is in error you may use the continue"
4240 echo " switch (-continue) to $0 to continue."
4248 # auto-detect iconv(3) support
4249 if [ "$CFG_ICONV" != "no" ]; then
4250 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4252 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
4254 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
4256 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
4259 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4260 echo "Iconv support cannot be enabled due to functionality tests!"
4261 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4262 echo " If you believe this message is in error you may use the continue"
4263 echo " switch (-continue) to $0 to continue."
4271 # auto-detect libdbus-1 support
4272 if [ "$CFG_DBUS" != "no" ]; then
4273 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4274 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4275 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4277 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
4278 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4279 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4280 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4282 if [ "$CFG_DBUS" = "auto" ]; then
4284 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4285 # CFG_DBUS is "yes" or "linked" here
4287 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4288 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4289 echo " If you believe this message is in error you may use the continue"
4290 echo " switch (-continue) to $0 to continue."
4296 # auto-detect Glib support
4297 if [ "$CFG_GLIB" != "no" ]; then
4298 if [ -n "$PKG_CONFIG" ]; then
4299 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4300 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4302 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
4304 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4305 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4307 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4308 echo "Glib support cannot be enabled due to functionality tests!"
4309 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4310 echo " If you believe this message is in error you may use the continue"
4311 echo " switch (-continue) to $0 to continue."
4319 # auto-detect GTK style support
4320 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4321 if [ -n "$PKG_CONFIG" ]; then
4322 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4323 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4325 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4327 QT_CONFIG="$QT_CONFIG gtkstyle"
4328 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4329 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4331 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4332 echo "Gtk theme support cannot be enabled due to functionality tests!"
4333 echo " Turn on verbose messaging (-v) to $0 to see the fin al report."
4334 echo " If you believe this message is in error you may use the continue"
4335 echo " switch (-continue) to $0 to continue."
4341 elif [ "$CFG_GLIB" = "no" ]; then
4346 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4347 if [ -n "$PKG_CONFIG" ]; then
4348 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4349 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4351 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
4353 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4354 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4356 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4357 echo "Gstreamer support cannot be enabled due to functionality tests!"
4358 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4359 echo " If you believe this message is in error you may use the continue"
4360 echo " switch (-continue) to $0 to continue."
4366 elif [ "$CFG_GLIB" = "no" ]; then
4370 # auto-detect libicu support
4371 if [ "$CFG_ICU" != "no" ]; then
4372 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
4373 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4375 if [ "$CFG_ICU" = "auto" ]; then
4377 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4380 echo "The ICU library support cannot be enabled."
4381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4382 echo " If you believe this message is in error you may use the continue"
4383 echo " switch (-continue) to $0 to continue."
4389 # Auto-detect PulseAudio support
4390 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4391 if [ -n "$PKG_CONFIG" ]; then
4392 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4393 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4395 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
4397 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4398 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4400 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4401 echo "PulseAudio support cannot be enabled due to functionality tests!"
4402 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4403 echo " If you believe this message is in error you may use the continue"
4404 echo " switch (-continue) to $0 to continue."
4413 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4414 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4415 if [ "$CFG_GUI" = "no" ]; then
4416 if [ "$CFG_OPENGL" = "auto" ]; then
4419 if [ "$CFG_OPENGL" != "no" ]; then
4420 echo "OpenGL enabled, but GUI disabled."
4421 echo " You might need to either enable the GUI or disable OpenGL"
4425 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4426 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
4428 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
4431 if [ "$CFG_OPENGL" = "yes" ]; then
4432 echo "All the OpenGL functionality tests failed!"
4433 echo " You might need to modify the include and library search paths by editing"
4434 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4435 echo " ${XQMAKESPEC}."
4442 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4443 if [ "$CFG_OPENGL" = "desktop" ]; then
4444 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4445 if [ $? != "0" ]; then
4446 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4453 elif [ "$CFG_OPENGL" = "es2" ]; then
4455 "$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
4456 if [ $? != "0" ]; then
4457 echo "The OpenGL ES 2.0 functionality test failed!"
4458 echo " You might need to modify the include and library search paths by editing"
4459 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4460 echo " ${XQMAKESPEC}."
4463 elif [ "$CFG_OPENGL" = "desktop" ]; then
4464 # Desktop OpenGL support
4465 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4466 if [ $? != "0" ]; then
4467 echo "The OpenGL functionality test failed!"
4468 echo " You might need to modify the include and library search paths by editing"
4469 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4470 echo " ${XQMAKESPEC}."
4475 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4476 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4477 if [ $? != "0" ]; then
4478 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4485 fi # X11/MINGW OpenGL
4487 if [ "$BUILD_ON_MAC" = "yes" ]; then
4488 if [ "$CFG_PHONON" != "no" ]; then
4489 # Always enable Phonon (unless it was explicitly disabled)
4493 if [ "$CFG_COREWLAN" = "auto" ]; then
4494 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
4502 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4503 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4504 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
4506 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
4509 if [ "$CFG_OPENGL" = "yes" ]; then
4510 echo "All the OpenGL functionality tests failed!"
4511 echo " You might need to modify the include and library search paths by editing"
4512 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4513 echo " ${XQMAKESPEC}."
4518 elif [ "$CFG_OPENGL" = "es2" ]; then
4520 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4521 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4522 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4523 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4524 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4525 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4526 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4527 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4530 "$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
4531 if [ $? != "0" ]; then
4532 echo "The OpenGL ES 2.0 functionality test failed!"
4533 echo " You might need to modify the include and library search paths by editing"
4534 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4535 echo " ${XQMAKESPEC}."
4538 elif [ "$CFG_OPENGL" = "desktop" ]; then
4539 # Desktop OpenGL support
4540 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4541 if [ $? != "0" ]; then
4542 echo "The OpenGL functionality test failed!"
4543 echo " You might need to modify the include and library search paths by editing"
4544 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4545 echo " ${XQMAKESPEC}."
4550 # auto-detect FontConfig support
4551 if [ "$CFG_FONTCONFIG" != "no" ]; then
4552 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4553 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4554 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4556 QT_CFLAGS_FONTCONFIG=
4557 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4559 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
4560 QT_CONFIG="$QT_CONFIG fontconfig"
4561 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4562 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4564 CFG_LIBFREETYPE=system
4571 # Save these for a check later
4572 ORIG_CFG_XCB="$CFG_XCB"
4573 ORIG_CFG_EGLFS="$CFG_EGLFS"
4574 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4576 if [ "$CFG_LIBUDEV" != "no" ]; then
4577 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4578 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4579 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4580 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4581 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4583 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
4585 QT_CONFIG="$QT_CONFIG libudev"
4586 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4587 echo "The libudev functionality test failed!"
4591 QMakeVar add DEFINES QT_NO_LIBUDEV
4595 if [ "$CFG_EVDEV" != "no" ]; then
4596 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
4598 QT_CONFIG="$QT_CONFIG evdev"
4599 elif [ "$CFG_EVDEV" = "yes" ]; then
4600 echo "The evdev functionality test failed!"
4604 QMakeVar add DEFINES QT_NO_EVDEV
4608 # Check we actually have X11 :-)
4609 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
4610 QT_CONFIG="$QT_CONFIG xlib"
4613 # auto-detect Xrender support
4614 if [ "$CFG_XRENDER" != "no" ]; then
4615 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
4617 QT_CONFIG="$QT_CONFIG xrender"
4619 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4620 echo "Xrender support cannot be enabled due to functionality tests!"
4621 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4622 echo " If you believe this message is in error you may use the continue"
4623 echo " switch (-continue) to $0 to continue."
4631 if [ "$CFG_XCB" != "no" ]; then
4632 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4633 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4634 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4636 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
4638 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
4639 QT_CONFIG="$QT_CONFIG xcb-render"
4642 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
4644 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4647 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
4648 QT_CONFIG="$QT_CONFIG xcb-xlib"
4651 # auto-detect XInput2 support. Needed by xcb too.
4652 if [ "$CFG_XINPUT2" != "no" ]; then
4653 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
4657 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4658 echo "XInput2 support cannot be enabled due to functionality tests!"
4659 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4660 echo " If you believe this message is in error you may use the continue"
4661 echo " switch (-continue) to $0 to continue."
4669 if [ "$CFG_XCB" = "yes" ]; then
4670 echo "The XCB test failed!"
4671 echo " You might need to install dependency packages."
4672 echo " See src/plugins/platforms/xcb/README."
4676 QMakeVar add DEFINES QT_NO_XCB
4680 if [ "$CFG_DIRECTFB" != "no" ]; then
4681 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4682 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4683 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4684 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
4686 elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4687 echo " DirectFB support cannot be enabled due to functionality tests!"
4688 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4689 echo " If you believe this message is in error you may use the continue"
4690 echo " switch (-continue) to $0 to continue."
4700 # Detect libxkbcommon
4701 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4702 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4703 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4704 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4705 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4707 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4711 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4712 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4713 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4714 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4715 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4716 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4717 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4718 fi # detect EGL support
4719 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
4721 elif [ "$CFG_EGL" = "yes" ]; then
4722 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4723 echo " You might need to modify the include and library search paths by editing"
4724 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4729 elif [ "$CFG_OPENGL" = "desktop" ]; then
4730 if [ "$CFG_EGL" = "yes" ]; then
4731 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4732 echo "Either disable EGL support or enable OpenGL ES support."
4738 if [ "$CFG_EGLFS" != "no" ]; then
4739 if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_EVDEV" = "yes" ]; then
4740 CFG_EGLFS="$CFG_EGL"
4746 # Determine the default QPA platform
4747 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4749 QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
4750 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4751 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4752 QT_QPA_DEFAULT_PLATFORM="windows"
4753 elif [ "$BUILD_ON_MAC" = "yes" ]; then
4754 QT_QPA_DEFAULT_PLATFORM="cocoa"
4755 elif [ "$UNAME_SYSTEM" = "QNX" ]; then
4756 QT_QPA_DEFAULT_PLATFORM="qnx"
4758 QT_QPA_DEFAULT_PLATFORM="xcb"
4763 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4764 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4765 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4766 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4768 if [ "$CFG_DIRECTFB" = "yes" ]; then
4769 QT_CONFIG="$QT_CONFIG directfb"
4770 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4771 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4774 if [ "$BUILD_ON_MAC" = "yes" ]; then
4775 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
4776 QT_CONFIG="$QT_CONFIG coreservices"
4778 QMakeVar add DEFINES QT_NO_CORESERVICES
4782 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
4783 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4784 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4785 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4786 echo "No QPA platform plugin enabled!"
4787 echo " If you really want to build without a QPA platform plugin you must pass"
4788 echo " -no-qpa-platform-guard to configure. Doing this will"
4789 echo " produce a Qt that can not run GUI applications."
4790 echo " The dependencies needed for xcb to build are listed in"
4791 echo " src/plugins/platforms/xcb/README"
4797 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4800 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4801 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4802 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
4803 CFG_LIBFREETYPE=system
4809 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS &&
4810 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4811 echo "STL functionality check failed! Cannot build Qt with this STL library."
4812 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4817 # detect POSIX clock_gettime()
4818 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4819 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
4820 CFG_CLOCK_GETTIME=yes
4822 CFG_CLOCK_GETTIME=no
4826 # detect POSIX monotonic clocks
4827 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4828 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
4829 CFG_CLOCK_MONOTONIC=yes
4831 CFG_CLOCK_MONOTONIC=no
4833 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4834 CFG_CLOCK_MONOTONIC=no
4838 if [ "$CFG_MREMAP" = "auto" ]; then
4839 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
4846 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4847 if [ "$CFG_GETADDRINFO" != "no" ]; then
4848 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
4851 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4852 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4853 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4854 echo " If you believe this message is in error you may use the continue"
4855 echo " switch (-continue) to $0 to continue."
4863 # find if the platform provides inotify
4864 if [ "$CFG_INOTIFY" != "no" ]; then
4865 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
4868 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4869 echo "inotify support cannot be enabled due to functionality tests!"
4870 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4871 echo " If you believe this message is in error you may use the continue"
4872 echo " switch (-continue) to $0 to continue."
4880 # find if the platform provides if_nametoindex (ipv6 interface name support)
4881 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4882 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
4885 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4886 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4887 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4888 echo " If you believe this message is in error you may use the continue"
4889 echo " switch (-continue) to $0 to continue."
4897 # find if the platform provides getifaddrs (network interface enumeration)
4898 if [ "$CFG_GETIFADDRS" != "no" ]; then
4899 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
4902 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4903 echo "getifaddrs support cannot be enabled due to functionality tests!"
4904 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4905 echo " If you believe this message is in error you may use the continue"
4906 echo " switch (-continue) to $0 to continue."
4915 if [ "$CFG_OPENSSL" != "no" ]; then
4916 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
4917 if [ "$CFG_OPENSSL" = "auto" ]; then
4921 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4922 echo "OpenSSL support cannot be enabled due to functionality tests!"
4923 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4924 echo " If you believe this message is in error you may use the continue"
4925 echo " switch (-continue) to $0 to continue."
4934 if [ "$CFG_PCRE" != "qt" ]; then
4935 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
4938 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4939 echo "PCRE support cannot be enabled due to functionality tests!"
4940 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4941 echo " If you believe this message is in error you may use the continue"
4942 echo " switch (-continue) to $0 to continue."
4950 # detect OpenVG support
4951 if [ "$CFG_OPENVG" != "no" ]; then
4952 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
4953 if [ "$CFG_OPENVG" = "auto" ]; then
4956 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
4957 if [ "$CFG_OPENVG" = "auto" ]; then
4960 CFG_OPENVG_ON_OPENGL=yes
4961 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
4962 if [ "$CFG_OPENVG" = "auto" ]; then
4965 CFG_OPENVG_LC_INCLUDES=yes
4966 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
4967 if [ "$CFG_OPENVG" = "auto" ]; then
4970 CFG_OPENVG_LC_INCLUDES=yes
4971 CFG_OPENVG_ON_OPENGL=yes
4973 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4974 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4975 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4976 echo " If you believe this message is in error you may use the continue"
4977 echo " switch (-continue) to $0 to continue."
4983 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
4984 CFG_OPENVG_SHIVA=yes
4988 if [ "$CFG_ALSA" = "auto" ]; then
4989 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
4996 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4997 if [ "$CFG_ARCH" = "arm" ]; then
4998 "$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
4999 if [ $? != "0" ]; then
5000 CFG_JAVASCRIPTCORE_JIT=no
5003 case "$XPLATFORM" in
5005 CFG_JAVASCRIPTCORE_JIT=no
5011 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5012 QMakeVar set JAVASCRIPTCORE_JIT yes
5013 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5014 QMakeVar set JAVASCRIPTCORE_JIT no
5017 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5018 CFG_AUDIO_BACKEND=yes
5021 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5022 echo "Warning: largefile support cannot be disabled for win32."
5026 #-------------------------------------------------------------------------------
5027 # ask for all that hasn't been auto-detected or specified in the arguments
5028 #-------------------------------------------------------------------------------
5030 [ "$CFG_CXX11" = "yes" ] && QT_CONFIG="$QT_CONFIG c++11"
5033 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5034 QT_CONFIG="$QT_CONFIG phonon-backend"
5037 # disable accessibility
5038 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5039 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5041 QT_CONFIG="$QT_CONFIG accessibility"
5045 if [ "$CFG_EGL" = "yes" ]; then
5046 QT_CONFIG="$QT_CONFIG egl"
5048 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5052 if [ "$CFG_EGLFS" = "yes" ]; then
5053 QT_CONFIG="$QT_CONFIG eglfs"
5055 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5059 if [ "$CFG_OPENVG" = "no" ]; then
5060 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5062 QT_CONFIG="$QT_CONFIG openvg"
5063 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5064 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5066 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5067 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5069 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5070 QT_CONFIG="$QT_CONFIG shivavg"
5071 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5076 if [ "$CFG_OPENGL" = "no" ]; then
5077 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5079 QT_CONFIG="$QT_CONFIG opengl"
5082 if [ "$CFG_OPENGL" = "es2" ]; then
5083 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5086 if [ "$CFG_OPENGL" = "es2" ]; then
5087 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5088 QT_CONFIG="$QT_CONFIG opengles2"
5091 # safe execution environment
5092 if [ "$CFG_SXE" != "no" ]; then
5093 QT_CONFIG="$QT_CONFIG sxe"
5096 # build up the variables for output
5097 if [ "$CFG_DEBUG" = "yes" ]; then
5098 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5099 elif [ "$CFG_DEBUG" = "no" ]; then
5100 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5102 if [ "$CFG_SHARED" = "yes" ]; then
5103 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5104 QT_CONFIG="$QT_CONFIG shared"
5105 elif [ "$CFG_SHARED" = "no" ]; then
5106 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5107 QT_CONFIG="$QT_CONFIG static"
5110 #FIXME: qpa is implicit this should all be removed
5111 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5112 QT_CONFIG="$QT_CONFIG qpa"
5113 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5114 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5116 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5117 # Do not set this here for Windows. Let qmake do it so
5118 # debug and release precompiled headers are kept separate.
5119 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5121 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5122 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5123 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5124 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5125 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5126 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5128 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5129 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5131 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5132 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5133 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5134 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5135 QMakeVar add QMAKE_CFLAGS -g
5136 QMakeVar add QMAKE_CXXFLAGS -g
5137 QT_CONFIG="$QT_CONFIG separate_debug_info"
5139 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5140 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5142 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5143 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5144 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5145 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5146 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5147 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5148 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5149 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5150 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5151 if [ "$CFG_ARCH" = "mips" ]; then
5152 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5153 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5155 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5156 QT_CONFIG="$QT_CONFIG clock-gettime"
5158 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5159 QT_CONFIG="$QT_CONFIG clock-monotonic"
5161 if [ "$CFG_MREMAP" = "yes" ]; then
5162 QT_CONFIG="$QT_CONFIG mremap"
5164 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5165 QT_CONFIG="$QT_CONFIG getaddrinfo"
5167 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5168 QT_CONFIG="$QT_CONFIG ipv6ifname"
5170 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5171 QT_CONFIG="$QT_CONFIG getifaddrs"
5173 if [ "$CFG_INOTIFY" = "yes" ]; then
5174 QT_CONFIG="$QT_CONFIG inotify"
5176 if [ "$CFG_LIBJPEG" = "no" ]; then
5178 elif [ "$CFG_LIBJPEG" = "system" ]; then
5179 QT_CONFIG="$QT_CONFIG system-jpeg"
5181 if [ "$CFG_JPEG" = "no" ]; then
5182 QT_CONFIG="$QT_CONFIG no-jpeg"
5183 elif [ "$CFG_JPEG" = "yes" ]; then
5184 QT_CONFIG="$QT_CONFIG jpeg"
5186 if [ "$CFG_LIBPNG" = "no" ]; then
5189 if [ "$CFG_LIBPNG" = "system" ]; then
5190 QT_CONFIG="$QT_CONFIG system-png"
5192 if [ "$CFG_PNG" = "no" ]; then
5193 QT_CONFIG="$QT_CONFIG no-png"
5194 elif [ "$CFG_PNG" = "yes" ]; then
5195 QT_CONFIG="$QT_CONFIG png"
5197 if [ "$CFG_GIF" = "no" ]; then
5198 QT_CONFIG="$QT_CONFIG no-gif"
5199 elif [ "$CFG_GIF" = "yes" ]; then
5200 QT_CONFIG="$QT_CONFIG gif"
5202 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5203 QT_CONFIG="$QT_CONFIG no-freetype"
5204 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5205 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5206 QT_CONFIG="$QT_CONFIG system-freetype"
5208 QT_CONFIG="$QT_CONFIG freetype"
5210 if [ "$CFG_GUI" = "auto" ]; then
5213 if [ "$CFG_GUI" = "no" ]; then
5214 QT_CONFIG="$QT_CONFIG no-gui"
5217 if [ "$CFG_WIDGETS" = "no" ]; then
5218 QT_CONFIG="$QT_CONFIG no-widgets"
5219 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5222 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5223 #On Mac we implicitly link against libz, so we
5224 #never use the 3rdparty stuff.
5225 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5227 if [ "$CFG_ZLIB" = "yes" ]; then
5228 QT_CONFIG="$QT_CONFIG zlib"
5229 elif [ "$CFG_ZLIB" = "system" ]; then
5230 QT_CONFIG="$QT_CONFIG system-zlib"
5233 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5234 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5235 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5236 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5237 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5238 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5239 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5240 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5241 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5242 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5243 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5244 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5245 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5246 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5248 [ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES"
5249 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5250 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5252 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5253 if [ "$CFG_RPATH" = "yes" ]; then
5254 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5255 # set the default rpath to the library installation directory
5256 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5258 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5259 if [ -n "$RPATH_FLAGS" ]; then
5261 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5265 elif [ "$CFG_RPATH" = "yes" ]; then
5266 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5270 if [ "$CFG_RPATH" = "yes" ]; then
5271 # set the default rpath to the library installation directory
5272 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5274 if [ -n "$RPATH_FLAGS" ]; then
5275 # add the user defined rpaths
5276 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5280 if [ '!' -z "$I_FLAGS" ]; then
5281 # add the user define include paths
5282 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5283 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5286 if [ '!' -z "$W_FLAGS" ]; then
5287 # add the user defined warning flags
5288 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5289 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5290 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5293 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5294 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5295 # Follow default behavior of configure.exe by overriding with "rtti".
5296 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5299 if [ "$CFG_ALSA" = "yes" ]; then
5300 QT_CONFIG="$QT_CONFIG alsa"
5303 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5304 QT_CONFIG="$QT_CONFIG pulseaudio"
5307 if [ "$CFG_COREWLAN" = "yes" ]; then
5308 QT_CONFIG="$QT_CONFIG corewlan"
5311 if [ "$CFG_ICU" = "yes" ]; then
5312 QT_CONFIG="$QT_CONFIG icu"
5315 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5316 QT_CONFIG="$QT_CONFIG force_asserts"
5319 if [ "$CFG_PCRE" = "qt" ]; then
5320 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5324 # Some Qt modules are too advanced in C++ for some old compilers
5325 # Detect here the platforms where they are known to work.
5327 # See Qt documentation for more information on which features are
5328 # supported and on which compilers.
5330 canBuildQtConcurrent="yes"
5331 canUseV8Snapshot="yes"
5333 case "$XPLATFORM" in
5335 # PA-RISC's assembly is too limited
5336 # gcc 3.4 on that platform can't build QtXmlPatterns
5337 # the assembly it generates cannot be compiled
5339 # Check gcc's version
5340 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5344 canBuildQtXmlPatterns="no"
5348 canBuildQtXmlPatterns="no"
5352 unsupported/vxworks-*-g++*)
5355 unsupported/vxworks-*-dcc*)
5357 canBuildQtXmlPatterns="no"
5360 # Check gcc's version
5361 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5369 canBuildQtXmlPatterns="no"
5374 # Check the compiler version
5375 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5378 canBuildQtXmlPatterns="no"
5379 canBuildQtConcurrent="no"
5383 canBuildQtConcurrent="no"
5389 canBuildQtXmlPatterns="no"
5390 canBuildQtConcurrent="no"
5396 # Get the xlC version
5397 cat > xlcver.c <<EOF
5401 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5406 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5407 xlcver=`./xlcver 2>/dev/null`
5410 if [ "$OPT_VERBOSE" = "yes" ]; then
5411 if [ -n "$xlcver" ]; then
5412 echo Found IBM xlC version: $xlcver.
5414 echo Could not determine IBM xlC version, assuming oldest supported.
5421 canBuildQtXmlPatterns="no"
5422 canBuildQtConcurrent="no"
5426 canBuildQtConcurrent="no"
5432 canBuildQtConcurrent="no"
5436 if [ "$CFG_GUI" = "no" ]; then
5437 # WebKit requires QtGui
5441 if [ "$CFG_SHARED" = "no" ]; then
5443 echo "WARNING: Using static linking will disable the WebKit module."
5448 CFG_CONCURRENT="yes"
5449 if [ "$canBuildQtConcurrent" = "no" ]; then
5450 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5453 QT_CONFIG="$QT_CONFIG concurrent"
5457 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5458 QT_CONFIG="$QT_CONFIG audio-backend"
5462 if [ "$CFG_WEBKIT" = "debug" ]; then
5463 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5467 QT_CONFIG="$QT_CONFIG v8"
5468 # Detect snapshot support
5469 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5470 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5473 *) canUseV8Snapshot="no"
5477 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5478 # QEMU crashes when building inside Scratchbox with an ARM target
5479 canUseV8Snapshot="no"
5482 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5483 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5485 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5486 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5489 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5490 QT_CONFIG="$QT_CONFIG v8snapshot"
5494 if [ "$CFG_QML_DEBUG" = "no" ]; then
5495 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5498 case "$QMAKE_CONF_COMPILER" in
5501 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5503 case "$COMPILER_VERSION" in
5505 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5506 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5507 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5510 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5511 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5512 QT_GCC_PATCH_VERSION=0
5522 #-------------------------------------------------------------------------------
5523 # part of configuration information goes into qconfig.h
5524 #-------------------------------------------------------------------------------
5526 case "$CFG_QCONFIG" in
5528 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5531 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5532 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5533 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5534 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5535 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5536 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5538 echo "#endif" >>"$tmpconfig"
5542 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5546 # define QT_EDITION $QT_EDITION
5550 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5551 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5553 if [ "$CFG_SHARED" = "no" ]; then
5554 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5555 /* Qt was configured for a static build */
5556 #if !defined(QT_SHARED) && !defined(QT_STATIC)
5563 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5564 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5567 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5568 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5571 if [ "$BUILD_ON_MAC" = "yes" ]; then
5572 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5573 #if defined(__LP64__)
5574 # define QT_POINTER_SIZE 8
5576 # define QT_POINTER_SIZE 4
5580 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5581 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5584 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5585 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5586 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5590 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5592 if [ "$CFG_DEV" = "yes" ]; then
5593 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5596 # Add QPA to config.h
5597 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5599 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5600 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5603 # Add turned on SQL drivers
5604 for DRIVER in $CFG_SQL_AVAILABLE; do
5605 eval "VAL=\$CFG_SQL_$DRIVER"
5608 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5609 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5610 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5613 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5619 QMakeVar set sql-drivers "$SQL_DRIVERS"
5620 QMakeVar set sql-plugins "$SQL_PLUGINS"
5622 # Add other configuration options to the qconfig.h file
5623 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5624 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5625 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5626 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5627 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5628 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5630 # X11/Unix/Mac only configs
5631 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5632 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5633 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5634 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5635 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5636 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5637 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5638 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5639 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5640 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5641 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5642 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5643 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5644 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5646 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5647 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5648 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5649 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5650 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5651 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5652 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5653 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5654 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5655 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5656 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5657 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5658 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5660 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5661 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5662 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5663 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5664 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5665 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5666 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5667 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5669 # sort QCONFIG_FLAGS for neatness if we can
5670 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5671 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5673 if [ -n "$QCONFIG_FLAGS" ]; then
5674 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5675 #ifndef QT_BOOTSTRAPPED
5678 for cfg in $QCONFIG_FLAGS; do
5679 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5680 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5681 # figure out define logic, so we can output the correct
5682 # ifdefs to override the global defines in a project
5684 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5685 # QT_NO_option can be forcefully turned on by QT_option
5686 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5687 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5688 # QT_option can be forcefully turned off by QT_NO_option
5689 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5692 if [ -z $cfgdNeg ]; then
5693 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5700 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5701 #if defined($cfgd) && defined($cfgdNeg)
5703 #elif !defined($cfgd) && !defined($cfgdNeg)
5710 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5711 #endif // QT_BOOTSTRAPPED
5716 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5717 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5718 #define QT_VISIBILITY_AVAILABLE
5723 if [ -n "$QT_LIBINFIX" ]; then
5724 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5725 #define QT_LIBINFIX "$QT_LIBINFIX"
5730 echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5732 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5733 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5734 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5736 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5737 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5738 chmod -w "$outpath/src/corelib/global/qconfig.h"
5739 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5740 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5744 #-------------------------------------------------------------------------------
5745 # save configuration into qconfig.pri
5746 #-------------------------------------------------------------------------------
5747 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5748 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5749 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5750 if [ "$CFG_DEBUG" = "yes" ]; then
5751 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5752 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5753 QT_CONFIG="$QT_CONFIG release"
5755 QT_CONFIG="$QT_CONFIG debug"
5756 elif [ "$CFG_DEBUG" = "no" ]; then
5757 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5758 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5759 QT_CONFIG="$QT_CONFIG debug"
5761 QT_CONFIG="$QT_CONFIG release"
5763 if [ "$CFG_FRAMEWORK" = "no" ]; then
5764 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5766 QT_CONFIG="$QT_CONFIG qt_framework"
5767 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5769 if [ "$CFG_DEV" = "yes" ]; then
5770 QT_CONFIG="$QT_CONFIG private_tests"
5773 cat >>"$QTCONFIG.tmp" <<EOF
5775 CONFIG += $QTCONFIG_CONFIG
5777 QT_HOST_ARCH = $CFG_HOST_ARCH
5778 QT_CPU_FEATURES = $CFG_CPUFEATURES
5779 QT_HOST_CPU_FEATURES = $CFG_HOST_CPUFEATURES
5780 QT_EDITION = $Edition
5781 QT_CONFIG += $QT_CONFIG
5784 QT_VERSION = $QT_VERSION
5785 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5786 QT_MINOR_VERSION = $QT_MINOR_VERSION
5787 QT_PATCH_VERSION = $QT_PATCH_VERSION
5790 QT_LIBINFIX = $QT_LIBINFIX
5791 QT_NAMESPACE = $QT_NAMESPACE
5795 if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
5796 echo "# pkgconfig" >> "$QTCONFIG.tmp"
5797 echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
5798 echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp"
5799 echo >> "$QTCONFIG.tmp"
5802 if [ -n "$CFG_SYSROOT" ]; then
5803 echo "# sysroot" >>"$QTCONFIG.tmp"
5804 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5805 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5806 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5807 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5808 echo "}" >> "$QTCONFIG.tmp"
5809 echo >> "$QTCONFIG.tmp"
5811 if [ -n "$RPATH_FLAGS" ]; then
5812 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5814 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5815 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5816 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5817 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5820 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5821 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5822 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5825 # replace qconfig.pri if it differs from the newly created temp file
5826 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5827 rm -f "$QTCONFIG.tmp"
5829 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5832 #-------------------------------------------------------------------------------
5833 # save configuration into qmodule.pri
5834 #-------------------------------------------------------------------------------
5835 QTMODULE="$outpath/mkspecs/qmodule.pri"
5837 echo "CONFIG += $QMAKE_CONFIG create_prl link_prl" >> "$QTMODULE.tmp"
5839 # Ensure we can link to uninistalled libraries
5840 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5841 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5843 if [ -n "$QT_CFLAGS_PSQL" ]; then
5844 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5846 if [ -n "$QT_LFLAGS_PSQL" ]; then
5847 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5849 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5850 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5852 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5853 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5855 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5856 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5858 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5859 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5861 if [ -n "$QT_LFLAGS_ODBC" ]; then
5862 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5864 if [ -n "$QT_LFLAGS_TDS" ]; then
5865 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5868 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5869 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5872 #dump in the OPENSSL_LIBS info
5873 if [ '!' -z "$OPENSSL_LIBS" ]; then
5874 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5875 elif [ "$CFG_OPENSSL" = "linked" ]; then
5876 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5879 #dump in the SDK info
5880 if [ '!' -z "$CFG_SDK" ]; then
5881 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5885 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5886 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5888 # replace qmodule.pri if it differs from the newly created temp file
5889 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5890 rm -f "$QTMODULE.tmp"
5892 mv -f "$QTMODULE.tmp" "$QTMODULE"
5895 #-------------------------------------------------------------------------------
5896 # save configuration into .qmake.cache
5897 #-------------------------------------------------------------------------------
5899 CACHEFILE="$outpath/.qmake.cache"
5900 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5901 cat >>"$CACHEFILE.tmp" <<EOF
5903 QT_SOURCE_TREE = \$\$quote($relpath)
5904 QT_BUILD_TREE = \$\$quote($outpath)
5905 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5907 include(\$\$PWD/mkspecs/qmodule.pri)
5908 CONFIG += dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5912 #dump the qmake spec
5913 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5914 echo "XQMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5916 echo "XQMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5918 if [ -d "$outpath/mkspecs/$PLATFORM" ]; then
5919 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$PLATFORM" >> "$CACHEFILE.tmp"
5921 echo "QMAKESPEC = $PLATFORM" >> "$CACHEFILE.tmp"
5924 # replace .qmake.cache if it differs from the newly created temp file
5925 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5926 rm -f "$CACHEFILE.tmp"
5928 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5931 #-------------------------------------------------------------------------------
5932 # give feedback on configuration
5933 #-------------------------------------------------------------------------------
5934 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5937 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5938 echo "Build type: $PLATFORM"
5940 echo "Building on: $PLATFORM"
5941 echo "Building for: $XPLATFORM"
5944 # the missing space before $CFG_FEATURES is intentional
5945 echo "Architecture: $CFG_ARCH, features:$CFG_CPUFEATURES"
5946 echo "Host architecture: $CFG_HOST_ARCH, features:$CFG_HOST_CPUFEATURES"
5948 if [ -n "$PLATFORM_NOTES" ]; then
5949 echo "Platform notes:"
5950 echo "$PLATFORM_NOTES"
5955 if [ "$OPT_VERBOSE" = "yes" ]; then
5956 echo $ECHO_N "qmake vars .......... $ECHO_C"
5957 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5958 echo "qmake switches ......... $QMAKE_SWITCHES"
5961 echo "Build .................. $CFG_BUILD_PARTS"
5962 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5963 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5964 echo "Debug .................. yes (combined)"
5965 if [ "$CFG_DEBUG" = "yes" ]; then
5966 echo "Default Link ........... debug"
5968 echo "Default Link ........... release"
5971 echo "Debug .................. $CFG_DEBUG"
5973 echo "C++11 support .......... $CFG_CXX11"
5974 if [ -n "$PKG_CONFIG" ]; then
5975 echo "pkg-config ............. yes"
5977 echo "pkg-config ............. no"
5979 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5980 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5981 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5982 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5983 echo "QtGui module ........... $CFG_GUI"
5984 echo "QtWidgets module ....... $CFG_WIDGETS"
5985 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5986 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5988 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5990 echo "QML debugging .......... $CFG_QML_DEBUG"
5991 echo "PCH support ............ $CFG_PRECOMPILE"
5992 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5993 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5994 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5995 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5996 elif [ "$CFG_ARCH" = "arm" ]; then
5997 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5998 echo "NEON support ........... ${CFG_NEON}"
6000 if [ "$CFG_ARCH" = "mips" ]; then
6001 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
6003 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6004 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6005 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6006 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6007 echo "NIS support ............ $CFG_NIS"
6008 echo "CUPS support ........... $CFG_CUPS"
6009 echo "Iconv support .......... $CFG_ICONV"
6010 echo "Glib support ........... $CFG_GLIB"
6011 echo "GStreamer support ...... $CFG_GSTREAMER"
6012 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6013 echo "Large File support ..... $CFG_LARGEFILE"
6014 echo "GIF support ............ $CFG_GIF"
6015 if [ "$CFG_JPEG" = "no" ]; then
6016 echo "JPEG support ........... $CFG_JPEG"
6018 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6020 if [ "$CFG_PNG" = "no" ]; then
6021 echo "PNG support ............ $CFG_PNG"
6023 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6025 echo "zlib support ........... $CFG_ZLIB"
6026 echo "Session management ..... $CFG_SM"
6027 echo "libudev support ........ $CFG_LIBUDEV"
6029 if [ "$CFG_OPENGL" = "desktop" ]; then
6030 echo "OpenGL support ......... yes (Desktop OpenGL)"
6031 elif [ "$CFG_OPENGL" = "es2" ]; then
6032 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6034 echo "OpenGL support ......... no"
6037 if [ "$CFG_OPENVG" ]; then
6038 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6039 echo "OpenVG support ......... ShivaVG"
6041 echo "OpenVG support ......... $CFG_OPENVG"
6045 echo "XShape support ......... $CFG_XSHAPE"
6046 echo "XVideo support ......... $CFG_XVIDEO"
6047 echo "XSync support .......... $CFG_XSYNC"
6048 echo "Xinerama support ....... $CFG_XINERAMA"
6049 echo "Xcursor support ........ $CFG_XCURSOR"
6050 echo "Xfixes support ......... $CFG_XFIXES"
6051 echo "Xrandr support ......... $CFG_XRANDR"
6052 echo "Xi support ............. $CFG_XINPUT"
6053 echo "Xi2 support ............ $CFG_XINPUT2"
6054 echo "MIT-SHM support ........ $CFG_MITSHM"
6055 echo "FontConfig support ..... $CFG_FONTCONFIG"
6056 echo "XKB Support ............ $CFG_XKB"
6057 echo "immodule support ....... $CFG_IM"
6058 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6060 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6061 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6062 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6063 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6064 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6065 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6066 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6067 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6068 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6071 if [ "$CFG_OPENSSL" = "yes" ]; then
6072 OPENSSL_LINKAGE="(run-time)"
6073 elif [ "$CFG_OPENSSL" = "linked" ]; then
6074 OPENSSL_LINKAGE="(linked)"
6076 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6077 echo "Alsa support ........... $CFG_ALSA"
6078 if [ "$BUILD_ON_MAC" = "yes" ]; then
6079 echo "CoreWlan support ....... $CFG_COREWLAN"
6081 echo "libICU support ......... $CFG_ICU"
6082 echo "PCRE support ........... $CFG_PCRE"
6083 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6084 echo "Xcb support ............ limited (old version)"
6086 echo "Xcb support ............ $CFG_XCB"
6088 echo "Xrender support ........ $CFG_XRENDER"
6089 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6090 echo "XInput2 support ........ $CFG_XINPUT2"
6092 echo "EGLFS support .......... $CFG_EGLFS"
6093 echo "DirectFB support ....... $CFG_DIRECTFB"
6096 # complain about not being able to use dynamic plugins if we are using a static build
6097 if [ "$CFG_SHARED" = "no" ]; then
6099 echo "WARNING: Using static linking will disable the use of dynamically"
6100 echo "loaded plugins. Make sure to import all needed static plugins,"
6101 echo "or compile needed modules into the library."
6104 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6106 echo "NOTE: When linking against OpenSSL, you can override the default"
6107 echo "library names through OPENSSL_LIBS."
6109 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6113 exec 1>&3 3>&- # restore stdout
6114 cat $outpath/config.summary # display config feedback to user
6116 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6118 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6119 echo "if you want a pure debug build."
6124 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6129 #-------------------------------------------------------------------------------
6130 # build makefiles based on the configuration
6131 #-------------------------------------------------------------------------------
6133 if [ "$CFG_NOPROCESS" != "yes" ]; then
6134 echo "Creating makefiles. Please wait..."
6135 "$outpath/bin/qmake" -r ${OPT_FAST+CONFIG+=fast} "$relpath"
6138 if [ "$OPT_FAST" = "yes" ]; then
6140 for part in $CFG_BUILD_PARTS; do
6142 examples|tests) PART_ROOTS="$PART_ROOTS $part" ;;
6145 if [ "x$PART_ROOTS" != "x" ]; then
6147 echo "Creating stub makefiles. Please wait..."
6148 QMAKE="$outpath/bin/qmake"
6149 [ "$CFG_DEBUG_RELEASE" = "no" ] && first_tgt="first_target: first" || first_tgt=
6150 (cd "$relpath" && find $PART_ROOTS -name '*.pro') | grep -v /testdata/ | while read p; do
6152 test -f "$outpath/$d/Makefile" && continue
6153 echo " for $relpath/$p"
6155 mkdir -p "$outpath/$d" || exit
6156 cat > "$outpath/$d/Makefile" <<EOF || exit
6157 # $outpath/$d/Makefile: generated by configure
6159 # WARNING: This makefile will be replaced with a real makefile.
6160 # All changes made to this file will be lost.
6165 all clean install qmake first Makefile: FORCE
6166 \$(QMAKE) $QMAKE_SWITCHES "$relpath/$p"
6176 #-------------------------------------------------------------------------------
6177 # check for platforms that we don't yet know about
6178 #-------------------------------------------------------------------------------
6179 if [ "$CFG_ARCH" = "unknown" ]; then
6182 NOTICE: configure was unable to determine the architecture
6183 for the $XQMAKESPEC target.
6185 Qt will not use a specialized implementation for any atomic
6186 operations. Instead a generic implemention based on either GCC
6187 intrinsics or C++11 std::atomic<T> will be used (when
6188 available). The generic implementations are generally as fast
6189 as and always as safe as a specialized implementation.
6191 If no generic implementation is available, Qt will use a
6192 fallback UNIX implementation which uses a single
6193 pthread_mutex_t to protect all atomic operations. This
6194 implementation is the slow (but safe) fallback implementation
6195 for architectures Qt does not yet support.
6199 #-------------------------------------------------------------------------------
6200 # check if the user passed the -no-zlib option, which is no longer supported
6201 #-------------------------------------------------------------------------------
6202 if [ -n "$ZLIB_FORCED" ]; then
6203 which_zlib="supplied"
6204 if [ "$CFG_ZLIB" = "system" ]; then
6210 NOTICE: The -no-zlib option was supplied but is no longer
6213 Qt now requires zlib support in all builds, so the -no-zlib
6214 option was ignored. Qt will be built using the $which_zlib
6219 #-------------------------------------------------------------------------------
6220 # check if the user passed the obsoleted -wayland or -no-wayland flag
6221 #-------------------------------------------------------------------------------
6222 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6225 NOTICE: The -wayland and -no-wayland flags are now obsolete
6227 All configuring of QtWayland plugin and QtCompositor happens in the module
6231 #-------------------------------------------------------------------------------
6232 # check if the user passed the obsoleted -arch or -host-arch options
6233 #-------------------------------------------------------------------------------
6234 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6237 NOTICE: The -arch and -host-arch options are obsolete.
6239 Qt now detects the target and host architectures based on compiler
6240 output. Qt will be built using $CFG_ARCH for the target architecture
6241 and $CFG_HOST_ARCH for the host architecture (note that these two
6242 will be the same unless you are cross-compiling).
6246 #-------------------------------------------------------------------------------
6247 # finally save the executed command to another script
6248 #-------------------------------------------------------------------------------
6249 if [ `basename $0` != "config.status" ]; then
6250 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6252 # add the system variables
6253 for varname in $SYSTEM_VARIABLES; do
6255 'if [ -n "\$'${varname}'" ]; then
6256 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6261 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6263 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6264 echo "#!/bin/sh" > "$outpath/config.status"
6265 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6266 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6267 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6268 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6269 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6270 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6271 echo "else" >> "$outpath/config.status"
6272 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6273 echo "fi" >> "$outpath/config.status"
6274 chmod +x "$outpath/config.status"
6277 if [ -n "$RPATH_MESSAGE" ]; then
6279 echo "$RPATH_MESSAGE"
6282 MAKE=`basename "$MAKE"`
6284 echo Qt is now configured for building. Just run \'$MAKE\'.
6285 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6286 echo Once everything is built, Qt is installed.
6287 echo You should not run \'$MAKE install\'.
6289 echo Once everything is built, you must run \'$MAKE install\'.
6290 echo Qt will be installed into $QT_INSTALL_PREFIX
6293 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.