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 resolveDeviceMkspec()
247 result=$(find "$relpath/mkspecs/devices/" -type d -name "*$VAL*" | sed "s,^$relpath/mkspecs/,,")
248 match_count=$(echo "$result" | wc -w)
249 if [ "$match_count" -gt 1 ]; then
250 echo >&2 "Error: Multiple matches for device '$VAL'. Candidates are:"
251 tabbed_result=$(echo "$result" | sed "s,^, ,")
252 echo >&2 "$tabbed_result"
254 elif [ "$match_count" -eq 0 ]; then
255 echo >&2 "Error: No device matching '$VAL'"
262 #-------------------------------------------------------------------------------
263 # operating system detection
264 #-------------------------------------------------------------------------------
266 # need that throughout the script
267 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
268 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
269 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
270 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
272 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
273 if echo '\c' | grep '\c' >/dev/null; then
279 #-------------------------------------------------------------------------------
280 # window system detection
281 #-------------------------------------------------------------------------------
285 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
290 #-----------------------------------------------------------------------------
291 # Qt version detection
292 #-----------------------------------------------------------------------------
293 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
297 if [ -n "$QT_VERSION" ]; then
298 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
299 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
300 if [ -n "$MAJOR" ]; then
301 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
302 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
303 QT_MAJOR_VERSION="$MAJOR"
304 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
305 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
308 if [ -z "$QT_MAJOR_VERSION" ]; then
309 echo "Cannot process version from qglobal.h: $QT_VERSION"
310 echo "Cannot proceed."
314 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
315 if [ -z "$QT_PACKAGEDATE" ]; then
316 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
317 echo "Cannot proceed"
321 #-------------------------------------------------------------------------------
323 #-------------------------------------------------------------------------------
327 EditionString=Commercial
331 # parse the arguments, setting things to "yes" or "no"
332 while [ "$#" -gt 0 ]; do
336 #Autoconf style options
338 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
342 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
346 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
347 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
350 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
353 -h|help|--help|-help)
354 if [ "$VAL" = "yes" ]; then
356 COMMERCIAL_USER="no" #doesn't matter we will display the help
359 COMMERCIAL_USER="no" #doesn't matter we will display the help
363 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
367 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
374 if [ "$UNKNOWN_ARG" = "yes" ]; then
386 COMMERCIAL_USER="yes"
400 if [ "$COMMERCIAL_USER" = "ask" ]; then
402 echo "Which edition of Qt do you want to use ?"
404 echo "Type 'c' if you want to use the Commercial Edition."
405 echo "Type 'o' if you want to use the Open Source Edition."
409 if [ "$commercial" = "c" ]; then
410 COMMERCIAL_USER="yes"
412 elif [ "$commercial" = "o" ]; then
419 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
420 # Commercial preview release
421 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
424 QT_EDITION="QT_EDITION_DESKTOP"
425 LicenseType="Technology Preview"
426 elif [ $COMMERCIAL_USER = "yes" ]; then
427 # one of commercial editions
428 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
430 # read in the license file
431 if [ -f "$LICENSE_FILE" ]; then
432 . "$LICENSE_FILE" >/dev/null 2>&1
433 if [ -z "$LicenseKeyExt" ]; then
435 echo "You are using an old license file."
437 echo "Please install the license file supplied by Nokia,"
438 echo "or install the Qt Open Source Edition if you intend to"
439 echo "develop free software."
442 if [ -z "$Licensee" ]; then
444 echo "Invalid license key. Please check the license key."
448 if [ -z "$LicenseKeyExt" ]; then
450 echo $ECHO_N "Please enter your license key: $ECHO_C"
452 Licensee="Unknown user"
457 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
458 && LicenseValid="yes" \
460 if [ "$LicenseValid" != "yes" ]; then
462 echo "Invalid license key. Please check the license key."
465 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
466 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
467 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
468 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
470 # determine which edition we are licensed to use
471 case "$LicenseTypeCode" in
473 LicenseType="Commercial"
477 QT_EDITION="QT_EDITION_UNIVERSAL"
480 Edition="FullFramework"
481 EditionString="Full Framework"
482 QT_EDITION="QT_EDITION_DESKTOP"
485 Edition="GUIFramework"
486 EditionString="GUI Framework"
487 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
492 LicenseType="Evaluation"
493 QMakeVar add DEFINES QT_EVAL
497 QT_EDITION="QT_EDITION_EVALUATION"
502 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
504 echo "Invalid license key. Please check the license key."
508 # verify that we are licensed to use Qt on this platform
510 case "$PlatformCode" in
513 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
517 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
520 ### EMBEDDED_QPA logic missing ###
521 case "$PlatformCode,$PLATFORM_MAC" in
522 X9,* | XC,* | XU,* | XW,* | XM,*)
524 LICENSE_EXTENSION="-ALLOS"
526 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
527 # Qt for Embedded Linux
528 LICENSE_EXTENSION="-EMBEDDED"
530 6M,* | N7,* | N9,* | NX,*)
532 LICENSE_EXTENSION="-EMBEDDED"
534 FM,* | LM,yes | ZM,no)
536 LICENSE_EXTENSION="-DESKTOP"
540 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
542 echo "You are not licensed for the $Platform platform."
544 echo "Please contact qt-info@nokia.com to upgrade your license to"
545 echo "include the $Platform platform, or install the Qt Open Source Edition"
546 echo "if you intend to develop free software."
551 if test -r "$relpath/.LICENSE"; then
552 # Generic, non-final license
554 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
559 *TECHNOLOGY?PREVIEW*)
566 echo >&2 "Invalid license files; cannot continue"
571 EditionString="$Edition"
572 QT_EDITION="QT_EDITION_DESKTOP"
575 case "$LicenseFeatureCode" in
578 case "$LicenseType" in
580 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
583 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
589 case "$LicenseType" in
591 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
594 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
600 echo "Invalid license key. Please check the license key."
604 case "$LicenseFeatureCode" in
612 if [ '!' -f "$outpath/LICENSE" ]; then
613 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
614 echo "this software has disappeared."
616 echo "Sorry, you are not licensed to use this software."
617 echo "Try re-installing."
621 elif [ $COMMERCIAL_USER = "no" ]; then
622 # Open Source edition - may only be used under the terms of the GPL or LGPL.
623 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
624 Licensee="Open Source"
626 EditionString="Open Source"
627 QT_EDITION="QT_EDITION_OPENSOURCE"
630 #-------------------------------------------------------------------------------
631 # initalize variables
632 #-------------------------------------------------------------------------------
634 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
635 for varname in $SYSTEM_VARIABLES; do
636 qmakevarname="${varname}"
637 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
638 if [ "${varname}" = "LDFLAGS" ]; then
639 qmakevarname="LFLAGS"
640 elif [ "${varname}" = "LD" ]; then
644 'if [ -n "\$'${varname}'" ]; then
645 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
649 # Use CC/CXX to run config.tests
650 mkdir -p "$outpath/config.tests"
651 rm -f "$outpath/config.tests/.qmake.cache"
652 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
654 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
656 # QTDIR may be set and point to an old or system-wide Qt installation
659 # the minimum version of libdbus-1 that we require:
660 MIN_DBUS_1_VERSION=0.93
662 # initalize internal variables
663 CFG_CONFIGURE_EXIT_ON_ERROR=yes
665 CFG_GUI=auto # (yes|no|auto)
691 CFG_OPENVG_LC_INCLUDES=no
692 CFG_OPENVG_SHIVA=auto
693 CFG_OPENVG_ON_OPENGL=auto
699 QT_DEFAULT_BUILD_PARTS="libs examples"
703 CFG_AUDIO_BACKEND=auto
706 CFG_JAVASCRIPTCORE_JIT=auto
709 # Target architecture
711 # Host architecture, same as CFG_ARCH when not cross-compiling
713 # Set when the -arch or -host-arch arguments are used
714 OPT_OBSOLETE_HOST_ARG=no
726 CFG_OBSOLETE_WAYLAND=no
738 CFG_SEPARATE_DEBUG_INFO=no
739 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
740 CFG_REDUCE_EXPORTS=auto
748 CFG_REDUCE_RELOCATIONS=auto
749 CFG_ACCESSIBILITY=auto
754 CFG_CLOCK_GETTIME=auto
755 CFG_CLOCK_MONOTONIC=auto
763 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
766 CFG_PREFIX_INSTALL=yes
775 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
776 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
780 OPT_CONFIRM_LICENSE=no
793 QPA_PLATFORM_GUARD=yes
795 # initalize variables used for installation
804 QT_INSTALL_TRANSLATIONS=
813 #flags for SQL drivers
821 QT_LFLAGS_ODBC="-lodbc"
824 # flags for libdbus-1
828 # flags for Glib (X11 only)
832 # flags for GStreamer (X11 only)
836 # default qpa platform
837 QT_QPA_DEFAULT_PLATFORM=
839 #-------------------------------------------------------------------------------
840 # check SQL drivers available in this package
841 #-------------------------------------------------------------------------------
843 # opensource version removes some drivers, so force them to be off
849 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
850 for a in "$relpath/src/plugins/sqldrivers/"*; do
852 base_a=`basename "$a"`
853 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
854 eval "CFG_SQL_${base_a}=auto"
859 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
860 if [ -d "$relpath/src/plugins/imageformats" ]; then
861 for a in "$relpath/src/plugins/imageformats/"*; do
863 base_a=`basename "$a"`
864 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
869 #-------------------------------------------------------------------------------
870 # parse command line arguments
871 #-------------------------------------------------------------------------------
873 # parse the arguments, setting things to "yes" or "no"
874 while [ "$#" -gt 0 ]; do
878 #Autoconf style options
880 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
884 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
888 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
889 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
892 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
896 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
900 -no-*-*|-plugin-*-*|-qt-*-*)
901 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
902 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
906 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
909 #Qt style yes options
910 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-directfb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon)
911 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
914 #Qt style options that pass an argument
917 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
921 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa)
922 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
926 #Qt style complex options in one command
927 -enable-*|-disable-*)
928 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
929 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
931 #Qt Builtin/System style options
932 -no-*|-system-*|-qt-*)
933 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
934 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
936 #Options that cannot be generalized
943 # this option may or may not be followed by an argument
944 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
953 # this option may or may not be followed by an argument
954 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
962 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
963 # this option may or may not be followed by an argument
964 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
983 if [ "$1" = "-D" ]; then
987 VAL=`echo $1 | sed 's,-D,,'`
992 # this option may or may not be followed by an argument
993 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1002 if [ "$1" = "-I" ]; then
1006 VAL=`echo $1 | sed 's,-I,,'`
1011 if [ "$1" = "-L" ]; then
1015 VAL=`echo $1 | sed 's,-L,,'`
1020 if [ "$1" = "-R" ]; then
1024 VAL=`echo $1 | sed 's,-R,,'`
1029 if [ "$1" = "-l" ]; then
1033 VAL=`echo $1 | sed 's,-l,,'`
1038 if [ "$1" = "-F" ]; then
1042 VAL=`echo $1 | sed 's,-F,,'`
1047 if [ "$1" = "-fw" ]; then
1051 VAL=`echo $1 | sed 's,-fw,,'`
1059 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1066 if [ "$UNKNOWN_ARG" = "yes" ]; then
1067 echo "$1: unknown argument"
1078 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1079 CFG_ACCESSIBILITY="$VAL"
1088 CFG_USE_GNUMAKE="$VAL"
1091 CFG_MYSQL_CONFIG="$VAL"
1094 QT_INSTALL_PREFIX="$VAL"
1097 QT_HOST_PREFIX="$VAL"
1106 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1107 CFG_PKGCONFIG="$VAL"
1113 CFG_PKGCONFIG="force"
1116 QT_INSTALL_DOCS="$VAL"
1119 QT_INSTALL_HEADERS="$VAL"
1122 QT_INSTALL_PLUGINS="$VAL"
1125 QT_INSTALL_IMPORTS="$VAL"
1128 QT_INSTALL_DATA="$VAL"
1131 QT_INSTALL_LIBS="$VAL"
1140 QT_INSTALL_TRANSLATIONS="$VAL"
1142 sysconfdir|settingsdir)
1143 QT_INSTALL_SETTINGS="$VAL"
1146 QT_INSTALL_EXAMPLES="$VAL"
1149 QT_INSTALL_TESTS="$VAL"
1158 QT_INSTALL_BINS="$VAL"
1164 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1171 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1172 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1173 [ "$VAL" = "es2" ]; then
1180 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1187 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1190 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1193 if [ "$BUILD_ON_MAC" = "yes" ]; then
1200 OPT_OBSOLETE_HOST_ARG=yes
1203 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1204 CFG_MAC_HARFBUZZ="$VAL"
1211 if [ "$BUILD_ON_MAC" = "yes" ]; then
1212 CFG_FRAMEWORK="$VAL"
1218 if [ "$VAL" = "yes" ]; then
1220 QMakeVar add QMAKE_CFLAGS -pg
1221 QMakeVar add QMAKE_CXXFLAGS -pg
1222 QMakeVar add QMAKE_LFLAGS -pg
1223 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1229 if [ "$VAL" = "yes" ]; then
1230 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1235 # keep compatibility with old platform names
1241 PLATFORM=hpux-acc-o64
1244 PLATFORM=hpux-acc-64
1247 PLATFORM=hpux-acc-64
1259 PLATFORM=reliant-cds-64
1262 PLATFORM=solaris-cc-64
1265 PLATFORM=unixware-cc
1268 PLATFORM=unixware-g++
1271 PLATFORM=unixware-cc
1274 PLATFORM=unixware-g++
1280 i386) NATIVE_64_ARCH="x86_64" ;;
1281 powerpc) NATIVE_64_ARCH="ppc64" ;;
1282 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1284 if [ ! -z "$NATIVE_64_ARCH" ]; then
1285 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1292 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1295 XPLATFORM=`resolveDeviceMkspec $VAL`
1296 [ "$XPLATFORM" = "undefined" ] && exit 101
1299 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1300 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1301 DeviceVar set $DEV_VAR $DEV_VAL
1304 QT_QPA_DEFAULT_PLATFORM="$VAL"
1307 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1308 CFG_DEBUG_RELEASE="$VAL"
1314 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1315 CFG_RELEASE_QMAKE="$VAL"
1321 if [ "$VAL" = "yes" ]; then
1323 elif [ "$VAL" = "no" ]; then
1330 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1331 CFG_PREFIX_INSTALL="$VAL"
1339 developer-build|commercial|opensource)
1340 # These switches have been dealt with already
1343 if [ "$VAL" = "yes" ]; then
1345 elif [ "$VAL" = "no" ]; then
1352 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1353 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1359 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1360 if [ "$VAL" = "no" ]; then
1361 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1362 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1363 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1369 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1376 if [ "$VAL" = "no" ]; then
1383 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1391 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1398 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1405 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1412 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1419 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1426 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1433 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1440 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1441 CFG_PRECOMPILE="$VAL"
1446 separate-debug-info)
1447 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1448 CFG_SEPARATE_DEBUG_INFO="$VAL"
1449 elif [ "$VAL" = "nocopy" ] ; then
1450 CFG_SEPARATE_DEBUG_INFO="yes"
1451 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1457 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1458 CFG_REDUCE_EXPORTS="$VAL"
1464 if [ "$VAL" = "no" ]; then
1471 if [ "$VAL" = "no" ]; then
1478 if [ "$VAL" = "no" ]; then
1485 if [ "$VAL" = "no" ]; then
1492 if [ "$VAL" = "no" ]; then
1499 if [ "$VAL" = "no" ]; then
1506 if [ "$VAL" = "no" ]; then
1516 if [ "$VAL" = "no" ]; then
1523 if [ "$VAL" = "no" ]; then
1530 if [ "$VAL" = "no" ]; then
1531 CFG_MIPS_DSPR2="$VAL"
1537 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1538 CFG_REDUCE_RELOCATIONS="$VAL"
1544 [ "$VAL" = "qt" ] && VAL=yes
1545 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1550 # No longer supported:
1551 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1554 if [ "$VAL" = "system" ]; then
1561 [ "$VAL" = "yes" ] && VAL=qt
1562 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1569 [ "$VAL" = "yes" ] && VAL=qt
1570 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1577 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1584 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1591 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1598 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1605 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1612 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1613 CFG_FONTCONFIG="$VAL"
1619 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1626 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1633 CFG_OBSOLETE_WAYLAND=yes
1636 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1643 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1650 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1657 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1664 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1678 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1685 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1686 CFG_GSTREAMER="$VAL"
1692 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1693 CFG_QGTKSTYLE="$VAL"
1699 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1702 if [ "$VAL" = "no" ]; then
1710 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1712 elif [ "$VAL" = "no" ]; then
1719 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1720 QPA_PLATFORM_GUARD="$VAL"
1726 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1728 elif [ "$VAL" = "runtime" ]; then
1735 if [ "$VAL" = "yes" ]; then
1742 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1749 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1750 CFG_LARGEFILE="$VAL"
1756 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1763 if [ "$VAL" = "yes" ]; then
1764 CFG_OPENSSL="linked"
1770 if [ "$VAL" = "yes" ]; then
1773 if [ "$VAL" = "no" ]; then
1781 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1782 CFG_JAVASCRIPTCORE_JIT="$VAL"
1788 if [ "$VAL" = "yes" ]; then
1789 OPT_CONFIRM_LICENSE="$VAL"
1795 if [ "$VAL" = "yes" ]; then
1801 sql-*|imageformat-*)
1802 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1803 # if autoconf style options were used, $VAL can be "yes" or "no"
1804 [ "$VAL" = "yes" ] && VAL=qt
1805 # now $VAL should be "no", "qt", or "plugin"... double-check
1806 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1809 # now $VAL is "no", "qt", or "plugin"
1811 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1812 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1814 # Grab the available values
1817 avail="$CFG_SQL_AVAILABLE"
1820 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1821 if [ "$OPT" != "plugin" ]; then
1822 # png is always built in
1828 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1832 # Check that that user's value is available.
1835 if [ "$VAL" = "$d" ]; then
1840 [ "$found" = yes ] || ERROR=yes
1842 if [ "$VAR" = "sql" ]; then
1843 # set the CFG_SQL_driver
1844 eval "CFG_SQL_$VAL=\$OPT"
1846 elif [ "$VAR" = "imageformat" ]; then
1847 [ "$OPT" = "qt" ] && OPT=yes
1848 VAL="`echo $VAL |tr a-z A-Z`"
1849 eval "CFG_$VAL=$OPT"
1853 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1854 if [ "$OPT" = "plugin" ]; then
1857 QMakeVar add "${VAR}s" "${VAL}"
1858 elif [ "$OPT" = "no" ]; then
1859 PLUG_VAR="${VAR}-plugin"
1861 QMakeVar del "${IN_VAR}s" "$VAL"
1862 QMakeVar del "${PLUG_VAR}s" "$VAL"
1864 if [ "$ERROR" = "yes" ]; then
1865 echo "$CURRENT_OPT: unknown argument"
1870 if [ "$VAL" = "yes" ]; then
1871 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1872 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1876 elif [ "$VAL" = "no" ]; then
1877 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1878 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1887 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1894 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1901 D_FLAGS="$D_FLAGS \"$VAL\""
1904 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1907 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1910 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1913 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1916 if [ "$BUILD_ON_MAC" = "yes" ]; then
1917 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1918 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1924 if [ "$BUILD_ON_MAC" = "yes" ]; then
1925 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1931 W_FLAGS="$W_FLAGS \"${VAL}\""
1937 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1938 CFG_PHONON_BACKEND="$VAL"
1950 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1951 CFG_AUDIO_BACKEND="$VAL"
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1965 CFG_FORCE_ASSERTS="$VAL"
1971 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1981 if [ "$UNKNOWN_OPT" = "yes" ]; then
1982 echo "${CURRENT_OPT}: invalid command-line switch"
1988 # update QT_CONFIG to show our current predefined configuration
1989 case "$CFG_QCONFIG" in
1990 minimal|small|medium|large|full)
1991 # these are a sequence of increasing functionality
1992 for c in minimal small medium large full; do
1993 QT_CONFIG="$QT_CONFIG $c-config"
1994 [ "$CFG_QCONFIG" = $c ] && break
1998 # not known to be sufficient for anything
1999 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2000 echo >&2 "Error: configuration file not found:"
2001 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2003 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2008 #-------------------------------------------------------------------------------
2009 # build tree initialization
2010 #-------------------------------------------------------------------------------
2012 # where to find which..
2013 unixtests="$relpath/config.tests/unix"
2014 mactests="$relpath/config.tests/mac"
2015 WHICH="$unixtests/which.test"
2017 PERL=`$WHICH perl 2>/dev/null`
2019 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2021 for e in gawk nawk awk; do
2022 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2029 PERL="/usr/bin/perl"
2030 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2034 ### skip this if the user just needs help...
2035 if [ "$OPT_HELP" != "yes" ]; then
2037 # is this a shadow build?
2038 if [ "$OPT_SHADOW" = "maybe" ]; then
2040 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2041 if [ -h "$outpath" ]; then
2042 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2048 if [ "$OPT_SHADOW" = "yes" ]; then
2049 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2050 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2051 echo >&2 "Cannot proceed."
2054 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2057 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2059 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2060 echo "Qt can be built in release mode with separate debug information, so"
2061 echo "-debug-and-release is not necessary anymore"
2065 if [ "$CFG_SILENT" = "yes" ]; then
2066 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2069 # if the source tree is different from the build tree,
2070 # symlink or copy part of the sources
2071 if [ "$OPT_SHADOW" = "yes" ]; then
2072 echo "Preparing build tree..."
2074 if [ -z "$PERL" ]; then
2076 echo "You need perl in your PATH to make a shadow build."
2077 echo "Cannot proceed."
2081 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2083 # make a syncqt script that can be used in the shadow
2084 rm -f "$outpath/bin/syncqt"
2085 if [ -x "$relpath/bin/syncqt" ]; then
2086 mkdir -p "$outpath/bin"
2087 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2088 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2089 chmod 755 "$outpath/bin/syncqt"
2092 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2093 rm -f "$outpath/bin/$i"
2094 if [ -x "$relpath/bin/$i" ]; then
2095 mkdir -p "$outpath/bin"
2096 echo "#!/bin/sh" >"$outpath/bin/$i"
2097 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2098 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2099 chmod 755 "$outpath/bin/$i"
2103 # save a pre-existing mkspecs/modules dir
2104 test -d "$outpath/mkspecs/modules" && \
2105 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2107 # symlink the mkspecs directory
2108 mkdir -p "$outpath/mkspecs"
2109 rm -rf "$outpath"/mkspecs/*
2110 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2111 rm -f "$outpath/mkspecs/default"
2115 rm -rf "$outpath/mkspecs/$1"
2116 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2117 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2120 # Special case for mkspecs/features directory.
2121 # To be able to place .prf files into a shadow build directory,
2122 # we're creating links for files only. The directory structure is reproduced.
2123 ShadowMkspecs features
2125 # The modules dir is special, too.
2126 if test -d "$outpath/mkspecs-modules"; then
2127 rm -rf "$outpath/mkspecs/modules"
2128 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2130 ShadowMkspecs modules
2133 # symlink the doc directory
2134 rm -rf "$outpath/doc"
2135 ln -s "$relpath/doc" "$outpath/doc"
2138 # symlink fonts to be able to run application from build directory
2139 if [ ! -d "${outpath}/lib/fonts" ]; then
2140 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2141 mkdir -p "${outpath}/lib"
2142 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2146 if [ "$OPT_FAST" = "auto" ]; then
2147 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2154 # find a make command
2155 if [ -z "$MAKE" ]; then
2157 for mk in gmake make; do
2158 if "$WHICH" $mk >/dev/null 2>&1; then
2163 if [ -z "$MAKE" ]; then
2164 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2165 echo >&2 "Cannot proceed."
2168 # export MAKE, we need it later in the config.tests
2174 #-------------------------------------------------------------------------------
2175 # auto-detect all that hasn't been specified in the arguments
2176 #-------------------------------------------------------------------------------
2178 if [ -z "$PLATFORM" ]; then
2180 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2182 OSX_VERSION=`uname -r | cut -d. -f1`
2183 # Select compiler. Use g++ unless we find a usable Clang version
2185 if [ "$OSX_VERSION" -ge 12 ]; then
2186 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2188 elif [ "$OSX_VERSION" -eq 11 ]; then
2189 # We're on Lion. Check if we have a supported Clang version
2190 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2193 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2200 #PLATFORM=aix-g++-64
2202 #PLATFORM=aix-xlc-64
2204 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2214 # PLATFORM=dynix-g++
2220 PLATFORM=freebsd-g++
2222 - Also available for FreeBSD: freebsd-icc
2226 PLATFORM=openbsd-g++
2237 #PLATFORM=irix-cc-64
2239 - Also available for IRIX: irix-g++ irix-cc-64
2243 case "$UNAME_MACHINE" in
2245 #PLATFORM=hpuxi-acc-32
2246 PLATFORM=hpuxi-acc-64
2248 - Also available for HP-UXi: hpuxi-acc-32
2254 #PLATFORM=hpux-acc-64
2256 #PLATFORM=hpux-acc-o64
2258 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2267 - Also available for Tru64: tru64-g++
2271 case "$UNAME_MACHINE" in
2273 PLATFORM=linux-g++-64
2280 - Also available for Linux: linux-kcc linux-icc linux-cxx
2284 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2285 PLATFORM="solaris-g++"
2287 #PLATFORM=solaris-g++
2289 #PLATFORM=solaris-cc64
2292 - Also available for Solaris: solaris-g++ solaris-cc-64
2295 ReliantUNIX-*:*|SINIX-*:*)
2296 PLATFORM=reliant-cds
2297 #PLATFORM=reliant-cds-64
2299 - Also available for Reliant UNIX: reliant-cds-64
2309 #PLATFORM=unixware-g++
2310 PLATFORM=unixware-cc
2312 - Also available for OpenUNIX: unixware-g++
2316 #PLATFORM=unixware-g++
2317 PLATFORM=unixware-cc
2319 - Also available for UnixWare: unixware-g++
2326 - Also available for SCO OpenServer: sco-g++
2330 PLATFORM=unixware-g++
2333 PLATFORM=unsupported/qnx-g++
2336 if [ "$OPT_HELP" != "yes" ]; then
2338 for p in $PLATFORMS; do
2339 echo " $relconf $* -platform $p"
2342 echo " The build script does not currently recognize all" >&2
2343 echo " platforms supported by Qt." >&2
2344 echo " Rerun this script with a -platform option listed to" >&2
2345 echo " set the system/compiler combination you use." >&2
2352 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2354 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2356 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2357 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2358 case "$XPLATFORM" in qnx-*) XPLATFORM_QNX=yes;; esac
2360 if [ -d "$PLATFORM" ]; then
2361 QMAKESPEC="$PLATFORM"
2363 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2365 if [ -d "$XPLATFORM" ]; then
2366 XQMAKESPEC="$XPLATFORM"
2368 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2370 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2371 QT_CROSS_COMPILE=yes
2372 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2373 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2376 if [ "$BUILD_ON_MAC" = "yes" ]; then
2377 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2379 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2380 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2381 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2382 echo " built with 'macx-g++'" >&2
2388 # check specified platforms are supported
2389 if [ '!' -d "$QMAKESPEC" ]; then
2391 echo " The specified system/compiler is not supported:"
2395 echo " Please see the README file for a complete list."
2399 if [ '!' -d "$XQMAKESPEC" ]; then
2401 echo " The specified system/compiler is not supported:"
2405 echo " Please see the README file for a complete list."
2409 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2411 echo " The specified system/compiler port is not complete:"
2413 echo " $XQMAKESPEC/qplatformdefs.h"
2415 echo " Please contact qt-info@nokia.com."
2420 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2421 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2422 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2423 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2424 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2428 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2429 case `basename "$XPLATFORM"` in
2432 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2434 echo "Please contact qt-info@nokia.com to upgrade your license to"
2435 echo "include this platform, or install the Qt Open Source Edition"
2436 echo "if you intend to develop free software."
2442 #-------------------------------------------------------------------------------
2443 # tests that don't need qmake (must be run before displaying help)
2444 #-------------------------------------------------------------------------------
2446 # detect build style
2447 if [ "$CFG_DEBUG" = "auto" ]; then
2448 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2449 CFG_DEBUG_RELEASE=yes
2451 elif [ "$CFG_DEV" = "yes" ]; then
2452 CFG_DEBUG_RELEASE=no
2455 CFG_DEBUG_RELEASE=no
2459 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2460 QT_CONFIG="$QT_CONFIG build_all"
2463 # pass on $CFG_SDK to the configure tests.
2464 if [ '!' -z "$CFG_SDK" ]; then
2465 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2468 # find the default framework value
2469 if [ "$BUILD_ON_MAC" = "yes" ]; then
2470 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2471 CFG_FRAMEWORK="$CFG_SHARED"
2472 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2474 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2482 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2484 TEST_COMPILER=$QMAKE_CONF_COMPILER
2485 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2486 if [ -z "$TEST_COMPILER" ]; then
2487 echo "ERROR: Cannot set the compiler for the configuration tests"
2492 if [ -n "$CFG_SYSROOT" ]; then
2493 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2497 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2499 # auto-detect precompiled header support
2500 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2501 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2508 # auto-detect support for separate debug info in objcopy
2509 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2510 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2511 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2512 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2513 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2514 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2515 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2516 CFG_SEPARATE_DEBUG_INFO=no
2520 # binutils on HP-UX is buggy; default to no.
2521 CFG_SEPARATE_DEBUG_INFO=no
2524 CFG_SEPARATE_DEBUG_INFO=yes
2530 # auto-detect -fvisibility support
2531 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2532 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2533 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2534 echo "-reduce-exports was requested but this compiler does not support it"
2535 echo "Re-run configure with -v for more information"
2538 CFG_REDUCE_EXPORTS=no
2540 CFG_REDUCE_EXPORTS=yes
2544 # detect the availability of the -Bsymbolic-functions linker optimization
2545 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2546 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2547 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2548 echo "-reduce-relocations was requested but this compiler does not support it"
2549 echo "Re-run configure with -v for more information"
2552 CFG_REDUCE_RELOCATIONS=no
2554 CFG_REDUCE_RELOCATIONS=yes
2558 # auto-detect GNU make support
2559 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2563 # find the default framework value
2564 if [ "$BUILD_ON_MAC" = "yes" ]; then
2565 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2566 CFG_FRAMEWORK="$CFG_SHARED"
2567 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2569 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2577 #setup the build parts
2578 if [ -z "$CFG_BUILD_PARTS" ]; then
2579 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2581 # build tests by default, if a developer build
2582 if [ "$CFG_DEV" = "yes" ]; then
2583 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2586 # don't build tools by default when cross-compiling
2587 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2588 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2591 for nobuild in $CFG_NOBUILD_PARTS; do
2592 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2594 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2596 # echo "WARNING: libs is a required part of the build."
2598 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2601 #-------------------------------------------------------------------------------
2602 # post process QT_INSTALL_* variables
2603 #-------------------------------------------------------------------------------
2605 if [ -z "$QT_INSTALL_PREFIX" ]; then
2606 if [ "$CFG_DEV" = "yes" ]; then
2607 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2609 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2612 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2614 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2615 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2616 if [ "$BUILD_ON_MAC" = "yes" ]; then
2617 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2620 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2623 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2625 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2626 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2627 if [ "$BUILD_ON_MAC" = "yes" ]; then
2628 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2633 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2636 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2638 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2639 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2640 if [ "$BUILD_ON_MAC" = "yes" ]; then
2641 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2642 QT_INSTALL_LIBS="/Libraries/Frameworks"
2646 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2648 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2650 if [ -z "$QT_INSTALL_BINS" ]; then #default
2651 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2652 if [ "$BUILD_ON_MAC" = "yes" ]; then
2653 QT_INSTALL_BINS="/Developer/Applications/Qt"
2656 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2658 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2660 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2661 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2662 if [ "$BUILD_ON_MAC" = "yes" ]; then
2663 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2666 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2668 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2670 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2671 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2672 if [ "$BUILD_ON_MAC" = "yes" ]; then
2673 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2676 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2678 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2680 if [ -z "$QT_INSTALL_DATA" ]; then #default
2681 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2683 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2685 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2686 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2688 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2690 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2691 if [ "$BUILD_ON_MAC" = "yes" ]; then
2692 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2694 QT_INSTALL_SETTINGS=/etc/xdg
2697 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2699 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2700 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2701 if [ "$BUILD_ON_MAC" = "yes" ]; then
2702 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2705 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2707 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2710 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2711 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2712 if [ "$BUILD_ON_MAC" = "yes" ]; then
2713 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2716 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2718 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2720 #------- host paths --------
2722 if [ -z "$QT_HOST_PREFIX" ]; then
2723 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2726 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2730 if [ -z "$QT_HOST_BINS" ]; then #default
2732 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2733 if [ "$BUILD_ON_MAC" = "yes" ]; then
2734 QT_HOST_BINS="/Developer/Applications/Qt"
2737 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2739 QT_HOST_BINS="$QT_INSTALL_BINS"
2742 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2744 if [ -z "$QT_HOST_DATA" ]; then #default
2746 QT_HOST_DATA="$QT_HOST_PREFIX"
2748 QT_HOST_DATA="$QT_INSTALL_DATA"
2751 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2754 #-------------------------------------------------------------------------------
2755 # help - interactive parts of the script _after_ this section please
2756 #-------------------------------------------------------------------------------
2758 # next, emit a usage message if something failed.
2759 if [ "$OPT_HELP" = "yes" ]; then
2760 [ "x$ERROR" = "xyes" ] && echo
2761 if [ "$CFG_NIS" = "no" ]; then
2768 if [ "$CFG_CUPS" = "no" ]; then
2775 if [ "$CFG_ICONV" = "no" ]; then
2782 if [ "$CFG_LARGEFILE" = "no" ]; then
2789 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2797 if [ "$CFG_XCB" = "no" ]; then
2805 if [ "$CFG_EGLFS" = "no" ]; then
2813 if [ "$CFG_DIRECTFB" = "no" ]; then
2820 if [ "$CFG_XINPUT2" = "no" ]; then
2828 if [ "$CFG_DBUS" = "no" ]; then
2836 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2844 if [ "$CFG_GLIB" = "no" ]; then
2853 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2854 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2855 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2856 [-release] [-debug] [-debug-and-release]
2857 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2858 [-largefile] [-no-accessibility] [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2859 [-plugin-sql-<driver>] [-system-sqlite]
2860 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2861 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2862 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2863 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2864 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2865 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2866 [-no-separate-debug-info] [-no-sse2]
2867 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2868 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2869 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2870 [-no-audio-backend] [-audio-backend]
2871 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2872 [-no-optimized-qmake] [-optimized-qmake]
2873 [-no-openssl] [-openssl] [-openssl-linked]
2874 [-no-gtkstyle] [-gtkstyle]
2875 [-qt-pcre] [-system-pcre]
2876 [-device <name>] [-device-option <key=value>]
2877 [additional platform specific options (see below)]
2880 Installation options:
2882 These are optional, but you may specify install directories.
2884 -prefix <dir> ...... This will install everything relative to <dir>
2885 (default $QT_INSTALL_PREFIX)
2887 -hostprefix [dir] .. Tools and libraries needed when developing
2888 applications are installed in [dir]. If [dir] is
2889 not given, the current build directory will be used.
2892 * -prefix-install .... Force a sandboxed "local" installation of
2893 Qt. This will install into
2894 $QT_INSTALL_PREFIX, if this option is
2895 disabled then some platforms will attempt a
2896 "system" install by placing default values to
2897 be placed in a system location other than
2900 You may use these to separate different parts of the install:
2902 -bindir <dir> ......... Executables will be installed to <dir>
2903 (default PREFIX/bin)
2904 -libdir <dir> ......... Libraries will be installed to <dir>
2905 (default PREFIX/lib)
2906 -docdir <dir> ......... Documentation will be installed to <dir>
2907 (default PREFIX/doc)
2908 -headerdir <dir> ...... Headers will be installed to <dir>
2909 (default PREFIX/include)
2910 -plugindir <dir> ...... Plugins will be installed to <dir>
2911 (default PREFIX/plugins)
2912 -importdir <dir> ...... Imports for QML will be installed to <dir>
2913 (default PREFIX/imports)
2914 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2916 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2917 (default PREFIX/translations)
2918 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2919 (default PREFIX/etc/settings)
2920 -examplesdir <dir> .... Examples will be installed to <dir>
2921 (default PREFIX/examples)
2922 -testsdir <dir> ....... Tests will be installed to <dir>
2923 (default PREFIX/tests)
2925 -hostbindir <dir> .. Host executables will be installed to <dir>
2926 (default HOSTPREFIX/bin)
2927 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2928 (default HOSTPREFIX)
2932 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2933 that needs to be evaluated. If the evaluation succeeds, the feature is
2934 included. Here is a short explanation of each option:
2936 * -release ........... Compile and link Qt with debugging turned off.
2937 -debug ............. Compile and link Qt with debugging turned on.
2938 -debug-and-release . Compile and link two versions of Qt, with and without
2939 debugging turned on (Mac only).
2941 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2943 -opensource ........ Compile and link the Open-Source Edition of Qt.
2944 -commercial ........ Compile and link the Commercial Edition of Qt.
2947 * -shared ............ Create and use shared Qt libraries.
2948 -static ............ Create and use static Qt libraries.
2950 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2952 -fast .............. Configure Qt quickly by generating Makefiles only for
2953 library and subdirectory targets. All other Makefiles
2954 are created as wrappers, which will in turn run qmake.
2956 -no-largefile ...... Disables large file support.
2957 + -largefile ......... Enables Qt to access files larger than 4 GB.
2959 -no-accessibility .. Do not compile Accessibility support.
2960 * -accessibility ..... Compile Accessibility support.
2962 -no-sql-<driver> ... Disable SQL <driver> entirely.
2963 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2965 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2968 Possible values for <driver>:
2969 [ $CFG_SQL_AVAILABLE ]
2971 -system-sqlite ..... Use sqlite from the operating system.
2973 -no-phonon-backend.. Do not build the platform phonon plugin.
2974 + -phonon-backend..... Build the platform phonon plugin.
2976 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
2977 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
2979 -no-qml-debug ...... Do not build the in-process QML debugging support.
2980 + -qml-debug ......... Build the QML debugging support.
2982 -platform target ... The operating system and compiler you are building
2985 See the README file for a list of supported
2986 operating systems and compilers.
2988 -no-sse2 ........... Do not compile with use of SSE2 instructions.
2989 -no-sse3 ........... Do not compile with use of SSE3 instructions.
2990 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
2991 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
2992 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
2993 -no-avx ............ Do not compile with use of AVX instructions.
2994 -no-avx2 ........... Do not compile with use of AVX2 instructions.
2995 -no-neon ........... Do not compile with use of NEON instructions.
2996 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
2997 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
2999 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3000 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3002 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3004 -D <string> ........ Add an explicit define to the preprocessor.
3005 -I <string> ........ Add an explicit include path.
3006 -L <string> ........ Add an explicit library path.
3008 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
3009 configure determines whether to use pkg-config or not with
3010 some heuristics such as checking the environment variables.
3011 -no-pkg-config ..... Disable use of pkg-config.
3012 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
3013 detection heuristic).
3015 -help, -h .......... Display this information.
3017 Third Party Libraries:
3019 -qt-zlib ........... Use the zlib bundled with Qt.
3020 + -system-zlib ....... Use zlib from the operating system.
3021 See http://www.gzip.org/zlib
3023 -no-gif ............ Do not compile GIF reading support.
3025 -no-libpng ......... Do not compile PNG support.
3026 -qt-libpng ......... Use the libpng bundled with Qt.
3027 + -system-libpng ..... Use libpng from the operating system.
3028 See http://www.libpng.org/pub/png
3030 -no-libjpeg ........ Do not compile JPEG support.
3031 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3032 + -system-libjpeg .... Use libjpeg from the operating system.
3033 See http://www.ijg.org
3035 -no-openssl ........ Do not compile support for OpenSSL.
3036 + -openssl ........... Enable run-time OpenSSL support.
3037 -openssl-linked .... Enabled linked OpenSSL support.
3039 -qt-pcre ........... Use the PCRE library bundled with Qt.
3040 + -system-pcre ....... Use the PCRE library from the operating system.
3044 -make <part> ....... Add part to the list of parts to be built at make time.
3045 ($QT_DEFAULT_BUILD_PARTS)
3046 -nomake <part> ..... Exclude part from the list of parts to be built.
3048 -R <string> ........ Add an explicit runtime library path to the Qt
3050 -l <string> ........ Add an explicit library.
3052 -no-rpath .......... Do not use the library install path as a runtime
3054 + -rpath ............. Link Qt libraries and executables using the library
3055 install path as a runtime library path. Equivalent
3056 to -R install_libpath
3058 -continue .......... Continue as far as possible if an error occurs.
3060 -verbose, -v ....... Print verbose information about each step of the
3063 -silent ............ Reduce the build output so that warnings and errors
3064 can be seen more easily.
3066 * -no-optimized-qmake ... Do not build qmake optimized.
3067 -optimized-qmake ...... Build qmake optimized.
3069 -no-gui ............ Don't build the Qt GUI library
3071 $NSN -no-nis ............ Do not compile NIS support.
3072 $NSY -nis ............... Compile NIS support.
3074 $CUN -no-cups ........... Do not compile CUPS support.
3075 $CUY -cups .............. Compile CUPS support.
3076 Requires cups/cups.h and libcups.so.2.
3078 $CIN -no-iconv .......... Do not compile support for iconv(3).
3079 $CIY -iconv ............. Compile support for iconv(3).
3081 $PHN -no-pch ............ Do not use precompiled header support.
3082 $PHY -pch ............... Use precompiled header support.
3084 $DBN -no-dbus ........... Do not compile the QtDBus module.
3085 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3086 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3088 -reduce-relocations ..... Reduce relocations in the libraries through extra
3089 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3090 experimental; needs GNU ld >= 2.18).
3092 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3094 -device <name> ............... Cross-compile for device <name> (experimental)
3095 -device-option <key=value> ... Add device specific options for the device mkspec
3098 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3099 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3101 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3102 $XCBY -xcb ............... Compile Xcb support.
3104 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3105 $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
3107 $DFBN -no-directfb ....... Do not compile DirectFB support.
3108 $DFBY -directfb .......... Compile DirectFB support.
3110 -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
3112 -xplatform target ... The target platform when cross-compiling.
3114 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3116 -no-feature-<feature> Do not compile in <feature>.
3117 -feature-<feature> .. Compile in <feature>. The available features
3118 are described in src/corelib/global/qfeatures.txt
3120 -no-freetype ........ Do not compile in Freetype2 support.
3121 -qt-freetype ........ Use the libfreetype bundled with Qt.
3122 * -system-freetype .... Use libfreetype from the operating system.
3123 See http://www.freetype.org/
3125 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3126 default ($CFG_QCONFIG).
3128 -no-opengl .......... Do not support OpenGL.
3129 -opengl <api> ....... Enable OpenGL support
3130 With no parameter, this will attempt to auto-detect
3131 OpenGL ES 2, or regular desktop OpenGL.
3132 Use es2 for <api> to override auto-detection.
3134 $GBN -no-glib ........... Do not compile Glib support.
3135 $GBY -glib .............. Compile Glib support.
3138 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3141 $X2N -no-xinput2......... Do not compile XInput2 support.
3142 $X2Y -xinput2............ Compile XInput2 support.
3148 if [ "$BUILD_ON_MAC" = "yes" ]; then
3153 -Fstring ........... Add an explicit framework path.
3154 -fw string ......... Add an explicit framework.
3156 * -framework ......... Build Qt as a series of frameworks and
3157 link tools against those frameworks.
3158 -no-framework ...... Do not build Qt as a series of frameworks.
3160 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3161 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3163 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3164 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3165 QT_ENABLE_HARFBUZZ environment variable.
3170 [ "x$ERROR" = "xyes" ] && exit 1
3175 # -----------------------------------------------------------------------------
3176 # LICENSING, INTERACTIVE PART
3177 # -----------------------------------------------------------------------------
3180 echo "This is the Qt ${EditionString} Edition."
3183 if [ "$Edition" = "OpenSource" ]; then
3185 echo "You are licensed to use this software under the terms of"
3186 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3187 if [ -f "$relpath/LICENSE.GPL3" ]; then
3188 echo "You are also licensed to use this software under the terms of"
3189 echo "the GNU General Public License (GPL) versions 3."
3195 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3196 echo "You have already accepted the terms of the $LicenseType license."
3199 if [ -f "$relpath/LICENSE.GPL3" ]; then
3200 echo "Type '3' to view the GNU General Public License version 3."
3202 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3203 echo "Type 'yes' to accept this license offer."
3204 echo "Type 'no' to decline this license offer."
3206 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3210 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3212 elif [ "$acceptance" = "no" ]; then
3213 echo "You are not licensed to use this software."
3216 elif [ "$acceptance" = "3" ]; then
3217 more "$relpath/LICENSE.GPL3"
3218 elif [ "$acceptance" = "L" ]; then
3219 more "$relpath/LICENSE.LGPL"
3222 elif [ "$Edition" = "Preview" ]; then
3223 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3226 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3227 echo "You have already accepted the terms of the $LicenseType license."
3230 echo "You are licensed to use this software under the terms of"
3231 echo "the $TheLicense"
3233 echo "Type '?' to read the Preview License."
3234 echo "Type 'yes' to accept this license offer."
3235 echo "Type 'no' to decline this license offer."
3237 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3241 if [ "$acceptance" = "yes" ]; then
3243 elif [ "$acceptance" = "no" ] ;then
3244 echo "You are not licensed to use this software."
3247 elif [ "$acceptance" = "?" ]; then
3248 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3251 elif [ "$Edition" != "OpenSource" ]; then
3252 if [ -n "$ExpiryDate" ]; then
3253 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3254 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3255 Today=`date +%Y%m%d`
3256 if [ "$Today" -gt "$ExpiryDate" ]; then
3257 case "$LicenseType" in
3258 Commercial|Academic|Educational)
3259 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3261 echo "NOTICE NOTICE NOTICE NOTICE"
3263 echo " Your support and upgrade period has expired."
3265 echo " You are no longer licensed to use this version of Qt."
3266 echo " Please contact qt-info@nokia.com to renew your support"
3267 echo " and upgrades for this license."
3269 echo "NOTICE NOTICE NOTICE NOTICE"
3274 echo "WARNING WARNING WARNING WARNING"
3276 echo " Your support and upgrade period has expired."
3278 echo " You may continue to use your last licensed release"
3279 echo " of Qt under the terms of your existing license"
3280 echo " agreement. But you are not entitled to technical"
3281 echo " support, nor are you entitled to use any more recent"
3282 echo " Qt releases."
3284 echo " Please contact qt-info@nokia.com to renew your"
3285 echo " support and upgrades for this license."
3287 echo "WARNING WARNING WARNING WARNING"
3294 echo "NOTICE NOTICE NOTICE NOTICE"
3296 echo " Your Evaluation license has expired."
3298 echo " You are no longer licensed to use this software. Please"
3299 echo " contact qt-info@nokia.com to purchase license, or install"
3300 echo " the Qt Open Source Edition if you intend to develop free"
3303 echo "NOTICE NOTICE NOTICE NOTICE"
3310 TheLicense=`head -n 1 "$outpath/LICENSE"`
3312 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3313 echo "You have already accepted the terms of the $TheLicense."
3316 echo "You are licensed to use this software under the terms of"
3317 echo "the $TheLicense."
3319 echo "Type '?' to view the $TheLicense."
3320 echo "Type 'yes' to accept this license offer."
3321 echo "Type 'no' to decline this license offer."
3323 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3327 if [ "$acceptance" = "yes" ]; then
3329 elif [ "$acceptance" = "no" ]; then
3330 echo "You are not licensed to use this software."
3333 else [ "$acceptance" = "?" ]
3334 more "$outpath/LICENSE"
3339 # this should be moved somewhere else
3342 AIX_VERSION=`uname -v`
3343 if [ "$AIX_VERSION" -lt "5" ]; then
3344 QMakeVar add QMAKE_LIBS_X11 -lbind
3351 #-------------------------------------------------------------------------------
3352 # generate qconfig.cpp
3353 #-------------------------------------------------------------------------------
3354 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3356 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3358 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3359 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3361 /* Installation date */
3362 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3364 /* Installation Info */
3365 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3366 "qt_prfxpath=$QT_INSTALL_PREFIX",
3367 "qt_docspath=$QT_INSTALL_DOCS",
3368 "qt_hdrspath=$QT_INSTALL_HEADERS",
3369 "qt_libspath=$QT_INSTALL_LIBS",
3370 "qt_binspath=$QT_INSTALL_BINS",
3371 "qt_plugpath=$QT_INSTALL_PLUGINS",
3372 "qt_impspath=$QT_INSTALL_IMPORTS",
3373 "qt_datapath=$QT_INSTALL_DATA",
3374 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3375 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3376 "qt_tstspath=$QT_INSTALL_TESTS",
3377 #ifdef QT_BUILD_QMAKE
3378 "qt_ssrtpath=$CFG_SYSROOT",
3379 "qt_hpfxpath=$QT_HOST_PREFIX",
3380 "qt_hbinpath=$QT_HOST_BINS",
3381 "qt_hdatpath=$QT_HOST_DATA",
3384 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3387 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3389 /* strlen( "qt_lcnsxxxx" ) == 12 */
3390 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3391 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3393 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3396 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3397 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3398 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3400 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3401 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3402 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3405 # -----------------------------------------------------------------------------
3406 if [ "$LicenseType" = "Evaluation" ]; then
3407 EVALKEY=qt_qevalkey=$LicenseKeyExt
3408 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3409 EVALKEY=qt_qevalkey=
3412 if [ -n "$EVALKEY" ]; then
3413 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3414 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3415 /* Evaluation license key */
3416 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3418 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3422 # -----------------------------------------------------------------------------
3424 # -----------------------------------------------------------------------------
3427 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3429 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3430 if [ "$OPT_SHADOW" = "yes" ]; then
3431 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3432 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3433 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3437 # $1: input variable name (awk regexp)
3438 # $2: optional output variable name
3439 # $3: optional value transformation (sed command)
3440 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3441 # is where the resulting variable is written to
3442 setBootstrapVariable()
3444 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3448 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3449 echo "Creating qmake. Please wait..."
3452 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3453 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3454 if [ -f "$QCONFIG_H" ]; then
3455 OLD_QCONFIG_H=$QCONFIG_H
3456 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3459 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3460 # when building qmake, we use #defines for the install paths,
3461 # however they are real functions in the library
3462 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3463 mkdir -p "$outpath/src/corelib/global"
3464 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3465 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3468 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3470 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3471 rm -rf mkspecs/default
3472 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3473 mkdir -p "$outpath/qmake" || exit
3475 for mkfile in GNUmakefile Makefile; do
3478 in_mkfile="${mkfile}.in"
3479 if [ "$mkfile" = "Makefile" ]; then
3480 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3481 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3483 in_mkfile="${mkfile}.unix"
3485 in_mkfile="$relpath/qmake/$in_mkfile"
3486 mkfile="$outpath/qmake/$mkfile"
3487 if [ -f "$mkfile" ]; then
3488 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3491 [ -f "$in_mkfile" ] || continue
3493 echo "########################################################################" > "$mkfile"
3494 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3495 echo "########################################################################" >> "$mkfile"
3498 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3499 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3500 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3502 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3503 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3506 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3507 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3508 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3509 setBootstrapVariable QMAKE_CFLAGS
3510 setBootstrapVariable QMAKE_CXXFLAGS
3511 setBootstrapVariable QMAKE_LFLAGS
3513 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3514 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3515 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3517 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3518 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3519 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3520 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3521 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3522 elif [ "$CFG_DEBUG" = "yes" ]; then
3523 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3524 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3525 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3526 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3529 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3530 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3531 for rpath in $RPATH_FLAGS; do
3532 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3535 if [ "$BUILD_ON_MAC" = "yes" ]; then
3536 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3537 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3538 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3539 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3540 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3541 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3542 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3543 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3544 if [ '!' -z "$CFG_SDK" ]; then
3545 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3546 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3547 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3548 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3549 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3552 if [ '!' -z "$D_FLAGS" ]; then
3553 for DEF in $D_FLAGS; do
3554 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3557 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3558 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3559 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3560 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3562 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3563 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3564 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3565 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3566 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3567 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3568 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3569 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3570 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3571 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3573 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3574 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3575 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3576 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3581 QMAKE_BUILD_ERROR=no
3582 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3583 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3584 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3585 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3588 #-------------------------------------------------------------------------------
3590 #-------------------------------------------------------------------------------
3591 if [ -z "$PKG_CONFIG" ]; then
3592 # See if PKG_CONFIG is set in the mkspec:
3593 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3595 if [ -z "$PKG_CONFIG" ]; then
3596 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3599 if [ "$CFG_PKGCONFIG" = "no" ]; then
3601 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3603 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3604 echo >&2 "a correctly setup pkg-config environment!"
3606 elif [ -n "$PKG_CONFIG" ]; then
3607 # found a pkg-config
3608 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3609 # when xcompiling, check environment to see if it's actually usable
3610 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3611 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3612 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3613 export PKG_CONFIG_LIBDIR
3614 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3615 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3616 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3617 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3618 echo >&2 "Set this variable to the directory that contains target .pc files"
3619 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3620 echo >&2 "use -force-pkg-config to override this test."
3624 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3627 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3628 if [ -n "$CFG_SYSROOT" ]; then
3629 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3630 export PKG_CONFIG_SYSROOT_DIR
3631 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3632 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3633 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3634 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3635 echo >&2 "or use -force-pkg-config to override this test."
3639 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3643 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3644 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3648 if [ -z "$PKG_CONFIG" ]; then
3649 QT_CONFIG="$QT_CONFIG no-pkg-config"
3652 #-------------------------------------------------------------------------------
3653 # write out device config before we run the test.
3654 #-------------------------------------------------------------------------------
3655 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
3656 rm -f "$DEVICE_VARS_FILE"
3658 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
3661 #-------------------------------------------------------------------------------
3662 # tests that need qmake
3663 #-------------------------------------------------------------------------------
3665 #-------------------------------------------------------------------------------
3666 # determine the target and host architectures
3667 #-------------------------------------------------------------------------------
3669 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3670 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'`
3672 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3673 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3674 # Do the same test again, using the host compiler
3675 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'`
3676 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3678 # not cross compiling, host == target
3679 CFG_HOST_ARCH="$CFG_ARCH"
3682 if [ "$OPT_VERBOSE" = "yes" ]; then
3683 echo "System architecture: '$CFG_ARCH'"
3684 echo "Host architecture: '$CFG_HOST_ARCH'"
3687 #-------------------------------------------------------------------------------
3688 # functionality tests
3689 #-------------------------------------------------------------------------------
3691 # detect availability of float math.h functions
3692 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3693 CFG_USE_FLOATMATH=yes
3695 CFG_USE_FLOATMATH=no
3698 # detect sse2 support
3699 if [ "${CFG_SSE2}" = "auto" ]; then
3700 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3707 # detect sse3 support
3708 if [ "${CFG_SSE3}" = "auto" ]; then
3709 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3716 # detect ssse3 support
3717 if [ "${CFG_SSSE3}" = "auto" ]; then
3718 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3725 # detect sse4.1 support
3726 if [ "${CFG_SSE4_1}" = "auto" ]; then
3727 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
3734 # detect sse4.2 support
3735 if [ "${CFG_SSE4_2}" = "auto" ]; then
3736 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
3743 # detect avx support
3744 if [ "${CFG_AVX}" = "auto" ]; then
3745 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
3746 case "$XQMAKESPEC" in
3748 # Some clang versions produce internal compiler errors compiling Qt AVX code
3749 case `$TEST_COMPILER --version` in
3750 Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
3752 if [ "$OPT_VERBOSE" = "yes" ]; then
3753 echo 'AVX support disabled for blacklisted clang compiler'
3770 # detect avx2 support
3771 if [ "${CFG_AVX}" = "no" ]; then
3774 if [ "${CFG_AVX2}" = "auto" ]; then
3775 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
3782 # check iWMMXt support
3783 if [ "$CFG_IWMMXT" = "yes" ]; then
3784 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
3785 if [ $? != "0" ]; then
3786 echo "The iWMMXt functionality test failed!"
3787 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3792 # detect neon support
3793 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3794 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
3799 elif [ "$CFG_ARCH" != "arm" ]; then
3803 # detect mips_dsp support
3804 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3810 # detect mips_dspr2 support
3811 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3817 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3820 if [ "$CFG_ZLIB" = "no" ]; then
3821 # Note: Qt no longer support builds without zlib
3822 # So we force a "no" to be "auto" here.
3823 # If you REALLY really need no zlib support, you can still disable
3824 # it by doing the following:
3825 # add "no-zlib" to mkspecs/qconfig.pri
3826 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3828 # There's no guarantee that Qt will build under those conditions
3833 if [ "$CFG_ZLIB" = "auto" ]; then
3834 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
3841 if [ "$CFG_LARGEFILE" = "auto" ]; then
3842 #Large files should be enabled for all Linux systems
3846 if [ "$CFG_GUI" = "no" ]; then
3847 QPA_PLATFORM_GUARD=no
3850 # detect how jpeg should be built
3851 if [ "$CFG_JPEG" = "auto" ]; then
3852 if [ "$CFG_SHARED" = "yes" ]; then
3859 if [ "$CFG_LIBJPEG" = "auto" ]; then
3860 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
3867 # detect how gif should be built
3868 if [ "$CFG_GIF" = "auto" ]; then
3869 if [ "$CFG_SHARED" = "yes" ]; then
3877 if [ "$CFG_LIBPNG" = "auto" ]; then
3878 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
3885 # detect accessibility
3886 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3887 CFG_ACCESSIBILITY=yes
3890 if [ "$CFG_EGLFS" = "yes" ]; then
3891 if [ "$CFG_EGL" = "no" ]; then
3892 echo "The EGLFS plugin requires EGL support and cannot be built"
3895 if [ "$CFG_OPENGL" != "es2" ]; then
3896 echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
3903 # auto-detect SQL-modules support
3904 for _SQLDR in $CFG_SQL_AVAILABLE; do
3907 if [ "$CFG_SQL_mysql" != "no" ]; then
3908 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3909 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3910 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3911 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3912 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3913 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3914 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3916 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3917 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3918 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3919 echo " You need MySql 4 or higher."
3920 echo " If you believe this message is in error you may use the continue"
3921 echo " switch (-continue) to $0 to continue."
3926 QT_LFLAGS_MYSQL_R=""
3930 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
3931 QMakeVar add CONFIG use_libmysqlclient_r
3932 if [ "$CFG_SQL_mysql" = "auto" ]; then
3933 CFG_SQL_mysql=plugin
3935 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3936 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
3937 if [ "$CFG_SQL_mysql" = "auto" ]; then
3938 CFG_SQL_mysql=plugin
3941 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3942 echo "MySQL support cannot be enabled due to functionality tests!"
3943 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3944 echo " If you believe this message is in error you may use the continue"
3945 echo " switch (-continue) to $0 to continue."
3950 QT_LFLAGS_MYSQL_R=""
3958 if [ "$CFG_SQL_psql" != "no" ]; then
3959 # Be careful not to use native pg_config when cross building.
3960 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
3961 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
3962 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
3964 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
3965 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
3966 # But, respect PSQL_LIBS if set
3967 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
3968 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
3969 if [ "$CFG_SQL_psql" = "auto" ]; then
3973 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3974 echo "PostgreSQL support cannot be enabled due to functionality tests!"
3975 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3976 echo " If you believe this message is in error you may use the continue"
3977 echo " switch (-continue) to $0 to continue."
3988 if [ "$CFG_SQL_odbc" != "no" ]; then
3989 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
3990 if [ "$CFG_SQL_odbc" = "auto" ]; then
3994 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
3995 QT_LFLAGS_ODBC="-liodbc"
3996 if [ "$CFG_SQL_odbc" = "auto" ]; then
4000 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4001 echo "ODBC support cannot be enabled due to functionality tests!"
4002 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4003 echo " If you believe this message is in error you may use the continue"
4004 echo " switch (-continue) to $0 to continue."
4014 if [ "$CFG_SQL_oci" != "no" ]; then
4015 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
4016 if [ "$CFG_SQL_oci" = "auto" ]; then
4020 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4021 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4022 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4023 echo " If you believe this message is in error you may use the continue"
4024 echo " switch (-continue) to $0 to continue."
4033 if [ "$CFG_SQL_tds" != "no" ]; then
4034 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4035 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4036 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
4037 if [ "$CFG_SQL_tds" = "auto" ]; then
4041 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4042 echo "TDS 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_db2" != "no" ]; then
4055 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
4056 if [ "$CFG_SQL_db2" = "auto" ]; then
4060 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4061 echo "ODBC support cannot be enabled due to functionality tests!"
4062 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4063 echo " If you believe this message is in error you may use the continue"
4064 echo " switch (-continue) to $0 to continue."
4073 if [ "$CFG_SQL_ibase" != "no" ]; then
4074 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
4075 if [ "$CFG_SQL_ibase" = "auto" ]; then
4076 CFG_SQL_ibase=plugin
4079 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4080 echo "InterBase 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_sqlite2" != "no" ]; then
4093 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
4094 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4095 CFG_SQL_sqlite2=plugin
4098 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4099 echo "SQLite2 support cannot be enabled due to functionality tests!"
4100 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4101 echo " If you believe this message is in error you may use the continue"
4102 echo " switch (-continue) to $0 to continue."
4111 if [ "$CFG_SQL_sqlite" != "no" ]; then
4112 SQLITE_AUTODETECT_FAILED="no"
4113 if [ "$CFG_SQLITE" = "system" ]; then
4114 if [ -n "$PKG_CONFIG" ]; then
4115 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4116 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4118 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
4119 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4120 CFG_SQL_sqlite=plugin
4122 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4124 SQLITE_AUTODETECT_FAILED="yes"
4127 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4128 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4129 CFG_SQL_sqlite=plugin
4132 SQLITE_AUTODETECT_FAILED="yes"
4136 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4137 echo "SQLite support cannot be enabled due to functionality tests!"
4138 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4139 echo " If you believe this message is in error you may use the continue"
4140 echo " switch (-continue) to $0 to continue."
4146 if [ "$OPT_VERBOSE" = "yes" ]; then
4147 echo "unknown SQL driver: $_SQLDR"
4153 # auto-detect NIS support
4154 if [ "$CFG_NIS" != "no" ]; then
4155 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
4158 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4159 echo "NIS support cannot be enabled due to functionality tests!"
4160 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4161 echo " If you believe this message is in error you may use the continue"
4162 echo " switch (-continue) to $0 to continue."
4170 # auto-detect CUPS support
4171 if [ "$CFG_CUPS" != "no" ]; then
4172 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
4175 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4176 echo "Cups support cannot be enabled due to functionality tests!"
4177 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4178 echo " If you believe this message is in error you may use the continue"
4179 echo " switch (-continue) to $0 to continue."
4187 # auto-detect iconv(3) support
4188 if [ "$CFG_ICONV" != "no" ]; then
4189 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4191 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
4193 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
4195 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
4198 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4199 echo "Iconv support cannot be enabled due to functionality tests!"
4200 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4201 echo " If you believe this message is in error you may use the continue"
4202 echo " switch (-continue) to $0 to continue."
4210 # auto-detect libdbus-1 support
4211 if [ "$CFG_DBUS" != "no" ]; then
4212 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4213 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4214 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4216 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
4217 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4218 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4219 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4221 if [ "$CFG_DBUS" = "auto" ]; then
4223 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4224 # CFG_DBUS is "yes" or "linked" here
4226 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4227 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4228 echo " If you believe this message is in error you may use the continue"
4229 echo " switch (-continue) to $0 to continue."
4235 # auto-detect Glib support
4236 if [ "$CFG_GLIB" != "no" ]; then
4237 if [ -n "$PKG_CONFIG" ]; then
4238 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4239 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4241 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
4243 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4244 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4246 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4247 echo "Glib support cannot be enabled due to functionality tests!"
4248 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4249 echo " If you believe this message is in error you may use the continue"
4250 echo " switch (-continue) to $0 to continue."
4258 # auto-detect GTK style support
4259 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4260 if [ -n "$PKG_CONFIG" ]; then
4261 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4262 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4264 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4266 QT_CONFIG="$QT_CONFIG gtkstyle"
4267 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4268 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4270 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4271 echo "Gtk theme support cannot be enabled due to functionality tests!"
4272 echo " Turn on verbose messaging (-v) to $0 to see the fin al report."
4273 echo " If you believe this message is in error you may use the continue"
4274 echo " switch (-continue) to $0 to continue."
4280 elif [ "$CFG_GLIB" = "no" ]; then
4285 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4286 if [ -n "$PKG_CONFIG" ]; then
4287 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4288 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4290 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
4292 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4293 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4295 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4296 echo "Gstreamer support cannot be enabled due to functionality tests!"
4297 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4298 echo " If you believe this message is in error you may use the continue"
4299 echo " switch (-continue) to $0 to continue."
4305 elif [ "$CFG_GLIB" = "no" ]; then
4309 # auto-detect libicu support
4310 if [ "$CFG_ICU" != "no" ]; then
4311 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4312 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4314 if [ "$CFG_ICU" = "auto" ]; then
4316 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4319 echo "The ICU library support cannot be enabled."
4320 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4321 echo " If you believe this message is in error you may use the continue"
4322 echo " switch (-continue) to $0 to continue."
4328 # Auto-detect PulseAudio support
4329 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4330 if [ -n "$PKG_CONFIG" ]; then
4331 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4332 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4334 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
4336 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4337 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4339 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4340 echo "PulseAudio support cannot be enabled due to functionality tests!"
4341 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4342 echo " If you believe this message is in error you may use the continue"
4343 echo " switch (-continue) to $0 to continue."
4352 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4353 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4354 if [ "$CFG_GUI" = "no" ]; then
4355 if [ "$CFG_OPENGL" = "auto" ]; then
4358 if [ "$CFG_OPENGL" != "no" ]; then
4359 echo "OpenGL enabled, but GUI disabled."
4360 echo " You might need to either enable the GUI or disable OpenGL"
4364 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4365 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4367 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
4370 if [ "$CFG_OPENGL" = "yes" ]; then
4371 echo "All the OpenGL functionality tests failed!"
4372 echo " You might need to modify the include and library search paths by editing"
4373 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4374 echo " ${XQMAKESPEC}."
4381 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4382 if [ "$CFG_OPENGL" = "desktop" ]; then
4383 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4384 if [ $? != "0" ]; then
4385 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4392 elif [ "$CFG_OPENGL" = "es2" ]; then
4394 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4395 if [ $? != "0" ]; then
4396 echo "The OpenGL ES 2.0 functionality test failed!"
4397 echo " You might need to modify the include and library search paths by editing"
4398 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4399 echo " ${XQMAKESPEC}."
4402 elif [ "$CFG_OPENGL" = "desktop" ]; then
4403 # Desktop OpenGL support
4404 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4405 if [ $? != "0" ]; then
4406 echo "The OpenGL functionality test failed!"
4407 echo " You might need to modify the include and library search paths by editing"
4408 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4409 echo " ${XQMAKESPEC}."
4414 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4415 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4416 if [ $? != "0" ]; then
4417 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4424 fi # X11/MINGW OpenGL
4426 if [ "$BUILD_ON_MAC" = "yes" ]; then
4427 if [ "$CFG_PHONON" != "no" ]; then
4428 # Always enable Phonon (unless it was explicitly disabled)
4432 if [ "$CFG_COREWLAN" = "auto" ]; then
4433 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
4441 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4442 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4443 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4445 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
4448 if [ "$CFG_OPENGL" = "yes" ]; then
4449 echo "All the OpenGL functionality tests failed!"
4450 echo " You might need to modify the include and library search paths by editing"
4451 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4452 echo " ${XQMAKESPEC}."
4457 elif [ "$CFG_OPENGL" = "es2" ]; then
4459 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4460 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4461 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4462 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4463 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4464 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4465 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4466 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4469 "$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
4470 if [ $? != "0" ]; then
4471 echo "The OpenGL ES 2.0 functionality test failed!"
4472 echo " You might need to modify the include and library search paths by editing"
4473 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4474 echo " ${XQMAKESPEC}."
4477 elif [ "$CFG_OPENGL" = "desktop" ]; then
4478 # Desktop OpenGL support
4479 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4480 if [ $? != "0" ]; then
4481 echo "The OpenGL functionality test failed!"
4482 echo " You might need to modify the include and library search paths by editing"
4483 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4484 echo " ${XQMAKESPEC}."
4489 # auto-detect FontConfig support
4490 if [ "$CFG_FONTCONFIG" != "no" ]; then
4491 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4492 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4493 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4495 QT_CFLAGS_FONTCONFIG=
4496 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4498 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
4499 QT_CONFIG="$QT_CONFIG fontconfig"
4500 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4501 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4502 CFG_LIBFREETYPE=system
4507 # Save these for a check later
4508 ORIG_CFG_XCB="$CFG_XCB"
4509 ORIG_CFG_EGLFS="$CFG_EGLFS"
4510 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4512 if [ "$CFG_LIBUDEV" != "no" ]; then
4513 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4514 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4515 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4516 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4517 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4519 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
4521 QT_CONFIG="$QT_CONFIG libudev"
4522 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4523 echo "The libudev functionality test failed!"
4527 QMakeVar add DEFINES QT_NO_LIBUDEV
4531 if [ "$CFG_EVDEV" != "no" ]; then
4532 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
4534 QT_CONFIG="$QT_CONFIG evdev"
4535 elif [ "$CFG_EVDEV" = "yes" ]; then
4536 echo "The evdev functionality test failed!"
4540 QMakeVar add DEFINES QT_NO_EVDEV
4544 # Check we actually have X11 :-)
4545 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS; then
4546 QT_CONFIG="$QT_CONFIG xlib"
4549 # auto-detect Xrender support
4550 if [ "$CFG_XRENDER" != "no" ]; then
4551 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS; then
4553 QT_CONFIG="$QT_CONFIG xrender"
4555 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4556 echo "Xrender support cannot be enabled due to functionality tests!"
4557 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4558 echo " If you believe this message is in error you may use the continue"
4559 echo " switch (-continue) to $0 to continue."
4567 if [ "$CFG_XCB" != "no" ]; then
4568 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4569 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4570 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4572 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
4574 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
4575 QT_CONFIG="$QT_CONFIG xcb-render"
4578 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
4580 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4583 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
4584 QT_CONFIG="$QT_CONFIG xcb-xlib"
4587 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4588 # auto-detect XInput2/Xinput support
4589 if [ "$CFG_XINPUT2" != "no" ]; then
4590 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4594 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4595 echo "XInput2 support cannot be enabled due to functionality tests!"
4596 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4597 echo " If you believe this message is in error you may use the continue"
4598 echo " switch (-continue) to $0 to continue."
4607 if [ "$CFG_XCB" = "yes" ]; then
4608 echo "The XCB test failed!"
4609 echo " You might need to install dependency packages."
4610 echo " See src/plugins/platforms/xcb/README."
4614 QMakeVar add DEFINES QT_NO_XCB
4618 if [ "$CFG_DIRECTFB" != "no" ]; then
4619 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4620 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4621 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4622 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
4624 elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4625 echo " DirectFB support cannot be enabled due to functionality tests!"
4626 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4627 echo " If you believe this message is in error you may use the continue"
4628 echo " switch (-continue) to $0 to continue."
4638 # Detect libxkbcommon
4639 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4640 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4641 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4642 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4643 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4645 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4649 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4650 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4651 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4652 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4653 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4654 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4655 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4656 fi # detect EGL support
4657 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
4659 elif [ "$CFG_EGL" = "yes" ]; then
4660 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4661 echo " You might need to modify the include and library search paths by editing"
4662 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4667 elif [ "$CFG_OPENGL" = "desktop" ]; then
4668 if [ "$CFG_EGL" = "yes" ]; then
4669 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4670 echo "Either disable EGL support or enable OpenGL ES support."
4676 if [ "$CFG_EGLFS" != "no" ]; then
4677 if [ "$CFG_OPENGL" = "es2" ]; then
4678 CFG_EGLFS="$CFG_EGL"
4684 # Determine the default QPA platform
4685 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4687 QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
4688 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4689 if [ "$BUILD_ON_MAC" = "yes" ]; then
4690 QT_QPA_DEFAULT_PLATFORM="cocoa"
4691 elif [ "$UNAME_SYSTEM" = "QNX" ]; then
4692 QT_QPA_DEFAULT_PLATFORM="qnx"
4694 QT_QPA_DEFAULT_PLATFORM="xcb"
4699 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4700 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4701 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4702 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4704 if [ "$CFG_DIRECTFB" = "yes" ]; then
4705 QT_CONFIG="$QT_CONFIG directfb"
4706 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4707 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4710 if [ "$BUILD_ON_MAC" = "yes" ]; then
4711 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
4712 QT_CONFIG="$QT_CONFIG coreservices"
4714 QMakeVar add DEFINES QT_NO_CORESERVICES
4718 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
4719 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4720 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4721 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4722 echo "No QPA platform plugin enabled!"
4723 echo " If you really want to build without a QPA platform plugin you must pass"
4724 echo " -no-qpa-platform-guard to configure. Doing this will"
4725 echo " produce a Qt that can not run GUI applications."
4726 echo " The dependencies needed for xcb to build are listed in"
4727 echo " src/plugins/platforms/xcb/README"
4733 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4736 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4737 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4738 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
4739 CFG_LIBFREETYPE=system
4745 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS &&
4746 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4747 echo "STL functionality check failed! Cannot build Qt with this STL library."
4748 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4753 # detect POSIX clock_gettime()
4754 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4755 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
4756 CFG_CLOCK_GETTIME=yes
4758 CFG_CLOCK_GETTIME=no
4762 # detect POSIX monotonic clocks
4763 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4764 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
4765 CFG_CLOCK_MONOTONIC=yes
4767 CFG_CLOCK_MONOTONIC=no
4769 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4770 CFG_CLOCK_MONOTONIC=no
4774 if [ "$CFG_MREMAP" = "auto" ]; then
4775 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
4782 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4783 if [ "$CFG_GETADDRINFO" != "no" ]; then
4784 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
4787 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4788 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4789 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4790 echo " If you believe this message is in error you may use the continue"
4791 echo " switch (-continue) to $0 to continue."
4799 # find if the platform provides inotify
4800 if [ "$CFG_INOTIFY" != "no" ]; then
4801 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
4804 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4805 echo "inotify support cannot be enabled due to functionality tests!"
4806 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4807 echo " If you believe this message is in error you may use the continue"
4808 echo " switch (-continue) to $0 to continue."
4816 # find if the platform provides if_nametoindex (ipv6 interface name support)
4817 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4818 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
4821 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4822 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4823 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4824 echo " If you believe this message is in error you may use the continue"
4825 echo " switch (-continue) to $0 to continue."
4833 # find if the platform provides getifaddrs (network interface enumeration)
4834 if [ "$CFG_GETIFADDRS" != "no" ]; then
4835 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
4838 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4839 echo "getifaddrs support cannot be enabled due to functionality tests!"
4840 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4841 echo " If you believe this message is in error you may use the continue"
4842 echo " switch (-continue) to $0 to continue."
4851 if [ "$CFG_OPENSSL" != "no" ]; then
4852 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
4853 if [ "$CFG_OPENSSL" = "auto" ]; then
4857 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4858 echo "OpenSSL support cannot be enabled due to functionality tests!"
4859 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4860 echo " If you believe this message is in error you may use the continue"
4861 echo " switch (-continue) to $0 to continue."
4870 if [ "$CFG_PCRE" != "qt" ]; then
4871 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
4874 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4875 echo "PCRE support cannot be enabled due to functionality tests!"
4876 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4877 echo " If you believe this message is in error you may use the continue"
4878 echo " switch (-continue) to $0 to continue."
4886 # detect OpenVG support
4887 if [ "$CFG_OPENVG" != "no" ]; then
4888 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
4889 if [ "$CFG_OPENVG" = "auto" ]; then
4892 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
4893 if [ "$CFG_OPENVG" = "auto" ]; then
4896 CFG_OPENVG_ON_OPENGL=yes
4897 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
4898 if [ "$CFG_OPENVG" = "auto" ]; then
4901 CFG_OPENVG_LC_INCLUDES=yes
4902 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
4903 if [ "$CFG_OPENVG" = "auto" ]; then
4906 CFG_OPENVG_LC_INCLUDES=yes
4907 CFG_OPENVG_ON_OPENGL=yes
4909 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4910 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4911 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4912 echo " If you believe this message is in error you may use the continue"
4913 echo " switch (-continue) to $0 to continue."
4919 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
4920 CFG_OPENVG_SHIVA=yes
4924 if [ "$CFG_ALSA" = "auto" ]; then
4925 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
4932 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4933 if [ "$CFG_ARCH" = "arm" ]; then
4934 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
4935 if [ $? != "0" ]; then
4936 CFG_JAVASCRIPTCORE_JIT=no
4939 case "$XPLATFORM" in
4941 CFG_JAVASCRIPTCORE_JIT=no
4947 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
4948 QMakeVar set JAVASCRIPTCORE_JIT yes
4949 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
4950 QMakeVar set JAVASCRIPTCORE_JIT no
4953 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
4954 CFG_AUDIO_BACKEND=yes
4957 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
4958 echo "Warning: largefile support cannot be disabled for win32."
4962 #-------------------------------------------------------------------------------
4963 # ask for all that hasn't been auto-detected or specified in the arguments
4964 #-------------------------------------------------------------------------------
4967 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
4968 QT_CONFIG="$QT_CONFIG phonon-backend"
4971 # disable accessibility
4972 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
4973 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
4975 QT_CONFIG="$QT_CONFIG accessibility"
4979 if [ "$CFG_EGL" = "yes" ]; then
4980 QT_CONFIG="$QT_CONFIG egl"
4982 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
4986 if [ "$CFG_EGLFS" = "yes" ]; then
4987 QT_CONFIG="$QT_CONFIG eglfs"
4989 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
4993 if [ "$CFG_OPENVG" = "no" ]; then
4994 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
4996 QT_CONFIG="$QT_CONFIG openvg"
4997 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
4998 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5000 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5001 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5003 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5004 QT_CONFIG="$QT_CONFIG shivavg"
5005 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5010 if [ "$CFG_OPENGL" = "no" ]; then
5011 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5013 QT_CONFIG="$QT_CONFIG opengl"
5016 if [ "$CFG_OPENGL" = "es2" ]; then
5017 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5020 if [ "$CFG_OPENGL" = "es2" ]; then
5021 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5022 QT_CONFIG="$QT_CONFIG opengles2"
5025 # safe execution environment
5026 if [ "$CFG_SXE" != "no" ]; then
5027 QT_CONFIG="$QT_CONFIG sxe"
5030 # build up the variables for output
5031 if [ "$CFG_DEBUG" = "yes" ]; then
5032 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5033 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5034 elif [ "$CFG_DEBUG" = "no" ]; then
5035 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5036 QMAKE_CONFIG="$QMAKE_CONFIG release"
5038 if [ "$CFG_SHARED" = "yes" ]; then
5039 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5040 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5041 elif [ "$CFG_SHARED" = "no" ]; then
5042 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5043 QMAKE_CONFIG="$QMAKE_CONFIG static"
5046 #FIXME: qpa is implicit this should all be removed
5047 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5048 QT_CONFIG="$QT_CONFIG qpa"
5049 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5050 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5052 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5053 # Do not set this here for Windows. Let qmake do it so
5054 # debug and release precompiled headers are kept separate.
5055 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5057 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5058 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5059 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5060 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5061 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5062 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5064 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5065 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5067 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5068 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5069 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5070 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5071 QMakeVar add QMAKE_CFLAGS -g
5072 QMakeVar add QMAKE_CXXFLAGS -g
5073 QT_CONFIG="$QT_CONFIG separate_debug_info"
5075 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5076 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5078 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5079 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5080 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5081 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5082 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5083 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5084 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5085 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5086 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5087 if [ "$CFG_ARCH" = "mips" ]; then
5088 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5089 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5091 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5092 QT_CONFIG="$QT_CONFIG clock-gettime"
5094 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5095 QT_CONFIG="$QT_CONFIG clock-monotonic"
5097 if [ "$CFG_MREMAP" = "yes" ]; then
5098 QT_CONFIG="$QT_CONFIG mremap"
5100 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5101 QT_CONFIG="$QT_CONFIG getaddrinfo"
5103 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5104 QT_CONFIG="$QT_CONFIG ipv6ifname"
5106 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5107 QT_CONFIG="$QT_CONFIG getifaddrs"
5109 if [ "$CFG_INOTIFY" = "yes" ]; then
5110 QT_CONFIG="$QT_CONFIG inotify"
5112 if [ "$CFG_LIBJPEG" = "no" ]; then
5114 elif [ "$CFG_LIBJPEG" = "system" ]; then
5115 QT_CONFIG="$QT_CONFIG system-jpeg"
5117 if [ "$CFG_JPEG" = "no" ]; then
5118 QT_CONFIG="$QT_CONFIG no-jpeg"
5119 elif [ "$CFG_JPEG" = "yes" ]; then
5120 QT_CONFIG="$QT_CONFIG jpeg"
5122 if [ "$CFG_LIBPNG" = "no" ]; then
5125 if [ "$CFG_LIBPNG" = "system" ]; then
5126 QT_CONFIG="$QT_CONFIG system-png"
5128 if [ "$CFG_PNG" = "no" ]; then
5129 QT_CONFIG="$QT_CONFIG no-png"
5130 elif [ "$CFG_PNG" = "yes" ]; then
5131 QT_CONFIG="$QT_CONFIG png"
5133 if [ "$CFG_GIF" = "no" ]; then
5134 QT_CONFIG="$QT_CONFIG no-gif"
5135 elif [ "$CFG_GIF" = "yes" ]; then
5136 QT_CONFIG="$QT_CONFIG gif"
5138 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5139 QT_CONFIG="$QT_CONFIG no-freetype"
5140 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5141 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5142 QT_CONFIG="$QT_CONFIG system-freetype"
5144 QT_CONFIG="$QT_CONFIG freetype"
5146 if [ "$CFG_GUI" = "auto" ]; then
5149 if [ "$CFG_GUI" = "no" ]; then
5150 QT_CONFIG="$QT_CONFIG no-gui"
5153 if [ "$CFG_WIDGETS" = "no" ]; then
5154 QT_CONFIG="$QT_CONFIG no-widgets"
5155 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5158 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5159 #On Mac we implicitly link against libz, so we
5160 #never use the 3rdparty stuff.
5161 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5163 if [ "$CFG_ZLIB" = "yes" ]; then
5164 QT_CONFIG="$QT_CONFIG zlib"
5165 elif [ "$CFG_ZLIB" = "system" ]; then
5166 QT_CONFIG="$QT_CONFIG system-zlib"
5169 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5170 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5171 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5172 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5173 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5174 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5175 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5176 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5177 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5178 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5179 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5180 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5181 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5182 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5184 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5185 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5186 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5188 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5189 if [ "$CFG_RPATH" = "yes" ]; then
5190 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5191 # set the default rpath to the library installation directory
5192 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5194 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5195 if [ -n "$RPATH_FLAGS" ]; then
5197 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5201 elif [ "$CFG_RPATH" = "yes" ]; then
5202 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5206 if [ "$CFG_RPATH" = "yes" ]; then
5207 # set the default rpath to the library installation directory
5208 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5210 if [ -n "$RPATH_FLAGS" ]; then
5211 # add the user defined rpaths
5212 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5216 if [ '!' -z "$I_FLAGS" ]; then
5217 # add the user define include paths
5218 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5219 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5222 if [ '!' -z "$W_FLAGS" ]; then
5223 # add the user defined warning flags
5224 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5225 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5226 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5229 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5230 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5231 # Follow default behavior of configure.exe by overriding with "rtti".
5232 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5235 if [ "$CFG_ALSA" = "yes" ]; then
5236 QT_CONFIG="$QT_CONFIG alsa"
5239 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5240 QT_CONFIG="$QT_CONFIG pulseaudio"
5243 if [ "$CFG_COREWLAN" = "yes" ]; then
5244 QT_CONFIG="$QT_CONFIG corewlan"
5247 if [ "$CFG_ICU" = "yes" ]; then
5248 QT_CONFIG="$QT_CONFIG icu"
5251 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5252 QT_CONFIG="$QT_CONFIG force_asserts"
5255 if [ "$CFG_PCRE" = "qt" ]; then
5256 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5260 # Some Qt modules are too advanced in C++ for some old compilers
5261 # Detect here the platforms where they are known to work.
5263 # See Qt documentation for more information on which features are
5264 # supported and on which compilers.
5266 canBuildQtConcurrent="yes"
5267 canUseV8Snapshot="yes"
5269 case "$XPLATFORM" in
5271 # PA-RISC's assembly is too limited
5272 # gcc 3.4 on that platform can't build QtXmlPatterns
5273 # the assembly it generates cannot be compiled
5275 # Check gcc's version
5276 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5280 canBuildQtXmlPatterns="no"
5284 canBuildQtXmlPatterns="no"
5288 unsupported/vxworks-*-g++*)
5291 unsupported/vxworks-*-dcc*)
5293 canBuildQtXmlPatterns="no"
5296 # Check gcc's version
5297 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5305 canBuildQtXmlPatterns="no"
5310 # Check the compiler version
5311 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5314 canBuildQtXmlPatterns="no"
5315 canBuildQtConcurrent="no"
5319 canBuildQtConcurrent="no"
5325 canBuildQtXmlPatterns="no"
5326 canBuildQtConcurrent="no"
5332 # Get the xlC version
5333 cat > xlcver.c <<EOF
5337 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5342 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5343 xlcver=`./xlcver 2>/dev/null`
5346 if [ "$OPT_VERBOSE" = "yes" ]; then
5347 if [ -n "$xlcver" ]; then
5348 echo Found IBM xlC version: $xlcver.
5350 echo Could not determine IBM xlC version, assuming oldest supported.
5357 canBuildQtXmlPatterns="no"
5358 canBuildQtConcurrent="no"
5362 canBuildQtConcurrent="no"
5368 canBuildQtConcurrent="no"
5372 if [ "$CFG_GUI" = "no" ]; then
5373 # WebKit requires QtGui
5377 if [ "$CFG_SHARED" = "no" ]; then
5379 echo "WARNING: Using static linking will disable the WebKit module."
5384 CFG_CONCURRENT="yes"
5385 if [ "$canBuildQtConcurrent" = "no" ]; then
5386 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5389 QT_CONFIG="$QT_CONFIG concurrent"
5393 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5394 QT_CONFIG="$QT_CONFIG audio-backend"
5398 if [ "$CFG_WEBKIT" = "debug" ]; then
5399 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5403 QT_CONFIG="$QT_CONFIG v8"
5404 # Detect snapshot support
5405 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5406 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5409 *) canUseV8Snapshot="no"
5413 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5414 # QEMU crashes when building inside Scratchbox with an ARM target
5415 canUseV8Snapshot="no"
5418 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5419 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5421 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5422 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5425 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5426 QT_CONFIG="$QT_CONFIG v8snapshot"
5430 if [ "$CFG_QML_DEBUG" = "no" ]; then
5431 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5434 case "$QMAKE_CONF_COMPILER" in
5437 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5439 case "$COMPILER_VERSION" in
5441 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5442 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5443 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5446 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5447 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5448 QT_GCC_PATCH_VERSION=0
5458 #-------------------------------------------------------------------------------
5459 # part of configuration information goes into qconfig.h
5460 #-------------------------------------------------------------------------------
5462 case "$CFG_QCONFIG" in
5464 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5467 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5468 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5469 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5470 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5471 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5472 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5474 echo "#endif" >>"$tmpconfig"
5478 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5482 # define QT_EDITION $QT_EDITION
5486 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5487 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5489 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5490 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5493 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5494 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5497 if [ "$BUILD_ON_MAC" = "yes" ]; then
5498 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5499 #if defined(__LP64__)
5500 # define QT_POINTER_SIZE 8
5502 # define QT_POINTER_SIZE 4
5506 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5507 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5510 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5511 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5512 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5516 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5518 if [ "$CFG_DEV" = "yes" ]; then
5519 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5522 # Add QPA to config.h
5523 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5525 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5526 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5529 # Add turned on SQL drivers
5530 for DRIVER in $CFG_SQL_AVAILABLE; do
5531 eval "VAL=\$CFG_SQL_$DRIVER"
5534 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5535 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5536 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5539 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5545 QMakeVar set sql-drivers "$SQL_DRIVERS"
5546 QMakeVar set sql-plugins "$SQL_PLUGINS"
5548 # Add other configuration options to the qconfig.h file
5549 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5550 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5551 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5552 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5553 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5554 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5556 # X11/Unix/Mac only configs
5557 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5558 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5559 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5560 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5561 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5562 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5563 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5564 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5565 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5566 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5567 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5568 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5569 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5570 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5572 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5573 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5574 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5575 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5576 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5577 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5578 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5579 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5580 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5581 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5582 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5583 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5584 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5586 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5587 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5588 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5589 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5590 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5591 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5592 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5593 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5595 # sort QCONFIG_FLAGS for neatness if we can
5596 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5597 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5599 if [ -n "$QCONFIG_FLAGS" ]; then
5600 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5601 #ifndef QT_BOOTSTRAPPED
5604 for cfg in $QCONFIG_FLAGS; do
5605 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5606 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5607 # figure out define logic, so we can output the correct
5608 # ifdefs to override the global defines in a project
5610 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5611 # QT_NO_option can be forcefully turned on by QT_option
5612 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5613 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5614 # QT_option can be forcefully turned off by QT_NO_option
5615 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5618 if [ -z $cfgdNeg ]; then
5619 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5626 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5627 #if defined($cfgd) && defined($cfgdNeg)
5629 #elif !defined($cfgd) && !defined($cfgdNeg)
5636 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5637 #endif // QT_BOOTSTRAPPED
5642 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5643 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5644 #define QT_VISIBILITY_AVAILABLE
5649 if [ -n "$QT_LIBINFIX" ]; then
5650 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5651 #define QT_LIBINFIX "$QT_LIBINFIX"
5656 echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5658 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5659 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5660 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5662 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5663 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5664 chmod -w "$outpath/src/corelib/global/qconfig.h"
5665 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5666 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5670 #-------------------------------------------------------------------------------
5671 # save configuration into qconfig.pri
5672 #-------------------------------------------------------------------------------
5673 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5674 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5675 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5676 if [ "$CFG_DEBUG" = "yes" ]; then
5677 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5678 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5679 QT_CONFIG="$QT_CONFIG release"
5681 QT_CONFIG="$QT_CONFIG debug"
5682 elif [ "$CFG_DEBUG" = "no" ]; then
5683 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5684 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5685 QT_CONFIG="$QT_CONFIG debug"
5687 QT_CONFIG="$QT_CONFIG release"
5689 if [ "$CFG_FRAMEWORK" = "no" ]; then
5690 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5692 QT_CONFIG="$QT_CONFIG qt_framework"
5693 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5695 if [ "$CFG_DEV" = "yes" ]; then
5696 QT_CONFIG="$QT_CONFIG private_tests"
5699 cat >>"$QTCONFIG.tmp" <<EOF
5701 CONFIG += $QTCONFIG_CONFIG
5703 QT_HOST_ARCH = $CFG_HOST_ARCH
5704 QT_EDITION = $Edition
5705 QT_CONFIG += $QT_CONFIG
5708 QT_VERSION = $QT_VERSION
5709 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5710 QT_MINOR_VERSION = $QT_MINOR_VERSION
5711 QT_PATCH_VERSION = $QT_PATCH_VERSION
5714 QT_LIBINFIX = $QT_LIBINFIX
5715 QT_NAMESPACE = $QT_NAMESPACE
5719 if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
5720 echo "# pkgconfig" >> "$QTCONFIG.tmp"
5721 echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
5722 echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp"
5723 echo >> $"$QTCONFIG.tmp"
5726 if [ -n "$CFG_SYSROOT" ]; then
5727 echo "# sysroot" >>"$QTCONFIG.tmp"
5728 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5729 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5730 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5731 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5732 echo "}" >> "$QTCONFIG.tmp"
5733 echo >> "$QTCONFIG.tmp"
5735 if [ -n "$RPATH_FLAGS" ]; then
5736 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5738 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5739 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5740 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5741 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5744 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5745 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5746 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5749 # replace qconfig.pri if it differs from the newly created temp file
5750 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5751 rm -f "$QTCONFIG.tmp"
5753 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5756 #-------------------------------------------------------------------------------
5757 # save configuration into qmodule.pri
5758 #-------------------------------------------------------------------------------
5759 QTMODULE="$outpath/mkspecs/qmodule.pri"
5761 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
5763 # Ensure we can link to uninistalled libraries
5764 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5765 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5767 if [ -n "$QT_CFLAGS_PSQL" ]; then
5768 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5770 if [ -n "$QT_LFLAGS_PSQL" ]; then
5771 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5773 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5774 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5776 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5777 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5779 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5780 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5782 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5783 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5785 if [ -n "$QT_LFLAGS_ODBC" ]; then
5786 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5788 if [ -n "$QT_LFLAGS_TDS" ]; then
5789 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5792 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5793 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5796 #dump in the OPENSSL_LIBS info
5797 if [ '!' -z "$OPENSSL_LIBS" ]; then
5798 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5799 elif [ "$CFG_OPENSSL" = "linked" ]; then
5800 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5803 #dump in the SDK info
5804 if [ '!' -z "$CFG_SDK" ]; then
5805 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5809 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5810 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5812 # replace qmodule.pri if it differs from the newly created temp file
5813 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5814 rm -f "$QTMODULE.tmp"
5816 mv -f "$QTMODULE.tmp" "$QTMODULE"
5819 #-------------------------------------------------------------------------------
5820 # save configuration into .qmake.cache
5821 #-------------------------------------------------------------------------------
5823 CACHEFILE="$outpath/.qmake.cache"
5824 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5825 cat >>"$CACHEFILE.tmp" <<EOF
5827 QT_SOURCE_TREE = \$\$quote($relpath)
5828 QT_BUILD_TREE = \$\$quote($outpath)
5829 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5831 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5832 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5833 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5835 include(\$\$PWD/mkspecs/qmodule.pri)
5836 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5840 #dump the qmake spec
5841 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5842 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5844 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5847 # replace .qmake.cache if it differs from the newly created temp file
5848 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5849 rm -f "$CACHEFILE.tmp"
5851 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5854 #-------------------------------------------------------------------------------
5855 # give feedback on configuration
5856 #-------------------------------------------------------------------------------
5857 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5860 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5861 echo "Build type: $PLATFORM"
5863 echo "Building on: $PLATFORM"
5864 echo "Building for: $XPLATFORM"
5867 echo "Architecture: $CFG_ARCH"
5868 echo "Host architecture: $CFG_HOST_ARCH"
5870 if [ -n "$PLATFORM_NOTES" ]; then
5871 echo "Platform notes:"
5872 echo "$PLATFORM_NOTES"
5877 if [ "$OPT_VERBOSE" = "yes" ]; then
5878 echo $ECHO_N "qmake vars .......... $ECHO_C"
5879 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5880 echo "qmake switches ......... $QMAKE_SWITCHES"
5883 echo "Build .................. $CFG_BUILD_PARTS"
5884 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5885 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5886 echo "Debug .................. yes (combined)"
5887 if [ "$CFG_DEBUG" = "yes" ]; then
5888 echo "Default Link ........... debug"
5890 echo "Default Link ........... release"
5893 echo "Debug .................. $CFG_DEBUG"
5895 if [ -n "$PKG_CONFIG" ]; then
5896 echo "pkg-config ............. yes"
5898 echo "pkg-config ............. no"
5900 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5901 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5902 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5903 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5904 echo "QtGui module ........... $CFG_GUI"
5905 echo "QtWidgets module ....... $CFG_WIDGETS"
5906 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5907 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5909 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5911 echo "QML debugging .......... $CFG_QML_DEBUG"
5912 echo "PCH support ............ $CFG_PRECOMPILE"
5913 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5914 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5915 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5916 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5917 elif [ "$CFG_ARCH" = "arm" ]; then
5918 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5919 echo "NEON support ........... ${CFG_NEON}"
5921 if [ "$CFG_ARCH" = "mips" ]; then
5922 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5924 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5925 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5926 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5927 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5928 echo "NIS support ............ $CFG_NIS"
5929 echo "CUPS support ........... $CFG_CUPS"
5930 echo "Iconv support .......... $CFG_ICONV"
5931 echo "Glib support ........... $CFG_GLIB"
5932 echo "GStreamer support ...... $CFG_GSTREAMER"
5933 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
5934 echo "Large File support ..... $CFG_LARGEFILE"
5935 echo "GIF support ............ $CFG_GIF"
5936 if [ "$CFG_JPEG" = "no" ]; then
5937 echo "JPEG support ........... $CFG_JPEG"
5939 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
5941 if [ "$CFG_PNG" = "no" ]; then
5942 echo "PNG support ............ $CFG_PNG"
5944 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
5946 echo "zlib support ........... $CFG_ZLIB"
5947 echo "Session management ..... $CFG_SM"
5948 echo "libudev support ........ $CFG_LIBUDEV"
5950 if [ "$CFG_OPENGL" = "desktop" ]; then
5951 echo "OpenGL support ......... yes (Desktop OpenGL)"
5952 elif [ "$CFG_OPENGL" = "es2" ]; then
5953 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
5955 echo "OpenGL support ......... no"
5958 if [ "$CFG_OPENVG" ]; then
5959 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5960 echo "OpenVG support ......... ShivaVG"
5962 echo "OpenVG support ......... $CFG_OPENVG"
5966 echo "XShape support ......... $CFG_XSHAPE"
5967 echo "XVideo support ......... $CFG_XVIDEO"
5968 echo "XSync support .......... $CFG_XSYNC"
5969 echo "Xinerama support ....... $CFG_XINERAMA"
5970 echo "Xcursor support ........ $CFG_XCURSOR"
5971 echo "Xfixes support ......... $CFG_XFIXES"
5972 echo "Xrandr support ......... $CFG_XRANDR"
5973 echo "Xi support ............. $CFG_XINPUT"
5974 echo "MIT-SHM support ........ $CFG_MITSHM"
5975 echo "FontConfig support ..... $CFG_FONTCONFIG"
5976 echo "XKB Support ............ $CFG_XKB"
5977 echo "immodule support ....... $CFG_IM"
5978 echo "GTK theme support ...... $CFG_QGTKSTYLE"
5980 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
5981 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
5982 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
5983 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
5984 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
5985 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
5986 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
5987 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
5988 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
5991 if [ "$CFG_OPENSSL" = "yes" ]; then
5992 OPENSSL_LINKAGE="(run-time)"
5993 elif [ "$CFG_OPENSSL" = "linked" ]; then
5994 OPENSSL_LINKAGE="(linked)"
5996 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
5997 echo "Alsa support ........... $CFG_ALSA"
5998 if [ "$BUILD_ON_MAC" = "yes" ]; then
5999 echo "CoreWlan support ....... $CFG_COREWLAN"
6001 echo "libICU support ......... $CFG_ICU"
6002 echo "PCRE support ........... $CFG_PCRE"
6003 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6004 echo "Xcb support ............ limited (old version)"
6006 echo "Xcb support ............ $CFG_XCB"
6008 echo "Xrender support ........ $CFG_XRENDER"
6009 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6010 echo "XInput2 support ........ $CFG_XINPUT2"
6012 echo "EGLFS support .......... $CFG_EGLFS"
6013 echo "DirectFB support ....... $CFG_DIRECTFB"
6016 # complain about not being able to use dynamic plugins if we are using a static build
6017 if [ "$CFG_SHARED" = "no" ]; then
6019 echo "WARNING: Using static linking will disable the use of dynamically"
6020 echo "loaded plugins. Make sure to import all needed static plugins,"
6021 echo "or compile needed modules into the library."
6024 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6026 echo "NOTE: When linking against OpenSSL, you can override the default"
6027 echo "library names through OPENSSL_LIBS."
6029 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6033 exec 1>&3 3>&- # restore stdout
6034 cat $outpath/config.summary # display config feedback to user
6036 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6038 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6039 echo "if you want a pure debug build."
6044 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6049 #-------------------------------------------------------------------------------
6050 # build makefiles based on the configuration
6051 #-------------------------------------------------------------------------------
6053 echo "Finding project files. Please wait..."
6054 if [ "$CFG_NOPROCESS" != "yes" ]; then
6055 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6056 if [ -f "${relpath}/qtbase.pro" ]; then
6057 mkfile="${outpath}/Makefile"
6058 [ -f "$mkfile" ] && chmod +w "$mkfile"
6059 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6063 # .projects -> projects to process
6064 # .projects.1 -> qt and moc
6065 # .projects.2 -> subdirs and libs
6066 # .projects.3 -> the rest
6067 rm -f .projects .projects.1 .projects.2 .projects.3
6069 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6070 if [ -z "$AWK" ]; then
6071 for p in `echo $QMAKE_PROJECTS`; do
6072 echo "$p" >> .projects
6075 cat >projects.awk <<EOF
6081 first = "./.projects.1.tmp"
6082 second = "./.projects.2.tmp"
6083 third = "./.projects.3.tmp"
6088 if ( ! target_file )
6090 print input_file >target_file
6095 input_file = FILENAME
6100 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6103 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6104 target_file = second
6109 matched_target == 0 && /^(TEMPLATE.*=)/ {
6110 if ( \$3 == "subdirs" )
6111 target_file = second
6112 else if ( \$3 == "lib" )
6118 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6119 if ( \$0 ~ /plugin/ )
6122 target_file = second
6127 if ( ! target_file )
6129 print input_file >>target_file
6136 for p in `echo $QMAKE_PROJECTS`; do
6137 echo "$p" >> .projects.all
6140 # if you get errors about the length of the command line to awk, change the -l arg
6142 split -l 100 .projects.all .projects.all.
6143 for p in .projects.all.*; do
6144 "$AWK" -f projects.awk `cat $p`
6145 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6146 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6147 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6148 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6150 rm -f .projects.all* projects.awk
6152 [ -f .projects.1 ] && cat .projects.1 >>.projects
6153 [ -f .projects.2 ] && cat .projects.2 >>.projects
6154 rm -f .projects.1 .projects.2
6155 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6156 cat .projects.3 >>.projects
6160 # don't sort Qt and MOC in with the other project files
6161 # also work around a segfaulting uniq(1)
6162 if [ -f .sorted.projects.2 ]; then
6163 sort .sorted.projects.2 > .sorted.projects.2.new
6164 mv -f .sorted.projects.2.new .sorted.projects.2
6165 cat .sorted.projects.2 >> .sorted.projects.1
6167 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6168 rm -f .sorted.projects.2 .sorted.projects.1
6172 if [ -f .projects ]; then
6173 uniq .projects >.tmp
6174 mv -f .tmp .projects
6175 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6177 if [ -f .projects.3 ]; then
6178 uniq .projects.3 >.tmp
6179 mv -f .tmp .projects.3
6180 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6182 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6186 for part in $CFG_BUILD_PARTS; do
6188 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6189 libs) PART_ROOTS="$PART_ROOTS src" ;;
6190 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6191 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6196 if [ "$CFG_DEV" = "yes" ]; then
6197 PART_ROOTS="$PART_ROOTS tests"
6200 echo "Creating makefiles. Please wait..."
6201 for file in .projects .projects.3; do
6202 [ '!' -f "$file" ] && continue
6203 for a in `cat $file`; do
6205 for r in $PART_ROOTS; do
6206 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6211 [ "$IN_ROOT" = "no" ] && continue
6214 *winmain/winmain.pro)
6215 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6219 */qmake/qmake.pro) continue ;;
6220 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*|*tools/qdbusxml2cpp*|*tools/qdbuscpp2xml*) SPEC=$QMAKESPEC ;;
6221 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6227 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6228 test -d "$dir" || mkdir -p "$dir"
6229 OUTDIR="$outpath/$dir"
6230 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6231 # fast configure - the makefile exists, skip it
6232 # since the makefile exists, it was generated by qmake, which means we
6233 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6235 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6238 QMAKE_SPEC_ARGS="-spec $SPEC"
6239 echo $ECHO_N " for $a$ECHO_C"
6241 QMAKE="$outpath/bin/qmake"
6242 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6243 if [ "$file" = ".projects.3" ]; then
6246 cat >"${OUTDIR}/Makefile" <<EOF
6247 # ${OUTDIR}/Makefile: generated by configure
6249 # WARNING: This makefile will be replaced with a real makefile.
6250 # All changes made to this file will be lost.
6252 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6254 cat >>"${OUTDIR}/Makefile" <<EOF
6256 all clean install qmake first Makefile: FORCE
6257 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6265 if [ "$OPT_VERBOSE" = "yes" ]; then
6266 echo " (`basename $SPEC`)"
6267 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6272 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6273 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6277 rm -f .projects .projects.3
6279 #-------------------------------------------------------------------------------
6280 # check for platforms that we don't yet know about
6281 #-------------------------------------------------------------------------------
6282 if [ "$CFG_ARCH" = "unknown" ]; then
6285 NOTICE: configure was unable to determine the architecture
6286 for the $XQMAKESPEC target.
6288 Qt will not use a specialized implementation for any atomic
6289 operations. Instead a generic implemention based on either GCC
6290 intrinsics or C++11 std::atomic<T> will be used (when
6291 available). The generic implementations are generally as fast
6292 as and always as safe as a specialized implementation.
6294 If no generic implementation is available, Qt will use a
6295 fallback UNIX implementation which uses a single
6296 pthread_mutex_t to protect all atomic operations. This
6297 implementation is the slow (but safe) fallback implementation
6298 for architectures Qt does not yet support.
6302 #-------------------------------------------------------------------------------
6303 # check if the user passed the -no-zlib option, which is no longer supported
6304 #-------------------------------------------------------------------------------
6305 if [ -n "$ZLIB_FORCED" ]; then
6306 which_zlib="supplied"
6307 if [ "$CFG_ZLIB" = "system" ]; then
6313 NOTICE: The -no-zlib option was supplied but is no longer
6316 Qt now requires zlib support in all builds, so the -no-zlib
6317 option was ignored. Qt will be built using the $which_zlib
6322 #-------------------------------------------------------------------------------
6323 # check if the user passed the obsoleted -wayland or -no-wayland flag
6324 #-------------------------------------------------------------------------------
6325 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6328 NOTICE: The -wayland and -no-wayland flags are now obsolete
6330 All configuring of QtWayland plugin and QtCompositor happens in the module
6334 #-------------------------------------------------------------------------------
6335 # check if the user passed the obsoleted -arch or -host-arch options
6336 #-------------------------------------------------------------------------------
6337 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6340 NOTICE: The -arch and -host-arch options are obsolete.
6342 Qt now detects the target and host architectures based on compiler
6343 output. Qt will be built using $CFG_ARCH for the target architecture
6344 and $CFG_HOST_ARCH for the host architecture (note that these two
6345 will be the same unless you are cross-compiling).
6349 #-------------------------------------------------------------------------------
6350 # finally save the executed command to another script
6351 #-------------------------------------------------------------------------------
6352 if [ `basename $0` != "config.status" ]; then
6353 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6355 # add the system variables
6356 for varname in $SYSTEM_VARIABLES; do
6358 'if [ -n "\$'${varname}'" ]; then
6359 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6364 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6366 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6367 echo "#!/bin/sh" > "$outpath/config.status"
6368 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6369 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6370 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6371 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6372 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6373 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6374 echo "else" >> "$outpath/config.status"
6375 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6376 echo "fi" >> "$outpath/config.status"
6377 chmod +x "$outpath/config.status"
6380 if [ -n "$RPATH_MESSAGE" ]; then
6382 echo "$RPATH_MESSAGE"
6385 MAKE=`basename "$MAKE"`
6387 echo Qt is now configured for building. Just run \'$MAKE\'.
6388 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6389 echo Once everything is built, Qt is installed.
6390 echo You should not run \'$MAKE install\'.
6392 echo Once everything is built, you must run \'$MAKE install\'.
6393 echo Qt will be installed into $QT_INSTALL_PREFIX
6396 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.