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 "*$VAL*" | 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 '$VAL'. 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 '$VAL'"
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 yes options
923 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-directfb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon|-c++11)
924 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
927 #Qt style options that pass an argument
930 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
934 -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)
935 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
939 #Qt style complex options in one command
940 -enable-*|-disable-*)
941 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
942 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
944 #Qt Builtin/System style options
945 -no-*|-system-*|-qt-*)
946 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
947 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
949 #Options that cannot be generalized
956 # this option may or may not be followed by an argument
957 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
966 # this option may or may not be followed by an argument
967 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
975 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
976 # this option may or may not be followed by an argument
977 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
996 if [ "$1" = "-D" ]; then
1000 VAL=`echo $1 | sed 's,-D,,'`
1005 # this option may or may not be followed by an argument
1006 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1015 if [ "$1" = "-I" ]; then
1019 VAL=`echo $1 | sed 's,-I,,'`
1024 if [ "$1" = "-L" ]; then
1028 VAL=`echo $1 | sed 's,-L,,'`
1033 if [ "$1" = "-R" ]; then
1037 VAL=`echo $1 | sed 's,-R,,'`
1042 if [ "$1" = "-l" ]; then
1046 VAL=`echo $1 | sed 's,-l,,'`
1051 if [ "$1" = "-F" ]; then
1055 VAL=`echo $1 | sed 's,-F,,'`
1060 if [ "$1" = "-fw" ]; then
1064 VAL=`echo $1 | sed 's,-fw,,'`
1072 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1079 if [ "$UNKNOWN_ARG" = "yes" ]; then
1080 echo "$1: unknown argument"
1091 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1092 CFG_ACCESSIBILITY="$VAL"
1101 CFG_USE_GNUMAKE="$VAL"
1104 CFG_MYSQL_CONFIG="$VAL"
1107 QT_INSTALL_PREFIX="$VAL"
1110 QT_HOST_PREFIX="$VAL"
1119 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1120 CFG_PKGCONFIG="$VAL"
1126 CFG_PKGCONFIG="force"
1129 QT_INSTALL_DOCS="$VAL"
1132 QT_INSTALL_HEADERS="$VAL"
1135 QT_INSTALL_PLUGINS="$VAL"
1138 QT_INSTALL_IMPORTS="$VAL"
1141 QT_INSTALL_DATA="$VAL"
1144 QT_INSTALL_LIBS="$VAL"
1153 QT_INSTALL_TRANSLATIONS="$VAL"
1155 sysconfdir|settingsdir)
1156 QT_INSTALL_SETTINGS="$VAL"
1159 QT_INSTALL_EXAMPLES="$VAL"
1162 QT_INSTALL_TESTS="$VAL"
1171 QT_INSTALL_BINS="$VAL"
1177 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1184 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1185 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1186 [ "$VAL" = "es2" ]; then
1193 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1200 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1203 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1206 if [ "$BUILD_ON_MAC" = "yes" ]; then
1213 OPT_OBSOLETE_HOST_ARG=yes
1216 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1217 CFG_MAC_HARFBUZZ="$VAL"
1224 if [ "$BUILD_ON_MAC" = "yes" ]; then
1225 CFG_FRAMEWORK="$VAL"
1231 if [ "$VAL" = "yes" ]; then
1233 QMakeVar add QMAKE_CFLAGS -pg
1234 QMakeVar add QMAKE_CXXFLAGS -pg
1235 QMakeVar add QMAKE_LFLAGS -pg
1236 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1242 if [ "$VAL" = "yes" ]; then
1243 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1248 # keep compatibility with old platform names
1254 PLATFORM=hpux-acc-o64
1257 PLATFORM=hpux-acc-64
1260 PLATFORM=hpux-acc-64
1272 PLATFORM=reliant-cds-64
1275 PLATFORM=solaris-cc-64
1278 PLATFORM=unixware-cc
1281 PLATFORM=unixware-g++
1284 PLATFORM=unixware-cc
1287 PLATFORM=unixware-g++
1293 i386) NATIVE_64_ARCH="x86_64" ;;
1294 powerpc) NATIVE_64_ARCH="ppc64" ;;
1295 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1297 if [ ! -z "$NATIVE_64_ARCH" ]; then
1298 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1305 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1308 XPLATFORM=`resolveDeviceMkspec $VAL`
1309 [ "$XPLATFORM" = "undefined" ] && exit 101
1312 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1313 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1314 DeviceVar set $DEV_VAR $DEV_VAL
1317 QT_QPA_DEFAULT_PLATFORM="$VAL"
1320 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1321 CFG_DEBUG_RELEASE="$VAL"
1327 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1328 CFG_RELEASE_QMAKE="$VAL"
1334 if [ "$VAL" = "yes" ]; then
1336 elif [ "$VAL" = "no" ]; then
1343 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1344 CFG_PREFIX_INSTALL="$VAL"
1352 developer-build|commercial|opensource)
1353 # These switches have been dealt with already
1356 if [ "$VAL" = "yes" ]; then
1358 elif [ "$VAL" = "no" ]; then
1365 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1366 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1372 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1373 if [ "$VAL" = "no" ]; then
1374 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1375 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1376 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1382 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1389 if [ "$VAL" = "no" ]; then
1396 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1404 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1411 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1418 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1425 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1432 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1439 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1446 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1453 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1454 CFG_PRECOMPILE="$VAL"
1459 separate-debug-info)
1460 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1461 CFG_SEPARATE_DEBUG_INFO="$VAL"
1462 elif [ "$VAL" = "nocopy" ] ; then
1463 CFG_SEPARATE_DEBUG_INFO="yes"
1464 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1470 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1471 CFG_REDUCE_EXPORTS="$VAL"
1477 if [ "$VAL" = "no" ]; then
1484 if [ "$VAL" = "no" ]; then
1491 if [ "$VAL" = "no" ]; then
1498 if [ "$VAL" = "no" ]; then
1505 if [ "$VAL" = "no" ]; then
1512 if [ "$VAL" = "no" ]; then
1519 if [ "$VAL" = "no" ]; then
1529 if [ "$VAL" = "no" ]; then
1536 if [ "$VAL" = "no" ]; then
1543 if [ "$VAL" = "no" ]; then
1544 CFG_MIPS_DSPR2="$VAL"
1550 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1551 CFG_REDUCE_RELOCATIONS="$VAL"
1557 [ "$VAL" = "qt" ] && VAL=yes
1558 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1563 # No longer supported:
1564 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1567 if [ "$VAL" = "system" ]; then
1574 [ "$VAL" = "yes" ] && VAL=qt
1575 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1582 [ "$VAL" = "yes" ] && VAL=qt
1583 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1590 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1597 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1604 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1611 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1618 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1625 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1626 CFG_FONTCONFIG="$VAL"
1632 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1639 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1646 CFG_OBSOLETE_WAYLAND=yes
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1656 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1663 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1684 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1691 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1698 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1699 CFG_GSTREAMER="$VAL"
1705 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1706 CFG_QGTKSTYLE="$VAL"
1712 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1715 if [ "$VAL" = "no" ]; then
1723 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1725 elif [ "$VAL" = "no" ]; then
1732 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1733 QPA_PLATFORM_GUARD="$VAL"
1739 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1741 elif [ "$VAL" = "runtime" ]; then
1748 if [ "$VAL" = "yes" ]; then
1755 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1762 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1763 CFG_LARGEFILE="$VAL"
1769 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1776 if [ "$VAL" = "yes" ]; then
1777 CFG_OPENSSL="linked"
1783 if [ "$VAL" = "yes" ]; then
1786 if [ "$VAL" = "no" ]; then
1794 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1795 CFG_JAVASCRIPTCORE_JIT="$VAL"
1801 if [ "$VAL" = "yes" ]; then
1802 OPT_CONFIRM_LICENSE="$VAL"
1808 if [ "$VAL" = "yes" ]; then
1814 sql-*|imageformat-*)
1815 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1816 # if autoconf style options were used, $VAL can be "yes" or "no"
1817 [ "$VAL" = "yes" ] && VAL=qt
1818 # now $VAL should be "no", "qt", or "plugin"... double-check
1819 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1822 # now $VAL is "no", "qt", or "plugin"
1824 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1825 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1827 # Grab the available values
1830 avail="$CFG_SQL_AVAILABLE"
1833 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1834 if [ "$OPT" != "plugin" ]; then
1835 # png is always built in
1841 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1845 # Check that that user's value is available.
1848 if [ "$VAL" = "$d" ]; then
1853 [ "$found" = yes ] || ERROR=yes
1855 if [ "$VAR" = "sql" ]; then
1856 # set the CFG_SQL_driver
1857 eval "CFG_SQL_$VAL=\$OPT"
1859 elif [ "$VAR" = "imageformat" ]; then
1860 [ "$OPT" = "qt" ] && OPT=yes
1861 VAL="`echo $VAL |tr a-z A-Z`"
1862 eval "CFG_$VAL=$OPT"
1866 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1867 if [ "$OPT" = "plugin" ]; then
1870 QMakeVar add "${VAR}s" "${VAL}"
1871 elif [ "$OPT" = "no" ]; then
1872 PLUG_VAR="${VAR}-plugin"
1874 QMakeVar del "${IN_VAR}s" "$VAL"
1875 QMakeVar del "${PLUG_VAR}s" "$VAL"
1877 if [ "$ERROR" = "yes" ]; then
1878 echo "$CURRENT_OPT: unknown argument"
1883 if [ "$VAL" = "yes" ]; then
1884 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1885 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1889 elif [ "$VAL" = "no" ]; then
1890 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1891 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1900 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1907 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1914 DEFINES="$DEFINES \"$VAL\""
1915 D_FLAGS="$D_FLAGS -D\"$VAL\""
1918 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1921 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1924 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1927 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1930 if [ "$BUILD_ON_MAC" = "yes" ]; then
1931 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1932 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1938 if [ "$BUILD_ON_MAC" = "yes" ]; then
1939 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1945 W_FLAGS="$W_FLAGS \"${VAL}\""
1951 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1952 CFG_PHONON_BACKEND="$VAL"
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1965 CFG_AUDIO_BACKEND="$VAL"
1971 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1978 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1979 CFG_FORCE_ASSERTS="$VAL"
1985 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1992 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2002 if [ "$UNKNOWN_OPT" = "yes" ]; then
2003 echo "${CURRENT_OPT}: invalid command-line switch"
2009 # update QT_CONFIG to show our current predefined configuration
2010 case "$CFG_QCONFIG" in
2011 minimal|small|medium|large|full)
2012 # these are a sequence of increasing functionality
2013 for c in minimal small medium large full; do
2014 QT_CONFIG="$QT_CONFIG $c-config"
2015 [ "$CFG_QCONFIG" = $c ] && break
2019 # not known to be sufficient for anything
2020 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2021 echo >&2 "Error: configuration file not found:"
2022 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2024 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2029 #-------------------------------------------------------------------------------
2030 # build tree initialization
2031 #-------------------------------------------------------------------------------
2033 # where to find which..
2034 unixtests="$relpath/config.tests/unix"
2035 mactests="$relpath/config.tests/mac"
2036 WHICH="$unixtests/which.test"
2038 PERL=`$WHICH perl 2>/dev/null`
2040 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2042 for e in gawk nawk awk; do
2043 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2050 PERL="/usr/bin/perl"
2051 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2055 ### skip this if the user just needs help...
2056 if [ "$OPT_HELP" != "yes" ]; then
2058 # is this a shadow build?
2059 if [ "$OPT_SHADOW" = "maybe" ]; then
2061 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2062 if [ -h "$outpath" ]; then
2063 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2069 if [ "$OPT_SHADOW" = "yes" ]; then
2070 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2071 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2072 echo >&2 "Cannot proceed."
2075 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2078 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2080 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2081 echo "Qt can be built in release mode with separate debug information, so"
2082 echo "-debug-and-release is not necessary anymore"
2086 if [ "$CFG_SILENT" = "yes" ]; then
2087 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2090 # if the source tree is different from the build tree,
2091 # symlink or copy part of the sources
2092 if [ "$OPT_SHADOW" = "yes" ]; then
2093 echo "Preparing build tree..."
2095 if [ -z "$PERL" ]; then
2097 echo "You need perl in your PATH to make a shadow build."
2098 echo "Cannot proceed."
2102 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2104 # make a syncqt script that can be used in the shadow
2105 rm -f "$outpath/bin/syncqt"
2106 if [ -x "$relpath/bin/syncqt" ]; then
2107 mkdir -p "$outpath/bin"
2108 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2109 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2110 chmod 755 "$outpath/bin/syncqt"
2113 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2114 rm -f "$outpath/bin/$i"
2115 if [ -x "$relpath/bin/$i" ]; then
2116 mkdir -p "$outpath/bin"
2117 echo "#!/bin/sh" >"$outpath/bin/$i"
2118 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2119 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2120 chmod 755 "$outpath/bin/$i"
2124 # save a pre-existing mkspecs/modules dir
2125 test -d "$outpath/mkspecs/modules" && \
2126 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2128 # symlink the mkspecs directory
2129 mkdir -p "$outpath/mkspecs"
2130 rm -rf "$outpath"/mkspecs/*
2131 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2132 rm -f "$outpath/mkspecs/default"
2136 rm -rf "$outpath/mkspecs/$1"
2137 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2138 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2141 # Special case for mkspecs/features directory.
2142 # To be able to place .prf files into a shadow build directory,
2143 # we're creating links for files only. The directory structure is reproduced.
2144 ShadowMkspecs features
2146 # The modules dir is special, too.
2147 if test -d "$outpath/mkspecs-modules"; then
2148 rm -rf "$outpath/mkspecs/modules"
2149 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2151 ShadowMkspecs modules
2154 # symlink the doc directory
2155 rm -rf "$outpath/doc"
2156 ln -s "$relpath/doc" "$outpath/doc"
2159 # symlink fonts to be able to run application from build directory
2160 if [ ! -d "${outpath}/lib/fonts" ]; then
2161 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2162 mkdir -p "${outpath}/lib"
2163 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2167 if [ "$OPT_FAST" = "auto" ]; then
2168 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2175 # find a make command
2176 if [ -z "$MAKE" ]; then
2178 for mk in gmake make; do
2179 if "$WHICH" $mk >/dev/null 2>&1; then
2184 if [ -z "$MAKE" ]; then
2185 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2186 echo >&2 "Cannot proceed."
2189 # export MAKE, we need it later in the config.tests
2195 #-------------------------------------------------------------------------------
2196 # auto-detect all that hasn't been specified in the arguments
2197 #-------------------------------------------------------------------------------
2199 if [ -z "$PLATFORM" ]; then
2201 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2203 OSX_VERSION=`uname -r | cut -d. -f1`
2204 # Select compiler. Use g++ unless we find a usable Clang version
2206 if [ "$OSX_VERSION" -ge 12 ]; then
2207 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2209 elif [ "$OSX_VERSION" -eq 11 ]; then
2210 # We're on Lion. Check if we have a supported Clang version
2211 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2214 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2221 #PLATFORM=aix-g++-64
2223 #PLATFORM=aix-xlc-64
2225 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2235 # PLATFORM=dynix-g++
2241 PLATFORM=freebsd-g++
2243 - Also available for FreeBSD: freebsd-icc
2247 PLATFORM=openbsd-g++
2258 #PLATFORM=irix-cc-64
2260 - Also available for IRIX: irix-g++ irix-cc-64
2264 case "$UNAME_MACHINE" in
2266 #PLATFORM=hpuxi-acc-32
2267 PLATFORM=hpuxi-acc-64
2269 - Also available for HP-UXi: hpuxi-acc-32
2275 #PLATFORM=hpux-acc-64
2277 #PLATFORM=hpux-acc-o64
2279 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2288 - Also available for Tru64: tru64-g++
2292 case "$UNAME_MACHINE" in
2294 PLATFORM=linux-g++-64
2301 - Also available for Linux: linux-kcc linux-icc linux-cxx
2305 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2306 PLATFORM="solaris-g++"
2308 #PLATFORM=solaris-g++
2310 #PLATFORM=solaris-cc64
2313 - Also available for Solaris: solaris-g++ solaris-cc-64
2316 ReliantUNIX-*:*|SINIX-*:*)
2317 PLATFORM=reliant-cds
2318 #PLATFORM=reliant-cds-64
2320 - Also available for Reliant UNIX: reliant-cds-64
2330 #PLATFORM=unixware-g++
2331 PLATFORM=unixware-cc
2333 - Also available for OpenUNIX: unixware-g++
2337 #PLATFORM=unixware-g++
2338 PLATFORM=unixware-cc
2340 - Also available for UnixWare: unixware-g++
2347 - Also available for SCO OpenServer: sco-g++
2351 PLATFORM=unixware-g++
2354 PLATFORM=unsupported/qnx-g++
2357 if [ "$OPT_HELP" != "yes" ]; then
2359 echo " The build script does not currently recognize all" >&2
2360 echo " platforms supported by Qt." >&2
2361 echo " Rerun this script with a -platform option listed to" >&2
2362 echo " set the system/compiler combination you use." >&2
2369 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2371 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2372 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2373 case "$XPLATFORM" in *qnx-*|*blackberry-*) XPLATFORM_QNX=yes;; esac
2375 if [ -d "$PLATFORM" ]; then
2376 QMAKESPEC="$PLATFORM"
2378 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2380 if [ -d "$XPLATFORM" ]; then
2381 XQMAKESPEC="$XPLATFORM"
2383 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2385 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2386 QT_CROSS_COMPILE=yes
2387 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2388 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2391 if [ "$BUILD_ON_MAC" = "yes" ]; then
2392 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2394 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2395 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2396 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2397 echo " built with 'macx-g++'" >&2
2403 # check specified platforms are supported
2404 if [ '!' -d "$QMAKESPEC" ]; then
2406 echo " The specified system/compiler is not supported:"
2410 echo " Please see the README file for a complete list."
2414 if [ '!' -d "$XQMAKESPEC" ]; then
2416 echo " The specified system/compiler is not supported:"
2420 echo " Please see the README file for a complete list."
2424 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2426 echo " The specified system/compiler port is not complete:"
2428 echo " $XQMAKESPEC/qplatformdefs.h"
2430 echo " Please contact qt-info@nokia.com."
2435 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2436 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2437 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2438 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2439 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2443 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2444 case `basename "$XPLATFORM"` in
2447 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2449 echo "Please contact qt-info@nokia.com to upgrade your license to"
2450 echo "include this platform, or install the Qt Open Source Edition"
2451 echo "if you intend to develop free software."
2457 #-------------------------------------------------------------------------------
2458 # tests that don't need qmake (must be run before displaying help)
2459 #-------------------------------------------------------------------------------
2461 # detect build style
2462 if [ "$CFG_DEBUG" = "auto" ]; then
2463 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2464 CFG_DEBUG_RELEASE=yes
2466 elif [ "$CFG_DEV" = "yes" ]; then
2467 CFG_DEBUG_RELEASE=no
2470 CFG_DEBUG_RELEASE=no
2474 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2475 QT_CONFIG="$QT_CONFIG build_all"
2478 # pass on $CFG_SDK to the configure tests.
2479 if [ '!' -z "$CFG_SDK" ]; then
2480 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2483 # find the default framework value
2484 if [ "$BUILD_ON_MAC" = "yes" ]; then
2485 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2486 CFG_FRAMEWORK="$CFG_SHARED"
2487 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2489 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2497 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2499 TEST_COMPILER=$QMAKE_CONF_COMPILER
2500 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2501 if [ -z "$TEST_COMPILER" ]; then
2502 echo "ERROR: Cannot set the compiler for the configuration tests"
2508 case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
2509 if [ -n "$GCC_MACHINE_DUMP" ]; then
2510 DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
2513 if [ -n "$CFG_SYSROOT" ]; then
2514 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2518 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2520 # auto-detect precompiled header support
2521 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2522 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2529 # auto-detect support for separate debug info in objcopy
2530 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2531 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2532 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2533 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2534 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2535 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2536 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2537 CFG_SEPARATE_DEBUG_INFO=no
2541 # binutils on HP-UX is buggy; default to no.
2542 CFG_SEPARATE_DEBUG_INFO=no
2545 CFG_SEPARATE_DEBUG_INFO=yes
2551 # auto-detect -fvisibility support
2552 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2553 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2554 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2555 echo "-reduce-exports was requested but this compiler does not support it"
2556 echo "Re-run configure with -v for more information"
2559 CFG_REDUCE_EXPORTS=no
2561 CFG_REDUCE_EXPORTS=yes
2565 # detect the availability of the -Bsymbolic-functions linker optimization
2566 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2567 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2568 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2569 echo "-reduce-relocations was requested but this compiler does not support it"
2570 echo "Re-run configure with -v for more information"
2573 CFG_REDUCE_RELOCATIONS=no
2575 CFG_REDUCE_RELOCATIONS=yes
2579 # auto-detect GNU make support
2580 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2584 # find the default framework value
2585 if [ "$BUILD_ON_MAC" = "yes" ]; then
2586 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2587 CFG_FRAMEWORK="$CFG_SHARED"
2588 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2590 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2598 #setup the build parts
2599 if [ -z "$CFG_BUILD_PARTS" ]; then
2600 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2602 # build tests by default, if a developer build
2603 if [ "$CFG_DEV" = "yes" ]; then
2604 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2607 # don't build tools by default when cross-compiling
2608 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2609 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2612 for nobuild in $CFG_NOBUILD_PARTS; do
2613 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2615 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2617 # echo "WARNING: libs is a required part of the build."
2619 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2622 #-------------------------------------------------------------------------------
2623 # post process QT_INSTALL_* variables
2624 #-------------------------------------------------------------------------------
2626 if [ -z "$QT_INSTALL_PREFIX" ]; then
2627 if [ "$CFG_DEV" = "yes" ]; then
2628 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2630 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2633 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2635 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2636 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2637 if [ "$BUILD_ON_MAC" = "yes" ]; then
2638 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2641 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2644 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2646 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2647 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2648 if [ "$BUILD_ON_MAC" = "yes" ]; then
2649 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2654 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2657 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2659 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2660 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2661 if [ "$BUILD_ON_MAC" = "yes" ]; then
2662 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2663 QT_INSTALL_LIBS="/Libraries/Frameworks"
2667 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2669 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2671 if [ -z "$QT_INSTALL_BINS" ]; then #default
2672 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2673 if [ "$BUILD_ON_MAC" = "yes" ]; then
2674 QT_INSTALL_BINS="/Developer/Applications/Qt"
2677 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2679 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2681 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2682 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2683 if [ "$BUILD_ON_MAC" = "yes" ]; then
2684 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2687 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2689 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2691 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2692 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2693 if [ "$BUILD_ON_MAC" = "yes" ]; then
2694 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2697 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2699 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2701 if [ -z "$QT_INSTALL_DATA" ]; then #default
2702 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2704 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2706 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2707 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2709 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2711 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2712 if [ "$BUILD_ON_MAC" = "yes" ]; then
2713 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2715 QT_INSTALL_SETTINGS=/etc/xdg
2718 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2720 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2721 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2722 if [ "$BUILD_ON_MAC" = "yes" ]; then
2723 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2726 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2728 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2731 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2732 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2733 if [ "$BUILD_ON_MAC" = "yes" ]; then
2734 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2737 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2739 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2741 #------- host paths --------
2743 if [ -z "$QT_HOST_PREFIX" ]; then
2744 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2747 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2751 if [ -z "$QT_HOST_BINS" ]; then #default
2753 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2754 if [ "$BUILD_ON_MAC" = "yes" ]; then
2755 QT_HOST_BINS="/Developer/Applications/Qt"
2758 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2760 QT_HOST_BINS="$QT_INSTALL_BINS"
2763 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2765 if [ -z "$QT_HOST_DATA" ]; then #default
2767 QT_HOST_DATA="$QT_HOST_PREFIX"
2769 QT_HOST_DATA="$QT_INSTALL_DATA"
2772 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2775 #-------------------------------------------------------------------------------
2776 # help - interactive parts of the script _after_ this section please
2777 #-------------------------------------------------------------------------------
2779 # next, emit a usage message if something failed.
2780 if [ "$OPT_HELP" = "yes" ]; then
2781 [ "x$ERROR" = "xyes" ] && echo
2782 if [ "$CFG_NIS" = "no" ]; then
2789 if [ "$CFG_CUPS" = "no" ]; then
2796 if [ "$CFG_ICONV" = "no" ]; then
2803 if [ "$CFG_LARGEFILE" = "no" ]; then
2810 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2818 if [ "$CFG_XCB" = "no" ]; then
2826 if [ "$CFG_EGLFS" = "no" ]; then
2834 if [ "$CFG_DIRECTFB" = "no" ]; then
2841 if [ "$CFG_XINPUT2" = "no" ]; then
2849 if [ "$CFG_DBUS" = "no" ]; then
2857 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2865 if [ "$CFG_GLIB" = "no" ]; then
2874 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2875 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2876 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2877 [-release] [-debug] [-debug-and-release] [-c++11] [-no-c++11]
2878 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2879 [-largefile] [-no-accessibility] [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2880 [-plugin-sql-<driver>] [-system-sqlite]
2881 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2882 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2883 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2884 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2885 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2886 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2887 [-no-separate-debug-info] [-no-sse2]
2888 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2889 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2890 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2891 [-no-audio-backend] [-audio-backend]
2892 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2893 [-no-optimized-qmake] [-optimized-qmake]
2894 [-no-openssl] [-openssl] [-openssl-linked]
2895 [-no-gtkstyle] [-gtkstyle]
2896 [-qt-pcre] [-system-pcre]
2897 [-device <name>] [-device-option <key=value>]
2898 [additional platform specific options (see below)]
2901 Installation options:
2903 These are optional, but you may specify install directories.
2905 -prefix <dir> ...... This will install everything relative to <dir>
2906 (default $QT_INSTALL_PREFIX)
2908 -hostprefix [dir] .. Tools and libraries needed when developing
2909 applications are installed in [dir]. If [dir] is
2910 not given, the current build directory will be used.
2913 * -prefix-install .... Force a sandboxed "local" installation of
2914 Qt. This will install into
2915 $QT_INSTALL_PREFIX, if this option is
2916 disabled then some platforms will attempt a
2917 "system" install by placing default values to
2918 be placed in a system location other than
2921 You may use these to separate different parts of the install:
2923 -bindir <dir> ......... Executables will be installed to <dir>
2924 (default PREFIX/bin)
2925 -libdir <dir> ......... Libraries will be installed to <dir>
2926 (default PREFIX/lib)
2927 -docdir <dir> ......... Documentation will be installed to <dir>
2928 (default PREFIX/doc)
2929 -headerdir <dir> ...... Headers will be installed to <dir>
2930 (default PREFIX/include)
2931 -plugindir <dir> ...... Plugins will be installed to <dir>
2932 (default PREFIX/plugins)
2933 -importdir <dir> ...... Imports for QML will be installed to <dir>
2934 (default PREFIX/imports)
2935 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2937 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2938 (default PREFIX/translations)
2939 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2940 (default PREFIX/etc/settings)
2941 -examplesdir <dir> .... Examples will be installed to <dir>
2942 (default PREFIX/examples)
2943 -testsdir <dir> ....... Tests will be installed to <dir>
2944 (default PREFIX/tests)
2946 -hostbindir <dir> .. Host executables will be installed to <dir>
2947 (default HOSTPREFIX/bin)
2948 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2949 (default HOSTPREFIX)
2953 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2954 that needs to be evaluated. If the evaluation succeeds, the feature is
2955 included. Here is a short explanation of each option:
2957 * -release ........... Compile and link Qt with debugging turned off.
2958 -debug ............. Compile and link Qt with debugging turned on.
2959 -debug-and-release . Compile and link two versions of Qt, with and without
2960 debugging turned on (Mac only).
2962 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2964 -opensource ........ Compile and link the Open-Source Edition of Qt.
2965 -commercial ........ Compile and link the Commercial Edition of Qt.
2967 -no-c++11 .......... Do not compile Qt with C++11 support enabled.
2968 + -c++11 ............. Compile Qt with C++11 support enabled.
2970 * -shared ............ Create and use shared Qt libraries.
2971 -static ............ Create and use static Qt libraries.
2973 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2975 -fast .............. Configure Qt quickly by generating Makefiles only for
2976 library and subdirectory targets. All other Makefiles
2977 are created as wrappers, which will in turn run qmake.
2979 -no-largefile ...... Disables large file support.
2980 + -largefile ......... Enables Qt to access files larger than 4 GB.
2982 -no-accessibility .. Do not compile Accessibility support.
2983 * -accessibility ..... Compile Accessibility support.
2985 -no-sql-<driver> ... Disable SQL <driver> entirely.
2986 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2988 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2991 Possible values for <driver>:
2992 [ $CFG_SQL_AVAILABLE ]
2994 -system-sqlite ..... Use sqlite from the operating system.
2996 -no-phonon-backend.. Do not build the platform phonon plugin.
2997 + -phonon-backend..... Build the platform phonon plugin.
2999 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3000 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3002 -no-qml-debug ...... Do not build the in-process QML debugging support.
3003 + -qml-debug ......... Build the QML debugging support.
3005 -platform target ... The operating system and compiler you are building
3008 See the README file for a list of supported
3009 operating systems and compilers.
3011 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3012 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3013 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3014 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3015 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3016 -no-avx ............ Do not compile with use of AVX instructions.
3017 -no-avx2 ........... Do not compile with use of AVX2 instructions.
3018 -no-neon ........... Do not compile with use of NEON instructions.
3019 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3020 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3022 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3023 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3025 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3027 -D <string> ........ Add an explicit define to the preprocessor.
3028 -I <string> ........ Add an explicit include path.
3029 -L <string> ........ Add an explicit library path.
3031 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
3032 configure determines whether to use pkg-config or not with
3033 some heuristics such as checking the environment variables.
3034 -no-pkg-config ..... Disable use of pkg-config.
3035 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
3036 detection heuristic).
3038 -help, -h .......... Display this information.
3040 Third Party Libraries:
3042 -qt-zlib ........... Use the zlib bundled with Qt.
3043 + -system-zlib ....... Use zlib from the operating system.
3044 See http://www.gzip.org/zlib
3046 -no-gif ............ Do not compile GIF reading support.
3048 -no-libpng ......... Do not compile PNG support.
3049 -qt-libpng ......... Use the libpng bundled with Qt.
3050 + -system-libpng ..... Use libpng from the operating system.
3051 See http://www.libpng.org/pub/png
3053 -no-libjpeg ........ Do not compile JPEG support.
3054 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3055 + -system-libjpeg .... Use libjpeg from the operating system.
3056 See http://www.ijg.org
3058 -no-openssl ........ Do not compile support for OpenSSL.
3059 + -openssl ........... Enable run-time OpenSSL support.
3060 -openssl-linked .... Enabled linked OpenSSL support.
3062 -qt-pcre ........... Use the PCRE library bundled with Qt.
3063 + -system-pcre ....... Use the PCRE library from the operating system.
3067 -make <part> ....... Add part to the list of parts to be built at make time.
3068 ($QT_DEFAULT_BUILD_PARTS)
3069 -nomake <part> ..... Exclude part from the list of parts to be built.
3071 -R <string> ........ Add an explicit runtime library path to the Qt
3073 -l <string> ........ Add an explicit library.
3075 -no-rpath .......... Do not use the library install path as a runtime
3077 + -rpath ............. Link Qt libraries and executables using the library
3078 install path as a runtime library path. Equivalent
3079 to -R install_libpath
3081 -continue .......... Continue as far as possible if an error occurs.
3083 -verbose, -v ....... Print verbose information about each step of the
3086 -silent ............ Reduce the build output so that warnings and errors
3087 can be seen more easily.
3089 * -no-optimized-qmake ... Do not build qmake optimized.
3090 -optimized-qmake ...... Build qmake optimized.
3092 -no-gui ............ Don't build the Qt GUI library
3094 $NSN -no-nis ............ Do not compile NIS support.
3095 $NSY -nis ............... Compile NIS support.
3097 $CUN -no-cups ........... Do not compile CUPS support.
3098 $CUY -cups .............. Compile CUPS support.
3099 Requires cups/cups.h and libcups.so.2.
3101 $CIN -no-iconv .......... Do not compile support for iconv(3).
3102 $CIY -iconv ............. Compile support for iconv(3).
3104 $PHN -no-pch ............ Do not use precompiled header support.
3105 $PHY -pch ............... Use precompiled header support.
3107 $DBN -no-dbus ........... Do not compile the QtDBus module.
3108 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3109 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3111 -reduce-relocations ..... Reduce relocations in the libraries through extra
3112 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3113 experimental; needs GNU ld >= 2.18).
3115 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3117 -device <name> ............... Cross-compile for device <name> (experimental)
3118 -device-option <key=value> ... Add device specific options for the device mkspec
3121 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3122 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3124 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3125 $XCBY -xcb ............... Compile Xcb support.
3127 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3128 $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
3130 $DFBN -no-directfb ....... Do not compile DirectFB support.
3131 $DFBY -directfb .......... Compile DirectFB support.
3133 -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
3135 -xplatform target ... The target platform when cross-compiling.
3137 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3139 -no-feature-<feature> Do not compile in <feature>.
3140 -feature-<feature> .. Compile in <feature>. The available features
3141 are described in src/corelib/global/qfeatures.txt
3143 -no-freetype ........ Do not compile in Freetype2 support.
3144 -qt-freetype ........ Use the libfreetype bundled with Qt.
3145 * -system-freetype .... Use libfreetype from the operating system.
3146 See http://www.freetype.org/
3148 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3149 default ($CFG_QCONFIG).
3151 -no-opengl .......... Do not support OpenGL.
3152 -opengl <api> ....... Enable OpenGL support
3153 With no parameter, this will attempt to auto-detect
3154 OpenGL ES 2, or regular desktop OpenGL.
3155 Use es2 for <api> to override auto-detection.
3157 $GBN -no-glib ........... Do not compile Glib support.
3158 $GBY -glib .............. Compile Glib support.
3161 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3164 $X2N -no-xinput2......... Do not compile XInput2 support.
3165 $X2Y -xinput2............ Compile XInput2 support.
3171 if [ "$BUILD_ON_MAC" = "yes" ]; then
3176 -Fstring ........... Add an explicit framework path.
3177 -fw string ......... Add an explicit framework.
3179 * -framework ......... Build Qt as a series of frameworks and
3180 link tools against those frameworks.
3181 -no-framework ...... Do not build Qt as a series of frameworks.
3183 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3184 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3186 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3187 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3188 QT_ENABLE_HARFBUZZ environment variable.
3193 [ "x$ERROR" = "xyes" ] && exit 1
3198 # -----------------------------------------------------------------------------
3199 # LICENSING, INTERACTIVE PART
3200 # -----------------------------------------------------------------------------
3203 echo "This is the Qt ${EditionString} Edition."
3206 if [ "$Edition" = "OpenSource" ]; then
3208 echo "You are licensed to use this software under the terms of"
3209 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3210 if [ -f "$relpath/LICENSE.GPL3" ]; then
3211 echo "You are also licensed to use this software under the terms of"
3212 echo "the GNU General Public License (GPL) versions 3."
3218 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3219 echo "You have already accepted the terms of the $LicenseType license."
3222 if [ -f "$relpath/LICENSE.GPL3" ]; then
3223 echo "Type '3' to view the GNU General Public License version 3."
3225 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3226 echo "Type 'yes' to accept this license offer."
3227 echo "Type 'no' to decline this license offer."
3229 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3233 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3235 elif [ "$acceptance" = "no" ]; then
3236 echo "You are not licensed to use this software."
3239 elif [ "$acceptance" = "3" ]; then
3240 more "$relpath/LICENSE.GPL3"
3241 elif [ "$acceptance" = "L" ]; then
3242 more "$relpath/LICENSE.LGPL"
3245 elif [ "$Edition" = "Preview" ]; then
3246 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3249 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3250 echo "You have already accepted the terms of the $LicenseType license."
3253 echo "You are licensed to use this software under the terms of"
3254 echo "the $TheLicense"
3256 echo "Type '?' to read the Preview License."
3257 echo "Type 'yes' to accept this license offer."
3258 echo "Type 'no' to decline this license offer."
3260 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3264 if [ "$acceptance" = "yes" ]; then
3266 elif [ "$acceptance" = "no" ] ;then
3267 echo "You are not licensed to use this software."
3270 elif [ "$acceptance" = "?" ]; then
3271 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3274 elif [ "$Edition" != "OpenSource" ]; then
3275 if [ -n "$ExpiryDate" ]; then
3276 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3277 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3278 Today=`date +%Y%m%d`
3279 if [ "$Today" -gt "$ExpiryDate" ]; then
3280 case "$LicenseType" in
3281 Commercial|Academic|Educational)
3282 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3284 echo "NOTICE NOTICE NOTICE NOTICE"
3286 echo " Your support and upgrade period has expired."
3288 echo " You are no longer licensed to use this version of Qt."
3289 echo " Please contact qt-info@nokia.com to renew your support"
3290 echo " and upgrades for this license."
3292 echo "NOTICE NOTICE NOTICE NOTICE"
3297 echo "WARNING WARNING WARNING WARNING"
3299 echo " Your support and upgrade period has expired."
3301 echo " You may continue to use your last licensed release"
3302 echo " of Qt under the terms of your existing license"
3303 echo " agreement. But you are not entitled to technical"
3304 echo " support, nor are you entitled to use any more recent"
3305 echo " Qt releases."
3307 echo " Please contact qt-info@nokia.com to renew your"
3308 echo " support and upgrades for this license."
3310 echo "WARNING WARNING WARNING WARNING"
3317 echo "NOTICE NOTICE NOTICE NOTICE"
3319 echo " Your Evaluation license has expired."
3321 echo " You are no longer licensed to use this software. Please"
3322 echo " contact qt-info@nokia.com to purchase license, or install"
3323 echo " the Qt Open Source Edition if you intend to develop free"
3326 echo "NOTICE NOTICE NOTICE NOTICE"
3333 TheLicense=`head -n 1 "$outpath/LICENSE"`
3335 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3336 echo "You have already accepted the terms of the $TheLicense."
3339 echo "You are licensed to use this software under the terms of"
3340 echo "the $TheLicense."
3342 echo "Type '?' to view the $TheLicense."
3343 echo "Type 'yes' to accept this license offer."
3344 echo "Type 'no' to decline this license offer."
3346 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3350 if [ "$acceptance" = "yes" ]; then
3352 elif [ "$acceptance" = "no" ]; then
3353 echo "You are not licensed to use this software."
3356 else [ "$acceptance" = "?" ]
3357 more "$outpath/LICENSE"
3362 # this should be moved somewhere else
3365 AIX_VERSION=`uname -v`
3366 if [ "$AIX_VERSION" -lt "5" ]; then
3367 QMakeVar add QMAKE_LIBS_X11 -lbind
3374 #-------------------------------------------------------------------------------
3375 # generate qconfig.cpp
3376 #-------------------------------------------------------------------------------
3377 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3379 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3381 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3382 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3384 /* Installation date */
3385 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3387 /* Installation Info */
3388 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3389 "qt_prfxpath=$QT_INSTALL_PREFIX",
3390 "qt_docspath=$QT_INSTALL_DOCS",
3391 "qt_hdrspath=$QT_INSTALL_HEADERS",
3392 "qt_libspath=$QT_INSTALL_LIBS",
3393 "qt_binspath=$QT_INSTALL_BINS",
3394 "qt_plugpath=$QT_INSTALL_PLUGINS",
3395 "qt_impspath=$QT_INSTALL_IMPORTS",
3396 "qt_datapath=$QT_INSTALL_DATA",
3397 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3398 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3399 "qt_tstspath=$QT_INSTALL_TESTS",
3400 #ifdef QT_BUILD_QMAKE
3401 "qt_ssrtpath=$CFG_SYSROOT",
3402 "qt_hpfxpath=$QT_HOST_PREFIX",
3403 "qt_hbinpath=$QT_HOST_BINS",
3404 "qt_hdatpath=$QT_HOST_DATA",
3407 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3410 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3412 /* strlen( "qt_lcnsxxxx" ) == 12 */
3413 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3414 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3416 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3419 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3420 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3421 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3423 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3424 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3425 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3428 # -----------------------------------------------------------------------------
3429 if [ "$LicenseType" = "Evaluation" ]; then
3430 EVALKEY=qt_qevalkey=$LicenseKeyExt
3431 elif echo "$DEFINES" | grep QT_EVAL >/dev/null 2>&1; then
3432 EVALKEY=qt_qevalkey=
3435 if [ -n "$EVALKEY" ]; then
3436 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3437 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3438 /* Evaluation license key */
3439 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3441 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3445 # -----------------------------------------------------------------------------
3447 # -----------------------------------------------------------------------------
3450 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3452 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3453 if [ "$OPT_SHADOW" = "yes" ]; then
3454 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3455 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3456 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3460 # $1: input variable name (awk regexp)
3461 # $2: optional output variable name
3462 # $3: optional value transformation (sed command)
3463 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3464 # is where the resulting variable is written to
3465 setBootstrapVariable()
3467 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3471 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3472 echo "Creating qmake. Please wait..."
3475 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3476 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3477 if [ -f "$QCONFIG_H" ]; then
3478 OLD_QCONFIG_H=$QCONFIG_H
3479 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3482 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3483 # when building qmake, we use #defines for the install paths,
3484 # however they are real functions in the library
3485 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3486 mkdir -p "$outpath/src/corelib/global"
3487 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3488 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3491 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3493 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3494 rm -rf mkspecs/default
3495 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3496 mkdir -p "$outpath/qmake" || exit
3498 for mkfile in GNUmakefile Makefile; do
3501 in_mkfile="${mkfile}.in"
3502 if [ "$mkfile" = "Makefile" ]; then
3503 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3504 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3506 in_mkfile="${mkfile}.unix"
3508 in_mkfile="$relpath/qmake/$in_mkfile"
3509 mkfile="$outpath/qmake/$mkfile"
3510 if [ -f "$mkfile" ]; then
3511 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3514 [ -f "$in_mkfile" ] || continue
3516 echo "########################################################################" > "$mkfile"
3517 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3518 echo "########################################################################" >> "$mkfile"
3521 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3522 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3523 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3525 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3526 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3529 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3530 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3531 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3532 setBootstrapVariable QMAKE_CFLAGS
3533 setBootstrapVariable QMAKE_CXXFLAGS
3534 setBootstrapVariable QMAKE_LFLAGS
3536 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3537 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3538 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3540 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3541 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3542 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3543 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3544 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3545 elif [ "$CFG_DEBUG" = "yes" ]; then
3546 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3547 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3548 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3549 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3552 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3553 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3554 for rpath in $RPATH_FLAGS; do
3555 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3558 if [ "$BUILD_ON_MAC" = "yes" ]; then
3559 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3560 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3561 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3562 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3563 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3564 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3565 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3566 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3567 if [ '!' -z "$CFG_SDK" ]; then
3568 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3569 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3570 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3571 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3572 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3575 if [ '!' -z "$D_FLAGS" ]; then
3576 EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS"
3578 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3579 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3580 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3581 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3583 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3584 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3585 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3586 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3587 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3588 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3589 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3590 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3591 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3592 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3594 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3595 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3596 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3597 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3602 QMAKE_BUILD_ERROR=no
3603 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3604 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3605 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3606 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3609 #-------------------------------------------------------------------------------
3611 #-------------------------------------------------------------------------------
3612 if [ -z "$PKG_CONFIG" ]; then
3613 # See if PKG_CONFIG is set in the mkspec:
3614 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3616 if [ -z "$PKG_CONFIG" ]; then
3617 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3620 if [ "$CFG_PKGCONFIG" = "no" ]; then
3622 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3624 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3625 echo >&2 "a correctly setup pkg-config environment!"
3627 elif [ -n "$PKG_CONFIG" ]; then
3628 # found a pkg-config
3629 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3630 # when xcompiling, check environment to see if it's actually usable
3631 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3632 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3633 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3634 if [ -n "$GCC_MACHINE_DUMP" ]; then
3635 PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$CFG_SYSROOT/usr/lib/$GCC_MACHINE_DUMP/pkgconfig
3637 export PKG_CONFIG_LIBDIR
3638 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3639 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3640 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3641 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3642 echo >&2 "Set this variable to the directory that contains target .pc files"
3643 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3644 echo >&2 "use -force-pkg-config to override this test."
3648 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3651 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3652 if [ -n "$CFG_SYSROOT" ]; then
3653 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3654 export PKG_CONFIG_SYSROOT_DIR
3655 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3656 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3657 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3658 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3659 echo >&2 "or use -force-pkg-config to override this test."
3663 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3667 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3668 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3672 if [ -z "$PKG_CONFIG" ]; then
3673 QT_CONFIG="$QT_CONFIG no-pkg-config"
3676 #-------------------------------------------------------------------------------
3677 # write out device config before we run the test.
3678 #-------------------------------------------------------------------------------
3679 DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
3680 if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
3681 rm -f "$DEVICE_VARS_FILE"
3683 mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
3684 DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
3687 #-------------------------------------------------------------------------------
3688 # tests that need qmake
3689 #-------------------------------------------------------------------------------
3691 #-------------------------------------------------------------------------------
3692 # determine the target and host architectures
3693 #-------------------------------------------------------------------------------
3695 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3696 OUTFILE=$outpath/arch.result
3697 "$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG"
3698 if [ $? -eq 0 ]; then
3699 eval `cat "$OUTFILE"`
3702 echo "Could not determine the target architecture!"
3703 echo "Turn on verbose messaging (-v) to see the final report."
3705 rm -f "$OUTFILE" 2>/dev/null
3706 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3708 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3709 # Do the same test again, using the host compiler
3710 SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG_HOST"
3711 if [ $? -eq 0 ]; then
3712 eval `cat "$OUTFILE"`
3715 echo "Could not determine the host architecture!"
3716 echo "Turn on verbose messaging (-v) to see the final report."
3718 rm -f "$OUTFILE" 2>/dev/null
3719 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3721 # not cross compiling, host == target
3722 CFG_HOST_ARCH="$CFG_ARCH"
3723 CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES"
3727 if [ "$OPT_VERBOSE" = "yes" ]; then
3728 echo "System architecture: '$CFG_ARCH'"
3729 echo "Host architecture: '$CFG_HOST_ARCH'"
3732 #-------------------------------------------------------------------------------
3733 # functionality tests
3734 #-------------------------------------------------------------------------------
3736 # Detect C++11 support
3737 if [ "$CFG_CXX11" != "no" ]; then
3738 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
3740 elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3741 echo "C++11 support cannot be enabled due to functionality tests!"
3742 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3743 echo " If you believe this message is in error you may use the continue"
3744 echo " switch (-continue) to $0 to continue."
3751 # detect availability of float math.h functions
3752 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
3753 CFG_USE_FLOATMATH=yes
3755 CFG_USE_FLOATMATH=no
3758 # detect sse2 support
3759 if [ "${CFG_SSE2}" = "auto" ]; then
3760 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3767 # detect sse3 support
3768 if [ "${CFG_SSE3}" = "auto" ]; then
3769 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3776 # detect ssse3 support
3777 if [ "${CFG_SSSE3}" = "auto" ]; then
3778 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3785 # detect sse4.1 support
3786 if [ "${CFG_SSE4_1}" = "auto" ]; then
3787 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3794 # detect sse4.2 support
3795 if [ "${CFG_SSE4_2}" = "auto" ]; then
3796 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3803 # detect avx support
3804 if [ "${CFG_AVX}" = "auto" ]; then
3805 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3806 case "$XQMAKESPEC" in
3808 # Some clang versions produce internal compiler errors compiling Qt AVX code
3809 case `$TEST_COMPILER --version` in
3810 Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
3812 if [ "$OPT_VERBOSE" = "yes" ]; then
3813 echo 'AVX support disabled for blacklisted clang compiler'
3830 # detect avx2 support
3831 if [ "${CFG_AVX}" = "no" ]; then
3834 if [ "${CFG_AVX2}" = "auto" ]; then
3835 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx2 "avx2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3842 # check iWMMXt support
3843 if [ "$CFG_IWMMXT" = "yes" ]; then
3844 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
3845 if [ $? != "0" ]; then
3846 echo "The iWMMXt functionality test failed!"
3847 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3852 # detect neon support
3853 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3854 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
3859 elif [ "$CFG_ARCH" != "arm" ]; then
3863 # detect mips_dsp support
3864 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3870 # detect mips_dspr2 support
3871 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3877 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3880 if [ "$CFG_ZLIB" = "no" ]; then
3881 # Note: Qt no longer support builds without zlib
3882 # So we force a "no" to be "auto" here.
3883 # If you REALLY really need no zlib support, you can still disable
3884 # it by doing the following:
3885 # add "no-zlib" to mkspecs/qconfig.pri
3886 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3888 # There's no guarantee that Qt will build under those conditions
3893 if [ "$CFG_ZLIB" = "auto" ]; then
3894 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
3901 if [ "$CFG_LARGEFILE" = "auto" ]; then
3902 #Large files should be enabled for all Linux systems
3906 if [ "$CFG_GUI" = "no" ]; then
3907 QPA_PLATFORM_GUARD=no
3910 # detect how jpeg should be built
3911 if [ "$CFG_JPEG" = "auto" ]; then
3912 if [ "$CFG_SHARED" = "yes" ]; then
3919 if [ "$CFG_LIBJPEG" = "auto" ]; then
3920 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
3927 # detect how gif should be built
3928 if [ "$CFG_GIF" = "auto" ]; then
3929 if [ "$CFG_SHARED" = "yes" ]; then
3937 if [ "$CFG_LIBPNG" = "auto" ]; then
3938 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
3945 # detect accessibility
3946 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3947 CFG_ACCESSIBILITY=yes
3950 if [ "$CFG_EGLFS" = "yes" ]; then
3951 if [ "$CFG_EGL" = "no" ]; then
3952 echo "The EGLFS plugin requires EGL support and cannot be built"
3955 if [ "$CFG_OPENGL" != "es2" ]; then
3956 echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
3963 # auto-detect SQL-modules support
3964 for _SQLDR in $CFG_SQL_AVAILABLE; do
3967 if [ "$CFG_SQL_mysql" != "no" ]; then
3968 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3969 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3970 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3971 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3972 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3973 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3974 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3976 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3977 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3978 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3979 echo " You need MySql 4 or higher."
3980 echo " If you believe this message is in error you may use the continue"
3981 echo " switch (-continue) to $0 to continue."
3986 QT_LFLAGS_MYSQL_R=""
3990 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
3991 QMakeVar add CONFIG use_libmysqlclient_r
3992 if [ "$CFG_SQL_mysql" = "auto" ]; then
3993 CFG_SQL_mysql=plugin
3995 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3996 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
3997 if [ "$CFG_SQL_mysql" = "auto" ]; then
3998 CFG_SQL_mysql=plugin
4001 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4002 echo "MySQL support cannot be enabled due to functionality tests!"
4003 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4004 echo " If you believe this message is in error you may use the continue"
4005 echo " switch (-continue) to $0 to continue."
4010 QT_LFLAGS_MYSQL_R=""
4018 if [ "$CFG_SQL_psql" != "no" ]; then
4019 # Be careful not to use native pg_config when cross building.
4020 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4021 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4022 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4024 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4025 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4026 # But, respect PSQL_LIBS if set
4027 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4028 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
4029 if [ "$CFG_SQL_psql" = "auto" ]; then
4033 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4034 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4035 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4036 echo " If you believe this message is in error you may use the continue"
4037 echo " switch (-continue) to $0 to continue."
4048 if [ "$CFG_SQL_odbc" != "no" ]; then
4049 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
4050 if [ "$CFG_SQL_odbc" = "auto" ]; then
4054 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
4055 QT_LFLAGS_ODBC="-liodbc"
4056 if [ "$CFG_SQL_odbc" = "auto" ]; then
4060 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4061 echo "ODBC support cannot be enabled due to functionality tests!"
4062 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4063 echo " If you believe this message is in error you may use the continue"
4064 echo " switch (-continue) to $0 to continue."
4074 if [ "$CFG_SQL_oci" != "no" ]; then
4075 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
4076 if [ "$CFG_SQL_oci" = "auto" ]; then
4080 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4081 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4082 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4083 echo " If you believe this message is in error you may use the continue"
4084 echo " switch (-continue) to $0 to continue."
4093 if [ "$CFG_SQL_tds" != "no" ]; then
4094 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4095 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4096 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
4097 if [ "$CFG_SQL_tds" = "auto" ]; then
4101 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4102 echo "TDS support cannot be enabled due to functionality tests!"
4103 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4104 echo " If you believe this message is in error you may use the continue"
4105 echo " switch (-continue) to $0 to continue."
4114 if [ "$CFG_SQL_db2" != "no" ]; then
4115 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
4116 if [ "$CFG_SQL_db2" = "auto" ]; then
4120 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4121 echo "ODBC support cannot be enabled due to functionality tests!"
4122 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4123 echo " If you believe this message is in error you may use the continue"
4124 echo " switch (-continue) to $0 to continue."
4133 if [ "$CFG_SQL_ibase" != "no" ]; then
4134 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
4135 if [ "$CFG_SQL_ibase" = "auto" ]; then
4136 CFG_SQL_ibase=plugin
4139 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4140 echo "InterBase support cannot be enabled due to functionality tests!"
4141 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4142 echo " If you believe this message is in error you may use the continue"
4143 echo " switch (-continue) to $0 to continue."
4152 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4153 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
4154 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4155 CFG_SQL_sqlite2=plugin
4158 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4159 echo "SQLite2 support cannot be enabled due to functionality tests!"
4160 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4161 echo " If you believe this message is in error you may use the continue"
4162 echo " switch (-continue) to $0 to continue."
4171 if [ "$CFG_SQL_sqlite" != "no" ]; then
4172 SQLITE_AUTODETECT_FAILED="no"
4173 if [ "$CFG_SQLITE" = "system" ]; then
4174 if [ -n "$PKG_CONFIG" ]; then
4175 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4176 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4178 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
4179 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4180 CFG_SQL_sqlite=plugin
4182 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4184 SQLITE_AUTODETECT_FAILED="yes"
4187 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4188 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4189 CFG_SQL_sqlite=plugin
4192 SQLITE_AUTODETECT_FAILED="yes"
4196 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4197 echo "SQLite support cannot be enabled due to functionality tests!"
4198 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4199 echo " If you believe this message is in error you may use the continue"
4200 echo " switch (-continue) to $0 to continue."
4206 if [ "$OPT_VERBOSE" = "yes" ]; then
4207 echo "unknown SQL driver: $_SQLDR"
4213 # auto-detect NIS support
4214 if [ "$CFG_NIS" != "no" ]; then
4215 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
4218 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4219 echo "NIS support cannot be enabled due to functionality tests!"
4220 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4221 echo " If you believe this message is in error you may use the continue"
4222 echo " switch (-continue) to $0 to continue."
4230 # auto-detect CUPS support
4231 if [ "$CFG_CUPS" != "no" ]; then
4232 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
4235 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4236 echo "Cups support cannot be enabled due to functionality tests!"
4237 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4238 echo " If you believe this message is in error you may use the continue"
4239 echo " switch (-continue) to $0 to continue."
4247 # auto-detect iconv(3) support
4248 if [ "$CFG_ICONV" != "no" ]; then
4249 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4251 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
4253 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
4255 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
4258 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4259 echo "Iconv support cannot be enabled due to functionality tests!"
4260 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4261 echo " If you believe this message is in error you may use the continue"
4262 echo " switch (-continue) to $0 to continue."
4270 # auto-detect libdbus-1 support
4271 if [ "$CFG_DBUS" != "no" ]; then
4272 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4273 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4274 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4276 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
4277 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4278 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4279 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4281 if [ "$CFG_DBUS" = "auto" ]; then
4283 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4284 # CFG_DBUS is "yes" or "linked" here
4286 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4287 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4288 echo " If you believe this message is in error you may use the continue"
4289 echo " switch (-continue) to $0 to continue."
4295 # auto-detect Glib support
4296 if [ "$CFG_GLIB" != "no" ]; then
4297 if [ -n "$PKG_CONFIG" ]; then
4298 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4299 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4301 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
4303 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4304 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4306 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4307 echo "Glib support cannot be enabled due to functionality tests!"
4308 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4309 echo " If you believe this message is in error you may use the continue"
4310 echo " switch (-continue) to $0 to continue."
4318 # auto-detect GTK style support
4319 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4320 if [ -n "$PKG_CONFIG" ]; then
4321 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4322 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4324 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4326 QT_CONFIG="$QT_CONFIG gtkstyle"
4327 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4328 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4330 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4331 echo "Gtk theme support cannot be enabled due to functionality tests!"
4332 echo " Turn on verbose messaging (-v) to $0 to see the fin al report."
4333 echo " If you believe this message is in error you may use the continue"
4334 echo " switch (-continue) to $0 to continue."
4340 elif [ "$CFG_GLIB" = "no" ]; then
4345 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4346 if [ -n "$PKG_CONFIG" ]; then
4347 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4348 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4350 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
4352 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4353 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4355 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4356 echo "Gstreamer support cannot be enabled due to functionality tests!"
4357 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4358 echo " If you believe this message is in error you may use the continue"
4359 echo " switch (-continue) to $0 to continue."
4365 elif [ "$CFG_GLIB" = "no" ]; then
4369 # auto-detect libicu support
4370 if [ "$CFG_ICU" != "no" ]; then
4371 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
4372 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4374 if [ "$CFG_ICU" = "auto" ]; then
4376 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4379 echo "The ICU library support cannot be enabled."
4380 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4381 echo " If you believe this message is in error you may use the continue"
4382 echo " switch (-continue) to $0 to continue."
4388 # Auto-detect PulseAudio support
4389 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4390 if [ -n "$PKG_CONFIG" ]; then
4391 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4392 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4394 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
4396 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4397 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4399 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4400 echo "PulseAudio support cannot be enabled due to functionality tests!"
4401 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4402 echo " If you believe this message is in error you may use the continue"
4403 echo " switch (-continue) to $0 to continue."
4412 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4413 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4414 if [ "$CFG_GUI" = "no" ]; then
4415 if [ "$CFG_OPENGL" = "auto" ]; then
4418 if [ "$CFG_OPENGL" != "no" ]; then
4419 echo "OpenGL enabled, but GUI disabled."
4420 echo " You might need to either enable the GUI or disable OpenGL"
4424 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4425 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
4427 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
4430 if [ "$CFG_OPENGL" = "yes" ]; then
4431 echo "All the OpenGL functionality tests failed!"
4432 echo " You might need to modify the include and library search paths by editing"
4433 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4434 echo " ${XQMAKESPEC}."
4441 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4442 if [ "$CFG_OPENGL" = "desktop" ]; then
4443 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4444 if [ $? != "0" ]; then
4445 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4452 elif [ "$CFG_OPENGL" = "es2" ]; then
4454 "$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
4455 if [ $? != "0" ]; then
4456 echo "The OpenGL ES 2.0 functionality test failed!"
4457 echo " You might need to modify the include and library search paths by editing"
4458 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4459 echo " ${XQMAKESPEC}."
4462 elif [ "$CFG_OPENGL" = "desktop" ]; then
4463 # Desktop OpenGL support
4464 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4465 if [ $? != "0" ]; then
4466 echo "The OpenGL functionality test failed!"
4467 echo " You might need to modify the include and library search paths by editing"
4468 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4469 echo " ${XQMAKESPEC}."
4474 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4475 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4476 if [ $? != "0" ]; then
4477 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4484 fi # X11/MINGW OpenGL
4486 if [ "$BUILD_ON_MAC" = "yes" ]; then
4487 if [ "$CFG_PHONON" != "no" ]; then
4488 # Always enable Phonon (unless it was explicitly disabled)
4492 if [ "$CFG_COREWLAN" = "auto" ]; then
4493 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
4501 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4502 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4503 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
4505 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
4508 if [ "$CFG_OPENGL" = "yes" ]; then
4509 echo "All the OpenGL functionality tests failed!"
4510 echo " You might need to modify the include and library search paths by editing"
4511 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4512 echo " ${XQMAKESPEC}."
4517 elif [ "$CFG_OPENGL" = "es2" ]; then
4519 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4520 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4521 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4522 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4523 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4524 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4525 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4526 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4529 "$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
4530 if [ $? != "0" ]; then
4531 echo "The OpenGL ES 2.0 functionality test failed!"
4532 echo " You might need to modify the include and library search paths by editing"
4533 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4534 echo " ${XQMAKESPEC}."
4537 elif [ "$CFG_OPENGL" = "desktop" ]; then
4538 # Desktop OpenGL support
4539 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4540 if [ $? != "0" ]; then
4541 echo "The OpenGL functionality test failed!"
4542 echo " You might need to modify the include and library search paths by editing"
4543 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4544 echo " ${XQMAKESPEC}."
4549 # auto-detect FontConfig support
4550 if [ "$CFG_FONTCONFIG" != "no" ]; then
4551 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4552 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4553 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4555 QT_CFLAGS_FONTCONFIG=
4556 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4558 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
4559 QT_CONFIG="$QT_CONFIG fontconfig"
4560 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4561 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4563 CFG_LIBFREETYPE=system
4570 # Save these for a check later
4571 ORIG_CFG_XCB="$CFG_XCB"
4572 ORIG_CFG_EGLFS="$CFG_EGLFS"
4573 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4575 if [ "$CFG_LIBUDEV" != "no" ]; then
4576 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4577 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4578 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4579 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4580 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4582 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
4584 QT_CONFIG="$QT_CONFIG libudev"
4585 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4586 echo "The libudev functionality test failed!"
4590 QMakeVar add DEFINES QT_NO_LIBUDEV
4594 if [ "$CFG_EVDEV" != "no" ]; then
4595 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
4597 QT_CONFIG="$QT_CONFIG evdev"
4598 elif [ "$CFG_EVDEV" = "yes" ]; then
4599 echo "The evdev functionality test failed!"
4603 QMakeVar add DEFINES QT_NO_EVDEV
4607 # Check we actually have X11 :-)
4608 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
4609 QT_CONFIG="$QT_CONFIG xlib"
4612 # auto-detect Xrender support
4613 if [ "$CFG_XRENDER" != "no" ]; then
4614 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
4616 QT_CONFIG="$QT_CONFIG xrender"
4618 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4619 echo "Xrender support cannot be enabled due to functionality tests!"
4620 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4621 echo " If you believe this message is in error you may use the continue"
4622 echo " switch (-continue) to $0 to continue."
4630 if [ "$CFG_XCB" != "no" ]; then
4631 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4632 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4633 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4635 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
4637 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
4638 QT_CONFIG="$QT_CONFIG xcb-render"
4641 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
4643 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4646 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
4647 QT_CONFIG="$QT_CONFIG xcb-xlib"
4650 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4651 # auto-detect XInput2/Xinput support
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."
4670 if [ "$CFG_XCB" = "yes" ]; then
4671 echo "The XCB test failed!"
4672 echo " You might need to install dependency packages."
4673 echo " See src/plugins/platforms/xcb/README."
4677 QMakeVar add DEFINES QT_NO_XCB
4681 if [ "$CFG_DIRECTFB" != "no" ]; then
4682 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4683 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4684 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4685 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
4687 elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4688 echo " DirectFB support cannot be enabled due to functionality tests!"
4689 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4690 echo " If you believe this message is in error you may use the continue"
4691 echo " switch (-continue) to $0 to continue."
4701 # Detect libxkbcommon
4702 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4703 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4704 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4705 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4706 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4708 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4712 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4713 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4714 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4715 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4716 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4717 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4718 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4719 fi # detect EGL support
4720 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
4722 elif [ "$CFG_EGL" = "yes" ]; then
4723 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4724 echo " You might need to modify the include and library search paths by editing"
4725 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4730 elif [ "$CFG_OPENGL" = "desktop" ]; then
4731 if [ "$CFG_EGL" = "yes" ]; then
4732 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4733 echo "Either disable EGL support or enable OpenGL ES support."
4739 if [ "$CFG_EGLFS" != "no" ]; then
4740 if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_EVDEV" = "yes" ]; then
4741 CFG_EGLFS="$CFG_EGL"
4747 # Determine the default QPA platform
4748 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4750 QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
4751 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4752 if [ "$BUILD_ON_MAC" = "yes" ]; then
4753 QT_QPA_DEFAULT_PLATFORM="cocoa"
4754 elif [ "$UNAME_SYSTEM" = "QNX" ]; then
4755 QT_QPA_DEFAULT_PLATFORM="qnx"
4757 QT_QPA_DEFAULT_PLATFORM="xcb"
4762 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4763 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4764 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4765 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4767 if [ "$CFG_DIRECTFB" = "yes" ]; then
4768 QT_CONFIG="$QT_CONFIG directfb"
4769 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4770 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4773 if [ "$BUILD_ON_MAC" = "yes" ]; then
4774 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
4775 QT_CONFIG="$QT_CONFIG coreservices"
4777 QMakeVar add DEFINES QT_NO_CORESERVICES
4781 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
4782 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4783 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4784 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4785 echo "No QPA platform plugin enabled!"
4786 echo " If you really want to build without a QPA platform plugin you must pass"
4787 echo " -no-qpa-platform-guard to configure. Doing this will"
4788 echo " produce a Qt that can not run GUI applications."
4789 echo " The dependencies needed for xcb to build are listed in"
4790 echo " src/plugins/platforms/xcb/README"
4796 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4799 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4800 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4801 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
4802 CFG_LIBFREETYPE=system
4808 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS &&
4809 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4810 echo "STL functionality check failed! Cannot build Qt with this STL library."
4811 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4816 # detect POSIX clock_gettime()
4817 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4818 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
4819 CFG_CLOCK_GETTIME=yes
4821 CFG_CLOCK_GETTIME=no
4825 # detect POSIX monotonic clocks
4826 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4827 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
4828 CFG_CLOCK_MONOTONIC=yes
4830 CFG_CLOCK_MONOTONIC=no
4832 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4833 CFG_CLOCK_MONOTONIC=no
4837 if [ "$CFG_MREMAP" = "auto" ]; then
4838 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
4845 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4846 if [ "$CFG_GETADDRINFO" != "no" ]; then
4847 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
4850 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4851 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4852 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4853 echo " If you believe this message is in error you may use the continue"
4854 echo " switch (-continue) to $0 to continue."
4862 # find if the platform provides inotify
4863 if [ "$CFG_INOTIFY" != "no" ]; then
4864 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
4867 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4868 echo "inotify support cannot be enabled due to functionality tests!"
4869 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4870 echo " If you believe this message is in error you may use the continue"
4871 echo " switch (-continue) to $0 to continue."
4879 # find if the platform provides if_nametoindex (ipv6 interface name support)
4880 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4881 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
4884 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4885 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4886 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4887 echo " If you believe this message is in error you may use the continue"
4888 echo " switch (-continue) to $0 to continue."
4896 # find if the platform provides getifaddrs (network interface enumeration)
4897 if [ "$CFG_GETIFADDRS" != "no" ]; then
4898 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
4901 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4902 echo "getifaddrs support cannot be enabled due to functionality tests!"
4903 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4904 echo " If you believe this message is in error you may use the continue"
4905 echo " switch (-continue) to $0 to continue."
4914 if [ "$CFG_OPENSSL" != "no" ]; then
4915 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
4916 if [ "$CFG_OPENSSL" = "auto" ]; then
4920 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4921 echo "OpenSSL support cannot be enabled due to functionality tests!"
4922 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4923 echo " If you believe this message is in error you may use the continue"
4924 echo " switch (-continue) to $0 to continue."
4933 if [ "$CFG_PCRE" != "qt" ]; then
4934 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
4937 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4938 echo "PCRE support cannot be enabled due to functionality tests!"
4939 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4940 echo " If you believe this message is in error you may use the continue"
4941 echo " switch (-continue) to $0 to continue."
4949 # detect OpenVG support
4950 if [ "$CFG_OPENVG" != "no" ]; then
4951 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
4952 if [ "$CFG_OPENVG" = "auto" ]; then
4955 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
4956 if [ "$CFG_OPENVG" = "auto" ]; then
4959 CFG_OPENVG_ON_OPENGL=yes
4960 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
4961 if [ "$CFG_OPENVG" = "auto" ]; then
4964 CFG_OPENVG_LC_INCLUDES=yes
4965 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
4966 if [ "$CFG_OPENVG" = "auto" ]; then
4969 CFG_OPENVG_LC_INCLUDES=yes
4970 CFG_OPENVG_ON_OPENGL=yes
4972 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4973 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4974 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4975 echo " If you believe this message is in error you may use the continue"
4976 echo " switch (-continue) to $0 to continue."
4982 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
4983 CFG_OPENVG_SHIVA=yes
4987 if [ "$CFG_ALSA" = "auto" ]; then
4988 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
4995 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4996 if [ "$CFG_ARCH" = "arm" ]; then
4997 "$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
4998 if [ $? != "0" ]; then
4999 CFG_JAVASCRIPTCORE_JIT=no
5002 case "$XPLATFORM" in
5004 CFG_JAVASCRIPTCORE_JIT=no
5010 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5011 QMakeVar set JAVASCRIPTCORE_JIT yes
5012 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5013 QMakeVar set JAVASCRIPTCORE_JIT no
5016 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5017 CFG_AUDIO_BACKEND=yes
5020 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5021 echo "Warning: largefile support cannot be disabled for win32."
5025 #-------------------------------------------------------------------------------
5026 # ask for all that hasn't been auto-detected or specified in the arguments
5027 #-------------------------------------------------------------------------------
5029 [ "$CFG_CXX11" = "yes" ] && QT_CONFIG="$QT_CONFIG c++11"
5032 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5033 QT_CONFIG="$QT_CONFIG phonon-backend"
5036 # disable accessibility
5037 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5038 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5040 QT_CONFIG="$QT_CONFIG accessibility"
5044 if [ "$CFG_EGL" = "yes" ]; then
5045 QT_CONFIG="$QT_CONFIG egl"
5047 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5051 if [ "$CFG_EGLFS" = "yes" ]; then
5052 QT_CONFIG="$QT_CONFIG eglfs"
5054 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5058 if [ "$CFG_OPENVG" = "no" ]; then
5059 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5061 QT_CONFIG="$QT_CONFIG openvg"
5062 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5063 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5065 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5066 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5068 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5069 QT_CONFIG="$QT_CONFIG shivavg"
5070 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5075 if [ "$CFG_OPENGL" = "no" ]; then
5076 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5078 QT_CONFIG="$QT_CONFIG opengl"
5081 if [ "$CFG_OPENGL" = "es2" ]; then
5082 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5085 if [ "$CFG_OPENGL" = "es2" ]; then
5086 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5087 QT_CONFIG="$QT_CONFIG opengles2"
5090 # safe execution environment
5091 if [ "$CFG_SXE" != "no" ]; then
5092 QT_CONFIG="$QT_CONFIG sxe"
5095 # build up the variables for output
5096 if [ "$CFG_DEBUG" = "yes" ]; then
5097 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5098 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5099 elif [ "$CFG_DEBUG" = "no" ]; then
5100 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5101 QMAKE_CONFIG="$QMAKE_CONFIG release"
5103 if [ "$CFG_SHARED" = "yes" ]; then
5104 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5105 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5106 elif [ "$CFG_SHARED" = "no" ]; then
5107 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5108 QMAKE_CONFIG="$QMAKE_CONFIG static"
5111 #FIXME: qpa is implicit this should all be removed
5112 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5113 QT_CONFIG="$QT_CONFIG qpa"
5114 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5115 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5117 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5118 # Do not set this here for Windows. Let qmake do it so
5119 # debug and release precompiled headers are kept separate.
5120 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5122 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5123 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5124 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5125 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5126 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5127 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5129 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5130 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5132 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5133 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5134 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5135 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5136 QMakeVar add QMAKE_CFLAGS -g
5137 QMakeVar add QMAKE_CXXFLAGS -g
5138 QT_CONFIG="$QT_CONFIG separate_debug_info"
5140 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5141 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5143 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5144 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5145 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5146 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5147 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5148 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5149 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5150 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5151 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5152 if [ "$CFG_ARCH" = "mips" ]; then
5153 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5154 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5156 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5157 QT_CONFIG="$QT_CONFIG clock-gettime"
5159 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5160 QT_CONFIG="$QT_CONFIG clock-monotonic"
5162 if [ "$CFG_MREMAP" = "yes" ]; then
5163 QT_CONFIG="$QT_CONFIG mremap"
5165 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5166 QT_CONFIG="$QT_CONFIG getaddrinfo"
5168 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5169 QT_CONFIG="$QT_CONFIG ipv6ifname"
5171 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5172 QT_CONFIG="$QT_CONFIG getifaddrs"
5174 if [ "$CFG_INOTIFY" = "yes" ]; then
5175 QT_CONFIG="$QT_CONFIG inotify"
5177 if [ "$CFG_LIBJPEG" = "no" ]; then
5179 elif [ "$CFG_LIBJPEG" = "system" ]; then
5180 QT_CONFIG="$QT_CONFIG system-jpeg"
5182 if [ "$CFG_JPEG" = "no" ]; then
5183 QT_CONFIG="$QT_CONFIG no-jpeg"
5184 elif [ "$CFG_JPEG" = "yes" ]; then
5185 QT_CONFIG="$QT_CONFIG jpeg"
5187 if [ "$CFG_LIBPNG" = "no" ]; then
5190 if [ "$CFG_LIBPNG" = "system" ]; then
5191 QT_CONFIG="$QT_CONFIG system-png"
5193 if [ "$CFG_PNG" = "no" ]; then
5194 QT_CONFIG="$QT_CONFIG no-png"
5195 elif [ "$CFG_PNG" = "yes" ]; then
5196 QT_CONFIG="$QT_CONFIG png"
5198 if [ "$CFG_GIF" = "no" ]; then
5199 QT_CONFIG="$QT_CONFIG no-gif"
5200 elif [ "$CFG_GIF" = "yes" ]; then
5201 QT_CONFIG="$QT_CONFIG gif"
5203 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5204 QT_CONFIG="$QT_CONFIG no-freetype"
5205 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5206 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5207 QT_CONFIG="$QT_CONFIG system-freetype"
5209 QT_CONFIG="$QT_CONFIG freetype"
5211 if [ "$CFG_GUI" = "auto" ]; then
5214 if [ "$CFG_GUI" = "no" ]; then
5215 QT_CONFIG="$QT_CONFIG no-gui"
5218 if [ "$CFG_WIDGETS" = "no" ]; then
5219 QT_CONFIG="$QT_CONFIG no-widgets"
5220 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5223 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5224 #On Mac we implicitly link against libz, so we
5225 #never use the 3rdparty stuff.
5226 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5228 if [ "$CFG_ZLIB" = "yes" ]; then
5229 QT_CONFIG="$QT_CONFIG zlib"
5230 elif [ "$CFG_ZLIB" = "system" ]; then
5231 QT_CONFIG="$QT_CONFIG system-zlib"
5234 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5235 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5236 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5237 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5238 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5239 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5240 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5241 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5242 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5243 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5244 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5245 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5246 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5247 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5249 [ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES"
5250 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5251 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5253 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5254 if [ "$CFG_RPATH" = "yes" ]; then
5255 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5256 # set the default rpath to the library installation directory
5257 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5259 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5260 if [ -n "$RPATH_FLAGS" ]; then
5262 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5266 elif [ "$CFG_RPATH" = "yes" ]; then
5267 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5271 if [ "$CFG_RPATH" = "yes" ]; then
5272 # set the default rpath to the library installation directory
5273 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5275 if [ -n "$RPATH_FLAGS" ]; then
5276 # add the user defined rpaths
5277 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5281 if [ '!' -z "$I_FLAGS" ]; then
5282 # add the user define include paths
5283 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5284 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5287 if [ '!' -z "$W_FLAGS" ]; then
5288 # add the user defined warning flags
5289 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5290 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5291 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5294 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5295 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5296 # Follow default behavior of configure.exe by overriding with "rtti".
5297 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5300 if [ "$CFG_ALSA" = "yes" ]; then
5301 QT_CONFIG="$QT_CONFIG alsa"
5304 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5305 QT_CONFIG="$QT_CONFIG pulseaudio"
5308 if [ "$CFG_COREWLAN" = "yes" ]; then
5309 QT_CONFIG="$QT_CONFIG corewlan"
5312 if [ "$CFG_ICU" = "yes" ]; then
5313 QT_CONFIG="$QT_CONFIG icu"
5316 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5317 QT_CONFIG="$QT_CONFIG force_asserts"
5320 if [ "$CFG_PCRE" = "qt" ]; then
5321 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5325 # Some Qt modules are too advanced in C++ for some old compilers
5326 # Detect here the platforms where they are known to work.
5328 # See Qt documentation for more information on which features are
5329 # supported and on which compilers.
5331 canBuildQtConcurrent="yes"
5332 canUseV8Snapshot="yes"
5334 case "$XPLATFORM" in
5336 # PA-RISC's assembly is too limited
5337 # gcc 3.4 on that platform can't build QtXmlPatterns
5338 # the assembly it generates cannot be compiled
5340 # Check gcc's version
5341 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5345 canBuildQtXmlPatterns="no"
5349 canBuildQtXmlPatterns="no"
5353 unsupported/vxworks-*-g++*)
5356 unsupported/vxworks-*-dcc*)
5358 canBuildQtXmlPatterns="no"
5361 # Check gcc's version
5362 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5370 canBuildQtXmlPatterns="no"
5375 # Check the compiler version
5376 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5379 canBuildQtXmlPatterns="no"
5380 canBuildQtConcurrent="no"
5384 canBuildQtConcurrent="no"
5390 canBuildQtXmlPatterns="no"
5391 canBuildQtConcurrent="no"
5397 # Get the xlC version
5398 cat > xlcver.c <<EOF
5402 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5407 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5408 xlcver=`./xlcver 2>/dev/null`
5411 if [ "$OPT_VERBOSE" = "yes" ]; then
5412 if [ -n "$xlcver" ]; then
5413 echo Found IBM xlC version: $xlcver.
5415 echo Could not determine IBM xlC version, assuming oldest supported.
5422 canBuildQtXmlPatterns="no"
5423 canBuildQtConcurrent="no"
5427 canBuildQtConcurrent="no"
5433 canBuildQtConcurrent="no"
5437 if [ "$CFG_GUI" = "no" ]; then
5438 # WebKit requires QtGui
5442 if [ "$CFG_SHARED" = "no" ]; then
5444 echo "WARNING: Using static linking will disable the WebKit module."
5449 CFG_CONCURRENT="yes"
5450 if [ "$canBuildQtConcurrent" = "no" ]; then
5451 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5454 QT_CONFIG="$QT_CONFIG concurrent"
5458 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5459 QT_CONFIG="$QT_CONFIG audio-backend"
5463 if [ "$CFG_WEBKIT" = "debug" ]; then
5464 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5468 QT_CONFIG="$QT_CONFIG v8"
5469 # Detect snapshot support
5470 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5471 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5474 *) canUseV8Snapshot="no"
5478 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5479 # QEMU crashes when building inside Scratchbox with an ARM target
5480 canUseV8Snapshot="no"
5483 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5484 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5486 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5487 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5490 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5491 QT_CONFIG="$QT_CONFIG v8snapshot"
5495 if [ "$CFG_QML_DEBUG" = "no" ]; then
5496 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5499 case "$QMAKE_CONF_COMPILER" in
5502 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5504 case "$COMPILER_VERSION" in
5506 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5507 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5508 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5511 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5512 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5513 QT_GCC_PATCH_VERSION=0
5523 #-------------------------------------------------------------------------------
5524 # part of configuration information goes into qconfig.h
5525 #-------------------------------------------------------------------------------
5527 case "$CFG_QCONFIG" in
5529 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5532 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5533 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5534 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5535 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5536 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5537 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5539 echo "#endif" >>"$tmpconfig"
5543 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5547 # define QT_EDITION $QT_EDITION
5551 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5552 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5554 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5555 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5558 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5559 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5562 if [ "$BUILD_ON_MAC" = "yes" ]; then
5563 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5564 #if defined(__LP64__)
5565 # define QT_POINTER_SIZE 8
5567 # define QT_POINTER_SIZE 4
5571 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5572 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5575 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5576 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5577 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5581 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5583 if [ "$CFG_DEV" = "yes" ]; then
5584 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5587 # Add QPA to config.h
5588 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5590 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5591 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5594 # Add turned on SQL drivers
5595 for DRIVER in $CFG_SQL_AVAILABLE; do
5596 eval "VAL=\$CFG_SQL_$DRIVER"
5599 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5600 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5601 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5604 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5610 QMakeVar set sql-drivers "$SQL_DRIVERS"
5611 QMakeVar set sql-plugins "$SQL_PLUGINS"
5613 # Add other configuration options to the qconfig.h file
5614 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5615 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5616 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5617 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5618 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5619 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5621 # X11/Unix/Mac only configs
5622 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5623 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5624 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5625 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5626 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5627 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5628 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5629 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5630 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5631 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5632 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5633 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5634 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5635 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5637 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5638 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5639 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5640 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5641 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5642 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5643 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5644 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5645 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5646 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5647 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5648 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5649 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5651 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5652 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5653 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5654 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5655 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5656 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5657 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5658 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5660 # sort QCONFIG_FLAGS for neatness if we can
5661 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5662 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5664 if [ -n "$QCONFIG_FLAGS" ]; then
5665 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5666 #ifndef QT_BOOTSTRAPPED
5669 for cfg in $QCONFIG_FLAGS; do
5670 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5671 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5672 # figure out define logic, so we can output the correct
5673 # ifdefs to override the global defines in a project
5675 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5676 # QT_NO_option can be forcefully turned on by QT_option
5677 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5678 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5679 # QT_option can be forcefully turned off by QT_NO_option
5680 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5683 if [ -z $cfgdNeg ]; then
5684 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5691 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5692 #if defined($cfgd) && defined($cfgdNeg)
5694 #elif !defined($cfgd) && !defined($cfgdNeg)
5701 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5702 #endif // QT_BOOTSTRAPPED
5707 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5708 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5709 #define QT_VISIBILITY_AVAILABLE
5714 if [ -n "$QT_LIBINFIX" ]; then
5715 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5716 #define QT_LIBINFIX "$QT_LIBINFIX"
5721 echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5723 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5724 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5725 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5727 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5728 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5729 chmod -w "$outpath/src/corelib/global/qconfig.h"
5730 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5731 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5735 #-------------------------------------------------------------------------------
5736 # save configuration into qconfig.pri
5737 #-------------------------------------------------------------------------------
5738 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5739 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5740 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5741 if [ "$CFG_DEBUG" = "yes" ]; then
5742 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5743 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5744 QT_CONFIG="$QT_CONFIG release"
5746 QT_CONFIG="$QT_CONFIG debug"
5747 elif [ "$CFG_DEBUG" = "no" ]; then
5748 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5749 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5750 QT_CONFIG="$QT_CONFIG debug"
5752 QT_CONFIG="$QT_CONFIG release"
5754 if [ "$CFG_FRAMEWORK" = "no" ]; then
5755 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5757 QT_CONFIG="$QT_CONFIG qt_framework"
5758 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5760 if [ "$CFG_DEV" = "yes" ]; then
5761 QT_CONFIG="$QT_CONFIG private_tests"
5764 cat >>"$QTCONFIG.tmp" <<EOF
5766 CONFIG += $QTCONFIG_CONFIG
5768 QT_HOST_ARCH = $CFG_HOST_ARCH
5769 QT_CPU_FEATURES = $CFG_CPUFEATURES
5770 QT_HOST_CPU_FEATURES = $CFG_HOST_CPUFEATURES
5771 QT_EDITION = $Edition
5772 QT_CONFIG += $QT_CONFIG
5775 QT_VERSION = $QT_VERSION
5776 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5777 QT_MINOR_VERSION = $QT_MINOR_VERSION
5778 QT_PATCH_VERSION = $QT_PATCH_VERSION
5781 QT_LIBINFIX = $QT_LIBINFIX
5782 QT_NAMESPACE = $QT_NAMESPACE
5786 if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
5787 echo "# pkgconfig" >> "$QTCONFIG.tmp"
5788 echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
5789 echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp"
5790 echo >> "$QTCONFIG.tmp"
5793 if [ -n "$CFG_SYSROOT" ]; then
5794 echo "# sysroot" >>"$QTCONFIG.tmp"
5795 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5796 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5797 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5798 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5799 echo "}" >> "$QTCONFIG.tmp"
5800 echo >> "$QTCONFIG.tmp"
5802 if [ -n "$RPATH_FLAGS" ]; then
5803 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5805 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5806 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5807 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5808 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5811 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5812 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5813 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5816 # replace qconfig.pri if it differs from the newly created temp file
5817 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5818 rm -f "$QTCONFIG.tmp"
5820 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5823 #-------------------------------------------------------------------------------
5824 # save configuration into qmodule.pri
5825 #-------------------------------------------------------------------------------
5826 QTMODULE="$outpath/mkspecs/qmodule.pri"
5828 echo "CONFIG += $QMAKE_CONFIG create_prl link_prl" >> "$QTMODULE.tmp"
5830 # Ensure we can link to uninistalled libraries
5831 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5832 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5834 if [ -n "$QT_CFLAGS_PSQL" ]; then
5835 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5837 if [ -n "$QT_LFLAGS_PSQL" ]; then
5838 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5840 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5841 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5843 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5844 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5846 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5847 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5849 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5850 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5852 if [ -n "$QT_LFLAGS_ODBC" ]; then
5853 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5855 if [ -n "$QT_LFLAGS_TDS" ]; then
5856 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5859 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5860 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5863 #dump in the OPENSSL_LIBS info
5864 if [ '!' -z "$OPENSSL_LIBS" ]; then
5865 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5866 elif [ "$CFG_OPENSSL" = "linked" ]; then
5867 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5870 #dump in the SDK info
5871 if [ '!' -z "$CFG_SDK" ]; then
5872 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5876 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5877 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5879 # replace qmodule.pri if it differs from the newly created temp file
5880 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5881 rm -f "$QTMODULE.tmp"
5883 mv -f "$QTMODULE.tmp" "$QTMODULE"
5886 #-------------------------------------------------------------------------------
5887 # save configuration into .qmake.cache
5888 #-------------------------------------------------------------------------------
5890 CACHEFILE="$outpath/.qmake.cache"
5891 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5892 cat >>"$CACHEFILE.tmp" <<EOF
5894 QT_SOURCE_TREE = \$\$quote($relpath)
5895 QT_BUILD_TREE = \$\$quote($outpath)
5896 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5898 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5899 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5900 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5902 include(\$\$PWD/mkspecs/qmodule.pri)
5903 CONFIG += dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5907 #dump the qmake spec
5908 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5909 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5911 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5914 # replace .qmake.cache if it differs from the newly created temp file
5915 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5916 rm -f "$CACHEFILE.tmp"
5918 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5921 #-------------------------------------------------------------------------------
5922 # give feedback on configuration
5923 #-------------------------------------------------------------------------------
5924 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5927 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5928 echo "Build type: $PLATFORM"
5930 echo "Building on: $PLATFORM"
5931 echo "Building for: $XPLATFORM"
5934 # the missing space before $CFG_FEATURES is intentional
5935 echo "Architecture: $CFG_ARCH, features:$CFG_CPUFEATURES"
5936 echo "Host architecture: $CFG_HOST_ARCH, features:$CFG_HOST_CPUFEATURES"
5938 if [ -n "$PLATFORM_NOTES" ]; then
5939 echo "Platform notes:"
5940 echo "$PLATFORM_NOTES"
5945 if [ "$OPT_VERBOSE" = "yes" ]; then
5946 echo $ECHO_N "qmake vars .......... $ECHO_C"
5947 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5948 echo "qmake switches ......... $QMAKE_SWITCHES"
5951 echo "Build .................. $CFG_BUILD_PARTS"
5952 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5953 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5954 echo "Debug .................. yes (combined)"
5955 if [ "$CFG_DEBUG" = "yes" ]; then
5956 echo "Default Link ........... debug"
5958 echo "Default Link ........... release"
5961 echo "Debug .................. $CFG_DEBUG"
5963 echo "C++11 support .......... $CFG_CXX11"
5964 if [ -n "$PKG_CONFIG" ]; then
5965 echo "pkg-config ............. yes"
5967 echo "pkg-config ............. no"
5969 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5970 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5971 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5972 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5973 echo "QtGui module ........... $CFG_GUI"
5974 echo "QtWidgets module ....... $CFG_WIDGETS"
5975 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5976 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5978 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5980 echo "QML debugging .......... $CFG_QML_DEBUG"
5981 echo "PCH support ............ $CFG_PRECOMPILE"
5982 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5983 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5984 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5985 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5986 elif [ "$CFG_ARCH" = "arm" ]; then
5987 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5988 echo "NEON support ........... ${CFG_NEON}"
5990 if [ "$CFG_ARCH" = "mips" ]; then
5991 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5993 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5994 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5995 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5996 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5997 echo "NIS support ............ $CFG_NIS"
5998 echo "CUPS support ........... $CFG_CUPS"
5999 echo "Iconv support .......... $CFG_ICONV"
6000 echo "Glib support ........... $CFG_GLIB"
6001 echo "GStreamer support ...... $CFG_GSTREAMER"
6002 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6003 echo "Large File support ..... $CFG_LARGEFILE"
6004 echo "GIF support ............ $CFG_GIF"
6005 if [ "$CFG_JPEG" = "no" ]; then
6006 echo "JPEG support ........... $CFG_JPEG"
6008 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6010 if [ "$CFG_PNG" = "no" ]; then
6011 echo "PNG support ............ $CFG_PNG"
6013 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6015 echo "zlib support ........... $CFG_ZLIB"
6016 echo "Session management ..... $CFG_SM"
6017 echo "libudev support ........ $CFG_LIBUDEV"
6019 if [ "$CFG_OPENGL" = "desktop" ]; then
6020 echo "OpenGL support ......... yes (Desktop OpenGL)"
6021 elif [ "$CFG_OPENGL" = "es2" ]; then
6022 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6024 echo "OpenGL support ......... no"
6027 if [ "$CFG_OPENVG" ]; then
6028 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6029 echo "OpenVG support ......... ShivaVG"
6031 echo "OpenVG support ......... $CFG_OPENVG"
6035 echo "XShape support ......... $CFG_XSHAPE"
6036 echo "XVideo support ......... $CFG_XVIDEO"
6037 echo "XSync support .......... $CFG_XSYNC"
6038 echo "Xinerama support ....... $CFG_XINERAMA"
6039 echo "Xcursor support ........ $CFG_XCURSOR"
6040 echo "Xfixes support ......... $CFG_XFIXES"
6041 echo "Xrandr support ......... $CFG_XRANDR"
6042 echo "Xi support ............. $CFG_XINPUT"
6043 echo "MIT-SHM support ........ $CFG_MITSHM"
6044 echo "FontConfig support ..... $CFG_FONTCONFIG"
6045 echo "XKB Support ............ $CFG_XKB"
6046 echo "immodule support ....... $CFG_IM"
6047 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6049 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6050 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6051 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6052 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6053 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6054 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6055 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6056 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6057 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6060 if [ "$CFG_OPENSSL" = "yes" ]; then
6061 OPENSSL_LINKAGE="(run-time)"
6062 elif [ "$CFG_OPENSSL" = "linked" ]; then
6063 OPENSSL_LINKAGE="(linked)"
6065 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6066 echo "Alsa support ........... $CFG_ALSA"
6067 if [ "$BUILD_ON_MAC" = "yes" ]; then
6068 echo "CoreWlan support ....... $CFG_COREWLAN"
6070 echo "libICU support ......... $CFG_ICU"
6071 echo "PCRE support ........... $CFG_PCRE"
6072 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6073 echo "Xcb support ............ limited (old version)"
6075 echo "Xcb support ............ $CFG_XCB"
6077 echo "Xrender support ........ $CFG_XRENDER"
6078 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6079 echo "XInput2 support ........ $CFG_XINPUT2"
6081 echo "EGLFS support .......... $CFG_EGLFS"
6082 echo "DirectFB support ....... $CFG_DIRECTFB"
6085 # complain about not being able to use dynamic plugins if we are using a static build
6086 if [ "$CFG_SHARED" = "no" ]; then
6088 echo "WARNING: Using static linking will disable the use of dynamically"
6089 echo "loaded plugins. Make sure to import all needed static plugins,"
6090 echo "or compile needed modules into the library."
6093 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6095 echo "NOTE: When linking against OpenSSL, you can override the default"
6096 echo "library names through OPENSSL_LIBS."
6098 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6102 exec 1>&3 3>&- # restore stdout
6103 cat $outpath/config.summary # display config feedback to user
6105 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6107 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6108 echo "if you want a pure debug build."
6113 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6118 #-------------------------------------------------------------------------------
6119 # build makefiles based on the configuration
6120 #-------------------------------------------------------------------------------
6122 echo "Finding project files. Please wait..."
6123 if [ "$CFG_NOPROCESS" != "yes" ]; then
6124 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6125 if [ -f "${relpath}/qtbase.pro" ]; then
6126 mkfile="${outpath}/Makefile"
6127 [ -f "$mkfile" ] && chmod +w "$mkfile"
6128 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6132 # .projects -> projects to process
6133 # .projects.1 -> qt and moc
6134 # .projects.2 -> subdirs and libs
6135 # .projects.3 -> the rest
6136 rm -f .projects .projects.1 .projects.2 .projects.3
6138 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6139 if [ -z "$AWK" ]; then
6140 for p in `echo $QMAKE_PROJECTS`; do
6141 echo "$p" >> .projects
6144 cat >projects.awk <<EOF
6150 first = "./.projects.1.tmp"
6151 second = "./.projects.2.tmp"
6152 third = "./.projects.3.tmp"
6157 if ( ! target_file )
6159 print input_file >target_file
6164 input_file = FILENAME
6169 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6172 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6173 target_file = second
6178 matched_target == 0 && /^(TEMPLATE.*=)/ {
6179 if ( \$3 == "subdirs" )
6180 target_file = second
6181 else if ( \$3 == "lib" )
6187 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6188 if ( \$0 ~ /plugin/ )
6191 target_file = second
6196 if ( ! target_file )
6198 print input_file >>target_file
6205 for p in `echo $QMAKE_PROJECTS`; do
6206 echo "$p" >> .projects.all
6209 # if you get errors about the length of the command line to awk, change the -l arg
6211 split -l 100 .projects.all .projects.all.
6212 for p in .projects.all.*; do
6213 "$AWK" -f projects.awk `cat $p`
6214 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6215 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6216 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6217 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6219 rm -f .projects.all* projects.awk
6221 [ -f .projects.1 ] && cat .projects.1 >>.projects
6222 [ -f .projects.2 ] && cat .projects.2 >>.projects
6223 rm -f .projects.1 .projects.2
6224 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6225 cat .projects.3 >>.projects
6229 # don't sort Qt and MOC in with the other project files
6230 # also work around a segfaulting uniq(1)
6231 if [ -f .sorted.projects.2 ]; then
6232 sort .sorted.projects.2 > .sorted.projects.2.new
6233 mv -f .sorted.projects.2.new .sorted.projects.2
6234 cat .sorted.projects.2 >> .sorted.projects.1
6236 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6237 rm -f .sorted.projects.2 .sorted.projects.1
6241 if [ -f .projects ]; then
6242 uniq .projects >.tmp
6243 mv -f .tmp .projects
6244 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6246 if [ -f .projects.3 ]; then
6247 uniq .projects.3 >.tmp
6248 mv -f .tmp .projects.3
6249 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6251 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6255 for part in $CFG_BUILD_PARTS; do
6257 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6258 libs) PART_ROOTS="$PART_ROOTS src" ;;
6259 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6260 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6265 if [ "$CFG_DEV" = "yes" ]; then
6266 PART_ROOTS="$PART_ROOTS tests"
6269 echo "Creating makefiles. Please wait..."
6270 for file in .projects .projects.3; do
6271 [ '!' -f "$file" ] && continue
6272 for a in `cat $file`; do
6274 for r in $PART_ROOTS; do
6275 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6280 [ "$IN_ROOT" = "no" ] && continue
6283 *winmain/winmain.pro)
6284 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6288 */qmake/qmake.pro) continue ;;
6289 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*|*tools/qdbusxml2cpp*|*tools/qdbuscpp2xml*) SPEC=$QMAKESPEC ;;
6290 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6296 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6297 test -d "$dir" || mkdir -p "$dir"
6298 OUTDIR="$outpath/$dir"
6299 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6300 # fast configure - the makefile exists, skip it
6301 # since the makefile exists, it was generated by qmake, which means we
6302 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6304 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6307 QMAKE_SPEC_ARGS="-spec $SPEC"
6308 echo $ECHO_N " for $a$ECHO_C"
6310 QMAKE="$outpath/bin/qmake"
6311 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6312 if [ "$file" = ".projects.3" ]; then
6315 cat >"${OUTDIR}/Makefile" <<EOF
6316 # ${OUTDIR}/Makefile: generated by configure
6318 # WARNING: This makefile will be replaced with a real makefile.
6319 # All changes made to this file will be lost.
6321 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6323 cat >>"${OUTDIR}/Makefile" <<EOF
6325 all clean install qmake first Makefile: FORCE
6326 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6334 if [ "$OPT_VERBOSE" = "yes" ]; then
6335 echo " (`basename $SPEC`)"
6336 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6341 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6342 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6346 rm -f .projects .projects.3
6348 #-------------------------------------------------------------------------------
6349 # check for platforms that we don't yet know about
6350 #-------------------------------------------------------------------------------
6351 if [ "$CFG_ARCH" = "unknown" ]; then
6354 NOTICE: configure was unable to determine the architecture
6355 for the $XQMAKESPEC target.
6357 Qt will not use a specialized implementation for any atomic
6358 operations. Instead a generic implemention based on either GCC
6359 intrinsics or C++11 std::atomic<T> will be used (when
6360 available). The generic implementations are generally as fast
6361 as and always as safe as a specialized implementation.
6363 If no generic implementation is available, Qt will use a
6364 fallback UNIX implementation which uses a single
6365 pthread_mutex_t to protect all atomic operations. This
6366 implementation is the slow (but safe) fallback implementation
6367 for architectures Qt does not yet support.
6371 #-------------------------------------------------------------------------------
6372 # check if the user passed the -no-zlib option, which is no longer supported
6373 #-------------------------------------------------------------------------------
6374 if [ -n "$ZLIB_FORCED" ]; then
6375 which_zlib="supplied"
6376 if [ "$CFG_ZLIB" = "system" ]; then
6382 NOTICE: The -no-zlib option was supplied but is no longer
6385 Qt now requires zlib support in all builds, so the -no-zlib
6386 option was ignored. Qt will be built using the $which_zlib
6391 #-------------------------------------------------------------------------------
6392 # check if the user passed the obsoleted -wayland or -no-wayland flag
6393 #-------------------------------------------------------------------------------
6394 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6397 NOTICE: The -wayland and -no-wayland flags are now obsolete
6399 All configuring of QtWayland plugin and QtCompositor happens in the module
6403 #-------------------------------------------------------------------------------
6404 # check if the user passed the obsoleted -arch or -host-arch options
6405 #-------------------------------------------------------------------------------
6406 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6409 NOTICE: The -arch and -host-arch options are obsolete.
6411 Qt now detects the target and host architectures based on compiler
6412 output. Qt will be built using $CFG_ARCH for the target architecture
6413 and $CFG_HOST_ARCH for the host architecture (note that these two
6414 will be the same unless you are cross-compiling).
6418 #-------------------------------------------------------------------------------
6419 # finally save the executed command to another script
6420 #-------------------------------------------------------------------------------
6421 if [ `basename $0` != "config.status" ]; then
6422 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6424 # add the system variables
6425 for varname in $SYSTEM_VARIABLES; do
6427 'if [ -n "\$'${varname}'" ]; then
6428 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6433 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6435 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6436 echo "#!/bin/sh" > "$outpath/config.status"
6437 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6438 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6439 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6440 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6441 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6442 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6443 echo "else" >> "$outpath/config.status"
6444 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6445 echo "fi" >> "$outpath/config.status"
6446 chmod +x "$outpath/config.status"
6449 if [ -n "$RPATH_MESSAGE" ]; then
6451 echo "$RPATH_MESSAGE"
6454 MAKE=`basename "$MAKE"`
6456 echo Qt is now configured for building. Just run \'$MAKE\'.
6457 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6458 echo Once everything is built, Qt is installed.
6459 echo You should not run \'$MAKE install\'.
6461 echo Once everything is built, you must run \'$MAKE install\'.
6462 echo Qt will be installed into $QT_INSTALL_PREFIX
6465 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.