2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
74 DEVICE_VARS_FILE=.device.vars
77 :> "$DEVICE_VARS_FILE"
79 #-------------------------------------------------------------------------------
81 #-------------------------------------------------------------------------------
85 echo "$@" | sed 's/ /\ /g'
88 # Adds a new qmake variable to the cache
89 # Usage: QMakeVar mode varname contents
90 # where mode is one of: set, add, del
104 echo >&2 "BUG: wrong command to QMakeVar: $1"
108 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
111 # Helper function for getQMakeConf. It parses include statements in
112 # qmake.conf and prints out the expanded file
115 while read line; do case "$line" in
117 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
118 current_dir=`dirname "$1"`
119 conf_file="$current_dir/$inc_file"
120 if [ ! -f "$conf_file" ]; then
121 echo "WARNING: Unable to find file $conf_file" >&2
124 getQMakeConf1 "$conf_file"
136 values["LITERAL_WHITESPACE"] = " "
137 values["LITERAL_DOLLAR"] = "$"
139 /^[_A-Z0-9.]+[ \t]*\+?=/ {
140 valStart = index($0, "=") + 1
143 if (substr($0, valStart - 2, 1) == "+") {
147 variable = substr($0, 0, valStart - 2 - append)
148 value = substr($0, valStart)
149 gsub("[ \t]+", "", variable)
150 gsub("^[ \t]+", "", value)
151 gsub("[ \t]+$", "", value)
154 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
155 ovalue = ovalue substr(value, 1, RSTART - 1)
156 var = substr(value, RSTART + 2, RLENGTH - 2)
157 value = substr(value, RSTART + RLENGTH)
159 var = substr(var, 2, length(var) - 2)
161 ovalue = ovalue values[var]
163 ovalue = ovalue value
165 combinedValue = values[variable]
166 if (append == 1 && length(combinedValue) > 0) {
167 combinedValue = combinedValue " " ovalue
169 combinedValue = ovalue
171 values[variable] = combinedValue
174 for (var in values) {
175 print var "=" values[var]
183 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
186 # relies on $QMAKESPEC being set correctly. parses include statements in
187 # qmake.conf and prints out the expanded file
190 if [ -z "$specvals" ]; then
191 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
193 getQMakeConf3 "$1" "$specvals"
198 if [ -z "$xspecvals" ]; then
199 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$xspecvals"
204 # relies on $TEST_COMPILER being set correctly
205 compilerSupportsFlag()
207 cat >conftest.cpp <<EOF
208 int main() { return 0; }
210 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
212 rm -f conftest.cpp conftest.o
216 # relies on $TEST_COMPILER being set correctly
222 safe_flag=`shellEscape "$flag"`
223 lflags=$lflags,$safe_flag
225 compilerSupportsFlag "$lflags" >/dev/null 2>&1
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
238 echo >&2 "BUG: wrong command to QMakeVar: $1"
242 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
245 #-------------------------------------------------------------------------------
246 # operating system detection
247 #-------------------------------------------------------------------------------
249 # need that throughout the script
250 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
251 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
252 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
253 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
255 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
256 if echo '\c' | grep '\c' >/dev/null; then
262 #-------------------------------------------------------------------------------
263 # window system detection
264 #-------------------------------------------------------------------------------
270 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
275 #-----------------------------------------------------------------------------
276 # Qt version detection
277 #-----------------------------------------------------------------------------
278 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
282 if [ -n "$QT_VERSION" ]; then
283 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
284 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
285 if [ -n "$MAJOR" ]; then
286 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
287 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
288 QT_MAJOR_VERSION="$MAJOR"
289 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
290 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
293 if [ -z "$QT_MAJOR_VERSION" ]; then
294 echo "Cannot process version from qglobal.h: $QT_VERSION"
295 echo "Cannot proceed."
299 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
300 if [ -z "$QT_PACKAGEDATE" ]; then
301 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
302 echo "Cannot proceed"
306 #-------------------------------------------------------------------------------
308 #-------------------------------------------------------------------------------
312 EditionString=Commercial
316 # parse the arguments, setting things to "yes" or "no"
317 while [ "$#" -gt 0 ]; do
321 #Autoconf style options
323 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
327 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
331 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
332 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
335 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
340 # this option may or may not be followed by an argument
341 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
348 -h|help|--help|-help)
349 if [ "$VAL" = "yes" ]; then
351 COMMERCIAL_USER="no" #doesn't matter we will display the help
354 COMMERCIAL_USER="no" #doesn't matter we will display the help
358 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
362 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
369 if [ "$UNKNOWN_ARG" = "yes" ]; then
378 if [ "$PLATFORM_QPA" != "no" ]; then
379 if [ "$PLATFORM_QPA" = "maybe" ]; then
384 echo "No license exists to enable Qt QPA. Disabling."
391 COMMERCIAL_USER="yes"
405 if [ "$COMMERCIAL_USER" = "ask" ]; then
407 echo "Which edition of Qt do you want to use ?"
409 echo "Type 'c' if you want to use the Commercial Edition."
410 echo "Type 'o' if you want to use the Open Source Edition."
414 if [ "$commercial" = "c" ]; then
415 COMMERCIAL_USER="yes"
417 elif [ "$commercial" = "o" ]; then
424 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
425 # Commercial preview release
426 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
429 QT_EDITION="QT_EDITION_DESKTOP"
430 LicenseType="Technology Preview"
431 elif [ $COMMERCIAL_USER = "yes" ]; then
432 # one of commercial editions
433 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
434 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
436 # read in the license file
437 if [ -f "$LICENSE_FILE" ]; then
438 . "$LICENSE_FILE" >/dev/null 2>&1
439 if [ -z "$LicenseKeyExt" ]; then
441 echo "You are using an old license file."
443 echo "Please install the license file supplied by Nokia,"
444 echo "or install the Qt Open Source Edition if you intend to"
445 echo "develop free software."
448 if [ -z "$Licensee" ]; then
450 echo "Invalid license key. Please check the license key."
454 if [ -z "$LicenseKeyExt" ]; then
456 echo $ECHO_N "Please enter your license key: $ECHO_C"
458 Licensee="Unknown user"
463 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
464 && LicenseValid="yes" \
466 if [ "$LicenseValid" != "yes" ]; then
468 echo "Invalid license key. Please check the license key."
471 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
472 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
473 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
474 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
476 # determine which edition we are licensed to use
477 case "$LicenseTypeCode" in
479 LicenseType="Commercial"
483 QT_EDITION="QT_EDITION_UNIVERSAL"
486 Edition="FullFramework"
487 EditionString="Full Framework"
488 QT_EDITION="QT_EDITION_DESKTOP"
491 Edition="GUIFramework"
492 EditionString="GUI Framework"
493 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
498 LicenseType="Evaluation"
499 QMakeVar add DEFINES QT_EVAL
503 QT_EDITION="QT_EDITION_EVALUATION"
508 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
510 echo "Invalid license key. Please check the license key."
514 # verify that we are licensed to use Qt on this platform
516 case "$PlatformCode" in
519 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
523 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
526 ### EMBEDDED_QPA logic missing ###
527 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
528 X9,* | XC,* | XU,* | XW,* | XM,*)
530 LICENSE_EXTENSION="-ALLOS"
532 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
533 # Qt for Embedded Linux
534 LICENSE_EXTENSION="-EMBEDDED"
536 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
538 LICENSE_EXTENSION="-EMBEDDED"
540 FM,*,no | LM,yes,* | ZM,no,no)
542 LICENSE_EXTENSION="-DESKTOP"
546 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
548 echo "You are not licensed for the $Platform platform."
550 echo "Please contact qt-info@nokia.com to upgrade your license to"
551 echo "include the $Platform platform, or install the Qt Open Source Edition"
552 echo "if you intend to develop free software."
557 if test -r "$relpath/.LICENSE"; then
558 # Generic, non-final license
560 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
565 *TECHNOLOGY?PREVIEW*)
572 echo >&2 "Invalid license files; cannot continue"
577 EditionString="$Edition"
578 QT_EDITION="QT_EDITION_DESKTOP"
581 case "$LicenseFeatureCode" in
584 case "$LicenseType" in
586 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
589 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
595 case "$LicenseType" in
597 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
600 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
606 echo "Invalid license key. Please check the license key."
610 case "$LicenseFeatureCode" in
618 if [ '!' -f "$outpath/LICENSE" ]; then
619 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
620 echo "this software has disappeared."
622 echo "Sorry, you are not licensed to use this software."
623 echo "Try re-installing."
627 elif [ $COMMERCIAL_USER = "no" ]; then
628 # Open Source edition - may only be used under the terms of the GPL or LGPL.
629 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
630 Licensee="Open Source"
632 EditionString="Open Source"
633 QT_EDITION="QT_EDITION_OPENSOURCE"
636 #-------------------------------------------------------------------------------
637 # initalize variables
638 #-------------------------------------------------------------------------------
640 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
641 for varname in $SYSTEM_VARIABLES; do
642 qmakevarname="${varname}"
643 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
644 if [ "${varname}" = "LDFLAGS" ]; then
645 qmakevarname="LFLAGS"
646 elif [ "${varname}" = "LD" ]; then
650 'if [ -n "\$'${varname}'" ]; then
651 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
655 # Use CC/CXX to run config.tests
656 mkdir -p "$outpath/config.tests"
657 rm -f "$outpath/config.tests/.qmake.cache"
658 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
660 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
662 # QTDIR may be set and point to an old or system-wide Qt installation
665 # the minimum version of libdbus-1 that we require:
666 MIN_DBUS_1_VERSION=0.93
668 # initalize internal variables
669 CFG_CONFIGURE_EXIT_ON_ERROR=yes
671 CFG_EXCEPTIONS=unspecified
672 CFG_GUI=auto # (yes|no|auto)
698 CFG_OPENVG_LC_INCLUDES=no
699 CFG_OPENVG_SHIVA=auto
700 CFG_OPENVG_ON_OPENGL=auto
706 QT_DEFAULT_BUILD_PARTS="libs examples tests"
710 CFG_AUDIO_BACKEND=auto
712 CFG_DECLARATIVE_DEBUG=yes
713 CFG_JAVASCRIPTCORE_JIT=auto
715 # Target architecture
717 # Host architecture, same as CFG_ARCH when not cross-compiling
719 # Set when the -arch or -host-arch arguments are used
720 OPT_OBSOLETE_HOST_ARG=no
731 CFG_OBSOLETE_WAYLAND=no
744 CFG_SEPARATE_DEBUG_INFO=no
745 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
746 CFG_REDUCE_EXPORTS=auto
756 CFG_REDUCE_RELOCATIONS=auto
757 CFG_ACCESSIBILITY=auto
762 CFG_CLOCK_GETTIME=auto
763 CFG_CLOCK_MONOTONIC=auto
771 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
775 CFG_PREFIX_INSTALL=yes
784 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
785 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
789 OPT_CONFIRM_LICENSE=no
802 QPA_PLATFORM_GUARD=yes
804 # initalize variables used for installation
813 QT_INSTALL_TRANSLATIONS=
822 #flags for SQL drivers
830 QT_LFLAGS_ODBC="-lodbc"
833 # flags for libdbus-1
837 # flags for Glib (X11 only)
841 # flags for GStreamer (X11 only)
845 #-------------------------------------------------------------------------------
846 # check SQL drivers available in this package
847 #-------------------------------------------------------------------------------
849 # opensource version removes some drivers, so force them to be off
855 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
856 for a in "$relpath/src/plugins/sqldrivers/"*; do
858 base_a=`basename "$a"`
859 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
860 eval "CFG_SQL_${base_a}=auto"
865 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
866 if [ -d "$relpath/src/plugins/imageformats" ]; then
867 for a in "$relpath/src/plugins/imageformats/"*; do
869 base_a=`basename "$a"`
870 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
875 #-------------------------------------------------------------------------------
876 # parse command line arguments
877 #-------------------------------------------------------------------------------
879 # parse the arguments, setting things to "yes" or "no"
880 while [ "$#" -gt 0 ]; do
884 #Autoconf style options
886 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
890 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
894 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
895 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
898 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
902 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
906 -no-*-*|-plugin-*-*|-qt-*-*)
907 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
908 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
912 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
915 #Qt style yes options
916 -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)
917 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
920 #Qt style options that pass an argument
922 if [ "$PLATFORM_QPA" != "yes" ]; then
924 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
928 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
932 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
933 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
937 #Qt style complex options in one command
938 -enable-*|-disable-*)
939 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
940 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
942 #Qt Builtin/System style options
943 -no-*|-system-*|-qt-*)
944 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
945 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
947 #Options that cannot be generalized
954 # this option may or may not be followed by an argument
955 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
964 # this option may or may not be followed by an argument
965 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
974 # this option may or may not be followed by an argument
975 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
983 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
984 # this option may or may not be followed by an argument
985 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1004 if [ "$1" = "-D" ]; then
1008 VAL=`echo $1 | sed 's,-D,,'`
1013 # this option may or may not be followed by an argument
1014 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1023 if [ "$1" = "-I" ]; then
1027 VAL=`echo $1 | sed 's,-I,,'`
1032 if [ "$1" = "-L" ]; then
1036 VAL=`echo $1 | sed 's,-L,,'`
1041 if [ "$1" = "-R" ]; then
1045 VAL=`echo $1 | sed 's,-R,,'`
1050 VAL=`echo $1 | sed 's,-l,,'`
1054 if [ "$1" = "-F" ]; then
1058 VAL=`echo $1 | sed 's,-F,,'`
1063 if [ "$1" = "-fw" ]; then
1067 VAL=`echo $1 | sed 's,-fw,,'`
1075 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1082 if [ "$UNKNOWN_ARG" = "yes" ]; then
1083 echo "$1: unknown argument"
1094 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1095 CFG_ACCESSIBILITY="$VAL"
1104 CFG_USE_GNUMAKE="$VAL"
1107 CFG_MYSQL_CONFIG="$VAL"
1110 QT_INSTALL_PREFIX="$VAL"
1113 QT_HOST_PREFIX="$VAL"
1122 QT_FORCE_PKGCONFIG=yes
1125 QT_INSTALL_DOCS="$VAL"
1128 QT_INSTALL_HEADERS="$VAL"
1131 QT_INSTALL_PLUGINS="$VAL"
1134 QT_INSTALL_IMPORTS="$VAL"
1137 QT_INSTALL_DATA="$VAL"
1140 QT_INSTALL_LIBS="$VAL"
1149 QT_INSTALL_TRANSLATIONS="$VAL"
1151 sysconfdir|settingsdir)
1152 QT_INSTALL_SETTINGS="$VAL"
1155 QT_INSTALL_EXAMPLES="$VAL"
1158 QT_INSTALL_TESTS="$VAL"
1167 QT_INSTALL_BINS="$VAL"
1177 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1184 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1185 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1186 [ "$VAL" = "es2" ]; then
1193 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1200 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1203 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1211 if [ "$BUILD_ON_MAC" = "yes" ]; then
1218 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1219 CFG_MAC_DWARF2="$VAL"
1225 OPT_OBSOLETE_HOST_ARG=yes
1228 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1229 CFG_MAC_HARFBUZZ="$VAL"
1236 if [ "$BUILD_ON_MAC" = "yes" ]; then
1237 CFG_FRAMEWORK="$VAL"
1243 if [ "$VAL" = "yes" ]; then
1245 QMakeVar add QMAKE_CFLAGS -pg
1246 QMakeVar add QMAKE_CXXFLAGS -pg
1247 QMakeVar add QMAKE_LFLAGS -pg
1248 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1254 if [ "$VAL" = "yes" ]; then
1255 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1258 exceptions|g++-exceptions)
1259 if [ "$VAL" = "no" ]; then
1261 elif [ "$VAL" = "yes" ]; then
1269 # keep compatibility with old platform names
1275 PLATFORM=hpux-acc-o64
1278 PLATFORM=hpux-acc-64
1281 PLATFORM=hpux-acc-64
1293 PLATFORM=reliant-cds-64
1296 PLATFORM=solaris-cc-64
1299 PLATFORM=unixware-cc
1302 PLATFORM=unixware-g++
1305 PLATFORM=unixware-cc
1308 PLATFORM=unixware-g++
1314 i386) NATIVE_64_ARCH="x86_64" ;;
1315 powerpc) NATIVE_64_ARCH="ppc64" ;;
1316 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1318 if [ ! -z "$NATIVE_64_ARCH" ]; then
1319 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1326 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1329 XPLATFORM="devices/$VAL"
1332 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1333 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1334 DeviceVar set $DEV_VAR $DEV_VAL
1337 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1338 CFG_DEBUG_RELEASE="$VAL"
1344 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1345 CFG_RELEASE_QMAKE="$VAL"
1351 if [ "$VAL" = "yes" ]; then
1353 elif [ "$VAL" = "no" ]; then
1360 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1361 CFG_PREFIX_INSTALL="$VAL"
1369 developer-build|commercial|opensource)
1370 # These switches have been dealt with already
1373 if [ "$VAL" = "yes" ]; then
1375 elif [ "$VAL" = "no" ]; then
1382 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1383 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1389 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1390 if [ "$VAL" = "no" ]; then
1391 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1392 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1393 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1399 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1406 if [ "$VAL" = "no" ]; then
1413 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1421 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1428 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1435 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1442 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1449 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1456 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1463 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1470 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1477 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1478 CFG_PRECOMPILE="$VAL"
1483 separate-debug-info)
1484 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1485 CFG_SEPARATE_DEBUG_INFO="$VAL"
1486 elif [ "$VAL" = "nocopy" ] ; then
1487 CFG_SEPARATE_DEBUG_INFO="yes"
1488 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1494 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1495 CFG_REDUCE_EXPORTS="$VAL"
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
1536 if [ "$VAL" = "no" ]; then
1543 if [ "$VAL" = "no" ]; then
1550 if [ "$VAL" = "no" ]; then
1557 if [ "$VAL" = "no" ]; then
1567 if [ "$VAL" = "no" ]; then
1574 if [ "$VAL" = "no" ]; then
1581 if [ "$VAL" = "no" ]; then
1582 CFG_MIPS_DSPR2="$VAL"
1588 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1589 CFG_REDUCE_RELOCATIONS="$VAL"
1595 [ "$VAL" = "qt" ] && VAL=yes
1596 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1601 # No longer supported:
1602 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1605 if [ "$VAL" = "system" ]; then
1612 [ "$VAL" = "yes" ] && VAL=qt
1613 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1620 [ "$VAL" = "yes" ] && VAL=qt
1621 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1628 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1635 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1642 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1656 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1663 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1664 CFG_FONTCONFIG="$VAL"
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1684 CFG_OBSOLETE_WAYLAND=yes
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1694 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1701 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1708 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1715 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1722 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1729 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1730 CFG_GSTREAMER="$VAL"
1736 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1737 CFG_QGTKSTYLE="$VAL"
1743 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1746 if [ "$VAL" = "no" ]; then
1754 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1756 elif [ "$VAL" = "no" ]; then
1763 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1764 QPA_PLATFORM_GUARD="$VAL"
1770 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1772 elif [ "$VAL" = "runtime" ]; then
1779 if [ "$VAL" = "yes" ]; then
1786 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1793 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1794 CFG_LARGEFILE="$VAL"
1800 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1807 if [ "$VAL" = "yes" ]; then
1808 CFG_OPENSSL="linked"
1814 if [ "$VAL" = "yes" ]; then
1815 CFG_DECLARATIVE_DEBUG="yes"
1817 if [ "$VAL" = "no" ]; then
1818 CFG_DECLARATIVE_DEBUG="no"
1825 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1826 CFG_JAVASCRIPTCORE_JIT="$VAL"
1832 if [ "$VAL" = "yes" ]; then
1833 OPT_CONFIRM_LICENSE="$VAL"
1839 if [ "$VAL" = "yes" ]; then
1845 sql-*|imageformat-*)
1846 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1847 # if autoconf style options were used, $VAL can be "yes" or "no"
1848 [ "$VAL" = "yes" ] && VAL=qt
1849 # now $VAL should be "no", "qt", or "plugin"... double-check
1850 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1853 # now $VAL is "no", "qt", or "plugin"
1855 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1856 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1858 # Grab the available values
1861 avail="$CFG_SQL_AVAILABLE"
1864 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1865 if [ "$OPT" != "plugin" ]; then
1866 # png is always built in
1872 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1876 # Check that that user's value is available.
1879 if [ "$VAL" = "$d" ]; then
1884 [ "$found" = yes ] || ERROR=yes
1886 if [ "$VAR" = "sql" ]; then
1887 # set the CFG_SQL_driver
1888 eval "CFG_SQL_$VAL=\$OPT"
1890 elif [ "$VAR" = "imageformat" ]; then
1891 [ "$OPT" = "qt" ] && OPT=yes
1892 VAL="`echo $VAL |tr a-z A-Z`"
1893 eval "CFG_$VAL=$OPT"
1897 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1898 if [ "$OPT" = "plugin" ]; then
1901 QMakeVar add "${VAR}s" "${VAL}"
1902 elif [ "$OPT" = "no" ]; then
1903 PLUG_VAR="${VAR}-plugin"
1905 QMakeVar del "${IN_VAR}s" "$VAL"
1906 QMakeVar del "${PLUG_VAR}s" "$VAL"
1908 if [ "$ERROR" = "yes" ]; then
1909 echo "$CURRENT_OPT: unknown argument"
1914 if [ "$VAL" = "yes" ]; then
1915 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1916 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1920 elif [ "$VAL" = "no" ]; then
1921 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1922 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1931 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1938 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1945 D_FLAGS="$D_FLAGS \"$VAL\""
1948 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1951 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1954 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1957 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1960 if [ "$BUILD_ON_MAC" = "yes" ]; then
1961 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1962 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1968 if [ "$BUILD_ON_MAC" = "yes" ]; then
1969 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1975 W_FLAGS="$W_FLAGS \"${VAL}\""
1981 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1982 CFG_PHONON_BACKEND="$VAL"
1994 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1995 CFG_AUDIO_BACKEND="$VAL"
2001 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2008 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2009 CFG_FORCE_ASSERTS="$VAL"
2015 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2025 if [ "$UNKNOWN_OPT" = "yes" ]; then
2026 echo "${CURRENT_OPT}: invalid command-line switch"
2032 # update QT_CONFIG to show our current predefined configuration
2033 case "$CFG_QCONFIG" in
2034 minimal|small|medium|large|full)
2035 # these are a sequence of increasing functionality
2036 for c in minimal small medium large full; do
2037 QT_CONFIG="$QT_CONFIG $c-config"
2038 [ "$CFG_QCONFIG" = $c ] && break
2042 # not known to be sufficient for anything
2043 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2044 echo >&2 "Error: configuration file not found:"
2045 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2047 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2052 #-------------------------------------------------------------------------------
2053 # build tree initialization
2054 #-------------------------------------------------------------------------------
2056 # where to find which..
2057 unixtests="$relpath/config.tests/unix"
2058 mactests="$relpath/config.tests/mac"
2059 WHICH="$unixtests/which.test"
2061 PERL=`$WHICH perl 2>/dev/null`
2063 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2065 for e in gawk nawk awk; do
2066 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2073 PERL="/usr/bin/perl"
2074 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2078 ### skip this if the user just needs help...
2079 if [ "$OPT_HELP" != "yes" ]; then
2081 # is this a shadow build?
2082 if [ "$OPT_SHADOW" = "maybe" ]; then
2084 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2085 if [ -h "$outpath" ]; then
2086 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2092 if [ "$OPT_SHADOW" = "yes" ]; then
2093 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2094 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2095 echo >&2 "Cannot proceed."
2098 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2101 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2103 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2104 echo "Qt can be built in release mode with separate debug information, so"
2105 echo "-debug-and-release is not necessary anymore"
2109 if [ "$CFG_SILENT" = "yes" ]; then
2110 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2113 # if the source tree is different from the build tree,
2114 # symlink or copy part of the sources
2115 if [ "$OPT_SHADOW" = "yes" ]; then
2116 echo "Preparing build tree..."
2118 if [ -z "$PERL" ]; then
2120 echo "You need perl in your PATH to make a shadow build."
2121 echo "Cannot proceed."
2125 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2127 # make a syncqt script that can be used in the shadow
2128 rm -f "$outpath/bin/syncqt"
2129 if [ -x "$relpath/bin/syncqt" ]; then
2130 mkdir -p "$outpath/bin"
2131 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2132 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2133 chmod 755 "$outpath/bin/syncqt"
2136 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2137 rm -f "$outpath/bin/$i"
2138 if [ -x "$relpath/bin/$i" ]; then
2139 mkdir -p "$outpath/bin"
2140 echo "#!/bin/sh" >"$outpath/bin/$i"
2141 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2142 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2143 chmod 755 "$outpath/bin/$i"
2147 # symlink the mkspecs directory
2148 mkdir -p "$outpath/mkspecs"
2149 rm -rf "$outpath"/mkspecs/*
2150 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2151 rm -f "$outpath/mkspecs/default"
2155 rm -rf "$outpath/mkspecs/$1"
2156 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2157 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2160 # Special case for mkspecs/features directory.
2161 # To be able to place .prf files into a shadow build directory,
2162 # we're creating links for files only. The directory structure is reproduced.
2163 ShadowMkspecs features
2165 # The modules dir is special, too.
2166 ShadowMkspecs modules
2168 # symlink the doc directory
2169 rm -rf "$outpath/doc"
2170 ln -s "$relpath/doc" "$outpath/doc"
2173 # symlink fonts to be able to run application from build directory
2174 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2175 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2176 mkdir -p "${outpath}/lib"
2177 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2181 if [ "$OPT_FAST" = "auto" ]; then
2182 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2189 # find a make command
2190 if [ -z "$MAKE" ]; then
2192 for mk in gmake make; do
2193 if "$WHICH" $mk >/dev/null 2>&1; then
2198 if [ -z "$MAKE" ]; then
2199 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2200 echo >&2 "Cannot proceed."
2203 # export MAKE, we need it later in the config.tests
2209 #-------------------------------------------------------------------------------
2210 # auto-detect all that hasn't been specified in the arguments
2211 #-------------------------------------------------------------------------------
2213 if [ -z "$PLATFORM" ]; then
2215 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2217 if [ "$PLATFORM_QPA" = "yes" ]; then
2218 OSX_VERSION=`uname -r | cut -d. -f1`
2219 if [ "$OSX_VERSION" -ge 11 ]; then
2220 # We're on Lion or above. Check if we have a supported Clang version
2221 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2224 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2239 #PLATFORM=aix-g++-64
2241 #PLATFORM=aix-xlc-64
2243 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2253 # PLATFORM=dynix-g++
2259 PLATFORM=freebsd-g++
2261 - Also available for FreeBSD: freebsd-icc
2265 PLATFORM=openbsd-g++
2276 #PLATFORM=irix-cc-64
2278 - Also available for IRIX: irix-g++ irix-cc-64
2282 case "$UNAME_MACHINE" in
2284 #PLATFORM=hpuxi-acc-32
2285 PLATFORM=hpuxi-acc-64
2287 - Also available for HP-UXi: hpuxi-acc-32
2293 #PLATFORM=hpux-acc-64
2295 #PLATFORM=hpux-acc-o64
2297 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2306 - Also available for Tru64: tru64-g++
2310 case "$UNAME_MACHINE" in
2312 PLATFORM=linux-g++-64
2319 - Also available for Linux: linux-kcc linux-icc linux-cxx
2323 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2324 PLATFORM="solaris-g++"
2326 #PLATFORM=solaris-g++
2328 #PLATFORM=solaris-cc64
2331 - Also available for Solaris: solaris-g++ solaris-cc-64
2334 ReliantUNIX-*:*|SINIX-*:*)
2335 PLATFORM=reliant-cds
2336 #PLATFORM=reliant-cds-64
2338 - Also available for Reliant UNIX: reliant-cds-64
2348 #PLATFORM=unixware-g++
2349 PLATFORM=unixware-cc
2351 - Also available for OpenUNIX: unixware-g++
2355 #PLATFORM=unixware-g++
2356 PLATFORM=unixware-cc
2358 - Also available for UnixWare: unixware-g++
2365 - Also available for SCO OpenServer: sco-g++
2369 PLATFORM=unixware-g++
2372 PLATFORM=unsupported/qnx-g++
2375 if [ "$OPT_HELP" != "yes" ]; then
2377 for p in $PLATFORMS; do
2378 echo " $relconf $* -platform $p"
2381 echo " The build script does not currently recognize all" >&2
2382 echo " platforms supported by Qt." >&2
2383 echo " Rerun this script with a -platform option listed to" >&2
2384 echo " set the system/compiler combination you use." >&2
2391 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2393 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2395 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2396 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2398 if [ -d "$PLATFORM" ]; then
2399 QMAKESPEC="$PLATFORM"
2401 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2403 if [ -d "$XPLATFORM" ]; then
2404 XQMAKESPEC="$XPLATFORM"
2406 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2408 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2409 QT_CROSS_COMPILE=yes
2410 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2411 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2414 if [ "$BUILD_ON_MAC" = "yes" ]; then
2415 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2417 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2418 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2419 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2420 echo " built with 'macx-g++'" >&2
2426 # check specified platforms are supported
2427 if [ '!' -d "$QMAKESPEC" ]; then
2429 echo " The specified system/compiler is not supported:"
2433 echo " Please see the README file for a complete list."
2437 if [ '!' -d "$XQMAKESPEC" ]; then
2439 echo " The specified system/compiler is not supported:"
2443 echo " Please see the README file for a complete list."
2447 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2449 echo " The specified system/compiler port is not complete:"
2451 echo " $XQMAKESPEC/qplatformdefs.h"
2453 echo " Please contact qt-info@nokia.com."
2458 # now look at the configs and figure out what platform we are config'd for
2459 [ "$PLATFORM_QPA" != "yes" ] \
2460 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2462 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2464 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2465 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2466 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2467 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2468 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2472 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2473 case `basename "$XPLATFORM"` in
2476 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2478 echo "Please contact qt-info@nokia.com to upgrade your license to"
2479 echo "include this platform, or install the Qt Open Source Edition"
2480 echo "if you intend to develop free software."
2486 #-------------------------------------------------------------------------------
2487 # write out device config before we run the test.
2488 #-------------------------------------------------------------------------------
2489 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
2490 rm -f "$DEVICE_VARS_FILE"
2492 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
2495 #-------------------------------------------------------------------------------
2496 # tests that don't need qmake (must be run before displaying help)
2497 #-------------------------------------------------------------------------------
2499 # detect build style
2500 if [ "$CFG_DEBUG" = "auto" ]; then
2501 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2502 CFG_DEBUG_RELEASE=yes
2504 elif [ "$CFG_DEV" = "yes" ]; then
2505 CFG_DEBUG_RELEASE=no
2508 CFG_DEBUG_RELEASE=no
2512 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2513 QT_CONFIG="$QT_CONFIG build_all"
2516 if [ -z "$PKG_CONFIG" ]; then
2517 # See if PKG_CONFIG is set in the mkspec:
2518 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2520 if [ -z "$PKG_CONFIG" ]; then
2521 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2524 # Work out if we can use pkg-config
2525 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2526 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2528 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2529 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2530 echo >&2 "environment!"
2532 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2534 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2535 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2536 echo >&2 "This is probably not what you want."
2538 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2540 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2541 echo >&2 "been set. This means your toolchain's .pc files must contain"
2542 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2543 echo >&2 "tests are failing, please check these files."
2548 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2549 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2550 echo >&2 "dependencies"
2556 if [ ! -n "$PKG_CONFIG" ]; then
2557 QT_CONFIG="$QT_CONFIG no-pkg-config"
2560 # pass on $CFG_SDK to the configure tests.
2561 if [ '!' -z "$CFG_SDK" ]; then
2562 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2565 # find the default framework value
2566 if [ "$BUILD_ON_MAC" = "yes" ]; then
2567 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2568 CFG_FRAMEWORK="$CFG_SHARED"
2569 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2571 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2579 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2581 TEST_COMPILER=$QMAKE_CONF_COMPILER
2582 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2583 if [ -z "$TEST_COMPILER" ]; then
2584 echo "ERROR: Cannot set the compiler for the configuration tests"
2590 if [ -n "$CFG_SYSROOT" ]; then
2591 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2592 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2593 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2595 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2599 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2601 # auto-detect precompiled header support
2602 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2603 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2610 #auto-detect DWARF2 on the mac
2611 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2612 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2619 # don't autodetect support for separate debug info on objcopy when
2620 # cross-compiling as lots of toolchains seems to have problems with this
2621 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2622 CFG_SEPARATE_DEBUG_INFO="no"
2625 # auto-detect support for separate debug info in objcopy
2626 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2627 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2628 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2629 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2630 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2631 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2632 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2633 CFG_SEPARATE_DEBUG_INFO=no
2637 # binutils on HP-UX is buggy; default to no.
2638 CFG_SEPARATE_DEBUG_INFO=no
2641 CFG_SEPARATE_DEBUG_INFO=yes
2647 # auto-detect -fvisibility support
2648 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2649 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2650 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2651 echo "-reduce-exports was requested but this compiler does not support it"
2652 echo "Re-run configure with -v for more information"
2655 CFG_REDUCE_EXPORTS=no
2657 CFG_REDUCE_EXPORTS=yes
2661 # detect the availability of the -Bsymbolic-functions linker optimization
2662 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2663 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2664 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2665 echo "-reduce-relocations was requested but this compiler does not support it"
2666 echo "Re-run configure with -v for more information"
2669 CFG_REDUCE_RELOCATIONS=no
2671 CFG_REDUCE_RELOCATIONS=yes
2675 # auto-detect GNU make support
2676 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2680 # find the default framework value
2681 if [ "$BUILD_ON_MAC" = "yes" ]; then
2682 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2683 CFG_FRAMEWORK="$CFG_SHARED"
2684 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2686 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2694 # x11 tests are done after qmake is built
2697 #setup the build parts
2698 if [ -z "$CFG_BUILD_PARTS" ]; then
2699 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2701 # don't build tools by default when cross-compiling
2702 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2703 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2706 for nobuild in $CFG_NOBUILD_PARTS; do
2707 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2709 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2711 # echo "WARNING: libs is a required part of the build."
2713 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2716 #-------------------------------------------------------------------------------
2717 # post process QT_INSTALL_* variables
2718 #-------------------------------------------------------------------------------
2720 if [ -z "$QT_INSTALL_PREFIX" ]; then
2721 if [ "$CFG_DEV" = "yes" ]; then
2722 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2724 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2727 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2729 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2730 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2731 if [ "$BUILD_ON_MAC" = "yes" ]; then
2732 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2735 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2738 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2740 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2741 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2742 if [ "$BUILD_ON_MAC" = "yes" ]; then
2743 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2748 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2751 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2753 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2754 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2755 if [ "$BUILD_ON_MAC" = "yes" ]; then
2756 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2757 QT_INSTALL_LIBS="/Libraries/Frameworks"
2761 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2763 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2765 if [ -z "$QT_INSTALL_BINS" ]; then #default
2766 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2767 if [ "$BUILD_ON_MAC" = "yes" ]; then
2768 QT_INSTALL_BINS="/Developer/Applications/Qt"
2771 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2773 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2775 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2776 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2777 if [ "$BUILD_ON_MAC" = "yes" ]; then
2778 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2781 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2783 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2785 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2786 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2787 if [ "$BUILD_ON_MAC" = "yes" ]; then
2788 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2791 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2793 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2795 if [ -z "$QT_INSTALL_DATA" ]; then #default
2796 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2798 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2800 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2801 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2803 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2805 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2806 if [ "$BUILD_ON_MAC" = "yes" ]; then
2807 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2809 QT_INSTALL_SETTINGS=/etc/xdg
2812 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2814 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2815 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2816 if [ "$BUILD_ON_MAC" = "yes" ]; then
2817 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2820 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2822 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2825 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2826 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2827 if [ "$BUILD_ON_MAC" = "yes" ]; then
2828 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2831 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2833 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2835 #------- host paths --------
2837 if [ -z "$QT_HOST_PREFIX" ]; then
2838 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2841 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2845 if [ -z "$QT_HOST_BINS" ]; then #default
2847 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2848 if [ "$BUILD_ON_MAC" = "yes" ]; then
2849 QT_HOST_BINS="/Developer/Applications/Qt"
2852 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2854 QT_HOST_BINS="$QT_INSTALL_BINS"
2857 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2859 if [ -z "$QT_HOST_DATA" ]; then #default
2861 QT_HOST_DATA="$QT_HOST_PREFIX"
2863 QT_HOST_DATA="$QT_INSTALL_DATA"
2866 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2869 #-------------------------------------------------------------------------------
2870 # help - interactive parts of the script _after_ this section please
2871 #-------------------------------------------------------------------------------
2873 # next, emit a usage message if something failed.
2874 if [ "$OPT_HELP" = "yes" ]; then
2875 [ "x$ERROR" = "xyes" ] && echo
2876 if [ "$CFG_NIS" = "no" ]; then
2883 if [ "$CFG_CUPS" = "no" ]; then
2890 if [ "$CFG_ICONV" = "no" ]; then
2897 if [ "$CFG_LARGEFILE" = "no" ]; then
2904 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
2911 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2919 if [ "$CFG_XCB" = "no" ]; then
2927 if [ "$CFG_EGLFS" = "no" ]; then
2935 if [ "$CFG_XINPUT2" = "no" ]; then
2944 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2945 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2946 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2947 [-release] [-debug] [-debug-and-release]
2948 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2949 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2950 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
2951 [-plugin-sql-<driver>] [-system-sqlite]
2952 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2953 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2954 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2955 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2956 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2957 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2958 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
2959 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2960 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2961 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2962 [-no-audio-backend] [-audio-backend]
2963 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
2964 [-no-optimized-qmake] [-optimized-qmake]
2965 [-no-openssl] [-openssl] [-openssl-linked]
2966 [-no-gtkstyle] [-gtkstyle]
2967 [-qt-pcre] [-system-pcre]
2968 [-device <name>] [-device-option <key=value>]
2969 [additional platform specific options (see below)]
2972 Installation options:
2974 -qpa ................ This will enable the QPA build.
2975 QPA is a window system agnostic implementation of Qt.
2977 These are optional, but you may specify install directories.
2979 -prefix <dir> ...... This will install everything relative to <dir>
2980 (default $QT_INSTALL_PREFIX)
2982 if [ "$PLATFORM_QPA" = "yes" ]; then
2985 -hostprefix [dir] .. Tools and libraries needed when developing
2986 applications are installed in [dir]. If [dir] is
2987 not given, the current build directory will be used.
2993 * -prefix-install .... Force a sandboxed "local" installation of
2994 Qt. This will install into
2995 $QT_INSTALL_PREFIX, if this option is
2996 disabled then some platforms will attempt a
2997 "system" install by placing default values to
2998 be placed in a system location other than
3001 You may use these to separate different parts of the install:
3003 -bindir <dir> ......... Executables will be installed to <dir>
3004 (default PREFIX/bin)
3005 -libdir <dir> ......... Libraries will be installed to <dir>
3006 (default PREFIX/lib)
3007 -docdir <dir> ......... Documentation will be installed to <dir>
3008 (default PREFIX/doc)
3009 -headerdir <dir> ...... Headers will be installed to <dir>
3010 (default PREFIX/include)
3011 -plugindir <dir> ...... Plugins will be installed to <dir>
3012 (default PREFIX/plugins)
3013 -importdir <dir> ...... Imports for QML will be installed to <dir>
3014 (default PREFIX/imports)
3015 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3017 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3018 (default PREFIX/translations)
3019 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3020 (default PREFIX/etc/settings)
3021 -examplesdir <dir> .... Examples will be installed to <dir>
3022 (default PREFIX/examples)
3023 -testsdir <dir> ....... Tests will be installed to <dir>
3024 (default PREFIX/tests)
3026 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3029 -hostbindir <dir> .. Host executables will be installed to <dir>
3030 (default HOSTPREFIX/bin)
3031 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
3032 (default HOSTPREFIX)
3039 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3040 that needs to be evaluated. If the evaluation succeeds, the feature is
3041 included. Here is a short explanation of each option:
3043 * -release ........... Compile and link Qt with debugging turned off.
3044 -debug ............. Compile and link Qt with debugging turned on.
3045 -debug-and-release . Compile and link two versions of Qt, with and without
3046 debugging turned on (Mac only).
3048 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3050 -opensource ........ Compile and link the Open-Source Edition of Qt.
3051 -commercial ........ Compile and link the Commercial Edition of Qt.
3054 * -shared ............ Create and use shared Qt libraries.
3055 -static ............ Create and use static Qt libraries.
3057 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3059 -fast .............. Configure Qt quickly by generating Makefiles only for
3060 library and subdirectory targets. All other Makefiles
3061 are created as wrappers, which will in turn run qmake.
3063 -no-largefile ...... Disables large file support.
3064 + -largefile ......... Enables Qt to access files larger than 4 GB.
3067 if [ "$PLATFORM_QPA" = "yes" ]; then
3074 if [ "$CFG_DBUS" = "no" ]; then
3083 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3084 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3086 -no-accessibility .. Do not compile Accessibility support.
3087 * -accessibility ..... Compile Accessibility support.
3089 $SHN -no-stl ............ Do not compile STL support.
3090 $SHY -stl ............... Compile STL support.
3092 -no-sql-<driver> ... Disable SQL <driver> entirely.
3093 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3095 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3098 Possible values for <driver>:
3099 [ $CFG_SQL_AVAILABLE ]
3101 -system-sqlite ..... Use sqlite from the operating system.
3103 -no-phonon-backend.. Do not build the platform phonon plugin.
3104 + -phonon-backend..... Build the platform phonon plugin.
3106 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3107 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3109 -no-declarative-debug ..... Do not build the declarative debugging support.
3110 + -declarative-debug ....... Build the declarative debugging support.
3112 -platform target ... The operating system and compiler you are building
3115 See the README file for a list of supported
3116 operating systems and compilers.
3119 if [ "${PLATFORM_QPA}" != "yes" ]; then
3121 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3122 raster - Software rasterizer
3123 opengl - Rendering via OpenGL, Experimental!
3124 openvg - Rendering via OpenVG, Experimental!
3131 -no-mmx ............ Do not compile with use of MMX instructions.
3132 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3133 -no-sse ............ Do not compile with use of SSE instructions.
3134 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3135 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3136 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3137 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3138 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3139 -no-avx ............ Do not compile with use of AVX instructions.
3140 -no-neon ........... Do not compile with use of NEON instructions.
3141 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3142 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3144 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3145 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3147 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3149 -D <string> ........ Add an explicit define to the preprocessor.
3150 -I <string> ........ Add an explicit include path.
3151 -L <string> ........ Add an explicit library path.
3153 -help, -h .......... Display this information.
3155 Third Party Libraries:
3157 -qt-zlib ........... Use the zlib bundled with Qt.
3158 + -system-zlib ....... Use zlib from the operating system.
3159 See http://www.gzip.org/zlib
3161 -no-gif ............ Do not compile GIF reading support.
3163 -no-libpng ......... Do not compile PNG support.
3164 -qt-libpng ......... Use the libpng bundled with Qt.
3165 + -system-libpng ..... Use libpng from the operating system.
3166 See http://www.libpng.org/pub/png
3168 -no-libjpeg ........ Do not compile JPEG support.
3169 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3170 + -system-libjpeg .... Use libjpeg from the operating system.
3171 See http://www.ijg.org
3173 -no-openssl ........ Do not compile support for OpenSSL.
3174 + -openssl ........... Enable run-time OpenSSL support.
3175 -openssl-linked .... Enabled linked OpenSSL support.
3177 -qt-pcre ........... Use the PCRE library bundled with Qt.
3178 + -system-pcre ....... Use the PCRE library from the operating system.
3182 -make <part> ....... Add part to the list of parts to be built at make time.
3183 ($QT_DEFAULT_BUILD_PARTS)
3184 -nomake <part> ..... Exclude part from the list of parts to be built.
3186 -R <string> ........ Add an explicit runtime library path to the Qt
3188 -l <string> ........ Add an explicit library.
3190 -no-rpath .......... Do not use the library install path as a runtime
3192 + -rpath ............. Link Qt libraries and executables using the library
3193 install path as a runtime library path. Equivalent
3194 to -R install_libpath
3196 -continue .......... Continue as far as possible if an error occurs.
3198 -verbose, -v ....... Print verbose information about each step of the
3201 -silent ............ Reduce the build output so that warnings and errors
3202 can be seen more easily.
3204 * -no-optimized-qmake ... Do not build qmake optimized.
3205 -optimized-qmake ...... Build qmake optimized.
3207 -no-gui ............ Don't build the Qt GUI library
3209 $NSN -no-nis ............ Do not compile NIS support.
3210 $NSY -nis ............... Compile NIS support.
3212 $CUN -no-cups ........... Do not compile CUPS support.
3213 $CUY -cups .............. Compile CUPS support.
3214 Requires cups/cups.h and libcups.so.2.
3216 $CIN -no-iconv .......... Do not compile support for iconv(3).
3217 $CIY -iconv ............. Compile support for iconv(3).
3219 $PHN -no-pch ............ Do not use precompiled header support.
3220 $PHY -pch ............... Use precompiled header support.
3222 $DBN -no-dbus ........... Do not compile the QtDBus module.
3223 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3224 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3226 -reduce-relocations ..... Reduce relocations in the libraries through extra
3227 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3228 experimental; needs GNU ld >= 2.18).
3230 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3232 -device <name> ............... Cross-compile for device <name> (experimental)
3233 -device-option <key=value> ... Add device specific options for the device mkspec
3238 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3239 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3246 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3254 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3258 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3259 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3261 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3262 $XCBY -xcb ............... Compile Xcb support.
3264 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3265 $EGLFSY -eglfs ............. Compile EGLFS support.
3271 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3275 $X2N -no-xinput2......... Do not compile XInput2 support.
3276 $X2Y -xinput2............ Compile XInput2 support.
3282 if [ "$PLATFORM_X11" = "yes" ]; then
3283 if [ "$CFG_SM" = "no" ]; then
3290 if [ "$CFG_XSHAPE" = "no" ]; then
3297 if [ "$CFG_XVIDEO" = "no" ]; then
3304 if [ "$CFG_XINERAMA" = "no" ]; then
3311 if [ "$CFG_FONTCONFIG" = "no" ]; then
3318 if [ "$CFG_XCURSOR" = "no" ]; then
3325 if [ "$CFG_XFIXES" = "no" ]; then
3332 if [ "$CFG_XRANDR" = "no" ]; then
3339 if [ "$CFG_XRENDER" = "no" ]; then
3346 if [ "$CFG_MITSHM" = "no" ]; then
3353 if [ "$CFG_XINPUT" = "no" ]; then
3360 if [ "$CFG_XKB" = "no" ]; then
3367 if [ "$CFG_IM" = "no" ]; then
3378 -no-gtkstyle ....... Do not build the GTK theme integration.
3379 + -gtkstyle .......... Build the GTK theme integration.
3381 * -no-nas-sound ...... Do not compile in NAS sound support.
3382 -system-nas-sound .. Use NAS libaudio from the operating system.
3383 See http://radscan.com/nas.html
3385 -no-opengl ......... Do not support OpenGL.
3386 + -opengl <api> ...... Enable OpenGL support.
3387 With no parameter, this will auto-detect the "best"
3388 OpenGL API to use. If desktop OpenGL is available, it
3389 will be used. Use desktop or es2 for <api>
3390 to force the use of the Desktop OpenGL or
3391 OpenGL ES 2 APIs instead.
3393 -no-openvg ........ Do not support OpenVG.
3394 + -openvg ........... Enable OpenVG support.
3395 Requires EGL support, typically supplied by an OpenGL
3396 or other graphics implementation.
3398 $SMN -no-sm ............. Do not support X Session Management.
3399 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3401 $SHN -no-xshape ......... Do not compile XShape support.
3402 $SHY -xshape ............ Compile XShape support.
3403 Requires X11/extensions/shape.h.
3405 $XVN -no-xvideo ......... Do not compile XVideo support.
3406 $XVY -xvideo ............ Compile XVideo support.
3407 Requires X11/extensions/Xv.h & Xvlib.h.
3409 $SHN -no-xsync .......... Do not compile XSync support.
3410 $SHY -xsync ............. Compile XSync support.
3411 Requires X11/extensions/sync.h.
3413 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3414 $XAY -xinerama .......... Compile Xinerama support.
3415 Requires X11/extensions/Xinerama.h and libXinerama.
3416 By default, Xinerama support will be compiled if
3417 available and the shared libraries are dynamically
3420 $XCN -no-xcursor ........ Do not compile Xcursor support.
3421 $XCY -xcursor ........... Compile Xcursor support.
3422 Requires X11/Xcursor/Xcursor.h and libXcursor.
3423 By default, Xcursor support will be compiled if
3424 available and the shared libraries are dynamically
3427 $XFN -no-xfixes ......... Do not compile Xfixes support.
3428 $XFY -xfixes ............ Compile Xfixes support.
3429 Requires X11/extensions/Xfixes.h and libXfixes.
3430 By default, Xfixes support will be compiled if
3431 available and the shared libraries are dynamically
3434 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3435 $XZY -xrandr ............ Compile Xrandr support.
3436 Requires X11/extensions/Xrandr.h and libXrandr.
3438 $XRN -no-xrender ........ Do not compile Xrender support.
3439 $XRY -xrender ........... Compile Xrender support.
3440 Requires X11/extensions/Xrender.h and libXrender.
3442 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3443 $XMY -mitshm ............ Compile MIT-SHM support.
3444 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3446 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3447 $FCGY -fontconfig ........ Compile FontConfig support.
3448 Requires fontconfig/fontconfig.h, libfontconfig,
3449 freetype.h and libfreetype.
3451 $XIN -no-xinput ......... Do not compile Xinput support.
3452 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3453 which requires IRIX with wacom.h and libXi or
3454 XFree86 with X11/extensions/XInput.h and libXi.
3456 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3457 $XKY -xkb ............... Compile XKB support.
3462 if [ "$BUILD_ON_MAC" = "yes" ]; then
3467 -Fstring ........... Add an explicit framework path.
3468 -fw string ......... Add an explicit framework.
3470 * -framework ......... Build Qt as a series of frameworks and
3471 link tools against those frameworks.
3472 -no-framework ...... Do not build Qt as a series of frameworks.
3474 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3475 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3477 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3478 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3480 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3481 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3482 QT_ENABLE_HARFBUZZ environment variable.
3487 if [ "$PLATFORM_QPA" = "yes" ]; then
3493 if [ "$PLATFORM_QPA" = "yes" ]; then
3496 -xplatform target ... The target platform when cross-compiling.
3498 -no-feature-<feature> Do not compile in <feature>.
3499 -feature-<feature> .. Compile in <feature>. The available features
3500 are described in src/corelib/global/qfeatures.txt
3502 -no-freetype ........ Do not compile in Freetype2 support.
3503 -qt-freetype ........ Use the libfreetype bundled with Qt.
3504 * -system-freetype .... Use libfreetype from the operating system.
3505 See http://www.freetype.org/
3507 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3508 default ($CFG_QCONFIG).
3510 -no-opengl .......... Do not support OpenGL.
3511 -opengl <api> ....... Enable OpenGL ES support
3512 With no parameter, this will attempt to auto-detect
3513 OpenGL ES 2, or regular desktop OpenGL.
3514 Use es2 for <api> to override auto-detection.
3518 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3519 if [ "$CFG_GLIB" = "no" ]; then
3527 $GBN -no-glib ........... Do not compile Glib support.
3528 $GBY -glib .............. Compile Glib support.
3533 [ "x$ERROR" = "xyes" ] && exit 1
3538 # -----------------------------------------------------------------------------
3539 # LICENSING, INTERACTIVE PART
3540 # -----------------------------------------------------------------------------
3542 if [ "$PLATFORM_QPA" = "yes" ]; then
3543 Platform="Qt Lighthouse"
3544 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3545 Platform="Qt for Windows"
3546 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3548 Platform="Qt for Linux/X11"
3552 echo "This is the $Platform ${EditionString} Edition."
3555 if [ "$Edition" = "OpenSource" ]; then
3557 echo "You are licensed to use this software under the terms of"
3558 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3559 if [ -f "$relpath/LICENSE.GPL3" ]; then
3560 echo "You are also licensed to use this software under the terms of"
3561 echo "the GNU General Public License (GPL) versions 3."
3567 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3568 echo "You have already accepted the terms of the $LicenseType license."
3571 if [ -f "$relpath/LICENSE.GPL3" ]; then
3572 echo "Type '3' to view the GNU General Public License version 3."
3574 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3575 echo "Type 'yes' to accept this license offer."
3576 echo "Type 'no' to decline this license offer."
3578 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3582 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3584 elif [ "$acceptance" = "no" ]; then
3585 echo "You are not licensed to use this software."
3588 elif [ "$acceptance" = "3" ]; then
3589 more "$relpath/LICENSE.GPL3"
3590 elif [ "$acceptance" = "L" ]; then
3591 more "$relpath/LICENSE.LGPL"
3594 elif [ "$Edition" = "Preview" ]; then
3595 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3598 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3599 echo "You have already accepted the terms of the $LicenseType license."
3602 echo "You are licensed to use this software under the terms of"
3603 echo "the $TheLicense"
3605 echo "Type '?' to read the Preview License."
3606 echo "Type 'yes' to accept this license offer."
3607 echo "Type 'no' to decline this license offer."
3609 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3613 if [ "$acceptance" = "yes" ]; then
3615 elif [ "$acceptance" = "no" ] ;then
3616 echo "You are not licensed to use this software."
3619 elif [ "$acceptance" = "?" ]; then
3620 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3623 elif [ "$Edition" != "OpenSource" ]; then
3624 if [ -n "$ExpiryDate" ]; then
3625 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3626 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3627 Today=`date +%Y%m%d`
3628 if [ "$Today" -gt "$ExpiryDate" ]; then
3629 case "$LicenseType" in
3630 Commercial|Academic|Educational)
3631 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3633 echo "NOTICE NOTICE NOTICE NOTICE"
3635 echo " Your support and upgrade period has expired."
3637 echo " You are no longer licensed to use this version of Qt."
3638 echo " Please contact qt-info@nokia.com to renew your support"
3639 echo " and upgrades for this license."
3641 echo "NOTICE NOTICE NOTICE NOTICE"
3646 echo "WARNING WARNING WARNING WARNING"
3648 echo " Your support and upgrade period has expired."
3650 echo " You may continue to use your last licensed release"
3651 echo " of Qt under the terms of your existing license"
3652 echo " agreement. But you are not entitled to technical"
3653 echo " support, nor are you entitled to use any more recent"
3654 echo " Qt releases."
3656 echo " Please contact qt-info@nokia.com to renew your"
3657 echo " support and upgrades for this license."
3659 echo "WARNING WARNING WARNING WARNING"
3666 echo "NOTICE NOTICE NOTICE NOTICE"
3668 echo " Your Evaluation license has expired."
3670 echo " You are no longer licensed to use this software. Please"
3671 echo " contact qt-info@nokia.com to purchase license, or install"
3672 echo " the Qt Open Source Edition if you intend to develop free"
3675 echo "NOTICE NOTICE NOTICE NOTICE"
3682 TheLicense=`head -n 1 "$outpath/LICENSE"`
3684 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3685 echo "You have already accepted the terms of the $TheLicense."
3688 echo "You are licensed to use this software under the terms of"
3689 echo "the $TheLicense."
3691 echo "Type '?' to view the $TheLicense."
3692 echo "Type 'yes' to accept this license offer."
3693 echo "Type 'no' to decline this license offer."
3695 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3699 if [ "$acceptance" = "yes" ]; then
3701 elif [ "$acceptance" = "no" ]; then
3702 echo "You are not licensed to use this software."
3705 else [ "$acceptance" = "?" ]
3706 more "$outpath/LICENSE"
3711 # this should be moved somewhere else
3714 AIX_VERSION=`uname -v`
3715 if [ "$AIX_VERSION" -lt "5" ]; then
3716 QMakeVar add QMAKE_LIBS_X11 -lbind
3723 #-------------------------------------------------------------------------------
3724 # generate qconfig.cpp
3725 #-------------------------------------------------------------------------------
3726 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3728 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3730 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3731 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3733 /* Installation date */
3734 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3736 /* Installation Info */
3737 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3738 "qt_prfxpath=$QT_INSTALL_PREFIX",
3739 "qt_docspath=$QT_INSTALL_DOCS",
3740 "qt_hdrspath=$QT_INSTALL_HEADERS",
3741 "qt_libspath=$QT_INSTALL_LIBS",
3742 "qt_binspath=$QT_INSTALL_BINS",
3743 "qt_plugpath=$QT_INSTALL_PLUGINS",
3744 "qt_impspath=$QT_INSTALL_IMPORTS",
3745 "qt_datapath=$QT_INSTALL_DATA",
3746 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3747 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3748 "qt_tstspath=$QT_INSTALL_TESTS",
3749 #ifdef QT_BUILD_QMAKE
3750 "qt_ssrtpath=$CFG_SYSROOT",
3751 "qt_hpfxpath=$QT_HOST_PREFIX",
3752 "qt_hbinpath=$QT_HOST_BINS",
3753 "qt_hdatpath=$QT_HOST_DATA",
3756 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3759 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3761 /* strlen( "qt_lcnsxxxx" ) == 12 */
3762 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3763 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3765 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3768 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3769 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3770 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3772 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3773 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3774 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3777 # -----------------------------------------------------------------------------
3778 if [ "$LicenseType" = "Evaluation" ]; then
3779 EVALKEY=qt_qevalkey=$LicenseKeyExt
3780 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3781 EVALKEY=qt_qevalkey=
3784 if [ -n "$EVALKEY" ]; then
3785 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3786 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3787 /* Evaluation license key */
3788 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3790 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3794 # -----------------------------------------------------------------------------
3796 # -----------------------------------------------------------------------------
3799 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3801 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3802 if [ "$OPT_SHADOW" = "yes" ]; then
3803 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3804 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3805 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3809 # $1: input variable name (awk regexp)
3810 # $2: optional output variable name
3811 # $3: optional value transformation (sed command)
3812 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3813 # is where the resulting variable is written to
3814 setBootstrapVariable()
3816 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3820 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3821 echo "Creating qmake. Please wait..."
3824 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3825 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3826 if [ -f "$QCONFIG_H" ]; then
3827 OLD_QCONFIG_H=$QCONFIG_H
3828 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3831 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3832 # when building qmake, we use #defines for the install paths,
3833 # however they are real functions in the library
3834 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3835 mkdir -p "$outpath/src/corelib/global"
3836 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3837 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3840 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3842 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3843 rm -rf mkspecs/default
3844 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3845 mkdir -p "$outpath/qmake" || exit
3847 for mkfile in GNUmakefile Makefile; do
3850 in_mkfile="${mkfile}.in"
3851 if [ "$mkfile" = "Makefile" ]; then
3852 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3853 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3855 in_mkfile="${mkfile}.unix"
3857 in_mkfile="$relpath/qmake/$in_mkfile"
3858 mkfile="$outpath/qmake/$mkfile"
3859 if [ -f "$mkfile" ]; then
3860 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3863 [ -f "$in_mkfile" ] || continue
3865 echo "########################################################################" > "$mkfile"
3866 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3867 echo "########################################################################" >> "$mkfile"
3870 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3871 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3872 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3874 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3875 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3878 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3879 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3880 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3881 setBootstrapVariable QMAKE_CFLAGS
3882 setBootstrapVariable QMAKE_CXXFLAGS
3883 setBootstrapVariable QMAKE_LFLAGS
3885 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3886 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3887 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3889 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3890 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3891 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3892 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3893 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3894 elif [ "$CFG_DEBUG" = "yes" ]; then
3895 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3896 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3897 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3898 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3901 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3902 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3903 for rpath in $RPATH_FLAGS; do
3904 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3907 if [ "$BUILD_ON_MAC" = "yes" ]; then
3908 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3909 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3910 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3911 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3912 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3913 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3914 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3915 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3916 if [ '!' -z "$CFG_SDK" ]; then
3917 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3918 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3919 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3920 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3921 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3924 if [ '!' -z "$D_FLAGS" ]; then
3925 for DEF in $D_FLAGS; do
3926 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3929 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3930 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3931 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3932 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3934 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3935 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3936 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3937 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3938 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3939 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3940 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3941 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3942 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3943 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3945 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3946 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3947 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3948 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3953 QMAKE_BUILD_ERROR=no
3954 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3955 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3956 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3957 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3960 #-------------------------------------------------------------------------------
3961 # tests that need qmake
3962 #-------------------------------------------------------------------------------
3964 #-------------------------------------------------------------------------------
3965 # determine the target and host architectures
3966 #-------------------------------------------------------------------------------
3968 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3969 CFG_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3971 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3972 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3973 # Do the same test again, using the host compiler
3974 CFG_HOST_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3975 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3977 # not cross compiling, host == target
3978 CFG_HOST_ARCH="$CFG_ARCH"
3981 if [ "$OPT_VERBOSE" = "yes" ]; then
3982 echo "System architecture: '$CFG_ARCH'"
3983 if [ "$PLATFORM_QPA" = "yes" ]; then
3984 echo "Host architecture: '$CFG_HOST_ARCH'"
3988 #-------------------------------------------------------------------------------
3989 # functionality tests
3990 #-------------------------------------------------------------------------------
3992 # detect availability of float math.h functions
3993 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3994 CFG_USE_FLOATMATH=yes
3996 CFG_USE_FLOATMATH=no
3999 # detect mmx support
4000 if [ "${CFG_MMX}" = "auto" ]; then
4001 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4008 # detect 3dnow support
4009 if [ "${CFG_3DNOW}" = "auto" ]; then
4010 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4017 # detect sse support
4018 if [ "${CFG_SSE}" = "auto" ]; then
4019 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4026 # detect sse2 support
4027 if [ "${CFG_SSE2}" = "auto" ]; then
4028 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4035 # detect sse3 support
4036 if [ "${CFG_SSE3}" = "auto" ]; then
4037 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4044 # detect ssse3 support
4045 if [ "${CFG_SSSE3}" = "auto" ]; then
4046 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4053 # detect sse4.1 support
4054 if [ "${CFG_SSE4_1}" = "auto" ]; then
4055 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
4062 # detect sse4.2 support
4063 if [ "${CFG_SSE4_2}" = "auto" ]; then
4064 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
4071 # detect avx support
4072 if [ "${CFG_AVX}" = "auto" ]; then
4073 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4080 # check iWMMXt support
4081 if [ "$CFG_IWMMXT" = "yes" ]; then
4082 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4083 if [ $? != "0" ]; then
4084 echo "The iWMMXt functionality test failed!"
4085 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4090 # detect neon support
4091 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4092 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
4097 elif [ "$CFG_ARCH" != "arm" ]; then
4101 # detect mips_dsp support
4102 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
4108 # detect mips_dspr2 support
4109 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
4115 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4118 if [ "$CFG_ZLIB" = "no" ]; then
4119 # Note: Qt no longer support builds without zlib
4120 # So we force a "no" to be "auto" here.
4121 # If you REALLY really need no zlib support, you can still disable
4122 # it by doing the following:
4123 # add "no-zlib" to mkspecs/qconfig.pri
4124 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4126 # There's no guarantee that Qt will build under those conditions
4131 if [ "$CFG_ZLIB" = "auto" ]; then
4132 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
4139 if [ "$CFG_LARGEFILE" = "auto" ]; then
4140 #Large files should be enabled for all Linux systems
4144 if [ "$CFG_GUI" = "no" ]; then
4145 QPA_PLATFORM_GUARD=no
4148 # detect how jpeg should be built
4149 if [ "$CFG_JPEG" = "auto" ]; then
4150 if [ "$CFG_SHARED" = "yes" ]; then
4157 if [ "$CFG_LIBJPEG" = "auto" ]; then
4158 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
4165 # detect how gif should be built
4166 if [ "$CFG_GIF" = "auto" ]; then
4167 if [ "$CFG_SHARED" = "yes" ]; then
4175 if [ "$CFG_LIBPNG" = "auto" ]; then
4176 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
4183 # detect accessibility
4184 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4185 CFG_ACCESSIBILITY=yes
4188 if [ "$CFG_EGLFS" = "yes" ]; then
4189 if [ "$CFG_EGL" = "no" ]; then
4190 echo "The EGLFS plugin requires EGL support and cannot be built"
4196 # auto-detect SQL-modules support
4197 for _SQLDR in $CFG_SQL_AVAILABLE; do
4200 if [ "$CFG_SQL_mysql" != "no" ]; then
4201 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4202 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4203 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4204 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4205 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4206 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4207 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4209 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4210 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4211 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4212 echo " You need MySql 4 or higher."
4213 echo " If you believe this message is in error you may use the continue"
4214 echo " switch (-continue) to $0 to continue."
4219 QT_LFLAGS_MYSQL_R=""
4223 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
4224 QMakeVar add CONFIG use_libmysqlclient_r
4225 if [ "$CFG_SQL_mysql" = "auto" ]; then
4226 CFG_SQL_mysql=plugin
4228 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4229 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
4230 if [ "$CFG_SQL_mysql" = "auto" ]; then
4231 CFG_SQL_mysql=plugin
4234 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4235 echo "MySQL support cannot be enabled due to functionality tests!"
4236 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4237 echo " If you believe this message is in error you may use the continue"
4238 echo " switch (-continue) to $0 to continue."
4243 QT_LFLAGS_MYSQL_R=""
4251 if [ "$CFG_SQL_psql" != "no" ]; then
4252 # Be careful not to use native pg_config when cross building.
4253 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4254 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4255 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4257 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4258 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4259 # But, respect PSQL_LIBS if set
4260 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4261 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
4262 if [ "$CFG_SQL_psql" = "auto" ]; then
4266 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4267 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4268 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4269 echo " If you believe this message is in error you may use the continue"
4270 echo " switch (-continue) to $0 to continue."
4281 if [ "$CFG_SQL_odbc" != "no" ]; then
4282 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
4283 if [ "$CFG_SQL_odbc" = "auto" ]; then
4287 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
4288 QT_LFLAGS_ODBC="-liodbc"
4289 if [ "$CFG_SQL_odbc" = "auto" ]; then
4293 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4294 echo "ODBC support cannot be enabled due to functionality tests!"
4295 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4296 echo " If you believe this message is in error you may use the continue"
4297 echo " switch (-continue) to $0 to continue."
4307 if [ "$CFG_SQL_oci" != "no" ]; then
4308 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
4309 if [ "$CFG_SQL_oci" = "auto" ]; then
4313 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4314 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4315 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4316 echo " If you believe this message is in error you may use the continue"
4317 echo " switch (-continue) to $0 to continue."
4326 if [ "$CFG_SQL_tds" != "no" ]; then
4327 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4328 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4329 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
4330 if [ "$CFG_SQL_tds" = "auto" ]; then
4334 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4335 echo "TDS support cannot be enabled due to functionality tests!"
4336 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4337 echo " If you believe this message is in error you may use the continue"
4338 echo " switch (-continue) to $0 to continue."
4347 if [ "$CFG_SQL_db2" != "no" ]; then
4348 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
4349 if [ "$CFG_SQL_db2" = "auto" ]; then
4353 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4354 echo "ODBC support cannot be enabled due to functionality tests!"
4355 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4356 echo " If you believe this message is in error you may use the continue"
4357 echo " switch (-continue) to $0 to continue."
4366 if [ "$CFG_SQL_ibase" != "no" ]; then
4367 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
4368 if [ "$CFG_SQL_ibase" = "auto" ]; then
4369 CFG_SQL_ibase=plugin
4372 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4373 echo "InterBase support cannot be enabled due to functionality tests!"
4374 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4375 echo " If you believe this message is in error you may use the continue"
4376 echo " switch (-continue) to $0 to continue."
4385 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4386 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
4387 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4388 CFG_SQL_sqlite2=plugin
4391 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4392 echo "SQLite2 support cannot be enabled due to functionality tests!"
4393 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4394 echo " If you believe this message is in error you may use the continue"
4395 echo " switch (-continue) to $0 to continue."
4404 if [ "$CFG_SQL_sqlite" != "no" ]; then
4405 SQLITE_AUTODETECT_FAILED="no"
4406 if [ "$CFG_SQLITE" = "system" ]; then
4407 if [ -n "$PKG_CONFIG" ]; then
4408 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4409 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4411 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
4412 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4413 CFG_SQL_sqlite=plugin
4415 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4417 SQLITE_AUTODETECT_FAILED="yes"
4420 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4421 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4422 CFG_SQL_sqlite=plugin
4425 SQLITE_AUTODETECT_FAILED="yes"
4429 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4430 echo "SQLite support cannot be enabled due to functionality tests!"
4431 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4432 echo " If you believe this message is in error you may use the continue"
4433 echo " switch (-continue) to $0 to continue."
4439 if [ "$OPT_VERBOSE" = "yes" ]; then
4440 echo "unknown SQL driver: $_SQLDR"
4446 # auto-detect NIS support
4447 if [ "$CFG_NIS" != "no" ]; then
4448 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
4451 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4452 echo "NIS support cannot be enabled due to functionality tests!"
4453 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4454 echo " If you believe this message is in error you may use the continue"
4455 echo " switch (-continue) to $0 to continue."
4463 # auto-detect CUPS support
4464 if [ "$CFG_CUPS" != "no" ]; then
4465 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
4468 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4469 echo "Cups support cannot be enabled due to functionality tests!"
4470 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4471 echo " If you believe this message is in error you may use the continue"
4472 echo " switch (-continue) to $0 to continue."
4480 # auto-detect iconv(3) support
4481 if [ "$CFG_ICONV" != "no" ]; then
4482 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4484 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
4486 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
4488 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
4491 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4492 echo "Iconv support cannot be enabled due to functionality tests!"
4493 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4494 echo " If you believe this message is in error you may use the continue"
4495 echo " switch (-continue) to $0 to continue."
4503 # auto-detect libdbus-1 support
4504 if [ "$CFG_DBUS" != "no" ]; then
4505 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4506 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4507 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4509 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
4510 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4511 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4512 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4514 if [ "$CFG_DBUS" = "auto" ]; then
4516 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4517 # CFG_DBUS is "yes" or "linked" here
4519 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4520 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4521 echo " If you believe this message is in error you may use the continue"
4522 echo " switch (-continue) to $0 to continue."
4529 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4531 # auto-detect Glib support
4532 if [ "$CFG_GLIB" != "no" ]; then
4533 if [ -n "$PKG_CONFIG" ]; then
4534 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4535 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4537 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
4539 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4540 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4542 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4543 echo "Glib support cannot be enabled due to functionality tests!"
4544 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4545 echo " If you believe this message is in error you may use the continue"
4546 echo " switch (-continue) to $0 to continue."
4555 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4556 if [ -n "$PKG_CONFIG" ]; then
4557 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4558 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4560 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
4562 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4563 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4565 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4566 echo "Gstreamer support cannot be enabled due to functionality tests!"
4567 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4568 echo " If you believe this message is in error you may use the continue"
4569 echo " switch (-continue) to $0 to continue."
4575 elif [ "$CFG_GLIB" = "no" ]; then
4579 # auto-detect libicu support
4580 if [ "$CFG_ICU" != "no" ]; then
4581 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4582 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4584 if [ "$CFG_ICU" = "auto" ]; then
4586 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4589 echo "The ICU library support cannot be enabled."
4590 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4591 echo " If you believe this message is in error you may use the continue"
4592 echo " switch (-continue) to $0 to continue."
4598 # Auto-detect PulseAudio support
4599 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4600 if [ -n "$PKG_CONFIG" ]; then
4601 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4602 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4604 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
4606 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4607 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4609 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4610 echo "PulseAudio support cannot be enabled due to functionality tests!"
4611 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4612 echo " If you believe this message is in error you may use the continue"
4613 echo " switch (-continue) to $0 to continue."
4623 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4624 x11tests="$relpath/config.tests/x11"
4627 # work around broken X11 headers when using GCC 2.95 or later
4629 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4630 if [ $NOTYPE = "yes" ]; then
4631 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4632 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4635 # Check we actually have X11 :-)
4636 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4637 if [ $? != "0" ]; then
4638 echo "Basic XLib functionality test failed!"
4639 echo " You might need to modify the include and library search paths by editing"
4640 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4646 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4647 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4648 if [ "$CFG_GUI" = "no" ]; then
4649 if [ "$CFG_OPENGL" = "auto" ]; then
4652 if [ "$CFG_OPENGL" != "no" ]; then
4653 echo "OpenGL enabled, but GUI disabled."
4654 echo " You might need to either enable the GUI or disable OpenGL"
4658 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4659 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
4661 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
4664 if [ "$CFG_OPENGL" = "yes" ]; then
4665 echo "All the OpenGL functionality tests failed!"
4666 echo " You might need to modify the include and library search paths by editing"
4667 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4668 echo " ${XQMAKESPEC}."
4675 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4676 if [ "$CFG_OPENGL" = "desktop" ]; then
4677 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4678 if [ $? != "0" ]; then
4679 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4686 elif [ "$CFG_OPENGL" = "es2" ]; then
4688 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4689 if [ $? != "0" ]; then
4690 echo "The OpenGL ES 2.0 functionality test failed!"
4691 echo " You might need to modify the include and library search paths by editing"
4692 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4693 echo " ${XQMAKESPEC}."
4696 elif [ "$CFG_OPENGL" = "desktop" ]; then
4697 # Desktop OpenGL support
4698 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4699 if [ $? != "0" ]; then
4700 echo "The OpenGL functionality test failed!"
4701 echo " You might need to modify the include and library search paths by editing"
4702 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4703 echo " ${XQMAKESPEC}."
4708 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4709 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4710 if [ $? != "0" ]; then
4711 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4718 fi # X11/MINGW OpenGL
4721 if [ "$PLATFORM_X11" = "yes" ]; then
4722 # auto-detect Xcursor support
4723 if [ "$CFG_XCURSOR" != "no" ]; then
4724 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
4725 if [ "$CFG_XCURSOR" != "runtime" ]; then
4729 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4730 echo "Xcursor support cannot be enabled due to functionality tests!"
4731 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4732 echo " If you believe this message is in error you may use the continue"
4733 echo " switch (-continue) to $0 to continue."
4741 # auto-detect Xfixes support
4742 if [ "$CFG_XFIXES" != "no" ]; then
4743 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4744 if [ "$CFG_XFIXES" != "runtime" ]; then
4748 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4749 echo "Xfixes support cannot be enabled due to functionality tests!"
4750 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4751 echo " If you believe this message is in error you may use the continue"
4752 echo " switch (-continue) to $0 to continue."
4760 # auto-detect Xrandr support (resize and rotate extension)
4761 if [ "$CFG_XRANDR" != "no" ]; then
4762 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
4763 if [ "$CFG_XRANDR" != "runtime" ]; then
4767 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4768 echo "Xrandr support cannot be enabled due to functionality tests!"
4769 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4770 echo " If you believe this message is in error you may use the continue"
4771 echo " switch (-continue) to $0 to continue."
4779 # auto-detect Xrender support
4780 if [ "$CFG_XRENDER" != "no" ]; then
4781 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
4784 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4785 echo "Xrender support cannot be enabled due to functionality tests!"
4786 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4787 echo " If you believe this message is in error you may use the continue"
4788 echo " switch (-continue) to $0 to continue."
4796 # auto-detect MIT-SHM support
4797 if [ "$CFG_MITSHM" != "no" ]; then
4798 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
4801 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4802 echo "MITSHM support cannot be enabled due to functionality tests!"
4803 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4804 echo " If you believe this message is in error you may use the continue"
4805 echo " switch (-continue) to $0 to continue."
4813 # auto-detect Session Management support
4814 if [ "$CFG_SM" = "auto" ]; then
4815 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
4818 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4819 echo "Session Management support cannot be enabled due to functionality tests!"
4820 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4821 echo " If you believe this message is in error you may use the continue"
4822 echo " switch (-continue) to $0 to continue."
4830 # auto-detect SHAPE support
4831 if [ "$CFG_XSHAPE" != "no" ]; then
4832 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
4835 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4836 echo "XShape support cannot be enabled due to functionality tests!"
4837 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4838 echo " If you believe this message is in error you may use the continue"
4839 echo " switch (-continue) to $0 to continue."
4847 # auto-detect XVideo support
4848 if [ "$CFG_XVIDEO" != "no" ]; then
4849 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
4852 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4853 echo "XVideo support cannot be enabled due to functionality tests!"
4854 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4855 echo " If you believe this message is in error you may use the continue"
4856 echo " switch (-continue) to $0 to continue."
4864 # auto-detect XSync support
4865 if [ "$CFG_XSYNC" != "no" ]; then
4866 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
4869 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4870 echo "XSync support cannot be enabled due to functionality tests!"
4871 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4872 echo " If you believe this message is in error you may use the continue"
4873 echo " switch (-continue) to $0 to continue."
4881 # auto-detect Xinerama support
4882 if [ "$CFG_XINERAMA" != "no" ]; then
4883 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
4884 if [ "$CFG_XINERAMA" != "runtime" ]; then
4888 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4889 echo "Xinerama support cannot be enabled due to functionality tests!"
4890 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4891 echo " If you believe this message is in error you may use the continue"
4892 echo " switch (-continue) to $0 to continue."
4900 # auto-detect Xinput support
4901 if [ "$CFG_XINPUT" != "no" ]; then
4902 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
4903 if [ "$CFG_XINPUT" != "runtime" ]; then
4907 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4908 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4909 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4910 echo " If you believe this message is in error you may use the continue"
4911 echo " switch (-continue) to $0 to continue."
4919 # auto-detect XKB support
4920 if [ "$CFG_XKB" != "no" ]; then
4921 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
4924 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4925 echo "XKB support cannot be enabled due to functionality tests!"
4926 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4927 echo " If you believe this message is in error you may use the continue"
4928 echo " switch (-continue) to $0 to continue."
4936 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4937 if [ -n "$PKG_CONFIG" ]; then
4938 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4939 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4941 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4943 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4944 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4946 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4947 echo "Gtk theme support cannot be enabled due to functionality tests!"
4948 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4949 echo " If you believe this message is in error you may use the continue"
4950 echo " switch (-continue) to $0 to continue."
4956 elif [ "$CFG_GLIB" = "no" ]; then
4961 # auto-detect FontConfig support
4962 if [ "$CFG_FONTCONFIG" != "no" ]; then
4963 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4964 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4965 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4967 QT_CFLAGS_FONTCONFIG=
4968 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4970 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
4972 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4973 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4974 CFG_LIBFREETYPE=system
4976 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4977 echo "FontConfig support cannot be enabled due to functionality tests!"
4978 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4979 echo " If you believe this message is in error you may use the continue"
4980 echo " switch (-continue) to $0 to continue."
4989 if [ "$BUILD_ON_MAC" = "yes" ]; then
4990 if [ "$CFG_PHONON" != "no" ]; then
4991 # Always enable Phonon (unless it was explicitly disabled)
4995 if [ "$CFG_COREWLAN" = "auto" ]; then
4996 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
5004 if [ "$PLATFORM_QPA" = "yes" ]; then
5005 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5006 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5007 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
5009 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
5012 if [ "$CFG_OPENGL" = "yes" ]; then
5013 echo "All the OpenGL functionality tests failed!"
5014 echo " You might need to modify the include and library search paths by editing"
5015 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5016 echo " ${XQMAKESPEC}."
5021 elif [ "$CFG_OPENGL" = "es2" ]; then
5023 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5024 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5025 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5026 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5027 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5028 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5029 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5030 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5033 "$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
5034 if [ $? != "0" ]; then
5035 echo "The OpenGL ES 2.0 functionality test failed!"
5036 echo " You might need to modify the include and library search paths by editing"
5037 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5038 echo " ${XQMAKESPEC}."
5041 elif [ "$CFG_OPENGL" = "desktop" ]; then
5042 # Desktop OpenGL support
5043 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5044 if [ $? != "0" ]; then
5045 echo "The OpenGL functionality test failed!"
5046 echo " You might need to modify the include and library search paths by editing"
5047 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5048 echo " ${XQMAKESPEC}."
5053 # auto-detect FontConfig support
5054 if [ "$CFG_FONTCONFIG" != "no" ]; then
5055 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5056 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5057 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5059 QT_CFLAGS_FONTCONFIG=
5060 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5062 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
5063 QT_CONFIG="$QT_CONFIG fontconfig"
5064 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5065 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5066 CFG_LIBFREETYPE=system
5071 # Save these for a check later
5072 ORIG_CFG_XCB="$CFG_XCB"
5073 ORIG_CFG_EGLFS="$CFG_EGLFS"
5075 if [ "$CFG_LIBUDEV" != "no" ]; then
5076 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5077 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5078 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5079 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5080 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5082 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
5084 QT_CONFIG="$QT_CONFIG libudev"
5085 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5086 echo "The libudev functionality test failed!"
5090 QMakeVar add DEFINES QT_NO_LIBUDEV
5094 if [ "$CFG_EVDEV" != "no" ]; then
5095 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5097 QT_CONFIG="$QT_CONFIG evdev"
5098 elif [ "$CFG_EVDEV" = "yes" ]; then
5099 echo "The evdev functionality test failed!"
5103 QMakeVar add DEFINES QT_NO_EVDEV
5107 # Check we actually have X11 :-)
5108 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
5109 QT_CONFIG="$QT_CONFIG xlib"
5112 # auto-detect Xrender support
5113 if [ "$CFG_XRENDER" != "no" ]; then
5114 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
5116 QT_CONFIG="$QT_CONFIG xrender"
5118 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5119 echo "Xrender support cannot be enabled due to functionality tests!"
5120 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5121 echo " If you believe this message is in error you may use the continue"
5122 echo " switch (-continue) to $0 to continue."
5130 if [ "$CFG_XCB" != "no" ]; then
5131 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
5132 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5133 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5135 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
5137 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
5138 QT_CONFIG="$QT_CONFIG xcb-render"
5141 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
5143 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5146 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
5147 QT_CONFIG="$QT_CONFIG xcb-xlib"
5150 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5151 # auto-detect XInput2/Xinput support
5152 if [ "$CFG_XINPUT2" != "no" ]; then
5153 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
5157 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5158 echo "XInput2 support cannot be enabled due to functionality tests!"
5159 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5160 echo " If you believe this message is in error you may use the continue"
5161 echo " switch (-continue) to $0 to continue."
5170 if [ "$CFG_XCB" = "yes" ]; then
5171 echo "The XCB test failed!"
5172 echo " You might need to install dependency packages."
5173 echo " See src/plugins/platforms/xcb/README."
5177 QMakeVar add DEFINES QT_NO_XCB
5181 # Detect libxkbcommon
5182 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5183 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5184 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5185 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5186 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5188 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5192 if [ "$CFG_EGL" != "no" ]; then
5193 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
5194 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5195 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
5196 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
5197 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
5198 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
5199 fi # detect EGL support
5200 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
5202 elif [ "$CFG_EGL" = "yes" ]; then
5203 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
5204 echo " You might need to modify the include and library search paths by editing"
5205 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
5212 if [ "$CFG_EGLFS" != "no" ]; then
5213 CFG_EGLFS="$CFG_EGL"
5216 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5217 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5218 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5219 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5222 if [ "$BUILD_ON_MAC" = "yes" ]; then
5223 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
5224 QT_CONFIG="$QT_CONFIG coreservices"
5226 QMakeVar add DEFINES QT_NO_CORESERVICES
5230 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5231 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
5232 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
5233 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
5234 echo "No QPA platform plugin enabled!"
5235 echo " If you really want to build without a QPA platform plugin you must pass"
5236 echo " -no-xcb and -no-eglfs to configure. Doing this will"
5237 echo " produce a Qt that cannot run GUI applications."
5238 echo " The dependencies needed for xcb to build are listed in"
5239 echo " src/plugins/platforms/xcb/README"
5247 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5250 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5251 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5252 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
5253 CFG_LIBFREETYPE=system
5260 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5264 if [ "$CFG_STL" != "no" ]; then
5265 if [ "$HAVE_STL" = "yes" ]; then
5268 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5269 echo "STL support cannot be enabled due to functionality tests!"
5270 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5271 echo " If you believe this message is in error you may use the continue"
5272 echo " switch (-continue) to $0 to continue."
5280 # detect POSIX clock_gettime()
5281 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5282 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
5283 CFG_CLOCK_GETTIME=yes
5285 CFG_CLOCK_GETTIME=no
5289 # detect POSIX monotonic clocks
5290 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5291 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
5292 CFG_CLOCK_MONOTONIC=yes
5294 CFG_CLOCK_MONOTONIC=no
5296 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5297 CFG_CLOCK_MONOTONIC=no
5301 if [ "$CFG_MREMAP" = "auto" ]; then
5302 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5309 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5310 if [ "$CFG_GETADDRINFO" != "no" ]; then
5311 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5314 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5315 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5316 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5317 echo " If you believe this message is in error you may use the continue"
5318 echo " switch (-continue) to $0 to continue."
5326 # find if the platform provides inotify
5327 if [ "$CFG_INOTIFY" != "no" ]; then
5328 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5331 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5332 echo "inotify support cannot be enabled due to functionality tests!"
5333 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5334 echo " If you believe this message is in error you may use the continue"
5335 echo " switch (-continue) to $0 to continue."
5343 # find if the platform provides if_nametoindex (ipv6 interface name support)
5344 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5345 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
5348 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5349 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5350 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5351 echo " If you believe this message is in error you may use the continue"
5352 echo " switch (-continue) to $0 to continue."
5360 # find if the platform provides getifaddrs (network interface enumeration)
5361 if [ "$CFG_GETIFADDRS" != "no" ]; then
5362 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5365 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5366 echo "getifaddrs support cannot be enabled due to functionality tests!"
5367 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5368 echo " If you believe this message is in error you may use the continue"
5369 echo " switch (-continue) to $0 to continue."
5378 if [ "$CFG_OPENSSL" != "no" ]; then
5379 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
5380 if [ "$CFG_OPENSSL" = "auto" ]; then
5384 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5385 echo "OpenSSL support cannot be enabled due to functionality tests!"
5386 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5387 echo " If you believe this message is in error you may use the continue"
5388 echo " switch (-continue) to $0 to continue."
5397 if [ "$CFG_PCRE" != "qt" ]; then
5398 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5401 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5402 echo "PCRE support cannot be enabled due to functionality tests!"
5403 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5404 echo " If you believe this message is in error you may use the continue"
5405 echo " switch (-continue) to $0 to continue."
5413 # detect OpenVG support
5414 if [ "$CFG_OPENVG" != "no" ]; then
5415 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
5416 if [ "$CFG_OPENVG" = "auto" ]; then
5419 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
5420 if [ "$CFG_OPENVG" = "auto" ]; then
5423 CFG_OPENVG_ON_OPENGL=yes
5424 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
5425 if [ "$CFG_OPENVG" = "auto" ]; then
5428 CFG_OPENVG_LC_INCLUDES=yes
5429 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
5430 if [ "$CFG_OPENVG" = "auto" ]; then
5433 CFG_OPENVG_LC_INCLUDES=yes
5434 CFG_OPENVG_ON_OPENGL=yes
5436 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5437 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5438 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5439 echo " If you believe this message is in error you may use the continue"
5440 echo " switch (-continue) to $0 to continue."
5446 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
5447 CFG_OPENVG_SHIVA=yes
5451 if [ "$CFG_ALSA" = "auto" ]; then
5452 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5459 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5460 if [ "$CFG_ARCH" = "arm" ]; then
5461 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5462 if [ $? != "0" ]; then
5463 CFG_JAVASCRIPTCORE_JIT=no
5466 case "$XPLATFORM" in
5468 CFG_JAVASCRIPTCORE_JIT=no
5474 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5475 QMakeVar set JAVASCRIPTCORE_JIT yes
5476 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5477 QMakeVar set JAVASCRIPTCORE_JIT no
5480 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5481 CFG_AUDIO_BACKEND=yes
5484 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5485 echo "Warning: largefile support cannot be disabled for win32."
5489 #-------------------------------------------------------------------------------
5490 # ask for all that hasn't been auto-detected or specified in the arguments
5491 #-------------------------------------------------------------------------------
5493 # enable dwarf2 support on Mac
5494 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5495 QT_CONFIG="$QT_CONFIG dwarf2"
5498 # Detect the default arch (x86 or x86_64) on Mac OS X
5499 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5501 case `file "${outpath}/bin/qmake"` in
5509 # unsupported/unknown
5513 if [ -n "$DEFAULT_ARCH" ]; then
5514 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5515 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5516 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5517 # Make the application arch follow the Qt arch
5518 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5523 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5524 QT_CONFIG="$QT_CONFIG phonon-backend"
5527 # disable accessibility
5528 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5529 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5531 QT_CONFIG="$QT_CONFIG accessibility"
5535 if [ "$CFG_EGL" = "yes" ]; then
5536 QT_CONFIG="$QT_CONFIG egl"
5538 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5542 if [ "$CFG_EGLFS" = "yes" ]; then
5543 QT_CONFIG="$QT_CONFIG eglfs"
5545 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5549 if [ "$CFG_OPENVG" = "no" ]; then
5550 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5552 QT_CONFIG="$QT_CONFIG openvg"
5553 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5554 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5556 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5557 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5559 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5560 QT_CONFIG="$QT_CONFIG shivavg"
5561 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5566 if [ "$CFG_OPENGL" = "no" ]; then
5567 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5569 QT_CONFIG="$QT_CONFIG opengl"
5572 if [ "$CFG_OPENGL" = "es2" ]; then
5573 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5576 if [ "$CFG_OPENGL" = "es2" ]; then
5577 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5578 QT_CONFIG="$QT_CONFIG opengles2"
5581 # safe execution environment
5582 if [ "$CFG_SXE" != "no" ]; then
5583 QT_CONFIG="$QT_CONFIG sxe"
5586 # build up the variables for output
5587 if [ "$CFG_DEBUG" = "yes" ]; then
5588 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5589 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5590 elif [ "$CFG_DEBUG" = "no" ]; then
5591 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5592 QMAKE_CONFIG="$QMAKE_CONFIG release"
5594 if [ "$CFG_SHARED" = "yes" ]; then
5595 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5596 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5597 elif [ "$CFG_SHARED" = "no" ]; then
5598 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5599 QMAKE_CONFIG="$QMAKE_CONFIG static"
5601 if [ "$PLATFORM_QPA" = "yes" ]; then
5602 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5603 QT_CONFIG="$QT_CONFIG qpa"
5604 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5605 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5608 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5609 # Do not set this here for Windows. Let qmake do it so
5610 # debug and release precompiled headers are kept separate.
5611 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5613 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5614 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5615 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5616 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5617 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5618 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5620 if [ "$CFG_STL" = "no" ]; then
5621 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5623 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5625 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5626 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5628 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5629 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5630 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5631 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5632 QMakeVar add QMAKE_CFLAGS -g
5633 QMakeVar add QMAKE_CXXFLAGS -g
5634 QT_CONFIG="$QT_CONFIG separate_debug_info"
5636 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5637 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5639 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5640 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5641 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5642 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5643 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5644 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5645 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5646 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5647 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5648 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5649 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5650 if [ "$CFG_ARCH" = "mips" ]; then
5651 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5652 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5654 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5655 QT_CONFIG="$QT_CONFIG clock-gettime"
5657 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5658 QT_CONFIG="$QT_CONFIG clock-monotonic"
5660 if [ "$CFG_MREMAP" = "yes" ]; then
5661 QT_CONFIG="$QT_CONFIG mremap"
5663 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5664 QT_CONFIG="$QT_CONFIG getaddrinfo"
5666 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5667 QT_CONFIG="$QT_CONFIG ipv6ifname"
5669 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5670 QT_CONFIG="$QT_CONFIG getifaddrs"
5672 if [ "$CFG_INOTIFY" = "yes" ]; then
5673 QT_CONFIG="$QT_CONFIG inotify"
5675 if [ "$CFG_LIBJPEG" = "no" ]; then
5677 elif [ "$CFG_LIBJPEG" = "system" ]; then
5678 QT_CONFIG="$QT_CONFIG system-jpeg"
5680 if [ "$CFG_JPEG" = "no" ]; then
5681 QT_CONFIG="$QT_CONFIG no-jpeg"
5682 elif [ "$CFG_JPEG" = "yes" ]; then
5683 QT_CONFIG="$QT_CONFIG jpeg"
5685 if [ "$CFG_LIBPNG" = "no" ]; then
5688 if [ "$CFG_LIBPNG" = "system" ]; then
5689 QT_CONFIG="$QT_CONFIG system-png"
5691 if [ "$CFG_PNG" = "no" ]; then
5692 QT_CONFIG="$QT_CONFIG no-png"
5693 elif [ "$CFG_PNG" = "yes" ]; then
5694 QT_CONFIG="$QT_CONFIG png"
5696 if [ "$CFG_GIF" = "no" ]; then
5697 QT_CONFIG="$QT_CONFIG no-gif"
5698 elif [ "$CFG_GIF" = "yes" ]; then
5699 QT_CONFIG="$QT_CONFIG gif"
5701 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5702 QT_CONFIG="$QT_CONFIG no-freetype"
5703 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5704 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5705 QT_CONFIG="$QT_CONFIG system-freetype"
5707 QT_CONFIG="$QT_CONFIG freetype"
5709 if [ "$CFG_GUI" = "auto" ]; then
5712 if [ "$CFG_GUI" = "no" ]; then
5713 QT_CONFIG="$QT_CONFIG no-gui"
5716 if [ "$CFG_WIDGETS" = "no" ]; then
5717 QT_CONFIG="$QT_CONFIG no-widgets"
5718 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5721 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5722 #On Mac we implicitly link against libz, so we
5723 #never use the 3rdparty stuff.
5724 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5726 if [ "$CFG_ZLIB" = "yes" ]; then
5727 QT_CONFIG="$QT_CONFIG zlib"
5728 elif [ "$CFG_ZLIB" = "system" ]; then
5729 QT_CONFIG="$QT_CONFIG system-zlib"
5732 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5733 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5734 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5735 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5736 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5737 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5738 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5739 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5740 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5741 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5742 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5743 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5744 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5745 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5747 if [ "$PLATFORM_X11" = "yes" ]; then
5748 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5750 # for some reason, the following libraries are not always built shared,
5751 # so *every* program/lib (including Qt) has to link against them
5752 if [ "$CFG_XSHAPE" = "yes" ]; then
5753 QT_CONFIG="$QT_CONFIG xshape"
5755 if [ "$CFG_XVIDEO" = "yes" ]; then
5756 QT_CONFIG="$QT_CONFIG xvideo"
5758 if [ "$CFG_XSYNC" = "yes" ]; then
5759 QT_CONFIG="$QT_CONFIG xsync"
5761 if [ "$CFG_XINERAMA" = "yes" ]; then
5762 QT_CONFIG="$QT_CONFIG xinerama"
5763 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5765 if [ "$CFG_XCURSOR" = "yes" ]; then
5766 QT_CONFIG="$QT_CONFIG xcursor"
5767 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5769 if [ "$CFG_XFIXES" = "yes" ]; then
5770 QT_CONFIG="$QT_CONFIG xfixes"
5771 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5773 if [ "$CFG_XRANDR" = "yes" ]; then
5774 QT_CONFIG="$QT_CONFIG xrandr"
5775 if [ "$CFG_XRENDER" != "yes" ]; then
5776 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5777 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5779 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5782 if [ "$CFG_XRENDER" = "yes" ]; then
5783 QT_CONFIG="$QT_CONFIG xrender"
5784 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5786 if [ "$CFG_MITSHM" = "yes" ]; then
5787 QT_CONFIG="$QT_CONFIG mitshm"
5789 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5790 QT_CONFIG="$QT_CONFIG fontconfig"
5792 if [ "$CFG_XINPUT" = "yes" ]; then
5793 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5795 if [ "$CFG_XINPUT" = "yes" ]; then
5796 QT_CONFIG="$QT_CONFIG xinput tablet"
5798 if [ "$CFG_XKB" = "yes" ]; then
5799 QT_CONFIG="$QT_CONFIG xkb"
5803 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5804 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5805 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5807 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5808 if [ "$CFG_RPATH" = "yes" ]; then
5809 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5810 # set the default rpath to the library installation directory
5811 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5813 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5814 if [ -n "$RPATH_FLAGS" ]; then
5816 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5820 elif [ "$CFG_RPATH" = "yes" ]; then
5821 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5825 if [ "$CFG_RPATH" = "yes" ]; then
5826 # set the default rpath to the library installation directory
5827 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5829 if [ -n "$RPATH_FLAGS" ]; then
5830 # add the user defined rpaths
5831 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5835 if [ '!' -z "$I_FLAGS" ]; then
5836 # add the user define include paths
5837 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5838 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5841 if [ '!' -z "$W_FLAGS" ]; then
5842 # add the user defined warning flags
5843 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5844 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5845 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5848 # turn off exceptions for the compilers that support it
5849 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5850 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5852 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5855 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5856 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5859 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5860 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5861 # Follow default behavior of configure.exe by overriding with "rtti".
5862 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5865 if [ "$CFG_ALSA" = "yes" ]; then
5866 QT_CONFIG="$QT_CONFIG alsa"
5869 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5870 QT_CONFIG="$QT_CONFIG pulseaudio"
5873 if [ "$CFG_COREWLAN" = "yes" ]; then
5874 QT_CONFIG="$QT_CONFIG corewlan"
5877 if [ "$CFG_ICU" = "yes" ]; then
5878 QT_CONFIG="$QT_CONFIG icu"
5881 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5882 QT_CONFIG="$QT_CONFIG force_asserts"
5885 if [ "$CFG_PCRE" = "qt" ]; then
5886 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5890 # Some Qt modules are too advanced in C++ for some old compilers
5891 # Detect here the platforms where they are known to work.
5893 # See Qt documentation for more information on which features are
5894 # supported and on which compilers.
5896 canBuildQtConcurrent="yes"
5897 canUseV8Snapshot="yes"
5899 case "$XPLATFORM" in
5901 # PA-RISC's assembly is too limited
5902 # gcc 3.4 on that platform can't build QtXmlPatterns
5903 # the assembly it generates cannot be compiled
5905 # Check gcc's version
5906 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5910 canBuildQtXmlPatterns="no"
5914 canBuildQtXmlPatterns="no"
5918 unsupported/vxworks-*-g++*)
5921 unsupported/vxworks-*-dcc*)
5923 canBuildQtXmlPatterns="no"
5926 # Check gcc's version
5927 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5935 canBuildQtXmlPatterns="no"
5940 # Check the compiler version
5941 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5944 canBuildQtXmlPatterns="no"
5945 canBuildQtConcurrent="no"
5949 canBuildQtConcurrent="no"
5955 canBuildQtXmlPatterns="no"
5956 canBuildQtConcurrent="no"
5962 # Get the xlC version
5963 cat > xlcver.c <<EOF
5967 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5972 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5973 xlcver=`./xlcver 2>/dev/null`
5976 if [ "$OPT_VERBOSE" = "yes" ]; then
5977 if [ -n "$xlcver" ]; then
5978 echo Found IBM xlC version: $xlcver.
5980 echo Could not determine IBM xlC version, assuming oldest supported.
5987 canBuildQtXmlPatterns="no"
5988 canBuildQtConcurrent="no"
5992 canBuildQtConcurrent="no"
5998 canBuildQtConcurrent="no"
6002 if [ "$CFG_GUI" = "no" ]; then
6003 # WebKit requires QtGui
6007 if [ "$CFG_SHARED" = "no" ]; then
6009 echo "WARNING: Using static linking will disable the WebKit module."
6014 CFG_CONCURRENT="yes"
6015 if [ "$canBuildQtConcurrent" = "no" ]; then
6016 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6019 QT_CONFIG="$QT_CONFIG concurrent"
6023 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6024 QT_CONFIG="$QT_CONFIG audio-backend"
6028 if [ "$CFG_WEBKIT" = "debug" ]; then
6029 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6033 QT_CONFIG="$QT_CONFIG v8"
6034 # Detect snapshot support
6035 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6036 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6039 *) canUseV8Snapshot="no"
6043 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6044 # QEMU crashes when building inside Scratchbox with an ARM target
6045 canUseV8Snapshot="no"
6048 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6049 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6051 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6052 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6055 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6056 QT_CONFIG="$QT_CONFIG v8snapshot"
6060 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6061 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6064 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6067 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6068 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6069 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6074 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6075 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6076 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6083 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6089 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6091 case "$COMPILER_VERSION" in
6093 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6094 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6095 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6098 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6099 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6100 QT_GCC_PATCH_VERSION=0
6110 #-------------------------------------------------------------------------------
6111 # part of configuration information goes into qconfig.h
6112 #-------------------------------------------------------------------------------
6114 case "$CFG_QCONFIG" in
6116 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6119 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6120 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6121 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6122 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6123 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6124 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6126 echo "#endif" >>"$tmpconfig"
6130 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6134 # define QT_EDITION $QT_EDITION
6138 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6139 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6141 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6142 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6145 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6146 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6149 if [ "$BUILD_ON_MAC" = "yes" ]; then
6150 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6151 #if defined(__LP64__)
6152 # define QT_POINTER_SIZE 8
6154 # define QT_POINTER_SIZE 4
6158 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6159 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6162 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6163 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6164 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6168 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6170 if [ "$CFG_DEV" = "yes" ]; then
6171 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6174 if [ "$PLATFORM_QPA" = "yes" ]; then
6175 # Add QPA to config.h
6176 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6179 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6180 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6183 # Add turned on SQL drivers
6184 for DRIVER in $CFG_SQL_AVAILABLE; do
6185 eval "VAL=\$CFG_SQL_$DRIVER"
6188 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6189 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6190 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6193 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6199 QMakeVar set sql-drivers "$SQL_DRIVERS"
6200 QMakeVar set sql-plugins "$SQL_PLUGINS"
6202 # Add other configuration options to the qconfig.h file
6203 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6204 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6205 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6206 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6207 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6208 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6209 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6211 # X11/Unix/Mac only configs
6212 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6213 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6214 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6215 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6216 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6217 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6218 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6219 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6220 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6221 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6222 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6223 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6224 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6225 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6227 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6228 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6229 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6230 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6231 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6232 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6233 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6234 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6235 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6236 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6237 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6238 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6239 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6241 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6242 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6243 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6244 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6245 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6246 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6247 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6248 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6250 # sort QCONFIG_FLAGS for neatness if we can
6251 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6252 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6254 if [ -n "$QCONFIG_FLAGS" ]; then
6255 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6256 #ifndef QT_BOOTSTRAPPED
6259 for cfg in $QCONFIG_FLAGS; do
6260 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6261 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6262 # figure out define logic, so we can output the correct
6263 # ifdefs to override the global defines in a project
6265 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6266 # QT_NO_option can be forcefully turned on by QT_option
6267 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6268 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6269 # QT_option can be forcefully turned off by QT_NO_option
6270 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6273 if [ -z $cfgdNeg ]; then
6274 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6281 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6282 #if defined($cfgd) && defined($cfgdNeg)
6284 #elif !defined($cfgd) && !defined($cfgdNeg)
6291 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6292 #endif // QT_BOOTSTRAPPED
6297 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6298 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6299 #define QT_VISIBILITY_AVAILABLE
6304 if [ -n "$QT_LIBINFIX" ]; then
6305 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6306 #define QT_LIBINFIX "$QT_LIBINFIX"
6311 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6312 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6313 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6315 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6316 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6317 chmod -w "$outpath/src/corelib/global/qconfig.h"
6318 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6319 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6323 #-------------------------------------------------------------------------------
6324 # save configuration into qconfig.pri
6325 #-------------------------------------------------------------------------------
6326 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6327 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6328 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6329 if [ "$CFG_DEBUG" = "yes" ]; then
6330 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6331 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6332 QT_CONFIG="$QT_CONFIG release"
6334 QT_CONFIG="$QT_CONFIG debug"
6335 elif [ "$CFG_DEBUG" = "no" ]; then
6336 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6337 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6338 QT_CONFIG="$QT_CONFIG debug"
6340 QT_CONFIG="$QT_CONFIG release"
6342 if [ "$CFG_STL" = "yes" ]; then
6343 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6345 if [ "$CFG_FRAMEWORK" = "no" ]; then
6346 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6348 QT_CONFIG="$QT_CONFIG qt_framework"
6349 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6351 if [ "$CFG_DEV" = "yes" ]; then
6352 QT_CONFIG="$QT_CONFIG private_tests"
6355 cat >>"$QTCONFIG.tmp" <<EOF
6357 CONFIG += $QTCONFIG_CONFIG
6359 QT_HOST_ARCH = $CFG_HOST_ARCH
6360 QT_EDITION = $Edition
6361 QT_CONFIG += $QT_CONFIG
6364 QT_VERSION = $QT_VERSION
6365 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6366 QT_MINOR_VERSION = $QT_MINOR_VERSION
6367 QT_PATCH_VERSION = $QT_PATCH_VERSION
6370 QT_LIBINFIX = $QT_LIBINFIX
6371 QT_NAMESPACE = $QT_NAMESPACE
6374 if [ -n "$CFG_SYSROOT" ]; then
6375 echo "# sysroot" >>"$QTCONFIG.tmp"
6376 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6377 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6378 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6379 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6380 echo "}" >> "$QTCONFIG.tmp"
6381 echo >> "$QTCONFIG.tmp"
6383 if [ -n "$RPATH_FLAGS" ]; then
6384 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
6386 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6387 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6388 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6389 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6392 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6393 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6394 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6397 # replace qconfig.pri if it differs from the newly created temp file
6398 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6399 rm -f "$QTCONFIG.tmp"
6401 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6404 #-------------------------------------------------------------------------------
6405 # save configuration into qmodule.pri
6406 #-------------------------------------------------------------------------------
6407 QTMODULE="$outpath/mkspecs/qmodule.pri"
6409 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6411 # Ensure we can link to uninistalled libraries
6412 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6413 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6415 if [ -n "$QT_CFLAGS_PSQL" ]; then
6416 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6418 if [ -n "$QT_LFLAGS_PSQL" ]; then
6419 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6421 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6422 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6424 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6425 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6427 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6428 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6430 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6431 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6433 if [ -n "$QT_LFLAGS_ODBC" ]; then
6434 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6436 if [ -n "$QT_LFLAGS_TDS" ]; then
6437 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6440 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6441 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6444 #dump in the OPENSSL_LIBS info
6445 if [ '!' -z "$OPENSSL_LIBS" ]; then
6446 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6447 elif [ "$CFG_OPENSSL" = "linked" ]; then
6448 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6451 #dump in the SDK info
6452 if [ '!' -z "$CFG_SDK" ]; then
6453 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6457 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6458 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6460 # replace qmodule.pri if it differs from the newly created temp file
6461 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6462 rm -f "$QTMODULE.tmp"
6464 mv -f "$QTMODULE.tmp" "$QTMODULE"
6467 #-------------------------------------------------------------------------------
6468 # save configuration into .qmake.cache
6469 #-------------------------------------------------------------------------------
6471 CACHEFILE="$outpath/.qmake.cache"
6472 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6473 cat >>"$CACHEFILE.tmp" <<EOF
6475 QT_SOURCE_TREE = \$\$quote($relpath)
6476 QT_BUILD_TREE = \$\$quote($outpath)
6477 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6479 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6480 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6481 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6483 include(\$\$PWD/mkspecs/qmodule.pri)
6484 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6488 #dump the qmake spec
6489 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6490 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6492 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6495 # replace .qmake.cache if it differs from the newly created temp file
6496 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6497 rm -f "$CACHEFILE.tmp"
6499 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6502 #-------------------------------------------------------------------------------
6503 # give feedback on configuration
6504 #-------------------------------------------------------------------------------
6508 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6511 This target is using the GNU C++ compiler ($PLATFORM).
6513 Recent versions of this compiler automatically include code for
6514 exceptions, which increase both the size of the Qt libraries and
6515 the amount of memory taken by your applications.
6517 You may choose to re-run `basename $0` with the -no-exceptions
6518 option to compile Qt without exceptions. This is completely binary
6519 compatible, and existing applications will continue to work.
6527 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6530 This target is using the MIPSpro C++ compiler ($PLATFORM).
6532 You may choose to re-run `basename $0` with the -no-exceptions
6533 option to compile Qt without exceptions. This will make the
6534 size of the Qt library smaller and reduce the amount of memory
6535 taken by your applications.
6547 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6548 echo "Build type: $PLATFORM"
6550 echo "Building on: $PLATFORM"
6551 echo "Building for: $XPLATFORM"
6554 echo "Architecture: $CFG_ARCH"
6555 if [ "$PLATFORM_QPA" = "yes" ]; then
6556 echo "Host architecture: $CFG_HOST_ARCH"
6559 if [ -n "$PLATFORM_NOTES" ]; then
6560 echo "Platform notes:"
6561 echo "$PLATFORM_NOTES"
6566 if [ "$OPT_VERBOSE" = "yes" ]; then
6567 echo $ECHO_N "qmake vars .......... $ECHO_C"
6568 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6569 echo "qmake switches ......... $QMAKE_SWITCHES"
6572 echo "Build .................. $CFG_BUILD_PARTS"
6573 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6574 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6575 echo "Debug .................. yes (combined)"
6576 if [ "$CFG_DEBUG" = "yes" ]; then
6577 echo "Default Link ........... debug"
6579 echo "Default Link ........... release"
6582 echo "Debug .................. $CFG_DEBUG"
6584 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6585 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6586 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6587 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6588 echo "QtGui module ........... $CFG_GUI"
6589 echo "QtWidgets module ....... $CFG_WIDGETS"
6590 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6591 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6593 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6595 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6596 echo "STL support ............ $CFG_STL"
6597 echo "PCH support ............ $CFG_PRECOMPILE"
6598 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6599 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6600 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6601 echo "AVX..................... ${CFG_AVX}"
6602 elif [ "$CFG_ARCH" = "arm" ]; then
6603 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6604 echo "NEON support ........... ${CFG_NEON}"
6606 if [ "$CFG_ARCH" = "mips" ]; then
6607 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
6609 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6610 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6611 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6612 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6613 echo "NIS support ............ $CFG_NIS"
6614 echo "CUPS support ........... $CFG_CUPS"
6615 echo "Iconv support .......... $CFG_ICONV"
6616 echo "Glib support ........... $CFG_GLIB"
6617 echo "GStreamer support ...... $CFG_GSTREAMER"
6618 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6619 echo "Large File support ..... $CFG_LARGEFILE"
6620 echo "GIF support ............ $CFG_GIF"
6621 if [ "$CFG_JPEG" = "no" ]; then
6622 echo "JPEG support ........... $CFG_JPEG"
6624 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6626 if [ "$CFG_PNG" = "no" ]; then
6627 echo "PNG support ............ $CFG_PNG"
6629 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6631 echo "zlib support ........... $CFG_ZLIB"
6632 echo "Session management ..... $CFG_SM"
6633 echo "libudev support ........ $CFG_LIBUDEV"
6635 if [ "$CFG_OPENGL" = "desktop" ]; then
6636 echo "OpenGL support ......... yes (Desktop OpenGL)"
6637 elif [ "$CFG_OPENGL" = "es2" ]; then
6638 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6640 echo "OpenGL support ......... no"
6643 if [ "$CFG_OPENVG" ]; then
6644 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6645 echo "OpenVG support ......... ShivaVG"
6647 echo "OpenVG support ......... $CFG_OPENVG"
6650 if [ "$PLATFORM_X11" = "yes" ]; then
6651 echo "NAS sound support ...... $CFG_NAS"
6652 echo "XShape support ......... $CFG_XSHAPE"
6653 echo "XVideo support ......... $CFG_XVIDEO"
6654 echo "XSync support .......... $CFG_XSYNC"
6655 echo "Xinerama support ....... $CFG_XINERAMA"
6656 echo "Xcursor support ........ $CFG_XCURSOR"
6657 echo "Xfixes support ......... $CFG_XFIXES"
6658 echo "Xrandr support ......... $CFG_XRANDR"
6659 echo "Xi support ............. $CFG_XINPUT"
6660 echo "MIT-SHM support ........ $CFG_MITSHM"
6661 echo "FontConfig support ..... $CFG_FONTCONFIG"
6662 echo "XKB Support ............ $CFG_XKB"
6663 echo "immodule support ....... $CFG_IM"
6664 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6666 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6667 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6668 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6669 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6670 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6671 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6672 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6673 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6674 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6677 if [ "$CFG_OPENSSL" = "yes" ]; then
6678 OPENSSL_LINKAGE="(run-time)"
6679 elif [ "$CFG_OPENSSL" = "linked" ]; then
6680 OPENSSL_LINKAGE="(linked)"
6682 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6683 echo "Alsa support ........... $CFG_ALSA"
6684 if [ "$BUILD_ON_MAC" = "yes" ]; then
6685 echo "CoreWlan support ....... $CFG_COREWLAN"
6687 echo "libICU support ......... $CFG_ICU"
6688 echo "PCRE support ........... $CFG_PCRE"
6689 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6690 echo "Xcb support ............ limited (old version)"
6692 echo "Xcb support ............ $CFG_XCB"
6694 echo "Xrender support ........ $CFG_XRENDER"
6695 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6696 echo "XInput2 support ........ $CFG_XINPUT2"
6698 echo "EGLFS support .......... $CFG_EGLFS"
6701 # complain about not being able to use dynamic plugins if we are using a static build
6702 if [ "$CFG_SHARED" = "no" ]; then
6704 echo "WARNING: Using static linking will disable the use of dynamically"
6705 echo "loaded plugins. Make sure to import all needed static plugins,"
6706 echo "or compile needed modules into the library."
6709 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6711 echo "NOTE: When linking against OpenSSL, you can override the default"
6712 echo "library names through OPENSSL_LIBS."
6714 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6717 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6719 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6720 echo "if you want a pure debug build."
6725 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6730 #-------------------------------------------------------------------------------
6731 # build makefiles based on the configuration
6732 #-------------------------------------------------------------------------------
6734 echo "Finding project files. Please wait..."
6735 if [ "$CFG_NOPROCESS" != "yes" ]; then
6736 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6737 if [ -f "${relpath}/qtbase.pro" ]; then
6738 mkfile="${outpath}/Makefile"
6739 [ -f "$mkfile" ] && chmod +w "$mkfile"
6740 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6744 # .projects -> projects to process
6745 # .projects.1 -> qt and moc
6746 # .projects.2 -> subdirs and libs
6747 # .projects.3 -> the rest
6748 rm -f .projects .projects.1 .projects.2 .projects.3
6750 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6751 if [ -z "$AWK" ]; then
6752 for p in `echo $QMAKE_PROJECTS`; do
6753 echo "$p" >> .projects
6756 cat >projects.awk <<EOF
6762 first = "./.projects.1.tmp"
6763 second = "./.projects.2.tmp"
6764 third = "./.projects.3.tmp"
6769 if ( ! target_file )
6771 print input_file >target_file
6776 input_file = FILENAME
6781 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6784 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6785 target_file = second
6790 matched_target == 0 && /^(TEMPLATE.*=)/ {
6791 if ( \$3 == "subdirs" )
6792 target_file = second
6793 else if ( \$3 == "lib" )
6799 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6800 if ( \$0 ~ /plugin/ )
6803 target_file = second
6808 if ( ! target_file )
6810 print input_file >>target_file
6817 for p in `echo $QMAKE_PROJECTS`; do
6818 echo "$p" >> .projects.all
6821 # if you get errors about the length of the command line to awk, change the -l arg
6823 split -l 100 .projects.all .projects.all.
6824 for p in .projects.all.*; do
6825 "$AWK" -f projects.awk `cat $p`
6826 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6827 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6828 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6829 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6831 rm -f .projects.all* projects.awk
6833 [ -f .projects.1 ] && cat .projects.1 >>.projects
6834 [ -f .projects.2 ] && cat .projects.2 >>.projects
6835 rm -f .projects.1 .projects.2
6836 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6837 cat .projects.3 >>.projects
6841 # don't sort Qt and MOC in with the other project files
6842 # also work around a segfaulting uniq(1)
6843 if [ -f .sorted.projects.2 ]; then
6844 sort .sorted.projects.2 > .sorted.projects.2.new
6845 mv -f .sorted.projects.2.new .sorted.projects.2
6846 cat .sorted.projects.2 >> .sorted.projects.1
6848 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6849 rm -f .sorted.projects.2 .sorted.projects.1
6853 if [ -f .projects ]; then
6854 uniq .projects >.tmp
6855 mv -f .tmp .projects
6856 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6858 if [ -f .projects.3 ]; then
6859 uniq .projects.3 >.tmp
6860 mv -f .tmp .projects.3
6861 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6863 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6867 for part in $CFG_BUILD_PARTS; do
6869 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6870 libs) PART_ROOTS="$PART_ROOTS src" ;;
6871 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6872 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6877 if [ "$CFG_DEV" = "yes" ]; then
6878 PART_ROOTS="$PART_ROOTS tests"
6881 echo "Creating makefiles. Please wait..."
6882 for file in .projects .projects.3; do
6883 [ '!' -f "$file" ] && continue
6884 for a in `cat $file`; do
6886 for r in $PART_ROOTS; do
6887 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6892 [ "$IN_ROOT" = "no" ] && continue
6895 *winmain/winmain.pro)
6896 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6900 */qmake/qmake.pro) continue ;;
6901 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6902 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6908 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6909 test -d "$dir" || mkdir -p "$dir"
6910 OUTDIR="$outpath/$dir"
6911 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6912 # fast configure - the makefile exists, skip it
6913 # since the makefile exists, it was generated by qmake, which means we
6914 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6916 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6919 QMAKE_SPEC_ARGS="-spec $SPEC"
6920 echo $ECHO_N " for $a$ECHO_C"
6922 QMAKE="$outpath/bin/qmake"
6923 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6924 if [ "$file" = ".projects.3" ]; then
6927 cat >"${OUTDIR}/Makefile" <<EOF
6928 # ${OUTDIR}/Makefile: generated by configure
6930 # WARNING: This makefile will be replaced with a real makefile.
6931 # All changes made to this file will be lost.
6933 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6935 cat >>"${OUTDIR}/Makefile" <<EOF
6937 all clean install qmake first Makefile: FORCE
6938 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6946 if [ "$OPT_VERBOSE" = "yes" ]; then
6947 echo " (`basename $SPEC`)"
6948 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6953 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6954 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6958 rm -f .projects .projects.3
6960 #-------------------------------------------------------------------------------
6961 # check for platforms that we don't yet know about
6962 #-------------------------------------------------------------------------------
6963 if [ "$CFG_ARCH" = "unknown" ]; then
6966 NOTICE: configure was unable to determine the architecture
6967 for the $XQMAKESPEC target.
6969 Qt will not use a specialized implementation for any atomic
6970 operations. Instead a generic implemention based on either GCC
6971 intrinsics or C++11 std::atomic<T> will be used (when
6972 available). The generic implementations are generally as fast
6973 as and always as safe as a specialized implementation.
6975 If no generic implementation is available, Qt will use a
6976 fallback UNIX implementation which uses a single
6977 pthread_mutex_t to protect all atomic operations. This
6978 implementation is the slow (but safe) fallback implementation
6979 for architectures Qt does not yet support.
6983 #-------------------------------------------------------------------------------
6984 # check if the user passed the -no-zlib option, which is no longer supported
6985 #-------------------------------------------------------------------------------
6986 if [ -n "$ZLIB_FORCED" ]; then
6987 which_zlib="supplied"
6988 if [ "$CFG_ZLIB" = "system" ]; then
6994 NOTICE: The -no-zlib option was supplied but is no longer
6997 Qt now requires zlib support in all builds, so the -no-zlib
6998 option was ignored. Qt will be built using the $which_zlib
7003 #-------------------------------------------------------------------------------
7004 # check if the user passed the obsoleted -wayland or -no-wayland flag
7005 #-------------------------------------------------------------------------------
7006 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
7009 NOTICE: The -wayland and -no-wayland flags are now obsolete
7011 All configuring of QtWayland plugin and QtCompositor happens in the module
7015 #-------------------------------------------------------------------------------
7016 # check if the user passed the obsoleted -arch or -host-arch options
7017 #-------------------------------------------------------------------------------
7018 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
7021 NOTICE: The -arch and -host-arch options are obsolete.
7023 Qt now detects the target and host architectures based on compiler
7024 output. Qt will be built using $CFG_ARCH for the target architecture
7025 and $CFG_HOST_ARCH for the host architecture (note that these two
7026 will be the same unless you are cross-compiling).
7030 #-------------------------------------------------------------------------------
7031 # finally save the executed command to another script
7032 #-------------------------------------------------------------------------------
7033 if [ `basename $0` != "config.status" ]; then
7034 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7036 # add the system variables
7037 for varname in $SYSTEM_VARIABLES; do
7039 'if [ -n "\$'${varname}'" ]; then
7040 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7045 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7047 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7048 echo "#!/bin/sh" > "$outpath/config.status"
7049 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
7050 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
7051 [ -n "$PKG_CONFIG_LIBDIR" ] && \
7052 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
7053 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7054 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7055 echo "else" >> "$outpath/config.status"
7056 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7057 echo "fi" >> "$outpath/config.status"
7058 chmod +x "$outpath/config.status"
7061 if [ -n "$RPATH_MESSAGE" ]; then
7063 echo "$RPATH_MESSAGE"
7066 MAKE=`basename "$MAKE"`
7068 echo Qt is now configured for building. Just run \'$MAKE\'.
7069 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7070 echo Once everything is built, Qt is installed.
7071 echo You should not run \'$MAKE install\'.
7073 echo Once everything is built, you must run \'$MAKE install\'.
7074 echo Qt will be installed into $QT_INSTALL_PREFIX
7077 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.