2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
134 values["LITERAL_WHITESPACE"] = " "
135 values["LITERAL_DOLLAR"] = "$"
137 /^[_A-Z0-9.]+[ \t]*\+?=/ {
138 valStart = index($0, "=") + 1
141 if (substr($0, valStart - 2, 1) == "+") {
145 variable = substr($0, 0, valStart - 2 - append)
146 value = substr($0, valStart)
147 gsub("[ \t]+", "", variable)
148 gsub("^[ \t]+", "", value)
149 gsub("[ \t]+$", "", value)
152 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
153 ovalue = ovalue substr(value, 1, RSTART - 1)
154 var = substr(value, RSTART + 2, RLENGTH - 2)
155 value = substr(value, RSTART + RLENGTH)
157 var = substr(var, 2, length(var) - 2)
159 ovalue = ovalue values[var]
161 ovalue = ovalue value
163 combinedValue = values[variable]
164 if (append == 1 && length(combinedValue) > 0) {
165 combinedValue = combinedValue " " ovalue
167 combinedValue = ovalue
169 values[variable] = combinedValue
172 for (var in values) {
173 print var "=" values[var]
181 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
184 # relies on $QMAKESPEC being set correctly. parses include statements in
185 # qmake.conf and prints out the expanded file
188 if [ -z "$specvals" ]; then
189 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
191 getQMakeConf3 "$1" "$specvals"
196 if [ -z "$xspecvals" ]; then
197 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
199 getQMakeConf3 "$1" "$xspecvals"
202 # relies on $TEST_COMPILER being set correctly
203 compilerSupportsFlag()
205 cat >conftest.cpp <<EOF
206 int main() { return 0; }
208 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
210 rm -f conftest.cpp conftest.o
214 # relies on $TEST_COMPILER being set correctly
220 safe_flag=`shellEscape "$flag"`
221 lflags=$lflags,$safe_flag
223 compilerSupportsFlag "$lflags" >/dev/null 2>&1
226 #-------------------------------------------------------------------------------
227 # operating system detection
228 #-------------------------------------------------------------------------------
230 # need that throughout the script
231 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
232 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
233 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
234 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
236 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
237 if echo '\c' | grep '\c' >/dev/null; then
243 #-------------------------------------------------------------------------------
244 # window system detection
245 #-------------------------------------------------------------------------------
251 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
256 #-----------------------------------------------------------------------------
257 # Qt version detection
258 #-----------------------------------------------------------------------------
259 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
263 if [ -n "$QT_VERSION" ]; then
264 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
265 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
266 if [ -n "$MAJOR" ]; then
267 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
268 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
269 QT_MAJOR_VERSION="$MAJOR"
270 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
271 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
274 if [ -z "$QT_MAJOR_VERSION" ]; then
275 echo "Cannot process version from qglobal.h: $QT_VERSION"
276 echo "Cannot proceed."
280 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
281 if [ -z "$QT_PACKAGEDATE" ]; then
282 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
283 echo "Cannot proceed"
287 #-------------------------------------------------------------------------------
289 #-------------------------------------------------------------------------------
293 EditionString=Commercial
297 # parse the arguments, setting things to "yes" or "no"
298 while [ "$#" -gt 0 ]; do
302 #Autoconf style options
304 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
308 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
312 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
313 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
316 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
321 # this option may or may not be followed by an argument
322 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
329 -h|help|--help|-help)
330 if [ "$VAL" = "yes" ]; then
332 COMMERCIAL_USER="no" #doesn't matter we will display the help
335 COMMERCIAL_USER="no" #doesn't matter we will display the help
339 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
343 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
350 if [ "$UNKNOWN_ARG" = "yes" ]; then
359 if [ "$PLATFORM_QPA" != "no" ]; then
360 if [ "$PLATFORM_QPA" = "maybe" ]; then
365 echo "No license exists to enable Qt QPA. Disabling."
372 COMMERCIAL_USER="yes"
386 if [ "$COMMERCIAL_USER" = "ask" ]; then
388 echo "Which edition of Qt do you want to use ?"
390 echo "Type 'c' if you want to use the Commercial Edition."
391 echo "Type 'o' if you want to use the Open Source Edition."
395 if [ "$commercial" = "c" ]; then
396 COMMERCIAL_USER="yes"
398 elif [ "$commercial" = "o" ]; then
405 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
406 # Commercial preview release
407 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
410 QT_EDITION="QT_EDITION_DESKTOP"
411 LicenseType="Technology Preview"
412 elif [ $COMMERCIAL_USER = "yes" ]; then
413 # one of commercial editions
414 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
415 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
417 # read in the license file
418 if [ -f "$LICENSE_FILE" ]; then
419 . "$LICENSE_FILE" >/dev/null 2>&1
420 if [ -z "$LicenseKeyExt" ]; then
422 echo "You are using an old license file."
424 echo "Please install the license file supplied by Nokia,"
425 echo "or install the Qt Open Source Edition if you intend to"
426 echo "develop free software."
429 if [ -z "$Licensee" ]; then
431 echo "Invalid license key. Please check the license key."
435 if [ -z "$LicenseKeyExt" ]; then
437 echo $ECHO_N "Please enter your license key: $ECHO_C"
439 Licensee="Unknown user"
444 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
445 && LicenseValid="yes" \
447 if [ "$LicenseValid" != "yes" ]; then
449 echo "Invalid license key. Please check the license key."
452 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
453 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
454 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
455 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
457 # determine which edition we are licensed to use
458 case "$LicenseTypeCode" in
460 LicenseType="Commercial"
464 QT_EDITION="QT_EDITION_UNIVERSAL"
467 Edition="FullFramework"
468 EditionString="Full Framework"
469 QT_EDITION="QT_EDITION_DESKTOP"
472 Edition="GUIFramework"
473 EditionString="GUI Framework"
474 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
479 LicenseType="Evaluation"
480 QMakeVar add DEFINES QT_EVAL
484 QT_EDITION="QT_EDITION_EVALUATION"
489 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
491 echo "Invalid license key. Please check the license key."
495 # verify that we are licensed to use Qt on this platform
497 case "$PlatformCode" in
500 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
504 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
507 ### EMBEDDED_QPA logic missing ###
508 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
509 X9,* | XC,* | XU,* | XW,* | XM,*)
511 LICENSE_EXTENSION="-ALLOS"
513 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
514 # Qt for Embedded Linux
515 LICENSE_EXTENSION="-EMBEDDED"
517 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
519 LICENSE_EXTENSION="-EMBEDDED"
521 FM,*,no | LM,yes,* | ZM,no,no)
523 LICENSE_EXTENSION="-DESKTOP"
527 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
529 echo "You are not licensed for the $Platform platform."
531 echo "Please contact qt-info@nokia.com to upgrade your license to"
532 echo "include the $Platform platform, or install the Qt Open Source Edition"
533 echo "if you intend to develop free software."
538 if test -r "$relpath/.LICENSE"; then
539 # Generic, non-final license
541 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
546 *TECHNOLOGY?PREVIEW*)
553 echo >&2 "Invalid license files; cannot continue"
558 EditionString="$Edition"
559 QT_EDITION="QT_EDITION_DESKTOP"
562 case "$LicenseFeatureCode" in
565 case "$LicenseType" in
567 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
570 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
576 case "$LicenseType" in
578 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
581 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
587 echo "Invalid license key. Please check the license key."
591 case "$LicenseFeatureCode" in
599 if [ '!' -f "$outpath/LICENSE" ]; then
600 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
601 echo "this software has disappeared."
603 echo "Sorry, you are not licensed to use this software."
604 echo "Try re-installing."
608 elif [ $COMMERCIAL_USER = "no" ]; then
609 # Open Source edition - may only be used under the terms of the GPL or LGPL.
610 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
611 Licensee="Open Source"
613 EditionString="Open Source"
614 QT_EDITION="QT_EDITION_OPENSOURCE"
617 #-------------------------------------------------------------------------------
618 # initalize variables
619 #-------------------------------------------------------------------------------
621 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
622 for varname in $SYSTEM_VARIABLES; do
623 qmakevarname="${varname}"
624 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
625 if [ "${varname}" = "LDFLAGS" ]; then
626 qmakevarname="LFLAGS"
627 elif [ "${varname}" = "LD" ]; then
631 'if [ -n "\$'${varname}'" ]; then
632 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
636 # Use CC/CXX to run config.tests
637 mkdir -p "$outpath/config.tests"
638 rm -f "$outpath/config.tests/.qmake.cache"
639 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
641 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
643 # QTDIR may be set and point to an old or system-wide Qt installation
646 # the minimum version of libdbus-1 that we require:
647 MIN_DBUS_1_VERSION=0.93
649 # initalize internal variables
650 CFG_CONFIGURE_EXIT_ON_ERROR=yes
652 CFG_EXCEPTIONS=unspecified
653 CFG_GUI=auto # (yes|no|auto)
679 CFG_OPENVG_LC_INCLUDES=no
680 CFG_OPENVG_SHIVA=auto
681 CFG_OPENVG_ON_OPENGL=auto
683 CFG_EGL_GLES_INCLUDES=no
688 QT_DEFAULT_BUILD_PARTS="libs examples tests"
692 CFG_AUDIO_BACKEND=auto
694 CFG_DECLARATIVE_DEBUG=yes
695 CFG_JAVASCRIPTCORE_JIT=auto
697 # Target architecture
699 # Host architecture, same as CFG_ARCH when not cross-compiling
701 # Set when the -arch or -host-arch arguments are used
702 OPT_OBSOLETE_HOST_ARG=no
712 CFG_OBSOLETE_WAYLAND=no
725 CFG_SEPARATE_DEBUG_INFO=no
726 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
727 CFG_REDUCE_EXPORTS=auto
737 CFG_REDUCE_RELOCATIONS=auto
739 CFG_ACCESSIBILITY=auto
742 CFG_CLOCK_GETTIME=auto
743 CFG_CLOCK_MONOTONIC=auto
751 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
755 CFG_PREFIX_INSTALL=yes
764 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
765 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
769 OPT_CONFIRM_LICENSE=no
782 QPA_PLATFORM_GUARD=yes
784 # initalize variables used for installation
793 QT_INSTALL_TRANSLATIONS=
802 #flags for SQL drivers
810 QT_LFLAGS_ODBC="-lodbc"
813 # flags for libdbus-1
817 # flags for Glib (X11 only)
821 # flags for GStreamer (X11 only)
825 #-------------------------------------------------------------------------------
826 # check SQL drivers available in this package
827 #-------------------------------------------------------------------------------
829 # opensource version removes some drivers, so force them to be off
835 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
836 for a in "$relpath/src/plugins/sqldrivers/"*; do
838 base_a=`basename "$a"`
839 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
840 eval "CFG_SQL_${base_a}=auto"
845 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
846 if [ -d "$relpath/src/plugins/imageformats" ]; then
847 for a in "$relpath/src/plugins/imageformats/"*; do
849 base_a=`basename "$a"`
850 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
855 #-------------------------------------------------------------------------------
856 # parse command line arguments
857 #-------------------------------------------------------------------------------
859 # parse the arguments, setting things to "yes" or "no"
860 while [ "$#" -gt 0 ]; do
864 #Autoconf style options
866 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
870 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
874 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
875 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
878 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
882 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
886 -no-*-*|-plugin-*-*|-qt-*-*)
887 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
888 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
892 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
895 #Qt style yes options
896 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
897 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
900 #Qt style options that pass an argument
902 if [ "$PLATFORM_QPA" != "yes" ]; then
904 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
908 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
912 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
913 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
917 #Qt style complex options in one command
918 -enable-*|-disable-*)
919 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
920 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
922 #Qt Builtin/System style options
923 -no-*|-system-*|-qt-*)
924 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
925 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
927 #Options that cannot be generalized
934 # this option may or may not be followed by an argument
935 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
944 # this option may or may not be followed by an argument
945 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
954 # this option may or may not be followed by an argument
955 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
963 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
964 # this option may or may not be followed by an argument
965 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
984 if [ "$1" = "-D" ]; then
988 VAL=`echo $1 | sed 's,-D,,'`
993 # this option may or may not be followed by an argument
994 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1003 if [ "$1" = "-I" ]; then
1007 VAL=`echo $1 | sed 's,-I,,'`
1012 if [ "$1" = "-L" ]; then
1016 VAL=`echo $1 | sed 's,-L,,'`
1021 if [ "$1" = "-R" ]; then
1025 VAL=`echo $1 | sed 's,-R,,'`
1030 VAL=`echo $1 | sed 's,-l,,'`
1034 if [ "$1" = "-F" ]; then
1038 VAL=`echo $1 | sed 's,-F,,'`
1043 if [ "$1" = "-fw" ]; then
1047 VAL=`echo $1 | sed 's,-fw,,'`
1055 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1062 if [ "$UNKNOWN_ARG" = "yes" ]; then
1063 echo "$1: unknown argument"
1074 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1075 CFG_ACCESSIBILITY="$VAL"
1084 CFG_USE_GNUMAKE="$VAL"
1087 CFG_MYSQL_CONFIG="$VAL"
1090 QT_INSTALL_PREFIX="$VAL"
1093 QT_HOST_PREFIX="$VAL"
1102 QT_FORCE_PKGCONFIG=yes
1105 QT_INSTALL_DOCS="$VAL"
1108 QT_INSTALL_HEADERS="$VAL"
1111 QT_INSTALL_PLUGINS="$VAL"
1114 QT_INSTALL_IMPORTS="$VAL"
1117 QT_INSTALL_DATA="$VAL"
1120 QT_INSTALL_LIBS="$VAL"
1129 QT_INSTALL_TRANSLATIONS="$VAL"
1131 sysconfdir|settingsdir)
1132 QT_INSTALL_SETTINGS="$VAL"
1135 QT_INSTALL_EXAMPLES="$VAL"
1138 QT_INSTALL_TESTS="$VAL"
1147 QT_INSTALL_BINS="$VAL"
1157 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1164 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1165 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1166 [ "$VAL" = "es2" ]; then
1168 if [ "$VAL" = "es2" ]; then
1176 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1178 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1186 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1189 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1197 if [ "$BUILD_ON_MAC" = "yes" ]; then
1204 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1205 CFG_MAC_DWARF2="$VAL"
1211 OPT_OBSOLETE_HOST_ARG=yes
1214 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1215 CFG_MAC_HARFBUZZ="$VAL"
1222 if [ "$BUILD_ON_MAC" = "yes" ]; then
1223 CFG_FRAMEWORK="$VAL"
1229 if [ "$VAL" = "yes" ]; then
1231 QMakeVar add QMAKE_CFLAGS -pg
1232 QMakeVar add QMAKE_CXXFLAGS -pg
1233 QMakeVar add QMAKE_LFLAGS -pg
1234 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1240 if [ "$VAL" = "yes" ]; then
1241 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1244 exceptions|g++-exceptions)
1245 if [ "$VAL" = "no" ]; then
1247 elif [ "$VAL" = "yes" ]; then
1255 # keep compatibility with old platform names
1261 PLATFORM=hpux-acc-o64
1264 PLATFORM=hpux-acc-64
1267 PLATFORM=hpux-acc-64
1279 PLATFORM=reliant-cds-64
1282 PLATFORM=solaris-cc-64
1285 PLATFORM=unixware-cc
1288 PLATFORM=unixware-g++
1291 PLATFORM=unixware-cc
1294 PLATFORM=unixware-g++
1300 i386) NATIVE_64_ARCH="x86_64" ;;
1301 powerpc) NATIVE_64_ARCH="ppc64" ;;
1302 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1304 if [ ! -z "$NATIVE_64_ARCH" ]; then
1305 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1312 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1315 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1316 CFG_DEBUG_RELEASE="$VAL"
1322 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1323 CFG_RELEASE_QMAKE="$VAL"
1329 if [ "$VAL" = "yes" ]; then
1331 elif [ "$VAL" = "no" ]; then
1338 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1339 CFG_PREFIX_INSTALL="$VAL"
1347 developer-build|commercial|opensource)
1348 # These switches have been dealt with already
1351 if [ "$VAL" = "yes" ]; then
1353 elif [ "$VAL" = "no" ]; then
1360 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1361 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1367 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1368 if [ "$VAL" = "no" ]; then
1369 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1370 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1371 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1377 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1384 if [ "$VAL" = "no" ]; then
1391 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1399 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1406 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1413 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1420 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1427 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1434 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1441 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1448 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1455 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1456 CFG_PRECOMPILE="$VAL"
1461 separate-debug-info)
1462 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1463 CFG_SEPARATE_DEBUG_INFO="$VAL"
1464 elif [ "$VAL" = "nocopy" ] ; then
1465 CFG_SEPARATE_DEBUG_INFO="yes"
1466 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1472 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1473 CFG_REDUCE_EXPORTS="$VAL"
1479 if [ "$VAL" = "no" ]; then
1486 if [ "$VAL" = "no" ]; then
1493 if [ "$VAL" = "no" ]; then
1500 if [ "$VAL" = "no" ]; then
1507 if [ "$VAL" = "no" ]; then
1514 if [ "$VAL" = "no" ]; then
1521 if [ "$VAL" = "no" ]; then
1528 if [ "$VAL" = "no" ]; then
1535 if [ "$VAL" = "no" ]; then
1545 if [ "$VAL" = "no" ]; then
1552 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1553 CFG_REDUCE_RELOCATIONS="$VAL"
1559 [ "$VAL" = "qt" ] && VAL=yes
1560 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1565 # No longer supported:
1566 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1569 if [ "$VAL" = "system" ]; then
1576 [ "$VAL" = "yes" ] && VAL=qt
1577 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1584 [ "$VAL" = "yes" ] && VAL=qt
1585 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1592 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1599 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1606 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1613 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1620 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1627 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1634 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1635 CFG_FONTCONFIG="$VAL"
1641 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1648 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1655 CFG_OBSOLETE_WAYLAND=yes
1658 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1665 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1672 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1679 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1686 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1693 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1694 CFG_GSTREAMER="$VAL"
1700 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1701 CFG_QGTKSTYLE="$VAL"
1707 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1710 if [ "$VAL" = "no" ]; then
1718 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1720 elif [ "$VAL" = "no" ]; then
1727 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1728 QPA_PLATFORM_GUARD="$VAL"
1734 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1736 elif [ "$VAL" = "runtime" ]; then
1743 if [ "$VAL" = "yes" ]; then
1750 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1757 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1758 CFG_LARGEFILE="$VAL"
1764 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1771 if [ "$VAL" = "yes" ]; then
1772 CFG_OPENSSL="linked"
1778 if [ "$VAL" = "yes" ]; then
1779 CFG_DECLARATIVE_DEBUG="yes"
1781 if [ "$VAL" = "no" ]; then
1782 CFG_DECLARATIVE_DEBUG="no"
1789 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1790 CFG_JAVASCRIPTCORE_JIT="$VAL"
1796 if [ "$VAL" = "yes" ]; then
1797 OPT_CONFIRM_LICENSE="$VAL"
1803 if [ "$VAL" = "yes" ]; then
1809 sql-*|imageformat-*)
1810 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1811 # if autoconf style options were used, $VAL can be "yes" or "no"
1812 [ "$VAL" = "yes" ] && VAL=qt
1813 # now $VAL should be "no", "qt", or "plugin"... double-check
1814 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1817 # now $VAL is "no", "qt", or "plugin"
1819 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1820 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1822 # Grab the available values
1825 avail="$CFG_SQL_AVAILABLE"
1828 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1829 if [ "$OPT" != "plugin" ]; then
1830 # png is always built in
1836 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1840 # Check that that user's value is available.
1843 if [ "$VAL" = "$d" ]; then
1848 [ "$found" = yes ] || ERROR=yes
1850 if [ "$VAR" = "sql" ]; then
1851 # set the CFG_SQL_driver
1852 eval "CFG_SQL_$VAL=\$OPT"
1854 elif [ "$VAR" = "imageformat" ]; then
1855 [ "$OPT" = "qt" ] && OPT=yes
1856 VAL="`echo $VAL |tr a-z A-Z`"
1857 eval "CFG_$VAL=$OPT"
1861 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1862 if [ "$OPT" = "plugin" ]; then
1865 QMakeVar add "${VAR}s" "${VAL}"
1866 elif [ "$OPT" = "no" ]; then
1867 PLUG_VAR="${VAR}-plugin"
1869 QMakeVar del "${IN_VAR}s" "$VAL"
1870 QMakeVar del "${PLUG_VAR}s" "$VAL"
1872 if [ "$ERROR" = "yes" ]; then
1873 echo "$CURRENT_OPT: unknown argument"
1878 if [ "$VAL" = "yes" ]; then
1879 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1880 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1884 elif [ "$VAL" = "no" ]; then
1885 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1886 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1895 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1902 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1909 D_FLAGS="$D_FLAGS \"$VAL\""
1912 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1915 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1918 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1921 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1924 if [ "$BUILD_ON_MAC" = "yes" ]; then
1925 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1926 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1932 if [ "$BUILD_ON_MAC" = "yes" ]; then
1933 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1939 W_FLAGS="$W_FLAGS \"${VAL}\""
1945 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1946 CFG_PHONON_BACKEND="$VAL"
1958 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1959 CFG_AUDIO_BACKEND="$VAL"
1965 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1972 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1973 CFG_FORCE_ASSERTS="$VAL"
1979 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1989 if [ "$UNKNOWN_OPT" = "yes" ]; then
1990 echo "${CURRENT_OPT}: invalid command-line switch"
1996 # update QT_CONFIG to show our current predefined configuration
1997 case "$CFG_QCONFIG" in
1998 minimal|small|medium|large|full)
1999 # these are a sequence of increasing functionality
2000 for c in minimal small medium large full; do
2001 QT_CONFIG="$QT_CONFIG $c-config"
2002 [ "$CFG_QCONFIG" = $c ] && break
2006 # not known to be sufficient for anything
2007 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2008 echo >&2 "Error: configuration file not found:"
2009 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2011 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2016 #-------------------------------------------------------------------------------
2017 # build tree initialization
2018 #-------------------------------------------------------------------------------
2020 # where to find which..
2021 unixtests="$relpath/config.tests/unix"
2022 mactests="$relpath/config.tests/mac"
2023 WHICH="$unixtests/which.test"
2025 PERL=`$WHICH perl 2>/dev/null`
2027 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2029 for e in gawk nawk awk; do
2030 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2037 PERL="/usr/bin/perl"
2038 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2042 ### skip this if the user just needs help...
2043 if [ "$OPT_HELP" != "yes" ]; then
2045 # is this a shadow build?
2046 if [ "$OPT_SHADOW" = "maybe" ]; then
2048 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2049 if [ -h "$outpath" ]; then
2050 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2056 if [ "$OPT_SHADOW" = "yes" ]; then
2057 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2058 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2059 echo >&2 "Cannot proceed."
2062 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2065 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2067 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2068 echo "Qt can be built in release mode with separate debug information, so"
2069 echo "-debug-and-release is not necessary anymore"
2073 if [ "$CFG_SILENT" = "yes" ]; then
2074 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2077 # if the source tree is different from the build tree,
2078 # symlink or copy part of the sources
2079 if [ "$OPT_SHADOW" = "yes" ]; then
2080 echo "Preparing build tree..."
2082 if [ -z "$PERL" ]; then
2084 echo "You need perl in your PATH to make a shadow build."
2085 echo "Cannot proceed."
2089 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2091 # make a syncqt script that can be used in the shadow
2092 rm -f "$outpath/bin/syncqt"
2093 if [ -x "$relpath/bin/syncqt" ]; then
2094 mkdir -p "$outpath/bin"
2095 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2096 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2097 chmod 755 "$outpath/bin/syncqt"
2100 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2101 rm -f "$outpath/bin/$i"
2102 if [ -x "$relpath/bin/$i" ]; then
2103 mkdir -p "$outpath/bin"
2104 echo "#!/bin/sh" >"$outpath/bin/$i"
2105 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2106 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2107 chmod 755 "$outpath/bin/$i"
2111 # symlink the mkspecs directory
2112 mkdir -p "$outpath/mkspecs"
2113 rm -rf "$outpath"/mkspecs/*
2114 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2115 rm -f "$outpath/mkspecs/default"
2119 rm -rf "$outpath/mkspecs/$1"
2120 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2121 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2124 # Special case for mkspecs/features directory.
2125 # To be able to place .prf files into a shadow build directory,
2126 # we're creating links for files only. The directory structure is reproduced.
2127 ShadowMkspecs features
2129 # The modules dir is special, too.
2130 ShadowMkspecs modules
2132 # symlink the doc directory
2133 rm -rf "$outpath/doc"
2134 ln -s "$relpath/doc" "$outpath/doc"
2137 # symlink fonts to be able to run application from build directory
2138 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2139 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2140 mkdir -p "${outpath}/lib"
2141 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2145 if [ "$OPT_FAST" = "auto" ]; then
2146 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2153 # find a make command
2154 if [ -z "$MAKE" ]; then
2156 for mk in gmake make; do
2157 if "$WHICH" $mk >/dev/null 2>&1; then
2162 if [ -z "$MAKE" ]; then
2163 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2164 echo >&2 "Cannot proceed."
2167 # export MAKE, we need it later in the config.tests
2173 #-------------------------------------------------------------------------------
2174 # auto-detect all that hasn't been specified in the arguments
2175 #-------------------------------------------------------------------------------
2177 if [ -z "$PLATFORM" ]; then
2179 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2181 if [ "$PLATFORM_QPA" = "yes" ]; then
2182 OSX_VERSION=`uname -r | cut -d. -f1`
2183 if [ "$OSX_VERSION" -ge 11 ]; then
2184 # We're on Lion or above. Check if we have a supported Clang version
2185 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2188 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2203 #PLATFORM=aix-g++-64
2205 #PLATFORM=aix-xlc-64
2207 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2217 # PLATFORM=dynix-g++
2223 PLATFORM=freebsd-g++
2225 - Also available for FreeBSD: freebsd-icc
2229 PLATFORM=openbsd-g++
2240 #PLATFORM=irix-cc-64
2242 - Also available for IRIX: irix-g++ irix-cc-64
2246 case "$UNAME_MACHINE" in
2248 #PLATFORM=hpuxi-acc-32
2249 PLATFORM=hpuxi-acc-64
2251 - Also available for HP-UXi: hpuxi-acc-32
2257 #PLATFORM=hpux-acc-64
2259 #PLATFORM=hpux-acc-o64
2261 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2270 - Also available for Tru64: tru64-g++
2274 case "$UNAME_MACHINE" in
2276 PLATFORM=linux-g++-64
2283 - Also available for Linux: linux-kcc linux-icc linux-cxx
2287 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2288 PLATFORM="solaris-g++"
2290 #PLATFORM=solaris-g++
2292 #PLATFORM=solaris-cc64
2295 - Also available for Solaris: solaris-g++ solaris-cc-64
2298 ReliantUNIX-*:*|SINIX-*:*)
2299 PLATFORM=reliant-cds
2300 #PLATFORM=reliant-cds-64
2302 - Also available for Reliant UNIX: reliant-cds-64
2312 #PLATFORM=unixware-g++
2313 PLATFORM=unixware-cc
2315 - Also available for OpenUNIX: unixware-g++
2319 #PLATFORM=unixware-g++
2320 PLATFORM=unixware-cc
2322 - Also available for UnixWare: unixware-g++
2329 - Also available for SCO OpenServer: sco-g++
2333 PLATFORM=unixware-g++
2336 PLATFORM=unsupported/qnx-g++
2339 if [ "$OPT_HELP" != "yes" ]; then
2341 for p in $PLATFORMS; do
2342 echo " $relconf $* -platform $p"
2345 echo " The build script does not currently recognize all" >&2
2346 echo " platforms supported by Qt." >&2
2347 echo " Rerun this script with a -platform option listed to" >&2
2348 echo " set the system/compiler combination you use." >&2
2355 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2357 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2359 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2360 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2362 if [ -d "$PLATFORM" ]; then
2363 QMAKESPEC="$PLATFORM"
2365 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2367 if [ -d "$XPLATFORM" ]; then
2368 XQMAKESPEC="$XPLATFORM"
2370 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2372 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2373 QT_CROSS_COMPILE=yes
2374 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2375 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2378 if [ "$BUILD_ON_MAC" = "yes" ]; then
2379 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2381 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2382 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2383 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2384 echo " built with 'macx-g++'" >&2
2390 # check specified platforms are supported
2391 if [ '!' -d "$QMAKESPEC" ]; then
2393 echo " The specified system/compiler is not supported:"
2397 echo " Please see the README file for a complete list."
2401 if [ '!' -d "$XQMAKESPEC" ]; then
2403 echo " The specified system/compiler is not supported:"
2407 echo " Please see the README file for a complete list."
2411 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2413 echo " The specified system/compiler port is not complete:"
2415 echo " $XQMAKESPEC/qplatformdefs.h"
2417 echo " Please contact qt-info@nokia.com."
2422 # now look at the configs and figure out what platform we are config'd for
2423 [ "$PLATFORM_QPA" != "yes" ] \
2424 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2426 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2428 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2429 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2430 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2431 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2432 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2436 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2437 case `basename "$XPLATFORM"` in
2440 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2442 echo "Please contact qt-info@nokia.com to upgrade your license to"
2443 echo "include this platform, or install the Qt Open Source Edition"
2444 echo "if you intend to develop free software."
2450 #-------------------------------------------------------------------------------
2451 # tests that don't need qmake (must be run before displaying help)
2452 #-------------------------------------------------------------------------------
2454 # detect build style
2455 if [ "$CFG_DEBUG" = "auto" ]; then
2456 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2457 CFG_DEBUG_RELEASE=yes
2459 elif [ "$CFG_DEV" = "yes" ]; then
2460 CFG_DEBUG_RELEASE=no
2463 CFG_DEBUG_RELEASE=no
2467 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2468 QT_CONFIG="$QT_CONFIG build_all"
2471 if [ -z "$PKG_CONFIG" ]; then
2472 # See if PKG_CONFIG is set in the mkspec:
2473 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2475 if [ -z "$PKG_CONFIG" ]; then
2476 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2479 # Work out if we can use pkg-config
2480 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2481 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2483 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2484 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2485 echo >&2 "environment!"
2487 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2489 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2490 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2491 echo >&2 "This is probably not what you want."
2493 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2495 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2496 echo >&2 "been set. This means your toolchain's .pc files must contain"
2497 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2498 echo >&2 "tests are failing, please check these files."
2503 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2504 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2505 echo >&2 "dependencies"
2511 if [ ! -n "$PKG_CONFIG" ]; then
2512 QT_CONFIG="$QT_CONFIG no-pkg-config"
2515 # pass on $CFG_SDK to the configure tests.
2516 if [ '!' -z "$CFG_SDK" ]; then
2517 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2520 # find the default framework value
2521 if [ "$BUILD_ON_MAC" = "yes" ]; then
2522 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2523 CFG_FRAMEWORK="$CFG_SHARED"
2524 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2526 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2534 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2536 TEST_COMPILER=$QMAKE_CONF_COMPILER
2537 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2538 if [ -z "$TEST_COMPILER" ]; then
2539 echo "ERROR: Cannot set the compiler for the configuration tests"
2545 if [ -n "$CFG_SYSROOT" ]; then
2546 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2547 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2548 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2550 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2554 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2556 # auto-detect precompiled header support
2557 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2558 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2565 #auto-detect DWARF2 on the mac
2566 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2567 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2574 # don't autodetect support for separate debug info on objcopy when
2575 # cross-compiling as lots of toolchains seems to have problems with this
2576 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2577 CFG_SEPARATE_DEBUG_INFO="no"
2580 # auto-detect support for separate debug info in objcopy
2581 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2582 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2583 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2584 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2585 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2586 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2587 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2588 CFG_SEPARATE_DEBUG_INFO=no
2592 # binutils on HP-UX is buggy; default to no.
2593 CFG_SEPARATE_DEBUG_INFO=no
2596 CFG_SEPARATE_DEBUG_INFO=yes
2602 # auto-detect -fvisibility support
2603 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2604 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2605 CFG_REDUCE_EXPORTS=no
2607 CFG_REDUCE_EXPORTS=yes
2611 # detect the availability of the -Bsymbolic-functions linker optimization
2612 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2613 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2614 CFG_REDUCE_RELOCATIONS=no
2616 CFG_REDUCE_RELOCATIONS=yes
2620 # auto-detect GNU make support
2621 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2625 # find the default framework value
2626 if [ "$BUILD_ON_MAC" = "yes" ]; then
2627 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2628 CFG_FRAMEWORK="$CFG_SHARED"
2629 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2631 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2639 # x11 tests are done after qmake is built
2642 #setup the build parts
2643 if [ -z "$CFG_BUILD_PARTS" ]; then
2644 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2646 # don't build tools by default when cross-compiling
2647 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2648 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2651 for nobuild in $CFG_NOBUILD_PARTS; do
2652 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2654 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2656 # echo "WARNING: libs is a required part of the build."
2658 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2661 #-------------------------------------------------------------------------------
2662 # post process QT_INSTALL_* variables
2663 #-------------------------------------------------------------------------------
2665 if [ -z "$QT_INSTALL_PREFIX" ]; then
2666 if [ "$CFG_DEV" = "yes" ]; then
2667 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2669 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2672 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2674 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2675 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2676 if [ "$BUILD_ON_MAC" = "yes" ]; then
2677 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2680 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2683 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2685 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2686 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2687 if [ "$BUILD_ON_MAC" = "yes" ]; then
2688 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2693 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2696 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2698 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2699 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2700 if [ "$BUILD_ON_MAC" = "yes" ]; then
2701 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2702 QT_INSTALL_LIBS="/Libraries/Frameworks"
2706 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2708 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2710 if [ -z "$QT_INSTALL_BINS" ]; then #default
2711 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2712 if [ "$BUILD_ON_MAC" = "yes" ]; then
2713 QT_INSTALL_BINS="/Developer/Applications/Qt"
2716 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2718 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2720 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2721 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2722 if [ "$BUILD_ON_MAC" = "yes" ]; then
2723 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2726 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2728 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2730 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2731 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2732 if [ "$BUILD_ON_MAC" = "yes" ]; then
2733 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2736 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2738 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2740 if [ -z "$QT_INSTALL_DATA" ]; then #default
2741 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2743 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2745 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2746 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2748 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2750 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2751 if [ "$BUILD_ON_MAC" = "yes" ]; then
2752 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2754 QT_INSTALL_SETTINGS=/etc/xdg
2757 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2759 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2760 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2761 if [ "$BUILD_ON_MAC" = "yes" ]; then
2762 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2765 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2767 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2770 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2771 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2772 if [ "$BUILD_ON_MAC" = "yes" ]; then
2773 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2776 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2778 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2780 #------- host paths --------
2782 if [ -z "$QT_HOST_PREFIX" ]; then
2783 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2786 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2790 if [ -z "$QT_HOST_BINS" ]; then #default
2792 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2793 if [ "$BUILD_ON_MAC" = "yes" ]; then
2794 QT_HOST_BINS="/Developer/Applications/Qt"
2797 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2799 QT_HOST_BINS="$QT_INSTALL_BINS"
2802 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2804 if [ -z "$QT_HOST_DATA" ]; then #default
2806 QT_HOST_DATA="$QT_HOST_PREFIX"
2808 QT_HOST_DATA="$QT_INSTALL_DATA"
2811 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2814 #-------------------------------------------------------------------------------
2815 # help - interactive parts of the script _after_ this section please
2816 #-------------------------------------------------------------------------------
2818 # next, emit a usage message if something failed.
2819 if [ "$OPT_HELP" = "yes" ]; then
2820 [ "x$ERROR" = "xyes" ] && echo
2821 if [ "$CFG_NIS" = "no" ]; then
2828 if [ "$CFG_CUPS" = "no" ]; then
2835 if [ "$CFG_ICONV" = "no" ]; then
2842 if [ "$CFG_LARGEFILE" = "no" ]; then
2849 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
2856 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2864 if [ "$CFG_XCB" = "no" ]; then
2872 if [ "$CFG_XINPUT2" = "no" ]; then
2881 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2882 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2883 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2884 [-release] [-debug] [-debug-and-release]
2885 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2886 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2887 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
2888 [-plugin-sql-<driver>] [-system-sqlite]
2889 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2890 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2891 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2892 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2893 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2894 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2895 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
2896 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2897 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2898 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2899 [-no-audio-backend] [-audio-backend]
2900 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
2901 [-no-optimized-qmake] [-optimized-qmake]
2902 [-no-openssl] [-openssl] [-openssl-linked]
2903 [-no-gtkstyle] [-gtkstyle]
2904 [-qt-pcre] [-system-pcre]
2905 [additional platform specific options (see below)]
2908 Installation options:
2910 -qpa ................ This will enable the QPA build.
2911 QPA is a window system agnostic implementation of Qt.
2913 These are optional, but you may specify install directories.
2915 -prefix <dir> ...... This will install everything relative to <dir>
2916 (default $QT_INSTALL_PREFIX)
2918 if [ "$PLATFORM_QPA" = "yes" ]; then
2921 -hostprefix [dir] .. Tools and libraries needed when developing
2922 applications are installed in [dir]. If [dir] is
2923 not given, the current build directory will be used.
2929 * -prefix-install .... Force a sandboxed "local" installation of
2930 Qt. This will install into
2931 $QT_INSTALL_PREFIX, if this option is
2932 disabled then some platforms will attempt a
2933 "system" install by placing default values to
2934 be placed in a system location other than
2937 You may use these to separate different parts of the install:
2939 -bindir <dir> ......... Executables will be installed to <dir>
2940 (default PREFIX/bin)
2941 -libdir <dir> ......... Libraries will be installed to <dir>
2942 (default PREFIX/lib)
2943 -docdir <dir> ......... Documentation will be installed to <dir>
2944 (default PREFIX/doc)
2945 -headerdir <dir> ...... Headers will be installed to <dir>
2946 (default PREFIX/include)
2947 -plugindir <dir> ...... Plugins will be installed to <dir>
2948 (default PREFIX/plugins)
2949 -importdir <dir> ...... Imports for QML will be installed to <dir>
2950 (default PREFIX/imports)
2951 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2953 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2954 (default PREFIX/translations)
2955 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2956 (default PREFIX/etc/settings)
2957 -examplesdir <dir> .... Examples will be installed to <dir>
2958 (default PREFIX/examples)
2959 -testsdir <dir> ....... Tests will be installed to <dir>
2960 (default PREFIX/tests)
2962 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2965 -hostbindir <dir> .. Host executables will be installed to <dir>
2966 (default HOSTPREFIX/bin)
2967 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2968 (default HOSTPREFIX)
2975 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2976 that needs to be evaluated. If the evaluation succeeds, the feature is
2977 included. Here is a short explanation of each option:
2979 * -release ........... Compile and link Qt with debugging turned off.
2980 -debug ............. Compile and link Qt with debugging turned on.
2981 -debug-and-release . Compile and link two versions of Qt, with and without
2982 debugging turned on (Mac only).
2984 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2986 -opensource ........ Compile and link the Open-Source Edition of Qt.
2987 -commercial ........ Compile and link the Commercial Edition of Qt.
2990 * -shared ............ Create and use shared Qt libraries.
2991 -static ............ Create and use static Qt libraries.
2993 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2995 -fast .............. Configure Qt quickly by generating Makefiles only for
2996 library and subdirectory targets. All other Makefiles
2997 are created as wrappers, which will in turn run qmake.
2999 -no-largefile ...... Disables large file support.
3000 + -largefile ......... Enables Qt to access files larger than 4 GB.
3003 if [ "$PLATFORM_QPA" = "yes" ]; then
3010 if [ "$CFG_DBUS" = "no" ]; then
3019 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3020 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3022 -no-accessibility .. Do not compile Accessibility support.
3023 * -accessibility ..... Compile Accessibility support.
3025 $SHN -no-stl ............ Do not compile STL support.
3026 $SHY -stl ............... Compile STL support.
3028 -no-sql-<driver> ... Disable SQL <driver> entirely.
3029 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3031 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3034 Possible values for <driver>:
3035 [ $CFG_SQL_AVAILABLE ]
3037 -system-sqlite ..... Use sqlite from the operating system.
3039 -no-phonon-backend.. Do not build the platform phonon plugin.
3040 + -phonon-backend..... Build the platform phonon plugin.
3042 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3043 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3045 -no-declarative-debug ..... Do not build the declarative debugging support.
3046 + -declarative-debug ....... Build the declarative debugging support.
3048 -platform target ... The operating system and compiler you are building
3051 See the README file for a list of supported
3052 operating systems and compilers.
3055 if [ "${PLATFORM_QPA}" != "yes" ]; then
3057 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3058 raster - Software rasterizer
3059 opengl - Rendering via OpenGL, Experimental!
3060 openvg - Rendering via OpenVG, Experimental!
3067 -no-mmx ............ Do not compile with use of MMX instructions.
3068 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3069 -no-sse ............ Do not compile with use of SSE instructions.
3070 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3071 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3072 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3073 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3074 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3075 -no-avx ............ Do not compile with use of AVX instructions.
3076 -no-neon ........... Do not compile with use of NEON instructions.
3078 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3079 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3081 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3083 -D <string> ........ Add an explicit define to the preprocessor.
3084 -I <string> ........ Add an explicit include path.
3085 -L <string> ........ Add an explicit library path.
3087 -help, -h .......... Display this information.
3089 Third Party Libraries:
3091 -qt-zlib ........... Use the zlib bundled with Qt.
3092 + -system-zlib ....... Use zlib from the operating system.
3093 See http://www.gzip.org/zlib
3095 -no-gif ............ Do not compile GIF reading support.
3097 -no-libpng ......... Do not compile PNG support.
3098 -qt-libpng ......... Use the libpng bundled with Qt.
3099 + -system-libpng ..... Use libpng from the operating system.
3100 See http://www.libpng.org/pub/png
3102 -no-libjpeg ........ Do not compile JPEG support.
3103 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3104 + -system-libjpeg .... Use libjpeg from the operating system.
3105 See http://www.ijg.org
3107 -no-openssl ........ Do not compile support for OpenSSL.
3108 + -openssl ........... Enable run-time OpenSSL support.
3109 -openssl-linked .... Enabled linked OpenSSL support.
3111 -qt-pcre ........... Use the PCRE library bundled with Qt.
3112 + -system-pcre ....... Use the PCRE library from the operating system.
3116 -make <part> ....... Add part to the list of parts to be built at make time.
3117 ($QT_DEFAULT_BUILD_PARTS)
3118 -nomake <part> ..... Exclude part from the list of parts to be built.
3120 -R <string> ........ Add an explicit runtime library path to the Qt
3122 -l <string> ........ Add an explicit library.
3124 -no-rpath .......... Do not use the library install path as a runtime
3126 + -rpath ............. Link Qt libraries and executables using the library
3127 install path as a runtime library path. Equivalent
3128 to -R install_libpath
3130 -continue .......... Continue as far as possible if an error occurs.
3132 -verbose, -v ....... Print verbose information about each step of the
3135 -silent ............ Reduce the build output so that warnings and errors
3136 can be seen more easily.
3138 * -no-optimized-qmake ... Do not build qmake optimized.
3139 -optimized-qmake ...... Build qmake optimized.
3141 -no-gui ............ Don't build the Qt GUI library
3143 $NSN -no-nis ............ Do not compile NIS support.
3144 $NSY -nis ............... Compile NIS support.
3146 $CUN -no-cups ........... Do not compile CUPS support.
3147 $CUY -cups .............. Compile CUPS support.
3148 Requires cups/cups.h and libcups.so.2.
3150 $CIN -no-iconv .......... Do not compile support for iconv(3).
3151 $CIY -iconv ............. Compile support for iconv(3).
3153 $PHN -no-pch ............ Do not use precompiled header support.
3154 $PHY -pch ............... Use precompiled header support.
3156 $DBN -no-dbus ........... Do not compile the QtDBus module.
3157 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3158 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3160 -reduce-relocations ..... Reduce relocations in the libraries through extra
3161 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3162 experimental; needs GNU ld >= 2.18).
3164 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3168 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3169 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3176 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3184 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3188 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3189 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3191 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3192 $XCBY -xcb ............... Compile Xcb support.
3198 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3202 $X2N -no-xinput2......... Do not compile XInput2 support.
3203 $X2Y -xinput2............ Compile XInput2 support.
3209 if [ "$PLATFORM_X11" = "yes" ]; then
3210 if [ "$CFG_SM" = "no" ]; then
3217 if [ "$CFG_XSHAPE" = "no" ]; then
3224 if [ "$CFG_XVIDEO" = "no" ]; then
3231 if [ "$CFG_XINERAMA" = "no" ]; then
3238 if [ "$CFG_FONTCONFIG" = "no" ]; then
3245 if [ "$CFG_XCURSOR" = "no" ]; then
3252 if [ "$CFG_XFIXES" = "no" ]; then
3259 if [ "$CFG_XRANDR" = "no" ]; then
3266 if [ "$CFG_XRENDER" = "no" ]; then
3273 if [ "$CFG_MITSHM" = "no" ]; then
3280 if [ "$CFG_XINPUT" = "no" ]; then
3287 if [ "$CFG_XKB" = "no" ]; then
3294 if [ "$CFG_IM" = "no" ]; then
3305 -no-gtkstyle ....... Do not build the GTK theme integration.
3306 + -gtkstyle .......... Build the GTK theme integration.
3308 * -no-nas-sound ...... Do not compile in NAS sound support.
3309 -system-nas-sound .. Use NAS libaudio from the operating system.
3310 See http://radscan.com/nas.html
3312 -egl ............... Use EGL instead of GLX to manage contexts.
3313 When building for desktop OpenGL, this option will
3314 make Qt use EGL to manage contexts rather than the
3315 GLX, which is the default. Note: For OpenGL ES, EGL
3318 -no-opengl ......... Do not support OpenGL.
3319 + -opengl <api> ...... Enable OpenGL support.
3320 With no parameter, this will auto-detect the "best"
3321 OpenGL API to use. If desktop OpenGL is available, it
3322 will be used. Use desktop or es2 for <api>
3323 to force the use of the Desktop OpenGL or
3324 OpenGL ES 2 APIs instead.
3326 -no-openvg ........ Do not support OpenVG.
3327 + -openvg ........... Enable OpenVG support.
3328 Requires EGL support, typically supplied by an OpenGL
3329 or other graphics implementation.
3331 $SMN -no-sm ............. Do not support X Session Management.
3332 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3334 $SHN -no-xshape ......... Do not compile XShape support.
3335 $SHY -xshape ............ Compile XShape support.
3336 Requires X11/extensions/shape.h.
3338 $XVN -no-xvideo ......... Do not compile XVideo support.
3339 $XVY -xvideo ............ Compile XVideo support.
3340 Requires X11/extensions/Xv.h & Xvlib.h.
3342 $SHN -no-xsync .......... Do not compile XSync support.
3343 $SHY -xsync ............. Compile XSync support.
3344 Requires X11/extensions/sync.h.
3346 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3347 $XAY -xinerama .......... Compile Xinerama support.
3348 Requires X11/extensions/Xinerama.h and libXinerama.
3349 By default, Xinerama support will be compiled if
3350 available and the shared libraries are dynamically
3353 $XCN -no-xcursor ........ Do not compile Xcursor support.
3354 $XCY -xcursor ........... Compile Xcursor support.
3355 Requires X11/Xcursor/Xcursor.h and libXcursor.
3356 By default, Xcursor support will be compiled if
3357 available and the shared libraries are dynamically
3360 $XFN -no-xfixes ......... Do not compile Xfixes support.
3361 $XFY -xfixes ............ Compile Xfixes support.
3362 Requires X11/extensions/Xfixes.h and libXfixes.
3363 By default, Xfixes support will be compiled if
3364 available and the shared libraries are dynamically
3367 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3368 $XZY -xrandr ............ Compile Xrandr support.
3369 Requires X11/extensions/Xrandr.h and libXrandr.
3371 $XRN -no-xrender ........ Do not compile Xrender support.
3372 $XRY -xrender ........... Compile Xrender support.
3373 Requires X11/extensions/Xrender.h and libXrender.
3375 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3376 $XMY -mitshm ............ Compile MIT-SHM support.
3377 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3379 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3380 $FCGY -fontconfig ........ Compile FontConfig support.
3381 Requires fontconfig/fontconfig.h, libfontconfig,
3382 freetype.h and libfreetype.
3384 $XIN -no-xinput ......... Do not compile Xinput support.
3385 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3386 which requires IRIX with wacom.h and libXi or
3387 XFree86 with X11/extensions/XInput.h and libXi.
3389 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3390 $XKY -xkb ............... Compile XKB support.
3395 if [ "$BUILD_ON_MAC" = "yes" ]; then
3400 -Fstring ........... Add an explicit framework path.
3401 -fw string ......... Add an explicit framework.
3403 * -framework ......... Build Qt as a series of frameworks and
3404 link tools against those frameworks.
3405 -no-framework ...... Do not build Qt as a series of frameworks.
3407 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3408 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3410 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3411 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3413 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3414 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3415 QT_ENABLE_HARFBUZZ environment variable.
3420 if [ "$PLATFORM_QPA" = "yes" ]; then
3426 if [ "$PLATFORM_QPA" = "yes" ]; then
3429 -xplatform target ... The target platform when cross-compiling.
3431 -no-feature-<feature> Do not compile in <feature>.
3432 -feature-<feature> .. Compile in <feature>. The available features
3433 are described in src/corelib/global/qfeatures.txt
3435 -no-freetype ........ Do not compile in Freetype2 support.
3436 -qt-freetype ........ Use the libfreetype bundled with Qt.
3437 * -system-freetype .... Use libfreetype from the operating system.
3438 See http://www.freetype.org/
3440 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3441 default ($CFG_QCONFIG).
3443 -no-opengl .......... Do not support OpenGL.
3444 -opengl <api> ....... Enable OpenGL ES support
3445 With no parameter, this will attempt to auto-detect
3446 OpenGL ES 2, or regular desktop OpenGL.
3447 Use es2 for <api> to override auto-detection.
3451 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3452 if [ "$CFG_GLIB" = "no" ]; then
3460 $GBN -no-glib ........... Do not compile Glib support.
3461 $GBY -glib .............. Compile Glib support.
3466 [ "x$ERROR" = "xyes" ] && exit 1
3471 # -----------------------------------------------------------------------------
3472 # LICENSING, INTERACTIVE PART
3473 # -----------------------------------------------------------------------------
3475 if [ "$PLATFORM_QPA" = "yes" ]; then
3476 Platform="Qt Lighthouse"
3477 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3478 Platform="Qt for Windows"
3479 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3481 Platform="Qt for Linux/X11"
3485 echo "This is the $Platform ${EditionString} Edition."
3488 if [ "$Edition" = "OpenSource" ]; then
3490 echo "You are licensed to use this software under the terms of"
3491 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3492 if [ -f "$relpath/LICENSE.GPL3" ]; then
3493 echo "You are also licensed to use this software under the terms of"
3494 echo "the GNU General Public License (GPL) versions 3."
3500 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3501 echo "You have already accepted the terms of the $LicenseType license."
3504 if [ -f "$relpath/LICENSE.GPL3" ]; then
3505 echo "Type '3' to view the GNU General Public License version 3."
3507 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3508 echo "Type 'yes' to accept this license offer."
3509 echo "Type 'no' to decline this license offer."
3511 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3515 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3517 elif [ "$acceptance" = "no" ]; then
3518 echo "You are not licensed to use this software."
3521 elif [ "$acceptance" = "3" ]; then
3522 more "$relpath/LICENSE.GPL3"
3523 elif [ "$acceptance" = "L" ]; then
3524 more "$relpath/LICENSE.LGPL"
3527 elif [ "$Edition" = "Preview" ]; then
3528 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3531 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3532 echo "You have already accepted the terms of the $LicenseType license."
3535 echo "You are licensed to use this software under the terms of"
3536 echo "the $TheLicense"
3538 echo "Type '?' to read the Preview License."
3539 echo "Type 'yes' to accept this license offer."
3540 echo "Type 'no' to decline this license offer."
3542 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3546 if [ "$acceptance" = "yes" ]; then
3548 elif [ "$acceptance" = "no" ] ;then
3549 echo "You are not licensed to use this software."
3552 elif [ "$acceptance" = "?" ]; then
3553 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3556 elif [ "$Edition" != "OpenSource" ]; then
3557 if [ -n "$ExpiryDate" ]; then
3558 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3559 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3560 Today=`date +%Y%m%d`
3561 if [ "$Today" -gt "$ExpiryDate" ]; then
3562 case "$LicenseType" in
3563 Commercial|Academic|Educational)
3564 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3566 echo "NOTICE NOTICE NOTICE NOTICE"
3568 echo " Your support and upgrade period has expired."
3570 echo " You are no longer licensed to use this version of Qt."
3571 echo " Please contact qt-info@nokia.com to renew your support"
3572 echo " and upgrades for this license."
3574 echo "NOTICE NOTICE NOTICE NOTICE"
3579 echo "WARNING WARNING WARNING WARNING"
3581 echo " Your support and upgrade period has expired."
3583 echo " You may continue to use your last licensed release"
3584 echo " of Qt under the terms of your existing license"
3585 echo " agreement. But you are not entitled to technical"
3586 echo " support, nor are you entitled to use any more recent"
3587 echo " Qt releases."
3589 echo " Please contact qt-info@nokia.com to renew your"
3590 echo " support and upgrades for this license."
3592 echo "WARNING WARNING WARNING WARNING"
3599 echo "NOTICE NOTICE NOTICE NOTICE"
3601 echo " Your Evaluation license has expired."
3603 echo " You are no longer licensed to use this software. Please"
3604 echo " contact qt-info@nokia.com to purchase license, or install"
3605 echo " the Qt Open Source Edition if you intend to develop free"
3608 echo "NOTICE NOTICE NOTICE NOTICE"
3615 TheLicense=`head -n 1 "$outpath/LICENSE"`
3617 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3618 echo "You have already accepted the terms of the $TheLicense."
3621 echo "You are licensed to use this software under the terms of"
3622 echo "the $TheLicense."
3624 echo "Type '?' to view the $TheLicense."
3625 echo "Type 'yes' to accept this license offer."
3626 echo "Type 'no' to decline this license offer."
3628 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3632 if [ "$acceptance" = "yes" ]; then
3634 elif [ "$acceptance" = "no" ]; then
3635 echo "You are not licensed to use this software."
3638 else [ "$acceptance" = "?" ]
3639 more "$outpath/LICENSE"
3644 # this should be moved somewhere else
3647 AIX_VERSION=`uname -v`
3648 if [ "$AIX_VERSION" -lt "5" ]; then
3649 QMakeVar add QMAKE_LIBS_X11 -lbind
3656 #-------------------------------------------------------------------------------
3657 # generate qconfig.cpp
3658 #-------------------------------------------------------------------------------
3659 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3661 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3663 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3664 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3666 /* Installation date */
3667 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3669 /* Installation Info */
3670 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3671 "qt_prfxpath=$QT_INSTALL_PREFIX",
3672 "qt_docspath=$QT_INSTALL_DOCS",
3673 "qt_hdrspath=$QT_INSTALL_HEADERS",
3674 "qt_libspath=$QT_INSTALL_LIBS",
3675 "qt_binspath=$QT_INSTALL_BINS",
3676 "qt_plugpath=$QT_INSTALL_PLUGINS",
3677 "qt_impspath=$QT_INSTALL_IMPORTS",
3678 "qt_datapath=$QT_INSTALL_DATA",
3679 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3680 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3681 "qt_tstspath=$QT_INSTALL_TESTS",
3682 #ifdef QT_BUILD_QMAKE
3683 "qt_ssrtpath=$CFG_SYSROOT",
3684 "qt_hpfxpath=$QT_HOST_PREFIX",
3685 "qt_hbinpath=$QT_HOST_BINS",
3686 "qt_hdatpath=$QT_HOST_DATA",
3689 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3692 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3694 /* strlen( "qt_lcnsxxxx" ) == 12 */
3695 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3696 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3698 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3701 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3702 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3703 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3705 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3706 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3707 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3710 # -----------------------------------------------------------------------------
3711 if [ "$LicenseType" = "Evaluation" ]; then
3712 EVALKEY=qt_qevalkey=$LicenseKeyExt
3713 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3714 EVALKEY=qt_qevalkey=
3717 if [ -n "$EVALKEY" ]; then
3718 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3719 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3720 /* Evaluation license key */
3721 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3723 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3727 # -----------------------------------------------------------------------------
3729 # -----------------------------------------------------------------------------
3732 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3734 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3735 if [ "$OPT_SHADOW" = "yes" ]; then
3736 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3737 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3738 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3742 # $1: input variable name (awk regexp)
3743 # $2: optional output variable name
3744 # $3: optional value transformation (sed command)
3745 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3746 # is where the resulting variable is written to
3747 setBootstrapVariable()
3749 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3753 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3754 echo "Creating qmake. Please wait..."
3757 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3758 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3759 if [ -f "$QCONFIG_H" ]; then
3760 OLD_QCONFIG_H=$QCONFIG_H
3761 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3764 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3765 # when building qmake, we use #defines for the install paths,
3766 # however they are real functions in the library
3767 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3768 mkdir -p "$outpath/src/corelib/global"
3769 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3770 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3773 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3775 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3776 rm -rf mkspecs/default
3777 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3778 mkdir -p "$outpath/qmake" || exit
3780 for mkfile in GNUmakefile Makefile; do
3783 in_mkfile="${mkfile}.in"
3784 if [ "$mkfile" = "Makefile" ]; then
3785 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3786 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3788 in_mkfile="${mkfile}.unix"
3790 in_mkfile="$relpath/qmake/$in_mkfile"
3791 mkfile="$outpath/qmake/$mkfile"
3792 if [ -f "$mkfile" ]; then
3793 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3796 [ -f "$in_mkfile" ] || continue
3798 echo "########################################################################" > "$mkfile"
3799 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3800 echo "########################################################################" >> "$mkfile"
3803 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3804 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3805 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3807 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3808 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3811 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3812 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3813 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3814 setBootstrapVariable QMAKE_CFLAGS
3815 setBootstrapVariable QMAKE_CXXFLAGS
3816 setBootstrapVariable QMAKE_LFLAGS
3818 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3819 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3820 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3822 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3823 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3824 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3825 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3826 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3827 elif [ "$CFG_DEBUG" = "yes" ]; then
3828 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3829 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3830 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3831 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3834 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3835 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3836 for rpath in $RPATH_FLAGS; do
3837 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3840 if [ "$BUILD_ON_MAC" = "yes" ]; then
3841 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3842 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3843 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3844 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3845 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3846 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3847 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3848 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3849 if [ '!' -z "$CFG_SDK" ]; then
3850 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3851 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3852 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3853 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3854 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3857 if [ '!' -z "$D_FLAGS" ]; then
3858 for DEF in $D_FLAGS; do
3859 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3862 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3863 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3864 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3865 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3867 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3868 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3869 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3870 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3871 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3872 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3873 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3874 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3875 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3876 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3878 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3879 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3880 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3881 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3886 QMAKE_BUILD_ERROR=no
3887 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3888 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3889 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3890 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3893 #-------------------------------------------------------------------------------
3894 # tests that need qmake
3895 #-------------------------------------------------------------------------------
3897 #-------------------------------------------------------------------------------
3898 # determine the target and host architectures
3899 #-------------------------------------------------------------------------------
3901 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3902 CFG_ARCH=`"$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -e "s,^Project MESSAGE: ,," -e "s,^#.*$,,g" | grep -v "^$"`
3903 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3904 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3905 # Do the same test again, using the host compiler
3906 CFG_HOST_ARCH=`"$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -e "s,^Project MESSAGE: ,," -e "s,^#.*$,,g" | grep -v "^$"`
3907 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3909 # not cross compiling, host == target
3910 CFG_HOST_ARCH="$CFG_ARCH"
3913 if [ "$OPT_VERBOSE" = "yes" ]; then
3914 echo "System architecture: '$CFG_ARCH'"
3915 if [ "$PLATFORM_QPA" = "yes" ]; then
3916 echo "Host architecture: '$CFG_HOST_ARCH'"
3920 #-------------------------------------------------------------------------------
3921 # functionality tests
3922 #-------------------------------------------------------------------------------
3924 # detect availability of float math.h functions
3925 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3926 CFG_USE_FLOATMATH=yes
3928 CFG_USE_FLOATMATH=no
3931 # detect mmx support
3932 if [ "${CFG_MMX}" = "auto" ]; then
3933 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
3940 # detect 3dnow support
3941 if [ "${CFG_3DNOW}" = "auto" ]; then
3942 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
3949 # detect sse support
3950 if [ "${CFG_SSE}" = "auto" ]; then
3951 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
3958 # detect sse2 support
3959 if [ "${CFG_SSE2}" = "auto" ]; then
3960 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3967 # detect sse3 support
3968 if [ "${CFG_SSE3}" = "auto" ]; then
3969 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3976 # detect ssse3 support
3977 if [ "${CFG_SSSE3}" = "auto" ]; then
3978 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3985 # detect sse4.1 support
3986 if [ "${CFG_SSE4_1}" = "auto" ]; then
3987 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
3994 # detect sse4.2 support
3995 if [ "${CFG_SSE4_2}" = "auto" ]; then
3996 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
4003 # detect avx support
4004 if [ "${CFG_AVX}" = "auto" ]; then
4005 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4012 # check iWMMXt support
4013 if [ "$CFG_IWMMXT" = "yes" ]; then
4014 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4015 if [ $? != "0" ]; then
4016 echo "The iWMMXt functionality test failed!"
4017 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4022 # detect neon support
4023 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4024 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
4029 elif [ "$CFG_ARCH" != "arm" ]; then
4033 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4036 if [ "$CFG_ZLIB" = "no" ]; then
4037 # Note: Qt no longer support builds without zlib
4038 # So we force a "no" to be "auto" here.
4039 # If you REALLY really need no zlib support, you can still disable
4040 # it by doing the following:
4041 # add "no-zlib" to mkspecs/qconfig.pri
4042 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4044 # There's no guarantee that Qt will build under those conditions
4049 if [ "$CFG_ZLIB" = "auto" ]; then
4050 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
4057 if [ "$CFG_LARGEFILE" = "auto" ]; then
4058 #Large files should be enabled for all Linux systems
4062 if [ "$CFG_GUI" = "no" ]; then
4063 QPA_PLATFORM_GUARD=no
4066 # detect how jpeg should be built
4067 if [ "$CFG_JPEG" = "auto" ]; then
4068 if [ "$CFG_SHARED" = "yes" ]; then
4075 if [ "$CFG_LIBJPEG" = "auto" ]; then
4076 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
4083 # detect how gif should be built
4084 if [ "$CFG_GIF" = "auto" ]; then
4085 if [ "$CFG_SHARED" = "yes" ]; then
4093 if [ "$CFG_LIBPNG" = "auto" ]; then
4094 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
4101 # detect accessibility
4102 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4103 CFG_ACCESSIBILITY=yes
4106 # auto-detect SQL-modules support
4107 for _SQLDR in $CFG_SQL_AVAILABLE; do
4110 if [ "$CFG_SQL_mysql" != "no" ]; then
4111 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4112 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4113 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4114 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4115 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4116 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4117 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4119 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4120 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4121 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4122 echo " You need MySql 4 or higher."
4123 echo " If you believe this message is in error you may use the continue"
4124 echo " switch (-continue) to $0 to continue."
4129 QT_LFLAGS_MYSQL_R=""
4133 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
4134 QMakeVar add CONFIG use_libmysqlclient_r
4135 if [ "$CFG_SQL_mysql" = "auto" ]; then
4136 CFG_SQL_mysql=plugin
4138 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4139 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
4140 if [ "$CFG_SQL_mysql" = "auto" ]; then
4141 CFG_SQL_mysql=plugin
4144 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4145 echo "MySQL support cannot be enabled due to functionality tests!"
4146 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4147 echo " If you believe this message is in error you may use the continue"
4148 echo " switch (-continue) to $0 to continue."
4153 QT_LFLAGS_MYSQL_R=""
4161 if [ "$CFG_SQL_psql" != "no" ]; then
4162 # Be careful not to use native pg_config when cross building.
4163 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4164 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4165 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4167 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4168 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4169 # But, respect PSQL_LIBS if set
4170 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4171 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
4172 if [ "$CFG_SQL_psql" = "auto" ]; then
4176 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4177 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4178 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4179 echo " If you believe this message is in error you may use the continue"
4180 echo " switch (-continue) to $0 to continue."
4191 if [ "$CFG_SQL_odbc" != "no" ]; then
4192 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
4193 if [ "$CFG_SQL_odbc" = "auto" ]; then
4197 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
4198 QT_LFLAGS_ODBC="-liodbc"
4199 if [ "$CFG_SQL_odbc" = "auto" ]; then
4203 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4204 echo "ODBC support cannot be enabled due to functionality tests!"
4205 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4206 echo " If you believe this message is in error you may use the continue"
4207 echo " switch (-continue) to $0 to continue."
4217 if [ "$CFG_SQL_oci" != "no" ]; then
4218 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
4219 if [ "$CFG_SQL_oci" = "auto" ]; then
4223 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4224 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4225 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4226 echo " If you believe this message is in error you may use the continue"
4227 echo " switch (-continue) to $0 to continue."
4236 if [ "$CFG_SQL_tds" != "no" ]; then
4237 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4238 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4239 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
4240 if [ "$CFG_SQL_tds" = "auto" ]; then
4244 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4245 echo "TDS support cannot be enabled due to functionality tests!"
4246 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4247 echo " If you believe this message is in error you may use the continue"
4248 echo " switch (-continue) to $0 to continue."
4257 if [ "$CFG_SQL_db2" != "no" ]; then
4258 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
4259 if [ "$CFG_SQL_db2" = "auto" ]; then
4263 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4264 echo "ODBC support cannot be enabled due to functionality tests!"
4265 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4266 echo " If you believe this message is in error you may use the continue"
4267 echo " switch (-continue) to $0 to continue."
4276 if [ "$CFG_SQL_ibase" != "no" ]; then
4277 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
4278 if [ "$CFG_SQL_ibase" = "auto" ]; then
4279 CFG_SQL_ibase=plugin
4282 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4283 echo "InterBase support cannot be enabled due to functionality tests!"
4284 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4285 echo " If you believe this message is in error you may use the continue"
4286 echo " switch (-continue) to $0 to continue."
4295 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4296 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
4297 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4298 CFG_SQL_sqlite2=plugin
4301 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4302 echo "SQLite2 support cannot be enabled due to functionality tests!"
4303 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4304 echo " If you believe this message is in error you may use the continue"
4305 echo " switch (-continue) to $0 to continue."
4314 if [ "$CFG_SQL_sqlite" != "no" ]; then
4315 SQLITE_AUTODETECT_FAILED="no"
4316 if [ "$CFG_SQLITE" = "system" ]; then
4317 if [ -n "$PKG_CONFIG" ]; then
4318 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4319 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4321 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
4322 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4323 CFG_SQL_sqlite=plugin
4325 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4327 SQLITE_AUTODETECT_FAILED="yes"
4330 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4331 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4332 CFG_SQL_sqlite=plugin
4335 SQLITE_AUTODETECT_FAILED="yes"
4339 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4340 echo "SQLite support cannot be enabled due to functionality tests!"
4341 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4342 echo " If you believe this message is in error you may use the continue"
4343 echo " switch (-continue) to $0 to continue."
4349 if [ "$OPT_VERBOSE" = "yes" ]; then
4350 echo "unknown SQL driver: $_SQLDR"
4356 # auto-detect NIS support
4357 if [ "$CFG_NIS" != "no" ]; then
4358 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
4361 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4362 echo "NIS support cannot be enabled due to functionality tests!"
4363 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4364 echo " If you believe this message is in error you may use the continue"
4365 echo " switch (-continue) to $0 to continue."
4373 # auto-detect CUPS support
4374 if [ "$CFG_CUPS" != "no" ]; then
4375 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
4378 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4379 echo "Cups support cannot be enabled due to functionality tests!"
4380 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4381 echo " If you believe this message is in error you may use the continue"
4382 echo " switch (-continue) to $0 to continue."
4390 # auto-detect iconv(3) support
4391 if [ "$CFG_ICONV" != "no" ]; then
4392 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4394 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
4396 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
4398 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
4401 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4402 echo "Iconv support cannot be enabled due to functionality tests!"
4403 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4404 echo " If you believe this message is in error you may use the continue"
4405 echo " switch (-continue) to $0 to continue."
4413 # auto-detect libdbus-1 support
4414 if [ "$CFG_DBUS" != "no" ]; then
4415 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4416 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4417 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4419 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
4420 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4421 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4422 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4424 if [ "$CFG_DBUS" = "auto" ]; then
4426 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4427 # CFG_DBUS is "yes" or "linked" here
4429 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4430 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4431 echo " If you believe this message is in error you may use the continue"
4432 echo " switch (-continue) to $0 to continue."
4439 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4441 # auto-detect Glib support
4442 if [ "$CFG_GLIB" != "no" ]; then
4443 if [ -n "$PKG_CONFIG" ]; then
4444 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4445 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4447 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
4449 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4450 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4452 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4453 echo "Glib support cannot be enabled due to functionality tests!"
4454 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4455 echo " If you believe this message is in error you may use the continue"
4456 echo " switch (-continue) to $0 to continue."
4465 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4466 if [ -n "$PKG_CONFIG" ]; then
4467 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4468 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4470 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
4472 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4473 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4475 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4476 echo "Gstreamer support cannot be enabled due to functionality tests!"
4477 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4478 echo " If you believe this message is in error you may use the continue"
4479 echo " switch (-continue) to $0 to continue."
4485 elif [ "$CFG_GLIB" = "no" ]; then
4489 # auto-detect libicu support
4490 if [ "$CFG_ICU" != "no" ]; then
4491 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4492 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4494 if [ "$CFG_ICU" = "auto" ]; then
4496 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4499 echo "The ICU library support cannot be enabled."
4500 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4501 echo " If you believe this message is in error you may use the continue"
4502 echo " switch (-continue) to $0 to continue."
4508 # Auto-detect PulseAudio support
4509 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4510 if [ -n "$PKG_CONFIG" ]; then
4511 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4512 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4514 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
4516 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4517 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4519 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4520 echo "PulseAudio support cannot be enabled due to functionality tests!"
4521 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4522 echo " If you believe this message is in error you may use the continue"
4523 echo " switch (-continue) to $0 to continue."
4533 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4534 x11tests="$relpath/config.tests/x11"
4537 # work around broken X11 headers when using GCC 2.95 or later
4539 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4540 if [ $NOTYPE = "yes" ]; then
4541 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4542 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4545 # Check we actually have X11 :-)
4546 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4547 if [ $? != "0" ]; then
4548 echo "Basic XLib functionality test failed!"
4549 echo " You might need to modify the include and library search paths by editing"
4550 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4556 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4557 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4558 if [ "$CFG_GUI" = "no" ]; then
4559 if [ "$CFG_OPENGL" = "auto" ]; then
4562 if [ "$CFG_OPENGL" != "no" ]; then
4563 echo "OpenGL enabled, but GUI disabled."
4564 echo " You might need to either enable the GUI or disable OpenGL"
4568 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4569 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
4571 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
4573 if [ "$CFG_EGL" = "no" ]; then
4577 if [ "$CFG_OPENGL" = "yes" ]; then
4578 echo "All the OpenGL functionality tests failed!"
4579 echo " You might need to modify the include and library search paths by editing"
4580 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4581 echo " ${XQMAKESPEC}."
4588 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4589 if [ "$CFG_OPENGL" = "desktop" ]; then
4590 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4591 if [ $? != "0" ]; then
4592 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4599 elif [ "$CFG_OPENGL" = "es2" ]; then
4601 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4602 if [ $? != "0" ]; then
4603 echo "The OpenGL ES 2.0 functionality test failed!"
4604 echo " You might need to modify the include and library search paths by editing"
4605 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4606 echo " ${XQMAKESPEC}."
4609 elif [ "$CFG_OPENGL" = "desktop" ]; then
4610 # Desktop OpenGL support
4611 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4612 if [ $? != "0" ]; then
4613 echo "The OpenGL functionality test failed!"
4614 echo " You might need to modify the include and library search paths by editing"
4615 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4616 echo " ${XQMAKESPEC}."
4621 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4622 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4623 if [ $? != "0" ]; then
4624 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4631 fi # X11/MINGW OpenGL
4634 if [ "$PLATFORM_X11" = "yes" ]; then
4635 # auto-detect Xcursor support
4636 if [ "$CFG_XCURSOR" != "no" ]; then
4637 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
4638 if [ "$CFG_XCURSOR" != "runtime" ]; then
4642 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4643 echo "Xcursor support cannot be enabled due to functionality tests!"
4644 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4645 echo " If you believe this message is in error you may use the continue"
4646 echo " switch (-continue) to $0 to continue."
4654 # auto-detect Xfixes support
4655 if [ "$CFG_XFIXES" != "no" ]; then
4656 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4657 if [ "$CFG_XFIXES" != "runtime" ]; then
4661 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4662 echo "Xfixes support cannot be enabled due to functionality tests!"
4663 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4664 echo " If you believe this message is in error you may use the continue"
4665 echo " switch (-continue) to $0 to continue."
4673 # auto-detect Xrandr support (resize and rotate extension)
4674 if [ "$CFG_XRANDR" != "no" ]; then
4675 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
4676 if [ "$CFG_XRANDR" != "runtime" ]; then
4680 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4681 echo "Xrandr support cannot be enabled due to functionality tests!"
4682 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4683 echo " If you believe this message is in error you may use the continue"
4684 echo " switch (-continue) to $0 to continue."
4692 # auto-detect Xrender support
4693 if [ "$CFG_XRENDER" != "no" ]; then
4694 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
4697 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4698 echo "Xrender support cannot be enabled due to functionality tests!"
4699 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4700 echo " If you believe this message is in error you may use the continue"
4701 echo " switch (-continue) to $0 to continue."
4709 # auto-detect MIT-SHM support
4710 if [ "$CFG_MITSHM" != "no" ]; then
4711 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
4714 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4715 echo "MITSHM support cannot be enabled due to functionality tests!"
4716 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4717 echo " If you believe this message is in error you may use the continue"
4718 echo " switch (-continue) to $0 to continue."
4726 # auto-detect FontConfig support
4727 if [ "$CFG_FONTCONFIG" != "no" ]; then
4728 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4729 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4730 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4732 QT_CFLAGS_FONTCONFIG=
4733 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4735 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
4737 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4738 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4739 CFG_LIBFREETYPE=system
4741 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4742 echo "FontConfig support cannot be enabled due to functionality tests!"
4743 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4744 echo " If you believe this message is in error you may use the continue"
4745 echo " switch (-continue) to $0 to continue."
4753 # auto-detect Session Management support
4754 if [ "$CFG_SM" = "auto" ]; then
4755 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
4758 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4759 echo "Session Management support cannot be enabled due to functionality tests!"
4760 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4761 echo " If you believe this message is in error you may use the continue"
4762 echo " switch (-continue) to $0 to continue."
4770 # auto-detect SHAPE support
4771 if [ "$CFG_XSHAPE" != "no" ]; then
4772 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
4775 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4776 echo "XShape support cannot be enabled due to functionality tests!"
4777 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4778 echo " If you believe this message is in error you may use the continue"
4779 echo " switch (-continue) to $0 to continue."
4787 # auto-detect XVideo support
4788 if [ "$CFG_XVIDEO" != "no" ]; then
4789 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
4792 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4793 echo "XVideo support cannot be enabled due to functionality tests!"
4794 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4795 echo " If you believe this message is in error you may use the continue"
4796 echo " switch (-continue) to $0 to continue."
4804 # auto-detect XSync support
4805 if [ "$CFG_XSYNC" != "no" ]; then
4806 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
4809 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4810 echo "XSync support cannot be enabled due to functionality tests!"
4811 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4812 echo " If you believe this message is in error you may use the continue"
4813 echo " switch (-continue) to $0 to continue."
4821 # auto-detect Xinerama support
4822 if [ "$CFG_XINERAMA" != "no" ]; then
4823 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
4824 if [ "$CFG_XINERAMA" != "runtime" ]; then
4828 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4829 echo "Xinerama support cannot be enabled due to functionality tests!"
4830 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4831 echo " If you believe this message is in error you may use the continue"
4832 echo " switch (-continue) to $0 to continue."
4840 # auto-detect Xinput support
4841 if [ "$CFG_XINPUT" != "no" ]; then
4842 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
4843 if [ "$CFG_XINPUT" != "runtime" ]; then
4847 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4848 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4849 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4850 echo " If you believe this message is in error you may use the continue"
4851 echo " switch (-continue) to $0 to continue."
4859 # auto-detect XKB support
4860 if [ "$CFG_XKB" != "no" ]; then
4861 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
4864 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4865 echo "XKB support cannot be enabled due to functionality tests!"
4866 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4867 echo " If you believe this message is in error you may use the continue"
4868 echo " switch (-continue) to $0 to continue."
4876 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4877 if [ -n "$PKG_CONFIG" ]; then
4878 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4879 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4881 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4883 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4884 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4886 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4887 echo "Gtk theme support cannot be enabled due to functionality tests!"
4888 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4889 echo " If you believe this message is in error you may use the continue"
4890 echo " switch (-continue) to $0 to continue."
4896 elif [ "$CFG_GLIB" = "no" ]; then
4902 if [ "$BUILD_ON_MAC" = "yes" ]; then
4903 if [ "$CFG_PHONON" != "no" ]; then
4904 # Always enable Phonon (unless it was explicitly disabled)
4908 if [ "$CFG_COREWLAN" = "auto" ]; then
4909 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
4918 if [ "$PLATFORM_QPA" = "yes" ]; then
4919 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4920 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4921 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
4923 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
4926 if [ "$CFG_OPENGL" = "yes" ]; then
4927 echo "All the OpenGL functionality tests failed!"
4928 echo " You might need to modify the include and library search paths by editing"
4929 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4930 echo " ${XQMAKESPEC}."
4935 elif [ "$CFG_OPENGL" = "es2" ]; then
4937 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4938 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4939 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4940 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4941 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4942 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4943 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4944 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4947 "$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
4948 if [ $? != "0" ]; then
4949 echo "The OpenGL ES 2.0 functionality test failed!"
4950 echo " You might need to modify the include and library search paths by editing"
4951 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4952 echo " ${XQMAKESPEC}."
4955 elif [ "$CFG_OPENGL" = "desktop" ]; then
4956 # Desktop OpenGL support
4957 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4958 if [ $? != "0" ]; then
4959 echo "The OpenGL functionality test failed!"
4960 echo " You might need to modify the include and library search paths by editing"
4961 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4962 echo " ${XQMAKESPEC}."
4967 # auto-detect FontConfig support
4968 if [ "$CFG_FONTCONFIG" != "no" ]; then
4969 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4970 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4971 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4973 QT_CFLAGS_FONTCONFIG=
4974 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4976 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
4977 QT_CONFIG="$QT_CONFIG fontconfig"
4978 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4979 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4980 CFG_LIBFREETYPE=system
4985 # Save these for a check later
4986 ORIG_CFG_XCB="$CFG_XCB"
4988 if [ "$CFG_LIBUDEV" != "no" ]; then
4989 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4990 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4991 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4992 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4993 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4995 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
4997 QT_CONFIG="$QT_CONFIG libudev"
4998 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4999 echo "The libudev functionality test failed!"
5003 QMakeVar add DEFINES QT_NO_LIBUDEV
5007 if [ "$CFG_EVDEV" != "no" ]; then
5008 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5010 QT_CONFIG="$QT_CONFIG evdev"
5011 elif [ "$CFG_EVDEV" = "yes" ]; then
5012 echo "The evdev functionality test failed!"
5016 QMakeVar add DEFINES QT_NO_EVDEV
5020 # Check we actually have X11 :-)
5021 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
5022 QT_CONFIG="$QT_CONFIG xlib"
5025 # auto-detect Xrender support
5026 if [ "$CFG_XRENDER" != "no" ]; then
5027 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
5029 QT_CONFIG="$QT_CONFIG xrender"
5031 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5032 echo "Xrender support cannot be enabled due to functionality tests!"
5033 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5034 echo " If you believe this message is in error you may use the continue"
5035 echo " switch (-continue) to $0 to continue."
5043 if [ "$CFG_XCB" != "no" ]; then
5044 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
5045 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5046 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5048 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
5050 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
5051 QT_CONFIG="$QT_CONFIG xcb-render"
5054 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
5056 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5059 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
5060 QT_CONFIG="$QT_CONFIG xcb-xlib"
5063 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5064 # auto-detect XInput2/Xinput support
5065 if [ "$CFG_XINPUT2" != "no" ]; then
5066 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
5070 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5071 echo "XInput2 support cannot be enabled due to functionality tests!"
5072 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5073 echo " If you believe this message is in error you may use the continue"
5074 echo " switch (-continue) to $0 to continue."
5083 if [ "$CFG_XCB" = "yes" ]; then
5084 echo "The XCB test failed!"
5085 echo " You might need to install dependency packages."
5086 echo " See src/plugins/platforms/xcb/README."
5090 QMakeVar add DEFINES QT_NO_XCB
5094 # Detect libxkbcommon
5095 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5096 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5097 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5098 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5099 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5101 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5104 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5105 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5106 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5107 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5110 if [ "$BUILD_ON_MAC" = "yes" ]; then
5111 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
5112 QT_CONFIG="$QT_CONFIG coreservices"
5114 QMakeVar add DEFINES QT_NO_CORESERVICES
5118 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5119 if [ "$CFG_XCB" = "no" ]; then
5120 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
5121 ( [ "$ORIG_CFG_XCB" = "auto" ] ); then
5122 echo "No QPA platform plugin enabled!"
5123 echo " If you really want to build without a QPA platform plugin you must pass"
5124 echo " -no-xcb. Doing this will produce a Qt that"
5125 echo " cannot run GUI applications."
5126 echo " The dependencies needed for xcb to build are listed in"
5127 echo " src/plugins/platforms/xcb/README"
5137 if [ "$PLATFORM_X11" = "yes" ]; then
5138 if [ "$CFG_EGL" != "no" ]; then
5139 # detect EGL support
5140 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
5141 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5146 if [ "$EGL_VARIANT" = "none" ]; then
5147 if [ "$CFG_EGL" = "yes" ]; then
5148 echo "The EGL functionality test failed!"
5149 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5150 echo " You might need to modify the include and library search paths by editing"
5151 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5152 echo " ${XQMAKESPEC}."
5156 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5157 if [ "$CFG_OPENGL" = "es2" ]; then
5164 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5167 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5168 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5169 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
5170 CFG_LIBFREETYPE=system
5177 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5181 if [ "$CFG_STL" != "no" ]; then
5182 if [ "$HAVE_STL" = "yes" ]; then
5185 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5186 echo "STL support cannot be enabled due to functionality tests!"
5187 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5188 echo " If you believe this message is in error you may use the continue"
5189 echo " switch (-continue) to $0 to continue."
5197 # detect POSIX clock_gettime()
5198 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5199 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
5200 CFG_CLOCK_GETTIME=yes
5202 CFG_CLOCK_GETTIME=no
5206 # detect POSIX monotonic clocks
5207 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5208 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
5209 CFG_CLOCK_MONOTONIC=yes
5211 CFG_CLOCK_MONOTONIC=no
5213 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5214 CFG_CLOCK_MONOTONIC=no
5218 if [ "$CFG_MREMAP" = "auto" ]; then
5219 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5226 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5227 if [ "$CFG_GETADDRINFO" != "no" ]; then
5228 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5231 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5232 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5233 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5234 echo " If you believe this message is in error you may use the continue"
5235 echo " switch (-continue) to $0 to continue."
5243 # find if the platform provides inotify
5244 if [ "$CFG_INOTIFY" != "no" ]; then
5245 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5248 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5249 echo "inotify support cannot be enabled due to functionality tests!"
5250 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5251 echo " If you believe this message is in error you may use the continue"
5252 echo " switch (-continue) to $0 to continue."
5260 # find if the platform provides if_nametoindex (ipv6 interface name support)
5261 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5262 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
5265 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5266 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5267 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5268 echo " If you believe this message is in error you may use the continue"
5269 echo " switch (-continue) to $0 to continue."
5277 # find if the platform provides getifaddrs (network interface enumeration)
5278 if [ "$CFG_GETIFADDRS" != "no" ]; then
5279 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5282 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5283 echo "getifaddrs support cannot be enabled due to functionality tests!"
5284 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5285 echo " If you believe this message is in error you may use the continue"
5286 echo " switch (-continue) to $0 to continue."
5295 if [ "$CFG_OPENSSL" != "no" ]; then
5296 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
5297 if [ "$CFG_OPENSSL" = "auto" ]; then
5301 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5302 echo "OpenSSL support cannot be enabled due to functionality tests!"
5303 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5304 echo " If you believe this message is in error you may use the continue"
5305 echo " switch (-continue) to $0 to continue."
5314 if [ "$CFG_PCRE" != "qt" ]; then
5315 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5318 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5319 echo "PCRE support cannot be enabled due to functionality tests!"
5320 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5321 echo " If you believe this message is in error you may use the continue"
5322 echo " switch (-continue) to $0 to continue."
5330 # detect OpenVG support
5331 if [ "$CFG_OPENVG" != "no" ]; then
5332 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
5333 if [ "$CFG_OPENVG" = "auto" ]; then
5336 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
5337 if [ "$CFG_OPENVG" = "auto" ]; then
5340 CFG_OPENVG_ON_OPENGL=yes
5341 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
5342 if [ "$CFG_OPENVG" = "auto" ]; then
5345 CFG_OPENVG_LC_INCLUDES=yes
5346 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
5347 if [ "$CFG_OPENVG" = "auto" ]; then
5350 CFG_OPENVG_LC_INCLUDES=yes
5351 CFG_OPENVG_ON_OPENGL=yes
5353 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5354 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5355 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5356 echo " If you believe this message is in error you may use the continue"
5357 echo " switch (-continue) to $0 to continue."
5363 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
5364 CFG_OPENVG_SHIVA=yes
5368 if [ "$CFG_ALSA" = "auto" ]; then
5369 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5376 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5377 if [ "$CFG_ARCH" = "arm" ]; then
5378 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5379 if [ $? != "0" ]; then
5380 CFG_JAVASCRIPTCORE_JIT=no
5383 case "$XPLATFORM" in
5385 CFG_JAVASCRIPTCORE_JIT=no
5391 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5392 QMakeVar set JAVASCRIPTCORE_JIT yes
5393 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5394 QMakeVar set JAVASCRIPTCORE_JIT no
5397 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5398 CFG_AUDIO_BACKEND=yes
5401 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5402 echo "Warning: largefile support cannot be disabled for win32."
5406 #-------------------------------------------------------------------------------
5407 # ask for all that hasn't been auto-detected or specified in the arguments
5408 #-------------------------------------------------------------------------------
5410 # enable dwarf2 support on Mac
5411 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5412 QT_CONFIG="$QT_CONFIG dwarf2"
5415 # Detect the default arch (x86 or x86_64) on Mac OS X
5416 if [ "$BUILD_ON_MAC" = "yes" ]; then
5418 case `file "${outpath}/bin/qmake"` in
5426 # unsupported/unknown
5430 if [ -n "$DEFAULT_ARCH" ]; then
5431 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5432 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5433 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5434 # Make the application arch follow the Qt arch
5435 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5440 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5441 QT_CONFIG="$QT_CONFIG phonon-backend"
5444 # disable accessibility
5445 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5446 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5448 QT_CONFIG="$QT_CONFIG accessibility"
5451 # egl stuff does not belong in lighthouse, but rather in plugins
5452 if [ "$PLATFORM_QPA" = "yes" ]; then
5457 if [ "$CFG_EGL" = "no" ]; then
5458 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5460 QT_CONFIG="$QT_CONFIG egl"
5461 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5462 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5467 if [ "$CFG_OPENVG" = "no" ]; then
5468 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5470 QT_CONFIG="$QT_CONFIG openvg"
5471 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5472 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5474 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5475 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5477 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5478 QT_CONFIG="$QT_CONFIG shivavg"
5479 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5484 if [ "$CFG_OPENGL" = "no" ]; then
5485 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5487 QT_CONFIG="$QT_CONFIG opengl"
5490 if [ "$CFG_OPENGL" = "es2" ]; then
5491 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5494 if [ "$CFG_OPENGL" = "es2" ]; then
5495 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5496 QT_CONFIG="$QT_CONFIG opengles2"
5499 # safe execution environment
5500 if [ "$CFG_SXE" != "no" ]; then
5501 QT_CONFIG="$QT_CONFIG sxe"
5504 # build up the variables for output
5505 if [ "$CFG_DEBUG" = "yes" ]; then
5506 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5507 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5508 elif [ "$CFG_DEBUG" = "no" ]; then
5509 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5510 QMAKE_CONFIG="$QMAKE_CONFIG release"
5512 if [ "$CFG_SHARED" = "yes" ]; then
5513 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5514 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5515 elif [ "$CFG_SHARED" = "no" ]; then
5516 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5517 QMAKE_CONFIG="$QMAKE_CONFIG static"
5519 if [ "$PLATFORM_QPA" = "yes" ]; then
5520 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5521 QT_CONFIG="$QT_CONFIG qpa"
5522 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5523 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5526 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5527 # Do not set this here for Windows. Let qmake do it so
5528 # debug and release precompiled headers are kept separate.
5529 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5531 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5532 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5533 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5534 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5535 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5536 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5538 if [ "$CFG_STL" = "no" ]; then
5539 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5541 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5543 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5544 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5546 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5547 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5548 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5549 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5550 QMakeVar add QMAKE_CFLAGS -g
5551 QMakeVar add QMAKE_CXXFLAGS -g
5552 QT_CONFIG="$QT_CONFIG separate_debug_info"
5554 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5555 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5557 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5558 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5559 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5560 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5561 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5562 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5563 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5564 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5565 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5566 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5567 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5568 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5569 QT_CONFIG="$QT_CONFIG clock-gettime"
5571 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5572 QT_CONFIG="$QT_CONFIG clock-monotonic"
5574 if [ "$CFG_MREMAP" = "yes" ]; then
5575 QT_CONFIG="$QT_CONFIG mremap"
5577 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5578 QT_CONFIG="$QT_CONFIG getaddrinfo"
5580 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5581 QT_CONFIG="$QT_CONFIG ipv6ifname"
5583 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5584 QT_CONFIG="$QT_CONFIG getifaddrs"
5586 if [ "$CFG_INOTIFY" = "yes" ]; then
5587 QT_CONFIG="$QT_CONFIG inotify"
5589 if [ "$CFG_LIBJPEG" = "no" ]; then
5591 elif [ "$CFG_LIBJPEG" = "system" ]; then
5592 QT_CONFIG="$QT_CONFIG system-jpeg"
5594 if [ "$CFG_JPEG" = "no" ]; then
5595 QT_CONFIG="$QT_CONFIG no-jpeg"
5596 elif [ "$CFG_JPEG" = "yes" ]; then
5597 QT_CONFIG="$QT_CONFIG jpeg"
5599 if [ "$CFG_LIBPNG" = "no" ]; then
5602 if [ "$CFG_LIBPNG" = "system" ]; then
5603 QT_CONFIG="$QT_CONFIG system-png"
5605 if [ "$CFG_PNG" = "no" ]; then
5606 QT_CONFIG="$QT_CONFIG no-png"
5607 elif [ "$CFG_PNG" = "yes" ]; then
5608 QT_CONFIG="$QT_CONFIG png"
5610 if [ "$CFG_GIF" = "no" ]; then
5611 QT_CONFIG="$QT_CONFIG no-gif"
5612 elif [ "$CFG_GIF" = "yes" ]; then
5613 QT_CONFIG="$QT_CONFIG gif"
5615 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5616 QT_CONFIG="$QT_CONFIG no-freetype"
5617 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5618 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5619 QT_CONFIG="$QT_CONFIG system-freetype"
5621 QT_CONFIG="$QT_CONFIG freetype"
5623 if [ "$CFG_GUI" = "auto" ]; then
5626 if [ "$CFG_GUI" = "no" ]; then
5627 QT_CONFIG="$QT_CONFIG no-gui"
5630 if [ "$CFG_WIDGETS" = "no" ]; then
5631 QT_CONFIG="$QT_CONFIG no-widgets"
5632 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5635 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5636 #On Mac we implicitly link against libz, so we
5637 #never use the 3rdparty stuff.
5638 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5640 if [ "$CFG_ZLIB" = "yes" ]; then
5641 QT_CONFIG="$QT_CONFIG zlib"
5642 elif [ "$CFG_ZLIB" = "system" ]; then
5643 QT_CONFIG="$QT_CONFIG system-zlib"
5646 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5647 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5648 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5649 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5650 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5651 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5652 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5653 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5654 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5655 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
5656 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5657 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5658 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5659 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5660 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5662 if [ "$PLATFORM_X11" = "yes" ]; then
5663 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5665 # for some reason, the following libraries are not always built shared,
5666 # so *every* program/lib (including Qt) has to link against them
5667 if [ "$CFG_XSHAPE" = "yes" ]; then
5668 QT_CONFIG="$QT_CONFIG xshape"
5670 if [ "$CFG_XVIDEO" = "yes" ]; then
5671 QT_CONFIG="$QT_CONFIG xvideo"
5673 if [ "$CFG_XSYNC" = "yes" ]; then
5674 QT_CONFIG="$QT_CONFIG xsync"
5676 if [ "$CFG_XINERAMA" = "yes" ]; then
5677 QT_CONFIG="$QT_CONFIG xinerama"
5678 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5680 if [ "$CFG_XCURSOR" = "yes" ]; then
5681 QT_CONFIG="$QT_CONFIG xcursor"
5682 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5684 if [ "$CFG_XFIXES" = "yes" ]; then
5685 QT_CONFIG="$QT_CONFIG xfixes"
5686 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5688 if [ "$CFG_XRANDR" = "yes" ]; then
5689 QT_CONFIG="$QT_CONFIG xrandr"
5690 if [ "$CFG_XRENDER" != "yes" ]; then
5691 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5692 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5694 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5697 if [ "$CFG_XRENDER" = "yes" ]; then
5698 QT_CONFIG="$QT_CONFIG xrender"
5699 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5701 if [ "$CFG_MITSHM" = "yes" ]; then
5702 QT_CONFIG="$QT_CONFIG mitshm"
5704 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5705 QT_CONFIG="$QT_CONFIG fontconfig"
5707 if [ "$CFG_XINPUT" = "yes" ]; then
5708 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5710 if [ "$CFG_XINPUT" = "yes" ]; then
5711 QT_CONFIG="$QT_CONFIG xinput tablet"
5713 if [ "$CFG_XKB" = "yes" ]; then
5714 QT_CONFIG="$QT_CONFIG xkb"
5718 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5719 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5720 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5722 if [ "$PLATFORM_MAC" = "yes" ]; then
5723 if [ "$CFG_RPATH" = "yes" ]; then
5724 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5725 # set the default rpath to the library installation directory
5726 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5728 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5729 if [ -n "$RPATH_FLAGS" ]; then
5731 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5735 elif [ "$CFG_RPATH" = "yes" ]; then
5736 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5740 if [ "$CFG_RPATH" = "yes" ]; then
5741 # set the default rpath to the library installation directory
5742 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5744 if [ -n "$RPATH_FLAGS" ]; then
5745 # add the user defined rpaths
5746 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5750 if [ '!' -z "$I_FLAGS" ]; then
5751 # add the user define include paths
5752 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5753 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5756 if [ '!' -z "$W_FLAGS" ]; then
5757 # add the user defined warning flags
5758 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5759 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5760 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5763 # turn off exceptions for the compilers that support it
5764 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5765 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5767 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5770 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5771 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5774 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5775 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5776 # Follow default behavior of configure.exe by overriding with "rtti".
5777 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5780 if [ "$CFG_ALSA" = "yes" ]; then
5781 QT_CONFIG="$QT_CONFIG alsa"
5784 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5785 QT_CONFIG="$QT_CONFIG pulseaudio"
5788 if [ "$CFG_COREWLAN" = "yes" ]; then
5789 QT_CONFIG="$QT_CONFIG corewlan"
5792 if [ "$CFG_ICU" = "yes" ]; then
5793 QT_CONFIG="$QT_CONFIG icu"
5796 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5797 QT_CONFIG="$QT_CONFIG force_asserts"
5800 if [ "$CFG_PCRE" = "qt" ]; then
5801 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5805 # Some Qt modules are too advanced in C++ for some old compilers
5806 # Detect here the platforms where they are known to work.
5808 # See Qt documentation for more information on which features are
5809 # supported and on which compilers.
5811 canBuildQtConcurrent="yes"
5812 canUseV8Snapshot="yes"
5814 case "$XPLATFORM" in
5816 # PA-RISC's assembly is too limited
5817 # gcc 3.4 on that platform can't build QtXmlPatterns
5818 # the assembly it generates cannot be compiled
5820 # Check gcc's version
5821 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5825 canBuildQtXmlPatterns="no"
5829 canBuildQtXmlPatterns="no"
5833 unsupported/vxworks-*-g++*)
5836 unsupported/vxworks-*-dcc*)
5838 canBuildQtXmlPatterns="no"
5841 # Check gcc's version
5842 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5850 canBuildQtXmlPatterns="no"
5855 # Check the compiler version
5856 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5859 canBuildQtXmlPatterns="no"
5860 canBuildQtConcurrent="no"
5864 canBuildQtConcurrent="no"
5870 canBuildQtXmlPatterns="no"
5871 canBuildQtConcurrent="no"
5877 # Get the xlC version
5878 cat > xlcver.c <<EOF
5882 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5887 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5888 xlcver=`./xlcver 2>/dev/null`
5891 if [ "$OPT_VERBOSE" = "yes" ]; then
5892 if [ -n "$xlcver" ]; then
5893 echo Found IBM xlC version: $xlcver.
5895 echo Could not determine IBM xlC version, assuming oldest supported.
5902 canBuildQtXmlPatterns="no"
5903 canBuildQtConcurrent="no"
5907 canBuildQtConcurrent="no"
5913 canBuildQtConcurrent="no"
5917 if [ "$CFG_GUI" = "no" ]; then
5918 # WebKit requires QtGui
5922 if [ "$CFG_SHARED" = "no" ]; then
5924 echo "WARNING: Using static linking will disable the WebKit module."
5929 CFG_CONCURRENT="yes"
5930 if [ "$canBuildQtConcurrent" = "no" ]; then
5931 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5934 QT_CONFIG="$QT_CONFIG concurrent"
5938 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5939 QT_CONFIG="$QT_CONFIG audio-backend"
5943 if [ "$CFG_WEBKIT" = "debug" ]; then
5944 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5948 QT_CONFIG="$QT_CONFIG v8"
5949 # Detect snapshot support
5950 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5951 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5954 *) canUseV8Snapshot="no"
5958 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5959 # QEMU crashes when building inside Scratchbox with an ARM target
5960 canUseV8Snapshot="no"
5963 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5964 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5966 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5967 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5970 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5971 QT_CONFIG="$QT_CONFIG v8snapshot"
5975 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
5976 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
5979 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5982 QMakeVar add QMAKE_CFLAGS -fno-exceptions
5983 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
5984 QMakeVar add QMAKE_LFLAGS -fno-exceptions
5989 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
5990 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
5991 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
5998 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6004 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6006 case "$COMPILER_VERSION" in
6008 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6009 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6010 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6013 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6014 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6015 QT_GCC_PATCH_VERSION=0
6025 #-------------------------------------------------------------------------------
6026 # part of configuration information goes into qconfig.h
6027 #-------------------------------------------------------------------------------
6029 case "$CFG_QCONFIG" in
6031 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6034 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6035 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6036 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6037 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6038 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6039 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6041 echo "#endif" >>"$tmpconfig"
6045 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6049 # define QT_EDITION $QT_EDITION
6053 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6054 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6056 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6057 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6060 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6061 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6064 if [ "$BUILD_ON_MAC" = "yes" ]; then
6065 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6066 #if defined(__LP64__)
6067 # define QT_POINTER_SIZE 8
6069 # define QT_POINTER_SIZE 4
6073 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6074 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6077 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6078 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6079 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6083 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6085 if [ "$CFG_DEV" = "yes" ]; then
6086 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6089 if [ "$PLATFORM_QPA" = "yes" ]; then
6090 # Add QPA to config.h
6091 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6094 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6095 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6098 # Add turned on SQL drivers
6099 for DRIVER in $CFG_SQL_AVAILABLE; do
6100 eval "VAL=\$CFG_SQL_$DRIVER"
6103 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6104 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6105 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6108 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6114 QMakeVar set sql-drivers "$SQL_DRIVERS"
6115 QMakeVar set sql-plugins "$SQL_PLUGINS"
6117 # Add other configuration options to the qconfig.h file
6118 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6119 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6120 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6121 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6122 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6123 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6124 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6126 # X11/Unix/Mac only configs
6127 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6128 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6129 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6130 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6131 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6132 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6133 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6134 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6135 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6136 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6137 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6138 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6139 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6140 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6141 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6143 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6144 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6145 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6146 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6147 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6148 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6149 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6150 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6151 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6152 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6153 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6154 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6155 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6157 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6158 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6159 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6160 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6161 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6162 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6163 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6164 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6166 # sort QCONFIG_FLAGS for neatness if we can
6167 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6168 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6170 if [ -n "$QCONFIG_FLAGS" ]; then
6171 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6172 #ifndef QT_BOOTSTRAPPED
6175 for cfg in $QCONFIG_FLAGS; do
6176 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6177 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6178 # figure out define logic, so we can output the correct
6179 # ifdefs to override the global defines in a project
6181 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6182 # QT_NO_option can be forcefully turned on by QT_option
6183 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6184 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6185 # QT_option can be forcefully turned off by QT_NO_option
6186 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6189 if [ -z $cfgdNeg ]; then
6190 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6197 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6198 #if defined($cfgd) && defined($cfgdNeg)
6200 #elif !defined($cfgd) && !defined($cfgdNeg)
6207 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6208 #endif // QT_BOOTSTRAPPED
6213 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6214 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6215 #define QT_VISIBILITY_AVAILABLE
6220 if [ -n "$QT_LIBINFIX" ]; then
6221 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6222 #define QT_LIBINFIX "$QT_LIBINFIX"
6227 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6228 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6229 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6231 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6232 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6233 chmod -w "$outpath/src/corelib/global/qconfig.h"
6234 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6235 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6239 #-------------------------------------------------------------------------------
6240 # save configuration into qconfig.pri
6241 #-------------------------------------------------------------------------------
6242 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6243 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6244 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6245 if [ "$CFG_DEBUG" = "yes" ]; then
6246 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6247 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6248 QT_CONFIG="$QT_CONFIG release"
6250 QT_CONFIG="$QT_CONFIG debug"
6251 elif [ "$CFG_DEBUG" = "no" ]; then
6252 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6253 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6254 QT_CONFIG="$QT_CONFIG debug"
6256 QT_CONFIG="$QT_CONFIG release"
6258 if [ "$CFG_STL" = "yes" ]; then
6259 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6261 if [ "$CFG_FRAMEWORK" = "no" ]; then
6262 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6264 QT_CONFIG="$QT_CONFIG qt_framework"
6265 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6267 if [ "$CFG_DEV" = "yes" ]; then
6268 QT_CONFIG="$QT_CONFIG private_tests"
6271 cat >>"$QTCONFIG.tmp" <<EOF
6273 CONFIG += $QTCONFIG_CONFIG
6275 QT_HOST_ARCH = $CFG_HOST_ARCH
6276 QT_EDITION = $Edition
6277 QT_CONFIG += $QT_CONFIG
6280 QT_VERSION = $QT_VERSION
6281 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6282 QT_MINOR_VERSION = $QT_MINOR_VERSION
6283 QT_PATCH_VERSION = $QT_PATCH_VERSION
6286 QT_LIBINFIX = $QT_LIBINFIX
6287 QT_NAMESPACE = $QT_NAMESPACE
6290 if [ -n "$CFG_SYSROOT" ]; then
6291 echo "# sysroot" >>"$QTCONFIG.tmp"
6292 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6293 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6294 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6295 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6296 echo "}" >> "$QTCONFIG.tmp"
6297 echo >> "$QTCONFIG.tmp"
6299 if [ -n "$RPATH_FLAGS" ]; then
6300 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
6302 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6303 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6304 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6305 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6308 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6309 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6310 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6313 # replace qconfig.pri if it differs from the newly created temp file
6314 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6315 rm -f "$QTCONFIG.tmp"
6317 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6320 #-------------------------------------------------------------------------------
6321 # save configuration into qmodule.pri
6322 #-------------------------------------------------------------------------------
6323 QTMODULE="$outpath/mkspecs/qmodule.pri"
6325 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6327 # Ensure we can link to uninistalled libraries
6328 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6329 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6331 if [ -n "$QT_CFLAGS_PSQL" ]; then
6332 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6334 if [ -n "$QT_LFLAGS_PSQL" ]; then
6335 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6337 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6338 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6340 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6341 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6343 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6344 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6346 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6347 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6349 if [ -n "$QT_LFLAGS_ODBC" ]; then
6350 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6352 if [ -n "$QT_LFLAGS_TDS" ]; then
6353 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6356 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6357 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6360 #dump in the OPENSSL_LIBS info
6361 if [ '!' -z "$OPENSSL_LIBS" ]; then
6362 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6363 elif [ "$CFG_OPENSSL" = "linked" ]; then
6364 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6367 #dump in the SDK info
6368 if [ '!' -z "$CFG_SDK" ]; then
6369 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6373 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6374 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6376 # replace qmodule.pri if it differs from the newly created temp file
6377 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6378 rm -f "$QTMODULE.tmp"
6380 mv -f "$QTMODULE.tmp" "$QTMODULE"
6383 #-------------------------------------------------------------------------------
6384 # save configuration into .qmake.cache
6385 #-------------------------------------------------------------------------------
6387 CACHEFILE="$outpath/.qmake.cache"
6388 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6389 cat >>"$CACHEFILE.tmp" <<EOF
6391 QT_SOURCE_TREE = \$\$quote($relpath)
6392 QT_BUILD_TREE = \$\$quote($outpath)
6393 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6395 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6396 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6397 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6399 include(\$\$PWD/mkspecs/qmodule.pri)
6400 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6404 #dump the qmake spec
6405 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6406 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6408 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6411 # replace .qmake.cache if it differs from the newly created temp file
6412 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6413 rm -f "$CACHEFILE.tmp"
6415 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6418 #-------------------------------------------------------------------------------
6419 # give feedback on configuration
6420 #-------------------------------------------------------------------------------
6424 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6427 This target is using the GNU C++ compiler ($PLATFORM).
6429 Recent versions of this compiler automatically include code for
6430 exceptions, which increase both the size of the Qt libraries and
6431 the amount of memory taken by your applications.
6433 You may choose to re-run `basename $0` with the -no-exceptions
6434 option to compile Qt without exceptions. This is completely binary
6435 compatible, and existing applications will continue to work.
6443 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6446 This target is using the MIPSpro C++ compiler ($PLATFORM).
6448 You may choose to re-run `basename $0` with the -no-exceptions
6449 option to compile Qt without exceptions. This will make the
6450 size of the Qt library smaller and reduce the amount of memory
6451 taken by your applications.
6463 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6464 echo "Build type: $PLATFORM"
6466 echo "Building on: $PLATFORM"
6467 echo "Building for: $XPLATFORM"
6470 echo "Architecture: $CFG_ARCH"
6471 if [ "$PLATFORM_QPA" = "yes" ]; then
6472 echo "Host architecture: $CFG_HOST_ARCH"
6475 if [ -n "$PLATFORM_NOTES" ]; then
6476 echo "Platform notes:"
6477 echo "$PLATFORM_NOTES"
6482 if [ "$OPT_VERBOSE" = "yes" ]; then
6483 echo $ECHO_N "qmake vars .......... $ECHO_C"
6484 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6485 echo "qmake switches ......... $QMAKE_SWITCHES"
6488 echo "Build .................. $CFG_BUILD_PARTS"
6489 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6490 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6491 echo "Debug .................. yes (combined)"
6492 if [ "$CFG_DEBUG" = "yes" ]; then
6493 echo "Default Link ........... debug"
6495 echo "Default Link ........... release"
6498 echo "Debug .................. $CFG_DEBUG"
6500 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6501 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6502 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6503 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6504 echo "QtGui module ........... $CFG_GUI"
6505 echo "QtWidgets module ....... $CFG_WIDGETS"
6506 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6507 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6509 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6511 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6512 echo "STL support ............ $CFG_STL"
6513 echo "PCH support ............ $CFG_PRECOMPILE"
6514 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6515 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6516 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6517 echo "AVX..................... ${CFG_AVX}"
6518 elif [ "$CFG_ARCH" = "arm" ]; then
6519 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6520 echo "NEON support ........... ${CFG_NEON}"
6522 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6523 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6524 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6525 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6526 echo "NIS support ............ $CFG_NIS"
6527 echo "CUPS support ........... $CFG_CUPS"
6528 echo "Iconv support .......... $CFG_ICONV"
6529 echo "Glib support ........... $CFG_GLIB"
6530 echo "GStreamer support ...... $CFG_GSTREAMER"
6531 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6532 echo "Large File support ..... $CFG_LARGEFILE"
6533 echo "GIF support ............ $CFG_GIF"
6534 if [ "$CFG_JPEG" = "no" ]; then
6535 echo "JPEG support ........... $CFG_JPEG"
6537 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6539 if [ "$CFG_PNG" = "no" ]; then
6540 echo "PNG support ............ $CFG_PNG"
6542 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6544 echo "zlib support ........... $CFG_ZLIB"
6545 echo "Session management ..... $CFG_SM"
6546 echo "libudev support ........ $CFG_LIBUDEV"
6548 if [ "$CFG_OPENGL" = "desktop" ]; then
6549 echo "OpenGL support ......... yes (Desktop OpenGL)"
6550 elif [ "$CFG_OPENGL" = "es2" ]; then
6551 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6553 echo "OpenGL support ......... no"
6555 if [ "$CFG_EGL" != "no" ]; then
6556 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6557 echo "EGL support ............ yes <GLES/egl.h>"
6559 echo "EGL support ............ yes <EGL/egl.h>"
6562 if [ "$CFG_OPENVG" ]; then
6563 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6564 echo "OpenVG support ......... ShivaVG"
6566 echo "OpenVG support ......... $CFG_OPENVG"
6569 if [ "$PLATFORM_X11" = "yes" ]; then
6570 echo "NAS sound support ...... $CFG_NAS"
6571 echo "XShape support ......... $CFG_XSHAPE"
6572 echo "XVideo support ......... $CFG_XVIDEO"
6573 echo "XSync support .......... $CFG_XSYNC"
6574 echo "Xinerama support ....... $CFG_XINERAMA"
6575 echo "Xcursor support ........ $CFG_XCURSOR"
6576 echo "Xfixes support ......... $CFG_XFIXES"
6577 echo "Xrandr support ......... $CFG_XRANDR"
6578 echo "Xi support ............. $CFG_XINPUT"
6579 echo "MIT-SHM support ........ $CFG_MITSHM"
6580 echo "FontConfig support ..... $CFG_FONTCONFIG"
6581 echo "XKB Support ............ $CFG_XKB"
6582 echo "immodule support ....... $CFG_IM"
6583 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6585 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6586 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6587 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6588 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6589 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6590 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6591 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6592 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6593 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6596 if [ "$CFG_OPENSSL" = "yes" ]; then
6597 OPENSSL_LINKAGE="(run-time)"
6598 elif [ "$CFG_OPENSSL" = "linked" ]; then
6599 OPENSSL_LINKAGE="(linked)"
6601 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6602 echo "Alsa support ........... $CFG_ALSA"
6603 if [ "$BUILD_ON_MAC" = "yes" ]; then
6604 echo "CoreWlan support ....... $CFG_COREWLAN"
6606 echo "libICU support ......... $CFG_ICU"
6607 echo "PCRE support ........... $CFG_PCRE"
6608 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6609 echo "Xcb support ............ limited (old version)"
6611 echo "Xcb support ............ $CFG_XCB"
6613 echo "Xrender support ........ $CFG_XRENDER"
6614 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6615 echo "XInput2 support ........ $CFG_XINPUT2"
6619 # complain about not being able to use dynamic plugins if we are using a static build
6620 if [ "$CFG_SHARED" = "no" ]; then
6622 echo "WARNING: Using static linking will disable the use of dynamically"
6623 echo "loaded plugins. Make sure to import all needed static plugins,"
6624 echo "or compile needed modules into the library."
6627 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6629 echo "NOTE: When linking against OpenSSL, you can override the default"
6630 echo "library names through OPENSSL_LIBS."
6632 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6635 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6637 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6638 echo "if you want a pure debug build."
6643 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6648 #-------------------------------------------------------------------------------
6649 # build makefiles based on the configuration
6650 #-------------------------------------------------------------------------------
6652 echo "Finding project files. Please wait..."
6653 if [ "$CFG_NOPROCESS" != "yes" ]; then
6654 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6655 if [ -f "${relpath}/qtbase.pro" ]; then
6656 mkfile="${outpath}/Makefile"
6657 [ -f "$mkfile" ] && chmod +w "$mkfile"
6658 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6662 # .projects -> projects to process
6663 # .projects.1 -> qt and moc
6664 # .projects.2 -> subdirs and libs
6665 # .projects.3 -> the rest
6666 rm -f .projects .projects.1 .projects.2 .projects.3
6668 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6669 if [ -z "$AWK" ]; then
6670 for p in `echo $QMAKE_PROJECTS`; do
6671 echo "$p" >> .projects
6674 cat >projects.awk <<EOF
6680 first = "./.projects.1.tmp"
6681 second = "./.projects.2.tmp"
6682 third = "./.projects.3.tmp"
6687 if ( ! target_file )
6689 print input_file >target_file
6694 input_file = FILENAME
6699 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6702 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6703 target_file = second
6708 matched_target == 0 && /^(TEMPLATE.*=)/ {
6709 if ( \$3 == "subdirs" )
6710 target_file = second
6711 else if ( \$3 == "lib" )
6717 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6718 if ( \$0 ~ /plugin/ )
6721 target_file = second
6726 if ( ! target_file )
6728 print input_file >>target_file
6735 for p in `echo $QMAKE_PROJECTS`; do
6736 echo "$p" >> .projects.all
6739 # if you get errors about the length of the command line to awk, change the -l arg
6741 split -l 100 .projects.all .projects.all.
6742 for p in .projects.all.*; do
6743 "$AWK" -f projects.awk `cat $p`
6744 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6745 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6746 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6747 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6749 rm -f .projects.all* projects.awk
6751 [ -f .projects.1 ] && cat .projects.1 >>.projects
6752 [ -f .projects.2 ] && cat .projects.2 >>.projects
6753 rm -f .projects.1 .projects.2
6754 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6755 cat .projects.3 >>.projects
6759 # don't sort Qt and MOC in with the other project files
6760 # also work around a segfaulting uniq(1)
6761 if [ -f .sorted.projects.2 ]; then
6762 sort .sorted.projects.2 > .sorted.projects.2.new
6763 mv -f .sorted.projects.2.new .sorted.projects.2
6764 cat .sorted.projects.2 >> .sorted.projects.1
6766 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6767 rm -f .sorted.projects.2 .sorted.projects.1
6771 if [ -f .projects ]; then
6772 uniq .projects >.tmp
6773 mv -f .tmp .projects
6774 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6776 if [ -f .projects.3 ]; then
6777 uniq .projects.3 >.tmp
6778 mv -f .tmp .projects.3
6779 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6781 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6785 for part in $CFG_BUILD_PARTS; do
6787 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6788 libs) PART_ROOTS="$PART_ROOTS src" ;;
6789 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6790 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6795 if [ "$CFG_DEV" = "yes" ]; then
6796 PART_ROOTS="$PART_ROOTS tests"
6799 echo "Creating makefiles. Please wait..."
6800 for file in .projects .projects.3; do
6801 [ '!' -f "$file" ] && continue
6802 for a in `cat $file`; do
6804 for r in $PART_ROOTS; do
6805 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6810 [ "$IN_ROOT" = "no" ] && continue
6813 *winmain/winmain.pro)
6814 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6818 */qmake/qmake.pro) continue ;;
6819 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6820 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6826 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6827 test -d "$dir" || mkdir -p "$dir"
6828 OUTDIR="$outpath/$dir"
6829 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6830 # fast configure - the makefile exists, skip it
6831 # since the makefile exists, it was generated by qmake, which means we
6832 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6834 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6837 QMAKE_SPEC_ARGS="-spec $SPEC"
6838 echo $ECHO_N " for $a$ECHO_C"
6840 QMAKE="$outpath/bin/qmake"
6841 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6842 if [ "$file" = ".projects.3" ]; then
6845 cat >"${OUTDIR}/Makefile" <<EOF
6846 # ${OUTDIR}/Makefile: generated by configure
6848 # WARNING: This makefile will be replaced with a real makefile.
6849 # All changes made to this file will be lost.
6851 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6853 cat >>"${OUTDIR}/Makefile" <<EOF
6855 all clean install qmake first Makefile: FORCE
6856 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6864 if [ "$OPT_VERBOSE" = "yes" ]; then
6865 echo " (`basename $SPEC`)"
6866 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6871 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6872 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6876 rm -f .projects .projects.3
6878 #-------------------------------------------------------------------------------
6879 # check for platforms that we don't yet know about
6880 #-------------------------------------------------------------------------------
6881 if [ "$CFG_ARCH" = "unknown" ]; then
6884 NOTICE: configure was unable to determine the architecture
6885 for the $XQMAKESPEC target.
6887 Qt will not use a specialized implementation for any atomic
6888 operations. Instead a generic implemention based on either GCC
6889 intrinsics or C++11 std::atomic<T> will be used (when
6890 available). The generic implementations are generally as fast
6891 as and always as safe as a specialized implementation.
6893 If no generic implementation is available, Qt will use a
6894 fallback UNIX implementation which uses a single
6895 pthread_mutex_t to protect all atomic operations. This
6896 implementation is the slow (but safe) fallback implementation
6897 for architectures Qt does not yet support.
6901 #-------------------------------------------------------------------------------
6902 # check if the user passed the -no-zlib option, which is no longer supported
6903 #-------------------------------------------------------------------------------
6904 if [ -n "$ZLIB_FORCED" ]; then
6905 which_zlib="supplied"
6906 if [ "$CFG_ZLIB" = "system" ]; then
6912 NOTICE: The -no-zlib option was supplied but is no longer
6915 Qt now requires zlib support in all builds, so the -no-zlib
6916 option was ignored. Qt will be built using the $which_zlib
6921 #-------------------------------------------------------------------------------
6922 # check if the user passed the obsoleted -wayland or -no-wayland flag
6923 #-------------------------------------------------------------------------------
6924 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6927 NOTICE: The -wayland and -no-wayland flags are now obsolete
6929 All configuring of QtWayland plugin and QtCompositor happens in the module
6933 #-------------------------------------------------------------------------------
6934 # check if the user passed the obsoleted -arch or -host-arch options
6935 #-------------------------------------------------------------------------------
6936 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6939 NOTICE: The -arch and -host-arch options are obsolete.
6941 Qt now detects the target and host architectures based on compiler
6942 output. Qt will be built using $CFG_ARCH for the target architecture
6943 and $CFG_HOST_ARCH for the host architecture (note that these two
6944 will be the same unless you are cross-compiling).
6948 #-------------------------------------------------------------------------------
6949 # finally save the executed command to another script
6950 #-------------------------------------------------------------------------------
6951 if [ `basename $0` != "config.status" ]; then
6952 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6954 # add the system variables
6955 for varname in $SYSTEM_VARIABLES; do
6957 'if [ -n "\$'${varname}'" ]; then
6958 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6963 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6965 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6966 echo "#!/bin/sh" > "$outpath/config.status"
6967 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6968 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6969 echo "else" >> "$outpath/config.status"
6970 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6971 echo "fi" >> "$outpath/config.status"
6972 chmod +x "$outpath/config.status"
6975 if [ -n "$RPATH_MESSAGE" ]; then
6977 echo "$RPATH_MESSAGE"
6980 MAKE=`basename "$MAKE"`
6982 echo Qt is now configured for building. Just run \'$MAKE\'.
6983 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6984 echo Once everything is built, Qt is installed.
6985 echo You should not run \'$MAKE install\'.
6987 echo Once everything is built, you must run \'$MAKE install\'.
6988 echo Qt will be installed into $QT_INSTALL_PREFIX
6991 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.