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
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
134 values["LITERAL_WHITESPACE"] = " "
135 values["LITERAL_DOLLAR"] = "$"
137 /^[_A-Z0-9.]+[ \t]*\+?=/ {
138 valStart = index($0, "=") + 1
141 if (substr($0, valStart - 2, 1) == "+") {
145 variable = substr($0, 0, valStart - 2 - append)
146 value = substr($0, valStart)
147 gsub("[ \t]+", "", variable)
148 gsub("^[ \t]+", "", value)
149 gsub("[ \t]+$", "", value)
152 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
153 ovalue = ovalue substr(value, 1, RSTART - 1)
154 var = substr(value, RSTART + 2, RLENGTH - 2)
155 value = substr(value, RSTART + RLENGTH)
157 var = substr(var, 2, length(var) - 2)
159 ovalue = ovalue values[var]
161 ovalue = ovalue value
163 combinedValue = values[variable]
164 if (append == 1 && length(combinedValue) > 0) {
165 combinedValue = combinedValue " " ovalue
167 combinedValue = ovalue
169 values[variable] = combinedValue
172 for (var in values) {
173 print var "=" values[var]
181 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
184 # relies on $QMAKESPEC being set correctly. parses include statements in
185 # qmake.conf and prints out the expanded file
188 if [ -z "$specvals" ]; then
189 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
191 getQMakeConf3 "$1" "$specvals"
196 if [ -z "$xspecvals" ]; then
197 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
199 getQMakeConf3 "$1" "$xspecvals"
202 # relies on $TEST_COMPILER being set correctly
203 compilerSupportsFlag()
205 cat >conftest.cpp <<EOF
206 int main() { return 0; }
208 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
210 rm -f conftest.cpp conftest.o
214 # relies on $TEST_COMPILER being set correctly
220 safe_flag=`shellEscape "$flag"`
221 lflags=$lflags,$safe_flag
223 compilerSupportsFlag "$lflags" >/dev/null 2>&1
226 #-------------------------------------------------------------------------------
227 # operating system detection
228 #-------------------------------------------------------------------------------
230 # need that throughout the script
231 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
232 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
233 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
234 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
236 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
237 if echo '\c' | grep '\c' >/dev/null; then
243 #-------------------------------------------------------------------------------
244 # window system detection
245 #-------------------------------------------------------------------------------
251 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
256 #-----------------------------------------------------------------------------
257 # Qt version detection
258 #-----------------------------------------------------------------------------
259 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
263 if [ -n "$QT_VERSION" ]; then
264 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
265 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
266 if [ -n "$MAJOR" ]; then
267 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
268 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
269 QT_MAJOR_VERSION="$MAJOR"
270 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
271 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
274 if [ -z "$QT_MAJOR_VERSION" ]; then
275 echo "Cannot process version from qglobal.h: $QT_VERSION"
276 echo "Cannot proceed."
280 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
281 if [ -z "$QT_PACKAGEDATE" ]; then
282 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
283 echo "Cannot proceed"
287 #-------------------------------------------------------------------------------
289 #-------------------------------------------------------------------------------
293 EditionString=Commercial
297 # parse the arguments, setting things to "yes" or "no"
298 while [ "$#" -gt 0 ]; do
302 #Autoconf style options
304 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
308 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
312 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
313 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
316 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
321 # this option may or may not be followed by an argument
322 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
329 -h|help|--help|-help)
330 if [ "$VAL" = "yes" ]; then
332 COMMERCIAL_USER="no" #doesn't matter we will display the help
335 COMMERCIAL_USER="no" #doesn't matter we will display the help
339 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
343 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
350 if [ "$UNKNOWN_ARG" = "yes" ]; then
359 if [ "$PLATFORM_QPA" != "no" ]; then
360 if [ "$PLATFORM_QPA" = "maybe" ]; then
365 echo "No license exists to enable Qt QPA. Disabling."
372 COMMERCIAL_USER="yes"
386 if [ "$COMMERCIAL_USER" = "ask" ]; then
388 echo "Which edition of Qt do you want to use ?"
390 echo "Type 'c' if you want to use the Commercial Edition."
391 echo "Type 'o' if you want to use the Open Source Edition."
395 if [ "$commercial" = "c" ]; then
396 COMMERCIAL_USER="yes"
398 elif [ "$commercial" = "o" ]; then
405 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
406 # Commercial preview release
407 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
410 QT_EDITION="QT_EDITION_DESKTOP"
411 LicenseType="Technology Preview"
412 elif [ $COMMERCIAL_USER = "yes" ]; then
413 # one of commercial editions
414 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
415 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
417 # read in the license file
418 if [ -f "$LICENSE_FILE" ]; then
419 . "$LICENSE_FILE" >/dev/null 2>&1
420 if [ -z "$LicenseKeyExt" ]; then
422 echo "You are using an old license file."
424 echo "Please install the license file supplied by Nokia,"
425 echo "or install the Qt Open Source Edition if you intend to"
426 echo "develop free software."
429 if [ -z "$Licensee" ]; then
431 echo "Invalid license key. Please check the license key."
435 if [ -z "$LicenseKeyExt" ]; then
437 echo $ECHO_N "Please enter your license key: $ECHO_C"
439 Licensee="Unknown user"
444 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
445 && LicenseValid="yes" \
447 if [ "$LicenseValid" != "yes" ]; then
449 echo "Invalid license key. Please check the license key."
452 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
453 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
454 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
455 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
457 # determine which edition we are licensed to use
458 case "$LicenseTypeCode" in
460 LicenseType="Commercial"
464 QT_EDITION="QT_EDITION_UNIVERSAL"
467 Edition="FullFramework"
468 EditionString="Full Framework"
469 QT_EDITION="QT_EDITION_DESKTOP"
472 Edition="GUIFramework"
473 EditionString="GUI Framework"
474 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
479 LicenseType="Evaluation"
480 QMakeVar add DEFINES QT_EVAL
484 QT_EDITION="QT_EDITION_EVALUATION"
489 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
491 echo "Invalid license key. Please check the license key."
495 # verify that we are licensed to use Qt on this platform
497 case "$PlatformCode" in
500 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
504 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
507 ### EMBEDDED_QPA logic missing ###
508 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
509 X9,* | XC,* | XU,* | XW,* | XM,*)
511 LICENSE_EXTENSION="-ALLOS"
513 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
514 # Qt for Embedded Linux
515 LICENSE_EXTENSION="-EMBEDDED"
517 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
519 LICENSE_EXTENSION="-EMBEDDED"
521 FM,*,no | LM,yes,* | ZM,no,no)
523 LICENSE_EXTENSION="-DESKTOP"
527 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
529 echo "You are not licensed for the $Platform platform."
531 echo "Please contact qt-info@nokia.com to upgrade your license to"
532 echo "include the $Platform platform, or install the Qt Open Source Edition"
533 echo "if you intend to develop free software."
538 if test -r "$relpath/.LICENSE"; then
539 # Generic, non-final license
541 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
546 *TECHNOLOGY?PREVIEW*)
553 echo >&2 "Invalid license files; cannot continue"
558 EditionString="$Edition"
559 QT_EDITION="QT_EDITION_DESKTOP"
562 case "$LicenseFeatureCode" in
565 case "$LicenseType" in
567 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
570 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
576 case "$LicenseType" in
578 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
581 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
587 echo "Invalid license key. Please check the license key."
591 case "$LicenseFeatureCode" in
599 if [ '!' -f "$outpath/LICENSE" ]; then
600 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
601 echo "this software has disappeared."
603 echo "Sorry, you are not licensed to use this software."
604 echo "Try re-installing."
608 elif [ $COMMERCIAL_USER = "no" ]; then
609 # Open Source edition - may only be used under the terms of the GPL or LGPL.
610 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
611 Licensee="Open Source"
613 EditionString="Open Source"
614 QT_EDITION="QT_EDITION_OPENSOURCE"
617 #-------------------------------------------------------------------------------
618 # initalize variables
619 #-------------------------------------------------------------------------------
621 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
622 for varname in $SYSTEM_VARIABLES; do
623 qmakevarname="${varname}"
624 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
625 if [ "${varname}" = "LDFLAGS" ]; then
626 qmakevarname="LFLAGS"
627 elif [ "${varname}" = "LD" ]; then
631 'if [ -n "\$'${varname}'" ]; then
632 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
636 # Use CC/CXX to run config.tests
637 mkdir -p "$outpath/config.tests"
638 rm -f "$outpath/config.tests/.qmake.cache"
639 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
641 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
643 # QTDIR may be set and point to an old or system-wide Qt installation
646 # the minimum version of libdbus-1 that we require:
647 MIN_DBUS_1_VERSION=0.93
649 # initalize internal variables
650 CFG_CONFIGURE_EXIT_ON_ERROR=yes
652 CFG_EXCEPTIONS=unspecified
653 CFG_GUI=auto # (yes|no|auto)
679 CFG_OPENVG_LC_INCLUDES=no
680 CFG_OPENVG_SHIVA=auto
681 CFG_OPENVG_ON_OPENGL=auto
687 QT_DEFAULT_BUILD_PARTS="libs examples tests"
691 CFG_AUDIO_BACKEND=auto
693 CFG_DECLARATIVE_DEBUG=yes
694 CFG_JAVASCRIPTCORE_JIT=auto
696 # Target architecture
698 # Host architecture, same as CFG_ARCH when not cross-compiling
700 # Set when the -arch or -host-arch arguments are used
701 OPT_OBSOLETE_HOST_ARG=no
712 CFG_OBSOLETE_WAYLAND=no
725 CFG_SEPARATE_DEBUG_INFO=no
726 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
727 CFG_REDUCE_EXPORTS=auto
737 CFG_REDUCE_RELOCATIONS=auto
739 CFG_ACCESSIBILITY=auto
742 CFG_CLOCK_GETTIME=auto
743 CFG_CLOCK_MONOTONIC=auto
751 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
755 CFG_PREFIX_INSTALL=yes
764 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
765 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
769 OPT_CONFIRM_LICENSE=no
782 QPA_PLATFORM_GUARD=yes
784 # initalize variables used for installation
793 QT_INSTALL_TRANSLATIONS=
802 #flags for SQL drivers
810 QT_LFLAGS_ODBC="-lodbc"
813 # flags for libdbus-1
817 # flags for Glib (X11 only)
821 # flags for GStreamer (X11 only)
825 #-------------------------------------------------------------------------------
826 # check SQL drivers available in this package
827 #-------------------------------------------------------------------------------
829 # opensource version removes some drivers, so force them to be off
835 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
836 for a in "$relpath/src/plugins/sqldrivers/"*; do
838 base_a=`basename "$a"`
839 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
840 eval "CFG_SQL_${base_a}=auto"
845 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
846 if [ -d "$relpath/src/plugins/imageformats" ]; then
847 for a in "$relpath/src/plugins/imageformats/"*; do
849 base_a=`basename "$a"`
850 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
855 #-------------------------------------------------------------------------------
856 # parse command line arguments
857 #-------------------------------------------------------------------------------
859 # parse the arguments, setting things to "yes" or "no"
860 while [ "$#" -gt 0 ]; do
864 #Autoconf style options
866 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
870 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
874 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
875 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
878 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
882 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
886 -no-*-*|-plugin-*-*|-qt-*-*)
887 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
888 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
892 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
895 #Qt style yes options
896 -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|-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|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
897 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
900 #Qt style options that pass an argument
902 if [ "$PLATFORM_QPA" != "yes" ]; then
904 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
908 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
912 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
913 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
917 #Qt style complex options in one command
918 -enable-*|-disable-*)
919 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
920 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
922 #Qt Builtin/System style options
923 -no-*|-system-*|-qt-*)
924 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
925 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
927 #Options that cannot be generalized
934 # this option may or may not be followed by an argument
935 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
944 # this option may or may not be followed by an argument
945 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
954 # this option may or may not be followed by an argument
955 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
963 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
964 # this option may or may not be followed by an argument
965 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
984 if [ "$1" = "-D" ]; then
988 VAL=`echo $1 | sed 's,-D,,'`
993 # this option may or may not be followed by an argument
994 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1003 if [ "$1" = "-I" ]; then
1007 VAL=`echo $1 | sed 's,-I,,'`
1012 if [ "$1" = "-L" ]; then
1016 VAL=`echo $1 | sed 's,-L,,'`
1021 if [ "$1" = "-R" ]; then
1025 VAL=`echo $1 | sed 's,-R,,'`
1030 VAL=`echo $1 | sed 's,-l,,'`
1034 if [ "$1" = "-F" ]; then
1038 VAL=`echo $1 | sed 's,-F,,'`
1043 if [ "$1" = "-fw" ]; then
1047 VAL=`echo $1 | sed 's,-fw,,'`
1055 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1062 if [ "$UNKNOWN_ARG" = "yes" ]; then
1063 echo "$1: unknown argument"
1074 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1075 CFG_ACCESSIBILITY="$VAL"
1084 CFG_USE_GNUMAKE="$VAL"
1087 CFG_MYSQL_CONFIG="$VAL"
1090 QT_INSTALL_PREFIX="$VAL"
1093 QT_HOST_PREFIX="$VAL"
1102 QT_FORCE_PKGCONFIG=yes
1105 QT_INSTALL_DOCS="$VAL"
1108 QT_INSTALL_HEADERS="$VAL"
1111 QT_INSTALL_PLUGINS="$VAL"
1114 QT_INSTALL_IMPORTS="$VAL"
1117 QT_INSTALL_DATA="$VAL"
1120 QT_INSTALL_LIBS="$VAL"
1129 QT_INSTALL_TRANSLATIONS="$VAL"
1131 sysconfdir|settingsdir)
1132 QT_INSTALL_SETTINGS="$VAL"
1135 QT_INSTALL_EXAMPLES="$VAL"
1138 QT_INSTALL_TESTS="$VAL"
1147 QT_INSTALL_BINS="$VAL"
1157 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1164 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1165 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1166 [ "$VAL" = "es2" ]; then
1173 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1180 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1183 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1191 if [ "$BUILD_ON_MAC" = "yes" ]; then
1198 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1199 CFG_MAC_DWARF2="$VAL"
1205 OPT_OBSOLETE_HOST_ARG=yes
1208 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1209 CFG_MAC_HARFBUZZ="$VAL"
1216 if [ "$BUILD_ON_MAC" = "yes" ]; then
1217 CFG_FRAMEWORK="$VAL"
1223 if [ "$VAL" = "yes" ]; then
1225 QMakeVar add QMAKE_CFLAGS -pg
1226 QMakeVar add QMAKE_CXXFLAGS -pg
1227 QMakeVar add QMAKE_LFLAGS -pg
1228 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1234 if [ "$VAL" = "yes" ]; then
1235 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1238 exceptions|g++-exceptions)
1239 if [ "$VAL" = "no" ]; then
1241 elif [ "$VAL" = "yes" ]; then
1249 # keep compatibility with old platform names
1255 PLATFORM=hpux-acc-o64
1258 PLATFORM=hpux-acc-64
1261 PLATFORM=hpux-acc-64
1273 PLATFORM=reliant-cds-64
1276 PLATFORM=solaris-cc-64
1279 PLATFORM=unixware-cc
1282 PLATFORM=unixware-g++
1285 PLATFORM=unixware-cc
1288 PLATFORM=unixware-g++
1294 i386) NATIVE_64_ARCH="x86_64" ;;
1295 powerpc) NATIVE_64_ARCH="ppc64" ;;
1296 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1298 if [ ! -z "$NATIVE_64_ARCH" ]; then
1299 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1306 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1309 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1310 CFG_DEBUG_RELEASE="$VAL"
1316 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1317 CFG_RELEASE_QMAKE="$VAL"
1323 if [ "$VAL" = "yes" ]; then
1325 elif [ "$VAL" = "no" ]; then
1332 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1333 CFG_PREFIX_INSTALL="$VAL"
1341 developer-build|commercial|opensource)
1342 # These switches have been dealt with already
1345 if [ "$VAL" = "yes" ]; then
1347 elif [ "$VAL" = "no" ]; then
1354 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1355 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1361 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1362 if [ "$VAL" = "no" ]; then
1363 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1364 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1365 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1371 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1378 if [ "$VAL" = "no" ]; then
1385 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1393 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1400 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1407 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1414 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1421 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1428 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1435 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1442 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1449 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1450 CFG_PRECOMPILE="$VAL"
1455 separate-debug-info)
1456 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1457 CFG_SEPARATE_DEBUG_INFO="$VAL"
1458 elif [ "$VAL" = "nocopy" ] ; then
1459 CFG_SEPARATE_DEBUG_INFO="yes"
1460 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1466 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1467 CFG_REDUCE_EXPORTS="$VAL"
1473 if [ "$VAL" = "no" ]; then
1480 if [ "$VAL" = "no" ]; then
1487 if [ "$VAL" = "no" ]; then
1494 if [ "$VAL" = "no" ]; then
1501 if [ "$VAL" = "no" ]; then
1508 if [ "$VAL" = "no" ]; then
1515 if [ "$VAL" = "no" ]; then
1522 if [ "$VAL" = "no" ]; then
1529 if [ "$VAL" = "no" ]; then
1539 if [ "$VAL" = "no" ]; then
1546 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1547 CFG_REDUCE_RELOCATIONS="$VAL"
1553 [ "$VAL" = "qt" ] && VAL=yes
1554 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1559 # No longer supported:
1560 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1563 if [ "$VAL" = "system" ]; then
1570 [ "$VAL" = "yes" ] && VAL=qt
1571 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1578 [ "$VAL" = "yes" ] && VAL=qt
1579 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1586 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1593 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1600 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1607 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1614 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1621 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1628 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1629 CFG_FONTCONFIG="$VAL"
1635 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1642 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1649 CFG_OBSOLETE_WAYLAND=yes
1652 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1659 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1666 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1673 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1680 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1694 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1695 CFG_GSTREAMER="$VAL"
1701 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1702 CFG_QGTKSTYLE="$VAL"
1708 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1711 if [ "$VAL" = "no" ]; then
1719 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1721 elif [ "$VAL" = "no" ]; then
1728 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1729 QPA_PLATFORM_GUARD="$VAL"
1735 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1737 elif [ "$VAL" = "runtime" ]; then
1744 if [ "$VAL" = "yes" ]; then
1751 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1758 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1759 CFG_LARGEFILE="$VAL"
1765 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1772 if [ "$VAL" = "yes" ]; then
1773 CFG_OPENSSL="linked"
1779 if [ "$VAL" = "yes" ]; then
1780 CFG_DECLARATIVE_DEBUG="yes"
1782 if [ "$VAL" = "no" ]; then
1783 CFG_DECLARATIVE_DEBUG="no"
1790 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1791 CFG_JAVASCRIPTCORE_JIT="$VAL"
1797 if [ "$VAL" = "yes" ]; then
1798 OPT_CONFIRM_LICENSE="$VAL"
1804 if [ "$VAL" = "yes" ]; then
1810 sql-*|imageformat-*)
1811 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1812 # if autoconf style options were used, $VAL can be "yes" or "no"
1813 [ "$VAL" = "yes" ] && VAL=qt
1814 # now $VAL should be "no", "qt", or "plugin"... double-check
1815 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1818 # now $VAL is "no", "qt", or "plugin"
1820 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1821 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1823 # Grab the available values
1826 avail="$CFG_SQL_AVAILABLE"
1829 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1830 if [ "$OPT" != "plugin" ]; then
1831 # png is always built in
1837 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1841 # Check that that user's value is available.
1844 if [ "$VAL" = "$d" ]; then
1849 [ "$found" = yes ] || ERROR=yes
1851 if [ "$VAR" = "sql" ]; then
1852 # set the CFG_SQL_driver
1853 eval "CFG_SQL_$VAL=\$OPT"
1855 elif [ "$VAR" = "imageformat" ]; then
1856 [ "$OPT" = "qt" ] && OPT=yes
1857 VAL="`echo $VAL |tr a-z A-Z`"
1858 eval "CFG_$VAL=$OPT"
1862 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1863 if [ "$OPT" = "plugin" ]; then
1866 QMakeVar add "${VAR}s" "${VAL}"
1867 elif [ "$OPT" = "no" ]; then
1868 PLUG_VAR="${VAR}-plugin"
1870 QMakeVar del "${IN_VAR}s" "$VAL"
1871 QMakeVar del "${PLUG_VAR}s" "$VAL"
1873 if [ "$ERROR" = "yes" ]; then
1874 echo "$CURRENT_OPT: unknown argument"
1879 if [ "$VAL" = "yes" ]; then
1880 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1881 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1885 elif [ "$VAL" = "no" ]; then
1886 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1887 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1896 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1903 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1910 D_FLAGS="$D_FLAGS \"$VAL\""
1913 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1916 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1919 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1922 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1925 if [ "$BUILD_ON_MAC" = "yes" ]; then
1926 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1927 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1933 if [ "$BUILD_ON_MAC" = "yes" ]; then
1934 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1940 W_FLAGS="$W_FLAGS \"${VAL}\""
1946 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1947 CFG_PHONON_BACKEND="$VAL"
1959 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1960 CFG_AUDIO_BACKEND="$VAL"
1966 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1973 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1974 CFG_FORCE_ASSERTS="$VAL"
1980 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1990 if [ "$UNKNOWN_OPT" = "yes" ]; then
1991 echo "${CURRENT_OPT}: invalid command-line switch"
1997 # update QT_CONFIG to show our current predefined configuration
1998 case "$CFG_QCONFIG" in
1999 minimal|small|medium|large|full)
2000 # these are a sequence of increasing functionality
2001 for c in minimal small medium large full; do
2002 QT_CONFIG="$QT_CONFIG $c-config"
2003 [ "$CFG_QCONFIG" = $c ] && break
2007 # not known to be sufficient for anything
2008 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2009 echo >&2 "Error: configuration file not found:"
2010 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2012 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2017 #-------------------------------------------------------------------------------
2018 # build tree initialization
2019 #-------------------------------------------------------------------------------
2021 # where to find which..
2022 unixtests="$relpath/config.tests/unix"
2023 mactests="$relpath/config.tests/mac"
2024 WHICH="$unixtests/which.test"
2026 PERL=`$WHICH perl 2>/dev/null`
2028 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2030 for e in gawk nawk awk; do
2031 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2038 PERL="/usr/bin/perl"
2039 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2043 ### skip this if the user just needs help...
2044 if [ "$OPT_HELP" != "yes" ]; then
2046 # is this a shadow build?
2047 if [ "$OPT_SHADOW" = "maybe" ]; then
2049 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2050 if [ -h "$outpath" ]; then
2051 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2057 if [ "$OPT_SHADOW" = "yes" ]; then
2058 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2059 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2060 echo >&2 "Cannot proceed."
2063 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2066 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2068 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2069 echo "Qt can be built in release mode with separate debug information, so"
2070 echo "-debug-and-release is not necessary anymore"
2074 if [ "$CFG_SILENT" = "yes" ]; then
2075 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2078 # if the source tree is different from the build tree,
2079 # symlink or copy part of the sources
2080 if [ "$OPT_SHADOW" = "yes" ]; then
2081 echo "Preparing build tree..."
2083 if [ -z "$PERL" ]; then
2085 echo "You need perl in your PATH to make a shadow build."
2086 echo "Cannot proceed."
2090 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2092 # make a syncqt script that can be used in the shadow
2093 rm -f "$outpath/bin/syncqt"
2094 if [ -x "$relpath/bin/syncqt" ]; then
2095 mkdir -p "$outpath/bin"
2096 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2097 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2098 chmod 755 "$outpath/bin/syncqt"
2101 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2102 rm -f "$outpath/bin/$i"
2103 if [ -x "$relpath/bin/$i" ]; then
2104 mkdir -p "$outpath/bin"
2105 echo "#!/bin/sh" >"$outpath/bin/$i"
2106 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2107 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2108 chmod 755 "$outpath/bin/$i"
2112 # symlink the mkspecs directory
2113 mkdir -p "$outpath/mkspecs"
2114 rm -rf "$outpath"/mkspecs/*
2115 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2116 rm -f "$outpath/mkspecs/default"
2120 rm -rf "$outpath/mkspecs/$1"
2121 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2122 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2125 # Special case for mkspecs/features directory.
2126 # To be able to place .prf files into a shadow build directory,
2127 # we're creating links for files only. The directory structure is reproduced.
2128 ShadowMkspecs features
2130 # The modules dir is special, too.
2131 ShadowMkspecs modules
2133 # symlink the doc directory
2134 rm -rf "$outpath/doc"
2135 ln -s "$relpath/doc" "$outpath/doc"
2138 # symlink fonts to be able to run application from build directory
2139 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2140 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2141 mkdir -p "${outpath}/lib"
2142 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2146 if [ "$OPT_FAST" = "auto" ]; then
2147 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2154 # find a make command
2155 if [ -z "$MAKE" ]; then
2157 for mk in gmake make; do
2158 if "$WHICH" $mk >/dev/null 2>&1; then
2163 if [ -z "$MAKE" ]; then
2164 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2165 echo >&2 "Cannot proceed."
2168 # export MAKE, we need it later in the config.tests
2174 #-------------------------------------------------------------------------------
2175 # auto-detect all that hasn't been specified in the arguments
2176 #-------------------------------------------------------------------------------
2178 if [ -z "$PLATFORM" ]; then
2180 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2182 if [ "$PLATFORM_QPA" = "yes" ]; then
2183 OSX_VERSION=`uname -r | cut -d. -f1`
2184 if [ "$OSX_VERSION" -ge 11 ]; then
2185 # We're on Lion or above. Check if we have a supported Clang version
2186 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2189 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2204 #PLATFORM=aix-g++-64
2206 #PLATFORM=aix-xlc-64
2208 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2218 # PLATFORM=dynix-g++
2224 PLATFORM=freebsd-g++
2226 - Also available for FreeBSD: freebsd-icc
2230 PLATFORM=openbsd-g++
2241 #PLATFORM=irix-cc-64
2243 - Also available for IRIX: irix-g++ irix-cc-64
2247 case "$UNAME_MACHINE" in
2249 #PLATFORM=hpuxi-acc-32
2250 PLATFORM=hpuxi-acc-64
2252 - Also available for HP-UXi: hpuxi-acc-32
2258 #PLATFORM=hpux-acc-64
2260 #PLATFORM=hpux-acc-o64
2262 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2271 - Also available for Tru64: tru64-g++
2275 case "$UNAME_MACHINE" in
2277 PLATFORM=linux-g++-64
2284 - Also available for Linux: linux-kcc linux-icc linux-cxx
2288 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2289 PLATFORM="solaris-g++"
2291 #PLATFORM=solaris-g++
2293 #PLATFORM=solaris-cc64
2296 - Also available for Solaris: solaris-g++ solaris-cc-64
2299 ReliantUNIX-*:*|SINIX-*:*)
2300 PLATFORM=reliant-cds
2301 #PLATFORM=reliant-cds-64
2303 - Also available for Reliant UNIX: reliant-cds-64
2313 #PLATFORM=unixware-g++
2314 PLATFORM=unixware-cc
2316 - Also available for OpenUNIX: unixware-g++
2320 #PLATFORM=unixware-g++
2321 PLATFORM=unixware-cc
2323 - Also available for UnixWare: unixware-g++
2330 - Also available for SCO OpenServer: sco-g++
2334 PLATFORM=unixware-g++
2337 PLATFORM=unsupported/qnx-g++
2340 if [ "$OPT_HELP" != "yes" ]; then
2342 for p in $PLATFORMS; do
2343 echo " $relconf $* -platform $p"
2346 echo " The build script does not currently recognize all" >&2
2347 echo " platforms supported by Qt." >&2
2348 echo " Rerun this script with a -platform option listed to" >&2
2349 echo " set the system/compiler combination you use." >&2
2356 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2358 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2360 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2361 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2363 if [ -d "$PLATFORM" ]; then
2364 QMAKESPEC="$PLATFORM"
2366 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2368 if [ -d "$XPLATFORM" ]; then
2369 XQMAKESPEC="$XPLATFORM"
2371 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2373 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2374 QT_CROSS_COMPILE=yes
2375 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2376 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2379 if [ "$BUILD_ON_MAC" = "yes" ]; then
2380 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2382 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2383 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2384 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2385 echo " built with 'macx-g++'" >&2
2391 # check specified platforms are supported
2392 if [ '!' -d "$QMAKESPEC" ]; then
2394 echo " The specified system/compiler is not supported:"
2398 echo " Please see the README file for a complete list."
2402 if [ '!' -d "$XQMAKESPEC" ]; then
2404 echo " The specified system/compiler is not supported:"
2408 echo " Please see the README file for a complete list."
2412 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2414 echo " The specified system/compiler port is not complete:"
2416 echo " $XQMAKESPEC/qplatformdefs.h"
2418 echo " Please contact qt-info@nokia.com."
2423 # now look at the configs and figure out what platform we are config'd for
2424 [ "$PLATFORM_QPA" != "yes" ] \
2425 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2427 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2429 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2430 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2431 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2432 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2433 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2437 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2438 case `basename "$XPLATFORM"` in
2441 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2443 echo "Please contact qt-info@nokia.com to upgrade your license to"
2444 echo "include this platform, or install the Qt Open Source Edition"
2445 echo "if you intend to develop free software."
2451 #-------------------------------------------------------------------------------
2452 # tests that don't need qmake (must be run before displaying help)
2453 #-------------------------------------------------------------------------------
2455 # detect build style
2456 if [ "$CFG_DEBUG" = "auto" ]; then
2457 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2458 CFG_DEBUG_RELEASE=yes
2460 elif [ "$CFG_DEV" = "yes" ]; then
2461 CFG_DEBUG_RELEASE=no
2464 CFG_DEBUG_RELEASE=no
2468 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2469 QT_CONFIG="$QT_CONFIG build_all"
2472 if [ -z "$PKG_CONFIG" ]; then
2473 # See if PKG_CONFIG is set in the mkspec:
2474 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2476 if [ -z "$PKG_CONFIG" ]; then
2477 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2480 # Work out if we can use pkg-config
2481 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2482 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2484 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2485 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2486 echo >&2 "environment!"
2488 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2490 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2491 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2492 echo >&2 "This is probably not what you want."
2494 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2496 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2497 echo >&2 "been set. This means your toolchain's .pc files must contain"
2498 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2499 echo >&2 "tests are failing, please check these files."
2504 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2505 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2506 echo >&2 "dependencies"
2512 if [ ! -n "$PKG_CONFIG" ]; then
2513 QT_CONFIG="$QT_CONFIG no-pkg-config"
2516 # pass on $CFG_SDK to the configure tests.
2517 if [ '!' -z "$CFG_SDK" ]; then
2518 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2521 # find the default framework value
2522 if [ "$BUILD_ON_MAC" = "yes" ]; then
2523 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2524 CFG_FRAMEWORK="$CFG_SHARED"
2525 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2527 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2535 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2537 TEST_COMPILER=$QMAKE_CONF_COMPILER
2538 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2539 if [ -z "$TEST_COMPILER" ]; then
2540 echo "ERROR: Cannot set the compiler for the configuration tests"
2546 if [ -n "$CFG_SYSROOT" ]; then
2547 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2548 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2549 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2551 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2555 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2557 # auto-detect precompiled header support
2558 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2559 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2566 #auto-detect DWARF2 on the mac
2567 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2568 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2575 # don't autodetect support for separate debug info on objcopy when
2576 # cross-compiling as lots of toolchains seems to have problems with this
2577 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2578 CFG_SEPARATE_DEBUG_INFO="no"
2581 # auto-detect support for separate debug info in objcopy
2582 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2583 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2584 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2585 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2586 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2587 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2588 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2589 CFG_SEPARATE_DEBUG_INFO=no
2593 # binutils on HP-UX is buggy; default to no.
2594 CFG_SEPARATE_DEBUG_INFO=no
2597 CFG_SEPARATE_DEBUG_INFO=yes
2603 # auto-detect -fvisibility support
2604 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2605 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2606 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2607 echo "-reduce-exports was requested but this compiler does not support it"
2608 echo "Re-run configure with -v for more information"
2611 CFG_REDUCE_EXPORTS=no
2613 CFG_REDUCE_EXPORTS=yes
2617 # detect the availability of the -Bsymbolic-functions linker optimization
2618 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2619 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2620 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2621 echo "-reduce-relocations was requested but this compiler does not support it"
2622 echo "Re-run configure with -v for more information"
2625 CFG_REDUCE_RELOCATIONS=no
2627 CFG_REDUCE_RELOCATIONS=yes
2631 # auto-detect GNU make support
2632 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2636 # find the default framework value
2637 if [ "$BUILD_ON_MAC" = "yes" ]; then
2638 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2639 CFG_FRAMEWORK="$CFG_SHARED"
2640 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2642 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2650 # x11 tests are done after qmake is built
2653 #setup the build parts
2654 if [ -z "$CFG_BUILD_PARTS" ]; then
2655 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2657 # don't build tools by default when cross-compiling
2658 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2659 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2662 for nobuild in $CFG_NOBUILD_PARTS; do
2663 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2665 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2667 # echo "WARNING: libs is a required part of the build."
2669 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2672 #-------------------------------------------------------------------------------
2673 # post process QT_INSTALL_* variables
2674 #-------------------------------------------------------------------------------
2676 if [ -z "$QT_INSTALL_PREFIX" ]; then
2677 if [ "$CFG_DEV" = "yes" ]; then
2678 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2680 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2683 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2685 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2686 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2687 if [ "$BUILD_ON_MAC" = "yes" ]; then
2688 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2691 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2694 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2696 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2697 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2698 if [ "$BUILD_ON_MAC" = "yes" ]; then
2699 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2704 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2707 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2709 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2710 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2711 if [ "$BUILD_ON_MAC" = "yes" ]; then
2712 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2713 QT_INSTALL_LIBS="/Libraries/Frameworks"
2717 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2719 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2721 if [ -z "$QT_INSTALL_BINS" ]; then #default
2722 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2723 if [ "$BUILD_ON_MAC" = "yes" ]; then
2724 QT_INSTALL_BINS="/Developer/Applications/Qt"
2727 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2729 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2731 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2732 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2733 if [ "$BUILD_ON_MAC" = "yes" ]; then
2734 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2737 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2739 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2741 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2742 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2743 if [ "$BUILD_ON_MAC" = "yes" ]; then
2744 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2747 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2749 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2751 if [ -z "$QT_INSTALL_DATA" ]; then #default
2752 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2754 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2756 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2757 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2759 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2761 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2762 if [ "$BUILD_ON_MAC" = "yes" ]; then
2763 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2765 QT_INSTALL_SETTINGS=/etc/xdg
2768 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2770 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2771 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2772 if [ "$BUILD_ON_MAC" = "yes" ]; then
2773 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2776 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2778 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2781 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2782 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2783 if [ "$BUILD_ON_MAC" = "yes" ]; then
2784 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2787 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2789 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2791 #------- host paths --------
2793 if [ -z "$QT_HOST_PREFIX" ]; then
2794 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2797 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2801 if [ -z "$QT_HOST_BINS" ]; then #default
2803 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2804 if [ "$BUILD_ON_MAC" = "yes" ]; then
2805 QT_HOST_BINS="/Developer/Applications/Qt"
2808 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2810 QT_HOST_BINS="$QT_INSTALL_BINS"
2813 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2815 if [ -z "$QT_HOST_DATA" ]; then #default
2817 QT_HOST_DATA="$QT_HOST_PREFIX"
2819 QT_HOST_DATA="$QT_INSTALL_DATA"
2822 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2825 #-------------------------------------------------------------------------------
2826 # help - interactive parts of the script _after_ this section please
2827 #-------------------------------------------------------------------------------
2829 # next, emit a usage message if something failed.
2830 if [ "$OPT_HELP" = "yes" ]; then
2831 [ "x$ERROR" = "xyes" ] && echo
2832 if [ "$CFG_NIS" = "no" ]; then
2839 if [ "$CFG_CUPS" = "no" ]; then
2846 if [ "$CFG_ICONV" = "no" ]; then
2853 if [ "$CFG_LARGEFILE" = "no" ]; then
2860 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
2867 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2875 if [ "$CFG_XCB" = "no" ]; then
2883 if [ "$CFG_EGLFS" = "no" ]; then
2891 if [ "$CFG_XINPUT2" = "no" ]; then
2900 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2901 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2902 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2903 [-release] [-debug] [-debug-and-release]
2904 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2905 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2906 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
2907 [-plugin-sql-<driver>] [-system-sqlite]
2908 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2909 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2910 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2911 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2912 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2913 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2914 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
2915 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2916 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2917 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2918 [-no-audio-backend] [-audio-backend]
2919 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
2920 [-no-optimized-qmake] [-optimized-qmake]
2921 [-no-openssl] [-openssl] [-openssl-linked]
2922 [-no-gtkstyle] [-gtkstyle]
2923 [-qt-pcre] [-system-pcre]
2924 [additional platform specific options (see below)]
2927 Installation options:
2929 -qpa ................ This will enable the QPA build.
2930 QPA is a window system agnostic implementation of Qt.
2932 These are optional, but you may specify install directories.
2934 -prefix <dir> ...... This will install everything relative to <dir>
2935 (default $QT_INSTALL_PREFIX)
2937 if [ "$PLATFORM_QPA" = "yes" ]; then
2940 -hostprefix [dir] .. Tools and libraries needed when developing
2941 applications are installed in [dir]. If [dir] is
2942 not given, the current build directory will be used.
2948 * -prefix-install .... Force a sandboxed "local" installation of
2949 Qt. This will install into
2950 $QT_INSTALL_PREFIX, if this option is
2951 disabled then some platforms will attempt a
2952 "system" install by placing default values to
2953 be placed in a system location other than
2956 You may use these to separate different parts of the install:
2958 -bindir <dir> ......... Executables will be installed to <dir>
2959 (default PREFIX/bin)
2960 -libdir <dir> ......... Libraries will be installed to <dir>
2961 (default PREFIX/lib)
2962 -docdir <dir> ......... Documentation will be installed to <dir>
2963 (default PREFIX/doc)
2964 -headerdir <dir> ...... Headers will be installed to <dir>
2965 (default PREFIX/include)
2966 -plugindir <dir> ...... Plugins will be installed to <dir>
2967 (default PREFIX/plugins)
2968 -importdir <dir> ...... Imports for QML will be installed to <dir>
2969 (default PREFIX/imports)
2970 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2972 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2973 (default PREFIX/translations)
2974 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2975 (default PREFIX/etc/settings)
2976 -examplesdir <dir> .... Examples will be installed to <dir>
2977 (default PREFIX/examples)
2978 -testsdir <dir> ....... Tests will be installed to <dir>
2979 (default PREFIX/tests)
2981 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2984 -hostbindir <dir> .. Host executables will be installed to <dir>
2985 (default HOSTPREFIX/bin)
2986 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2987 (default HOSTPREFIX)
2994 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2995 that needs to be evaluated. If the evaluation succeeds, the feature is
2996 included. Here is a short explanation of each option:
2998 * -release ........... Compile and link Qt with debugging turned off.
2999 -debug ............. Compile and link Qt with debugging turned on.
3000 -debug-and-release . Compile and link two versions of Qt, with and without
3001 debugging turned on (Mac only).
3003 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3005 -opensource ........ Compile and link the Open-Source Edition of Qt.
3006 -commercial ........ Compile and link the Commercial Edition of Qt.
3009 * -shared ............ Create and use shared Qt libraries.
3010 -static ............ Create and use static Qt libraries.
3012 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3014 -fast .............. Configure Qt quickly by generating Makefiles only for
3015 library and subdirectory targets. All other Makefiles
3016 are created as wrappers, which will in turn run qmake.
3018 -no-largefile ...... Disables large file support.
3019 + -largefile ......... Enables Qt to access files larger than 4 GB.
3022 if [ "$PLATFORM_QPA" = "yes" ]; then
3029 if [ "$CFG_DBUS" = "no" ]; then
3038 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3039 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3041 -no-accessibility .. Do not compile Accessibility support.
3042 * -accessibility ..... Compile Accessibility support.
3044 $SHN -no-stl ............ Do not compile STL support.
3045 $SHY -stl ............... Compile STL support.
3047 -no-sql-<driver> ... Disable SQL <driver> entirely.
3048 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3050 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3053 Possible values for <driver>:
3054 [ $CFG_SQL_AVAILABLE ]
3056 -system-sqlite ..... Use sqlite from the operating system.
3058 -no-phonon-backend.. Do not build the platform phonon plugin.
3059 + -phonon-backend..... Build the platform phonon plugin.
3061 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3062 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3064 -no-declarative-debug ..... Do not build the declarative debugging support.
3065 + -declarative-debug ....... Build the declarative debugging support.
3067 -platform target ... The operating system and compiler you are building
3070 See the README file for a list of supported
3071 operating systems and compilers.
3074 if [ "${PLATFORM_QPA}" != "yes" ]; then
3076 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3077 raster - Software rasterizer
3078 opengl - Rendering via OpenGL, Experimental!
3079 openvg - Rendering via OpenVG, Experimental!
3086 -no-mmx ............ Do not compile with use of MMX instructions.
3087 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3088 -no-sse ............ Do not compile with use of SSE instructions.
3089 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3090 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3091 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3092 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3093 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3094 -no-avx ............ Do not compile with use of AVX instructions.
3095 -no-neon ........... Do not compile with use of NEON instructions.
3097 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3098 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3100 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3102 -D <string> ........ Add an explicit define to the preprocessor.
3103 -I <string> ........ Add an explicit include path.
3104 -L <string> ........ Add an explicit library path.
3106 -help, -h .......... Display this information.
3108 Third Party Libraries:
3110 -qt-zlib ........... Use the zlib bundled with Qt.
3111 + -system-zlib ....... Use zlib from the operating system.
3112 See http://www.gzip.org/zlib
3114 -no-gif ............ Do not compile GIF reading support.
3116 -no-libpng ......... Do not compile PNG support.
3117 -qt-libpng ......... Use the libpng bundled with Qt.
3118 + -system-libpng ..... Use libpng from the operating system.
3119 See http://www.libpng.org/pub/png
3121 -no-libjpeg ........ Do not compile JPEG support.
3122 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3123 + -system-libjpeg .... Use libjpeg from the operating system.
3124 See http://www.ijg.org
3126 -no-openssl ........ Do not compile support for OpenSSL.
3127 + -openssl ........... Enable run-time OpenSSL support.
3128 -openssl-linked .... Enabled linked OpenSSL support.
3130 -qt-pcre ........... Use the PCRE library bundled with Qt.
3131 + -system-pcre ....... Use the PCRE library from the operating system.
3135 -make <part> ....... Add part to the list of parts to be built at make time.
3136 ($QT_DEFAULT_BUILD_PARTS)
3137 -nomake <part> ..... Exclude part from the list of parts to be built.
3139 -R <string> ........ Add an explicit runtime library path to the Qt
3141 -l <string> ........ Add an explicit library.
3143 -no-rpath .......... Do not use the library install path as a runtime
3145 + -rpath ............. Link Qt libraries and executables using the library
3146 install path as a runtime library path. Equivalent
3147 to -R install_libpath
3149 -continue .......... Continue as far as possible if an error occurs.
3151 -verbose, -v ....... Print verbose information about each step of the
3154 -silent ............ Reduce the build output so that warnings and errors
3155 can be seen more easily.
3157 * -no-optimized-qmake ... Do not build qmake optimized.
3158 -optimized-qmake ...... Build qmake optimized.
3160 -no-gui ............ Don't build the Qt GUI library
3162 $NSN -no-nis ............ Do not compile NIS support.
3163 $NSY -nis ............... Compile NIS support.
3165 $CUN -no-cups ........... Do not compile CUPS support.
3166 $CUY -cups .............. Compile CUPS support.
3167 Requires cups/cups.h and libcups.so.2.
3169 $CIN -no-iconv .......... Do not compile support for iconv(3).
3170 $CIY -iconv ............. Compile support for iconv(3).
3172 $PHN -no-pch ............ Do not use precompiled header support.
3173 $PHY -pch ............... Use precompiled header support.
3175 $DBN -no-dbus ........... Do not compile the QtDBus module.
3176 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3177 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3179 -reduce-relocations ..... Reduce relocations in the libraries through extra
3180 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3181 experimental; needs GNU ld >= 2.18).
3183 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3187 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3188 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3195 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3203 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3207 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3208 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3210 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3211 $XCBY -xcb ............... Compile Xcb support.
3213 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3214 $EGLFSY -eglfs ............. Compile EGLFS support.
3220 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3224 $X2N -no-xinput2......... Do not compile XInput2 support.
3225 $X2Y -xinput2............ Compile XInput2 support.
3231 if [ "$PLATFORM_X11" = "yes" ]; then
3232 if [ "$CFG_SM" = "no" ]; then
3239 if [ "$CFG_XSHAPE" = "no" ]; then
3246 if [ "$CFG_XVIDEO" = "no" ]; then
3253 if [ "$CFG_XINERAMA" = "no" ]; then
3260 if [ "$CFG_FONTCONFIG" = "no" ]; then
3267 if [ "$CFG_XCURSOR" = "no" ]; then
3274 if [ "$CFG_XFIXES" = "no" ]; then
3281 if [ "$CFG_XRANDR" = "no" ]; then
3288 if [ "$CFG_XRENDER" = "no" ]; then
3295 if [ "$CFG_MITSHM" = "no" ]; then
3302 if [ "$CFG_XINPUT" = "no" ]; then
3309 if [ "$CFG_XKB" = "no" ]; then
3316 if [ "$CFG_IM" = "no" ]; then
3327 -no-gtkstyle ....... Do not build the GTK theme integration.
3328 + -gtkstyle .......... Build the GTK theme integration.
3330 * -no-nas-sound ...... Do not compile in NAS sound support.
3331 -system-nas-sound .. Use NAS libaudio from the operating system.
3332 See http://radscan.com/nas.html
3334 -no-opengl ......... Do not support OpenGL.
3335 + -opengl <api> ...... Enable OpenGL support.
3336 With no parameter, this will auto-detect the "best"
3337 OpenGL API to use. If desktop OpenGL is available, it
3338 will be used. Use desktop or es2 for <api>
3339 to force the use of the Desktop OpenGL or
3340 OpenGL ES 2 APIs instead.
3342 -no-openvg ........ Do not support OpenVG.
3343 + -openvg ........... Enable OpenVG support.
3344 Requires EGL support, typically supplied by an OpenGL
3345 or other graphics implementation.
3347 $SMN -no-sm ............. Do not support X Session Management.
3348 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3350 $SHN -no-xshape ......... Do not compile XShape support.
3351 $SHY -xshape ............ Compile XShape support.
3352 Requires X11/extensions/shape.h.
3354 $XVN -no-xvideo ......... Do not compile XVideo support.
3355 $XVY -xvideo ............ Compile XVideo support.
3356 Requires X11/extensions/Xv.h & Xvlib.h.
3358 $SHN -no-xsync .......... Do not compile XSync support.
3359 $SHY -xsync ............. Compile XSync support.
3360 Requires X11/extensions/sync.h.
3362 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3363 $XAY -xinerama .......... Compile Xinerama support.
3364 Requires X11/extensions/Xinerama.h and libXinerama.
3365 By default, Xinerama support will be compiled if
3366 available and the shared libraries are dynamically
3369 $XCN -no-xcursor ........ Do not compile Xcursor support.
3370 $XCY -xcursor ........... Compile Xcursor support.
3371 Requires X11/Xcursor/Xcursor.h and libXcursor.
3372 By default, Xcursor support will be compiled if
3373 available and the shared libraries are dynamically
3376 $XFN -no-xfixes ......... Do not compile Xfixes support.
3377 $XFY -xfixes ............ Compile Xfixes support.
3378 Requires X11/extensions/Xfixes.h and libXfixes.
3379 By default, Xfixes support will be compiled if
3380 available and the shared libraries are dynamically
3383 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3384 $XZY -xrandr ............ Compile Xrandr support.
3385 Requires X11/extensions/Xrandr.h and libXrandr.
3387 $XRN -no-xrender ........ Do not compile Xrender support.
3388 $XRY -xrender ........... Compile Xrender support.
3389 Requires X11/extensions/Xrender.h and libXrender.
3391 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3392 $XMY -mitshm ............ Compile MIT-SHM support.
3393 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3395 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3396 $FCGY -fontconfig ........ Compile FontConfig support.
3397 Requires fontconfig/fontconfig.h, libfontconfig,
3398 freetype.h and libfreetype.
3400 $XIN -no-xinput ......... Do not compile Xinput support.
3401 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3402 which requires IRIX with wacom.h and libXi or
3403 XFree86 with X11/extensions/XInput.h and libXi.
3405 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3406 $XKY -xkb ............... Compile XKB support.
3411 if [ "$BUILD_ON_MAC" = "yes" ]; then
3416 -Fstring ........... Add an explicit framework path.
3417 -fw string ......... Add an explicit framework.
3419 * -framework ......... Build Qt as a series of frameworks and
3420 link tools against those frameworks.
3421 -no-framework ...... Do not build Qt as a series of frameworks.
3423 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3424 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3426 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3427 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3429 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3430 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3431 QT_ENABLE_HARFBUZZ environment variable.
3436 if [ "$PLATFORM_QPA" = "yes" ]; then
3442 if [ "$PLATFORM_QPA" = "yes" ]; then
3445 -xplatform target ... The target platform when cross-compiling.
3447 -no-feature-<feature> Do not compile in <feature>.
3448 -feature-<feature> .. Compile in <feature>. The available features
3449 are described in src/corelib/global/qfeatures.txt
3451 -no-freetype ........ Do not compile in Freetype2 support.
3452 -qt-freetype ........ Use the libfreetype bundled with Qt.
3453 * -system-freetype .... Use libfreetype from the operating system.
3454 See http://www.freetype.org/
3456 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3457 default ($CFG_QCONFIG).
3459 -no-opengl .......... Do not support OpenGL.
3460 -opengl <api> ....... Enable OpenGL ES support
3461 With no parameter, this will attempt to auto-detect
3462 OpenGL ES 2, or regular desktop OpenGL.
3463 Use es2 for <api> to override auto-detection.
3467 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3468 if [ "$CFG_GLIB" = "no" ]; then
3476 $GBN -no-glib ........... Do not compile Glib support.
3477 $GBY -glib .............. Compile Glib support.
3482 [ "x$ERROR" = "xyes" ] && exit 1
3487 # -----------------------------------------------------------------------------
3488 # LICENSING, INTERACTIVE PART
3489 # -----------------------------------------------------------------------------
3491 if [ "$PLATFORM_QPA" = "yes" ]; then
3492 Platform="Qt Lighthouse"
3493 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3494 Platform="Qt for Windows"
3495 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3497 Platform="Qt for Linux/X11"
3501 echo "This is the $Platform ${EditionString} Edition."
3504 if [ "$Edition" = "OpenSource" ]; then
3506 echo "You are licensed to use this software under the terms of"
3507 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3508 if [ -f "$relpath/LICENSE.GPL3" ]; then
3509 echo "You are also licensed to use this software under the terms of"
3510 echo "the GNU General Public License (GPL) versions 3."
3516 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3517 echo "You have already accepted the terms of the $LicenseType license."
3520 if [ -f "$relpath/LICENSE.GPL3" ]; then
3521 echo "Type '3' to view the GNU General Public License version 3."
3523 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3524 echo "Type 'yes' to accept this license offer."
3525 echo "Type 'no' to decline this license offer."
3527 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3531 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3533 elif [ "$acceptance" = "no" ]; then
3534 echo "You are not licensed to use this software."
3537 elif [ "$acceptance" = "3" ]; then
3538 more "$relpath/LICENSE.GPL3"
3539 elif [ "$acceptance" = "L" ]; then
3540 more "$relpath/LICENSE.LGPL"
3543 elif [ "$Edition" = "Preview" ]; then
3544 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3547 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3548 echo "You have already accepted the terms of the $LicenseType license."
3551 echo "You are licensed to use this software under the terms of"
3552 echo "the $TheLicense"
3554 echo "Type '?' to read the Preview License."
3555 echo "Type 'yes' to accept this license offer."
3556 echo "Type 'no' to decline this license offer."
3558 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3562 if [ "$acceptance" = "yes" ]; then
3564 elif [ "$acceptance" = "no" ] ;then
3565 echo "You are not licensed to use this software."
3568 elif [ "$acceptance" = "?" ]; then
3569 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3572 elif [ "$Edition" != "OpenSource" ]; then
3573 if [ -n "$ExpiryDate" ]; then
3574 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3575 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3576 Today=`date +%Y%m%d`
3577 if [ "$Today" -gt "$ExpiryDate" ]; then
3578 case "$LicenseType" in
3579 Commercial|Academic|Educational)
3580 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3582 echo "NOTICE NOTICE NOTICE NOTICE"
3584 echo " Your support and upgrade period has expired."
3586 echo " You are no longer licensed to use this version of Qt."
3587 echo " Please contact qt-info@nokia.com to renew your support"
3588 echo " and upgrades for this license."
3590 echo "NOTICE NOTICE NOTICE NOTICE"
3595 echo "WARNING WARNING WARNING WARNING"
3597 echo " Your support and upgrade period has expired."
3599 echo " You may continue to use your last licensed release"
3600 echo " of Qt under the terms of your existing license"
3601 echo " agreement. But you are not entitled to technical"
3602 echo " support, nor are you entitled to use any more recent"
3603 echo " Qt releases."
3605 echo " Please contact qt-info@nokia.com to renew your"
3606 echo " support and upgrades for this license."
3608 echo "WARNING WARNING WARNING WARNING"
3615 echo "NOTICE NOTICE NOTICE NOTICE"
3617 echo " Your Evaluation license has expired."
3619 echo " You are no longer licensed to use this software. Please"
3620 echo " contact qt-info@nokia.com to purchase license, or install"
3621 echo " the Qt Open Source Edition if you intend to develop free"
3624 echo "NOTICE NOTICE NOTICE NOTICE"
3631 TheLicense=`head -n 1 "$outpath/LICENSE"`
3633 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3634 echo "You have already accepted the terms of the $TheLicense."
3637 echo "You are licensed to use this software under the terms of"
3638 echo "the $TheLicense."
3640 echo "Type '?' to view the $TheLicense."
3641 echo "Type 'yes' to accept this license offer."
3642 echo "Type 'no' to decline this license offer."
3644 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3648 if [ "$acceptance" = "yes" ]; then
3650 elif [ "$acceptance" = "no" ]; then
3651 echo "You are not licensed to use this software."
3654 else [ "$acceptance" = "?" ]
3655 more "$outpath/LICENSE"
3660 # this should be moved somewhere else
3663 AIX_VERSION=`uname -v`
3664 if [ "$AIX_VERSION" -lt "5" ]; then
3665 QMakeVar add QMAKE_LIBS_X11 -lbind
3672 #-------------------------------------------------------------------------------
3673 # generate qconfig.cpp
3674 #-------------------------------------------------------------------------------
3675 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3677 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3679 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3680 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3682 /* Installation date */
3683 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3685 /* Installation Info */
3686 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3687 "qt_prfxpath=$QT_INSTALL_PREFIX",
3688 "qt_docspath=$QT_INSTALL_DOCS",
3689 "qt_hdrspath=$QT_INSTALL_HEADERS",
3690 "qt_libspath=$QT_INSTALL_LIBS",
3691 "qt_binspath=$QT_INSTALL_BINS",
3692 "qt_plugpath=$QT_INSTALL_PLUGINS",
3693 "qt_impspath=$QT_INSTALL_IMPORTS",
3694 "qt_datapath=$QT_INSTALL_DATA",
3695 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3696 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3697 "qt_tstspath=$QT_INSTALL_TESTS",
3698 #ifdef QT_BUILD_QMAKE
3699 "qt_ssrtpath=$CFG_SYSROOT",
3700 "qt_hpfxpath=$QT_HOST_PREFIX",
3701 "qt_hbinpath=$QT_HOST_BINS",
3702 "qt_hdatpath=$QT_HOST_DATA",
3705 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3708 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3710 /* strlen( "qt_lcnsxxxx" ) == 12 */
3711 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3712 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3714 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3717 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3718 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3719 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3721 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3722 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3723 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3726 # -----------------------------------------------------------------------------
3727 if [ "$LicenseType" = "Evaluation" ]; then
3728 EVALKEY=qt_qevalkey=$LicenseKeyExt
3729 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3730 EVALKEY=qt_qevalkey=
3733 if [ -n "$EVALKEY" ]; then
3734 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3735 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3736 /* Evaluation license key */
3737 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3739 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3743 # -----------------------------------------------------------------------------
3745 # -----------------------------------------------------------------------------
3748 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3750 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3751 if [ "$OPT_SHADOW" = "yes" ]; then
3752 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3753 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3754 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3758 # $1: input variable name (awk regexp)
3759 # $2: optional output variable name
3760 # $3: optional value transformation (sed command)
3761 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3762 # is where the resulting variable is written to
3763 setBootstrapVariable()
3765 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3769 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3770 echo "Creating qmake. Please wait..."
3773 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3774 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3775 if [ -f "$QCONFIG_H" ]; then
3776 OLD_QCONFIG_H=$QCONFIG_H
3777 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3780 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3781 # when building qmake, we use #defines for the install paths,
3782 # however they are real functions in the library
3783 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3784 mkdir -p "$outpath/src/corelib/global"
3785 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3786 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3789 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3791 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3792 rm -rf mkspecs/default
3793 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3794 mkdir -p "$outpath/qmake" || exit
3796 for mkfile in GNUmakefile Makefile; do
3799 in_mkfile="${mkfile}.in"
3800 if [ "$mkfile" = "Makefile" ]; then
3801 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3802 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3804 in_mkfile="${mkfile}.unix"
3806 in_mkfile="$relpath/qmake/$in_mkfile"
3807 mkfile="$outpath/qmake/$mkfile"
3808 if [ -f "$mkfile" ]; then
3809 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3812 [ -f "$in_mkfile" ] || continue
3814 echo "########################################################################" > "$mkfile"
3815 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3816 echo "########################################################################" >> "$mkfile"
3819 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3820 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3821 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3823 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3824 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3827 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3828 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3829 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3830 setBootstrapVariable QMAKE_CFLAGS
3831 setBootstrapVariable QMAKE_CXXFLAGS
3832 setBootstrapVariable QMAKE_LFLAGS
3834 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3835 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3836 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3838 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3839 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3840 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3841 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3842 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3843 elif [ "$CFG_DEBUG" = "yes" ]; then
3844 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3845 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3846 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3847 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3850 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3851 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3852 for rpath in $RPATH_FLAGS; do
3853 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3856 if [ "$BUILD_ON_MAC" = "yes" ]; then
3857 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3858 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3859 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3860 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3861 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3862 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3863 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3864 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3865 if [ '!' -z "$CFG_SDK" ]; then
3866 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3867 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3868 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3869 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3870 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3873 if [ '!' -z "$D_FLAGS" ]; then
3874 for DEF in $D_FLAGS; do
3875 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3878 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3879 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3880 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3881 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3883 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3884 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3885 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3886 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3887 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3888 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3889 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3890 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3891 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3892 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3894 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3895 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3896 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3897 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3902 QMAKE_BUILD_ERROR=no
3903 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3904 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3905 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3906 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3909 #-------------------------------------------------------------------------------
3910 # tests that need qmake
3911 #-------------------------------------------------------------------------------
3913 #-------------------------------------------------------------------------------
3914 # determine the target and host architectures
3915 #-------------------------------------------------------------------------------
3917 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3918 CFG_ARCH=`"$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -e "s,^Project MESSAGE: ,," -e "s,^#.*$,,g" | grep -v "^$"`
3919 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3920 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3921 # Do the same test again, using the host compiler
3922 CFG_HOST_ARCH=`"$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -e "s,^Project MESSAGE: ,," -e "s,^#.*$,,g" | grep -v "^$"`
3923 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3925 # not cross compiling, host == target
3926 CFG_HOST_ARCH="$CFG_ARCH"
3929 if [ "$OPT_VERBOSE" = "yes" ]; then
3930 echo "System architecture: '$CFG_ARCH'"
3931 if [ "$PLATFORM_QPA" = "yes" ]; then
3932 echo "Host architecture: '$CFG_HOST_ARCH'"
3936 #-------------------------------------------------------------------------------
3937 # functionality tests
3938 #-------------------------------------------------------------------------------
3940 # detect availability of float math.h functions
3941 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3942 CFG_USE_FLOATMATH=yes
3944 CFG_USE_FLOATMATH=no
3947 # detect mmx support
3948 if [ "${CFG_MMX}" = "auto" ]; then
3949 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
3956 # detect 3dnow support
3957 if [ "${CFG_3DNOW}" = "auto" ]; then
3958 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
3965 # detect sse support
3966 if [ "${CFG_SSE}" = "auto" ]; then
3967 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
3974 # detect sse2 support
3975 if [ "${CFG_SSE2}" = "auto" ]; then
3976 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3983 # detect sse3 support
3984 if [ "${CFG_SSE3}" = "auto" ]; then
3985 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3992 # detect ssse3 support
3993 if [ "${CFG_SSSE3}" = "auto" ]; then
3994 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4001 # detect sse4.1 support
4002 if [ "${CFG_SSE4_1}" = "auto" ]; then
4003 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
4010 # detect sse4.2 support
4011 if [ "${CFG_SSE4_2}" = "auto" ]; then
4012 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
4019 # detect avx support
4020 if [ "${CFG_AVX}" = "auto" ]; then
4021 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4028 # check iWMMXt support
4029 if [ "$CFG_IWMMXT" = "yes" ]; then
4030 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4031 if [ $? != "0" ]; then
4032 echo "The iWMMXt functionality test failed!"
4033 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4038 # detect neon support
4039 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4040 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
4045 elif [ "$CFG_ARCH" != "arm" ]; then
4049 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4052 if [ "$CFG_ZLIB" = "no" ]; then
4053 # Note: Qt no longer support builds without zlib
4054 # So we force a "no" to be "auto" here.
4055 # If you REALLY really need no zlib support, you can still disable
4056 # it by doing the following:
4057 # add "no-zlib" to mkspecs/qconfig.pri
4058 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4060 # There's no guarantee that Qt will build under those conditions
4065 if [ "$CFG_ZLIB" = "auto" ]; then
4066 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
4073 if [ "$CFG_LARGEFILE" = "auto" ]; then
4074 #Large files should be enabled for all Linux systems
4078 if [ "$CFG_GUI" = "no" ]; then
4079 QPA_PLATFORM_GUARD=no
4082 # detect how jpeg should be built
4083 if [ "$CFG_JPEG" = "auto" ]; then
4084 if [ "$CFG_SHARED" = "yes" ]; then
4091 if [ "$CFG_LIBJPEG" = "auto" ]; then
4092 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
4099 # detect how gif should be built
4100 if [ "$CFG_GIF" = "auto" ]; then
4101 if [ "$CFG_SHARED" = "yes" ]; then
4109 if [ "$CFG_LIBPNG" = "auto" ]; then
4110 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
4117 # detect accessibility
4118 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4119 CFG_ACCESSIBILITY=yes
4122 if [ "$CFG_EGLFS" = "yes" ]; then
4123 if [ "$CFG_EGL" = "no" ]; then
4124 echo "The EGLFS plugin requires EGL support and cannot be built"
4130 # auto-detect SQL-modules support
4131 for _SQLDR in $CFG_SQL_AVAILABLE; do
4134 if [ "$CFG_SQL_mysql" != "no" ]; then
4135 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4136 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4137 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4138 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4139 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4140 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4141 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4143 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4144 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4145 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4146 echo " You need MySql 4 or higher."
4147 echo " If you believe this message is in error you may use the continue"
4148 echo " switch (-continue) to $0 to continue."
4153 QT_LFLAGS_MYSQL_R=""
4157 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
4158 QMakeVar add CONFIG use_libmysqlclient_r
4159 if [ "$CFG_SQL_mysql" = "auto" ]; then
4160 CFG_SQL_mysql=plugin
4162 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4163 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
4164 if [ "$CFG_SQL_mysql" = "auto" ]; then
4165 CFG_SQL_mysql=plugin
4168 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4169 echo "MySQL support cannot be enabled due to functionality tests!"
4170 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4171 echo " If you believe this message is in error you may use the continue"
4172 echo " switch (-continue) to $0 to continue."
4177 QT_LFLAGS_MYSQL_R=""
4185 if [ "$CFG_SQL_psql" != "no" ]; then
4186 # Be careful not to use native pg_config when cross building.
4187 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4188 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4189 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4191 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4192 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4193 # But, respect PSQL_LIBS if set
4194 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4195 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
4196 if [ "$CFG_SQL_psql" = "auto" ]; then
4200 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4201 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4202 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4203 echo " If you believe this message is in error you may use the continue"
4204 echo " switch (-continue) to $0 to continue."
4215 if [ "$CFG_SQL_odbc" != "no" ]; then
4216 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
4217 if [ "$CFG_SQL_odbc" = "auto" ]; then
4221 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
4222 QT_LFLAGS_ODBC="-liodbc"
4223 if [ "$CFG_SQL_odbc" = "auto" ]; then
4227 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4228 echo "ODBC support cannot be enabled due to functionality tests!"
4229 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4230 echo " If you believe this message is in error you may use the continue"
4231 echo " switch (-continue) to $0 to continue."
4241 if [ "$CFG_SQL_oci" != "no" ]; then
4242 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
4243 if [ "$CFG_SQL_oci" = "auto" ]; then
4247 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4248 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4249 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4250 echo " If you believe this message is in error you may use the continue"
4251 echo " switch (-continue) to $0 to continue."
4260 if [ "$CFG_SQL_tds" != "no" ]; then
4261 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4262 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4263 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
4264 if [ "$CFG_SQL_tds" = "auto" ]; then
4268 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4269 echo "TDS support cannot be enabled due to functionality tests!"
4270 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4271 echo " If you believe this message is in error you may use the continue"
4272 echo " switch (-continue) to $0 to continue."
4281 if [ "$CFG_SQL_db2" != "no" ]; then
4282 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
4283 if [ "$CFG_SQL_db2" = "auto" ]; then
4287 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4288 echo "ODBC support cannot be enabled due to functionality tests!"
4289 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4290 echo " If you believe this message is in error you may use the continue"
4291 echo " switch (-continue) to $0 to continue."
4300 if [ "$CFG_SQL_ibase" != "no" ]; then
4301 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
4302 if [ "$CFG_SQL_ibase" = "auto" ]; then
4303 CFG_SQL_ibase=plugin
4306 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4307 echo "InterBase support cannot be enabled due to functionality tests!"
4308 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4309 echo " If you believe this message is in error you may use the continue"
4310 echo " switch (-continue) to $0 to continue."
4319 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4320 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
4321 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4322 CFG_SQL_sqlite2=plugin
4325 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4326 echo "SQLite2 support cannot be enabled due to functionality tests!"
4327 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4328 echo " If you believe this message is in error you may use the continue"
4329 echo " switch (-continue) to $0 to continue."
4338 if [ "$CFG_SQL_sqlite" != "no" ]; then
4339 SQLITE_AUTODETECT_FAILED="no"
4340 if [ "$CFG_SQLITE" = "system" ]; then
4341 if [ -n "$PKG_CONFIG" ]; then
4342 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4343 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4345 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
4346 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4347 CFG_SQL_sqlite=plugin
4349 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4351 SQLITE_AUTODETECT_FAILED="yes"
4354 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4355 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4356 CFG_SQL_sqlite=plugin
4359 SQLITE_AUTODETECT_FAILED="yes"
4363 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4364 echo "SQLite support cannot be enabled due to functionality tests!"
4365 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4366 echo " If you believe this message is in error you may use the continue"
4367 echo " switch (-continue) to $0 to continue."
4373 if [ "$OPT_VERBOSE" = "yes" ]; then
4374 echo "unknown SQL driver: $_SQLDR"
4380 # auto-detect NIS support
4381 if [ "$CFG_NIS" != "no" ]; then
4382 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
4385 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4386 echo "NIS support cannot be enabled due to functionality tests!"
4387 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4388 echo " If you believe this message is in error you may use the continue"
4389 echo " switch (-continue) to $0 to continue."
4397 # auto-detect CUPS support
4398 if [ "$CFG_CUPS" != "no" ]; then
4399 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
4402 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4403 echo "Cups support cannot be enabled due to functionality tests!"
4404 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4405 echo " If you believe this message is in error you may use the continue"
4406 echo " switch (-continue) to $0 to continue."
4414 # auto-detect iconv(3) support
4415 if [ "$CFG_ICONV" != "no" ]; then
4416 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4418 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
4420 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
4422 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
4425 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4426 echo "Iconv support cannot be enabled due to functionality tests!"
4427 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4428 echo " If you believe this message is in error you may use the continue"
4429 echo " switch (-continue) to $0 to continue."
4437 # auto-detect libdbus-1 support
4438 if [ "$CFG_DBUS" != "no" ]; then
4439 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4440 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4441 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4443 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
4444 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4445 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4446 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4448 if [ "$CFG_DBUS" = "auto" ]; then
4450 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4451 # CFG_DBUS is "yes" or "linked" here
4453 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4454 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4455 echo " If you believe this message is in error you may use the continue"
4456 echo " switch (-continue) to $0 to continue."
4463 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4465 # auto-detect Glib support
4466 if [ "$CFG_GLIB" != "no" ]; then
4467 if [ -n "$PKG_CONFIG" ]; then
4468 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4469 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4471 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 $X11TESTS_FLAGS ; then
4473 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4474 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4476 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4477 echo "Glib support cannot be enabled due to functionality tests!"
4478 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4479 echo " If you believe this message is in error you may use the continue"
4480 echo " switch (-continue) to $0 to continue."
4489 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4490 if [ -n "$PKG_CONFIG" ]; then
4491 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4492 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4494 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 $X11TESTS_FLAGS; then
4496 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4497 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4499 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4500 echo "Gstreamer support cannot be enabled due to functionality tests!"
4501 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4502 echo " If you believe this message is in error you may use the continue"
4503 echo " switch (-continue) to $0 to continue."
4509 elif [ "$CFG_GLIB" = "no" ]; then
4513 # auto-detect libicu support
4514 if [ "$CFG_ICU" != "no" ]; then
4515 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4516 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4518 if [ "$CFG_ICU" = "auto" ]; then
4520 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4523 echo "The ICU library support cannot be enabled."
4524 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4525 echo " If you believe this message is in error you may use the continue"
4526 echo " switch (-continue) to $0 to continue."
4532 # Auto-detect PulseAudio support
4533 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4534 if [ -n "$PKG_CONFIG" ]; then
4535 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4536 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4538 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 $X11TESTS_FLAGS; then
4540 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4541 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4543 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4544 echo "PulseAudio support cannot be enabled due to functionality tests!"
4545 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4546 echo " If you believe this message is in error you may use the continue"
4547 echo " switch (-continue) to $0 to continue."
4557 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4558 x11tests="$relpath/config.tests/x11"
4561 # work around broken X11 headers when using GCC 2.95 or later
4563 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4564 if [ $NOTYPE = "yes" ]; then
4565 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4566 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4569 # Check we actually have X11 :-)
4570 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4571 if [ $? != "0" ]; then
4572 echo "Basic XLib functionality test failed!"
4573 echo " You might need to modify the include and library search paths by editing"
4574 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4580 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4581 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4582 if [ "$CFG_GUI" = "no" ]; then
4583 if [ "$CFG_OPENGL" = "auto" ]; then
4586 if [ "$CFG_OPENGL" != "no" ]; then
4587 echo "OpenGL enabled, but GUI disabled."
4588 echo " You might need to either enable the GUI or disable OpenGL"
4592 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4593 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4595 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
4598 if [ "$CFG_OPENGL" = "yes" ]; then
4599 echo "All the OpenGL functionality tests failed!"
4600 echo " You might need to modify the include and library search paths by editing"
4601 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4602 echo " ${XQMAKESPEC}."
4609 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4610 if [ "$CFG_OPENGL" = "desktop" ]; then
4611 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4612 if [ $? != "0" ]; then
4613 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4620 elif [ "$CFG_OPENGL" = "es2" ]; then
4622 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4623 if [ $? != "0" ]; then
4624 echo "The OpenGL ES 2.0 functionality test failed!"
4625 echo " You might need to modify the include and library search paths by editing"
4626 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4627 echo " ${XQMAKESPEC}."
4630 elif [ "$CFG_OPENGL" = "desktop" ]; then
4631 # Desktop OpenGL support
4632 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4633 if [ $? != "0" ]; then
4634 echo "The OpenGL functionality test failed!"
4635 echo " You might need to modify the include and library search paths by editing"
4636 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4637 echo " ${XQMAKESPEC}."
4642 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4643 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4644 if [ $? != "0" ]; then
4645 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4652 fi # X11/MINGW OpenGL
4655 if [ "$PLATFORM_X11" = "yes" ]; then
4656 # auto-detect Xcursor support
4657 if [ "$CFG_XCURSOR" != "no" ]; then
4658 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xcursor "Xcursor" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4659 if [ "$CFG_XCURSOR" != "runtime" ]; then
4663 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4664 echo "Xcursor support cannot be enabled due to functionality tests!"
4665 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4666 echo " If you believe this message is in error you may use the continue"
4667 echo " switch (-continue) to $0 to continue."
4675 # auto-detect Xfixes support
4676 if [ "$CFG_XFIXES" != "no" ]; then
4677 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4678 if [ "$CFG_XFIXES" != "runtime" ]; then
4682 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4683 echo "Xfixes support cannot be enabled due to functionality tests!"
4684 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4685 echo " If you believe this message is in error you may use the continue"
4686 echo " switch (-continue) to $0 to continue."
4694 # auto-detect Xrandr support (resize and rotate extension)
4695 if [ "$CFG_XRANDR" != "no" ]; then
4696 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrandr "Xrandr" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4697 if [ "$CFG_XRANDR" != "runtime" ]; then
4701 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4702 echo "Xrandr support cannot be enabled due to functionality tests!"
4703 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4704 echo " If you believe this message is in error you may use the continue"
4705 echo " switch (-continue) to $0 to continue."
4713 # auto-detect Xrender support
4714 if [ "$CFG_XRENDER" != "no" ]; then
4715 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4718 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4719 echo "Xrender support cannot be enabled due to functionality tests!"
4720 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4721 echo " If you believe this message is in error you may use the continue"
4722 echo " switch (-continue) to $0 to continue."
4730 # auto-detect MIT-SHM support
4731 if [ "$CFG_MITSHM" != "no" ]; then
4732 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/mitshm "mitshm" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4735 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4736 echo "MITSHM support cannot be enabled due to functionality tests!"
4737 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4738 echo " If you believe this message is in error you may use the continue"
4739 echo " switch (-continue) to $0 to continue."
4747 # auto-detect Session Management support
4748 if [ "$CFG_SM" = "auto" ]; then
4749 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/sm "Session Management" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4752 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4753 echo "Session Management support cannot be enabled due to functionality tests!"
4754 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4755 echo " If you believe this message is in error you may use the continue"
4756 echo " switch (-continue) to $0 to continue."
4764 # auto-detect SHAPE support
4765 if [ "$CFG_XSHAPE" != "no" ]; then
4766 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xshape "XShape" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4769 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4770 echo "XShape support cannot be enabled due to functionality tests!"
4771 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4772 echo " If you believe this message is in error you may use the continue"
4773 echo " switch (-continue) to $0 to continue."
4781 # auto-detect XVideo support
4782 if [ "$CFG_XVIDEO" != "no" ]; then
4783 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xvideo "XVideo" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4786 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4787 echo "XVideo support cannot be enabled due to functionality tests!"
4788 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4789 echo " If you believe this message is in error you may use the continue"
4790 echo " switch (-continue) to $0 to continue."
4798 # auto-detect XSync support
4799 if [ "$CFG_XSYNC" != "no" ]; then
4800 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4803 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4804 echo "XSync support cannot be enabled due to functionality tests!"
4805 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4806 echo " If you believe this message is in error you may use the continue"
4807 echo " switch (-continue) to $0 to continue."
4815 # auto-detect Xinerama support
4816 if [ "$CFG_XINERAMA" != "no" ]; then
4817 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinerama "Xinerama" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4818 if [ "$CFG_XINERAMA" != "runtime" ]; then
4822 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4823 echo "Xinerama support cannot be enabled due to functionality tests!"
4824 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4825 echo " If you believe this message is in error you may use the continue"
4826 echo " switch (-continue) to $0 to continue."
4834 # auto-detect Xinput support
4835 if [ "$CFG_XINPUT" != "no" ]; then
4836 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput "XInput" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4837 if [ "$CFG_XINPUT" != "runtime" ]; then
4841 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4842 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4843 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4844 echo " If you believe this message is in error you may use the continue"
4845 echo " switch (-continue) to $0 to continue."
4853 # auto-detect XKB support
4854 if [ "$CFG_XKB" != "no" ]; then
4855 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xkb "XKB" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4858 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4859 echo "XKB support cannot be enabled due to functionality tests!"
4860 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4861 echo " If you believe this message is in error you may use the continue"
4862 echo " switch (-continue) to $0 to continue."
4870 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4871 if [ -n "$PKG_CONFIG" ]; then
4872 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4873 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4875 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4877 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4878 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4880 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4881 echo "Gtk theme support cannot be enabled due to functionality tests!"
4882 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4883 echo " If you believe this message is in error you may use the continue"
4884 echo " switch (-continue) to $0 to continue."
4890 elif [ "$CFG_GLIB" = "no" ]; then
4895 # auto-detect FontConfig support
4896 if [ "$CFG_FONTCONFIG" != "no" ]; then
4897 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4898 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4899 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4901 QT_CFLAGS_FONTCONFIG=
4902 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4904 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4906 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4907 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4908 CFG_LIBFREETYPE=system
4910 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4911 echo "FontConfig support cannot be enabled due to functionality tests!"
4912 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4913 echo " If you believe this message is in error you may use the continue"
4914 echo " switch (-continue) to $0 to continue."
4923 if [ "$BUILD_ON_MAC" = "yes" ]; then
4924 if [ "$CFG_PHONON" != "no" ]; then
4925 # Always enable Phonon (unless it was explicitly disabled)
4929 if [ "$CFG_COREWLAN" = "auto" ]; then
4930 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
4938 if [ "$PLATFORM_QPA" = "yes" ]; then
4939 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4940 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4941 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4943 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
4946 if [ "$CFG_OPENGL" = "yes" ]; then
4947 echo "All the OpenGL functionality tests failed!"
4948 echo " You might need to modify the include and library search paths by editing"
4949 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4950 echo " ${XQMAKESPEC}."
4955 elif [ "$CFG_OPENGL" = "es2" ]; then
4957 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4958 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4959 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4960 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4961 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4962 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4963 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4964 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4967 "$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
4968 if [ $? != "0" ]; then
4969 echo "The OpenGL ES 2.0 functionality test failed!"
4970 echo " You might need to modify the include and library search paths by editing"
4971 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4972 echo " ${XQMAKESPEC}."
4975 elif [ "$CFG_OPENGL" = "desktop" ]; then
4976 # Desktop OpenGL support
4977 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4978 if [ $? != "0" ]; then
4979 echo "The OpenGL functionality test failed!"
4980 echo " You might need to modify the include and library search paths by editing"
4981 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4982 echo " ${XQMAKESPEC}."
4987 # auto-detect FontConfig support
4988 if [ "$CFG_FONTCONFIG" != "no" ]; then
4989 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4990 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4991 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4993 QT_CFLAGS_FONTCONFIG=
4994 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4996 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4997 QT_CONFIG="$QT_CONFIG fontconfig"
4998 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4999 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5000 CFG_LIBFREETYPE=system
5005 # Save these for a check later
5006 ORIG_CFG_XCB="$CFG_XCB"
5007 ORIG_CFG_EGLFS="$CFG_EGLFS"
5009 if [ "$CFG_LIBUDEV" != "no" ]; then
5010 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5011 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5012 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5013 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5014 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5016 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
5018 QT_CONFIG="$QT_CONFIG libudev"
5019 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5020 echo "The libudev functionality test failed!"
5024 QMakeVar add DEFINES QT_NO_LIBUDEV
5028 if [ "$CFG_EVDEV" != "no" ]; then
5029 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5031 QT_CONFIG="$QT_CONFIG evdev"
5032 elif [ "$CFG_EVDEV" = "yes" ]; then
5033 echo "The evdev functionality test failed!"
5037 QMakeVar add DEFINES QT_NO_EVDEV
5041 # Check we actually have X11 :-)
5042 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5043 QT_CONFIG="$QT_CONFIG xlib"
5046 # auto-detect Xrender support
5047 if [ "$CFG_XRENDER" != "no" ]; then
5048 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5050 QT_CONFIG="$QT_CONFIG xrender"
5052 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5053 echo "Xrender support cannot be enabled due to functionality tests!"
5054 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5055 echo " If you believe this message is in error you may use the continue"
5056 echo " switch (-continue) to $0 to continue."
5064 if [ "$CFG_XCB" != "no" ]; then
5065 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
5066 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5067 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5069 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
5071 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
5072 QT_CONFIG="$QT_CONFIG xcb-render"
5075 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
5077 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5080 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
5081 QT_CONFIG="$QT_CONFIG xcb-xlib"
5084 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5085 # auto-detect XInput2/Xinput support
5086 if [ "$CFG_XINPUT2" != "no" ]; then
5087 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5091 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5092 echo "XInput2 support cannot be enabled due to functionality tests!"
5093 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5094 echo " If you believe this message is in error you may use the continue"
5095 echo " switch (-continue) to $0 to continue."
5104 if [ "$CFG_XCB" = "yes" ]; then
5105 echo "The XCB test failed!"
5106 echo " You might need to install dependency packages."
5107 echo " See src/plugins/platforms/xcb/README."
5111 QMakeVar add DEFINES QT_NO_XCB
5115 # Detect libxkbcommon
5116 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5117 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5118 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5119 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5120 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5122 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5126 if [ "$CFG_EGL" != "no" ]; then
5127 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
5128 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5129 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
5130 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
5131 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
5132 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
5133 fi # detect EGL support
5134 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
5136 elif [ "$CFG_EGL" = "yes" ]; then
5137 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
5138 echo " You might need to modify the include and library search paths by editing"
5139 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
5146 if [ "$CFG_EGLFS" != "no" ]; then
5147 CFG_EGLFS="$CFG_EGL"
5150 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5151 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5152 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5153 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5156 if [ "$BUILD_ON_MAC" = "yes" ]; then
5157 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
5158 QT_CONFIG="$QT_CONFIG coreservices"
5160 QMakeVar add DEFINES QT_NO_CORESERVICES
5164 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5165 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
5166 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
5167 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
5168 echo "No QPA platform plugin enabled!"
5169 echo " If you really want to build without a QPA platform plugin you must pass"
5170 echo " -no-xcb and -no-eglfs to configure. Doing this will"
5171 echo " produce a Qt that cannot run GUI applications."
5172 echo " The dependencies needed for xcb to build are listed in"
5173 echo " src/plugins/platforms/xcb/README"
5181 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5184 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5185 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5186 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
5187 CFG_LIBFREETYPE=system
5194 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5198 if [ "$CFG_STL" != "no" ]; then
5199 if [ "$HAVE_STL" = "yes" ]; then
5202 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5203 echo "STL support cannot be enabled due to functionality tests!"
5204 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5205 echo " If you believe this message is in error you may use the continue"
5206 echo " switch (-continue) to $0 to continue."
5214 # detect POSIX clock_gettime()
5215 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5216 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
5217 CFG_CLOCK_GETTIME=yes
5219 CFG_CLOCK_GETTIME=no
5223 # detect POSIX monotonic clocks
5224 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5225 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
5226 CFG_CLOCK_MONOTONIC=yes
5228 CFG_CLOCK_MONOTONIC=no
5230 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5231 CFG_CLOCK_MONOTONIC=no
5235 if [ "$CFG_MREMAP" = "auto" ]; then
5236 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5243 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5244 if [ "$CFG_GETADDRINFO" != "no" ]; then
5245 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5248 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5249 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5250 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5251 echo " If you believe this message is in error you may use the continue"
5252 echo " switch (-continue) to $0 to continue."
5260 # find if the platform provides inotify
5261 if [ "$CFG_INOTIFY" != "no" ]; then
5262 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5265 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5266 echo "inotify support cannot be enabled due to functionality tests!"
5267 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5268 echo " If you believe this message is in error you may use the continue"
5269 echo " switch (-continue) to $0 to continue."
5277 # find if the platform provides if_nametoindex (ipv6 interface name support)
5278 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5279 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
5282 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5283 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5284 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5285 echo " If you believe this message is in error you may use the continue"
5286 echo " switch (-continue) to $0 to continue."
5294 # find if the platform provides getifaddrs (network interface enumeration)
5295 if [ "$CFG_GETIFADDRS" != "no" ]; then
5296 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5299 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5300 echo "getifaddrs support cannot be enabled due to functionality tests!"
5301 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5302 echo " If you believe this message is in error you may use the continue"
5303 echo " switch (-continue) to $0 to continue."
5312 if [ "$CFG_OPENSSL" != "no" ]; then
5313 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
5314 if [ "$CFG_OPENSSL" = "auto" ]; then
5318 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5319 echo "OpenSSL support cannot be enabled due to functionality tests!"
5320 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5321 echo " If you believe this message is in error you may use the continue"
5322 echo " switch (-continue) to $0 to continue."
5331 if [ "$CFG_PCRE" != "qt" ]; then
5332 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5335 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5336 echo "PCRE support cannot be enabled due to functionality tests!"
5337 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5338 echo " If you believe this message is in error you may use the continue"
5339 echo " switch (-continue) to $0 to continue."
5347 # detect OpenVG support
5348 if [ "$CFG_OPENVG" != "no" ]; then
5349 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
5350 if [ "$CFG_OPENVG" = "auto" ]; then
5353 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
5354 if [ "$CFG_OPENVG" = "auto" ]; then
5357 CFG_OPENVG_ON_OPENGL=yes
5358 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
5359 if [ "$CFG_OPENVG" = "auto" ]; then
5362 CFG_OPENVG_LC_INCLUDES=yes
5363 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
5364 if [ "$CFG_OPENVG" = "auto" ]; then
5367 CFG_OPENVG_LC_INCLUDES=yes
5368 CFG_OPENVG_ON_OPENGL=yes
5370 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5371 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5372 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5373 echo " If you believe this message is in error you may use the continue"
5374 echo " switch (-continue) to $0 to continue."
5380 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
5381 CFG_OPENVG_SHIVA=yes
5385 if [ "$CFG_ALSA" = "auto" ]; then
5386 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5393 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5394 if [ "$CFG_ARCH" = "arm" ]; then
5395 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5396 if [ $? != "0" ]; then
5397 CFG_JAVASCRIPTCORE_JIT=no
5400 case "$XPLATFORM" in
5402 CFG_JAVASCRIPTCORE_JIT=no
5408 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5409 QMakeVar set JAVASCRIPTCORE_JIT yes
5410 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5411 QMakeVar set JAVASCRIPTCORE_JIT no
5414 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5415 CFG_AUDIO_BACKEND=yes
5418 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5419 echo "Warning: largefile support cannot be disabled for win32."
5423 #-------------------------------------------------------------------------------
5424 # ask for all that hasn't been auto-detected or specified in the arguments
5425 #-------------------------------------------------------------------------------
5427 # enable dwarf2 support on Mac
5428 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5429 QT_CONFIG="$QT_CONFIG dwarf2"
5432 # Detect the default arch (x86 or x86_64) on Mac OS X
5433 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5435 case `file "${outpath}/bin/qmake"` in
5443 # unsupported/unknown
5447 if [ -n "$DEFAULT_ARCH" ]; then
5448 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5449 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5450 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5451 # Make the application arch follow the Qt arch
5452 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5457 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5458 QT_CONFIG="$QT_CONFIG phonon-backend"
5461 # disable accessibility
5462 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5463 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5465 QT_CONFIG="$QT_CONFIG accessibility"
5469 if [ "$CFG_EGL" = "yes" ]; then
5470 QT_CONFIG="$QT_CONFIG egl"
5472 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5476 if [ "$CFG_EGLFS" = "yes" ]; then
5477 QT_CONFIG="$QT_CONFIG eglfs"
5479 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5483 if [ "$CFG_OPENVG" = "no" ]; then
5484 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5486 QT_CONFIG="$QT_CONFIG openvg"
5487 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5488 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5490 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5491 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5493 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5494 QT_CONFIG="$QT_CONFIG shivavg"
5495 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5500 if [ "$CFG_OPENGL" = "no" ]; then
5501 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5503 QT_CONFIG="$QT_CONFIG opengl"
5506 if [ "$CFG_OPENGL" = "es2" ]; then
5507 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5510 if [ "$CFG_OPENGL" = "es2" ]; then
5511 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5512 QT_CONFIG="$QT_CONFIG opengles2"
5515 # safe execution environment
5516 if [ "$CFG_SXE" != "no" ]; then
5517 QT_CONFIG="$QT_CONFIG sxe"
5520 # build up the variables for output
5521 if [ "$CFG_DEBUG" = "yes" ]; then
5522 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5523 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5524 elif [ "$CFG_DEBUG" = "no" ]; then
5525 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5526 QMAKE_CONFIG="$QMAKE_CONFIG release"
5528 if [ "$CFG_SHARED" = "yes" ]; then
5529 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5530 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5531 elif [ "$CFG_SHARED" = "no" ]; then
5532 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5533 QMAKE_CONFIG="$QMAKE_CONFIG static"
5535 if [ "$PLATFORM_QPA" = "yes" ]; then
5536 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5537 QT_CONFIG="$QT_CONFIG qpa"
5538 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5539 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5542 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5543 # Do not set this here for Windows. Let qmake do it so
5544 # debug and release precompiled headers are kept separate.
5545 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5547 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5548 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5549 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5550 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5551 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5552 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5554 if [ "$CFG_STL" = "no" ]; then
5555 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5557 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5559 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5560 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5562 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5563 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5564 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5565 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5566 QMakeVar add QMAKE_CFLAGS -g
5567 QMakeVar add QMAKE_CXXFLAGS -g
5568 QT_CONFIG="$QT_CONFIG separate_debug_info"
5570 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5571 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5573 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5574 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5575 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5576 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5577 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5578 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5579 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5580 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5581 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5582 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5583 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5584 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5585 QT_CONFIG="$QT_CONFIG clock-gettime"
5587 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5588 QT_CONFIG="$QT_CONFIG clock-monotonic"
5590 if [ "$CFG_MREMAP" = "yes" ]; then
5591 QT_CONFIG="$QT_CONFIG mremap"
5593 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5594 QT_CONFIG="$QT_CONFIG getaddrinfo"
5596 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5597 QT_CONFIG="$QT_CONFIG ipv6ifname"
5599 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5600 QT_CONFIG="$QT_CONFIG getifaddrs"
5602 if [ "$CFG_INOTIFY" = "yes" ]; then
5603 QT_CONFIG="$QT_CONFIG inotify"
5605 if [ "$CFG_LIBJPEG" = "no" ]; then
5607 elif [ "$CFG_LIBJPEG" = "system" ]; then
5608 QT_CONFIG="$QT_CONFIG system-jpeg"
5610 if [ "$CFG_JPEG" = "no" ]; then
5611 QT_CONFIG="$QT_CONFIG no-jpeg"
5612 elif [ "$CFG_JPEG" = "yes" ]; then
5613 QT_CONFIG="$QT_CONFIG jpeg"
5615 if [ "$CFG_LIBPNG" = "no" ]; then
5618 if [ "$CFG_LIBPNG" = "system" ]; then
5619 QT_CONFIG="$QT_CONFIG system-png"
5621 if [ "$CFG_PNG" = "no" ]; then
5622 QT_CONFIG="$QT_CONFIG no-png"
5623 elif [ "$CFG_PNG" = "yes" ]; then
5624 QT_CONFIG="$QT_CONFIG png"
5626 if [ "$CFG_GIF" = "no" ]; then
5627 QT_CONFIG="$QT_CONFIG no-gif"
5628 elif [ "$CFG_GIF" = "yes" ]; then
5629 QT_CONFIG="$QT_CONFIG gif"
5631 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5632 QT_CONFIG="$QT_CONFIG no-freetype"
5633 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5634 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5635 QT_CONFIG="$QT_CONFIG system-freetype"
5637 QT_CONFIG="$QT_CONFIG freetype"
5639 if [ "$CFG_GUI" = "auto" ]; then
5642 if [ "$CFG_GUI" = "no" ]; then
5643 QT_CONFIG="$QT_CONFIG no-gui"
5646 if [ "$CFG_WIDGETS" = "no" ]; then
5647 QT_CONFIG="$QT_CONFIG no-widgets"
5648 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5651 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5652 #On Mac we implicitly link against libz, so we
5653 #never use the 3rdparty stuff.
5654 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5656 if [ "$CFG_ZLIB" = "yes" ]; then
5657 QT_CONFIG="$QT_CONFIG zlib"
5658 elif [ "$CFG_ZLIB" = "system" ]; then
5659 QT_CONFIG="$QT_CONFIG system-zlib"
5662 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5663 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5664 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5665 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5666 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5667 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5668 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5669 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5670 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5671 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
5672 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5673 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5674 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5675 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5676 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5678 if [ "$PLATFORM_X11" = "yes" ]; then
5679 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5681 # for some reason, the following libraries are not always built shared,
5682 # so *every* program/lib (including Qt) has to link against them
5683 if [ "$CFG_XSHAPE" = "yes" ]; then
5684 QT_CONFIG="$QT_CONFIG xshape"
5686 if [ "$CFG_XVIDEO" = "yes" ]; then
5687 QT_CONFIG="$QT_CONFIG xvideo"
5689 if [ "$CFG_XSYNC" = "yes" ]; then
5690 QT_CONFIG="$QT_CONFIG xsync"
5692 if [ "$CFG_XINERAMA" = "yes" ]; then
5693 QT_CONFIG="$QT_CONFIG xinerama"
5694 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5696 if [ "$CFG_XCURSOR" = "yes" ]; then
5697 QT_CONFIG="$QT_CONFIG xcursor"
5698 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5700 if [ "$CFG_XFIXES" = "yes" ]; then
5701 QT_CONFIG="$QT_CONFIG xfixes"
5702 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5704 if [ "$CFG_XRANDR" = "yes" ]; then
5705 QT_CONFIG="$QT_CONFIG xrandr"
5706 if [ "$CFG_XRENDER" != "yes" ]; then
5707 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5708 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5710 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5713 if [ "$CFG_XRENDER" = "yes" ]; then
5714 QT_CONFIG="$QT_CONFIG xrender"
5715 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5717 if [ "$CFG_MITSHM" = "yes" ]; then
5718 QT_CONFIG="$QT_CONFIG mitshm"
5720 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5721 QT_CONFIG="$QT_CONFIG fontconfig"
5723 if [ "$CFG_XINPUT" = "yes" ]; then
5724 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5726 if [ "$CFG_XINPUT" = "yes" ]; then
5727 QT_CONFIG="$QT_CONFIG xinput tablet"
5729 if [ "$CFG_XKB" = "yes" ]; then
5730 QT_CONFIG="$QT_CONFIG xkb"
5734 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5735 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5736 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5738 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5739 if [ "$CFG_RPATH" = "yes" ]; then
5740 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5741 # set the default rpath to the library installation directory
5742 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5744 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5745 if [ -n "$RPATH_FLAGS" ]; then
5747 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5751 elif [ "$CFG_RPATH" = "yes" ]; then
5752 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5756 if [ "$CFG_RPATH" = "yes" ]; then
5757 # set the default rpath to the library installation directory
5758 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5760 if [ -n "$RPATH_FLAGS" ]; then
5761 # add the user defined rpaths
5762 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5766 if [ '!' -z "$I_FLAGS" ]; then
5767 # add the user define include paths
5768 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5769 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5772 if [ '!' -z "$W_FLAGS" ]; then
5773 # add the user defined warning flags
5774 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5775 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5776 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5779 # turn off exceptions for the compilers that support it
5780 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5781 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5783 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5786 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5787 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5790 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5791 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5792 # Follow default behavior of configure.exe by overriding with "rtti".
5793 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5796 if [ "$CFG_ALSA" = "yes" ]; then
5797 QT_CONFIG="$QT_CONFIG alsa"
5800 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5801 QT_CONFIG="$QT_CONFIG pulseaudio"
5804 if [ "$CFG_COREWLAN" = "yes" ]; then
5805 QT_CONFIG="$QT_CONFIG corewlan"
5808 if [ "$CFG_ICU" = "yes" ]; then
5809 QT_CONFIG="$QT_CONFIG icu"
5812 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5813 QT_CONFIG="$QT_CONFIG force_asserts"
5816 if [ "$CFG_PCRE" = "qt" ]; then
5817 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5821 # Some Qt modules are too advanced in C++ for some old compilers
5822 # Detect here the platforms where they are known to work.
5824 # See Qt documentation for more information on which features are
5825 # supported and on which compilers.
5827 canBuildQtConcurrent="yes"
5828 canUseV8Snapshot="yes"
5830 case "$XPLATFORM" in
5832 # PA-RISC's assembly is too limited
5833 # gcc 3.4 on that platform can't build QtXmlPatterns
5834 # the assembly it generates cannot be compiled
5836 # Check gcc's version
5837 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5841 canBuildQtXmlPatterns="no"
5845 canBuildQtXmlPatterns="no"
5849 unsupported/vxworks-*-g++*)
5852 unsupported/vxworks-*-dcc*)
5854 canBuildQtXmlPatterns="no"
5857 # Check gcc's version
5858 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5866 canBuildQtXmlPatterns="no"
5871 # Check the compiler version
5872 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5875 canBuildQtXmlPatterns="no"
5876 canBuildQtConcurrent="no"
5880 canBuildQtConcurrent="no"
5886 canBuildQtXmlPatterns="no"
5887 canBuildQtConcurrent="no"
5893 # Get the xlC version
5894 cat > xlcver.c <<EOF
5898 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5903 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5904 xlcver=`./xlcver 2>/dev/null`
5907 if [ "$OPT_VERBOSE" = "yes" ]; then
5908 if [ -n "$xlcver" ]; then
5909 echo Found IBM xlC version: $xlcver.
5911 echo Could not determine IBM xlC version, assuming oldest supported.
5918 canBuildQtXmlPatterns="no"
5919 canBuildQtConcurrent="no"
5923 canBuildQtConcurrent="no"
5929 canBuildQtConcurrent="no"
5933 if [ "$CFG_GUI" = "no" ]; then
5934 # WebKit requires QtGui
5938 if [ "$CFG_SHARED" = "no" ]; then
5940 echo "WARNING: Using static linking will disable the WebKit module."
5945 CFG_CONCURRENT="yes"
5946 if [ "$canBuildQtConcurrent" = "no" ]; then
5947 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5950 QT_CONFIG="$QT_CONFIG concurrent"
5954 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5955 QT_CONFIG="$QT_CONFIG audio-backend"
5959 if [ "$CFG_WEBKIT" = "debug" ]; then
5960 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5964 QT_CONFIG="$QT_CONFIG v8"
5965 # Detect snapshot support
5966 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5967 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5970 *) canUseV8Snapshot="no"
5974 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5975 # QEMU crashes when building inside Scratchbox with an ARM target
5976 canUseV8Snapshot="no"
5979 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5980 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5982 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5983 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5986 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5987 QT_CONFIG="$QT_CONFIG v8snapshot"
5991 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
5992 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
5995 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5998 QMakeVar add QMAKE_CFLAGS -fno-exceptions
5999 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6000 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6005 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6006 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6007 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6014 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6020 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6022 case "$COMPILER_VERSION" in
6024 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6025 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6026 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6029 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6030 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6031 QT_GCC_PATCH_VERSION=0
6041 #-------------------------------------------------------------------------------
6042 # part of configuration information goes into qconfig.h
6043 #-------------------------------------------------------------------------------
6045 case "$CFG_QCONFIG" in
6047 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6050 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6051 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6052 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6053 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6054 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6055 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6057 echo "#endif" >>"$tmpconfig"
6061 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6065 # define QT_EDITION $QT_EDITION
6069 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6070 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6072 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6073 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6076 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6077 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6080 if [ "$BUILD_ON_MAC" = "yes" ]; then
6081 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6082 #if defined(__LP64__)
6083 # define QT_POINTER_SIZE 8
6085 # define QT_POINTER_SIZE 4
6089 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6090 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6093 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6094 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6095 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6099 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6101 if [ "$CFG_DEV" = "yes" ]; then
6102 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6105 if [ "$PLATFORM_QPA" = "yes" ]; then
6106 # Add QPA to config.h
6107 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6110 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6111 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6114 # Add turned on SQL drivers
6115 for DRIVER in $CFG_SQL_AVAILABLE; do
6116 eval "VAL=\$CFG_SQL_$DRIVER"
6119 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6120 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6121 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6124 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6130 QMakeVar set sql-drivers "$SQL_DRIVERS"
6131 QMakeVar set sql-plugins "$SQL_PLUGINS"
6133 # Add other configuration options to the qconfig.h file
6134 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6135 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6136 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6137 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6138 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6139 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6140 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6142 # X11/Unix/Mac only configs
6143 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6144 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6145 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6146 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6147 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6148 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6149 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6150 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6151 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6152 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6153 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6154 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6155 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6156 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6157 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6159 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6160 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6161 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6162 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6163 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6164 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6165 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6166 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6167 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6168 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6169 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6170 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6171 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6173 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6174 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6175 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6176 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6177 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6178 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6179 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6180 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6182 # sort QCONFIG_FLAGS for neatness if we can
6183 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6184 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6186 if [ -n "$QCONFIG_FLAGS" ]; then
6187 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6188 #ifndef QT_BOOTSTRAPPED
6191 for cfg in $QCONFIG_FLAGS; do
6192 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6193 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6194 # figure out define logic, so we can output the correct
6195 # ifdefs to override the global defines in a project
6197 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6198 # QT_NO_option can be forcefully turned on by QT_option
6199 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6200 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6201 # QT_option can be forcefully turned off by QT_NO_option
6202 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6205 if [ -z $cfgdNeg ]; then
6206 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6213 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6214 #if defined($cfgd) && defined($cfgdNeg)
6216 #elif !defined($cfgd) && !defined($cfgdNeg)
6223 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6224 #endif // QT_BOOTSTRAPPED
6229 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6230 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6231 #define QT_VISIBILITY_AVAILABLE
6236 if [ -n "$QT_LIBINFIX" ]; then
6237 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6238 #define QT_LIBINFIX "$QT_LIBINFIX"
6243 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6244 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6245 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6247 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6248 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6249 chmod -w "$outpath/src/corelib/global/qconfig.h"
6250 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6251 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6255 #-------------------------------------------------------------------------------
6256 # save configuration into qconfig.pri
6257 #-------------------------------------------------------------------------------
6258 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6259 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6260 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6261 if [ "$CFG_DEBUG" = "yes" ]; then
6262 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6263 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6264 QT_CONFIG="$QT_CONFIG release"
6266 QT_CONFIG="$QT_CONFIG debug"
6267 elif [ "$CFG_DEBUG" = "no" ]; then
6268 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6269 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6270 QT_CONFIG="$QT_CONFIG debug"
6272 QT_CONFIG="$QT_CONFIG release"
6274 if [ "$CFG_STL" = "yes" ]; then
6275 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6277 if [ "$CFG_FRAMEWORK" = "no" ]; then
6278 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6280 QT_CONFIG="$QT_CONFIG qt_framework"
6281 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6283 if [ "$CFG_DEV" = "yes" ]; then
6284 QT_CONFIG="$QT_CONFIG private_tests"
6287 cat >>"$QTCONFIG.tmp" <<EOF
6289 CONFIG += $QTCONFIG_CONFIG
6291 QT_HOST_ARCH = $CFG_HOST_ARCH
6292 QT_EDITION = $Edition
6293 QT_CONFIG += $QT_CONFIG
6296 QT_VERSION = $QT_VERSION
6297 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6298 QT_MINOR_VERSION = $QT_MINOR_VERSION
6299 QT_PATCH_VERSION = $QT_PATCH_VERSION
6302 QT_LIBINFIX = $QT_LIBINFIX
6303 QT_NAMESPACE = $QT_NAMESPACE
6306 if [ -n "$CFG_SYSROOT" ]; then
6307 echo "# sysroot" >>"$QTCONFIG.tmp"
6308 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6309 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6310 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6311 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6312 echo "}" >> "$QTCONFIG.tmp"
6313 echo >> "$QTCONFIG.tmp"
6315 if [ -n "$RPATH_FLAGS" ]; then
6316 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
6318 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6319 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6320 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6321 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6324 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6325 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6326 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6329 # replace qconfig.pri if it differs from the newly created temp file
6330 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6331 rm -f "$QTCONFIG.tmp"
6333 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6336 #-------------------------------------------------------------------------------
6337 # save configuration into qmodule.pri
6338 #-------------------------------------------------------------------------------
6339 QTMODULE="$outpath/mkspecs/qmodule.pri"
6341 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6343 # Ensure we can link to uninistalled libraries
6344 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6345 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6347 if [ -n "$QT_CFLAGS_PSQL" ]; then
6348 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6350 if [ -n "$QT_LFLAGS_PSQL" ]; then
6351 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6353 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6354 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6356 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6357 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6359 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6360 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6362 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6363 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6365 if [ -n "$QT_LFLAGS_ODBC" ]; then
6366 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6368 if [ -n "$QT_LFLAGS_TDS" ]; then
6369 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6372 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6373 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6376 #dump in the OPENSSL_LIBS info
6377 if [ '!' -z "$OPENSSL_LIBS" ]; then
6378 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6379 elif [ "$CFG_OPENSSL" = "linked" ]; then
6380 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6383 #dump in the SDK info
6384 if [ '!' -z "$CFG_SDK" ]; then
6385 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6389 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6390 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6392 # replace qmodule.pri if it differs from the newly created temp file
6393 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6394 rm -f "$QTMODULE.tmp"
6396 mv -f "$QTMODULE.tmp" "$QTMODULE"
6399 #-------------------------------------------------------------------------------
6400 # save configuration into .qmake.cache
6401 #-------------------------------------------------------------------------------
6403 CACHEFILE="$outpath/.qmake.cache"
6404 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6405 cat >>"$CACHEFILE.tmp" <<EOF
6407 QT_SOURCE_TREE = \$\$quote($relpath)
6408 QT_BUILD_TREE = \$\$quote($outpath)
6409 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6411 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6412 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6413 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6415 include(\$\$PWD/mkspecs/qmodule.pri)
6416 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6420 #dump the qmake spec
6421 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6422 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6424 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6427 # replace .qmake.cache if it differs from the newly created temp file
6428 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6429 rm -f "$CACHEFILE.tmp"
6431 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6434 #-------------------------------------------------------------------------------
6435 # give feedback on configuration
6436 #-------------------------------------------------------------------------------
6440 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6443 This target is using the GNU C++ compiler ($PLATFORM).
6445 Recent versions of this compiler automatically include code for
6446 exceptions, which increase both the size of the Qt libraries and
6447 the amount of memory taken by your applications.
6449 You may choose to re-run `basename $0` with the -no-exceptions
6450 option to compile Qt without exceptions. This is completely binary
6451 compatible, and existing applications will continue to work.
6459 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6462 This target is using the MIPSpro C++ compiler ($PLATFORM).
6464 You may choose to re-run `basename $0` with the -no-exceptions
6465 option to compile Qt without exceptions. This will make the
6466 size of the Qt library smaller and reduce the amount of memory
6467 taken by your applications.
6479 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6480 echo "Build type: $PLATFORM"
6482 echo "Building on: $PLATFORM"
6483 echo "Building for: $XPLATFORM"
6486 echo "Architecture: $CFG_ARCH"
6487 if [ "$PLATFORM_QPA" = "yes" ]; then
6488 echo "Host architecture: $CFG_HOST_ARCH"
6491 if [ -n "$PLATFORM_NOTES" ]; then
6492 echo "Platform notes:"
6493 echo "$PLATFORM_NOTES"
6498 if [ "$OPT_VERBOSE" = "yes" ]; then
6499 echo $ECHO_N "qmake vars .......... $ECHO_C"
6500 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6501 echo "qmake switches ......... $QMAKE_SWITCHES"
6504 echo "Build .................. $CFG_BUILD_PARTS"
6505 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6506 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6507 echo "Debug .................. yes (combined)"
6508 if [ "$CFG_DEBUG" = "yes" ]; then
6509 echo "Default Link ........... debug"
6511 echo "Default Link ........... release"
6514 echo "Debug .................. $CFG_DEBUG"
6516 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6517 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6518 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6519 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6520 echo "QtGui module ........... $CFG_GUI"
6521 echo "QtWidgets module ....... $CFG_WIDGETS"
6522 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6523 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6525 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6527 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6528 echo "STL support ............ $CFG_STL"
6529 echo "PCH support ............ $CFG_PRECOMPILE"
6530 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6531 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6532 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6533 echo "AVX..................... ${CFG_AVX}"
6534 elif [ "$CFG_ARCH" = "arm" ]; then
6535 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6536 echo "NEON support ........... ${CFG_NEON}"
6538 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6539 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6540 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6541 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6542 echo "NIS support ............ $CFG_NIS"
6543 echo "CUPS support ........... $CFG_CUPS"
6544 echo "Iconv support .......... $CFG_ICONV"
6545 echo "Glib support ........... $CFG_GLIB"
6546 echo "GStreamer support ...... $CFG_GSTREAMER"
6547 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6548 echo "Large File support ..... $CFG_LARGEFILE"
6549 echo "GIF support ............ $CFG_GIF"
6550 if [ "$CFG_JPEG" = "no" ]; then
6551 echo "JPEG support ........... $CFG_JPEG"
6553 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6555 if [ "$CFG_PNG" = "no" ]; then
6556 echo "PNG support ............ $CFG_PNG"
6558 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6560 echo "zlib support ........... $CFG_ZLIB"
6561 echo "Session management ..... $CFG_SM"
6562 echo "libudev support ........ $CFG_LIBUDEV"
6564 if [ "$CFG_OPENGL" = "desktop" ]; then
6565 echo "OpenGL support ......... yes (Desktop OpenGL)"
6566 elif [ "$CFG_OPENGL" = "es2" ]; then
6567 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6569 echo "OpenGL support ......... no"
6572 if [ "$CFG_OPENVG" ]; then
6573 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6574 echo "OpenVG support ......... ShivaVG"
6576 echo "OpenVG support ......... $CFG_OPENVG"
6579 if [ "$PLATFORM_X11" = "yes" ]; then
6580 echo "NAS sound support ...... $CFG_NAS"
6581 echo "XShape support ......... $CFG_XSHAPE"
6582 echo "XVideo support ......... $CFG_XVIDEO"
6583 echo "XSync support .......... $CFG_XSYNC"
6584 echo "Xinerama support ....... $CFG_XINERAMA"
6585 echo "Xcursor support ........ $CFG_XCURSOR"
6586 echo "Xfixes support ......... $CFG_XFIXES"
6587 echo "Xrandr support ......... $CFG_XRANDR"
6588 echo "Xi support ............. $CFG_XINPUT"
6589 echo "MIT-SHM support ........ $CFG_MITSHM"
6590 echo "FontConfig support ..... $CFG_FONTCONFIG"
6591 echo "XKB Support ............ $CFG_XKB"
6592 echo "immodule support ....... $CFG_IM"
6593 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6595 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6596 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6597 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6598 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6599 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6600 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6601 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6602 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6603 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6606 if [ "$CFG_OPENSSL" = "yes" ]; then
6607 OPENSSL_LINKAGE="(run-time)"
6608 elif [ "$CFG_OPENSSL" = "linked" ]; then
6609 OPENSSL_LINKAGE="(linked)"
6611 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6612 echo "Alsa support ........... $CFG_ALSA"
6613 if [ "$BUILD_ON_MAC" = "yes" ]; then
6614 echo "CoreWlan support ....... $CFG_COREWLAN"
6616 echo "libICU support ......... $CFG_ICU"
6617 echo "PCRE support ........... $CFG_PCRE"
6618 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6619 echo "Xcb support ............ limited (old version)"
6621 echo "Xcb support ............ $CFG_XCB"
6623 echo "Xrender support ........ $CFG_XRENDER"
6624 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6625 echo "XInput2 support ........ $CFG_XINPUT2"
6627 echo "EGLFS support .......... $CFG_EGLFS"
6630 # complain about not being able to use dynamic plugins if we are using a static build
6631 if [ "$CFG_SHARED" = "no" ]; then
6633 echo "WARNING: Using static linking will disable the use of dynamically"
6634 echo "loaded plugins. Make sure to import all needed static plugins,"
6635 echo "or compile needed modules into the library."
6638 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6640 echo "NOTE: When linking against OpenSSL, you can override the default"
6641 echo "library names through OPENSSL_LIBS."
6643 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6646 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6648 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6649 echo "if you want a pure debug build."
6654 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6659 #-------------------------------------------------------------------------------
6660 # build makefiles based on the configuration
6661 #-------------------------------------------------------------------------------
6663 echo "Finding project files. Please wait..."
6664 if [ "$CFG_NOPROCESS" != "yes" ]; then
6665 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6666 if [ -f "${relpath}/qtbase.pro" ]; then
6667 mkfile="${outpath}/Makefile"
6668 [ -f "$mkfile" ] && chmod +w "$mkfile"
6669 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6673 # .projects -> projects to process
6674 # .projects.1 -> qt and moc
6675 # .projects.2 -> subdirs and libs
6676 # .projects.3 -> the rest
6677 rm -f .projects .projects.1 .projects.2 .projects.3
6679 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6680 if [ -z "$AWK" ]; then
6681 for p in `echo $QMAKE_PROJECTS`; do
6682 echo "$p" >> .projects
6685 cat >projects.awk <<EOF
6691 first = "./.projects.1.tmp"
6692 second = "./.projects.2.tmp"
6693 third = "./.projects.3.tmp"
6698 if ( ! target_file )
6700 print input_file >target_file
6705 input_file = FILENAME
6710 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6713 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6714 target_file = second
6719 matched_target == 0 && /^(TEMPLATE.*=)/ {
6720 if ( \$3 == "subdirs" )
6721 target_file = second
6722 else if ( \$3 == "lib" )
6728 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6729 if ( \$0 ~ /plugin/ )
6732 target_file = second
6737 if ( ! target_file )
6739 print input_file >>target_file
6746 for p in `echo $QMAKE_PROJECTS`; do
6747 echo "$p" >> .projects.all
6750 # if you get errors about the length of the command line to awk, change the -l arg
6752 split -l 100 .projects.all .projects.all.
6753 for p in .projects.all.*; do
6754 "$AWK" -f projects.awk `cat $p`
6755 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6756 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6757 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6758 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6760 rm -f .projects.all* projects.awk
6762 [ -f .projects.1 ] && cat .projects.1 >>.projects
6763 [ -f .projects.2 ] && cat .projects.2 >>.projects
6764 rm -f .projects.1 .projects.2
6765 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6766 cat .projects.3 >>.projects
6770 # don't sort Qt and MOC in with the other project files
6771 # also work around a segfaulting uniq(1)
6772 if [ -f .sorted.projects.2 ]; then
6773 sort .sorted.projects.2 > .sorted.projects.2.new
6774 mv -f .sorted.projects.2.new .sorted.projects.2
6775 cat .sorted.projects.2 >> .sorted.projects.1
6777 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6778 rm -f .sorted.projects.2 .sorted.projects.1
6782 if [ -f .projects ]; then
6783 uniq .projects >.tmp
6784 mv -f .tmp .projects
6785 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6787 if [ -f .projects.3 ]; then
6788 uniq .projects.3 >.tmp
6789 mv -f .tmp .projects.3
6790 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6792 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6796 for part in $CFG_BUILD_PARTS; do
6798 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6799 libs) PART_ROOTS="$PART_ROOTS src" ;;
6800 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6801 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6806 if [ "$CFG_DEV" = "yes" ]; then
6807 PART_ROOTS="$PART_ROOTS tests"
6810 echo "Creating makefiles. Please wait..."
6811 for file in .projects .projects.3; do
6812 [ '!' -f "$file" ] && continue
6813 for a in `cat $file`; do
6815 for r in $PART_ROOTS; do
6816 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6821 [ "$IN_ROOT" = "no" ] && continue
6824 *winmain/winmain.pro)
6825 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6829 */qmake/qmake.pro) continue ;;
6830 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6831 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6837 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6838 test -d "$dir" || mkdir -p "$dir"
6839 OUTDIR="$outpath/$dir"
6840 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6841 # fast configure - the makefile exists, skip it
6842 # since the makefile exists, it was generated by qmake, which means we
6843 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6845 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6848 QMAKE_SPEC_ARGS="-spec $SPEC"
6849 echo $ECHO_N " for $a$ECHO_C"
6851 QMAKE="$outpath/bin/qmake"
6852 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6853 if [ "$file" = ".projects.3" ]; then
6856 cat >"${OUTDIR}/Makefile" <<EOF
6857 # ${OUTDIR}/Makefile: generated by configure
6859 # WARNING: This makefile will be replaced with a real makefile.
6860 # All changes made to this file will be lost.
6862 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6864 cat >>"${OUTDIR}/Makefile" <<EOF
6866 all clean install qmake first Makefile: FORCE
6867 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6875 if [ "$OPT_VERBOSE" = "yes" ]; then
6876 echo " (`basename $SPEC`)"
6877 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6882 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6883 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6887 rm -f .projects .projects.3
6889 #-------------------------------------------------------------------------------
6890 # check for platforms that we don't yet know about
6891 #-------------------------------------------------------------------------------
6892 if [ "$CFG_ARCH" = "unknown" ]; then
6895 NOTICE: configure was unable to determine the architecture
6896 for the $XQMAKESPEC target.
6898 Qt will not use a specialized implementation for any atomic
6899 operations. Instead a generic implemention based on either GCC
6900 intrinsics or C++11 std::atomic<T> will be used (when
6901 available). The generic implementations are generally as fast
6902 as and always as safe as a specialized implementation.
6904 If no generic implementation is available, Qt will use a
6905 fallback UNIX implementation which uses a single
6906 pthread_mutex_t to protect all atomic operations. This
6907 implementation is the slow (but safe) fallback implementation
6908 for architectures Qt does not yet support.
6912 #-------------------------------------------------------------------------------
6913 # check if the user passed the -no-zlib option, which is no longer supported
6914 #-------------------------------------------------------------------------------
6915 if [ -n "$ZLIB_FORCED" ]; then
6916 which_zlib="supplied"
6917 if [ "$CFG_ZLIB" = "system" ]; then
6923 NOTICE: The -no-zlib option was supplied but is no longer
6926 Qt now requires zlib support in all builds, so the -no-zlib
6927 option was ignored. Qt will be built using the $which_zlib
6932 #-------------------------------------------------------------------------------
6933 # check if the user passed the obsoleted -wayland or -no-wayland flag
6934 #-------------------------------------------------------------------------------
6935 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6938 NOTICE: The -wayland and -no-wayland flags are now obsolete
6940 All configuring of QtWayland plugin and QtCompositor happens in the module
6944 #-------------------------------------------------------------------------------
6945 # check if the user passed the obsoleted -arch or -host-arch options
6946 #-------------------------------------------------------------------------------
6947 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6950 NOTICE: The -arch and -host-arch options are obsolete.
6952 Qt now detects the target and host architectures based on compiler
6953 output. Qt will be built using $CFG_ARCH for the target architecture
6954 and $CFG_HOST_ARCH for the host architecture (note that these two
6955 will be the same unless you are cross-compiling).
6959 #-------------------------------------------------------------------------------
6960 # finally save the executed command to another script
6961 #-------------------------------------------------------------------------------
6962 if [ `basename $0` != "config.status" ]; then
6963 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6965 # add the system variables
6966 for varname in $SYSTEM_VARIABLES; do
6968 'if [ -n "\$'${varname}'" ]; then
6969 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6974 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6976 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6977 echo "#!/bin/sh" > "$outpath/config.status"
6978 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6979 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6980 echo "else" >> "$outpath/config.status"
6981 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6982 echo "fi" >> "$outpath/config.status"
6983 chmod +x "$outpath/config.status"
6986 if [ -n "$RPATH_MESSAGE" ]; then
6988 echo "$RPATH_MESSAGE"
6991 MAKE=`basename "$MAKE"`
6993 echo Qt is now configured for building. Just run \'$MAKE\'.
6994 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6995 echo Once everything is built, Qt is installed.
6996 echo You should not run \'$MAKE install\'.
6998 echo Once everything is built, you must run \'$MAKE install\'.
6999 echo Qt will be installed into $QT_INSTALL_PREFIX
7002 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.