2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
74 DEVICE_VARS_FILE=.device.vars
77 :> "$DEVICE_VARS_FILE"
79 #-------------------------------------------------------------------------------
81 #-------------------------------------------------------------------------------
85 echo "$@" | sed 's/ /\ /g'
88 # Adds a new qmake variable to the cache
89 # Usage: QMakeVar mode varname contents
90 # where mode is one of: set, add, del
104 echo >&2 "BUG: wrong command to QMakeVar: $1"
108 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
111 # Helper function for getQMakeConf. It parses include statements in
112 # qmake.conf and prints out the expanded file
115 while read line; do case "$line" in
117 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
118 current_dir=`dirname "$1"`
119 conf_file="$current_dir/$inc_file"
120 if [ ! -f "$conf_file" ]; then
121 echo "WARNING: Unable to find file $conf_file" >&2
124 getQMakeConf1 "$conf_file"
136 values["LITERAL_WHITESPACE"] = " "
137 values["LITERAL_DOLLAR"] = "$"
139 /^[_A-Z0-9.]+[ \t]*\+?=/ {
140 valStart = index($0, "=") + 1
143 if (substr($0, valStart - 2, 1) == "+") {
147 variable = substr($0, 0, valStart - 2 - append)
148 value = substr($0, valStart)
149 gsub("[ \t]+", "", variable)
150 gsub("^[ \t]+", "", value)
151 gsub("[ \t]+$", "", value)
154 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
155 ovalue = ovalue substr(value, 1, RSTART - 1)
156 var = substr(value, RSTART + 2, RLENGTH - 2)
157 value = substr(value, RSTART + RLENGTH)
159 var = substr(var, 2, length(var) - 2)
161 ovalue = ovalue values[var]
163 ovalue = ovalue value
165 combinedValue = values[variable]
166 if (append == 1 && length(combinedValue) > 0) {
167 combinedValue = combinedValue " " ovalue
169 combinedValue = ovalue
171 values[variable] = combinedValue
174 for (var in values) {
175 print var "=" values[var]
183 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
186 # relies on $QMAKESPEC being set correctly. parses include statements in
187 # qmake.conf and prints out the expanded file
190 if [ -z "$specvals" ]; then
191 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
193 getQMakeConf3 "$1" "$specvals"
198 if [ -z "$xspecvals" ]; then
199 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$xspecvals"
204 # relies on $TEST_COMPILER being set correctly
205 compilerSupportsFlag()
207 cat >conftest.cpp <<EOF
208 int main() { return 0; }
210 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
212 rm -f conftest.cpp conftest.o
216 # relies on $TEST_COMPILER being set correctly
222 safe_flag=`shellEscape "$flag"`
223 lflags=$lflags,$safe_flag
225 compilerSupportsFlag "$lflags" >/dev/null 2>&1
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
238 echo >&2 "BUG: wrong command to QMakeVar: $1"
242 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
245 #-------------------------------------------------------------------------------
246 # operating system detection
247 #-------------------------------------------------------------------------------
249 # need that throughout the script
250 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
251 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
252 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
253 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
255 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
256 if echo '\c' | grep '\c' >/dev/null; then
262 #-------------------------------------------------------------------------------
263 # window system detection
264 #-------------------------------------------------------------------------------
268 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
273 #-----------------------------------------------------------------------------
274 # Qt version detection
275 #-----------------------------------------------------------------------------
276 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
280 if [ -n "$QT_VERSION" ]; then
281 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
282 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
283 if [ -n "$MAJOR" ]; then
284 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
285 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
286 QT_MAJOR_VERSION="$MAJOR"
287 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
288 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
291 if [ -z "$QT_MAJOR_VERSION" ]; then
292 echo "Cannot process version from qglobal.h: $QT_VERSION"
293 echo "Cannot proceed."
297 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
298 if [ -z "$QT_PACKAGEDATE" ]; then
299 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
300 echo "Cannot proceed"
304 #-------------------------------------------------------------------------------
306 #-------------------------------------------------------------------------------
310 EditionString=Commercial
314 # parse the arguments, setting things to "yes" or "no"
315 while [ "$#" -gt 0 ]; do
319 #Autoconf style options
321 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
325 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
329 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
330 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
333 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
336 -h|help|--help|-help)
337 if [ "$VAL" = "yes" ]; then
339 COMMERCIAL_USER="no" #doesn't matter we will display the help
342 COMMERCIAL_USER="no" #doesn't matter we will display the help
346 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
350 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
357 if [ "$UNKNOWN_ARG" = "yes" ]; then
369 COMMERCIAL_USER="yes"
383 if [ "$COMMERCIAL_USER" = "ask" ]; then
385 echo "Which edition of Qt do you want to use ?"
387 echo "Type 'c' if you want to use the Commercial Edition."
388 echo "Type 'o' if you want to use the Open Source Edition."
392 if [ "$commercial" = "c" ]; then
393 COMMERCIAL_USER="yes"
395 elif [ "$commercial" = "o" ]; then
402 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
403 # Commercial preview release
404 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
407 QT_EDITION="QT_EDITION_DESKTOP"
408 LicenseType="Technology Preview"
409 elif [ $COMMERCIAL_USER = "yes" ]; then
410 # one of commercial editions
411 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
413 # read in the license file
414 if [ -f "$LICENSE_FILE" ]; then
415 . "$LICENSE_FILE" >/dev/null 2>&1
416 if [ -z "$LicenseKeyExt" ]; then
418 echo "You are using an old license file."
420 echo "Please install the license file supplied by Nokia,"
421 echo "or install the Qt Open Source Edition if you intend to"
422 echo "develop free software."
425 if [ -z "$Licensee" ]; then
427 echo "Invalid license key. Please check the license key."
431 if [ -z "$LicenseKeyExt" ]; then
433 echo $ECHO_N "Please enter your license key: $ECHO_C"
435 Licensee="Unknown user"
440 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
441 && LicenseValid="yes" \
443 if [ "$LicenseValid" != "yes" ]; then
445 echo "Invalid license key. Please check the license key."
448 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
449 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
450 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
451 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
453 # determine which edition we are licensed to use
454 case "$LicenseTypeCode" in
456 LicenseType="Commercial"
460 QT_EDITION="QT_EDITION_UNIVERSAL"
463 Edition="FullFramework"
464 EditionString="Full Framework"
465 QT_EDITION="QT_EDITION_DESKTOP"
468 Edition="GUIFramework"
469 EditionString="GUI Framework"
470 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
475 LicenseType="Evaluation"
476 QMakeVar add DEFINES QT_EVAL
480 QT_EDITION="QT_EDITION_EVALUATION"
485 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
487 echo "Invalid license key. Please check the license key."
491 # verify that we are licensed to use Qt on this platform
493 case "$PlatformCode" in
496 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
500 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
503 ### EMBEDDED_QPA logic missing ###
504 case "$PlatformCode,$PLATFORM_MAC" in
505 X9,* | XC,* | XU,* | XW,* | XM,*)
507 LICENSE_EXTENSION="-ALLOS"
509 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
510 # Qt for Embedded Linux
511 LICENSE_EXTENSION="-EMBEDDED"
513 6M,* | N7,* | N9,* | NX,*)
515 LICENSE_EXTENSION="-EMBEDDED"
517 FM,* | LM,yes | ZM,no)
519 LICENSE_EXTENSION="-DESKTOP"
523 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
525 echo "You are not licensed for the $Platform platform."
527 echo "Please contact qt-info@nokia.com to upgrade your license to"
528 echo "include the $Platform platform, or install the Qt Open Source Edition"
529 echo "if you intend to develop free software."
534 if test -r "$relpath/.LICENSE"; then
535 # Generic, non-final license
537 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
542 *TECHNOLOGY?PREVIEW*)
549 echo >&2 "Invalid license files; cannot continue"
554 EditionString="$Edition"
555 QT_EDITION="QT_EDITION_DESKTOP"
558 case "$LicenseFeatureCode" in
561 case "$LicenseType" in
563 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
566 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
572 case "$LicenseType" in
574 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
577 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
583 echo "Invalid license key. Please check the license key."
587 case "$LicenseFeatureCode" in
595 if [ '!' -f "$outpath/LICENSE" ]; then
596 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
597 echo "this software has disappeared."
599 echo "Sorry, you are not licensed to use this software."
600 echo "Try re-installing."
604 elif [ $COMMERCIAL_USER = "no" ]; then
605 # Open Source edition - may only be used under the terms of the GPL or LGPL.
606 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
607 Licensee="Open Source"
609 EditionString="Open Source"
610 QT_EDITION="QT_EDITION_OPENSOURCE"
613 #-------------------------------------------------------------------------------
614 # initalize variables
615 #-------------------------------------------------------------------------------
617 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
618 for varname in $SYSTEM_VARIABLES; do
619 qmakevarname="${varname}"
620 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
621 if [ "${varname}" = "LDFLAGS" ]; then
622 qmakevarname="LFLAGS"
623 elif [ "${varname}" = "LD" ]; then
627 'if [ -n "\$'${varname}'" ]; then
628 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
632 # Use CC/CXX to run config.tests
633 mkdir -p "$outpath/config.tests"
634 rm -f "$outpath/config.tests/.qmake.cache"
635 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
637 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
639 # QTDIR may be set and point to an old or system-wide Qt installation
642 # the minimum version of libdbus-1 that we require:
643 MIN_DBUS_1_VERSION=0.93
645 # initalize internal variables
646 CFG_CONFIGURE_EXIT_ON_ERROR=yes
648 CFG_EXCEPTIONS=unspecified
649 CFG_GUI=auto # (yes|no|auto)
675 CFG_OPENVG_LC_INCLUDES=no
676 CFG_OPENVG_SHIVA=auto
677 CFG_OPENVG_ON_OPENGL=auto
683 QT_DEFAULT_BUILD_PARTS="libs examples"
687 CFG_AUDIO_BACKEND=auto
690 CFG_JAVASCRIPTCORE_JIT=auto
693 # Target architecture
695 # Host architecture, same as CFG_ARCH when not cross-compiling
697 # Set when the -arch or -host-arch arguments are used
698 OPT_OBSOLETE_HOST_ARG=no
710 CFG_OBSOLETE_WAYLAND=no
722 CFG_SEPARATE_DEBUG_INFO=no
723 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
724 CFG_REDUCE_EXPORTS=auto
732 CFG_REDUCE_RELOCATIONS=auto
733 CFG_ACCESSIBILITY=auto
738 CFG_CLOCK_GETTIME=auto
739 CFG_CLOCK_MONOTONIC=auto
747 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
751 CFG_PREFIX_INSTALL=yes
760 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
761 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
765 OPT_CONFIRM_LICENSE=no
778 QPA_PLATFORM_GUARD=yes
780 # initalize variables used for installation
789 QT_INSTALL_TRANSLATIONS=
798 #flags for SQL drivers
806 QT_LFLAGS_ODBC="-lodbc"
809 # flags for libdbus-1
813 # flags for Glib (X11 only)
817 # flags for GStreamer (X11 only)
821 #-------------------------------------------------------------------------------
822 # check SQL drivers available in this package
823 #-------------------------------------------------------------------------------
825 # opensource version removes some drivers, so force them to be off
831 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
832 for a in "$relpath/src/plugins/sqldrivers/"*; do
834 base_a=`basename "$a"`
835 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
836 eval "CFG_SQL_${base_a}=auto"
841 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
842 if [ -d "$relpath/src/plugins/imageformats" ]; then
843 for a in "$relpath/src/plugins/imageformats/"*; do
845 base_a=`basename "$a"`
846 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
851 #-------------------------------------------------------------------------------
852 # parse command line arguments
853 #-------------------------------------------------------------------------------
855 # parse the arguments, setting things to "yes" or "no"
856 while [ "$#" -gt 0 ]; do
860 #Autoconf style options
862 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
866 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
870 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
871 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
874 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
878 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
882 -no-*-*|-plugin-*-*|-qt-*-*)
883 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
884 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
888 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
891 #Qt style yes options
892 -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|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon)
893 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
896 #Qt style options that pass an argument
899 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
903 -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)
904 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
908 #Qt style complex options in one command
909 -enable-*|-disable-*)
910 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
911 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
913 #Qt Builtin/System style options
914 -no-*|-system-*|-qt-*)
915 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
916 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
918 #Options that cannot be generalized
925 # this option may or may not be followed by an argument
926 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
935 # this option may or may not be followed by an argument
936 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
944 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
945 # this option may or may not be followed by an argument
946 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
965 if [ "$1" = "-D" ]; then
969 VAL=`echo $1 | sed 's,-D,,'`
974 # this option may or may not be followed by an argument
975 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
984 if [ "$1" = "-I" ]; then
988 VAL=`echo $1 | sed 's,-I,,'`
993 if [ "$1" = "-L" ]; then
997 VAL=`echo $1 | sed 's,-L,,'`
1002 if [ "$1" = "-R" ]; then
1006 VAL=`echo $1 | sed 's,-R,,'`
1011 VAL=`echo $1 | sed 's,-l,,'`
1015 if [ "$1" = "-F" ]; then
1019 VAL=`echo $1 | sed 's,-F,,'`
1024 if [ "$1" = "-fw" ]; then
1028 VAL=`echo $1 | sed 's,-fw,,'`
1036 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1043 if [ "$UNKNOWN_ARG" = "yes" ]; then
1044 echo "$1: unknown argument"
1055 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1056 CFG_ACCESSIBILITY="$VAL"
1065 CFG_USE_GNUMAKE="$VAL"
1068 CFG_MYSQL_CONFIG="$VAL"
1071 QT_INSTALL_PREFIX="$VAL"
1074 QT_HOST_PREFIX="$VAL"
1083 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1084 CFG_PKGCONFIG="$VAL"
1090 CFG_PKGCONFIG="force"
1093 QT_INSTALL_DOCS="$VAL"
1096 QT_INSTALL_HEADERS="$VAL"
1099 QT_INSTALL_PLUGINS="$VAL"
1102 QT_INSTALL_IMPORTS="$VAL"
1105 QT_INSTALL_DATA="$VAL"
1108 QT_INSTALL_LIBS="$VAL"
1117 QT_INSTALL_TRANSLATIONS="$VAL"
1119 sysconfdir|settingsdir)
1120 QT_INSTALL_SETTINGS="$VAL"
1123 QT_INSTALL_EXAMPLES="$VAL"
1126 QT_INSTALL_TESTS="$VAL"
1135 QT_INSTALL_BINS="$VAL"
1141 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1148 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1149 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1150 [ "$VAL" = "es2" ]; then
1157 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1164 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1167 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1170 if [ "$BUILD_ON_MAC" = "yes" ]; then
1177 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1178 CFG_MAC_DWARF2="$VAL"
1184 OPT_OBSOLETE_HOST_ARG=yes
1187 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1188 CFG_MAC_HARFBUZZ="$VAL"
1195 if [ "$BUILD_ON_MAC" = "yes" ]; then
1196 CFG_FRAMEWORK="$VAL"
1202 if [ "$VAL" = "yes" ]; then
1204 QMakeVar add QMAKE_CFLAGS -pg
1205 QMakeVar add QMAKE_CXXFLAGS -pg
1206 QMakeVar add QMAKE_LFLAGS -pg
1207 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1213 if [ "$VAL" = "yes" ]; then
1214 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1217 exceptions|g++-exceptions)
1218 if [ "$VAL" = "no" ]; then
1220 elif [ "$VAL" = "yes" ]; then
1228 # keep compatibility with old platform names
1234 PLATFORM=hpux-acc-o64
1237 PLATFORM=hpux-acc-64
1240 PLATFORM=hpux-acc-64
1252 PLATFORM=reliant-cds-64
1255 PLATFORM=solaris-cc-64
1258 PLATFORM=unixware-cc
1261 PLATFORM=unixware-g++
1264 PLATFORM=unixware-cc
1267 PLATFORM=unixware-g++
1273 i386) NATIVE_64_ARCH="x86_64" ;;
1274 powerpc) NATIVE_64_ARCH="ppc64" ;;
1275 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1277 if [ ! -z "$NATIVE_64_ARCH" ]; then
1278 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1285 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1288 XPLATFORM="devices/$VAL"
1291 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1292 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1293 DeviceVar set $DEV_VAR $DEV_VAL
1296 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1297 CFG_DEBUG_RELEASE="$VAL"
1303 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1304 CFG_RELEASE_QMAKE="$VAL"
1310 if [ "$VAL" = "yes" ]; then
1312 elif [ "$VAL" = "no" ]; then
1319 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1320 CFG_PREFIX_INSTALL="$VAL"
1328 developer-build|commercial|opensource)
1329 # These switches have been dealt with already
1332 if [ "$VAL" = "yes" ]; then
1334 elif [ "$VAL" = "no" ]; then
1341 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1342 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1348 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1349 if [ "$VAL" = "no" ]; then
1350 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1351 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1352 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1358 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1365 if [ "$VAL" = "no" ]; then
1372 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1380 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1387 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1394 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1401 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1408 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1415 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1422 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1429 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1430 CFG_PRECOMPILE="$VAL"
1435 separate-debug-info)
1436 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1437 CFG_SEPARATE_DEBUG_INFO="$VAL"
1438 elif [ "$VAL" = "nocopy" ] ; then
1439 CFG_SEPARATE_DEBUG_INFO="yes"
1440 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1446 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1447 CFG_REDUCE_EXPORTS="$VAL"
1453 if [ "$VAL" = "no" ]; then
1460 if [ "$VAL" = "no" ]; then
1467 if [ "$VAL" = "no" ]; then
1474 if [ "$VAL" = "no" ]; then
1481 if [ "$VAL" = "no" ]; then
1488 if [ "$VAL" = "no" ]; then
1495 if [ "$VAL" = "no" ]; then
1505 if [ "$VAL" = "no" ]; then
1512 if [ "$VAL" = "no" ]; then
1519 if [ "$VAL" = "no" ]; then
1520 CFG_MIPS_DSPR2="$VAL"
1526 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1527 CFG_REDUCE_RELOCATIONS="$VAL"
1533 [ "$VAL" = "qt" ] && VAL=yes
1534 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1539 # No longer supported:
1540 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1543 if [ "$VAL" = "system" ]; then
1550 [ "$VAL" = "yes" ] && VAL=qt
1551 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1558 [ "$VAL" = "yes" ] && VAL=qt
1559 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1566 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1573 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1580 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1587 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1594 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1601 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1602 CFG_FONTCONFIG="$VAL"
1608 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1615 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1622 CFG_OBSOLETE_WAYLAND=yes
1625 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1632 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1639 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1646 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1653 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1660 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1667 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1674 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1675 CFG_GSTREAMER="$VAL"
1681 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1682 CFG_QGTKSTYLE="$VAL"
1688 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1691 if [ "$VAL" = "no" ]; then
1699 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1701 elif [ "$VAL" = "no" ]; then
1708 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1709 QPA_PLATFORM_GUARD="$VAL"
1715 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1717 elif [ "$VAL" = "runtime" ]; then
1724 if [ "$VAL" = "yes" ]; then
1731 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1738 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1739 CFG_LARGEFILE="$VAL"
1745 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1752 if [ "$VAL" = "yes" ]; then
1753 CFG_OPENSSL="linked"
1759 if [ "$VAL" = "yes" ]; then
1762 if [ "$VAL" = "no" ]; then
1770 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1771 CFG_JAVASCRIPTCORE_JIT="$VAL"
1777 if [ "$VAL" = "yes" ]; then
1778 OPT_CONFIRM_LICENSE="$VAL"
1784 if [ "$VAL" = "yes" ]; then
1790 sql-*|imageformat-*)
1791 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1792 # if autoconf style options were used, $VAL can be "yes" or "no"
1793 [ "$VAL" = "yes" ] && VAL=qt
1794 # now $VAL should be "no", "qt", or "plugin"... double-check
1795 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1798 # now $VAL is "no", "qt", or "plugin"
1800 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1801 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1803 # Grab the available values
1806 avail="$CFG_SQL_AVAILABLE"
1809 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1810 if [ "$OPT" != "plugin" ]; then
1811 # png is always built in
1817 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1821 # Check that that user's value is available.
1824 if [ "$VAL" = "$d" ]; then
1829 [ "$found" = yes ] || ERROR=yes
1831 if [ "$VAR" = "sql" ]; then
1832 # set the CFG_SQL_driver
1833 eval "CFG_SQL_$VAL=\$OPT"
1835 elif [ "$VAR" = "imageformat" ]; then
1836 [ "$OPT" = "qt" ] && OPT=yes
1837 VAL="`echo $VAL |tr a-z A-Z`"
1838 eval "CFG_$VAL=$OPT"
1842 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1843 if [ "$OPT" = "plugin" ]; then
1846 QMakeVar add "${VAR}s" "${VAL}"
1847 elif [ "$OPT" = "no" ]; then
1848 PLUG_VAR="${VAR}-plugin"
1850 QMakeVar del "${IN_VAR}s" "$VAL"
1851 QMakeVar del "${PLUG_VAR}s" "$VAL"
1853 if [ "$ERROR" = "yes" ]; then
1854 echo "$CURRENT_OPT: unknown argument"
1859 if [ "$VAL" = "yes" ]; then
1860 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1861 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1865 elif [ "$VAL" = "no" ]; then
1866 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1867 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1876 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1883 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1890 D_FLAGS="$D_FLAGS \"$VAL\""
1893 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1896 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1899 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1902 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1905 if [ "$BUILD_ON_MAC" = "yes" ]; then
1906 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1907 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1913 if [ "$BUILD_ON_MAC" = "yes" ]; then
1914 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1920 W_FLAGS="$W_FLAGS \"${VAL}\""
1926 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1927 CFG_PHONON_BACKEND="$VAL"
1939 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1940 CFG_AUDIO_BACKEND="$VAL"
1946 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1953 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1954 CFG_FORCE_ASSERTS="$VAL"
1960 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1970 if [ "$UNKNOWN_OPT" = "yes" ]; then
1971 echo "${CURRENT_OPT}: invalid command-line switch"
1977 # update QT_CONFIG to show our current predefined configuration
1978 case "$CFG_QCONFIG" in
1979 minimal|small|medium|large|full)
1980 # these are a sequence of increasing functionality
1981 for c in minimal small medium large full; do
1982 QT_CONFIG="$QT_CONFIG $c-config"
1983 [ "$CFG_QCONFIG" = $c ] && break
1987 # not known to be sufficient for anything
1988 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
1989 echo >&2 "Error: configuration file not found:"
1990 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
1992 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
1997 #-------------------------------------------------------------------------------
1998 # build tree initialization
1999 #-------------------------------------------------------------------------------
2001 # where to find which..
2002 unixtests="$relpath/config.tests/unix"
2003 mactests="$relpath/config.tests/mac"
2004 WHICH="$unixtests/which.test"
2006 PERL=`$WHICH perl 2>/dev/null`
2008 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2010 for e in gawk nawk awk; do
2011 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2018 PERL="/usr/bin/perl"
2019 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2023 ### skip this if the user just needs help...
2024 if [ "$OPT_HELP" != "yes" ]; then
2026 # is this a shadow build?
2027 if [ "$OPT_SHADOW" = "maybe" ]; then
2029 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2030 if [ -h "$outpath" ]; then
2031 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2037 if [ "$OPT_SHADOW" = "yes" ]; then
2038 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2039 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2040 echo >&2 "Cannot proceed."
2043 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2046 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2048 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2049 echo "Qt can be built in release mode with separate debug information, so"
2050 echo "-debug-and-release is not necessary anymore"
2054 if [ "$CFG_SILENT" = "yes" ]; then
2055 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2058 # if the source tree is different from the build tree,
2059 # symlink or copy part of the sources
2060 if [ "$OPT_SHADOW" = "yes" ]; then
2061 echo "Preparing build tree..."
2063 if [ -z "$PERL" ]; then
2065 echo "You need perl in your PATH to make a shadow build."
2066 echo "Cannot proceed."
2070 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2072 # make a syncqt script that can be used in the shadow
2073 rm -f "$outpath/bin/syncqt"
2074 if [ -x "$relpath/bin/syncqt" ]; then
2075 mkdir -p "$outpath/bin"
2076 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2077 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2078 chmod 755 "$outpath/bin/syncqt"
2081 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2082 rm -f "$outpath/bin/$i"
2083 if [ -x "$relpath/bin/$i" ]; then
2084 mkdir -p "$outpath/bin"
2085 echo "#!/bin/sh" >"$outpath/bin/$i"
2086 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2087 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2088 chmod 755 "$outpath/bin/$i"
2092 # save a pre-existing mkspecs/modules dir
2093 test -d "$outpath/mkspecs/modules" && \
2094 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2096 # symlink the mkspecs directory
2097 mkdir -p "$outpath/mkspecs"
2098 rm -rf "$outpath"/mkspecs/*
2099 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2100 rm -f "$outpath/mkspecs/default"
2104 rm -rf "$outpath/mkspecs/$1"
2105 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2106 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2109 # Special case for mkspecs/features directory.
2110 # To be able to place .prf files into a shadow build directory,
2111 # we're creating links for files only. The directory structure is reproduced.
2112 ShadowMkspecs features
2114 # The modules dir is special, too.
2115 if test -d "$outpath/mkspecs-modules"; then
2116 rm -rf "$outpath/mkspecs/modules"
2117 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2119 ShadowMkspecs modules
2122 # symlink the doc directory
2123 rm -rf "$outpath/doc"
2124 ln -s "$relpath/doc" "$outpath/doc"
2127 # symlink fonts to be able to run application from build directory
2128 if [ ! -d "${outpath}/lib/fonts" ]; then
2129 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2130 mkdir -p "${outpath}/lib"
2131 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2135 if [ "$OPT_FAST" = "auto" ]; then
2136 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2143 # find a make command
2144 if [ -z "$MAKE" ]; then
2146 for mk in gmake make; do
2147 if "$WHICH" $mk >/dev/null 2>&1; then
2152 if [ -z "$MAKE" ]; then
2153 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2154 echo >&2 "Cannot proceed."
2157 # export MAKE, we need it later in the config.tests
2163 #-------------------------------------------------------------------------------
2164 # auto-detect all that hasn't been specified in the arguments
2165 #-------------------------------------------------------------------------------
2167 if [ -z "$PLATFORM" ]; then
2169 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2171 OSX_VERSION=`uname -r | cut -d. -f1`
2172 # Select compiler. Use g++ unless we find a usable Clang version
2174 if [ "$OSX_VERSION" -ge 12 ]; then
2175 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2177 elif [ "$OSX_VERSION" -eq 11 ]; then
2178 # We're on Lion. Check if we have a supported Clang version
2179 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2182 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2189 #PLATFORM=aix-g++-64
2191 #PLATFORM=aix-xlc-64
2193 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2203 # PLATFORM=dynix-g++
2209 PLATFORM=freebsd-g++
2211 - Also available for FreeBSD: freebsd-icc
2215 PLATFORM=openbsd-g++
2226 #PLATFORM=irix-cc-64
2228 - Also available for IRIX: irix-g++ irix-cc-64
2232 case "$UNAME_MACHINE" in
2234 #PLATFORM=hpuxi-acc-32
2235 PLATFORM=hpuxi-acc-64
2237 - Also available for HP-UXi: hpuxi-acc-32
2243 #PLATFORM=hpux-acc-64
2245 #PLATFORM=hpux-acc-o64
2247 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2256 - Also available for Tru64: tru64-g++
2260 case "$UNAME_MACHINE" in
2262 PLATFORM=linux-g++-64
2269 - Also available for Linux: linux-kcc linux-icc linux-cxx
2273 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2274 PLATFORM="solaris-g++"
2276 #PLATFORM=solaris-g++
2278 #PLATFORM=solaris-cc64
2281 - Also available for Solaris: solaris-g++ solaris-cc-64
2284 ReliantUNIX-*:*|SINIX-*:*)
2285 PLATFORM=reliant-cds
2286 #PLATFORM=reliant-cds-64
2288 - Also available for Reliant UNIX: reliant-cds-64
2298 #PLATFORM=unixware-g++
2299 PLATFORM=unixware-cc
2301 - Also available for OpenUNIX: unixware-g++
2305 #PLATFORM=unixware-g++
2306 PLATFORM=unixware-cc
2308 - Also available for UnixWare: unixware-g++
2315 - Also available for SCO OpenServer: sco-g++
2319 PLATFORM=unixware-g++
2322 PLATFORM=unsupported/qnx-g++
2325 if [ "$OPT_HELP" != "yes" ]; then
2327 for p in $PLATFORMS; do
2328 echo " $relconf $* -platform $p"
2331 echo " The build script does not currently recognize all" >&2
2332 echo " platforms supported by Qt." >&2
2333 echo " Rerun this script with a -platform option listed to" >&2
2334 echo " set the system/compiler combination you use." >&2
2341 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2343 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2345 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2346 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2348 if [ -d "$PLATFORM" ]; then
2349 QMAKESPEC="$PLATFORM"
2351 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2353 if [ -d "$XPLATFORM" ]; then
2354 XQMAKESPEC="$XPLATFORM"
2356 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2358 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2359 QT_CROSS_COMPILE=yes
2360 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2361 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2364 if [ "$BUILD_ON_MAC" = "yes" ]; then
2365 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2367 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2368 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2369 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2370 echo " built with 'macx-g++'" >&2
2376 # check specified platforms are supported
2377 if [ '!' -d "$QMAKESPEC" ]; then
2379 echo " The specified system/compiler is not supported:"
2383 echo " Please see the README file for a complete list."
2387 if [ '!' -d "$XQMAKESPEC" ]; then
2389 echo " The specified system/compiler is not supported:"
2393 echo " Please see the README file for a complete list."
2397 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2399 echo " The specified system/compiler port is not complete:"
2401 echo " $XQMAKESPEC/qplatformdefs.h"
2403 echo " Please contact qt-info@nokia.com."
2408 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2409 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2410 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2411 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2412 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2416 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2417 case `basename "$XPLATFORM"` in
2420 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2422 echo "Please contact qt-info@nokia.com to upgrade your license to"
2423 echo "include this platform, or install the Qt Open Source Edition"
2424 echo "if you intend to develop free software."
2430 #-------------------------------------------------------------------------------
2431 # write out device config before we run the test.
2432 #-------------------------------------------------------------------------------
2433 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
2434 rm -f "$DEVICE_VARS_FILE"
2436 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
2439 #-------------------------------------------------------------------------------
2440 # tests that don't need qmake (must be run before displaying help)
2441 #-------------------------------------------------------------------------------
2443 # detect build style
2444 if [ "$CFG_DEBUG" = "auto" ]; then
2445 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2446 CFG_DEBUG_RELEASE=yes
2448 elif [ "$CFG_DEV" = "yes" ]; then
2449 CFG_DEBUG_RELEASE=no
2452 CFG_DEBUG_RELEASE=no
2456 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2457 QT_CONFIG="$QT_CONFIG build_all"
2460 # pass on $CFG_SDK to the configure tests.
2461 if [ '!' -z "$CFG_SDK" ]; then
2462 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2465 # find the default framework value
2466 if [ "$BUILD_ON_MAC" = "yes" ]; then
2467 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2468 CFG_FRAMEWORK="$CFG_SHARED"
2469 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2471 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2479 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2481 TEST_COMPILER=$QMAKE_CONF_COMPILER
2482 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2483 if [ -z "$TEST_COMPILER" ]; then
2484 echo "ERROR: Cannot set the compiler for the configuration tests"
2489 if [ -n "$CFG_SYSROOT" ]; then
2490 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2494 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2496 # auto-detect precompiled header support
2497 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2498 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2505 #auto-detect DWARF2 on the mac
2506 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2507 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2514 # auto-detect support for separate debug info in objcopy
2515 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2516 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2517 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2518 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2519 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2520 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2521 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2522 CFG_SEPARATE_DEBUG_INFO=no
2526 # binutils on HP-UX is buggy; default to no.
2527 CFG_SEPARATE_DEBUG_INFO=no
2530 CFG_SEPARATE_DEBUG_INFO=yes
2536 # auto-detect -fvisibility support
2537 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2538 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2539 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2540 echo "-reduce-exports was requested but this compiler does not support it"
2541 echo "Re-run configure with -v for more information"
2544 CFG_REDUCE_EXPORTS=no
2546 CFG_REDUCE_EXPORTS=yes
2550 # detect the availability of the -Bsymbolic-functions linker optimization
2551 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2552 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2553 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2554 echo "-reduce-relocations was requested but this compiler does not support it"
2555 echo "Re-run configure with -v for more information"
2558 CFG_REDUCE_RELOCATIONS=no
2560 CFG_REDUCE_RELOCATIONS=yes
2564 # auto-detect GNU make support
2565 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2569 # find the default framework value
2570 if [ "$BUILD_ON_MAC" = "yes" ]; then
2571 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2572 CFG_FRAMEWORK="$CFG_SHARED"
2573 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2575 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2583 #setup the build parts
2584 if [ -z "$CFG_BUILD_PARTS" ]; then
2585 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2587 # build tests by default, if a developer build
2588 if [ "$CFG_DEV" = "yes" ]; then
2589 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2592 # don't build tools by default when cross-compiling
2593 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2594 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2597 for nobuild in $CFG_NOBUILD_PARTS; do
2598 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2600 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2602 # echo "WARNING: libs is a required part of the build."
2604 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2607 #-------------------------------------------------------------------------------
2608 # post process QT_INSTALL_* variables
2609 #-------------------------------------------------------------------------------
2611 if [ -z "$QT_INSTALL_PREFIX" ]; then
2612 if [ "$CFG_DEV" = "yes" ]; then
2613 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2615 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2618 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2620 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2621 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2622 if [ "$BUILD_ON_MAC" = "yes" ]; then
2623 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2626 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2629 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2631 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2632 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2633 if [ "$BUILD_ON_MAC" = "yes" ]; then
2634 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2639 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2642 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2644 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2645 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2646 if [ "$BUILD_ON_MAC" = "yes" ]; then
2647 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2648 QT_INSTALL_LIBS="/Libraries/Frameworks"
2652 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2654 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2656 if [ -z "$QT_INSTALL_BINS" ]; then #default
2657 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2658 if [ "$BUILD_ON_MAC" = "yes" ]; then
2659 QT_INSTALL_BINS="/Developer/Applications/Qt"
2662 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2664 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2666 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2667 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2668 if [ "$BUILD_ON_MAC" = "yes" ]; then
2669 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2672 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2674 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2676 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2677 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2678 if [ "$BUILD_ON_MAC" = "yes" ]; then
2679 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2682 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2684 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2686 if [ -z "$QT_INSTALL_DATA" ]; then #default
2687 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2689 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2691 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2692 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2694 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2696 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2697 if [ "$BUILD_ON_MAC" = "yes" ]; then
2698 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2700 QT_INSTALL_SETTINGS=/etc/xdg
2703 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2705 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2706 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2707 if [ "$BUILD_ON_MAC" = "yes" ]; then
2708 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2711 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2713 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2716 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2717 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2718 if [ "$BUILD_ON_MAC" = "yes" ]; then
2719 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2722 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2724 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2726 #------- host paths --------
2728 if [ -z "$QT_HOST_PREFIX" ]; then
2729 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2732 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2736 if [ -z "$QT_HOST_BINS" ]; then #default
2738 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2739 if [ "$BUILD_ON_MAC" = "yes" ]; then
2740 QT_HOST_BINS="/Developer/Applications/Qt"
2743 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2745 QT_HOST_BINS="$QT_INSTALL_BINS"
2748 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2750 if [ -z "$QT_HOST_DATA" ]; then #default
2752 QT_HOST_DATA="$QT_HOST_PREFIX"
2754 QT_HOST_DATA="$QT_INSTALL_DATA"
2757 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2760 #-------------------------------------------------------------------------------
2761 # help - interactive parts of the script _after_ this section please
2762 #-------------------------------------------------------------------------------
2764 # next, emit a usage message if something failed.
2765 if [ "$OPT_HELP" = "yes" ]; then
2766 [ "x$ERROR" = "xyes" ] && echo
2767 if [ "$CFG_NIS" = "no" ]; then
2774 if [ "$CFG_CUPS" = "no" ]; then
2781 if [ "$CFG_ICONV" = "no" ]; then
2788 if [ "$CFG_LARGEFILE" = "no" ]; then
2795 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2803 if [ "$CFG_XCB" = "no" ]; then
2811 if [ "$CFG_EGLFS" = "no" ]; then
2819 if [ "$CFG_DIRECTFB" = "no" ]; then
2826 if [ "$CFG_XINPUT2" = "no" ]; then
2834 if [ "$CFG_DBUS" = "no" ]; then
2842 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2850 if [ "$CFG_GLIB" = "no" ]; then
2859 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2860 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2861 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2862 [-release] [-debug] [-debug-and-release]
2863 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2864 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2865 [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2866 [-plugin-sql-<driver>] [-system-sqlite]
2867 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2868 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2869 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2870 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2871 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2872 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2873 [-no-separate-debug-info] [-no-sse2]
2874 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2875 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2876 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2877 [-no-audio-backend] [-audio-backend]
2878 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2879 [-no-optimized-qmake] [-optimized-qmake]
2880 [-no-openssl] [-openssl] [-openssl-linked]
2881 [-no-gtkstyle] [-gtkstyle]
2882 [-qt-pcre] [-system-pcre]
2883 [-device <name>] [-device-option <key=value>]
2884 [additional platform specific options (see below)]
2887 Installation options:
2889 These are optional, but you may specify install directories.
2891 -prefix <dir> ...... This will install everything relative to <dir>
2892 (default $QT_INSTALL_PREFIX)
2894 -hostprefix [dir] .. Tools and libraries needed when developing
2895 applications are installed in [dir]. If [dir] is
2896 not given, the current build directory will be used.
2899 * -prefix-install .... Force a sandboxed "local" installation of
2900 Qt. This will install into
2901 $QT_INSTALL_PREFIX, if this option is
2902 disabled then some platforms will attempt a
2903 "system" install by placing default values to
2904 be placed in a system location other than
2907 You may use these to separate different parts of the install:
2909 -bindir <dir> ......... Executables will be installed to <dir>
2910 (default PREFIX/bin)
2911 -libdir <dir> ......... Libraries will be installed to <dir>
2912 (default PREFIX/lib)
2913 -docdir <dir> ......... Documentation will be installed to <dir>
2914 (default PREFIX/doc)
2915 -headerdir <dir> ...... Headers will be installed to <dir>
2916 (default PREFIX/include)
2917 -plugindir <dir> ...... Plugins will be installed to <dir>
2918 (default PREFIX/plugins)
2919 -importdir <dir> ...... Imports for QML will be installed to <dir>
2920 (default PREFIX/imports)
2921 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2923 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2924 (default PREFIX/translations)
2925 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2926 (default PREFIX/etc/settings)
2927 -examplesdir <dir> .... Examples will be installed to <dir>
2928 (default PREFIX/examples)
2929 -testsdir <dir> ....... Tests will be installed to <dir>
2930 (default PREFIX/tests)
2932 -hostbindir <dir> .. Host executables will be installed to <dir>
2933 (default HOSTPREFIX/bin)
2934 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2935 (default HOSTPREFIX)
2939 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2940 that needs to be evaluated. If the evaluation succeeds, the feature is
2941 included. Here is a short explanation of each option:
2943 * -release ........... Compile and link Qt with debugging turned off.
2944 -debug ............. Compile and link Qt with debugging turned on.
2945 -debug-and-release . Compile and link two versions of Qt, with and without
2946 debugging turned on (Mac only).
2948 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2950 -opensource ........ Compile and link the Open-Source Edition of Qt.
2951 -commercial ........ Compile and link the Commercial Edition of Qt.
2954 * -shared ............ Create and use shared Qt libraries.
2955 -static ............ Create and use static Qt libraries.
2957 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2959 -fast .............. Configure Qt quickly by generating Makefiles only for
2960 library and subdirectory targets. All other Makefiles
2961 are created as wrappers, which will in turn run qmake.
2963 -no-largefile ...... Disables large file support.
2964 + -largefile ......... Enables Qt to access files larger than 4 GB.
2966 -no-exceptions ..... Disable exceptions on compilers that support it.
2967 * -exceptions ........ Enable exceptions on compilers that support it.
2969 -no-accessibility .. Do not compile Accessibility support.
2970 * -accessibility ..... Compile Accessibility support.
2972 -no-sql-<driver> ... Disable SQL <driver> entirely.
2973 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2975 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2978 Possible values for <driver>:
2979 [ $CFG_SQL_AVAILABLE ]
2981 -system-sqlite ..... Use sqlite from the operating system.
2983 -no-phonon-backend.. Do not build the platform phonon plugin.
2984 + -phonon-backend..... Build the platform phonon plugin.
2986 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
2987 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
2989 -no-qml-debug ...... Do not build the in-process QML debugging support.
2990 + -qml-debug ......... Build the QML debugging support.
2992 -platform target ... The operating system and compiler you are building
2995 See the README file for a list of supported
2996 operating systems and compilers.
2998 -no-sse2 ........... Do not compile with use of SSE2 instructions.
2999 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3000 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3001 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3002 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3003 -no-avx ............ Do not compile with use of AVX instructions.
3004 -no-avx2 ........... Do not compile with use of AVX2 instructions.
3005 -no-neon ........... Do not compile with use of NEON instructions.
3006 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3007 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3009 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3010 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3012 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3014 -D <string> ........ Add an explicit define to the preprocessor.
3015 -I <string> ........ Add an explicit include path.
3016 -L <string> ........ Add an explicit library path.
3018 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
3019 configure determines whether to use pkg-config or not with
3020 some heuristics such as checking the environment variables.
3021 -no-pkg-config ..... Disable use of pkg-config.
3022 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
3023 detection heuristic).
3025 -help, -h .......... Display this information.
3027 Third Party Libraries:
3029 -qt-zlib ........... Use the zlib bundled with Qt.
3030 + -system-zlib ....... Use zlib from the operating system.
3031 See http://www.gzip.org/zlib
3033 -no-gif ............ Do not compile GIF reading support.
3035 -no-libpng ......... Do not compile PNG support.
3036 -qt-libpng ......... Use the libpng bundled with Qt.
3037 + -system-libpng ..... Use libpng from the operating system.
3038 See http://www.libpng.org/pub/png
3040 -no-libjpeg ........ Do not compile JPEG support.
3041 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3042 + -system-libjpeg .... Use libjpeg from the operating system.
3043 See http://www.ijg.org
3045 -no-openssl ........ Do not compile support for OpenSSL.
3046 + -openssl ........... Enable run-time OpenSSL support.
3047 -openssl-linked .... Enabled linked OpenSSL support.
3049 -qt-pcre ........... Use the PCRE library bundled with Qt.
3050 + -system-pcre ....... Use the PCRE library from the operating system.
3054 -make <part> ....... Add part to the list of parts to be built at make time.
3055 ($QT_DEFAULT_BUILD_PARTS)
3056 -nomake <part> ..... Exclude part from the list of parts to be built.
3058 -R <string> ........ Add an explicit runtime library path to the Qt
3060 -l <string> ........ Add an explicit library.
3062 -no-rpath .......... Do not use the library install path as a runtime
3064 + -rpath ............. Link Qt libraries and executables using the library
3065 install path as a runtime library path. Equivalent
3066 to -R install_libpath
3068 -continue .......... Continue as far as possible if an error occurs.
3070 -verbose, -v ....... Print verbose information about each step of the
3073 -silent ............ Reduce the build output so that warnings and errors
3074 can be seen more easily.
3076 * -no-optimized-qmake ... Do not build qmake optimized.
3077 -optimized-qmake ...... Build qmake optimized.
3079 -no-gui ............ Don't build the Qt GUI library
3081 $NSN -no-nis ............ Do not compile NIS support.
3082 $NSY -nis ............... Compile NIS support.
3084 $CUN -no-cups ........... Do not compile CUPS support.
3085 $CUY -cups .............. Compile CUPS support.
3086 Requires cups/cups.h and libcups.so.2.
3088 $CIN -no-iconv .......... Do not compile support for iconv(3).
3089 $CIY -iconv ............. Compile support for iconv(3).
3091 $PHN -no-pch ............ Do not use precompiled header support.
3092 $PHY -pch ............... Use precompiled header support.
3094 $DBN -no-dbus ........... Do not compile the QtDBus module.
3095 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3096 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3098 -reduce-relocations ..... Reduce relocations in the libraries through extra
3099 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3100 experimental; needs GNU ld >= 2.18).
3102 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3104 -device <name> ............... Cross-compile for device <name> (experimental)
3105 -device-option <key=value> ... Add device specific options for the device mkspec
3108 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3109 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3111 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3112 $XCBY -xcb ............... Compile Xcb support.
3114 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3115 $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
3117 $DFBN -no-directfb ....... Do not compile DirectFB support.
3118 $DFBY -directfb .......... Compile DirectFB support.
3120 -xplatform target ... The target platform when cross-compiling.
3122 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3124 -no-feature-<feature> Do not compile in <feature>.
3125 -feature-<feature> .. Compile in <feature>. The available features
3126 are described in src/corelib/global/qfeatures.txt
3128 -no-freetype ........ Do not compile in Freetype2 support.
3129 -qt-freetype ........ Use the libfreetype bundled with Qt.
3130 * -system-freetype .... Use libfreetype from the operating system.
3131 See http://www.freetype.org/
3133 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3134 default ($CFG_QCONFIG).
3136 -no-opengl .......... Do not support OpenGL.
3137 -opengl <api> ....... Enable OpenGL support
3138 With no parameter, this will attempt to auto-detect
3139 OpenGL ES 2, or regular desktop OpenGL.
3140 Use es2 for <api> to override auto-detection.
3142 $GBN -no-glib ........... Do not compile Glib support.
3143 $GBY -glib .............. Compile Glib support.
3146 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3149 $X2N -no-xinput2......... Do not compile XInput2 support.
3150 $X2Y -xinput2............ Compile XInput2 support.
3156 if [ "$BUILD_ON_MAC" = "yes" ]; then
3161 -Fstring ........... Add an explicit framework path.
3162 -fw string ......... Add an explicit framework.
3164 * -framework ......... Build Qt as a series of frameworks and
3165 link tools against those frameworks.
3166 -no-framework ...... Do not build Qt as a series of frameworks.
3168 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3169 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3171 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3172 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3174 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3175 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3176 QT_ENABLE_HARFBUZZ environment variable.
3181 [ "x$ERROR" = "xyes" ] && exit 1
3186 # -----------------------------------------------------------------------------
3187 # LICENSING, INTERACTIVE PART
3188 # -----------------------------------------------------------------------------
3191 echo "This is the Qt ${EditionString} Edition."
3194 if [ "$Edition" = "OpenSource" ]; then
3196 echo "You are licensed to use this software under the terms of"
3197 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3198 if [ -f "$relpath/LICENSE.GPL3" ]; then
3199 echo "You are also licensed to use this software under the terms of"
3200 echo "the GNU General Public License (GPL) versions 3."
3206 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3207 echo "You have already accepted the terms of the $LicenseType license."
3210 if [ -f "$relpath/LICENSE.GPL3" ]; then
3211 echo "Type '3' to view the GNU General Public License version 3."
3213 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3214 echo "Type 'yes' to accept this license offer."
3215 echo "Type 'no' to decline this license offer."
3217 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3221 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3223 elif [ "$acceptance" = "no" ]; then
3224 echo "You are not licensed to use this software."
3227 elif [ "$acceptance" = "3" ]; then
3228 more "$relpath/LICENSE.GPL3"
3229 elif [ "$acceptance" = "L" ]; then
3230 more "$relpath/LICENSE.LGPL"
3233 elif [ "$Edition" = "Preview" ]; then
3234 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3237 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3238 echo "You have already accepted the terms of the $LicenseType license."
3241 echo "You are licensed to use this software under the terms of"
3242 echo "the $TheLicense"
3244 echo "Type '?' to read the Preview License."
3245 echo "Type 'yes' to accept this license offer."
3246 echo "Type 'no' to decline this license offer."
3248 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3252 if [ "$acceptance" = "yes" ]; then
3254 elif [ "$acceptance" = "no" ] ;then
3255 echo "You are not licensed to use this software."
3258 elif [ "$acceptance" = "?" ]; then
3259 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3262 elif [ "$Edition" != "OpenSource" ]; then
3263 if [ -n "$ExpiryDate" ]; then
3264 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3265 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3266 Today=`date +%Y%m%d`
3267 if [ "$Today" -gt "$ExpiryDate" ]; then
3268 case "$LicenseType" in
3269 Commercial|Academic|Educational)
3270 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3272 echo "NOTICE NOTICE NOTICE NOTICE"
3274 echo " Your support and upgrade period has expired."
3276 echo " You are no longer licensed to use this version of Qt."
3277 echo " Please contact qt-info@nokia.com to renew your support"
3278 echo " and upgrades for this license."
3280 echo "NOTICE NOTICE NOTICE NOTICE"
3285 echo "WARNING WARNING WARNING WARNING"
3287 echo " Your support and upgrade period has expired."
3289 echo " You may continue to use your last licensed release"
3290 echo " of Qt under the terms of your existing license"
3291 echo " agreement. But you are not entitled to technical"
3292 echo " support, nor are you entitled to use any more recent"
3293 echo " Qt releases."
3295 echo " Please contact qt-info@nokia.com to renew your"
3296 echo " support and upgrades for this license."
3298 echo "WARNING WARNING WARNING WARNING"
3305 echo "NOTICE NOTICE NOTICE NOTICE"
3307 echo " Your Evaluation license has expired."
3309 echo " You are no longer licensed to use this software. Please"
3310 echo " contact qt-info@nokia.com to purchase license, or install"
3311 echo " the Qt Open Source Edition if you intend to develop free"
3314 echo "NOTICE NOTICE NOTICE NOTICE"
3321 TheLicense=`head -n 1 "$outpath/LICENSE"`
3323 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3324 echo "You have already accepted the terms of the $TheLicense."
3327 echo "You are licensed to use this software under the terms of"
3328 echo "the $TheLicense."
3330 echo "Type '?' to view the $TheLicense."
3331 echo "Type 'yes' to accept this license offer."
3332 echo "Type 'no' to decline this license offer."
3334 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3338 if [ "$acceptance" = "yes" ]; then
3340 elif [ "$acceptance" = "no" ]; then
3341 echo "You are not licensed to use this software."
3344 else [ "$acceptance" = "?" ]
3345 more "$outpath/LICENSE"
3350 # this should be moved somewhere else
3353 AIX_VERSION=`uname -v`
3354 if [ "$AIX_VERSION" -lt "5" ]; then
3355 QMakeVar add QMAKE_LIBS_X11 -lbind
3362 #-------------------------------------------------------------------------------
3363 # generate qconfig.cpp
3364 #-------------------------------------------------------------------------------
3365 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3367 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3369 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3370 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3372 /* Installation date */
3373 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3375 /* Installation Info */
3376 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3377 "qt_prfxpath=$QT_INSTALL_PREFIX",
3378 "qt_docspath=$QT_INSTALL_DOCS",
3379 "qt_hdrspath=$QT_INSTALL_HEADERS",
3380 "qt_libspath=$QT_INSTALL_LIBS",
3381 "qt_binspath=$QT_INSTALL_BINS",
3382 "qt_plugpath=$QT_INSTALL_PLUGINS",
3383 "qt_impspath=$QT_INSTALL_IMPORTS",
3384 "qt_datapath=$QT_INSTALL_DATA",
3385 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3386 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3387 "qt_tstspath=$QT_INSTALL_TESTS",
3388 #ifdef QT_BUILD_QMAKE
3389 "qt_ssrtpath=$CFG_SYSROOT",
3390 "qt_hpfxpath=$QT_HOST_PREFIX",
3391 "qt_hbinpath=$QT_HOST_BINS",
3392 "qt_hdatpath=$QT_HOST_DATA",
3395 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3398 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3400 /* strlen( "qt_lcnsxxxx" ) == 12 */
3401 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3402 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3404 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3407 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3408 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3409 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3411 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3412 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3413 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3416 # -----------------------------------------------------------------------------
3417 if [ "$LicenseType" = "Evaluation" ]; then
3418 EVALKEY=qt_qevalkey=$LicenseKeyExt
3419 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3420 EVALKEY=qt_qevalkey=
3423 if [ -n "$EVALKEY" ]; then
3424 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3425 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3426 /* Evaluation license key */
3427 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3429 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3433 # -----------------------------------------------------------------------------
3435 # -----------------------------------------------------------------------------
3438 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3440 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3441 if [ "$OPT_SHADOW" = "yes" ]; then
3442 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3443 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3444 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3448 # $1: input variable name (awk regexp)
3449 # $2: optional output variable name
3450 # $3: optional value transformation (sed command)
3451 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3452 # is where the resulting variable is written to
3453 setBootstrapVariable()
3455 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3459 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3460 echo "Creating qmake. Please wait..."
3463 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3464 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3465 if [ -f "$QCONFIG_H" ]; then
3466 OLD_QCONFIG_H=$QCONFIG_H
3467 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3470 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3471 # when building qmake, we use #defines for the install paths,
3472 # however they are real functions in the library
3473 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3474 mkdir -p "$outpath/src/corelib/global"
3475 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3476 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3479 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3481 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3482 rm -rf mkspecs/default
3483 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3484 mkdir -p "$outpath/qmake" || exit
3486 for mkfile in GNUmakefile Makefile; do
3489 in_mkfile="${mkfile}.in"
3490 if [ "$mkfile" = "Makefile" ]; then
3491 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3492 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3494 in_mkfile="${mkfile}.unix"
3496 in_mkfile="$relpath/qmake/$in_mkfile"
3497 mkfile="$outpath/qmake/$mkfile"
3498 if [ -f "$mkfile" ]; then
3499 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3502 [ -f "$in_mkfile" ] || continue
3504 echo "########################################################################" > "$mkfile"
3505 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3506 echo "########################################################################" >> "$mkfile"
3509 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3510 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3511 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3513 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3514 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3517 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3518 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3519 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3520 setBootstrapVariable QMAKE_CFLAGS
3521 setBootstrapVariable QMAKE_CXXFLAGS
3522 setBootstrapVariable QMAKE_LFLAGS
3524 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3525 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3526 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3528 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3529 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3530 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3531 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3532 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3533 elif [ "$CFG_DEBUG" = "yes" ]; then
3534 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3535 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3536 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3537 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3540 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3541 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3542 for rpath in $RPATH_FLAGS; do
3543 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3546 if [ "$BUILD_ON_MAC" = "yes" ]; then
3547 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3548 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3549 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3550 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3551 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3552 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3553 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3554 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3555 if [ '!' -z "$CFG_SDK" ]; then
3556 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3557 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3558 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3559 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3560 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3563 if [ '!' -z "$D_FLAGS" ]; then
3564 for DEF in $D_FLAGS; do
3565 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3568 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3569 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3570 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3571 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3573 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3574 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3575 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3576 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3577 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3578 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3579 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3580 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3581 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3582 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3584 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3585 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3586 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3587 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3592 QMAKE_BUILD_ERROR=no
3593 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3594 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3595 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3596 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3599 #-------------------------------------------------------------------------------
3601 #-------------------------------------------------------------------------------
3602 if [ -z "$PKG_CONFIG" ]; then
3603 # See if PKG_CONFIG is set in the mkspec:
3604 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3606 if [ -z "$PKG_CONFIG" ]; then
3607 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3610 if [ "$CFG_PKGCONFIG" = "no" ]; then
3612 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3614 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3615 echo >&2 "a correctly setup pkg-config environment!"
3617 elif [ -n "$PKG_CONFIG" ]; then
3618 # found a pkg-config
3619 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3620 # when xcompiling, check environment to see if it's actually usable
3621 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3622 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3623 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3624 export PKG_CONFIG_LIBDIR
3625 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3626 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3627 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3628 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3629 echo >&2 "Set this variable to the directory that contains target .pc files"
3630 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3631 echo >&2 "use -force-pkg-config to override this test."
3635 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3638 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3639 if [ -n "$CFG_SYSROOT" ]; then
3640 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3641 export PKG_CONFIG_SYSROOT_DIR
3642 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3643 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3644 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3645 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3646 echo >&2 "or use -force-pkg-config to override this test."
3650 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3654 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3655 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3659 if [ -z "$PKG_CONFIG" ]; then
3660 QT_CONFIG="$QT_CONFIG no-pkg-config"
3663 #-------------------------------------------------------------------------------
3664 # tests that need qmake
3665 #-------------------------------------------------------------------------------
3667 #-------------------------------------------------------------------------------
3668 # determine the target and host architectures
3669 #-------------------------------------------------------------------------------
3671 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3672 CFG_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3674 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3675 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3676 # Do the same test again, using the host compiler
3677 CFG_HOST_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3678 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3680 # not cross compiling, host == target
3681 CFG_HOST_ARCH="$CFG_ARCH"
3684 if [ "$OPT_VERBOSE" = "yes" ]; then
3685 echo "System architecture: '$CFG_ARCH'"
3686 echo "Host architecture: '$CFG_HOST_ARCH'"
3689 #-------------------------------------------------------------------------------
3690 # functionality tests
3691 #-------------------------------------------------------------------------------
3693 # detect availability of float math.h functions
3694 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3695 CFG_USE_FLOATMATH=yes
3697 CFG_USE_FLOATMATH=no
3700 # detect sse2 support
3701 if [ "${CFG_SSE2}" = "auto" ]; then
3702 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3709 # detect sse3 support
3710 if [ "${CFG_SSE3}" = "auto" ]; then
3711 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3718 # detect ssse3 support
3719 if [ "${CFG_SSSE3}" = "auto" ]; then
3720 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3727 # detect sse4.1 support
3728 if [ "${CFG_SSE4_1}" = "auto" ]; then
3729 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.1"; then
3736 # detect sse4.2 support
3737 if [ "${CFG_SSE4_2}" = "auto" ]; then
3738 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.2"; then
3745 # detect avx support
3746 if [ "${CFG_AVX}" = "auto" ]; then
3747 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
3754 # detect avx2 support
3755 if [ "${CFG_AVX2}" = "auto" ]; then
3756 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx2 "avx2" $L_FLAGS $I_FLAGS $l_FLAGS "-march=core-avx2"; then
3763 # check iWMMXt support
3764 if [ "$CFG_IWMMXT" = "yes" ]; then
3765 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
3766 if [ $? != "0" ]; then
3767 echo "The iWMMXt functionality test failed!"
3768 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3773 # detect neon support
3774 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3775 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then
3780 elif [ "$CFG_ARCH" != "arm" ]; then
3784 # detect mips_dsp support
3785 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3791 # detect mips_dspr2 support
3792 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3798 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3801 if [ "$CFG_ZLIB" = "no" ]; then
3802 # Note: Qt no longer support builds without zlib
3803 # So we force a "no" to be "auto" here.
3804 # If you REALLY really need no zlib support, you can still disable
3805 # it by doing the following:
3806 # add "no-zlib" to mkspecs/qconfig.pri
3807 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3809 # There's no guarantee that Qt will build under those conditions
3814 if [ "$CFG_ZLIB" = "auto" ]; then
3815 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3822 if [ "$CFG_LARGEFILE" = "auto" ]; then
3823 #Large files should be enabled for all Linux systems
3827 if [ "$CFG_GUI" = "no" ]; then
3828 QPA_PLATFORM_GUARD=no
3831 # detect how jpeg should be built
3832 if [ "$CFG_JPEG" = "auto" ]; then
3833 if [ "$CFG_SHARED" = "yes" ]; then
3840 if [ "$CFG_LIBJPEG" = "auto" ]; then
3841 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libjpeg "libjpeg" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3848 # detect how gif should be built
3849 if [ "$CFG_GIF" = "auto" ]; then
3850 if [ "$CFG_SHARED" = "yes" ]; then
3858 if [ "$CFG_LIBPNG" = "auto" ]; then
3859 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libpng "libpng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3866 # detect accessibility
3867 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3868 CFG_ACCESSIBILITY=yes
3871 if [ "$CFG_EGLFS" = "yes" ]; then
3872 if [ "$CFG_EGL" = "no" ]; then
3873 echo "The EGLFS plugin requires EGL support and cannot be built"
3876 if [ "$CFG_OPENGL" != "es2" ]; then
3877 echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
3884 # auto-detect SQL-modules support
3885 for _SQLDR in $CFG_SQL_AVAILABLE; do
3888 if [ "$CFG_SQL_mysql" != "no" ]; then
3889 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3890 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3891 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3892 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3893 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3894 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3895 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3897 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3898 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3899 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3900 echo " You need MySql 4 or higher."
3901 echo " If you believe this message is in error you may use the continue"
3902 echo " switch (-continue) to $0 to continue."
3907 QT_LFLAGS_MYSQL_R=""
3911 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3912 QMakeVar add CONFIG use_libmysqlclient_r
3913 if [ "$CFG_SQL_mysql" = "auto" ]; then
3914 CFG_SQL_mysql=plugin
3916 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3917 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3918 if [ "$CFG_SQL_mysql" = "auto" ]; then
3919 CFG_SQL_mysql=plugin
3922 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3923 echo "MySQL support cannot be enabled due to functionality tests!"
3924 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3925 echo " If you believe this message is in error you may use the continue"
3926 echo " switch (-continue) to $0 to continue."
3931 QT_LFLAGS_MYSQL_R=""
3939 if [ "$CFG_SQL_psql" != "no" ]; then
3940 # Be careful not to use native pg_config when cross building.
3941 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
3942 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
3943 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
3945 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
3946 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
3947 # But, respect PSQL_LIBS if set
3948 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
3949 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3950 if [ "$CFG_SQL_psql" = "auto" ]; then
3954 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3955 echo "PostgreSQL support cannot be enabled due to functionality tests!"
3956 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3957 echo " If you believe this message is in error you may use the continue"
3958 echo " switch (-continue) to $0 to continue."
3969 if [ "$CFG_SQL_odbc" != "no" ]; then
3970 if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3971 if [ "$CFG_SQL_odbc" = "auto" ]; then
3975 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3976 QT_LFLAGS_ODBC="-liodbc"
3977 if [ "$CFG_SQL_odbc" = "auto" ]; then
3981 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3982 echo "ODBC support cannot be enabled due to functionality tests!"
3983 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3984 echo " If you believe this message is in error you may use the continue"
3985 echo " switch (-continue) to $0 to continue."
3995 if [ "$CFG_SQL_oci" != "no" ]; then
3996 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3997 if [ "$CFG_SQL_oci" = "auto" ]; then
4001 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4002 echo "Oracle (OCI) 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."
4014 if [ "$CFG_SQL_tds" != "no" ]; then
4015 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4016 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4017 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4018 if [ "$CFG_SQL_tds" = "auto" ]; then
4022 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4023 echo "TDS support cannot be enabled due to functionality tests!"
4024 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4025 echo " If you believe this message is in error you may use the continue"
4026 echo " switch (-continue) to $0 to continue."
4035 if [ "$CFG_SQL_db2" != "no" ]; then
4036 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4037 if [ "$CFG_SQL_db2" = "auto" ]; then
4041 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4042 echo "ODBC support cannot be enabled due to functionality tests!"
4043 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4044 echo " If you believe this message is in error you may use the continue"
4045 echo " switch (-continue) to $0 to continue."
4054 if [ "$CFG_SQL_ibase" != "no" ]; then
4055 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4056 if [ "$CFG_SQL_ibase" = "auto" ]; then
4057 CFG_SQL_ibase=plugin
4060 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4061 echo "InterBase 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."
4073 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4074 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4075 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4076 CFG_SQL_sqlite2=plugin
4079 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4080 echo "SQLite2 support cannot be enabled due to functionality tests!"
4081 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4082 echo " If you believe this message is in error you may use the continue"
4083 echo " switch (-continue) to $0 to continue."
4092 if [ "$CFG_SQL_sqlite" != "no" ]; then
4093 SQLITE_AUTODETECT_FAILED="no"
4094 if [ "$CFG_SQLITE" = "system" ]; then
4095 if [ -n "$PKG_CONFIG" ]; then
4096 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4097 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4099 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4100 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4101 CFG_SQL_sqlite=plugin
4103 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4105 SQLITE_AUTODETECT_FAILED="yes"
4108 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4109 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4110 CFG_SQL_sqlite=plugin
4113 SQLITE_AUTODETECT_FAILED="yes"
4117 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4118 echo "SQLite support cannot be enabled due to functionality tests!"
4119 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4120 echo " If you believe this message is in error you may use the continue"
4121 echo " switch (-continue) to $0 to continue."
4127 if [ "$OPT_VERBOSE" = "yes" ]; then
4128 echo "unknown SQL driver: $_SQLDR"
4134 # auto-detect NIS support
4135 if [ "$CFG_NIS" != "no" ]; then
4136 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4139 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4140 echo "NIS 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."
4151 # auto-detect CUPS support
4152 if [ "$CFG_CUPS" != "no" ]; then
4153 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4156 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4157 echo "Cups support cannot be enabled due to functionality tests!"
4158 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4159 echo " If you believe this message is in error you may use the continue"
4160 echo " switch (-continue) to $0 to continue."
4168 # auto-detect iconv(3) support
4169 if [ "$CFG_ICONV" != "no" ]; then
4170 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4172 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4174 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/sun-libiconv" "SUN libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4176 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4179 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4180 echo "Iconv support cannot be enabled due to functionality tests!"
4181 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4182 echo " If you believe this message is in error you may use the continue"
4183 echo " switch (-continue) to $0 to continue."
4191 # auto-detect libdbus-1 support
4192 if [ "$CFG_DBUS" != "no" ]; then
4193 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4194 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4195 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4197 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then
4198 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4199 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4200 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4202 if [ "$CFG_DBUS" = "auto" ]; then
4204 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4205 # CFG_DBUS is "yes" or "linked" here
4207 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4208 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4209 echo " If you believe this message is in error you may use the continue"
4210 echo " switch (-continue) to $0 to continue."
4216 # auto-detect Glib support
4217 if [ "$CFG_GLIB" != "no" ]; then
4218 if [ -n "$PKG_CONFIG" ]; then
4219 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4220 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4222 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB; then
4224 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4225 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4227 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4228 echo "Glib support cannot be enabled due to functionality tests!"
4229 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4230 echo " If you believe this message is in error you may use the continue"
4231 echo " switch (-continue) to $0 to continue."
4240 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4241 if [ -n "$PKG_CONFIG" ]; then
4242 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4243 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4245 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER; then
4247 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4248 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4250 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4251 echo "Gstreamer support cannot be enabled due to functionality tests!"
4252 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4253 echo " If you believe this message is in error you may use the continue"
4254 echo " switch (-continue) to $0 to continue."
4260 elif [ "$CFG_GLIB" = "no" ]; then
4264 # auto-detect libicu support
4265 if [ "$CFG_ICU" != "no" ]; then
4266 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4267 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4269 if [ "$CFG_ICU" = "auto" ]; then
4271 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4274 echo "The ICU library support cannot be enabled."
4275 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4276 echo " If you believe this message is in error you may use the continue"
4277 echo " switch (-continue) to $0 to continue."
4283 # Auto-detect PulseAudio support
4284 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4285 if [ -n "$PKG_CONFIG" ]; then
4286 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4287 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4289 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO; then
4291 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4292 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4294 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4295 echo "PulseAudio support cannot be enabled due to functionality tests!"
4296 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4297 echo " If you believe this message is in error you may use the continue"
4298 echo " switch (-continue) to $0 to continue."
4307 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4308 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4309 if [ "$CFG_GUI" = "no" ]; then
4310 if [ "$CFG_OPENGL" = "auto" ]; then
4313 if [ "$CFG_OPENGL" != "no" ]; then
4314 echo "OpenGL enabled, but GUI disabled."
4315 echo " You might need to either enable the GUI or disable OpenGL"
4319 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4320 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4322 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
4325 if [ "$CFG_OPENGL" = "yes" ]; then
4326 echo "All the OpenGL functionality tests failed!"
4327 echo " You might need to modify the include and library search paths by editing"
4328 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4329 echo " ${XQMAKESPEC}."
4336 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4337 if [ "$CFG_OPENGL" = "desktop" ]; then
4338 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4339 if [ $? != "0" ]; then
4340 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4347 elif [ "$CFG_OPENGL" = "es2" ]; then
4349 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4350 if [ $? != "0" ]; then
4351 echo "The OpenGL ES 2.0 functionality test failed!"
4352 echo " You might need to modify the include and library search paths by editing"
4353 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4354 echo " ${XQMAKESPEC}."
4357 elif [ "$CFG_OPENGL" = "desktop" ]; then
4358 # Desktop OpenGL support
4359 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4360 if [ $? != "0" ]; then
4361 echo "The OpenGL functionality test failed!"
4362 echo " You might need to modify the include and library search paths by editing"
4363 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4364 echo " ${XQMAKESPEC}."
4369 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4370 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4371 if [ $? != "0" ]; then
4372 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4379 fi # X11/MINGW OpenGL
4381 if [ "$BUILD_ON_MAC" = "yes" ]; then
4382 if [ "$CFG_PHONON" != "no" ]; then
4383 # Always enable Phonon (unless it was explicitly disabled)
4387 if [ "$CFG_COREWLAN" = "auto" ]; then
4388 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/corewlan "CoreWlan" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4396 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4397 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4398 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4400 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
4403 if [ "$CFG_OPENGL" = "yes" ]; then
4404 echo "All the OpenGL functionality tests failed!"
4405 echo " You might need to modify the include and library search paths by editing"
4406 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4407 echo " ${XQMAKESPEC}."
4412 elif [ "$CFG_OPENGL" = "es2" ]; then
4414 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4415 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4416 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4417 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4418 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4419 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4420 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4421 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4424 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
4425 if [ $? != "0" ]; then
4426 echo "The OpenGL ES 2.0 functionality test failed!"
4427 echo " You might need to modify the include and library search paths by editing"
4428 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4429 echo " ${XQMAKESPEC}."
4432 elif [ "$CFG_OPENGL" = "desktop" ]; then
4433 # Desktop OpenGL support
4434 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4435 if [ $? != "0" ]; then
4436 echo "The OpenGL functionality test failed!"
4437 echo " You might need to modify the include and library search paths by editing"
4438 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4439 echo " ${XQMAKESPEC}."
4444 # auto-detect FontConfig support
4445 if [ "$CFG_FONTCONFIG" != "no" ]; then
4446 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4447 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4448 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4450 QT_CFLAGS_FONTCONFIG=
4451 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4453 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4454 QT_CONFIG="$QT_CONFIG fontconfig"
4455 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4456 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4457 CFG_LIBFREETYPE=system
4462 # Save these for a check later
4463 ORIG_CFG_XCB="$CFG_XCB"
4464 ORIG_CFG_EGLFS="$CFG_EGLFS"
4465 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4467 if [ "$CFG_LIBUDEV" != "no" ]; then
4468 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4469 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4470 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4471 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4472 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4474 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_INCDIR_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
4476 QT_CONFIG="$QT_CONFIG libudev"
4477 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4478 echo "The libudev functionality test failed!"
4482 QMakeVar add DEFINES QT_NO_LIBUDEV
4486 if [ "$CFG_EVDEV" != "no" ]; then
4487 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
4489 QT_CONFIG="$QT_CONFIG evdev"
4490 elif [ "$CFG_EVDEV" = "yes" ]; then
4491 echo "The evdev functionality test failed!"
4495 QMakeVar add DEFINES QT_NO_EVDEV
4499 # Check we actually have X11 :-)
4500 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS; then
4501 QT_CONFIG="$QT_CONFIG xlib"
4504 # auto-detect Xrender support
4505 if [ "$CFG_XRENDER" != "no" ]; then
4506 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS; then
4508 QT_CONFIG="$QT_CONFIG xrender"
4510 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4511 echo "Xrender support cannot be enabled due to functionality tests!"
4512 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4513 echo " If you believe this message is in error you may use the continue"
4514 echo " switch (-continue) to $0 to continue."
4522 if [ "$CFG_XCB" != "no" ]; then
4523 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4524 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4525 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4527 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4529 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4530 QT_CONFIG="$QT_CONFIG xcb-render"
4533 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4535 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4538 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4539 QT_CONFIG="$QT_CONFIG xcb-xlib"
4542 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4543 # auto-detect XInput2/Xinput support
4544 if [ "$CFG_XINPUT2" != "no" ]; then
4545 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4549 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4550 echo "XInput2 support cannot be enabled due to functionality tests!"
4551 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4552 echo " If you believe this message is in error you may use the continue"
4553 echo " switch (-continue) to $0 to continue."
4562 if [ "$CFG_XCB" = "yes" ]; then
4563 echo "The XCB test failed!"
4564 echo " You might need to install dependency packages."
4565 echo " See src/plugins/platforms/xcb/README."
4569 QMakeVar add DEFINES QT_NO_XCB
4573 if [ "$CFG_DIRECTFB" != "no" ]; then
4574 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4575 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4576 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4577 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/directfb" "DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then
4579 elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4580 echo " DirectFB support cannot be enabled due to functionality tests!"
4581 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4582 echo " If you believe this message is in error you may use the continue"
4583 echo " switch (-continue) to $0 to continue."
4593 # Detect libxkbcommon
4594 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4595 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4596 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4597 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4598 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4600 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4604 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4605 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4606 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4607 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4608 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4609 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4610 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4611 fi # detect EGL support
4612 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/qpa/egl" "EGL" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
4614 elif [ "$CFG_EGL" = "yes" ]; then
4615 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4616 echo " You might need to modify the include and library search paths by editing"
4617 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4622 elif [ "$CFG_OPENGL" = "desktop" ]; then
4623 if [ "$CFG_EGL" = "yes" ]; then
4624 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4625 echo "Either disable EGL support or enable OpenGL ES support."
4631 if [ "$CFG_EGLFS" != "no" ]; then
4632 if [ "$CFG_OPENGL" = "es2" ]; then
4633 CFG_EGLFS="$CFG_EGL"
4639 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4640 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4641 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4642 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4644 if [ "$CFG_DIRECTFB" = "yes" ]; then
4645 QT_CONFIG="$QT_CONFIG directfb"
4646 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4647 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4650 if [ "$BUILD_ON_MAC" = "yes" ]; then
4651 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4652 QT_CONFIG="$QT_CONFIG coreservices"
4654 QMakeVar add DEFINES QT_NO_CORESERVICES
4658 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
4659 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4660 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4661 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4662 echo "No QPA platform plugin enabled!"
4663 echo " If you really want to build without a QPA platform plugin you must pass"
4664 echo " -no-qpa-platform-guard to configure. Doing this will"
4665 echo " produce a Qt that can not run GUI applications."
4666 echo " The dependencies needed for xcb to build are listed in"
4667 echo " src/plugins/platforms/xcb/README"
4673 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4676 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4677 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4678 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4679 CFG_LIBFREETYPE=system
4685 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS &&
4686 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4687 echo "STL functionality check failed! Cannot build Qt with this STL library."
4688 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4693 # detect POSIX clock_gettime()
4694 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4695 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $l_FLAGS; then
4696 CFG_CLOCK_GETTIME=yes
4698 CFG_CLOCK_GETTIME=no
4702 # detect POSIX monotonic clocks
4703 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4704 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-monotonic "POSIX Monotonic Clock" $L_FLAGS $I_FLAGS $l_FLAGS; then
4705 CFG_CLOCK_MONOTONIC=yes
4707 CFG_CLOCK_MONOTONIC=no
4709 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4710 CFG_CLOCK_MONOTONIC=no
4714 if [ "$CFG_MREMAP" = "auto" ]; then
4715 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
4722 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4723 if [ "$CFG_GETADDRINFO" != "no" ]; then
4724 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
4727 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4728 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4729 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4730 echo " If you believe this message is in error you may use the continue"
4731 echo " switch (-continue) to $0 to continue."
4739 # find if the platform provides inotify
4740 if [ "$CFG_INOTIFY" != "no" ]; then
4741 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
4744 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4745 echo "inotify support cannot be enabled due to functionality tests!"
4746 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4747 echo " If you believe this message is in error you may use the continue"
4748 echo " switch (-continue) to $0 to continue."
4756 # find if the platform provides if_nametoindex (ipv6 interface name support)
4757 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4758 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6ifname "IPv6 interface name" $L_FLAGS $I_FLAGS $l_FLAGS; then
4761 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4762 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4763 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4764 echo " If you believe this message is in error you may use the continue"
4765 echo " switch (-continue) to $0 to continue."
4773 # find if the platform provides getifaddrs (network interface enumeration)
4774 if [ "$CFG_GETIFADDRS" != "no" ]; then
4775 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
4778 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4779 echo "getifaddrs support cannot be enabled due to functionality tests!"
4780 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4781 echo " If you believe this message is in error you may use the continue"
4782 echo " switch (-continue) to $0 to continue."
4791 if [ "$CFG_OPENSSL" != "no" ]; then
4792 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4793 if [ "$CFG_OPENSSL" = "auto" ]; then
4797 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4798 echo "OpenSSL support cannot be enabled due to functionality tests!"
4799 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4800 echo " If you believe this message is in error you may use the continue"
4801 echo " switch (-continue) to $0 to continue."
4810 if [ "$CFG_PCRE" != "qt" ]; then
4811 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
4814 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4815 echo "PCRE support cannot be enabled due to functionality tests!"
4816 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4817 echo " If you believe this message is in error you may use the continue"
4818 echo " switch (-continue) to $0 to continue."
4826 # detect OpenVG support
4827 if [ "$CFG_OPENVG" != "no" ]; then
4828 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4829 if [ "$CFG_OPENVG" = "auto" ]; then
4832 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4833 if [ "$CFG_OPENVG" = "auto" ]; then
4836 CFG_OPENVG_ON_OPENGL=yes
4837 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4838 if [ "$CFG_OPENVG" = "auto" ]; then
4841 CFG_OPENVG_LC_INCLUDES=yes
4842 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4843 if [ "$CFG_OPENVG" = "auto" ]; then
4846 CFG_OPENVG_LC_INCLUDES=yes
4847 CFG_OPENVG_ON_OPENGL=yes
4849 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4850 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4851 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4852 echo " If you believe this message is in error you may use the continue"
4853 echo " switch (-continue) to $0 to continue."
4859 if [ "$CFG_OPENVG" = "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4860 CFG_OPENVG_SHIVA=yes
4864 if [ "$CFG_ALSA" = "auto" ]; then
4865 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
4872 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4873 if [ "$CFG_ARCH" = "arm" ]; then
4874 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
4875 if [ $? != "0" ]; then
4876 CFG_JAVASCRIPTCORE_JIT=no
4879 case "$XPLATFORM" in
4881 CFG_JAVASCRIPTCORE_JIT=no
4887 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
4888 QMakeVar set JAVASCRIPTCORE_JIT yes
4889 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
4890 QMakeVar set JAVASCRIPTCORE_JIT no
4893 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
4894 CFG_AUDIO_BACKEND=yes
4897 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
4898 echo "Warning: largefile support cannot be disabled for win32."
4902 #-------------------------------------------------------------------------------
4903 # ask for all that hasn't been auto-detected or specified in the arguments
4904 #-------------------------------------------------------------------------------
4906 # enable dwarf2 support on Mac
4907 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
4908 QT_CONFIG="$QT_CONFIG dwarf2"
4911 # Detect the default arch (x86 or x86_64) on Mac OS X
4912 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
4914 case `file "${outpath}/bin/qmake"` in
4922 # unsupported/unknown
4926 if [ -n "$DEFAULT_ARCH" ]; then
4927 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
4928 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
4929 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
4930 # Make the application arch follow the Qt arch
4931 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
4936 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
4937 QT_CONFIG="$QT_CONFIG phonon-backend"
4940 # disable accessibility
4941 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
4942 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
4944 QT_CONFIG="$QT_CONFIG accessibility"
4948 if [ "$CFG_EGL" = "yes" ]; then
4949 QT_CONFIG="$QT_CONFIG egl"
4951 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
4955 if [ "$CFG_EGLFS" = "yes" ]; then
4956 QT_CONFIG="$QT_CONFIG eglfs"
4958 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
4962 if [ "$CFG_OPENVG" = "no" ]; then
4963 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
4965 QT_CONFIG="$QT_CONFIG openvg"
4966 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
4967 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
4969 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
4970 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
4972 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
4973 QT_CONFIG="$QT_CONFIG shivavg"
4974 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
4979 if [ "$CFG_OPENGL" = "no" ]; then
4980 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
4982 QT_CONFIG="$QT_CONFIG opengl"
4985 if [ "$CFG_OPENGL" = "es2" ]; then
4986 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
4989 if [ "$CFG_OPENGL" = "es2" ]; then
4990 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
4991 QT_CONFIG="$QT_CONFIG opengles2"
4994 # safe execution environment
4995 if [ "$CFG_SXE" != "no" ]; then
4996 QT_CONFIG="$QT_CONFIG sxe"
4999 # build up the variables for output
5000 if [ "$CFG_DEBUG" = "yes" ]; then
5001 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5002 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5003 elif [ "$CFG_DEBUG" = "no" ]; then
5004 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5005 QMAKE_CONFIG="$QMAKE_CONFIG release"
5007 if [ "$CFG_SHARED" = "yes" ]; then
5008 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5009 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5010 elif [ "$CFG_SHARED" = "no" ]; then
5011 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5012 QMAKE_CONFIG="$QMAKE_CONFIG static"
5015 #FIXME: qpa is implicit this should all be removed
5016 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5017 QT_CONFIG="$QT_CONFIG qpa"
5018 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5019 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5021 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5022 # Do not set this here for Windows. Let qmake do it so
5023 # debug and release precompiled headers are kept separate.
5024 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5026 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5027 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5028 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5029 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5030 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5031 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5033 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5034 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5036 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5037 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5038 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5039 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5040 QMakeVar add QMAKE_CFLAGS -g
5041 QMakeVar add QMAKE_CXXFLAGS -g
5042 QT_CONFIG="$QT_CONFIG separate_debug_info"
5044 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5045 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5047 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5048 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5049 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5050 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5051 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5052 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5053 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5054 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5055 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5056 if [ "$CFG_ARCH" = "mips" ]; then
5057 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5058 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5060 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5061 QT_CONFIG="$QT_CONFIG clock-gettime"
5063 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5064 QT_CONFIG="$QT_CONFIG clock-monotonic"
5066 if [ "$CFG_MREMAP" = "yes" ]; then
5067 QT_CONFIG="$QT_CONFIG mremap"
5069 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5070 QT_CONFIG="$QT_CONFIG getaddrinfo"
5072 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5073 QT_CONFIG="$QT_CONFIG ipv6ifname"
5075 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5076 QT_CONFIG="$QT_CONFIG getifaddrs"
5078 if [ "$CFG_INOTIFY" = "yes" ]; then
5079 QT_CONFIG="$QT_CONFIG inotify"
5081 if [ "$CFG_LIBJPEG" = "no" ]; then
5083 elif [ "$CFG_LIBJPEG" = "system" ]; then
5084 QT_CONFIG="$QT_CONFIG system-jpeg"
5086 if [ "$CFG_JPEG" = "no" ]; then
5087 QT_CONFIG="$QT_CONFIG no-jpeg"
5088 elif [ "$CFG_JPEG" = "yes" ]; then
5089 QT_CONFIG="$QT_CONFIG jpeg"
5091 if [ "$CFG_LIBPNG" = "no" ]; then
5094 if [ "$CFG_LIBPNG" = "system" ]; then
5095 QT_CONFIG="$QT_CONFIG system-png"
5097 if [ "$CFG_PNG" = "no" ]; then
5098 QT_CONFIG="$QT_CONFIG no-png"
5099 elif [ "$CFG_PNG" = "yes" ]; then
5100 QT_CONFIG="$QT_CONFIG png"
5102 if [ "$CFG_GIF" = "no" ]; then
5103 QT_CONFIG="$QT_CONFIG no-gif"
5104 elif [ "$CFG_GIF" = "yes" ]; then
5105 QT_CONFIG="$QT_CONFIG gif"
5107 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5108 QT_CONFIG="$QT_CONFIG no-freetype"
5109 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5110 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5111 QT_CONFIG="$QT_CONFIG system-freetype"
5113 QT_CONFIG="$QT_CONFIG freetype"
5115 if [ "$CFG_GUI" = "auto" ]; then
5118 if [ "$CFG_GUI" = "no" ]; then
5119 QT_CONFIG="$QT_CONFIG no-gui"
5122 if [ "$CFG_WIDGETS" = "no" ]; then
5123 QT_CONFIG="$QT_CONFIG no-widgets"
5124 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5127 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5128 #On Mac we implicitly link against libz, so we
5129 #never use the 3rdparty stuff.
5130 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5132 if [ "$CFG_ZLIB" = "yes" ]; then
5133 QT_CONFIG="$QT_CONFIG zlib"
5134 elif [ "$CFG_ZLIB" = "system" ]; then
5135 QT_CONFIG="$QT_CONFIG system-zlib"
5138 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5139 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5140 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5141 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5142 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5143 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5144 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5145 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5146 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5147 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5148 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5149 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5150 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5151 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5153 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5154 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5155 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5157 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5158 if [ "$CFG_RPATH" = "yes" ]; then
5159 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5160 # set the default rpath to the library installation directory
5161 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5163 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5164 if [ -n "$RPATH_FLAGS" ]; then
5166 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5170 elif [ "$CFG_RPATH" = "yes" ]; then
5171 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5175 if [ "$CFG_RPATH" = "yes" ]; then
5176 # set the default rpath to the library installation directory
5177 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5179 if [ -n "$RPATH_FLAGS" ]; then
5180 # add the user defined rpaths
5181 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5185 if [ '!' -z "$I_FLAGS" ]; then
5186 # add the user define include paths
5187 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5188 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5191 if [ '!' -z "$W_FLAGS" ]; then
5192 # add the user defined warning flags
5193 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5194 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5195 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5198 # turn off exceptions for the compilers that support it
5199 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5200 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5202 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5205 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5206 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5209 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5210 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5211 # Follow default behavior of configure.exe by overriding with "rtti".
5212 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5215 if [ "$CFG_ALSA" = "yes" ]; then
5216 QT_CONFIG="$QT_CONFIG alsa"
5219 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5220 QT_CONFIG="$QT_CONFIG pulseaudio"
5223 if [ "$CFG_COREWLAN" = "yes" ]; then
5224 QT_CONFIG="$QT_CONFIG corewlan"
5227 if [ "$CFG_ICU" = "yes" ]; then
5228 QT_CONFIG="$QT_CONFIG icu"
5231 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5232 QT_CONFIG="$QT_CONFIG force_asserts"
5235 if [ "$CFG_PCRE" = "qt" ]; then
5236 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5240 # Some Qt modules are too advanced in C++ for some old compilers
5241 # Detect here the platforms where they are known to work.
5243 # See Qt documentation for more information on which features are
5244 # supported and on which compilers.
5246 canBuildQtConcurrent="yes"
5247 canUseV8Snapshot="yes"
5249 case "$XPLATFORM" in
5251 # PA-RISC's assembly is too limited
5252 # gcc 3.4 on that platform can't build QtXmlPatterns
5253 # the assembly it generates cannot be compiled
5255 # Check gcc's version
5256 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5260 canBuildQtXmlPatterns="no"
5264 canBuildQtXmlPatterns="no"
5268 unsupported/vxworks-*-g++*)
5271 unsupported/vxworks-*-dcc*)
5273 canBuildQtXmlPatterns="no"
5276 # Check gcc's version
5277 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5285 canBuildQtXmlPatterns="no"
5290 # Check the compiler version
5291 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5294 canBuildQtXmlPatterns="no"
5295 canBuildQtConcurrent="no"
5299 canBuildQtConcurrent="no"
5305 canBuildQtXmlPatterns="no"
5306 canBuildQtConcurrent="no"
5312 # Get the xlC version
5313 cat > xlcver.c <<EOF
5317 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5322 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5323 xlcver=`./xlcver 2>/dev/null`
5326 if [ "$OPT_VERBOSE" = "yes" ]; then
5327 if [ -n "$xlcver" ]; then
5328 echo Found IBM xlC version: $xlcver.
5330 echo Could not determine IBM xlC version, assuming oldest supported.
5337 canBuildQtXmlPatterns="no"
5338 canBuildQtConcurrent="no"
5342 canBuildQtConcurrent="no"
5348 canBuildQtConcurrent="no"
5352 if [ "$CFG_GUI" = "no" ]; then
5353 # WebKit requires QtGui
5357 if [ "$CFG_SHARED" = "no" ]; then
5359 echo "WARNING: Using static linking will disable the WebKit module."
5364 CFG_CONCURRENT="yes"
5365 if [ "$canBuildQtConcurrent" = "no" ]; then
5366 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5369 QT_CONFIG="$QT_CONFIG concurrent"
5373 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5374 QT_CONFIG="$QT_CONFIG audio-backend"
5378 if [ "$CFG_WEBKIT" = "debug" ]; then
5379 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5383 QT_CONFIG="$QT_CONFIG v8"
5384 # Detect snapshot support
5385 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5386 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5389 *) canUseV8Snapshot="no"
5393 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5394 # QEMU crashes when building inside Scratchbox with an ARM target
5395 canUseV8Snapshot="no"
5398 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5399 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5401 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5402 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5405 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5406 QT_CONFIG="$QT_CONFIG v8snapshot"
5410 if [ "$CFG_QML_DEBUG" = "no" ]; then
5411 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5414 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5417 QMakeVar add QMAKE_CFLAGS -fno-exceptions
5418 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
5419 QMakeVar add QMAKE_LFLAGS -fno-exceptions
5424 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
5425 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
5426 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
5433 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
5439 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5441 case "$COMPILER_VERSION" in
5443 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5444 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5445 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5448 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5449 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5450 QT_GCC_PATCH_VERSION=0
5460 #-------------------------------------------------------------------------------
5461 # part of configuration information goes into qconfig.h
5462 #-------------------------------------------------------------------------------
5464 case "$CFG_QCONFIG" in
5466 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5469 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5470 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5471 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5472 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5473 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5474 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5476 echo "#endif" >>"$tmpconfig"
5480 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5484 # define QT_EDITION $QT_EDITION
5488 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5489 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5491 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5492 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5495 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5496 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5499 if [ "$BUILD_ON_MAC" = "yes" ]; then
5500 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5501 #if defined(__LP64__)
5502 # define QT_POINTER_SIZE 8
5504 # define QT_POINTER_SIZE 4
5508 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5509 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5512 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5513 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5514 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5518 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5520 if [ "$CFG_DEV" = "yes" ]; then
5521 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5524 # Add QPA to config.h
5525 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5527 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5528 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5531 # Add turned on SQL drivers
5532 for DRIVER in $CFG_SQL_AVAILABLE; do
5533 eval "VAL=\$CFG_SQL_$DRIVER"
5536 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5537 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5538 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5541 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5547 QMakeVar set sql-drivers "$SQL_DRIVERS"
5548 QMakeVar set sql-plugins "$SQL_PLUGINS"
5550 # Add other configuration options to the qconfig.h file
5551 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5552 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5553 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5554 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5555 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
5556 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5557 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5559 # X11/Unix/Mac only configs
5560 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5561 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5562 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5563 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5564 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5565 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5566 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5567 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5568 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5569 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5570 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5571 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5572 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5573 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5575 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5576 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5577 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5578 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5579 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5580 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5581 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5582 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5583 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5584 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5585 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5586 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5587 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5589 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5590 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5591 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5592 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5593 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5594 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5595 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5596 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5598 # sort QCONFIG_FLAGS for neatness if we can
5599 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5600 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5602 if [ -n "$QCONFIG_FLAGS" ]; then
5603 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5604 #ifndef QT_BOOTSTRAPPED
5607 for cfg in $QCONFIG_FLAGS; do
5608 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5609 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5610 # figure out define logic, so we can output the correct
5611 # ifdefs to override the global defines in a project
5613 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5614 # QT_NO_option can be forcefully turned on by QT_option
5615 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5616 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5617 # QT_option can be forcefully turned off by QT_NO_option
5618 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5621 if [ -z $cfgdNeg ]; then
5622 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5629 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5630 #if defined($cfgd) && defined($cfgdNeg)
5632 #elif !defined($cfgd) && !defined($cfgdNeg)
5639 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5640 #endif // QT_BOOTSTRAPPED
5645 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5646 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5647 #define QT_VISIBILITY_AVAILABLE
5652 if [ -n "$QT_LIBINFIX" ]; then
5653 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5654 #define QT_LIBINFIX "$QT_LIBINFIX"
5659 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5660 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5661 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5663 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5664 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5665 chmod -w "$outpath/src/corelib/global/qconfig.h"
5666 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5667 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5671 #-------------------------------------------------------------------------------
5672 # save configuration into qconfig.pri
5673 #-------------------------------------------------------------------------------
5674 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5675 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5676 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5677 if [ "$CFG_DEBUG" = "yes" ]; then
5678 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5679 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5680 QT_CONFIG="$QT_CONFIG release"
5682 QT_CONFIG="$QT_CONFIG debug"
5683 elif [ "$CFG_DEBUG" = "no" ]; then
5684 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5685 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5686 QT_CONFIG="$QT_CONFIG debug"
5688 QT_CONFIG="$QT_CONFIG release"
5690 if [ "$CFG_FRAMEWORK" = "no" ]; then
5691 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5693 QT_CONFIG="$QT_CONFIG qt_framework"
5694 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5696 if [ "$CFG_DEV" = "yes" ]; then
5697 QT_CONFIG="$QT_CONFIG private_tests"
5700 cat >>"$QTCONFIG.tmp" <<EOF
5702 CONFIG += $QTCONFIG_CONFIG
5704 QT_HOST_ARCH = $CFG_HOST_ARCH
5705 QT_EDITION = $Edition
5706 QT_CONFIG += $QT_CONFIG
5709 QT_VERSION = $QT_VERSION
5710 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5711 QT_MINOR_VERSION = $QT_MINOR_VERSION
5712 QT_PATCH_VERSION = $QT_PATCH_VERSION
5715 QT_LIBINFIX = $QT_LIBINFIX
5716 QT_NAMESPACE = $QT_NAMESPACE
5719 if [ -n "$CFG_SYSROOT" ]; then
5720 echo "# sysroot" >>"$QTCONFIG.tmp"
5721 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5722 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5723 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5724 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5725 echo "}" >> "$QTCONFIG.tmp"
5726 echo >> "$QTCONFIG.tmp"
5728 if [ -n "$RPATH_FLAGS" ]; then
5729 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5731 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5732 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5733 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5734 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5737 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5738 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5739 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5742 # replace qconfig.pri if it differs from the newly created temp file
5743 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5744 rm -f "$QTCONFIG.tmp"
5746 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5749 #-------------------------------------------------------------------------------
5750 # save configuration into qmodule.pri
5751 #-------------------------------------------------------------------------------
5752 QTMODULE="$outpath/mkspecs/qmodule.pri"
5754 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
5756 # Ensure we can link to uninistalled libraries
5757 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5758 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5760 if [ -n "$QT_CFLAGS_PSQL" ]; then
5761 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5763 if [ -n "$QT_LFLAGS_PSQL" ]; then
5764 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5766 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5767 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5769 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5770 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5772 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5773 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5775 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5776 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5778 if [ -n "$QT_LFLAGS_ODBC" ]; then
5779 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5781 if [ -n "$QT_LFLAGS_TDS" ]; then
5782 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5785 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5786 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5789 #dump in the OPENSSL_LIBS info
5790 if [ '!' -z "$OPENSSL_LIBS" ]; then
5791 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5792 elif [ "$CFG_OPENSSL" = "linked" ]; then
5793 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5796 #dump in the SDK info
5797 if [ '!' -z "$CFG_SDK" ]; then
5798 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5802 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5803 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5805 # replace qmodule.pri if it differs from the newly created temp file
5806 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5807 rm -f "$QTMODULE.tmp"
5809 mv -f "$QTMODULE.tmp" "$QTMODULE"
5812 #-------------------------------------------------------------------------------
5813 # save configuration into .qmake.cache
5814 #-------------------------------------------------------------------------------
5816 CACHEFILE="$outpath/.qmake.cache"
5817 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5818 cat >>"$CACHEFILE.tmp" <<EOF
5820 QT_SOURCE_TREE = \$\$quote($relpath)
5821 QT_BUILD_TREE = \$\$quote($outpath)
5822 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5824 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5825 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5826 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5828 include(\$\$PWD/mkspecs/qmodule.pri)
5829 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5833 #dump the qmake spec
5834 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5835 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5837 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5840 # replace .qmake.cache if it differs from the newly created temp file
5841 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5842 rm -f "$CACHEFILE.tmp"
5844 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5847 #-------------------------------------------------------------------------------
5848 # give feedback on configuration
5849 #-------------------------------------------------------------------------------
5850 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5854 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5857 This target is using the GNU C++ compiler ($PLATFORM).
5859 Recent versions of this compiler automatically include code for
5860 exceptions, which increase both the size of the Qt libraries and
5861 the amount of memory taken by your applications.
5863 You may choose to re-run `basename $0` with the -no-exceptions
5864 option to compile Qt without exceptions. This is completely binary
5865 compatible, and existing applications will continue to work.
5873 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5876 This target is using the MIPSpro C++ compiler ($PLATFORM).
5878 You may choose to re-run `basename $0` with the -no-exceptions
5879 option to compile Qt without exceptions. This will make the
5880 size of the Qt library smaller and reduce the amount of memory
5881 taken by your applications.
5893 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5894 echo "Build type: $PLATFORM"
5896 echo "Building on: $PLATFORM"
5897 echo "Building for: $XPLATFORM"
5900 echo "Architecture: $CFG_ARCH"
5901 echo "Host architecture: $CFG_HOST_ARCH"
5903 if [ -n "$PLATFORM_NOTES" ]; then
5904 echo "Platform notes:"
5905 echo "$PLATFORM_NOTES"
5910 if [ "$OPT_VERBOSE" = "yes" ]; then
5911 echo $ECHO_N "qmake vars .......... $ECHO_C"
5912 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5913 echo "qmake switches ......... $QMAKE_SWITCHES"
5916 echo "Build .................. $CFG_BUILD_PARTS"
5917 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5918 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5919 echo "Debug .................. yes (combined)"
5920 if [ "$CFG_DEBUG" = "yes" ]; then
5921 echo "Default Link ........... debug"
5923 echo "Default Link ........... release"
5926 echo "Debug .................. $CFG_DEBUG"
5928 if [ -n "$PKG_CONFIG" ]; then
5929 echo "pkg-config ............. yes"
5931 echo "pkg-config ............. no"
5933 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5934 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5935 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5936 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5937 echo "QtGui module ........... $CFG_GUI"
5938 echo "QtWidgets module ....... $CFG_WIDGETS"
5939 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5940 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5942 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5944 echo "QML debugging .......... $CFG_QML_DEBUG"
5945 echo "PCH support ............ $CFG_PRECOMPILE"
5946 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5947 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5948 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5949 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5950 elif [ "$CFG_ARCH" = "arm" ]; then
5951 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5952 echo "NEON support ........... ${CFG_NEON}"
5954 if [ "$CFG_ARCH" = "mips" ]; then
5955 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5957 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5958 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5959 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5960 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5961 echo "NIS support ............ $CFG_NIS"
5962 echo "CUPS support ........... $CFG_CUPS"
5963 echo "Iconv support .......... $CFG_ICONV"
5964 echo "Glib support ........... $CFG_GLIB"
5965 echo "GStreamer support ...... $CFG_GSTREAMER"
5966 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
5967 echo "Large File support ..... $CFG_LARGEFILE"
5968 echo "GIF support ............ $CFG_GIF"
5969 if [ "$CFG_JPEG" = "no" ]; then
5970 echo "JPEG support ........... $CFG_JPEG"
5972 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
5974 if [ "$CFG_PNG" = "no" ]; then
5975 echo "PNG support ............ $CFG_PNG"
5977 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
5979 echo "zlib support ........... $CFG_ZLIB"
5980 echo "Session management ..... $CFG_SM"
5981 echo "libudev support ........ $CFG_LIBUDEV"
5983 if [ "$CFG_OPENGL" = "desktop" ]; then
5984 echo "OpenGL support ......... yes (Desktop OpenGL)"
5985 elif [ "$CFG_OPENGL" = "es2" ]; then
5986 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
5988 echo "OpenGL support ......... no"
5991 if [ "$CFG_OPENVG" ]; then
5992 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5993 echo "OpenVG support ......... ShivaVG"
5995 echo "OpenVG support ......... $CFG_OPENVG"
5999 echo "XShape support ......... $CFG_XSHAPE"
6000 echo "XVideo support ......... $CFG_XVIDEO"
6001 echo "XSync support .......... $CFG_XSYNC"
6002 echo "Xinerama support ....... $CFG_XINERAMA"
6003 echo "Xcursor support ........ $CFG_XCURSOR"
6004 echo "Xfixes support ......... $CFG_XFIXES"
6005 echo "Xrandr support ......... $CFG_XRANDR"
6006 echo "Xi support ............. $CFG_XINPUT"
6007 echo "MIT-SHM support ........ $CFG_MITSHM"
6008 echo "FontConfig support ..... $CFG_FONTCONFIG"
6009 echo "XKB Support ............ $CFG_XKB"
6010 echo "immodule support ....... $CFG_IM"
6011 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6013 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6014 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6015 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6016 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6017 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6018 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6019 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6020 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6021 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6024 if [ "$CFG_OPENSSL" = "yes" ]; then
6025 OPENSSL_LINKAGE="(run-time)"
6026 elif [ "$CFG_OPENSSL" = "linked" ]; then
6027 OPENSSL_LINKAGE="(linked)"
6029 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6030 echo "Alsa support ........... $CFG_ALSA"
6031 if [ "$BUILD_ON_MAC" = "yes" ]; then
6032 echo "CoreWlan support ....... $CFG_COREWLAN"
6034 echo "libICU support ......... $CFG_ICU"
6035 echo "PCRE support ........... $CFG_PCRE"
6036 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6037 echo "Xcb support ............ limited (old version)"
6039 echo "Xcb support ............ $CFG_XCB"
6041 echo "Xrender support ........ $CFG_XRENDER"
6042 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6043 echo "XInput2 support ........ $CFG_XINPUT2"
6045 echo "EGLFS support .......... $CFG_EGLFS"
6046 echo "DirectFB support ....... $CFG_DIRECTFB"
6049 # complain about not being able to use dynamic plugins if we are using a static build
6050 if [ "$CFG_SHARED" = "no" ]; then
6052 echo "WARNING: Using static linking will disable the use of dynamically"
6053 echo "loaded plugins. Make sure to import all needed static plugins,"
6054 echo "or compile needed modules into the library."
6057 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6059 echo "NOTE: When linking against OpenSSL, you can override the default"
6060 echo "library names through OPENSSL_LIBS."
6062 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6066 exec 1>&3 3>&- # restore stdout
6067 cat $outpath/config.summary # display config feedback to user
6069 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6071 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6072 echo "if you want a pure debug build."
6077 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6082 #-------------------------------------------------------------------------------
6083 # build makefiles based on the configuration
6084 #-------------------------------------------------------------------------------
6086 echo "Finding project files. Please wait..."
6087 if [ "$CFG_NOPROCESS" != "yes" ]; then
6088 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6089 if [ -f "${relpath}/qtbase.pro" ]; then
6090 mkfile="${outpath}/Makefile"
6091 [ -f "$mkfile" ] && chmod +w "$mkfile"
6092 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6096 # .projects -> projects to process
6097 # .projects.1 -> qt and moc
6098 # .projects.2 -> subdirs and libs
6099 # .projects.3 -> the rest
6100 rm -f .projects .projects.1 .projects.2 .projects.3
6102 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6103 if [ -z "$AWK" ]; then
6104 for p in `echo $QMAKE_PROJECTS`; do
6105 echo "$p" >> .projects
6108 cat >projects.awk <<EOF
6114 first = "./.projects.1.tmp"
6115 second = "./.projects.2.tmp"
6116 third = "./.projects.3.tmp"
6121 if ( ! target_file )
6123 print input_file >target_file
6128 input_file = FILENAME
6133 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6136 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6137 target_file = second
6142 matched_target == 0 && /^(TEMPLATE.*=)/ {
6143 if ( \$3 == "subdirs" )
6144 target_file = second
6145 else if ( \$3 == "lib" )
6151 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6152 if ( \$0 ~ /plugin/ )
6155 target_file = second
6160 if ( ! target_file )
6162 print input_file >>target_file
6169 for p in `echo $QMAKE_PROJECTS`; do
6170 echo "$p" >> .projects.all
6173 # if you get errors about the length of the command line to awk, change the -l arg
6175 split -l 100 .projects.all .projects.all.
6176 for p in .projects.all.*; do
6177 "$AWK" -f projects.awk `cat $p`
6178 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6179 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6180 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6181 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6183 rm -f .projects.all* projects.awk
6185 [ -f .projects.1 ] && cat .projects.1 >>.projects
6186 [ -f .projects.2 ] && cat .projects.2 >>.projects
6187 rm -f .projects.1 .projects.2
6188 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6189 cat .projects.3 >>.projects
6193 # don't sort Qt and MOC in with the other project files
6194 # also work around a segfaulting uniq(1)
6195 if [ -f .sorted.projects.2 ]; then
6196 sort .sorted.projects.2 > .sorted.projects.2.new
6197 mv -f .sorted.projects.2.new .sorted.projects.2
6198 cat .sorted.projects.2 >> .sorted.projects.1
6200 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6201 rm -f .sorted.projects.2 .sorted.projects.1
6205 if [ -f .projects ]; then
6206 uniq .projects >.tmp
6207 mv -f .tmp .projects
6208 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6210 if [ -f .projects.3 ]; then
6211 uniq .projects.3 >.tmp
6212 mv -f .tmp .projects.3
6213 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6215 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6219 for part in $CFG_BUILD_PARTS; do
6221 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6222 libs) PART_ROOTS="$PART_ROOTS src" ;;
6223 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6224 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6229 if [ "$CFG_DEV" = "yes" ]; then
6230 PART_ROOTS="$PART_ROOTS tests"
6233 echo "Creating makefiles. Please wait..."
6234 for file in .projects .projects.3; do
6235 [ '!' -f "$file" ] && continue
6236 for a in `cat $file`; do
6238 for r in $PART_ROOTS; do
6239 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6244 [ "$IN_ROOT" = "no" ] && continue
6247 *winmain/winmain.pro)
6248 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6252 */qmake/qmake.pro) continue ;;
6253 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*|*tools/qdbusxml2cpp*|*tools/qdbuscpp2xml*) SPEC=$QMAKESPEC ;;
6254 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6260 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6261 test -d "$dir" || mkdir -p "$dir"
6262 OUTDIR="$outpath/$dir"
6263 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6264 # fast configure - the makefile exists, skip it
6265 # since the makefile exists, it was generated by qmake, which means we
6266 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6268 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6271 QMAKE_SPEC_ARGS="-spec $SPEC"
6272 echo $ECHO_N " for $a$ECHO_C"
6274 QMAKE="$outpath/bin/qmake"
6275 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6276 if [ "$file" = ".projects.3" ]; then
6279 cat >"${OUTDIR}/Makefile" <<EOF
6280 # ${OUTDIR}/Makefile: generated by configure
6282 # WARNING: This makefile will be replaced with a real makefile.
6283 # All changes made to this file will be lost.
6285 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6287 cat >>"${OUTDIR}/Makefile" <<EOF
6289 all clean install qmake first Makefile: FORCE
6290 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6298 if [ "$OPT_VERBOSE" = "yes" ]; then
6299 echo " (`basename $SPEC`)"
6300 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6305 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6306 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6310 rm -f .projects .projects.3
6312 #-------------------------------------------------------------------------------
6313 # check for platforms that we don't yet know about
6314 #-------------------------------------------------------------------------------
6315 if [ "$CFG_ARCH" = "unknown" ]; then
6318 NOTICE: configure was unable to determine the architecture
6319 for the $XQMAKESPEC target.
6321 Qt will not use a specialized implementation for any atomic
6322 operations. Instead a generic implemention based on either GCC
6323 intrinsics or C++11 std::atomic<T> will be used (when
6324 available). The generic implementations are generally as fast
6325 as and always as safe as a specialized implementation.
6327 If no generic implementation is available, Qt will use a
6328 fallback UNIX implementation which uses a single
6329 pthread_mutex_t to protect all atomic operations. This
6330 implementation is the slow (but safe) fallback implementation
6331 for architectures Qt does not yet support.
6335 #-------------------------------------------------------------------------------
6336 # check if the user passed the -no-zlib option, which is no longer supported
6337 #-------------------------------------------------------------------------------
6338 if [ -n "$ZLIB_FORCED" ]; then
6339 which_zlib="supplied"
6340 if [ "$CFG_ZLIB" = "system" ]; then
6346 NOTICE: The -no-zlib option was supplied but is no longer
6349 Qt now requires zlib support in all builds, so the -no-zlib
6350 option was ignored. Qt will be built using the $which_zlib
6355 #-------------------------------------------------------------------------------
6356 # check if the user passed the obsoleted -wayland or -no-wayland flag
6357 #-------------------------------------------------------------------------------
6358 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6361 NOTICE: The -wayland and -no-wayland flags are now obsolete
6363 All configuring of QtWayland plugin and QtCompositor happens in the module
6367 #-------------------------------------------------------------------------------
6368 # check if the user passed the obsoleted -arch or -host-arch options
6369 #-------------------------------------------------------------------------------
6370 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6373 NOTICE: The -arch and -host-arch options are obsolete.
6375 Qt now detects the target and host architectures based on compiler
6376 output. Qt will be built using $CFG_ARCH for the target architecture
6377 and $CFG_HOST_ARCH for the host architecture (note that these two
6378 will be the same unless you are cross-compiling).
6382 #-------------------------------------------------------------------------------
6383 # finally save the executed command to another script
6384 #-------------------------------------------------------------------------------
6385 if [ `basename $0` != "config.status" ]; then
6386 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6388 # add the system variables
6389 for varname in $SYSTEM_VARIABLES; do
6391 'if [ -n "\$'${varname}'" ]; then
6392 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6397 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6399 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6400 echo "#!/bin/sh" > "$outpath/config.status"
6401 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6402 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6403 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6404 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6405 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6406 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6407 echo "else" >> "$outpath/config.status"
6408 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6409 echo "fi" >> "$outpath/config.status"
6410 chmod +x "$outpath/config.status"
6413 if [ -n "$RPATH_MESSAGE" ]; then
6415 echo "$RPATH_MESSAGE"
6418 MAKE=`basename "$MAKE"`
6420 echo Qt is now configured for building. Just run \'$MAKE\'.
6421 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6422 echo Once everything is built, Qt is installed.
6423 echo You should not run \'$MAKE install\'.
6425 echo Once everything is built, you must run \'$MAKE install\'.
6426 echo Qt will be installed into $QT_INSTALL_PREFIX
6429 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.