2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
74 DEVICE_VARS_FILE=.device.vars
77 :> "$DEVICE_VARS_FILE"
79 #-------------------------------------------------------------------------------
81 #-------------------------------------------------------------------------------
85 echo "$@" | sed 's/ /\ /g'
88 # Adds a new qmake variable to the cache
89 # Usage: QMakeVar mode varname contents
90 # where mode is one of: set, add, del
104 echo >&2 "BUG: wrong command to QMakeVar: $1"
108 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
111 # Helper function for getQMakeConf. It parses include statements in
112 # qmake.conf and prints out the expanded file
115 while read line; do case "$line" in
117 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
118 current_dir=`dirname "$1"`
119 conf_file="$current_dir/$inc_file"
120 if [ ! -f "$conf_file" ]; then
121 echo "WARNING: Unable to find file $conf_file" >&2
124 getQMakeConf1 "$conf_file"
136 values["LITERAL_WHITESPACE"] = " "
137 values["LITERAL_DOLLAR"] = "$"
139 /^[_A-Z0-9.]+[ \t]*\+?=/ {
140 valStart = index($0, "=") + 1
143 if (substr($0, valStart - 2, 1) == "+") {
147 variable = substr($0, 0, valStart - 2 - append)
148 value = substr($0, valStart)
149 gsub("[ \t]+", "", variable)
150 gsub("^[ \t]+", "", value)
151 gsub("[ \t]+$", "", value)
154 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
155 ovalue = ovalue substr(value, 1, RSTART - 1)
156 var = substr(value, RSTART + 2, RLENGTH - 2)
157 value = substr(value, RSTART + RLENGTH)
159 var = substr(var, 2, length(var) - 2)
161 ovalue = ovalue values[var]
163 ovalue = ovalue value
165 combinedValue = values[variable]
166 if (append == 1 && length(combinedValue) > 0) {
167 combinedValue = combinedValue " " ovalue
169 combinedValue = ovalue
171 values[variable] = combinedValue
174 for (var in values) {
175 print var "=" values[var]
183 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
186 # relies on $QMAKESPEC being set correctly. parses include statements in
187 # qmake.conf and prints out the expanded file
190 if [ -z "$specvals" ]; then
191 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
193 getQMakeConf3 "$1" "$specvals"
198 if [ -z "$xspecvals" ]; then
199 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$xspecvals"
204 # relies on $TEST_COMPILER being set correctly
205 compilerSupportsFlag()
207 cat >conftest.cpp <<EOF
208 int main() { return 0; }
210 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
212 rm -f conftest.cpp conftest.o
216 # relies on $TEST_COMPILER being set correctly
222 safe_flag=`shellEscape "$flag"`
223 lflags=$lflags,$safe_flag
225 compilerSupportsFlag "$lflags" >/dev/null 2>&1
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
238 echo >&2 "BUG: wrong command to QMakeVar: $1"
242 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
245 #-------------------------------------------------------------------------------
246 # operating system detection
247 #-------------------------------------------------------------------------------
249 # need that throughout the script
250 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
251 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
252 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
253 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
255 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
256 if echo '\c' | grep '\c' >/dev/null; then
262 #-------------------------------------------------------------------------------
263 # window system detection
264 #-------------------------------------------------------------------------------
268 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
273 #-----------------------------------------------------------------------------
274 # Qt version detection
275 #-----------------------------------------------------------------------------
276 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
280 if [ -n "$QT_VERSION" ]; then
281 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
282 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
283 if [ -n "$MAJOR" ]; then
284 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
285 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
286 QT_MAJOR_VERSION="$MAJOR"
287 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
288 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
291 if [ -z "$QT_MAJOR_VERSION" ]; then
292 echo "Cannot process version from qglobal.h: $QT_VERSION"
293 echo "Cannot proceed."
297 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
298 if [ -z "$QT_PACKAGEDATE" ]; then
299 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
300 echo "Cannot proceed"
304 #-------------------------------------------------------------------------------
306 #-------------------------------------------------------------------------------
310 EditionString=Commercial
314 # parse the arguments, setting things to "yes" or "no"
315 while [ "$#" -gt 0 ]; do
319 #Autoconf style options
321 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
325 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
329 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
330 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
333 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
336 -h|help|--help|-help)
337 if [ "$VAL" = "yes" ]; then
339 COMMERCIAL_USER="no" #doesn't matter we will display the help
342 COMMERCIAL_USER="no" #doesn't matter we will display the help
346 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
350 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
357 if [ "$UNKNOWN_ARG" = "yes" ]; then
369 COMMERCIAL_USER="yes"
383 if [ "$COMMERCIAL_USER" = "ask" ]; then
385 echo "Which edition of Qt do you want to use ?"
387 echo "Type 'c' if you want to use the Commercial Edition."
388 echo "Type 'o' if you want to use the Open Source Edition."
392 if [ "$commercial" = "c" ]; then
393 COMMERCIAL_USER="yes"
395 elif [ "$commercial" = "o" ]; then
402 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
403 # Commercial preview release
404 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
407 QT_EDITION="QT_EDITION_DESKTOP"
408 LicenseType="Technology Preview"
409 elif [ $COMMERCIAL_USER = "yes" ]; then
410 # one of commercial editions
411 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
413 # read in the license file
414 if [ -f "$LICENSE_FILE" ]; then
415 . "$LICENSE_FILE" >/dev/null 2>&1
416 if [ -z "$LicenseKeyExt" ]; then
418 echo "You are using an old license file."
420 echo "Please install the license file supplied by Nokia,"
421 echo "or install the Qt Open Source Edition if you intend to"
422 echo "develop free software."
425 if [ -z "$Licensee" ]; then
427 echo "Invalid license key. Please check the license key."
431 if [ -z "$LicenseKeyExt" ]; then
433 echo $ECHO_N "Please enter your license key: $ECHO_C"
435 Licensee="Unknown user"
440 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
441 && LicenseValid="yes" \
443 if [ "$LicenseValid" != "yes" ]; then
445 echo "Invalid license key. Please check the license key."
448 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
449 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
450 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
451 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
453 # determine which edition we are licensed to use
454 case "$LicenseTypeCode" in
456 LicenseType="Commercial"
460 QT_EDITION="QT_EDITION_UNIVERSAL"
463 Edition="FullFramework"
464 EditionString="Full Framework"
465 QT_EDITION="QT_EDITION_DESKTOP"
468 Edition="GUIFramework"
469 EditionString="GUI Framework"
470 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
475 LicenseType="Evaluation"
476 QMakeVar add DEFINES QT_EVAL
480 QT_EDITION="QT_EDITION_EVALUATION"
485 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
487 echo "Invalid license key. Please check the license key."
491 # verify that we are licensed to use Qt on this platform
493 case "$PlatformCode" in
496 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
500 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
503 ### EMBEDDED_QPA logic missing ###
504 case "$PlatformCode,$PLATFORM_MAC" in
505 X9,* | XC,* | XU,* | XW,* | XM,*)
507 LICENSE_EXTENSION="-ALLOS"
509 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
510 # Qt for Embedded Linux
511 LICENSE_EXTENSION="-EMBEDDED"
513 6M,* | N7,* | N9,* | NX,*)
515 LICENSE_EXTENSION="-EMBEDDED"
517 FM,* | LM,yes | ZM,no)
519 LICENSE_EXTENSION="-DESKTOP"
523 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
525 echo "You are not licensed for the $Platform platform."
527 echo "Please contact qt-info@nokia.com to upgrade your license to"
528 echo "include the $Platform platform, or install the Qt Open Source Edition"
529 echo "if you intend to develop free software."
534 if test -r "$relpath/.LICENSE"; then
535 # Generic, non-final license
537 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
542 *TECHNOLOGY?PREVIEW*)
549 echo >&2 "Invalid license files; cannot continue"
554 EditionString="$Edition"
555 QT_EDITION="QT_EDITION_DESKTOP"
558 case "$LicenseFeatureCode" in
561 case "$LicenseType" in
563 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
566 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
572 case "$LicenseType" in
574 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
577 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
583 echo "Invalid license key. Please check the license key."
587 case "$LicenseFeatureCode" in
595 if [ '!' -f "$outpath/LICENSE" ]; then
596 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
597 echo "this software has disappeared."
599 echo "Sorry, you are not licensed to use this software."
600 echo "Try re-installing."
604 elif [ $COMMERCIAL_USER = "no" ]; then
605 # Open Source edition - may only be used under the terms of the GPL or LGPL.
606 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
607 Licensee="Open Source"
609 EditionString="Open Source"
610 QT_EDITION="QT_EDITION_OPENSOURCE"
613 #-------------------------------------------------------------------------------
614 # initalize variables
615 #-------------------------------------------------------------------------------
617 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
618 for varname in $SYSTEM_VARIABLES; do
619 qmakevarname="${varname}"
620 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
621 if [ "${varname}" = "LDFLAGS" ]; then
622 qmakevarname="LFLAGS"
623 elif [ "${varname}" = "LD" ]; then
627 'if [ -n "\$'${varname}'" ]; then
628 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
632 # Use CC/CXX to run config.tests
633 mkdir -p "$outpath/config.tests"
634 rm -f "$outpath/config.tests/.qmake.cache"
635 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
637 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
639 # QTDIR may be set and point to an old or system-wide Qt installation
642 # the minimum version of libdbus-1 that we require:
643 MIN_DBUS_1_VERSION=0.93
645 # initalize internal variables
646 CFG_CONFIGURE_EXIT_ON_ERROR=yes
648 CFG_EXCEPTIONS=unspecified
649 CFG_GUI=auto # (yes|no|auto)
675 CFG_OPENVG_LC_INCLUDES=no
676 CFG_OPENVG_SHIVA=auto
677 CFG_OPENVG_ON_OPENGL=auto
683 QT_DEFAULT_BUILD_PARTS="libs examples"
687 CFG_AUDIO_BACKEND=auto
690 CFG_JAVASCRIPTCORE_JIT=auto
693 # Target architecture
695 # Host architecture, same as CFG_ARCH when not cross-compiling
697 # Set when the -arch or -host-arch arguments are used
698 OPT_OBSOLETE_HOST_ARG=no
710 CFG_OBSOLETE_WAYLAND=no
723 CFG_SEPARATE_DEBUG_INFO=no
724 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
725 CFG_REDUCE_EXPORTS=auto
735 CFG_REDUCE_RELOCATIONS=auto
736 CFG_ACCESSIBILITY=auto
741 CFG_CLOCK_GETTIME=auto
742 CFG_CLOCK_MONOTONIC=auto
750 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
754 CFG_PREFIX_INSTALL=yes
763 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
764 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
768 OPT_CONFIRM_LICENSE=no
781 QPA_PLATFORM_GUARD=yes
783 # initalize variables used for installation
792 QT_INSTALL_TRANSLATIONS=
801 #flags for SQL drivers
809 QT_LFLAGS_ODBC="-lodbc"
812 # flags for libdbus-1
816 # flags for Glib (X11 only)
820 # flags for GStreamer (X11 only)
824 #-------------------------------------------------------------------------------
825 # check SQL drivers available in this package
826 #-------------------------------------------------------------------------------
828 # opensource version removes some drivers, so force them to be off
834 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
835 for a in "$relpath/src/plugins/sqldrivers/"*; do
837 base_a=`basename "$a"`
838 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
839 eval "CFG_SQL_${base_a}=auto"
844 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
845 if [ -d "$relpath/src/plugins/imageformats" ]; then
846 for a in "$relpath/src/plugins/imageformats/"*; do
848 base_a=`basename "$a"`
849 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
854 #-------------------------------------------------------------------------------
855 # parse command line arguments
856 #-------------------------------------------------------------------------------
858 # parse the arguments, setting things to "yes" or "no"
859 while [ "$#" -gt 0 ]; do
863 #Autoconf style options
865 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
869 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
873 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
874 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
877 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
881 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
885 -no-*-*|-plugin-*-*|-qt-*-*)
886 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
887 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
891 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
894 #Qt style yes options
895 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-directfb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon)
896 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
899 #Qt style options that pass an argument
902 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
906 -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)
907 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
911 #Qt style complex options in one command
912 -enable-*|-disable-*)
913 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
914 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
916 #Qt Builtin/System style options
917 -no-*|-system-*|-qt-*)
918 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
919 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
921 #Options that cannot be generalized
928 # this option may or may not be followed by an argument
929 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
938 # this option may or may not be followed by an argument
939 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
947 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
948 # this option may or may not be followed by an argument
949 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
968 if [ "$1" = "-D" ]; then
972 VAL=`echo $1 | sed 's,-D,,'`
977 # this option may or may not be followed by an argument
978 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
987 if [ "$1" = "-I" ]; then
991 VAL=`echo $1 | sed 's,-I,,'`
996 if [ "$1" = "-L" ]; then
1000 VAL=`echo $1 | sed 's,-L,,'`
1005 if [ "$1" = "-R" ]; then
1009 VAL=`echo $1 | sed 's,-R,,'`
1014 VAL=`echo $1 | sed 's,-l,,'`
1018 if [ "$1" = "-F" ]; then
1022 VAL=`echo $1 | sed 's,-F,,'`
1027 if [ "$1" = "-fw" ]; then
1031 VAL=`echo $1 | sed 's,-fw,,'`
1039 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1046 if [ "$UNKNOWN_ARG" = "yes" ]; then
1047 echo "$1: unknown argument"
1058 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1059 CFG_ACCESSIBILITY="$VAL"
1068 CFG_USE_GNUMAKE="$VAL"
1071 CFG_MYSQL_CONFIG="$VAL"
1074 QT_INSTALL_PREFIX="$VAL"
1077 QT_HOST_PREFIX="$VAL"
1086 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1087 CFG_PKGCONFIG="$VAL"
1093 CFG_PKGCONFIG="force"
1096 QT_INSTALL_DOCS="$VAL"
1099 QT_INSTALL_HEADERS="$VAL"
1102 QT_INSTALL_PLUGINS="$VAL"
1105 QT_INSTALL_IMPORTS="$VAL"
1108 QT_INSTALL_DATA="$VAL"
1111 QT_INSTALL_LIBS="$VAL"
1120 QT_INSTALL_TRANSLATIONS="$VAL"
1122 sysconfdir|settingsdir)
1123 QT_INSTALL_SETTINGS="$VAL"
1126 QT_INSTALL_EXAMPLES="$VAL"
1129 QT_INSTALL_TESTS="$VAL"
1138 QT_INSTALL_BINS="$VAL"
1144 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1151 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1152 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1153 [ "$VAL" = "es2" ]; then
1160 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1167 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1170 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1173 if [ "$BUILD_ON_MAC" = "yes" ]; then
1180 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1181 CFG_MAC_DWARF2="$VAL"
1187 OPT_OBSOLETE_HOST_ARG=yes
1190 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1191 CFG_MAC_HARFBUZZ="$VAL"
1198 if [ "$BUILD_ON_MAC" = "yes" ]; then
1199 CFG_FRAMEWORK="$VAL"
1205 if [ "$VAL" = "yes" ]; then
1207 QMakeVar add QMAKE_CFLAGS -pg
1208 QMakeVar add QMAKE_CXXFLAGS -pg
1209 QMakeVar add QMAKE_LFLAGS -pg
1210 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1216 if [ "$VAL" = "yes" ]; then
1217 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1220 exceptions|g++-exceptions)
1221 if [ "$VAL" = "no" ]; then
1223 elif [ "$VAL" = "yes" ]; then
1231 # keep compatibility with old platform names
1237 PLATFORM=hpux-acc-o64
1240 PLATFORM=hpux-acc-64
1243 PLATFORM=hpux-acc-64
1255 PLATFORM=reliant-cds-64
1258 PLATFORM=solaris-cc-64
1261 PLATFORM=unixware-cc
1264 PLATFORM=unixware-g++
1267 PLATFORM=unixware-cc
1270 PLATFORM=unixware-g++
1276 i386) NATIVE_64_ARCH="x86_64" ;;
1277 powerpc) NATIVE_64_ARCH="ppc64" ;;
1278 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1280 if [ ! -z "$NATIVE_64_ARCH" ]; then
1281 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1288 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1291 XPLATFORM="devices/$VAL"
1294 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1295 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1296 DeviceVar set $DEV_VAR $DEV_VAL
1299 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1300 CFG_DEBUG_RELEASE="$VAL"
1306 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1307 CFG_RELEASE_QMAKE="$VAL"
1313 if [ "$VAL" = "yes" ]; then
1315 elif [ "$VAL" = "no" ]; then
1322 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1323 CFG_PREFIX_INSTALL="$VAL"
1331 developer-build|commercial|opensource)
1332 # These switches have been dealt with already
1335 if [ "$VAL" = "yes" ]; then
1337 elif [ "$VAL" = "no" ]; then
1344 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1345 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1351 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1352 if [ "$VAL" = "no" ]; then
1353 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1354 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1355 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1361 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1368 if [ "$VAL" = "no" ]; then
1375 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1383 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1390 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1397 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1404 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1411 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1418 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1425 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1432 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1439 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1440 CFG_PRECOMPILE="$VAL"
1445 separate-debug-info)
1446 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1447 CFG_SEPARATE_DEBUG_INFO="$VAL"
1448 elif [ "$VAL" = "nocopy" ] ; then
1449 CFG_SEPARATE_DEBUG_INFO="yes"
1450 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1456 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1457 CFG_REDUCE_EXPORTS="$VAL"
1463 if [ "$VAL" = "no" ]; then
1470 if [ "$VAL" = "no" ]; then
1477 if [ "$VAL" = "no" ]; then
1484 if [ "$VAL" = "no" ]; then
1491 if [ "$VAL" = "no" ]; then
1498 if [ "$VAL" = "no" ]; then
1505 if [ "$VAL" = "no" ]; then
1512 if [ "$VAL" = "no" ]; then
1519 if [ "$VAL" = "no" ]; then
1529 if [ "$VAL" = "no" ]; then
1536 if [ "$VAL" = "no" ]; then
1543 if [ "$VAL" = "no" ]; then
1544 CFG_MIPS_DSPR2="$VAL"
1550 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1551 CFG_REDUCE_RELOCATIONS="$VAL"
1557 [ "$VAL" = "qt" ] && VAL=yes
1558 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1563 # No longer supported:
1564 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1567 if [ "$VAL" = "system" ]; then
1574 [ "$VAL" = "yes" ] && VAL=qt
1575 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1582 [ "$VAL" = "yes" ] && VAL=qt
1583 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1590 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1597 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1604 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1611 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1618 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1625 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1626 CFG_FONTCONFIG="$VAL"
1632 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1639 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1646 CFG_OBSOLETE_WAYLAND=yes
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1656 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1663 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1684 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1691 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1698 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1699 CFG_GSTREAMER="$VAL"
1705 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1706 CFG_QGTKSTYLE="$VAL"
1712 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1715 if [ "$VAL" = "no" ]; then
1723 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1725 elif [ "$VAL" = "no" ]; then
1732 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1733 QPA_PLATFORM_GUARD="$VAL"
1739 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1741 elif [ "$VAL" = "runtime" ]; then
1748 if [ "$VAL" = "yes" ]; then
1755 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1762 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1763 CFG_LARGEFILE="$VAL"
1769 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1776 if [ "$VAL" = "yes" ]; then
1777 CFG_OPENSSL="linked"
1783 if [ "$VAL" = "yes" ]; then
1786 if [ "$VAL" = "no" ]; then
1794 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1795 CFG_JAVASCRIPTCORE_JIT="$VAL"
1801 if [ "$VAL" = "yes" ]; then
1802 OPT_CONFIRM_LICENSE="$VAL"
1808 if [ "$VAL" = "yes" ]; then
1814 sql-*|imageformat-*)
1815 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1816 # if autoconf style options were used, $VAL can be "yes" or "no"
1817 [ "$VAL" = "yes" ] && VAL=qt
1818 # now $VAL should be "no", "qt", or "plugin"... double-check
1819 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1822 # now $VAL is "no", "qt", or "plugin"
1824 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1825 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1827 # Grab the available values
1830 avail="$CFG_SQL_AVAILABLE"
1833 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1834 if [ "$OPT" != "plugin" ]; then
1835 # png is always built in
1841 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1845 # Check that that user's value is available.
1848 if [ "$VAL" = "$d" ]; then
1853 [ "$found" = yes ] || ERROR=yes
1855 if [ "$VAR" = "sql" ]; then
1856 # set the CFG_SQL_driver
1857 eval "CFG_SQL_$VAL=\$OPT"
1859 elif [ "$VAR" = "imageformat" ]; then
1860 [ "$OPT" = "qt" ] && OPT=yes
1861 VAL="`echo $VAL |tr a-z A-Z`"
1862 eval "CFG_$VAL=$OPT"
1866 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1867 if [ "$OPT" = "plugin" ]; then
1870 QMakeVar add "${VAR}s" "${VAL}"
1871 elif [ "$OPT" = "no" ]; then
1872 PLUG_VAR="${VAR}-plugin"
1874 QMakeVar del "${IN_VAR}s" "$VAL"
1875 QMakeVar del "${PLUG_VAR}s" "$VAL"
1877 if [ "$ERROR" = "yes" ]; then
1878 echo "$CURRENT_OPT: unknown argument"
1883 if [ "$VAL" = "yes" ]; then
1884 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1885 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1889 elif [ "$VAL" = "no" ]; then
1890 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1891 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1900 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1907 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1914 D_FLAGS="$D_FLAGS \"$VAL\""
1917 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1920 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1923 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1926 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1929 if [ "$BUILD_ON_MAC" = "yes" ]; then
1930 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1931 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1937 if [ "$BUILD_ON_MAC" = "yes" ]; then
1938 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1944 W_FLAGS="$W_FLAGS \"${VAL}\""
1950 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1951 CFG_PHONON_BACKEND="$VAL"
1963 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1964 CFG_AUDIO_BACKEND="$VAL"
1970 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1977 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1978 CFG_FORCE_ASSERTS="$VAL"
1984 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1994 if [ "$UNKNOWN_OPT" = "yes" ]; then
1995 echo "${CURRENT_OPT}: invalid command-line switch"
2001 # update QT_CONFIG to show our current predefined configuration
2002 case "$CFG_QCONFIG" in
2003 minimal|small|medium|large|full)
2004 # these are a sequence of increasing functionality
2005 for c in minimal small medium large full; do
2006 QT_CONFIG="$QT_CONFIG $c-config"
2007 [ "$CFG_QCONFIG" = $c ] && break
2011 # not known to be sufficient for anything
2012 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2013 echo >&2 "Error: configuration file not found:"
2014 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2016 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2021 #-------------------------------------------------------------------------------
2022 # build tree initialization
2023 #-------------------------------------------------------------------------------
2025 # where to find which..
2026 unixtests="$relpath/config.tests/unix"
2027 mactests="$relpath/config.tests/mac"
2028 WHICH="$unixtests/which.test"
2030 PERL=`$WHICH perl 2>/dev/null`
2032 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2034 for e in gawk nawk awk; do
2035 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2042 PERL="/usr/bin/perl"
2043 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2047 ### skip this if the user just needs help...
2048 if [ "$OPT_HELP" != "yes" ]; then
2050 # is this a shadow build?
2051 if [ "$OPT_SHADOW" = "maybe" ]; then
2053 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2054 if [ -h "$outpath" ]; then
2055 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2061 if [ "$OPT_SHADOW" = "yes" ]; then
2062 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2063 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2064 echo >&2 "Cannot proceed."
2067 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2070 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2072 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2073 echo "Qt can be built in release mode with separate debug information, so"
2074 echo "-debug-and-release is not necessary anymore"
2078 if [ "$CFG_SILENT" = "yes" ]; then
2079 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2082 # if the source tree is different from the build tree,
2083 # symlink or copy part of the sources
2084 if [ "$OPT_SHADOW" = "yes" ]; then
2085 echo "Preparing build tree..."
2087 if [ -z "$PERL" ]; then
2089 echo "You need perl in your PATH to make a shadow build."
2090 echo "Cannot proceed."
2094 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2096 # make a syncqt script that can be used in the shadow
2097 rm -f "$outpath/bin/syncqt"
2098 if [ -x "$relpath/bin/syncqt" ]; then
2099 mkdir -p "$outpath/bin"
2100 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2101 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2102 chmod 755 "$outpath/bin/syncqt"
2105 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2106 rm -f "$outpath/bin/$i"
2107 if [ -x "$relpath/bin/$i" ]; then
2108 mkdir -p "$outpath/bin"
2109 echo "#!/bin/sh" >"$outpath/bin/$i"
2110 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2111 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2112 chmod 755 "$outpath/bin/$i"
2116 # save a pre-existing mkspecs/modules dir
2117 test -d "$outpath/mkspecs/modules" && \
2118 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2120 # symlink the mkspecs directory
2121 mkdir -p "$outpath/mkspecs"
2122 rm -rf "$outpath"/mkspecs/*
2123 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2124 rm -f "$outpath/mkspecs/default"
2128 rm -rf "$outpath/mkspecs/$1"
2129 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2130 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2133 # Special case for mkspecs/features directory.
2134 # To be able to place .prf files into a shadow build directory,
2135 # we're creating links for files only. The directory structure is reproduced.
2136 ShadowMkspecs features
2138 # The modules dir is special, too.
2139 if test -d "$outpath/mkspecs-modules"; then
2140 rm -rf "$outpath/mkspecs/modules"
2141 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2143 ShadowMkspecs modules
2146 # symlink the doc directory
2147 rm -rf "$outpath/doc"
2148 ln -s "$relpath/doc" "$outpath/doc"
2151 # symlink fonts to be able to run application from build directory
2152 if [ ! -d "${outpath}/lib/fonts" ]; then
2153 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2154 mkdir -p "${outpath}/lib"
2155 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2159 if [ "$OPT_FAST" = "auto" ]; then
2160 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2167 # find a make command
2168 if [ -z "$MAKE" ]; then
2170 for mk in gmake make; do
2171 if "$WHICH" $mk >/dev/null 2>&1; then
2176 if [ -z "$MAKE" ]; then
2177 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2178 echo >&2 "Cannot proceed."
2181 # export MAKE, we need it later in the config.tests
2187 #-------------------------------------------------------------------------------
2188 # auto-detect all that hasn't been specified in the arguments
2189 #-------------------------------------------------------------------------------
2191 if [ -z "$PLATFORM" ]; then
2193 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2195 OSX_VERSION=`uname -r | cut -d. -f1`
2196 # Select compiler. Use g++ unless we find a usable Clang version
2198 if [ "$OSX_VERSION" -ge 12 ]; then
2199 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2201 elif [ "$OSX_VERSION" -eq 11 ]; then
2202 # We're on Lion. Check if we have a supported Clang version
2203 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2206 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2213 #PLATFORM=aix-g++-64
2215 #PLATFORM=aix-xlc-64
2217 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2227 # PLATFORM=dynix-g++
2233 PLATFORM=freebsd-g++
2235 - Also available for FreeBSD: freebsd-icc
2239 PLATFORM=openbsd-g++
2250 #PLATFORM=irix-cc-64
2252 - Also available for IRIX: irix-g++ irix-cc-64
2256 case "$UNAME_MACHINE" in
2258 #PLATFORM=hpuxi-acc-32
2259 PLATFORM=hpuxi-acc-64
2261 - Also available for HP-UXi: hpuxi-acc-32
2267 #PLATFORM=hpux-acc-64
2269 #PLATFORM=hpux-acc-o64
2271 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2280 - Also available for Tru64: tru64-g++
2284 case "$UNAME_MACHINE" in
2286 PLATFORM=linux-g++-64
2293 - Also available for Linux: linux-kcc linux-icc linux-cxx
2297 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2298 PLATFORM="solaris-g++"
2300 #PLATFORM=solaris-g++
2302 #PLATFORM=solaris-cc64
2305 - Also available for Solaris: solaris-g++ solaris-cc-64
2308 ReliantUNIX-*:*|SINIX-*:*)
2309 PLATFORM=reliant-cds
2310 #PLATFORM=reliant-cds-64
2312 - Also available for Reliant UNIX: reliant-cds-64
2322 #PLATFORM=unixware-g++
2323 PLATFORM=unixware-cc
2325 - Also available for OpenUNIX: unixware-g++
2329 #PLATFORM=unixware-g++
2330 PLATFORM=unixware-cc
2332 - Also available for UnixWare: unixware-g++
2339 - Also available for SCO OpenServer: sco-g++
2343 PLATFORM=unixware-g++
2346 PLATFORM=unsupported/qnx-g++
2349 if [ "$OPT_HELP" != "yes" ]; then
2351 for p in $PLATFORMS; do
2352 echo " $relconf $* -platform $p"
2355 echo " The build script does not currently recognize all" >&2
2356 echo " platforms supported by Qt." >&2
2357 echo " Rerun this script with a -platform option listed to" >&2
2358 echo " set the system/compiler combination you use." >&2
2365 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2367 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2369 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2370 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2372 if [ -d "$PLATFORM" ]; then
2373 QMAKESPEC="$PLATFORM"
2375 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2377 if [ -d "$XPLATFORM" ]; then
2378 XQMAKESPEC="$XPLATFORM"
2380 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2382 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2383 QT_CROSS_COMPILE=yes
2384 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2385 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2388 if [ "$BUILD_ON_MAC" = "yes" ]; then
2389 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2391 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2392 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2393 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2394 echo " built with 'macx-g++'" >&2
2400 # check specified platforms are supported
2401 if [ '!' -d "$QMAKESPEC" ]; then
2403 echo " The specified system/compiler is not supported:"
2407 echo " Please see the README file for a complete list."
2411 if [ '!' -d "$XQMAKESPEC" ]; then
2413 echo " The specified system/compiler is not supported:"
2417 echo " Please see the README file for a complete list."
2421 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2423 echo " The specified system/compiler port is not complete:"
2425 echo " $XQMAKESPEC/qplatformdefs.h"
2427 echo " Please contact qt-info@nokia.com."
2432 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2433 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2434 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2435 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2436 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2440 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2441 case `basename "$XPLATFORM"` in
2444 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2446 echo "Please contact qt-info@nokia.com to upgrade your license to"
2447 echo "include this platform, or install the Qt Open Source Edition"
2448 echo "if you intend to develop free software."
2454 #-------------------------------------------------------------------------------
2455 # write out device config before we run the test.
2456 #-------------------------------------------------------------------------------
2457 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
2458 rm -f "$DEVICE_VARS_FILE"
2460 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
2463 #-------------------------------------------------------------------------------
2464 # tests that don't need qmake (must be run before displaying help)
2465 #-------------------------------------------------------------------------------
2467 # detect build style
2468 if [ "$CFG_DEBUG" = "auto" ]; then
2469 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2470 CFG_DEBUG_RELEASE=yes
2472 elif [ "$CFG_DEV" = "yes" ]; then
2473 CFG_DEBUG_RELEASE=no
2476 CFG_DEBUG_RELEASE=no
2480 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2481 QT_CONFIG="$QT_CONFIG build_all"
2484 # pass on $CFG_SDK to the configure tests.
2485 if [ '!' -z "$CFG_SDK" ]; then
2486 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2489 # find the default framework value
2490 if [ "$BUILD_ON_MAC" = "yes" ]; then
2491 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2492 CFG_FRAMEWORK="$CFG_SHARED"
2493 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2495 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2503 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2505 TEST_COMPILER=$QMAKE_CONF_COMPILER
2506 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2507 if [ -z "$TEST_COMPILER" ]; then
2508 echo "ERROR: Cannot set the compiler for the configuration tests"
2513 if [ -n "$CFG_SYSROOT" ]; then
2514 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2518 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2520 # auto-detect precompiled header support
2521 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2522 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2529 #auto-detect DWARF2 on the mac
2530 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2531 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2538 # auto-detect support for separate debug info in objcopy
2539 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2540 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2541 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2542 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2543 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2544 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2545 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2546 CFG_SEPARATE_DEBUG_INFO=no
2550 # binutils on HP-UX is buggy; default to no.
2551 CFG_SEPARATE_DEBUG_INFO=no
2554 CFG_SEPARATE_DEBUG_INFO=yes
2560 # auto-detect -fvisibility support
2561 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2562 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2563 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2564 echo "-reduce-exports was requested but this compiler does not support it"
2565 echo "Re-run configure with -v for more information"
2568 CFG_REDUCE_EXPORTS=no
2570 CFG_REDUCE_EXPORTS=yes
2574 # detect the availability of the -Bsymbolic-functions linker optimization
2575 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2576 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2577 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2578 echo "-reduce-relocations was requested but this compiler does not support it"
2579 echo "Re-run configure with -v for more information"
2582 CFG_REDUCE_RELOCATIONS=no
2584 CFG_REDUCE_RELOCATIONS=yes
2588 # auto-detect GNU make support
2589 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2593 # find the default framework value
2594 if [ "$BUILD_ON_MAC" = "yes" ]; then
2595 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2596 CFG_FRAMEWORK="$CFG_SHARED"
2597 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2599 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2607 #setup the build parts
2608 if [ -z "$CFG_BUILD_PARTS" ]; then
2609 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2611 # build tests by default, if a developer build
2612 if [ "$CFG_DEV" = "yes" ]; then
2613 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2616 # don't build tools by default when cross-compiling
2617 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2618 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2621 for nobuild in $CFG_NOBUILD_PARTS; do
2622 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2624 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2626 # echo "WARNING: libs is a required part of the build."
2628 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2631 #-------------------------------------------------------------------------------
2632 # post process QT_INSTALL_* variables
2633 #-------------------------------------------------------------------------------
2635 if [ -z "$QT_INSTALL_PREFIX" ]; then
2636 if [ "$CFG_DEV" = "yes" ]; then
2637 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2639 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2642 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2644 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2645 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2646 if [ "$BUILD_ON_MAC" = "yes" ]; then
2647 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2650 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2653 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2655 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2656 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2657 if [ "$BUILD_ON_MAC" = "yes" ]; then
2658 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2663 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2666 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2668 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2669 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2670 if [ "$BUILD_ON_MAC" = "yes" ]; then
2671 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2672 QT_INSTALL_LIBS="/Libraries/Frameworks"
2676 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2678 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2680 if [ -z "$QT_INSTALL_BINS" ]; then #default
2681 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2682 if [ "$BUILD_ON_MAC" = "yes" ]; then
2683 QT_INSTALL_BINS="/Developer/Applications/Qt"
2686 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2688 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2690 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2691 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2692 if [ "$BUILD_ON_MAC" = "yes" ]; then
2693 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2696 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2698 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2700 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2701 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2702 if [ "$BUILD_ON_MAC" = "yes" ]; then
2703 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2706 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2708 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2710 if [ -z "$QT_INSTALL_DATA" ]; then #default
2711 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2713 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2715 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2716 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2718 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2720 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2721 if [ "$BUILD_ON_MAC" = "yes" ]; then
2722 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2724 QT_INSTALL_SETTINGS=/etc/xdg
2727 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2729 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2730 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2731 if [ "$BUILD_ON_MAC" = "yes" ]; then
2732 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2735 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2737 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2740 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2741 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2742 if [ "$BUILD_ON_MAC" = "yes" ]; then
2743 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2746 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2748 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2750 #------- host paths --------
2752 if [ -z "$QT_HOST_PREFIX" ]; then
2753 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2756 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2760 if [ -z "$QT_HOST_BINS" ]; then #default
2762 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2763 if [ "$BUILD_ON_MAC" = "yes" ]; then
2764 QT_HOST_BINS="/Developer/Applications/Qt"
2767 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2769 QT_HOST_BINS="$QT_INSTALL_BINS"
2772 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2774 if [ -z "$QT_HOST_DATA" ]; then #default
2776 QT_HOST_DATA="$QT_HOST_PREFIX"
2778 QT_HOST_DATA="$QT_INSTALL_DATA"
2781 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2784 #-------------------------------------------------------------------------------
2785 # help - interactive parts of the script _after_ this section please
2786 #-------------------------------------------------------------------------------
2788 # next, emit a usage message if something failed.
2789 if [ "$OPT_HELP" = "yes" ]; then
2790 [ "x$ERROR" = "xyes" ] && echo
2791 if [ "$CFG_NIS" = "no" ]; then
2798 if [ "$CFG_CUPS" = "no" ]; then
2805 if [ "$CFG_ICONV" = "no" ]; then
2812 if [ "$CFG_LARGEFILE" = "no" ]; then
2819 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
2826 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2834 if [ "$CFG_XCB" = "no" ]; then
2842 if [ "$CFG_EGLFS" = "no" ]; then
2850 if [ "$CFG_DIRECTFB" = "no"]; then
2857 if [ "$CFG_XINPUT2" = "no" ]; then
2865 if [ "$CFG_DBUS" = "no" ]; then
2873 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2881 if [ "$CFG_GLIB" = "no" ]; then
2890 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2891 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2892 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2893 [-release] [-debug] [-debug-and-release]
2894 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2895 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2896 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
2897 [-plugin-sql-<driver>] [-system-sqlite]
2898 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2899 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2900 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2901 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2902 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2903 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2904 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
2905 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2906 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2907 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2908 [-no-audio-backend] [-audio-backend]
2909 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2910 [-no-optimized-qmake] [-optimized-qmake]
2911 [-no-openssl] [-openssl] [-openssl-linked]
2912 [-no-gtkstyle] [-gtkstyle]
2913 [-qt-pcre] [-system-pcre]
2914 [-device <name>] [-device-option <key=value>]
2915 [additional platform specific options (see below)]
2918 Installation options:
2920 These are optional, but you may specify install directories.
2922 -prefix <dir> ...... This will install everything relative to <dir>
2923 (default $QT_INSTALL_PREFIX)
2925 -hostprefix [dir] .. Tools and libraries needed when developing
2926 applications are installed in [dir]. If [dir] is
2927 not given, the current build directory will be used.
2930 * -prefix-install .... Force a sandboxed "local" installation of
2931 Qt. This will install into
2932 $QT_INSTALL_PREFIX, if this option is
2933 disabled then some platforms will attempt a
2934 "system" install by placing default values to
2935 be placed in a system location other than
2938 You may use these to separate different parts of the install:
2940 -bindir <dir> ......... Executables will be installed to <dir>
2941 (default PREFIX/bin)
2942 -libdir <dir> ......... Libraries will be installed to <dir>
2943 (default PREFIX/lib)
2944 -docdir <dir> ......... Documentation will be installed to <dir>
2945 (default PREFIX/doc)
2946 -headerdir <dir> ...... Headers will be installed to <dir>
2947 (default PREFIX/include)
2948 -plugindir <dir> ...... Plugins will be installed to <dir>
2949 (default PREFIX/plugins)
2950 -importdir <dir> ...... Imports for QML will be installed to <dir>
2951 (default PREFIX/imports)
2952 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2954 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2955 (default PREFIX/translations)
2956 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2957 (default PREFIX/etc/settings)
2958 -examplesdir <dir> .... Examples will be installed to <dir>
2959 (default PREFIX/examples)
2960 -testsdir <dir> ....... Tests will be installed to <dir>
2961 (default PREFIX/tests)
2963 -hostbindir <dir> .. Host executables will be installed to <dir>
2964 (default HOSTPREFIX/bin)
2965 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2966 (default HOSTPREFIX)
2970 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2971 that needs to be evaluated. If the evaluation succeeds, the feature is
2972 included. Here is a short explanation of each option:
2974 * -release ........... Compile and link Qt with debugging turned off.
2975 -debug ............. Compile and link Qt with debugging turned on.
2976 -debug-and-release . Compile and link two versions of Qt, with and without
2977 debugging turned on (Mac only).
2979 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2981 -opensource ........ Compile and link the Open-Source Edition of Qt.
2982 -commercial ........ Compile and link the Commercial Edition of Qt.
2985 * -shared ............ Create and use shared Qt libraries.
2986 -static ............ Create and use static Qt libraries.
2988 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2990 -fast .............. Configure Qt quickly by generating Makefiles only for
2991 library and subdirectory targets. All other Makefiles
2992 are created as wrappers, which will in turn run qmake.
2994 -no-largefile ...... Disables large file support.
2995 + -largefile ......... Enables Qt to access files larger than 4 GB.
2997 -no-exceptions ..... Disable exceptions on compilers that support it.
2998 * -exceptions ........ Enable exceptions on compilers that support it.
3000 -no-accessibility .. Do not compile Accessibility support.
3001 * -accessibility ..... Compile Accessibility support.
3003 $SHN -no-stl ............ Do not compile STL support.
3004 $SHY -stl ............... Compile STL support.
3006 -no-sql-<driver> ... Disable SQL <driver> entirely.
3007 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3009 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3012 Possible values for <driver>:
3013 [ $CFG_SQL_AVAILABLE ]
3015 -system-sqlite ..... Use sqlite from the operating system.
3017 -no-phonon-backend.. Do not build the platform phonon plugin.
3018 + -phonon-backend..... Build the platform phonon plugin.
3020 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3021 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3023 -no-qml-debug ...... Do not build the in-process QML debugging support.
3024 + -qml-debug ......... Build the QML debugging support.
3026 -platform target ... The operating system and compiler you are building
3029 See the README file for a list of supported
3030 operating systems and compilers.
3032 -no-mmx ............ Do not compile with use of MMX instructions.
3033 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3034 -no-sse ............ Do not compile with use of SSE instructions.
3035 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3036 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3037 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3038 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3039 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3040 -no-avx ............ Do not compile with use of AVX instructions.
3041 -no-neon ........... Do not compile with use of NEON instructions.
3042 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3043 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3045 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3046 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3048 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3050 -D <string> ........ Add an explicit define to the preprocessor.
3051 -I <string> ........ Add an explicit include path.
3052 -L <string> ........ Add an explicit library path.
3054 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
3055 configure determines whether to use pkg-config or not with
3056 some heuristics such as checking the environment variables.
3057 -no-pkg-config ..... Disable use of pkg-config.
3058 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
3059 detection heuristic).
3061 -help, -h .......... Display this information.
3063 Third Party Libraries:
3065 -qt-zlib ........... Use the zlib bundled with Qt.
3066 + -system-zlib ....... Use zlib from the operating system.
3067 See http://www.gzip.org/zlib
3069 -no-gif ............ Do not compile GIF reading support.
3071 -no-libpng ......... Do not compile PNG support.
3072 -qt-libpng ......... Use the libpng bundled with Qt.
3073 + -system-libpng ..... Use libpng from the operating system.
3074 See http://www.libpng.org/pub/png
3076 -no-libjpeg ........ Do not compile JPEG support.
3077 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3078 + -system-libjpeg .... Use libjpeg from the operating system.
3079 See http://www.ijg.org
3081 -no-openssl ........ Do not compile support for OpenSSL.
3082 + -openssl ........... Enable run-time OpenSSL support.
3083 -openssl-linked .... Enabled linked OpenSSL support.
3085 -qt-pcre ........... Use the PCRE library bundled with Qt.
3086 + -system-pcre ....... Use the PCRE library from the operating system.
3090 -make <part> ....... Add part to the list of parts to be built at make time.
3091 ($QT_DEFAULT_BUILD_PARTS)
3092 -nomake <part> ..... Exclude part from the list of parts to be built.
3094 -R <string> ........ Add an explicit runtime library path to the Qt
3096 -l <string> ........ Add an explicit library.
3098 -no-rpath .......... Do not use the library install path as a runtime
3100 + -rpath ............. Link Qt libraries and executables using the library
3101 install path as a runtime library path. Equivalent
3102 to -R install_libpath
3104 -continue .......... Continue as far as possible if an error occurs.
3106 -verbose, -v ....... Print verbose information about each step of the
3109 -silent ............ Reduce the build output so that warnings and errors
3110 can be seen more easily.
3112 * -no-optimized-qmake ... Do not build qmake optimized.
3113 -optimized-qmake ...... Build qmake optimized.
3115 -no-gui ............ Don't build the Qt GUI library
3117 $NSN -no-nis ............ Do not compile NIS support.
3118 $NSY -nis ............... Compile NIS support.
3120 $CUN -no-cups ........... Do not compile CUPS support.
3121 $CUY -cups .............. Compile CUPS support.
3122 Requires cups/cups.h and libcups.so.2.
3124 $CIN -no-iconv .......... Do not compile support for iconv(3).
3125 $CIY -iconv ............. Compile support for iconv(3).
3127 $PHN -no-pch ............ Do not use precompiled header support.
3128 $PHY -pch ............... Use precompiled header support.
3130 $DBN -no-dbus ........... Do not compile the QtDBus module.
3131 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3132 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3134 -reduce-relocations ..... Reduce relocations in the libraries through extra
3135 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3136 experimental; needs GNU ld >= 2.18).
3138 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3140 -device <name> ............... Cross-compile for device <name> (experimental)
3141 -device-option <key=value> ... Add device specific options for the device mkspec
3144 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3145 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3147 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3148 $XCBY -xcb ............... Compile Xcb support.
3150 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3151 $EGLFSY -eglfs ............. Compile EGLFS support.
3153 $DFBN -no-directfb ....... Do not compile DirectFB support.
3154 $DFBY -directfb .......... Compile DirectFB support.
3156 -xplatform target ... The target platform when cross-compiling.
3158 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3160 -no-feature-<feature> Do not compile in <feature>.
3161 -feature-<feature> .. Compile in <feature>. The available features
3162 are described in src/corelib/global/qfeatures.txt
3164 -no-freetype ........ Do not compile in Freetype2 support.
3165 -qt-freetype ........ Use the libfreetype bundled with Qt.
3166 * -system-freetype .... Use libfreetype from the operating system.
3167 See http://www.freetype.org/
3169 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3170 default ($CFG_QCONFIG).
3172 -no-opengl .......... Do not support OpenGL.
3173 -opengl <api> ....... Enable OpenGL support
3174 With no parameter, this will attempt to auto-detect
3175 OpenGL ES 2, or regular desktop OpenGL.
3176 Use es2 for <api> to override auto-detection.
3178 $GBN -no-glib ........... Do not compile Glib support.
3179 $GBY -glib .............. Compile Glib support.
3182 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3185 $X2N -no-xinput2......... Do not compile XInput2 support.
3186 $X2Y -xinput2............ Compile XInput2 support.
3192 if [ "$BUILD_ON_MAC" = "yes" ]; then
3197 -Fstring ........... Add an explicit framework path.
3198 -fw string ......... Add an explicit framework.
3200 * -framework ......... Build Qt as a series of frameworks and
3201 link tools against those frameworks.
3202 -no-framework ...... Do not build Qt as a series of frameworks.
3204 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3205 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3207 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3208 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3210 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3211 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3212 QT_ENABLE_HARFBUZZ environment variable.
3217 [ "x$ERROR" = "xyes" ] && exit 1
3222 # -----------------------------------------------------------------------------
3223 # LICENSING, INTERACTIVE PART
3224 # -----------------------------------------------------------------------------
3227 echo "This is the Qt ${EditionString} Edition."
3230 if [ "$Edition" = "OpenSource" ]; then
3232 echo "You are licensed to use this software under the terms of"
3233 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3234 if [ -f "$relpath/LICENSE.GPL3" ]; then
3235 echo "You are also licensed to use this software under the terms of"
3236 echo "the GNU General Public License (GPL) versions 3."
3242 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3243 echo "You have already accepted the terms of the $LicenseType license."
3246 if [ -f "$relpath/LICENSE.GPL3" ]; then
3247 echo "Type '3' to view the GNU General Public License version 3."
3249 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3250 echo "Type 'yes' to accept this license offer."
3251 echo "Type 'no' to decline this license offer."
3253 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3257 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3259 elif [ "$acceptance" = "no" ]; then
3260 echo "You are not licensed to use this software."
3263 elif [ "$acceptance" = "3" ]; then
3264 more "$relpath/LICENSE.GPL3"
3265 elif [ "$acceptance" = "L" ]; then
3266 more "$relpath/LICENSE.LGPL"
3269 elif [ "$Edition" = "Preview" ]; then
3270 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3273 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3274 echo "You have already accepted the terms of the $LicenseType license."
3277 echo "You are licensed to use this software under the terms of"
3278 echo "the $TheLicense"
3280 echo "Type '?' to read the Preview License."
3281 echo "Type 'yes' to accept this license offer."
3282 echo "Type 'no' to decline this license offer."
3284 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3288 if [ "$acceptance" = "yes" ]; then
3290 elif [ "$acceptance" = "no" ] ;then
3291 echo "You are not licensed to use this software."
3294 elif [ "$acceptance" = "?" ]; then
3295 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3298 elif [ "$Edition" != "OpenSource" ]; then
3299 if [ -n "$ExpiryDate" ]; then
3300 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3301 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3302 Today=`date +%Y%m%d`
3303 if [ "$Today" -gt "$ExpiryDate" ]; then
3304 case "$LicenseType" in
3305 Commercial|Academic|Educational)
3306 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3308 echo "NOTICE NOTICE NOTICE NOTICE"
3310 echo " Your support and upgrade period has expired."
3312 echo " You are no longer licensed to use this version of Qt."
3313 echo " Please contact qt-info@nokia.com to renew your support"
3314 echo " and upgrades for this license."
3316 echo "NOTICE NOTICE NOTICE NOTICE"
3321 echo "WARNING WARNING WARNING WARNING"
3323 echo " Your support and upgrade period has expired."
3325 echo " You may continue to use your last licensed release"
3326 echo " of Qt under the terms of your existing license"
3327 echo " agreement. But you are not entitled to technical"
3328 echo " support, nor are you entitled to use any more recent"
3329 echo " Qt releases."
3331 echo " Please contact qt-info@nokia.com to renew your"
3332 echo " support and upgrades for this license."
3334 echo "WARNING WARNING WARNING WARNING"
3341 echo "NOTICE NOTICE NOTICE NOTICE"
3343 echo " Your Evaluation license has expired."
3345 echo " You are no longer licensed to use this software. Please"
3346 echo " contact qt-info@nokia.com to purchase license, or install"
3347 echo " the Qt Open Source Edition if you intend to develop free"
3350 echo "NOTICE NOTICE NOTICE NOTICE"
3357 TheLicense=`head -n 1 "$outpath/LICENSE"`
3359 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3360 echo "You have already accepted the terms of the $TheLicense."
3363 echo "You are licensed to use this software under the terms of"
3364 echo "the $TheLicense."
3366 echo "Type '?' to view the $TheLicense."
3367 echo "Type 'yes' to accept this license offer."
3368 echo "Type 'no' to decline this license offer."
3370 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3374 if [ "$acceptance" = "yes" ]; then
3376 elif [ "$acceptance" = "no" ]; then
3377 echo "You are not licensed to use this software."
3380 else [ "$acceptance" = "?" ]
3381 more "$outpath/LICENSE"
3386 # this should be moved somewhere else
3389 AIX_VERSION=`uname -v`
3390 if [ "$AIX_VERSION" -lt "5" ]; then
3391 QMakeVar add QMAKE_LIBS_X11 -lbind
3398 #-------------------------------------------------------------------------------
3399 # generate qconfig.cpp
3400 #-------------------------------------------------------------------------------
3401 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3403 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3405 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3406 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3408 /* Installation date */
3409 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3411 /* Installation Info */
3412 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3413 "qt_prfxpath=$QT_INSTALL_PREFIX",
3414 "qt_docspath=$QT_INSTALL_DOCS",
3415 "qt_hdrspath=$QT_INSTALL_HEADERS",
3416 "qt_libspath=$QT_INSTALL_LIBS",
3417 "qt_binspath=$QT_INSTALL_BINS",
3418 "qt_plugpath=$QT_INSTALL_PLUGINS",
3419 "qt_impspath=$QT_INSTALL_IMPORTS",
3420 "qt_datapath=$QT_INSTALL_DATA",
3421 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3422 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3423 "qt_tstspath=$QT_INSTALL_TESTS",
3424 #ifdef QT_BUILD_QMAKE
3425 "qt_ssrtpath=$CFG_SYSROOT",
3426 "qt_hpfxpath=$QT_HOST_PREFIX",
3427 "qt_hbinpath=$QT_HOST_BINS",
3428 "qt_hdatpath=$QT_HOST_DATA",
3431 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3434 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3436 /* strlen( "qt_lcnsxxxx" ) == 12 */
3437 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3438 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3440 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3443 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3444 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3445 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3447 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3448 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3449 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3452 # -----------------------------------------------------------------------------
3453 if [ "$LicenseType" = "Evaluation" ]; then
3454 EVALKEY=qt_qevalkey=$LicenseKeyExt
3455 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3456 EVALKEY=qt_qevalkey=
3459 if [ -n "$EVALKEY" ]; then
3460 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3461 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3462 /* Evaluation license key */
3463 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3465 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3469 # -----------------------------------------------------------------------------
3471 # -----------------------------------------------------------------------------
3474 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3476 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3477 if [ "$OPT_SHADOW" = "yes" ]; then
3478 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3479 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3480 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3484 # $1: input variable name (awk regexp)
3485 # $2: optional output variable name
3486 # $3: optional value transformation (sed command)
3487 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3488 # is where the resulting variable is written to
3489 setBootstrapVariable()
3491 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3495 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3496 echo "Creating qmake. Please wait..."
3499 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3500 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3501 if [ -f "$QCONFIG_H" ]; then
3502 OLD_QCONFIG_H=$QCONFIG_H
3503 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3506 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3507 # when building qmake, we use #defines for the install paths,
3508 # however they are real functions in the library
3509 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3510 mkdir -p "$outpath/src/corelib/global"
3511 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3512 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3515 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3517 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3518 rm -rf mkspecs/default
3519 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3520 mkdir -p "$outpath/qmake" || exit
3522 for mkfile in GNUmakefile Makefile; do
3525 in_mkfile="${mkfile}.in"
3526 if [ "$mkfile" = "Makefile" ]; then
3527 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3528 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3530 in_mkfile="${mkfile}.unix"
3532 in_mkfile="$relpath/qmake/$in_mkfile"
3533 mkfile="$outpath/qmake/$mkfile"
3534 if [ -f "$mkfile" ]; then
3535 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3538 [ -f "$in_mkfile" ] || continue
3540 echo "########################################################################" > "$mkfile"
3541 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3542 echo "########################################################################" >> "$mkfile"
3545 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3546 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3547 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3549 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3550 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3553 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3554 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3555 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3556 setBootstrapVariable QMAKE_CFLAGS
3557 setBootstrapVariable QMAKE_CXXFLAGS
3558 setBootstrapVariable QMAKE_LFLAGS
3560 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3561 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3562 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3564 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3565 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3566 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3567 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3568 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3569 elif [ "$CFG_DEBUG" = "yes" ]; then
3570 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3571 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3572 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3573 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3576 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3577 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3578 for rpath in $RPATH_FLAGS; do
3579 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3582 if [ "$BUILD_ON_MAC" = "yes" ]; then
3583 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3584 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3585 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3586 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3587 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3588 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3589 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3590 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3591 if [ '!' -z "$CFG_SDK" ]; then
3592 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3593 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3594 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3595 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3596 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3599 if [ '!' -z "$D_FLAGS" ]; then
3600 for DEF in $D_FLAGS; do
3601 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3604 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3605 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3606 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3607 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3609 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3610 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3611 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3612 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3613 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3614 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3615 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3616 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3617 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3618 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3620 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3621 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3622 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3623 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3628 QMAKE_BUILD_ERROR=no
3629 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3630 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3631 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3632 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3635 #-------------------------------------------------------------------------------
3637 #-------------------------------------------------------------------------------
3638 if [ -z "$PKG_CONFIG" ]; then
3639 # See if PKG_CONFIG is set in the mkspec:
3640 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3642 if [ -z "$PKG_CONFIG" ]; then
3643 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3646 if [ "$CFG_PKGCONFIG" = "no" ]; then
3648 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3650 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3651 echo >&2 "a correctly setup pkg-config environment!"
3653 elif [ -n "$PKG_CONFIG" ]; then
3654 # found a pkg-config
3655 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3656 # when xcompiling, check environment to see if it's actually usable
3657 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3658 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3659 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3660 export PKG_CONFIG_LIBDIR
3661 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3662 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3663 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3664 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3665 echo >&2 "Set this variable to the directory that contains target .pc files"
3666 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3667 echo >&2 "use -force-pkg-config to override this test."
3671 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3674 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3675 if [ -n "$CFG_SYSROOT" ]; then
3676 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3677 export PKG_CONFIG_SYSROOT_DIR
3678 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3679 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3680 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3681 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3682 echo >&2 "or use -force-pkg-config to override this test."
3686 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3690 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3691 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3695 if [ -z "$PKG_CONFIG" ]; then
3696 QT_CONFIG="$QT_CONFIG no-pkg-config"
3699 #-------------------------------------------------------------------------------
3700 # tests that need qmake
3701 #-------------------------------------------------------------------------------
3703 #-------------------------------------------------------------------------------
3704 # determine the target and host architectures
3705 #-------------------------------------------------------------------------------
3707 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3708 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'`
3710 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3711 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3712 # Do the same test again, using the host compiler
3713 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'`
3714 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3716 # not cross compiling, host == target
3717 CFG_HOST_ARCH="$CFG_ARCH"
3720 if [ "$OPT_VERBOSE" = "yes" ]; then
3721 echo "System architecture: '$CFG_ARCH'"
3722 echo "Host architecture: '$CFG_HOST_ARCH'"
3725 #-------------------------------------------------------------------------------
3726 # functionality tests
3727 #-------------------------------------------------------------------------------
3729 # detect availability of float math.h functions
3730 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3731 CFG_USE_FLOATMATH=yes
3733 CFG_USE_FLOATMATH=no
3736 # detect mmx support
3737 if [ "${CFG_MMX}" = "auto" ]; then
3738 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
3745 # detect 3dnow support
3746 if [ "${CFG_3DNOW}" = "auto" ]; then
3747 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
3754 # detect sse support
3755 if [ "${CFG_SSE}" = "auto" ]; then
3756 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
3763 # detect sse2 support
3764 if [ "${CFG_SSE2}" = "auto" ]; then
3765 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3772 # detect sse3 support
3773 if [ "${CFG_SSE3}" = "auto" ]; then
3774 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3781 # detect ssse3 support
3782 if [ "${CFG_SSSE3}" = "auto" ]; then
3783 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3790 # detect sse4.1 support
3791 if [ "${CFG_SSE4_1}" = "auto" ]; then
3792 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
3799 # detect sse4.2 support
3800 if [ "${CFG_SSE4_2}" = "auto" ]; then
3801 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
3808 # detect avx support
3809 if [ "${CFG_AVX}" = "auto" ]; then
3810 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
3817 # check iWMMXt support
3818 if [ "$CFG_IWMMXT" = "yes" ]; then
3819 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
3820 if [ $? != "0" ]; then
3821 echo "The iWMMXt functionality test failed!"
3822 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3827 # detect neon support
3828 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3829 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
3834 elif [ "$CFG_ARCH" != "arm" ]; then
3838 # detect mips_dsp support
3839 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3845 # detect mips_dspr2 support
3846 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3852 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3855 if [ "$CFG_ZLIB" = "no" ]; then
3856 # Note: Qt no longer support builds without zlib
3857 # So we force a "no" to be "auto" here.
3858 # If you REALLY really need no zlib support, you can still disable
3859 # it by doing the following:
3860 # add "no-zlib" to mkspecs/qconfig.pri
3861 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3863 # There's no guarantee that Qt will build under those conditions
3868 if [ "$CFG_ZLIB" = "auto" ]; then
3869 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
3876 if [ "$CFG_LARGEFILE" = "auto" ]; then
3877 #Large files should be enabled for all Linux systems
3881 if [ "$CFG_GUI" = "no" ]; then
3882 QPA_PLATFORM_GUARD=no
3885 # detect how jpeg should be built
3886 if [ "$CFG_JPEG" = "auto" ]; then
3887 if [ "$CFG_SHARED" = "yes" ]; then
3894 if [ "$CFG_LIBJPEG" = "auto" ]; then
3895 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
3902 # detect how gif should be built
3903 if [ "$CFG_GIF" = "auto" ]; then
3904 if [ "$CFG_SHARED" = "yes" ]; then
3912 if [ "$CFG_LIBPNG" = "auto" ]; then
3913 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
3920 # detect accessibility
3921 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3922 CFG_ACCESSIBILITY=yes
3925 if [ "$CFG_EGLFS" = "yes" ]; then
3926 if [ "$CFG_EGL" = "no" ]; then
3927 echo "The EGLFS plugin requires EGL support and cannot be built"
3933 # auto-detect SQL-modules support
3934 for _SQLDR in $CFG_SQL_AVAILABLE; do
3937 if [ "$CFG_SQL_mysql" != "no" ]; then
3938 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3939 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3940 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3941 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3942 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3943 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3944 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3946 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3947 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3948 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3949 echo " You need MySql 4 or higher."
3950 echo " If you believe this message is in error you may use the continue"
3951 echo " switch (-continue) to $0 to continue."
3956 QT_LFLAGS_MYSQL_R=""
3960 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
3961 QMakeVar add CONFIG use_libmysqlclient_r
3962 if [ "$CFG_SQL_mysql" = "auto" ]; then
3963 CFG_SQL_mysql=plugin
3965 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3966 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
3967 if [ "$CFG_SQL_mysql" = "auto" ]; then
3968 CFG_SQL_mysql=plugin
3971 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3972 echo "MySQL support cannot be enabled due to functionality tests!"
3973 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3974 echo " If you believe this message is in error you may use the continue"
3975 echo " switch (-continue) to $0 to continue."
3980 QT_LFLAGS_MYSQL_R=""
3988 if [ "$CFG_SQL_psql" != "no" ]; then
3989 # Be careful not to use native pg_config when cross building.
3990 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
3991 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
3992 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
3994 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
3995 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
3996 # But, respect PSQL_LIBS if set
3997 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
3998 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
3999 if [ "$CFG_SQL_psql" = "auto" ]; then
4003 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4004 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4005 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4006 echo " If you believe this message is in error you may use the continue"
4007 echo " switch (-continue) to $0 to continue."
4018 if [ "$CFG_SQL_odbc" != "no" ]; then
4019 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
4020 if [ "$CFG_SQL_odbc" = "auto" ]; then
4024 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
4025 QT_LFLAGS_ODBC="-liodbc"
4026 if [ "$CFG_SQL_odbc" = "auto" ]; then
4030 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4031 echo "ODBC support cannot be enabled due to functionality tests!"
4032 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4033 echo " If you believe this message is in error you may use the continue"
4034 echo " switch (-continue) to $0 to continue."
4044 if [ "$CFG_SQL_oci" != "no" ]; then
4045 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
4046 if [ "$CFG_SQL_oci" = "auto" ]; then
4050 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4051 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4052 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4053 echo " If you believe this message is in error you may use the continue"
4054 echo " switch (-continue) to $0 to continue."
4063 if [ "$CFG_SQL_tds" != "no" ]; then
4064 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4065 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4066 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
4067 if [ "$CFG_SQL_tds" = "auto" ]; then
4071 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4072 echo "TDS support cannot be enabled due to functionality tests!"
4073 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4074 echo " If you believe this message is in error you may use the continue"
4075 echo " switch (-continue) to $0 to continue."
4084 if [ "$CFG_SQL_db2" != "no" ]; then
4085 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
4086 if [ "$CFG_SQL_db2" = "auto" ]; then
4090 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4091 echo "ODBC support cannot be enabled due to functionality tests!"
4092 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4093 echo " If you believe this message is in error you may use the continue"
4094 echo " switch (-continue) to $0 to continue."
4103 if [ "$CFG_SQL_ibase" != "no" ]; then
4104 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
4105 if [ "$CFG_SQL_ibase" = "auto" ]; then
4106 CFG_SQL_ibase=plugin
4109 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4110 echo "InterBase support cannot be enabled due to functionality tests!"
4111 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4112 echo " If you believe this message is in error you may use the continue"
4113 echo " switch (-continue) to $0 to continue."
4122 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4123 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
4124 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4125 CFG_SQL_sqlite2=plugin
4128 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4129 echo "SQLite2 support cannot be enabled due to functionality tests!"
4130 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4131 echo " If you believe this message is in error you may use the continue"
4132 echo " switch (-continue) to $0 to continue."
4141 if [ "$CFG_SQL_sqlite" != "no" ]; then
4142 SQLITE_AUTODETECT_FAILED="no"
4143 if [ "$CFG_SQLITE" = "system" ]; then
4144 if [ -n "$PKG_CONFIG" ]; then
4145 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4146 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4148 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
4149 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4150 CFG_SQL_sqlite=plugin
4152 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4154 SQLITE_AUTODETECT_FAILED="yes"
4157 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4158 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4159 CFG_SQL_sqlite=plugin
4162 SQLITE_AUTODETECT_FAILED="yes"
4166 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4167 echo "SQLite support cannot be enabled due to functionality tests!"
4168 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4169 echo " If you believe this message is in error you may use the continue"
4170 echo " switch (-continue) to $0 to continue."
4176 if [ "$OPT_VERBOSE" = "yes" ]; then
4177 echo "unknown SQL driver: $_SQLDR"
4183 # auto-detect NIS support
4184 if [ "$CFG_NIS" != "no" ]; then
4185 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
4188 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4189 echo "NIS support cannot be enabled due to functionality tests!"
4190 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4191 echo " If you believe this message is in error you may use the continue"
4192 echo " switch (-continue) to $0 to continue."
4200 # auto-detect CUPS support
4201 if [ "$CFG_CUPS" != "no" ]; then
4202 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
4205 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4206 echo "Cups support cannot be enabled due to functionality tests!"
4207 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4208 echo " If you believe this message is in error you may use the continue"
4209 echo " switch (-continue) to $0 to continue."
4217 # auto-detect iconv(3) support
4218 if [ "$CFG_ICONV" != "no" ]; then
4219 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4221 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
4223 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
4225 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
4228 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4229 echo "Iconv support cannot be enabled due to functionality tests!"
4230 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4231 echo " If you believe this message is in error you may use the continue"
4232 echo " switch (-continue) to $0 to continue."
4240 # auto-detect libdbus-1 support
4241 if [ "$CFG_DBUS" != "no" ]; then
4242 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4243 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4244 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4246 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
4247 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4248 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4249 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4251 if [ "$CFG_DBUS" = "auto" ]; then
4253 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4254 # CFG_DBUS is "yes" or "linked" here
4256 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4257 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4258 echo " If you believe this message is in error you may use the continue"
4259 echo " switch (-continue) to $0 to continue."
4265 # auto-detect Glib support
4266 if [ "$CFG_GLIB" != "no" ]; then
4267 if [ -n "$PKG_CONFIG" ]; then
4268 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4269 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4271 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
4273 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4274 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4276 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4277 echo "Glib support cannot be enabled due to functionality tests!"
4278 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4279 echo " If you believe this message is in error you may use the continue"
4280 echo " switch (-continue) to $0 to continue."
4289 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4290 if [ -n "$PKG_CONFIG" ]; then
4291 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4292 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4294 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
4296 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4297 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4299 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4300 echo "Gstreamer support cannot be enabled due to functionality tests!"
4301 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4302 echo " If you believe this message is in error you may use the continue"
4303 echo " switch (-continue) to $0 to continue."
4309 elif [ "$CFG_GLIB" = "no" ]; then
4313 # auto-detect libicu support
4314 if [ "$CFG_ICU" != "no" ]; then
4315 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4316 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4318 if [ "$CFG_ICU" = "auto" ]; then
4320 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4323 echo "The ICU library support cannot be enabled."
4324 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4325 echo " If you believe this message is in error you may use the continue"
4326 echo " switch (-continue) to $0 to continue."
4332 # Auto-detect PulseAudio support
4333 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4334 if [ -n "$PKG_CONFIG" ]; then
4335 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4336 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4338 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
4340 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4341 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4343 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4344 echo "PulseAudio support cannot be enabled due to functionality tests!"
4345 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4346 echo " If you believe this message is in error you may use the continue"
4347 echo " switch (-continue) to $0 to continue."
4356 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4357 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4358 if [ "$CFG_GUI" = "no" ]; then
4359 if [ "$CFG_OPENGL" = "auto" ]; then
4362 if [ "$CFG_OPENGL" != "no" ]; then
4363 echo "OpenGL enabled, but GUI disabled."
4364 echo " You might need to either enable the GUI or disable OpenGL"
4368 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4369 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4371 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
4374 if [ "$CFG_OPENGL" = "yes" ]; then
4375 echo "All the OpenGL functionality tests failed!"
4376 echo " You might need to modify the include and library search paths by editing"
4377 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4378 echo " ${XQMAKESPEC}."
4385 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4386 if [ "$CFG_OPENGL" = "desktop" ]; then
4387 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4388 if [ $? != "0" ]; then
4389 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4396 elif [ "$CFG_OPENGL" = "es2" ]; then
4398 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4399 if [ $? != "0" ]; then
4400 echo "The OpenGL ES 2.0 functionality test failed!"
4401 echo " You might need to modify the include and library search paths by editing"
4402 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4403 echo " ${XQMAKESPEC}."
4406 elif [ "$CFG_OPENGL" = "desktop" ]; then
4407 # Desktop OpenGL support
4408 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4409 if [ $? != "0" ]; then
4410 echo "The OpenGL functionality test failed!"
4411 echo " You might need to modify the include and library search paths by editing"
4412 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4413 echo " ${XQMAKESPEC}."
4418 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4419 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4420 if [ $? != "0" ]; then
4421 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4428 fi # X11/MINGW OpenGL
4430 if [ "$BUILD_ON_MAC" = "yes" ]; then
4431 if [ "$CFG_PHONON" != "no" ]; then
4432 # Always enable Phonon (unless it was explicitly disabled)
4436 if [ "$CFG_COREWLAN" = "auto" ]; then
4437 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
4445 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4446 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4447 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4449 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
4452 if [ "$CFG_OPENGL" = "yes" ]; then
4453 echo "All the OpenGL functionality tests failed!"
4454 echo " You might need to modify the include and library search paths by editing"
4455 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4456 echo " ${XQMAKESPEC}."
4461 elif [ "$CFG_OPENGL" = "es2" ]; then
4463 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4464 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4465 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4466 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4467 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4468 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4469 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4470 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4473 "$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
4474 if [ $? != "0" ]; then
4475 echo "The OpenGL ES 2.0 functionality test failed!"
4476 echo " You might need to modify the include and library search paths by editing"
4477 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4478 echo " ${XQMAKESPEC}."
4481 elif [ "$CFG_OPENGL" = "desktop" ]; then
4482 # Desktop OpenGL support
4483 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4484 if [ $? != "0" ]; then
4485 echo "The OpenGL functionality test failed!"
4486 echo " You might need to modify the include and library search paths by editing"
4487 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4488 echo " ${XQMAKESPEC}."
4493 # auto-detect FontConfig support
4494 if [ "$CFG_FONTCONFIG" != "no" ]; then
4495 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4496 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4497 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4499 QT_CFLAGS_FONTCONFIG=
4500 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4502 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
4503 QT_CONFIG="$QT_CONFIG fontconfig"
4504 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4505 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4506 CFG_LIBFREETYPE=system
4511 # Save these for a check later
4512 ORIG_CFG_XCB="$CFG_XCB"
4513 ORIG_CFG_EGLFS="$CFG_EGLFS"
4514 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4516 if [ "$CFG_LIBUDEV" != "no" ]; then
4517 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4518 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4519 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4520 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4521 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4523 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
4525 QT_CONFIG="$QT_CONFIG libudev"
4526 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4527 echo "The libudev functionality test failed!"
4531 QMakeVar add DEFINES QT_NO_LIBUDEV
4535 if [ "$CFG_EVDEV" != "no" ]; then
4536 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
4538 QT_CONFIG="$QT_CONFIG evdev"
4539 elif [ "$CFG_EVDEV" = "yes" ]; then
4540 echo "The evdev functionality test failed!"
4544 QMakeVar add DEFINES QT_NO_EVDEV
4548 # Check we actually have X11 :-)
4549 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS; then
4550 QT_CONFIG="$QT_CONFIG xlib"
4553 # auto-detect Xrender support
4554 if [ "$CFG_XRENDER" != "no" ]; then
4555 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS; then
4557 QT_CONFIG="$QT_CONFIG xrender"
4559 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4560 echo "Xrender support cannot be enabled due to functionality tests!"
4561 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4562 echo " If you believe this message is in error you may use the continue"
4563 echo " switch (-continue) to $0 to continue."
4571 if [ "$CFG_XCB" != "no" ]; then
4572 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4573 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4574 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4576 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
4578 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
4579 QT_CONFIG="$QT_CONFIG xcb-render"
4582 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
4584 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4587 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
4588 QT_CONFIG="$QT_CONFIG xcb-xlib"
4591 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4592 # auto-detect XInput2/Xinput support
4593 if [ "$CFG_XINPUT2" != "no" ]; then
4594 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4598 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4599 echo "XInput2 support cannot be enabled due to functionality tests!"
4600 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4601 echo " If you believe this message is in error you may use the continue"
4602 echo " switch (-continue) to $0 to continue."
4611 if [ "$CFG_XCB" = "yes" ]; then
4612 echo "The XCB test failed!"
4613 echo " You might need to install dependency packages."
4614 echo " See src/plugins/platforms/xcb/README."
4618 QMakeVar add DEFINES QT_NO_XCB
4622 if [ "$CFG_DIRECTFB" != "no" ]; then
4623 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4624 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4625 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4626 QT_CONFIG="$QT_CONFIG directfb"
4632 # Detect libxkbcommon
4633 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4634 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4635 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4636 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4637 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4639 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4643 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4644 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4645 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4646 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4647 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4648 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4649 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4650 fi # detect EGL support
4651 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
4653 elif [ "$CFG_EGL" = "yes" ]; then
4654 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4655 echo " You might need to modify the include and library search paths by editing"
4656 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4661 elif [ "$CFG_OPENGL" = "desktop" ]; then
4662 if [ "$CFG_EGL" = "yes" ]; then
4663 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4664 echo "Either disable EGL support or enable OpenGL ES support."
4670 if [ "$CFG_EGLFS" != "no" ]; then
4671 CFG_EGLFS="$CFG_EGL"
4674 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4675 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4676 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4677 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4679 if [ -n "$QMAKE_CFLAGS_DIRECTFB" ] || [ -n "$QMAKE_LIBS_DIRECTFB" ]; then
4680 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4681 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4684 if [ "$BUILD_ON_MAC" = "yes" ]; then
4685 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
4686 QT_CONFIG="$QT_CONFIG coreservices"
4688 QMakeVar add DEFINES QT_NO_CORESERVICES
4692 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
4693 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4694 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4695 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4696 echo "No QPA platform plugin enabled!"
4697 echo " If you really want to build without a QPA platform plugin you must pass"
4698 echo " -no-xcb, -no-eglfs and -no-directfb to configure. Doing this will"
4699 echo " produce a Qt that cannot run GUI applications."
4700 echo " The dependencies needed for xcb to build are listed in"
4701 echo " src/plugins/platforms/xcb/README"
4707 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4710 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4711 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4712 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
4713 CFG_LIBFREETYPE=system
4720 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4724 if [ "$CFG_STL" != "no" ]; then
4725 if [ "$HAVE_STL" = "yes" ]; then
4728 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4729 echo "STL support cannot be enabled due to functionality tests!"
4730 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4731 echo " If you believe this message is in error you may use the continue"
4732 echo " switch (-continue) to $0 to continue."
4740 # detect POSIX clock_gettime()
4741 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4742 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
4743 CFG_CLOCK_GETTIME=yes
4745 CFG_CLOCK_GETTIME=no
4749 # detect POSIX monotonic clocks
4750 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4751 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
4752 CFG_CLOCK_MONOTONIC=yes
4754 CFG_CLOCK_MONOTONIC=no
4756 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4757 CFG_CLOCK_MONOTONIC=no
4761 if [ "$CFG_MREMAP" = "auto" ]; then
4762 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
4769 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4770 if [ "$CFG_GETADDRINFO" != "no" ]; then
4771 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
4774 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4775 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4776 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4777 echo " If you believe this message is in error you may use the continue"
4778 echo " switch (-continue) to $0 to continue."
4786 # find if the platform provides inotify
4787 if [ "$CFG_INOTIFY" != "no" ]; then
4788 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
4791 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4792 echo "inotify support cannot be enabled due to functionality tests!"
4793 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4794 echo " If you believe this message is in error you may use the continue"
4795 echo " switch (-continue) to $0 to continue."
4803 # find if the platform provides if_nametoindex (ipv6 interface name support)
4804 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4805 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
4808 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4809 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4810 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4811 echo " If you believe this message is in error you may use the continue"
4812 echo " switch (-continue) to $0 to continue."
4820 # find if the platform provides getifaddrs (network interface enumeration)
4821 if [ "$CFG_GETIFADDRS" != "no" ]; then
4822 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
4825 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4826 echo "getifaddrs support cannot be enabled due to functionality tests!"
4827 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4828 echo " If you believe this message is in error you may use the continue"
4829 echo " switch (-continue) to $0 to continue."
4838 if [ "$CFG_OPENSSL" != "no" ]; then
4839 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
4840 if [ "$CFG_OPENSSL" = "auto" ]; then
4844 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4845 echo "OpenSSL support cannot be enabled due to functionality tests!"
4846 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4847 echo " If you believe this message is in error you may use the continue"
4848 echo " switch (-continue) to $0 to continue."
4857 if [ "$CFG_PCRE" != "qt" ]; then
4858 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
4861 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4862 echo "PCRE support cannot be enabled due to functionality tests!"
4863 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4864 echo " If you believe this message is in error you may use the continue"
4865 echo " switch (-continue) to $0 to continue."
4873 # detect OpenVG support
4874 if [ "$CFG_OPENVG" != "no" ]; then
4875 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
4876 if [ "$CFG_OPENVG" = "auto" ]; then
4879 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
4880 if [ "$CFG_OPENVG" = "auto" ]; then
4883 CFG_OPENVG_ON_OPENGL=yes
4884 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
4885 if [ "$CFG_OPENVG" = "auto" ]; then
4888 CFG_OPENVG_LC_INCLUDES=yes
4889 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
4890 if [ "$CFG_OPENVG" = "auto" ]; then
4893 CFG_OPENVG_LC_INCLUDES=yes
4894 CFG_OPENVG_ON_OPENGL=yes
4896 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4897 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4898 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4899 echo " If you believe this message is in error you may use the continue"
4900 echo " switch (-continue) to $0 to continue."
4906 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
4907 CFG_OPENVG_SHIVA=yes
4911 if [ "$CFG_ALSA" = "auto" ]; then
4912 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
4919 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4920 if [ "$CFG_ARCH" = "arm" ]; then
4921 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
4922 if [ $? != "0" ]; then
4923 CFG_JAVASCRIPTCORE_JIT=no
4926 case "$XPLATFORM" in
4928 CFG_JAVASCRIPTCORE_JIT=no
4934 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
4935 QMakeVar set JAVASCRIPTCORE_JIT yes
4936 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
4937 QMakeVar set JAVASCRIPTCORE_JIT no
4940 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
4941 CFG_AUDIO_BACKEND=yes
4944 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
4945 echo "Warning: largefile support cannot be disabled for win32."
4949 #-------------------------------------------------------------------------------
4950 # ask for all that hasn't been auto-detected or specified in the arguments
4951 #-------------------------------------------------------------------------------
4953 # enable dwarf2 support on Mac
4954 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
4955 QT_CONFIG="$QT_CONFIG dwarf2"
4958 # Detect the default arch (x86 or x86_64) on Mac OS X
4959 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
4961 case `file "${outpath}/bin/qmake"` in
4969 # unsupported/unknown
4973 if [ -n "$DEFAULT_ARCH" ]; then
4974 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
4975 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
4976 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
4977 # Make the application arch follow the Qt arch
4978 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
4983 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
4984 QT_CONFIG="$QT_CONFIG phonon-backend"
4987 # disable accessibility
4988 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
4989 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
4991 QT_CONFIG="$QT_CONFIG accessibility"
4995 if [ "$CFG_EGL" = "yes" ]; then
4996 QT_CONFIG="$QT_CONFIG egl"
4998 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5002 if [ "$CFG_EGLFS" = "yes" ]; then
5003 QT_CONFIG="$QT_CONFIG eglfs"
5005 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5009 if [ "$CFG_OPENVG" = "no" ]; then
5010 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5012 QT_CONFIG="$QT_CONFIG openvg"
5013 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5014 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5016 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5017 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5019 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5020 QT_CONFIG="$QT_CONFIG shivavg"
5021 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5026 if [ "$CFG_OPENGL" = "no" ]; then
5027 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5029 QT_CONFIG="$QT_CONFIG opengl"
5032 if [ "$CFG_OPENGL" = "es2" ]; then
5033 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5036 if [ "$CFG_OPENGL" = "es2" ]; then
5037 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5038 QT_CONFIG="$QT_CONFIG opengles2"
5041 # safe execution environment
5042 if [ "$CFG_SXE" != "no" ]; then
5043 QT_CONFIG="$QT_CONFIG sxe"
5046 # build up the variables for output
5047 if [ "$CFG_DEBUG" = "yes" ]; then
5048 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5049 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5050 elif [ "$CFG_DEBUG" = "no" ]; then
5051 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5052 QMAKE_CONFIG="$QMAKE_CONFIG release"
5054 if [ "$CFG_SHARED" = "yes" ]; then
5055 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5056 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5057 elif [ "$CFG_SHARED" = "no" ]; then
5058 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5059 QMAKE_CONFIG="$QMAKE_CONFIG static"
5062 #FIXME: qpa is implicit this should all be removed
5063 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5064 QT_CONFIG="$QT_CONFIG qpa"
5065 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5066 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5068 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5069 # Do not set this here for Windows. Let qmake do it so
5070 # debug and release precompiled headers are kept separate.
5071 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5073 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5074 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5075 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5076 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5077 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5078 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5080 if [ "$CFG_STL" = "no" ]; then
5081 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5083 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5085 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5086 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5088 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5089 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5090 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5091 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5092 QMakeVar add QMAKE_CFLAGS -g
5093 QMakeVar add QMAKE_CXXFLAGS -g
5094 QT_CONFIG="$QT_CONFIG separate_debug_info"
5096 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5097 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5099 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5100 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5101 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5102 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5103 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5104 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5105 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5106 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5107 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5108 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5109 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5110 if [ "$CFG_ARCH" = "mips" ]; then
5111 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5112 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5114 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5115 QT_CONFIG="$QT_CONFIG clock-gettime"
5117 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5118 QT_CONFIG="$QT_CONFIG clock-monotonic"
5120 if [ "$CFG_MREMAP" = "yes" ]; then
5121 QT_CONFIG="$QT_CONFIG mremap"
5123 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5124 QT_CONFIG="$QT_CONFIG getaddrinfo"
5126 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5127 QT_CONFIG="$QT_CONFIG ipv6ifname"
5129 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5130 QT_CONFIG="$QT_CONFIG getifaddrs"
5132 if [ "$CFG_INOTIFY" = "yes" ]; then
5133 QT_CONFIG="$QT_CONFIG inotify"
5135 if [ "$CFG_LIBJPEG" = "no" ]; then
5137 elif [ "$CFG_LIBJPEG" = "system" ]; then
5138 QT_CONFIG="$QT_CONFIG system-jpeg"
5140 if [ "$CFG_JPEG" = "no" ]; then
5141 QT_CONFIG="$QT_CONFIG no-jpeg"
5142 elif [ "$CFG_JPEG" = "yes" ]; then
5143 QT_CONFIG="$QT_CONFIG jpeg"
5145 if [ "$CFG_LIBPNG" = "no" ]; then
5148 if [ "$CFG_LIBPNG" = "system" ]; then
5149 QT_CONFIG="$QT_CONFIG system-png"
5151 if [ "$CFG_PNG" = "no" ]; then
5152 QT_CONFIG="$QT_CONFIG no-png"
5153 elif [ "$CFG_PNG" = "yes" ]; then
5154 QT_CONFIG="$QT_CONFIG png"
5156 if [ "$CFG_GIF" = "no" ]; then
5157 QT_CONFIG="$QT_CONFIG no-gif"
5158 elif [ "$CFG_GIF" = "yes" ]; then
5159 QT_CONFIG="$QT_CONFIG gif"
5161 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5162 QT_CONFIG="$QT_CONFIG no-freetype"
5163 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5164 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5165 QT_CONFIG="$QT_CONFIG system-freetype"
5167 QT_CONFIG="$QT_CONFIG freetype"
5169 if [ "$CFG_GUI" = "auto" ]; then
5172 if [ "$CFG_GUI" = "no" ]; then
5173 QT_CONFIG="$QT_CONFIG no-gui"
5176 if [ "$CFG_WIDGETS" = "no" ]; then
5177 QT_CONFIG="$QT_CONFIG no-widgets"
5178 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5181 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5182 #On Mac we implicitly link against libz, so we
5183 #never use the 3rdparty stuff.
5184 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5186 if [ "$CFG_ZLIB" = "yes" ]; then
5187 QT_CONFIG="$QT_CONFIG zlib"
5188 elif [ "$CFG_ZLIB" = "system" ]; then
5189 QT_CONFIG="$QT_CONFIG system-zlib"
5192 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5193 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5194 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5195 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5196 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5197 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5198 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5199 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5200 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5201 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5202 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5203 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5204 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5205 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5207 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5208 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5209 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5211 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5212 if [ "$CFG_RPATH" = "yes" ]; then
5213 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5214 # set the default rpath to the library installation directory
5215 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5217 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5218 if [ -n "$RPATH_FLAGS" ]; then
5220 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5224 elif [ "$CFG_RPATH" = "yes" ]; then
5225 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5229 if [ "$CFG_RPATH" = "yes" ]; then
5230 # set the default rpath to the library installation directory
5231 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5233 if [ -n "$RPATH_FLAGS" ]; then
5234 # add the user defined rpaths
5235 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5239 if [ '!' -z "$I_FLAGS" ]; then
5240 # add the user define include paths
5241 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5242 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5245 if [ '!' -z "$W_FLAGS" ]; then
5246 # add the user defined warning flags
5247 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5248 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5249 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5252 # turn off exceptions for the compilers that support it
5253 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5254 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5256 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5259 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5260 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5263 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5264 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5265 # Follow default behavior of configure.exe by overriding with "rtti".
5266 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5269 if [ "$CFG_ALSA" = "yes" ]; then
5270 QT_CONFIG="$QT_CONFIG alsa"
5273 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5274 QT_CONFIG="$QT_CONFIG pulseaudio"
5277 if [ "$CFG_COREWLAN" = "yes" ]; then
5278 QT_CONFIG="$QT_CONFIG corewlan"
5281 if [ "$CFG_ICU" = "yes" ]; then
5282 QT_CONFIG="$QT_CONFIG icu"
5285 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5286 QT_CONFIG="$QT_CONFIG force_asserts"
5289 if [ "$CFG_PCRE" = "qt" ]; then
5290 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5294 # Some Qt modules are too advanced in C++ for some old compilers
5295 # Detect here the platforms where they are known to work.
5297 # See Qt documentation for more information on which features are
5298 # supported and on which compilers.
5300 canBuildQtConcurrent="yes"
5301 canUseV8Snapshot="yes"
5303 case "$XPLATFORM" in
5305 # PA-RISC's assembly is too limited
5306 # gcc 3.4 on that platform can't build QtXmlPatterns
5307 # the assembly it generates cannot be compiled
5309 # Check gcc's version
5310 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5314 canBuildQtXmlPatterns="no"
5318 canBuildQtXmlPatterns="no"
5322 unsupported/vxworks-*-g++*)
5325 unsupported/vxworks-*-dcc*)
5327 canBuildQtXmlPatterns="no"
5330 # Check gcc's version
5331 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5339 canBuildQtXmlPatterns="no"
5344 # Check the compiler version
5345 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5348 canBuildQtXmlPatterns="no"
5349 canBuildQtConcurrent="no"
5353 canBuildQtConcurrent="no"
5359 canBuildQtXmlPatterns="no"
5360 canBuildQtConcurrent="no"
5366 # Get the xlC version
5367 cat > xlcver.c <<EOF
5371 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5376 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5377 xlcver=`./xlcver 2>/dev/null`
5380 if [ "$OPT_VERBOSE" = "yes" ]; then
5381 if [ -n "$xlcver" ]; then
5382 echo Found IBM xlC version: $xlcver.
5384 echo Could not determine IBM xlC version, assuming oldest supported.
5391 canBuildQtXmlPatterns="no"
5392 canBuildQtConcurrent="no"
5396 canBuildQtConcurrent="no"
5402 canBuildQtConcurrent="no"
5406 if [ "$CFG_GUI" = "no" ]; then
5407 # WebKit requires QtGui
5411 if [ "$CFG_SHARED" = "no" ]; then
5413 echo "WARNING: Using static linking will disable the WebKit module."
5418 CFG_CONCURRENT="yes"
5419 if [ "$canBuildQtConcurrent" = "no" ]; then
5420 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5423 QT_CONFIG="$QT_CONFIG concurrent"
5427 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5428 QT_CONFIG="$QT_CONFIG audio-backend"
5432 if [ "$CFG_WEBKIT" = "debug" ]; then
5433 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5437 QT_CONFIG="$QT_CONFIG v8"
5438 # Detect snapshot support
5439 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5440 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5443 *) canUseV8Snapshot="no"
5447 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5448 # QEMU crashes when building inside Scratchbox with an ARM target
5449 canUseV8Snapshot="no"
5452 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5453 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5455 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5456 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5459 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5460 QT_CONFIG="$QT_CONFIG v8snapshot"
5464 if [ "$CFG_QML_DEBUG" = "no" ]; then
5465 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5468 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5471 QMakeVar add QMAKE_CFLAGS -fno-exceptions
5472 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
5473 QMakeVar add QMAKE_LFLAGS -fno-exceptions
5478 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
5479 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
5480 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
5487 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
5493 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5495 case "$COMPILER_VERSION" in
5497 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5498 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5499 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5502 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5503 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5504 QT_GCC_PATCH_VERSION=0
5514 #-------------------------------------------------------------------------------
5515 # part of configuration information goes into qconfig.h
5516 #-------------------------------------------------------------------------------
5518 case "$CFG_QCONFIG" in
5520 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5523 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5524 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5525 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5526 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5527 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5528 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5530 echo "#endif" >>"$tmpconfig"
5534 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5538 # define QT_EDITION $QT_EDITION
5542 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5543 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5545 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5546 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5549 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5550 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5553 if [ "$BUILD_ON_MAC" = "yes" ]; then
5554 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5555 #if defined(__LP64__)
5556 # define QT_POINTER_SIZE 8
5558 # define QT_POINTER_SIZE 4
5562 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5563 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5566 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5567 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5568 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5572 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5574 if [ "$CFG_DEV" = "yes" ]; then
5575 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5578 # Add QPA to config.h
5579 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5581 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5582 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5585 # Add turned on SQL drivers
5586 for DRIVER in $CFG_SQL_AVAILABLE; do
5587 eval "VAL=\$CFG_SQL_$DRIVER"
5590 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5591 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5592 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5595 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5601 QMakeVar set sql-drivers "$SQL_DRIVERS"
5602 QMakeVar set sql-plugins "$SQL_PLUGINS"
5604 # Add other configuration options to the qconfig.h file
5605 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5606 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5607 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5608 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5609 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
5610 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5611 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5613 # X11/Unix/Mac only configs
5614 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5615 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5616 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5617 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5618 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5619 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5620 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5621 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5622 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5623 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5624 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5625 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5626 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5627 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5629 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5630 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5631 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5632 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5633 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5634 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5635 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5636 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5637 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5638 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5639 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5640 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5641 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5643 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5644 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5645 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5646 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5647 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5648 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5649 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5650 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5652 # sort QCONFIG_FLAGS for neatness if we can
5653 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5654 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5656 if [ -n "$QCONFIG_FLAGS" ]; then
5657 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5658 #ifndef QT_BOOTSTRAPPED
5661 for cfg in $QCONFIG_FLAGS; do
5662 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5663 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5664 # figure out define logic, so we can output the correct
5665 # ifdefs to override the global defines in a project
5667 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5668 # QT_NO_option can be forcefully turned on by QT_option
5669 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5670 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5671 # QT_option can be forcefully turned off by QT_NO_option
5672 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5675 if [ -z $cfgdNeg ]; then
5676 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5683 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5684 #if defined($cfgd) && defined($cfgdNeg)
5686 #elif !defined($cfgd) && !defined($cfgdNeg)
5693 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5694 #endif // QT_BOOTSTRAPPED
5699 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5700 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5701 #define QT_VISIBILITY_AVAILABLE
5706 if [ -n "$QT_LIBINFIX" ]; then
5707 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5708 #define QT_LIBINFIX "$QT_LIBINFIX"
5713 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5714 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5715 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5717 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5718 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5719 chmod -w "$outpath/src/corelib/global/qconfig.h"
5720 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5721 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5725 #-------------------------------------------------------------------------------
5726 # save configuration into qconfig.pri
5727 #-------------------------------------------------------------------------------
5728 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5729 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5730 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5731 if [ "$CFG_DEBUG" = "yes" ]; then
5732 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5733 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5734 QT_CONFIG="$QT_CONFIG release"
5736 QT_CONFIG="$QT_CONFIG debug"
5737 elif [ "$CFG_DEBUG" = "no" ]; then
5738 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5739 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5740 QT_CONFIG="$QT_CONFIG debug"
5742 QT_CONFIG="$QT_CONFIG release"
5744 if [ "$CFG_STL" = "yes" ]; then
5745 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
5747 if [ "$CFG_FRAMEWORK" = "no" ]; then
5748 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5750 QT_CONFIG="$QT_CONFIG qt_framework"
5751 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5753 if [ "$CFG_DEV" = "yes" ]; then
5754 QT_CONFIG="$QT_CONFIG private_tests"
5757 cat >>"$QTCONFIG.tmp" <<EOF
5759 CONFIG += $QTCONFIG_CONFIG
5761 QT_HOST_ARCH = $CFG_HOST_ARCH
5762 QT_EDITION = $Edition
5763 QT_CONFIG += $QT_CONFIG
5766 QT_VERSION = $QT_VERSION
5767 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5768 QT_MINOR_VERSION = $QT_MINOR_VERSION
5769 QT_PATCH_VERSION = $QT_PATCH_VERSION
5772 QT_LIBINFIX = $QT_LIBINFIX
5773 QT_NAMESPACE = $QT_NAMESPACE
5776 if [ -n "$CFG_SYSROOT" ]; then
5777 echo "# sysroot" >>"$QTCONFIG.tmp"
5778 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5779 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5780 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5781 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5782 echo "}" >> "$QTCONFIG.tmp"
5783 echo >> "$QTCONFIG.tmp"
5785 if [ -n "$RPATH_FLAGS" ]; then
5786 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5788 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5789 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5790 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5791 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5794 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5795 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5796 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5799 # replace qconfig.pri if it differs from the newly created temp file
5800 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5801 rm -f "$QTCONFIG.tmp"
5803 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5806 #-------------------------------------------------------------------------------
5807 # save configuration into qmodule.pri
5808 #-------------------------------------------------------------------------------
5809 QTMODULE="$outpath/mkspecs/qmodule.pri"
5811 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
5813 # Ensure we can link to uninistalled libraries
5814 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5815 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5817 if [ -n "$QT_CFLAGS_PSQL" ]; then
5818 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5820 if [ -n "$QT_LFLAGS_PSQL" ]; then
5821 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5823 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5824 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5826 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5827 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5829 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5830 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5832 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5833 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5835 if [ -n "$QT_LFLAGS_ODBC" ]; then
5836 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5838 if [ -n "$QT_LFLAGS_TDS" ]; then
5839 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5842 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5843 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5846 #dump in the OPENSSL_LIBS info
5847 if [ '!' -z "$OPENSSL_LIBS" ]; then
5848 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5849 elif [ "$CFG_OPENSSL" = "linked" ]; then
5850 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5853 #dump in the SDK info
5854 if [ '!' -z "$CFG_SDK" ]; then
5855 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5859 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5860 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5862 # replace qmodule.pri if it differs from the newly created temp file
5863 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5864 rm -f "$QTMODULE.tmp"
5866 mv -f "$QTMODULE.tmp" "$QTMODULE"
5869 #-------------------------------------------------------------------------------
5870 # save configuration into .qmake.cache
5871 #-------------------------------------------------------------------------------
5873 CACHEFILE="$outpath/.qmake.cache"
5874 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5875 cat >>"$CACHEFILE.tmp" <<EOF
5877 QT_SOURCE_TREE = \$\$quote($relpath)
5878 QT_BUILD_TREE = \$\$quote($outpath)
5879 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5881 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5882 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5883 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5885 include(\$\$PWD/mkspecs/qmodule.pri)
5886 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5890 #dump the qmake spec
5891 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5892 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5894 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5897 # replace .qmake.cache if it differs from the newly created temp file
5898 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5899 rm -f "$CACHEFILE.tmp"
5901 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5904 #-------------------------------------------------------------------------------
5905 # give feedback on configuration
5906 #-------------------------------------------------------------------------------
5907 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5911 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5914 This target is using the GNU C++ compiler ($PLATFORM).
5916 Recent versions of this compiler automatically include code for
5917 exceptions, which increase both the size of the Qt libraries and
5918 the amount of memory taken by your applications.
5920 You may choose to re-run `basename $0` with the -no-exceptions
5921 option to compile Qt without exceptions. This is completely binary
5922 compatible, and existing applications will continue to work.
5930 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5933 This target is using the MIPSpro C++ compiler ($PLATFORM).
5935 You may choose to re-run `basename $0` with the -no-exceptions
5936 option to compile Qt without exceptions. This will make the
5937 size of the Qt library smaller and reduce the amount of memory
5938 taken by your applications.
5950 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5951 echo "Build type: $PLATFORM"
5953 echo "Building on: $PLATFORM"
5954 echo "Building for: $XPLATFORM"
5957 echo "Architecture: $CFG_ARCH"
5958 echo "Host architecture: $CFG_HOST_ARCH"
5960 if [ -n "$PLATFORM_NOTES" ]; then
5961 echo "Platform notes:"
5962 echo "$PLATFORM_NOTES"
5967 if [ "$OPT_VERBOSE" = "yes" ]; then
5968 echo $ECHO_N "qmake vars .......... $ECHO_C"
5969 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5970 echo "qmake switches ......... $QMAKE_SWITCHES"
5973 echo "Build .................. $CFG_BUILD_PARTS"
5974 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5975 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5976 echo "Debug .................. yes (combined)"
5977 if [ "$CFG_DEBUG" = "yes" ]; then
5978 echo "Default Link ........... debug"
5980 echo "Default Link ........... release"
5983 echo "Debug .................. $CFG_DEBUG"
5985 if [ -n "$PKG_CONFIG" ]; then
5986 echo "pkg-config ............. yes"
5988 echo "pkg-config ............. no"
5990 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5991 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5992 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5993 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5994 echo "QtGui module ........... $CFG_GUI"
5995 echo "QtWidgets module ....... $CFG_WIDGETS"
5996 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5997 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5999 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6001 echo "QML debugging .......... $CFG_QML_DEBUG"
6002 echo "STL support ............ $CFG_STL"
6003 echo "PCH support ............ $CFG_PRECOMPILE"
6004 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6005 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6006 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6007 echo "AVX..................... ${CFG_AVX}"
6008 elif [ "$CFG_ARCH" = "arm" ]; then
6009 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6010 echo "NEON support ........... ${CFG_NEON}"
6012 if [ "$CFG_ARCH" = "mips" ]; then
6013 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
6015 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6016 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6017 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6018 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6019 echo "NIS support ............ $CFG_NIS"
6020 echo "CUPS support ........... $CFG_CUPS"
6021 echo "Iconv support .......... $CFG_ICONV"
6022 echo "Glib support ........... $CFG_GLIB"
6023 echo "GStreamer support ...... $CFG_GSTREAMER"
6024 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6025 echo "Large File support ..... $CFG_LARGEFILE"
6026 echo "GIF support ............ $CFG_GIF"
6027 if [ "$CFG_JPEG" = "no" ]; then
6028 echo "JPEG support ........... $CFG_JPEG"
6030 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6032 if [ "$CFG_PNG" = "no" ]; then
6033 echo "PNG support ............ $CFG_PNG"
6035 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6037 echo "zlib support ........... $CFG_ZLIB"
6038 echo "Session management ..... $CFG_SM"
6039 echo "libudev support ........ $CFG_LIBUDEV"
6041 if [ "$CFG_OPENGL" = "desktop" ]; then
6042 echo "OpenGL support ......... yes (Desktop OpenGL)"
6043 elif [ "$CFG_OPENGL" = "es2" ]; then
6044 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6046 echo "OpenGL support ......... no"
6049 if [ "$CFG_OPENVG" ]; then
6050 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6051 echo "OpenVG support ......... ShivaVG"
6053 echo "OpenVG support ......... $CFG_OPENVG"
6057 echo "XShape support ......... $CFG_XSHAPE"
6058 echo "XVideo support ......... $CFG_XVIDEO"
6059 echo "XSync support .......... $CFG_XSYNC"
6060 echo "Xinerama support ....... $CFG_XINERAMA"
6061 echo "Xcursor support ........ $CFG_XCURSOR"
6062 echo "Xfixes support ......... $CFG_XFIXES"
6063 echo "Xrandr support ......... $CFG_XRANDR"
6064 echo "Xi support ............. $CFG_XINPUT"
6065 echo "MIT-SHM support ........ $CFG_MITSHM"
6066 echo "FontConfig support ..... $CFG_FONTCONFIG"
6067 echo "XKB Support ............ $CFG_XKB"
6068 echo "immodule support ....... $CFG_IM"
6069 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6071 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6072 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6073 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6074 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6075 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6076 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6077 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6078 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6079 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6082 if [ "$CFG_OPENSSL" = "yes" ]; then
6083 OPENSSL_LINKAGE="(run-time)"
6084 elif [ "$CFG_OPENSSL" = "linked" ]; then
6085 OPENSSL_LINKAGE="(linked)"
6087 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6088 echo "Alsa support ........... $CFG_ALSA"
6089 if [ "$BUILD_ON_MAC" = "yes" ]; then
6090 echo "CoreWlan support ....... $CFG_COREWLAN"
6092 echo "libICU support ......... $CFG_ICU"
6093 echo "PCRE support ........... $CFG_PCRE"
6094 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6095 echo "Xcb support ............ limited (old version)"
6097 echo "Xcb support ............ $CFG_XCB"
6099 echo "Xrender support ........ $CFG_XRENDER"
6100 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6101 echo "XInput2 support ........ $CFG_XINPUT2"
6103 echo "EGLFS support .......... $CFG_EGLFS"
6104 echo "DirectFB support ....... $CFG_DIRECTFB"
6107 # complain about not being able to use dynamic plugins if we are using a static build
6108 if [ "$CFG_SHARED" = "no" ]; then
6110 echo "WARNING: Using static linking will disable the use of dynamically"
6111 echo "loaded plugins. Make sure to import all needed static plugins,"
6112 echo "or compile needed modules into the library."
6115 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6117 echo "NOTE: When linking against OpenSSL, you can override the default"
6118 echo "library names through OPENSSL_LIBS."
6120 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6124 exec 1>&3 3>&- # restore stdout
6125 cat $outpath/config.summary # display config feedback to user
6127 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6129 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6130 echo "if you want a pure debug build."
6135 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6140 #-------------------------------------------------------------------------------
6141 # build makefiles based on the configuration
6142 #-------------------------------------------------------------------------------
6144 echo "Finding project files. Please wait..."
6145 if [ "$CFG_NOPROCESS" != "yes" ]; then
6146 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6147 if [ -f "${relpath}/qtbase.pro" ]; then
6148 mkfile="${outpath}/Makefile"
6149 [ -f "$mkfile" ] && chmod +w "$mkfile"
6150 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6154 # .projects -> projects to process
6155 # .projects.1 -> qt and moc
6156 # .projects.2 -> subdirs and libs
6157 # .projects.3 -> the rest
6158 rm -f .projects .projects.1 .projects.2 .projects.3
6160 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6161 if [ -z "$AWK" ]; then
6162 for p in `echo $QMAKE_PROJECTS`; do
6163 echo "$p" >> .projects
6166 cat >projects.awk <<EOF
6172 first = "./.projects.1.tmp"
6173 second = "./.projects.2.tmp"
6174 third = "./.projects.3.tmp"
6179 if ( ! target_file )
6181 print input_file >target_file
6186 input_file = FILENAME
6191 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6194 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6195 target_file = second
6200 matched_target == 0 && /^(TEMPLATE.*=)/ {
6201 if ( \$3 == "subdirs" )
6202 target_file = second
6203 else if ( \$3 == "lib" )
6209 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6210 if ( \$0 ~ /plugin/ )
6213 target_file = second
6218 if ( ! target_file )
6220 print input_file >>target_file
6227 for p in `echo $QMAKE_PROJECTS`; do
6228 echo "$p" >> .projects.all
6231 # if you get errors about the length of the command line to awk, change the -l arg
6233 split -l 100 .projects.all .projects.all.
6234 for p in .projects.all.*; do
6235 "$AWK" -f projects.awk `cat $p`
6236 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6237 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6238 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6239 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6241 rm -f .projects.all* projects.awk
6243 [ -f .projects.1 ] && cat .projects.1 >>.projects
6244 [ -f .projects.2 ] && cat .projects.2 >>.projects
6245 rm -f .projects.1 .projects.2
6246 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6247 cat .projects.3 >>.projects
6251 # don't sort Qt and MOC in with the other project files
6252 # also work around a segfaulting uniq(1)
6253 if [ -f .sorted.projects.2 ]; then
6254 sort .sorted.projects.2 > .sorted.projects.2.new
6255 mv -f .sorted.projects.2.new .sorted.projects.2
6256 cat .sorted.projects.2 >> .sorted.projects.1
6258 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6259 rm -f .sorted.projects.2 .sorted.projects.1
6263 if [ -f .projects ]; then
6264 uniq .projects >.tmp
6265 mv -f .tmp .projects
6266 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6268 if [ -f .projects.3 ]; then
6269 uniq .projects.3 >.tmp
6270 mv -f .tmp .projects.3
6271 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6273 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6277 for part in $CFG_BUILD_PARTS; do
6279 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6280 libs) PART_ROOTS="$PART_ROOTS src" ;;
6281 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6282 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6287 if [ "$CFG_DEV" = "yes" ]; then
6288 PART_ROOTS="$PART_ROOTS tests"
6291 echo "Creating makefiles. Please wait..."
6292 for file in .projects .projects.3; do
6293 [ '!' -f "$file" ] && continue
6294 for a in `cat $file`; do
6296 for r in $PART_ROOTS; do
6297 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6302 [ "$IN_ROOT" = "no" ] && continue
6305 *winmain/winmain.pro)
6306 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6310 */qmake/qmake.pro) continue ;;
6311 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6312 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6318 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6319 test -d "$dir" || mkdir -p "$dir"
6320 OUTDIR="$outpath/$dir"
6321 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6322 # fast configure - the makefile exists, skip it
6323 # since the makefile exists, it was generated by qmake, which means we
6324 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6326 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6329 QMAKE_SPEC_ARGS="-spec $SPEC"
6330 echo $ECHO_N " for $a$ECHO_C"
6332 QMAKE="$outpath/bin/qmake"
6333 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6334 if [ "$file" = ".projects.3" ]; then
6337 cat >"${OUTDIR}/Makefile" <<EOF
6338 # ${OUTDIR}/Makefile: generated by configure
6340 # WARNING: This makefile will be replaced with a real makefile.
6341 # All changes made to this file will be lost.
6343 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6345 cat >>"${OUTDIR}/Makefile" <<EOF
6347 all clean install qmake first Makefile: FORCE
6348 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6356 if [ "$OPT_VERBOSE" = "yes" ]; then
6357 echo " (`basename $SPEC`)"
6358 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6363 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6364 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6368 rm -f .projects .projects.3
6370 #-------------------------------------------------------------------------------
6371 # check for platforms that we don't yet know about
6372 #-------------------------------------------------------------------------------
6373 if [ "$CFG_ARCH" = "unknown" ]; then
6376 NOTICE: configure was unable to determine the architecture
6377 for the $XQMAKESPEC target.
6379 Qt will not use a specialized implementation for any atomic
6380 operations. Instead a generic implemention based on either GCC
6381 intrinsics or C++11 std::atomic<T> will be used (when
6382 available). The generic implementations are generally as fast
6383 as and always as safe as a specialized implementation.
6385 If no generic implementation is available, Qt will use a
6386 fallback UNIX implementation which uses a single
6387 pthread_mutex_t to protect all atomic operations. This
6388 implementation is the slow (but safe) fallback implementation
6389 for architectures Qt does not yet support.
6393 #-------------------------------------------------------------------------------
6394 # check if the user passed the -no-zlib option, which is no longer supported
6395 #-------------------------------------------------------------------------------
6396 if [ -n "$ZLIB_FORCED" ]; then
6397 which_zlib="supplied"
6398 if [ "$CFG_ZLIB" = "system" ]; then
6404 NOTICE: The -no-zlib option was supplied but is no longer
6407 Qt now requires zlib support in all builds, so the -no-zlib
6408 option was ignored. Qt will be built using the $which_zlib
6413 #-------------------------------------------------------------------------------
6414 # check if the user passed the obsoleted -wayland or -no-wayland flag
6415 #-------------------------------------------------------------------------------
6416 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6419 NOTICE: The -wayland and -no-wayland flags are now obsolete
6421 All configuring of QtWayland plugin and QtCompositor happens in the module
6425 #-------------------------------------------------------------------------------
6426 # check if the user passed the obsoleted -arch or -host-arch options
6427 #-------------------------------------------------------------------------------
6428 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6431 NOTICE: The -arch and -host-arch options are obsolete.
6433 Qt now detects the target and host architectures based on compiler
6434 output. Qt will be built using $CFG_ARCH for the target architecture
6435 and $CFG_HOST_ARCH for the host architecture (note that these two
6436 will be the same unless you are cross-compiling).
6440 #-------------------------------------------------------------------------------
6441 # finally save the executed command to another script
6442 #-------------------------------------------------------------------------------
6443 if [ `basename $0` != "config.status" ]; then
6444 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6446 # add the system variables
6447 for varname in $SYSTEM_VARIABLES; do
6449 'if [ -n "\$'${varname}'" ]; then
6450 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6455 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6457 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6458 echo "#!/bin/sh" > "$outpath/config.status"
6459 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6460 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6461 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6462 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6463 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6464 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6465 echo "else" >> "$outpath/config.status"
6466 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6467 echo "fi" >> "$outpath/config.status"
6468 chmod +x "$outpath/config.status"
6471 if [ -n "$RPATH_MESSAGE" ]; then
6473 echo "$RPATH_MESSAGE"
6476 MAKE=`basename "$MAKE"`
6478 echo Qt is now configured for building. Just run \'$MAKE\'.
6479 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6480 echo Once everything is built, Qt is installed.
6481 echo You should not run \'$MAKE install\'.
6483 echo Once everything is built, you must run \'$MAKE install\'.
6484 echo Qt will be installed into $QT_INSTALL_PREFIX
6487 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.