2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
134 values["LITERAL_WHITESPACE"] = " "
135 values["LITERAL_DOLLAR"] = "$"
137 /^[_A-Z0-9.]+[ \t]*\+?=/ {
138 valStart = index($0, "=") + 1
141 if (substr($0, valStart - 2, 1) == "+") {
145 variable = substr($0, 0, valStart - 2 - append)
146 value = substr($0, valStart)
147 gsub("[ \t]+", "", variable)
148 gsub("^[ \t]+", "", value)
149 gsub("[ \t]+$", "", value)
152 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
153 ovalue = ovalue substr(value, 1, RSTART - 1)
154 var = substr(value, RSTART + 2, RLENGTH - 2)
155 value = substr(value, RSTART + RLENGTH)
157 var = substr(var, 2, length(var) - 2)
159 ovalue = ovalue values[var]
161 ovalue = ovalue value
163 combinedValue = values[variable]
164 if (append == 1 && length(combinedValue) > 0) {
165 combinedValue = combinedValue " " ovalue
167 combinedValue = ovalue
169 values[variable] = combinedValue
172 for (var in values) {
173 print var "=" values[var]
181 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
184 # relies on $QMAKESPEC being set correctly. parses include statements in
185 # qmake.conf and prints out the expanded file
188 if [ -z "$specvals" ]; then
189 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
191 getQMakeConf3 "$1" "$specvals"
196 if [ -z "$xspecvals" ]; then
197 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
199 getQMakeConf3 "$1" "$xspecvals"
202 # relies on $TEST_COMPILER being set correctly
203 compilerSupportsFlag()
205 cat >conftest.cpp <<EOF
206 int main() { return 0; }
208 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
210 rm -f conftest.cpp conftest.o
214 # relies on $TEST_COMPILER being set correctly
220 safe_flag=`shellEscape "$flag"`
221 lflags=$lflags,$safe_flag
223 compilerSupportsFlag "$lflags" >/dev/null 2>&1
226 #-------------------------------------------------------------------------------
227 # operating system detection
228 #-------------------------------------------------------------------------------
230 # need that throughout the script
231 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
232 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
233 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
234 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
236 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
237 if echo '\c' | grep '\c' >/dev/null; then
243 #-------------------------------------------------------------------------------
244 # window system detection
245 #-------------------------------------------------------------------------------
251 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
256 #-----------------------------------------------------------------------------
257 # Qt version detection
258 #-----------------------------------------------------------------------------
259 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
263 if [ -n "$QT_VERSION" ]; then
264 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
265 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
266 if [ -n "$MAJOR" ]; then
267 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
268 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
269 QT_MAJOR_VERSION="$MAJOR"
270 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
271 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
274 if [ -z "$QT_MAJOR_VERSION" ]; then
275 echo "Cannot process version from qglobal.h: $QT_VERSION"
276 echo "Cannot proceed."
280 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
281 if [ -z "$QT_PACKAGEDATE" ]; then
282 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
283 echo "Cannot proceed"
287 #-------------------------------------------------------------------------------
289 #-------------------------------------------------------------------------------
293 EditionString=Commercial
297 # parse the arguments, setting things to "yes" or "no"
298 while [ "$#" -gt 0 ]; do
302 #Autoconf style options
304 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
308 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
312 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
313 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
316 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
321 # this option may or may not be followed by an argument
322 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
329 -h|help|--help|-help)
330 if [ "$VAL" = "yes" ]; then
332 COMMERCIAL_USER="no" #doesn't matter we will display the help
335 COMMERCIAL_USER="no" #doesn't matter we will display the help
339 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
343 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
350 if [ "$UNKNOWN_ARG" = "yes" ]; then
359 if [ "$PLATFORM_QPA" != "no" ]; then
360 if [ "$PLATFORM_QPA" = "maybe" ]; then
365 echo "No license exists to enable Qt QPA. Disabling."
372 COMMERCIAL_USER="yes"
386 if [ "$COMMERCIAL_USER" = "ask" ]; then
388 echo "Which edition of Qt do you want to use ?"
390 echo "Type 'c' if you want to use the Commercial Edition."
391 echo "Type 'o' if you want to use the Open Source Edition."
395 if [ "$commercial" = "c" ]; then
396 COMMERCIAL_USER="yes"
398 elif [ "$commercial" = "o" ]; then
405 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
406 # Commercial preview release
407 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
410 QT_EDITION="QT_EDITION_DESKTOP"
411 LicenseType="Technology Preview"
412 elif [ $COMMERCIAL_USER = "yes" ]; then
413 # one of commercial editions
414 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
415 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
417 # read in the license file
418 if [ -f "$LICENSE_FILE" ]; then
419 . "$LICENSE_FILE" >/dev/null 2>&1
420 if [ -z "$LicenseKeyExt" ]; then
422 echo "You are using an old license file."
424 echo "Please install the license file supplied by Nokia,"
425 echo "or install the Qt Open Source Edition if you intend to"
426 echo "develop free software."
429 if [ -z "$Licensee" ]; then
431 echo "Invalid license key. Please check the license key."
435 if [ -z "$LicenseKeyExt" ]; then
437 echo $ECHO_N "Please enter your license key: $ECHO_C"
439 Licensee="Unknown user"
444 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
445 && LicenseValid="yes" \
447 if [ "$LicenseValid" != "yes" ]; then
449 echo "Invalid license key. Please check the license key."
452 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
453 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
454 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
455 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
457 # determine which edition we are licensed to use
458 case "$LicenseTypeCode" in
460 LicenseType="Commercial"
464 QT_EDITION="QT_EDITION_UNIVERSAL"
467 Edition="FullFramework"
468 EditionString="Full Framework"
469 QT_EDITION="QT_EDITION_DESKTOP"
472 Edition="GUIFramework"
473 EditionString="GUI Framework"
474 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
479 LicenseType="Evaluation"
480 QMakeVar add DEFINES QT_EVAL
484 QT_EDITION="QT_EDITION_EVALUATION"
489 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
491 echo "Invalid license key. Please check the license key."
495 # verify that we are licensed to use Qt on this platform
497 case "$PlatformCode" in
500 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
504 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
507 ### EMBEDDED_QPA logic missing ###
508 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
509 X9,* | XC,* | XU,* | XW,* | XM,*)
511 LICENSE_EXTENSION="-ALLOS"
513 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
514 # Qt for Embedded Linux
515 LICENSE_EXTENSION="-EMBEDDED"
517 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
519 LICENSE_EXTENSION="-EMBEDDED"
521 FM,*,no | LM,yes,* | ZM,no,no)
523 LICENSE_EXTENSION="-DESKTOP"
527 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
529 echo "You are not licensed for the $Platform platform."
531 echo "Please contact qt-info@nokia.com to upgrade your license to"
532 echo "include the $Platform platform, or install the Qt Open Source Edition"
533 echo "if you intend to develop free software."
538 if test -r "$relpath/.LICENSE"; then
539 # Generic, non-final license
541 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
546 *TECHNOLOGY?PREVIEW*)
553 echo >&2 "Invalid license files; cannot continue"
558 EditionString="$Edition"
559 QT_EDITION="QT_EDITION_DESKTOP"
562 case "$LicenseFeatureCode" in
565 case "$LicenseType" in
567 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
570 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
576 case "$LicenseType" in
578 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
581 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
587 echo "Invalid license key. Please check the license key."
591 case "$LicenseFeatureCode" in
599 if [ '!' -f "$outpath/LICENSE" ]; then
600 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
601 echo "this software has disappeared."
603 echo "Sorry, you are not licensed to use this software."
604 echo "Try re-installing."
608 elif [ $COMMERCIAL_USER = "no" ]; then
609 # Open Source edition - may only be used under the terms of the GPL or LGPL.
610 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
611 Licensee="Open Source"
613 EditionString="Open Source"
614 QT_EDITION="QT_EDITION_OPENSOURCE"
617 #-------------------------------------------------------------------------------
618 # initalize variables
619 #-------------------------------------------------------------------------------
621 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
622 for varname in $SYSTEM_VARIABLES; do
623 qmakevarname="${varname}"
624 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
625 if [ "${varname}" = "LDFLAGS" ]; then
626 qmakevarname="LFLAGS"
627 elif [ "${varname}" = "LD" ]; then
631 'if [ -n "\$'${varname}'" ]; then
632 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
636 # Use CC/CXX to run config.tests
637 mkdir -p "$outpath/config.tests"
638 rm -f "$outpath/config.tests/.qmake.cache"
639 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
641 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
643 # QTDIR may be set and point to an old or system-wide Qt installation
646 # the minimum version of libdbus-1 that we require:
647 MIN_DBUS_1_VERSION=0.93
649 # initalize internal variables
650 CFG_CONFIGURE_EXIT_ON_ERROR=yes
652 CFG_EXCEPTIONS=unspecified
653 CFG_GUI=auto # (yes|no|auto)
679 CFG_OPENVG_LC_INCLUDES=no
680 CFG_OPENVG_SHIVA=auto
681 CFG_OPENVG_ON_OPENGL=auto
687 QT_DEFAULT_BUILD_PARTS="libs examples tests"
691 CFG_AUDIO_BACKEND=auto
693 CFG_DECLARATIVE_DEBUG=yes
694 CFG_JAVASCRIPTCORE_JIT=auto
696 # Target architecture
698 # Host architecture, same as CFG_ARCH when not cross-compiling
700 # Set when the -arch or -host-arch arguments are used
701 OPT_OBSOLETE_HOST_ARG=no
712 CFG_OBSOLETE_WAYLAND=no
725 CFG_SEPARATE_DEBUG_INFO=no
726 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
727 CFG_REDUCE_EXPORTS=auto
737 CFG_REDUCE_RELOCATIONS=auto
739 CFG_ACCESSIBILITY=auto
744 CFG_CLOCK_GETTIME=auto
745 CFG_CLOCK_MONOTONIC=auto
753 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
757 CFG_PREFIX_INSTALL=yes
766 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
767 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
771 OPT_CONFIRM_LICENSE=no
784 QPA_PLATFORM_GUARD=yes
786 # initalize variables used for installation
795 QT_INSTALL_TRANSLATIONS=
804 #flags for SQL drivers
812 QT_LFLAGS_ODBC="-lodbc"
815 # flags for libdbus-1
819 # flags for Glib (X11 only)
823 # flags for GStreamer (X11 only)
827 #-------------------------------------------------------------------------------
828 # check SQL drivers available in this package
829 #-------------------------------------------------------------------------------
831 # opensource version removes some drivers, so force them to be off
837 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
838 for a in "$relpath/src/plugins/sqldrivers/"*; do
840 base_a=`basename "$a"`
841 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
842 eval "CFG_SQL_${base_a}=auto"
847 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
848 if [ -d "$relpath/src/plugins/imageformats" ]; then
849 for a in "$relpath/src/plugins/imageformats/"*; do
851 base_a=`basename "$a"`
852 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
857 #-------------------------------------------------------------------------------
858 # parse command line arguments
859 #-------------------------------------------------------------------------------
861 # parse the arguments, setting things to "yes" or "no"
862 while [ "$#" -gt 0 ]; do
866 #Autoconf style options
868 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
872 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
876 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
877 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
880 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
884 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
888 -no-*-*|-plugin-*-*|-qt-*-*)
889 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
890 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
894 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
897 #Qt style yes options
898 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
899 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
902 #Qt style options that pass an argument
904 if [ "$PLATFORM_QPA" != "yes" ]; then
906 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
910 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
914 -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)
915 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
919 #Qt style complex options in one command
920 -enable-*|-disable-*)
921 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
922 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
924 #Qt Builtin/System style options
925 -no-*|-system-*|-qt-*)
926 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
927 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
929 #Options that cannot be generalized
936 # this option may or may not be followed by an argument
937 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
946 # this option may or may not be followed by an argument
947 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
956 # this option may or may not be followed by an argument
957 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
965 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
966 # this option may or may not be followed by an argument
967 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
986 if [ "$1" = "-D" ]; then
990 VAL=`echo $1 | sed 's,-D,,'`
995 # this option may or may not be followed by an argument
996 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1005 if [ "$1" = "-I" ]; then
1009 VAL=`echo $1 | sed 's,-I,,'`
1014 if [ "$1" = "-L" ]; then
1018 VAL=`echo $1 | sed 's,-L,,'`
1023 if [ "$1" = "-R" ]; then
1027 VAL=`echo $1 | sed 's,-R,,'`
1032 VAL=`echo $1 | sed 's,-l,,'`
1036 if [ "$1" = "-F" ]; then
1040 VAL=`echo $1 | sed 's,-F,,'`
1045 if [ "$1" = "-fw" ]; then
1049 VAL=`echo $1 | sed 's,-fw,,'`
1057 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1064 if [ "$UNKNOWN_ARG" = "yes" ]; then
1065 echo "$1: unknown argument"
1076 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1077 CFG_ACCESSIBILITY="$VAL"
1086 CFG_USE_GNUMAKE="$VAL"
1089 CFG_MYSQL_CONFIG="$VAL"
1092 QT_INSTALL_PREFIX="$VAL"
1095 QT_HOST_PREFIX="$VAL"
1104 QT_FORCE_PKGCONFIG=yes
1107 QT_INSTALL_DOCS="$VAL"
1110 QT_INSTALL_HEADERS="$VAL"
1113 QT_INSTALL_PLUGINS="$VAL"
1116 QT_INSTALL_IMPORTS="$VAL"
1119 QT_INSTALL_DATA="$VAL"
1122 QT_INSTALL_LIBS="$VAL"
1131 QT_INSTALL_TRANSLATIONS="$VAL"
1133 sysconfdir|settingsdir)
1134 QT_INSTALL_SETTINGS="$VAL"
1137 QT_INSTALL_EXAMPLES="$VAL"
1140 QT_INSTALL_TESTS="$VAL"
1149 QT_INSTALL_BINS="$VAL"
1159 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1166 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1167 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1168 [ "$VAL" = "es2" ]; then
1175 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1182 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1185 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1193 if [ "$BUILD_ON_MAC" = "yes" ]; then
1200 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1201 CFG_MAC_DWARF2="$VAL"
1207 OPT_OBSOLETE_HOST_ARG=yes
1210 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1211 CFG_MAC_HARFBUZZ="$VAL"
1218 if [ "$BUILD_ON_MAC" = "yes" ]; then
1219 CFG_FRAMEWORK="$VAL"
1225 if [ "$VAL" = "yes" ]; then
1227 QMakeVar add QMAKE_CFLAGS -pg
1228 QMakeVar add QMAKE_CXXFLAGS -pg
1229 QMakeVar add QMAKE_LFLAGS -pg
1230 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1236 if [ "$VAL" = "yes" ]; then
1237 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1240 exceptions|g++-exceptions)
1241 if [ "$VAL" = "no" ]; then
1243 elif [ "$VAL" = "yes" ]; then
1251 # keep compatibility with old platform names
1257 PLATFORM=hpux-acc-o64
1260 PLATFORM=hpux-acc-64
1263 PLATFORM=hpux-acc-64
1275 PLATFORM=reliant-cds-64
1278 PLATFORM=solaris-cc-64
1281 PLATFORM=unixware-cc
1284 PLATFORM=unixware-g++
1287 PLATFORM=unixware-cc
1290 PLATFORM=unixware-g++
1296 i386) NATIVE_64_ARCH="x86_64" ;;
1297 powerpc) NATIVE_64_ARCH="ppc64" ;;
1298 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1300 if [ ! -z "$NATIVE_64_ARCH" ]; then
1301 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1308 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1311 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1312 CFG_DEBUG_RELEASE="$VAL"
1318 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1319 CFG_RELEASE_QMAKE="$VAL"
1325 if [ "$VAL" = "yes" ]; then
1327 elif [ "$VAL" = "no" ]; then
1334 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1335 CFG_PREFIX_INSTALL="$VAL"
1343 developer-build|commercial|opensource)
1344 # These switches have been dealt with already
1347 if [ "$VAL" = "yes" ]; then
1349 elif [ "$VAL" = "no" ]; then
1356 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1357 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1363 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1364 if [ "$VAL" = "no" ]; then
1365 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1366 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1367 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1373 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1380 if [ "$VAL" = "no" ]; then
1387 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1395 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1402 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1409 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1416 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1423 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1430 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1437 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1444 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1451 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1452 CFG_PRECOMPILE="$VAL"
1457 separate-debug-info)
1458 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1459 CFG_SEPARATE_DEBUG_INFO="$VAL"
1460 elif [ "$VAL" = "nocopy" ] ; then
1461 CFG_SEPARATE_DEBUG_INFO="yes"
1462 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1468 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1469 CFG_REDUCE_EXPORTS="$VAL"
1475 if [ "$VAL" = "no" ]; then
1482 if [ "$VAL" = "no" ]; then
1489 if [ "$VAL" = "no" ]; then
1496 if [ "$VAL" = "no" ]; then
1503 if [ "$VAL" = "no" ]; then
1510 if [ "$VAL" = "no" ]; then
1517 if [ "$VAL" = "no" ]; then
1524 if [ "$VAL" = "no" ]; then
1531 if [ "$VAL" = "no" ]; then
1541 if [ "$VAL" = "no" ]; then
1548 if [ "$VAL" = "no" ]; then
1555 if [ "$VAL" = "no" ]; then
1556 CFG_MIPS_DSPR2="$VAL"
1562 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1563 CFG_REDUCE_RELOCATIONS="$VAL"
1569 [ "$VAL" = "qt" ] && VAL=yes
1570 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1575 # No longer supported:
1576 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1579 if [ "$VAL" = "system" ]; then
1586 [ "$VAL" = "yes" ] && VAL=qt
1587 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1594 [ "$VAL" = "yes" ] && VAL=qt
1595 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1602 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1609 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1616 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1623 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1630 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1637 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1644 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1645 CFG_FONTCONFIG="$VAL"
1651 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1658 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1665 CFG_OBSOLETE_WAYLAND=yes
1668 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1675 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1682 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1689 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1703 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1710 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1711 CFG_GSTREAMER="$VAL"
1717 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1718 CFG_QGTKSTYLE="$VAL"
1724 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1727 if [ "$VAL" = "no" ]; then
1735 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1737 elif [ "$VAL" = "no" ]; then
1744 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1745 QPA_PLATFORM_GUARD="$VAL"
1751 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1753 elif [ "$VAL" = "runtime" ]; then
1760 if [ "$VAL" = "yes" ]; then
1767 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1774 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1775 CFG_LARGEFILE="$VAL"
1781 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1788 if [ "$VAL" = "yes" ]; then
1789 CFG_OPENSSL="linked"
1795 if [ "$VAL" = "yes" ]; then
1796 CFG_DECLARATIVE_DEBUG="yes"
1798 if [ "$VAL" = "no" ]; then
1799 CFG_DECLARATIVE_DEBUG="no"
1806 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1807 CFG_JAVASCRIPTCORE_JIT="$VAL"
1813 if [ "$VAL" = "yes" ]; then
1814 OPT_CONFIRM_LICENSE="$VAL"
1820 if [ "$VAL" = "yes" ]; then
1826 sql-*|imageformat-*)
1827 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1828 # if autoconf style options were used, $VAL can be "yes" or "no"
1829 [ "$VAL" = "yes" ] && VAL=qt
1830 # now $VAL should be "no", "qt", or "plugin"... double-check
1831 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1834 # now $VAL is "no", "qt", or "plugin"
1836 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1837 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1839 # Grab the available values
1842 avail="$CFG_SQL_AVAILABLE"
1845 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1846 if [ "$OPT" != "plugin" ]; then
1847 # png is always built in
1853 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1857 # Check that that user's value is available.
1860 if [ "$VAL" = "$d" ]; then
1865 [ "$found" = yes ] || ERROR=yes
1867 if [ "$VAR" = "sql" ]; then
1868 # set the CFG_SQL_driver
1869 eval "CFG_SQL_$VAL=\$OPT"
1871 elif [ "$VAR" = "imageformat" ]; then
1872 [ "$OPT" = "qt" ] && OPT=yes
1873 VAL="`echo $VAL |tr a-z A-Z`"
1874 eval "CFG_$VAL=$OPT"
1878 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1879 if [ "$OPT" = "plugin" ]; then
1882 QMakeVar add "${VAR}s" "${VAL}"
1883 elif [ "$OPT" = "no" ]; then
1884 PLUG_VAR="${VAR}-plugin"
1886 QMakeVar del "${IN_VAR}s" "$VAL"
1887 QMakeVar del "${PLUG_VAR}s" "$VAL"
1889 if [ "$ERROR" = "yes" ]; then
1890 echo "$CURRENT_OPT: unknown argument"
1895 if [ "$VAL" = "yes" ]; then
1896 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1897 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1901 elif [ "$VAL" = "no" ]; then
1902 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1903 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1912 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1919 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1926 D_FLAGS="$D_FLAGS \"$VAL\""
1929 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1932 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1935 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1938 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1941 if [ "$BUILD_ON_MAC" = "yes" ]; then
1942 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1943 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1949 if [ "$BUILD_ON_MAC" = "yes" ]; then
1950 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1956 W_FLAGS="$W_FLAGS \"${VAL}\""
1962 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1963 CFG_PHONON_BACKEND="$VAL"
1975 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1976 CFG_AUDIO_BACKEND="$VAL"
1982 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1989 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1990 CFG_FORCE_ASSERTS="$VAL"
1996 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2006 if [ "$UNKNOWN_OPT" = "yes" ]; then
2007 echo "${CURRENT_OPT}: invalid command-line switch"
2013 # update QT_CONFIG to show our current predefined configuration
2014 case "$CFG_QCONFIG" in
2015 minimal|small|medium|large|full)
2016 # these are a sequence of increasing functionality
2017 for c in minimal small medium large full; do
2018 QT_CONFIG="$QT_CONFIG $c-config"
2019 [ "$CFG_QCONFIG" = $c ] && break
2023 # not known to be sufficient for anything
2024 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2025 echo >&2 "Error: configuration file not found:"
2026 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2028 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2033 #-------------------------------------------------------------------------------
2034 # build tree initialization
2035 #-------------------------------------------------------------------------------
2037 # where to find which..
2038 unixtests="$relpath/config.tests/unix"
2039 mactests="$relpath/config.tests/mac"
2040 WHICH="$unixtests/which.test"
2042 PERL=`$WHICH perl 2>/dev/null`
2044 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2046 for e in gawk nawk awk; do
2047 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2054 PERL="/usr/bin/perl"
2055 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2059 ### skip this if the user just needs help...
2060 if [ "$OPT_HELP" != "yes" ]; then
2062 # is this a shadow build?
2063 if [ "$OPT_SHADOW" = "maybe" ]; then
2065 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2066 if [ -h "$outpath" ]; then
2067 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2073 if [ "$OPT_SHADOW" = "yes" ]; then
2074 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2075 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2076 echo >&2 "Cannot proceed."
2079 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2082 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2084 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2085 echo "Qt can be built in release mode with separate debug information, so"
2086 echo "-debug-and-release is not necessary anymore"
2090 if [ "$CFG_SILENT" = "yes" ]; then
2091 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2094 # if the source tree is different from the build tree,
2095 # symlink or copy part of the sources
2096 if [ "$OPT_SHADOW" = "yes" ]; then
2097 echo "Preparing build tree..."
2099 if [ -z "$PERL" ]; then
2101 echo "You need perl in your PATH to make a shadow build."
2102 echo "Cannot proceed."
2106 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2108 # make a syncqt script that can be used in the shadow
2109 rm -f "$outpath/bin/syncqt"
2110 if [ -x "$relpath/bin/syncqt" ]; then
2111 mkdir -p "$outpath/bin"
2112 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2113 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2114 chmod 755 "$outpath/bin/syncqt"
2117 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2118 rm -f "$outpath/bin/$i"
2119 if [ -x "$relpath/bin/$i" ]; then
2120 mkdir -p "$outpath/bin"
2121 echo "#!/bin/sh" >"$outpath/bin/$i"
2122 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2123 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2124 chmod 755 "$outpath/bin/$i"
2128 # symlink the mkspecs directory
2129 mkdir -p "$outpath/mkspecs"
2130 rm -rf "$outpath"/mkspecs/*
2131 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2132 rm -f "$outpath/mkspecs/default"
2136 rm -rf "$outpath/mkspecs/$1"
2137 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2138 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2141 # Special case for mkspecs/features directory.
2142 # To be able to place .prf files into a shadow build directory,
2143 # we're creating links for files only. The directory structure is reproduced.
2144 ShadowMkspecs features
2146 # The modules dir is special, too.
2147 ShadowMkspecs modules
2149 # symlink the doc directory
2150 rm -rf "$outpath/doc"
2151 ln -s "$relpath/doc" "$outpath/doc"
2154 # symlink fonts to be able to run application from build directory
2155 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2156 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2157 mkdir -p "${outpath}/lib"
2158 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2162 if [ "$OPT_FAST" = "auto" ]; then
2163 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2170 # find a make command
2171 if [ -z "$MAKE" ]; then
2173 for mk in gmake make; do
2174 if "$WHICH" $mk >/dev/null 2>&1; then
2179 if [ -z "$MAKE" ]; then
2180 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2181 echo >&2 "Cannot proceed."
2184 # export MAKE, we need it later in the config.tests
2190 #-------------------------------------------------------------------------------
2191 # auto-detect all that hasn't been specified in the arguments
2192 #-------------------------------------------------------------------------------
2194 if [ -z "$PLATFORM" ]; then
2196 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2198 if [ "$PLATFORM_QPA" = "yes" ]; then
2199 OSX_VERSION=`uname -r | cut -d. -f1`
2200 if [ "$OSX_VERSION" -ge 11 ]; then
2201 # We're on Lion or above. Check if we have a supported Clang version
2202 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2205 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2220 #PLATFORM=aix-g++-64
2222 #PLATFORM=aix-xlc-64
2224 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2234 # PLATFORM=dynix-g++
2240 PLATFORM=freebsd-g++
2242 - Also available for FreeBSD: freebsd-icc
2246 PLATFORM=openbsd-g++
2257 #PLATFORM=irix-cc-64
2259 - Also available for IRIX: irix-g++ irix-cc-64
2263 case "$UNAME_MACHINE" in
2265 #PLATFORM=hpuxi-acc-32
2266 PLATFORM=hpuxi-acc-64
2268 - Also available for HP-UXi: hpuxi-acc-32
2274 #PLATFORM=hpux-acc-64
2276 #PLATFORM=hpux-acc-o64
2278 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2287 - Also available for Tru64: tru64-g++
2291 case "$UNAME_MACHINE" in
2293 PLATFORM=linux-g++-64
2300 - Also available for Linux: linux-kcc linux-icc linux-cxx
2304 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2305 PLATFORM="solaris-g++"
2307 #PLATFORM=solaris-g++
2309 #PLATFORM=solaris-cc64
2312 - Also available for Solaris: solaris-g++ solaris-cc-64
2315 ReliantUNIX-*:*|SINIX-*:*)
2316 PLATFORM=reliant-cds
2317 #PLATFORM=reliant-cds-64
2319 - Also available for Reliant UNIX: reliant-cds-64
2329 #PLATFORM=unixware-g++
2330 PLATFORM=unixware-cc
2332 - Also available for OpenUNIX: unixware-g++
2336 #PLATFORM=unixware-g++
2337 PLATFORM=unixware-cc
2339 - Also available for UnixWare: unixware-g++
2346 - Also available for SCO OpenServer: sco-g++
2350 PLATFORM=unixware-g++
2353 PLATFORM=unsupported/qnx-g++
2356 if [ "$OPT_HELP" != "yes" ]; then
2358 for p in $PLATFORMS; do
2359 echo " $relconf $* -platform $p"
2362 echo " The build script does not currently recognize all" >&2
2363 echo " platforms supported by Qt." >&2
2364 echo " Rerun this script with a -platform option listed to" >&2
2365 echo " set the system/compiler combination you use." >&2
2372 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2374 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2376 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2377 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2379 if [ -d "$PLATFORM" ]; then
2380 QMAKESPEC="$PLATFORM"
2382 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2384 if [ -d "$XPLATFORM" ]; then
2385 XQMAKESPEC="$XPLATFORM"
2387 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2389 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2390 QT_CROSS_COMPILE=yes
2391 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2392 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2395 if [ "$BUILD_ON_MAC" = "yes" ]; then
2396 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2398 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2399 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2400 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2401 echo " built with 'macx-g++'" >&2
2407 # check specified platforms are supported
2408 if [ '!' -d "$QMAKESPEC" ]; then
2410 echo " The specified system/compiler is not supported:"
2414 echo " Please see the README file for a complete list."
2418 if [ '!' -d "$XQMAKESPEC" ]; then
2420 echo " The specified system/compiler is not supported:"
2424 echo " Please see the README file for a complete list."
2428 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2430 echo " The specified system/compiler port is not complete:"
2432 echo " $XQMAKESPEC/qplatformdefs.h"
2434 echo " Please contact qt-info@nokia.com."
2439 # now look at the configs and figure out what platform we are config'd for
2440 [ "$PLATFORM_QPA" != "yes" ] \
2441 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2443 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2445 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2446 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2447 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2448 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2449 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2453 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2454 case `basename "$XPLATFORM"` in
2457 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2459 echo "Please contact qt-info@nokia.com to upgrade your license to"
2460 echo "include this platform, or install the Qt Open Source Edition"
2461 echo "if you intend to develop free software."
2467 #-------------------------------------------------------------------------------
2468 # tests that don't need qmake (must be run before displaying help)
2469 #-------------------------------------------------------------------------------
2471 # detect build style
2472 if [ "$CFG_DEBUG" = "auto" ]; then
2473 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2474 CFG_DEBUG_RELEASE=yes
2476 elif [ "$CFG_DEV" = "yes" ]; then
2477 CFG_DEBUG_RELEASE=no
2480 CFG_DEBUG_RELEASE=no
2484 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2485 QT_CONFIG="$QT_CONFIG build_all"
2488 if [ -z "$PKG_CONFIG" ]; then
2489 # See if PKG_CONFIG is set in the mkspec:
2490 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2492 if [ -z "$PKG_CONFIG" ]; then
2493 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2496 # Work out if we can use pkg-config
2497 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2498 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2500 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2501 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2502 echo >&2 "environment!"
2504 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2506 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2507 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2508 echo >&2 "This is probably not what you want."
2510 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2512 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2513 echo >&2 "been set. This means your toolchain's .pc files must contain"
2514 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2515 echo >&2 "tests are failing, please check these files."
2520 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2521 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2522 echo >&2 "dependencies"
2528 if [ ! -n "$PKG_CONFIG" ]; then
2529 QT_CONFIG="$QT_CONFIG no-pkg-config"
2532 # pass on $CFG_SDK to the configure tests.
2533 if [ '!' -z "$CFG_SDK" ]; then
2534 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2537 # find the default framework value
2538 if [ "$BUILD_ON_MAC" = "yes" ]; then
2539 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2540 CFG_FRAMEWORK="$CFG_SHARED"
2541 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2543 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2551 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2553 TEST_COMPILER=$QMAKE_CONF_COMPILER
2554 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2555 if [ -z "$TEST_COMPILER" ]; then
2556 echo "ERROR: Cannot set the compiler for the configuration tests"
2562 if [ -n "$CFG_SYSROOT" ]; then
2563 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2564 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2565 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2567 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2571 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2573 # auto-detect precompiled header support
2574 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2575 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2582 #auto-detect DWARF2 on the mac
2583 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2584 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2591 # don't autodetect support for separate debug info on objcopy when
2592 # cross-compiling as lots of toolchains seems to have problems with this
2593 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2594 CFG_SEPARATE_DEBUG_INFO="no"
2597 # auto-detect support for separate debug info in objcopy
2598 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2599 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2600 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2601 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2602 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2603 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2604 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2605 CFG_SEPARATE_DEBUG_INFO=no
2609 # binutils on HP-UX is buggy; default to no.
2610 CFG_SEPARATE_DEBUG_INFO=no
2613 CFG_SEPARATE_DEBUG_INFO=yes
2619 # auto-detect -fvisibility support
2620 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2621 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2622 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2623 echo "-reduce-exports was requested but this compiler does not support it"
2624 echo "Re-run configure with -v for more information"
2627 CFG_REDUCE_EXPORTS=no
2629 CFG_REDUCE_EXPORTS=yes
2633 # detect the availability of the -Bsymbolic-functions linker optimization
2634 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2635 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2636 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2637 echo "-reduce-relocations was requested but this compiler does not support it"
2638 echo "Re-run configure with -v for more information"
2641 CFG_REDUCE_RELOCATIONS=no
2643 CFG_REDUCE_RELOCATIONS=yes
2647 # auto-detect GNU make support
2648 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2652 # find the default framework value
2653 if [ "$BUILD_ON_MAC" = "yes" ]; then
2654 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2655 CFG_FRAMEWORK="$CFG_SHARED"
2656 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2658 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2666 # x11 tests are done after qmake is built
2669 #setup the build parts
2670 if [ -z "$CFG_BUILD_PARTS" ]; then
2671 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2673 # don't build tools by default when cross-compiling
2674 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2675 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2678 for nobuild in $CFG_NOBUILD_PARTS; do
2679 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2681 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2683 # echo "WARNING: libs is a required part of the build."
2685 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2688 #-------------------------------------------------------------------------------
2689 # post process QT_INSTALL_* variables
2690 #-------------------------------------------------------------------------------
2692 if [ -z "$QT_INSTALL_PREFIX" ]; then
2693 if [ "$CFG_DEV" = "yes" ]; then
2694 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2696 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2699 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2701 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2702 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2703 if [ "$BUILD_ON_MAC" = "yes" ]; then
2704 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2707 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2710 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2712 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2713 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2714 if [ "$BUILD_ON_MAC" = "yes" ]; then
2715 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2720 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2723 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2725 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2726 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2727 if [ "$BUILD_ON_MAC" = "yes" ]; then
2728 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2729 QT_INSTALL_LIBS="/Libraries/Frameworks"
2733 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2735 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2737 if [ -z "$QT_INSTALL_BINS" ]; then #default
2738 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2739 if [ "$BUILD_ON_MAC" = "yes" ]; then
2740 QT_INSTALL_BINS="/Developer/Applications/Qt"
2743 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2745 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2747 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2748 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2749 if [ "$BUILD_ON_MAC" = "yes" ]; then
2750 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2753 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2755 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2757 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2758 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2759 if [ "$BUILD_ON_MAC" = "yes" ]; then
2760 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2763 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2765 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2767 if [ -z "$QT_INSTALL_DATA" ]; then #default
2768 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2770 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2772 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2773 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2775 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2777 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2778 if [ "$BUILD_ON_MAC" = "yes" ]; then
2779 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2781 QT_INSTALL_SETTINGS=/etc/xdg
2784 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2786 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2787 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2788 if [ "$BUILD_ON_MAC" = "yes" ]; then
2789 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2792 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2794 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2797 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2798 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2799 if [ "$BUILD_ON_MAC" = "yes" ]; then
2800 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2803 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2805 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2807 #------- host paths --------
2809 if [ -z "$QT_HOST_PREFIX" ]; then
2810 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2813 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2817 if [ -z "$QT_HOST_BINS" ]; then #default
2819 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2820 if [ "$BUILD_ON_MAC" = "yes" ]; then
2821 QT_HOST_BINS="/Developer/Applications/Qt"
2824 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2826 QT_HOST_BINS="$QT_INSTALL_BINS"
2829 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2831 if [ -z "$QT_HOST_DATA" ]; then #default
2833 QT_HOST_DATA="$QT_HOST_PREFIX"
2835 QT_HOST_DATA="$QT_INSTALL_DATA"
2838 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2841 #-------------------------------------------------------------------------------
2842 # help - interactive parts of the script _after_ this section please
2843 #-------------------------------------------------------------------------------
2845 # next, emit a usage message if something failed.
2846 if [ "$OPT_HELP" = "yes" ]; then
2847 [ "x$ERROR" = "xyes" ] && echo
2848 if [ "$CFG_NIS" = "no" ]; then
2855 if [ "$CFG_CUPS" = "no" ]; then
2862 if [ "$CFG_ICONV" = "no" ]; then
2869 if [ "$CFG_LARGEFILE" = "no" ]; then
2876 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
2883 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2891 if [ "$CFG_XCB" = "no" ]; then
2899 if [ "$CFG_EGLFS" = "no" ]; then
2907 if [ "$CFG_XINPUT2" = "no" ]; then
2916 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2917 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2918 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2919 [-release] [-debug] [-debug-and-release]
2920 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2921 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2922 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
2923 [-plugin-sql-<driver>] [-system-sqlite]
2924 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2925 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2926 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2927 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2928 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2929 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2930 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
2931 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2932 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2933 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2934 [-no-audio-backend] [-audio-backend]
2935 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
2936 [-no-optimized-qmake] [-optimized-qmake]
2937 [-no-openssl] [-openssl] [-openssl-linked]
2938 [-no-gtkstyle] [-gtkstyle]
2939 [-qt-pcre] [-system-pcre]
2940 [additional platform specific options (see below)]
2943 Installation options:
2945 -qpa ................ This will enable the QPA build.
2946 QPA is a window system agnostic implementation of Qt.
2948 These are optional, but you may specify install directories.
2950 -prefix <dir> ...... This will install everything relative to <dir>
2951 (default $QT_INSTALL_PREFIX)
2953 if [ "$PLATFORM_QPA" = "yes" ]; then
2956 -hostprefix [dir] .. Tools and libraries needed when developing
2957 applications are installed in [dir]. If [dir] is
2958 not given, the current build directory will be used.
2964 * -prefix-install .... Force a sandboxed "local" installation of
2965 Qt. This will install into
2966 $QT_INSTALL_PREFIX, if this option is
2967 disabled then some platforms will attempt a
2968 "system" install by placing default values to
2969 be placed in a system location other than
2972 You may use these to separate different parts of the install:
2974 -bindir <dir> ......... Executables will be installed to <dir>
2975 (default PREFIX/bin)
2976 -libdir <dir> ......... Libraries will be installed to <dir>
2977 (default PREFIX/lib)
2978 -docdir <dir> ......... Documentation will be installed to <dir>
2979 (default PREFIX/doc)
2980 -headerdir <dir> ...... Headers will be installed to <dir>
2981 (default PREFIX/include)
2982 -plugindir <dir> ...... Plugins will be installed to <dir>
2983 (default PREFIX/plugins)
2984 -importdir <dir> ...... Imports for QML will be installed to <dir>
2985 (default PREFIX/imports)
2986 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2988 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2989 (default PREFIX/translations)
2990 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2991 (default PREFIX/etc/settings)
2992 -examplesdir <dir> .... Examples will be installed to <dir>
2993 (default PREFIX/examples)
2994 -testsdir <dir> ....... Tests will be installed to <dir>
2995 (default PREFIX/tests)
2997 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3000 -hostbindir <dir> .. Host executables will be installed to <dir>
3001 (default HOSTPREFIX/bin)
3002 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
3003 (default HOSTPREFIX)
3010 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3011 that needs to be evaluated. If the evaluation succeeds, the feature is
3012 included. Here is a short explanation of each option:
3014 * -release ........... Compile and link Qt with debugging turned off.
3015 -debug ............. Compile and link Qt with debugging turned on.
3016 -debug-and-release . Compile and link two versions of Qt, with and without
3017 debugging turned on (Mac only).
3019 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3021 -opensource ........ Compile and link the Open-Source Edition of Qt.
3022 -commercial ........ Compile and link the Commercial Edition of Qt.
3025 * -shared ............ Create and use shared Qt libraries.
3026 -static ............ Create and use static Qt libraries.
3028 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3030 -fast .............. Configure Qt quickly by generating Makefiles only for
3031 library and subdirectory targets. All other Makefiles
3032 are created as wrappers, which will in turn run qmake.
3034 -no-largefile ...... Disables large file support.
3035 + -largefile ......... Enables Qt to access files larger than 4 GB.
3038 if [ "$PLATFORM_QPA" = "yes" ]; then
3045 if [ "$CFG_DBUS" = "no" ]; then
3054 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3055 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3057 -no-accessibility .. Do not compile Accessibility support.
3058 * -accessibility ..... Compile Accessibility support.
3060 $SHN -no-stl ............ Do not compile STL support.
3061 $SHY -stl ............... Compile STL support.
3063 -no-sql-<driver> ... Disable SQL <driver> entirely.
3064 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3066 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3069 Possible values for <driver>:
3070 [ $CFG_SQL_AVAILABLE ]
3072 -system-sqlite ..... Use sqlite from the operating system.
3074 -no-phonon-backend.. Do not build the platform phonon plugin.
3075 + -phonon-backend..... Build the platform phonon plugin.
3077 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3078 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3080 -no-declarative-debug ..... Do not build the declarative debugging support.
3081 + -declarative-debug ....... Build the declarative debugging support.
3083 -platform target ... The operating system and compiler you are building
3086 See the README file for a list of supported
3087 operating systems and compilers.
3090 if [ "${PLATFORM_QPA}" != "yes" ]; then
3092 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3093 raster - Software rasterizer
3094 opengl - Rendering via OpenGL, Experimental!
3095 openvg - Rendering via OpenVG, Experimental!
3102 -no-mmx ............ Do not compile with use of MMX instructions.
3103 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3104 -no-sse ............ Do not compile with use of SSE instructions.
3105 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3106 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3107 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3108 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3109 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3110 -no-avx ............ Do not compile with use of AVX instructions.
3111 -no-neon ........... Do not compile with use of NEON instructions.
3112 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3113 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3115 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3116 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3118 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3120 -D <string> ........ Add an explicit define to the preprocessor.
3121 -I <string> ........ Add an explicit include path.
3122 -L <string> ........ Add an explicit library path.
3124 -help, -h .......... Display this information.
3126 Third Party Libraries:
3128 -qt-zlib ........... Use the zlib bundled with Qt.
3129 + -system-zlib ....... Use zlib from the operating system.
3130 See http://www.gzip.org/zlib
3132 -no-gif ............ Do not compile GIF reading support.
3134 -no-libpng ......... Do not compile PNG support.
3135 -qt-libpng ......... Use the libpng bundled with Qt.
3136 + -system-libpng ..... Use libpng from the operating system.
3137 See http://www.libpng.org/pub/png
3139 -no-libjpeg ........ Do not compile JPEG support.
3140 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3141 + -system-libjpeg .... Use libjpeg from the operating system.
3142 See http://www.ijg.org
3144 -no-openssl ........ Do not compile support for OpenSSL.
3145 + -openssl ........... Enable run-time OpenSSL support.
3146 -openssl-linked .... Enabled linked OpenSSL support.
3148 -qt-pcre ........... Use the PCRE library bundled with Qt.
3149 + -system-pcre ....... Use the PCRE library from the operating system.
3153 -make <part> ....... Add part to the list of parts to be built at make time.
3154 ($QT_DEFAULT_BUILD_PARTS)
3155 -nomake <part> ..... Exclude part from the list of parts to be built.
3157 -R <string> ........ Add an explicit runtime library path to the Qt
3159 -l <string> ........ Add an explicit library.
3161 -no-rpath .......... Do not use the library install path as a runtime
3163 + -rpath ............. Link Qt libraries and executables using the library
3164 install path as a runtime library path. Equivalent
3165 to -R install_libpath
3167 -continue .......... Continue as far as possible if an error occurs.
3169 -verbose, -v ....... Print verbose information about each step of the
3172 -silent ............ Reduce the build output so that warnings and errors
3173 can be seen more easily.
3175 * -no-optimized-qmake ... Do not build qmake optimized.
3176 -optimized-qmake ...... Build qmake optimized.
3178 -no-gui ............ Don't build the Qt GUI library
3180 $NSN -no-nis ............ Do not compile NIS support.
3181 $NSY -nis ............... Compile NIS support.
3183 $CUN -no-cups ........... Do not compile CUPS support.
3184 $CUY -cups .............. Compile CUPS support.
3185 Requires cups/cups.h and libcups.so.2.
3187 $CIN -no-iconv .......... Do not compile support for iconv(3).
3188 $CIY -iconv ............. Compile support for iconv(3).
3190 $PHN -no-pch ............ Do not use precompiled header support.
3191 $PHY -pch ............... Use precompiled header support.
3193 $DBN -no-dbus ........... Do not compile the QtDBus module.
3194 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3195 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3197 -reduce-relocations ..... Reduce relocations in the libraries through extra
3198 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3199 experimental; needs GNU ld >= 2.18).
3201 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3205 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3206 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3213 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3221 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3225 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3226 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3228 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3229 $XCBY -xcb ............... Compile Xcb support.
3231 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3232 $EGLFSY -eglfs ............. Compile EGLFS support.
3238 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3242 $X2N -no-xinput2......... Do not compile XInput2 support.
3243 $X2Y -xinput2............ Compile XInput2 support.
3249 if [ "$PLATFORM_X11" = "yes" ]; then
3250 if [ "$CFG_SM" = "no" ]; then
3257 if [ "$CFG_XSHAPE" = "no" ]; then
3264 if [ "$CFG_XVIDEO" = "no" ]; then
3271 if [ "$CFG_XINERAMA" = "no" ]; then
3278 if [ "$CFG_FONTCONFIG" = "no" ]; then
3285 if [ "$CFG_XCURSOR" = "no" ]; then
3292 if [ "$CFG_XFIXES" = "no" ]; then
3299 if [ "$CFG_XRANDR" = "no" ]; then
3306 if [ "$CFG_XRENDER" = "no" ]; then
3313 if [ "$CFG_MITSHM" = "no" ]; then
3320 if [ "$CFG_XINPUT" = "no" ]; then
3327 if [ "$CFG_XKB" = "no" ]; then
3334 if [ "$CFG_IM" = "no" ]; then
3345 -no-gtkstyle ....... Do not build the GTK theme integration.
3346 + -gtkstyle .......... Build the GTK theme integration.
3348 * -no-nas-sound ...... Do not compile in NAS sound support.
3349 -system-nas-sound .. Use NAS libaudio from the operating system.
3350 See http://radscan.com/nas.html
3352 -no-opengl ......... Do not support OpenGL.
3353 + -opengl <api> ...... Enable OpenGL support.
3354 With no parameter, this will auto-detect the "best"
3355 OpenGL API to use. If desktop OpenGL is available, it
3356 will be used. Use desktop or es2 for <api>
3357 to force the use of the Desktop OpenGL or
3358 OpenGL ES 2 APIs instead.
3360 -no-openvg ........ Do not support OpenVG.
3361 + -openvg ........... Enable OpenVG support.
3362 Requires EGL support, typically supplied by an OpenGL
3363 or other graphics implementation.
3365 $SMN -no-sm ............. Do not support X Session Management.
3366 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3368 $SHN -no-xshape ......... Do not compile XShape support.
3369 $SHY -xshape ............ Compile XShape support.
3370 Requires X11/extensions/shape.h.
3372 $XVN -no-xvideo ......... Do not compile XVideo support.
3373 $XVY -xvideo ............ Compile XVideo support.
3374 Requires X11/extensions/Xv.h & Xvlib.h.
3376 $SHN -no-xsync .......... Do not compile XSync support.
3377 $SHY -xsync ............. Compile XSync support.
3378 Requires X11/extensions/sync.h.
3380 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3381 $XAY -xinerama .......... Compile Xinerama support.
3382 Requires X11/extensions/Xinerama.h and libXinerama.
3383 By default, Xinerama support will be compiled if
3384 available and the shared libraries are dynamically
3387 $XCN -no-xcursor ........ Do not compile Xcursor support.
3388 $XCY -xcursor ........... Compile Xcursor support.
3389 Requires X11/Xcursor/Xcursor.h and libXcursor.
3390 By default, Xcursor support will be compiled if
3391 available and the shared libraries are dynamically
3394 $XFN -no-xfixes ......... Do not compile Xfixes support.
3395 $XFY -xfixes ............ Compile Xfixes support.
3396 Requires X11/extensions/Xfixes.h and libXfixes.
3397 By default, Xfixes support will be compiled if
3398 available and the shared libraries are dynamically
3401 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3402 $XZY -xrandr ............ Compile Xrandr support.
3403 Requires X11/extensions/Xrandr.h and libXrandr.
3405 $XRN -no-xrender ........ Do not compile Xrender support.
3406 $XRY -xrender ........... Compile Xrender support.
3407 Requires X11/extensions/Xrender.h and libXrender.
3409 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3410 $XMY -mitshm ............ Compile MIT-SHM support.
3411 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3413 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3414 $FCGY -fontconfig ........ Compile FontConfig support.
3415 Requires fontconfig/fontconfig.h, libfontconfig,
3416 freetype.h and libfreetype.
3418 $XIN -no-xinput ......... Do not compile Xinput support.
3419 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3420 which requires IRIX with wacom.h and libXi or
3421 XFree86 with X11/extensions/XInput.h and libXi.
3423 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3424 $XKY -xkb ............... Compile XKB support.
3429 if [ "$BUILD_ON_MAC" = "yes" ]; then
3434 -Fstring ........... Add an explicit framework path.
3435 -fw string ......... Add an explicit framework.
3437 * -framework ......... Build Qt as a series of frameworks and
3438 link tools against those frameworks.
3439 -no-framework ...... Do not build Qt as a series of frameworks.
3441 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3442 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3444 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3445 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3447 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3448 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3449 QT_ENABLE_HARFBUZZ environment variable.
3454 if [ "$PLATFORM_QPA" = "yes" ]; then
3460 if [ "$PLATFORM_QPA" = "yes" ]; then
3463 -xplatform target ... The target platform when cross-compiling.
3465 -no-feature-<feature> Do not compile in <feature>.
3466 -feature-<feature> .. Compile in <feature>. The available features
3467 are described in src/corelib/global/qfeatures.txt
3469 -no-freetype ........ Do not compile in Freetype2 support.
3470 -qt-freetype ........ Use the libfreetype bundled with Qt.
3471 * -system-freetype .... Use libfreetype from the operating system.
3472 See http://www.freetype.org/
3474 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3475 default ($CFG_QCONFIG).
3477 -no-opengl .......... Do not support OpenGL.
3478 -opengl <api> ....... Enable OpenGL ES support
3479 With no parameter, this will attempt to auto-detect
3480 OpenGL ES 2, or regular desktop OpenGL.
3481 Use es2 for <api> to override auto-detection.
3485 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3486 if [ "$CFG_GLIB" = "no" ]; then
3494 $GBN -no-glib ........... Do not compile Glib support.
3495 $GBY -glib .............. Compile Glib support.
3500 [ "x$ERROR" = "xyes" ] && exit 1
3505 # -----------------------------------------------------------------------------
3506 # LICENSING, INTERACTIVE PART
3507 # -----------------------------------------------------------------------------
3509 if [ "$PLATFORM_QPA" = "yes" ]; then
3510 Platform="Qt Lighthouse"
3511 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3512 Platform="Qt for Windows"
3513 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3515 Platform="Qt for Linux/X11"
3519 echo "This is the $Platform ${EditionString} Edition."
3522 if [ "$Edition" = "OpenSource" ]; then
3524 echo "You are licensed to use this software under the terms of"
3525 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3526 if [ -f "$relpath/LICENSE.GPL3" ]; then
3527 echo "You are also licensed to use this software under the terms of"
3528 echo "the GNU General Public License (GPL) versions 3."
3534 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3535 echo "You have already accepted the terms of the $LicenseType license."
3538 if [ -f "$relpath/LICENSE.GPL3" ]; then
3539 echo "Type '3' to view the GNU General Public License version 3."
3541 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3542 echo "Type 'yes' to accept this license offer."
3543 echo "Type 'no' to decline this license offer."
3545 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3549 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3551 elif [ "$acceptance" = "no" ]; then
3552 echo "You are not licensed to use this software."
3555 elif [ "$acceptance" = "3" ]; then
3556 more "$relpath/LICENSE.GPL3"
3557 elif [ "$acceptance" = "L" ]; then
3558 more "$relpath/LICENSE.LGPL"
3561 elif [ "$Edition" = "Preview" ]; then
3562 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3565 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3566 echo "You have already accepted the terms of the $LicenseType license."
3569 echo "You are licensed to use this software under the terms of"
3570 echo "the $TheLicense"
3572 echo "Type '?' to read the Preview License."
3573 echo "Type 'yes' to accept this license offer."
3574 echo "Type 'no' to decline this license offer."
3576 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3580 if [ "$acceptance" = "yes" ]; then
3582 elif [ "$acceptance" = "no" ] ;then
3583 echo "You are not licensed to use this software."
3586 elif [ "$acceptance" = "?" ]; then
3587 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3590 elif [ "$Edition" != "OpenSource" ]; then
3591 if [ -n "$ExpiryDate" ]; then
3592 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3593 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3594 Today=`date +%Y%m%d`
3595 if [ "$Today" -gt "$ExpiryDate" ]; then
3596 case "$LicenseType" in
3597 Commercial|Academic|Educational)
3598 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3600 echo "NOTICE NOTICE NOTICE NOTICE"
3602 echo " Your support and upgrade period has expired."
3604 echo " You are no longer licensed to use this version of Qt."
3605 echo " Please contact qt-info@nokia.com to renew your support"
3606 echo " and upgrades for this license."
3608 echo "NOTICE NOTICE NOTICE NOTICE"
3613 echo "WARNING WARNING WARNING WARNING"
3615 echo " Your support and upgrade period has expired."
3617 echo " You may continue to use your last licensed release"
3618 echo " of Qt under the terms of your existing license"
3619 echo " agreement. But you are not entitled to technical"
3620 echo " support, nor are you entitled to use any more recent"
3621 echo " Qt releases."
3623 echo " Please contact qt-info@nokia.com to renew your"
3624 echo " support and upgrades for this license."
3626 echo "WARNING WARNING WARNING WARNING"
3633 echo "NOTICE NOTICE NOTICE NOTICE"
3635 echo " Your Evaluation license has expired."
3637 echo " You are no longer licensed to use this software. Please"
3638 echo " contact qt-info@nokia.com to purchase license, or install"
3639 echo " the Qt Open Source Edition if you intend to develop free"
3642 echo "NOTICE NOTICE NOTICE NOTICE"
3649 TheLicense=`head -n 1 "$outpath/LICENSE"`
3651 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3652 echo "You have already accepted the terms of the $TheLicense."
3655 echo "You are licensed to use this software under the terms of"
3656 echo "the $TheLicense."
3658 echo "Type '?' to view the $TheLicense."
3659 echo "Type 'yes' to accept this license offer."
3660 echo "Type 'no' to decline this license offer."
3662 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3666 if [ "$acceptance" = "yes" ]; then
3668 elif [ "$acceptance" = "no" ]; then
3669 echo "You are not licensed to use this software."
3672 else [ "$acceptance" = "?" ]
3673 more "$outpath/LICENSE"
3678 # this should be moved somewhere else
3681 AIX_VERSION=`uname -v`
3682 if [ "$AIX_VERSION" -lt "5" ]; then
3683 QMakeVar add QMAKE_LIBS_X11 -lbind
3690 #-------------------------------------------------------------------------------
3691 # generate qconfig.cpp
3692 #-------------------------------------------------------------------------------
3693 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3695 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3697 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3698 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3700 /* Installation date */
3701 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3703 /* Installation Info */
3704 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3705 "qt_prfxpath=$QT_INSTALL_PREFIX",
3706 "qt_docspath=$QT_INSTALL_DOCS",
3707 "qt_hdrspath=$QT_INSTALL_HEADERS",
3708 "qt_libspath=$QT_INSTALL_LIBS",
3709 "qt_binspath=$QT_INSTALL_BINS",
3710 "qt_plugpath=$QT_INSTALL_PLUGINS",
3711 "qt_impspath=$QT_INSTALL_IMPORTS",
3712 "qt_datapath=$QT_INSTALL_DATA",
3713 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3714 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3715 "qt_tstspath=$QT_INSTALL_TESTS",
3716 #ifdef QT_BUILD_QMAKE
3717 "qt_ssrtpath=$CFG_SYSROOT",
3718 "qt_hpfxpath=$QT_HOST_PREFIX",
3719 "qt_hbinpath=$QT_HOST_BINS",
3720 "qt_hdatpath=$QT_HOST_DATA",
3723 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3726 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3728 /* strlen( "qt_lcnsxxxx" ) == 12 */
3729 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3730 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3732 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3735 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3736 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3737 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3739 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3740 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3741 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3744 # -----------------------------------------------------------------------------
3745 if [ "$LicenseType" = "Evaluation" ]; then
3746 EVALKEY=qt_qevalkey=$LicenseKeyExt
3747 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3748 EVALKEY=qt_qevalkey=
3751 if [ -n "$EVALKEY" ]; then
3752 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3753 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3754 /* Evaluation license key */
3755 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3757 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3761 # -----------------------------------------------------------------------------
3763 # -----------------------------------------------------------------------------
3766 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3768 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3769 if [ "$OPT_SHADOW" = "yes" ]; then
3770 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3771 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3772 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3776 # $1: input variable name (awk regexp)
3777 # $2: optional output variable name
3778 # $3: optional value transformation (sed command)
3779 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3780 # is where the resulting variable is written to
3781 setBootstrapVariable()
3783 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3787 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3788 echo "Creating qmake. Please wait..."
3791 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3792 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3793 if [ -f "$QCONFIG_H" ]; then
3794 OLD_QCONFIG_H=$QCONFIG_H
3795 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3798 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3799 # when building qmake, we use #defines for the install paths,
3800 # however they are real functions in the library
3801 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3802 mkdir -p "$outpath/src/corelib/global"
3803 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3804 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3807 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3809 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3810 rm -rf mkspecs/default
3811 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3812 mkdir -p "$outpath/qmake" || exit
3814 for mkfile in GNUmakefile Makefile; do
3817 in_mkfile="${mkfile}.in"
3818 if [ "$mkfile" = "Makefile" ]; then
3819 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3820 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3822 in_mkfile="${mkfile}.unix"
3824 in_mkfile="$relpath/qmake/$in_mkfile"
3825 mkfile="$outpath/qmake/$mkfile"
3826 if [ -f "$mkfile" ]; then
3827 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3830 [ -f "$in_mkfile" ] || continue
3832 echo "########################################################################" > "$mkfile"
3833 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3834 echo "########################################################################" >> "$mkfile"
3837 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3838 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3839 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3841 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3842 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3845 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3846 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3847 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3848 setBootstrapVariable QMAKE_CFLAGS
3849 setBootstrapVariable QMAKE_CXXFLAGS
3850 setBootstrapVariable QMAKE_LFLAGS
3852 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3853 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3854 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3856 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3857 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3858 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3859 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3860 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3861 elif [ "$CFG_DEBUG" = "yes" ]; then
3862 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3863 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3864 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3865 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3868 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3869 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3870 for rpath in $RPATH_FLAGS; do
3871 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3874 if [ "$BUILD_ON_MAC" = "yes" ]; then
3875 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3876 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3877 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3878 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3879 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3880 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3881 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3882 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3883 if [ '!' -z "$CFG_SDK" ]; then
3884 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3885 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3886 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3887 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3888 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3891 if [ '!' -z "$D_FLAGS" ]; then
3892 for DEF in $D_FLAGS; do
3893 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3896 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3897 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3898 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3899 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3901 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3902 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3903 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3904 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3905 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3906 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3907 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3908 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3909 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3910 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3912 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3913 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3914 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3915 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3920 QMAKE_BUILD_ERROR=no
3921 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3922 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3923 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3924 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3927 #-------------------------------------------------------------------------------
3928 # tests that need qmake
3929 #-------------------------------------------------------------------------------
3931 #-------------------------------------------------------------------------------
3932 # determine the target and host architectures
3933 #-------------------------------------------------------------------------------
3935 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3936 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 "^$"`
3937 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3938 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3939 # Do the same test again, using the host compiler
3940 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 "^$"`
3941 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3943 # not cross compiling, host == target
3944 CFG_HOST_ARCH="$CFG_ARCH"
3947 if [ "$OPT_VERBOSE" = "yes" ]; then
3948 echo "System architecture: '$CFG_ARCH'"
3949 if [ "$PLATFORM_QPA" = "yes" ]; then
3950 echo "Host architecture: '$CFG_HOST_ARCH'"
3954 #-------------------------------------------------------------------------------
3955 # functionality tests
3956 #-------------------------------------------------------------------------------
3958 # detect availability of float math.h functions
3959 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3960 CFG_USE_FLOATMATH=yes
3962 CFG_USE_FLOATMATH=no
3965 # detect mmx support
3966 if [ "${CFG_MMX}" = "auto" ]; then
3967 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
3974 # detect 3dnow support
3975 if [ "${CFG_3DNOW}" = "auto" ]; then
3976 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
3983 # detect sse support
3984 if [ "${CFG_SSE}" = "auto" ]; then
3985 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
3992 # detect sse2 support
3993 if [ "${CFG_SSE2}" = "auto" ]; then
3994 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4001 # detect sse3 support
4002 if [ "${CFG_SSE3}" = "auto" ]; then
4003 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4010 # detect ssse3 support
4011 if [ "${CFG_SSSE3}" = "auto" ]; then
4012 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4019 # detect sse4.1 support
4020 if [ "${CFG_SSE4_1}" = "auto" ]; then
4021 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
4028 # detect sse4.2 support
4029 if [ "${CFG_SSE4_2}" = "auto" ]; then
4030 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
4037 # detect avx support
4038 if [ "${CFG_AVX}" = "auto" ]; then
4039 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4046 # check iWMMXt support
4047 if [ "$CFG_IWMMXT" = "yes" ]; then
4048 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4049 if [ $? != "0" ]; then
4050 echo "The iWMMXt functionality test failed!"
4051 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4056 # detect neon support
4057 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4058 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
4063 elif [ "$CFG_ARCH" != "arm" ]; then
4067 # detect mips_dsp support
4068 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
4074 # detect mips_dspr2 support
4075 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
4081 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4084 if [ "$CFG_ZLIB" = "no" ]; then
4085 # Note: Qt no longer support builds without zlib
4086 # So we force a "no" to be "auto" here.
4087 # If you REALLY really need no zlib support, you can still disable
4088 # it by doing the following:
4089 # add "no-zlib" to mkspecs/qconfig.pri
4090 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4092 # There's no guarantee that Qt will build under those conditions
4097 if [ "$CFG_ZLIB" = "auto" ]; then
4098 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
4105 if [ "$CFG_LARGEFILE" = "auto" ]; then
4106 #Large files should be enabled for all Linux systems
4110 if [ "$CFG_GUI" = "no" ]; then
4111 QPA_PLATFORM_GUARD=no
4114 # detect how jpeg should be built
4115 if [ "$CFG_JPEG" = "auto" ]; then
4116 if [ "$CFG_SHARED" = "yes" ]; then
4123 if [ "$CFG_LIBJPEG" = "auto" ]; then
4124 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
4131 # detect how gif should be built
4132 if [ "$CFG_GIF" = "auto" ]; then
4133 if [ "$CFG_SHARED" = "yes" ]; then
4141 if [ "$CFG_LIBPNG" = "auto" ]; then
4142 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
4149 # detect accessibility
4150 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4151 CFG_ACCESSIBILITY=yes
4154 if [ "$CFG_EGLFS" = "yes" ]; then
4155 if [ "$CFG_EGL" = "no" ]; then
4156 echo "The EGLFS plugin requires EGL support and cannot be built"
4162 # auto-detect SQL-modules support
4163 for _SQLDR in $CFG_SQL_AVAILABLE; do
4166 if [ "$CFG_SQL_mysql" != "no" ]; then
4167 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4168 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4169 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4170 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4171 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4172 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4173 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4175 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4176 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4177 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4178 echo " You need MySql 4 or higher."
4179 echo " If you believe this message is in error you may use the continue"
4180 echo " switch (-continue) to $0 to continue."
4185 QT_LFLAGS_MYSQL_R=""
4189 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
4190 QMakeVar add CONFIG use_libmysqlclient_r
4191 if [ "$CFG_SQL_mysql" = "auto" ]; then
4192 CFG_SQL_mysql=plugin
4194 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4195 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
4196 if [ "$CFG_SQL_mysql" = "auto" ]; then
4197 CFG_SQL_mysql=plugin
4200 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4201 echo "MySQL support cannot be enabled due to functionality tests!"
4202 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4203 echo " If you believe this message is in error you may use the continue"
4204 echo " switch (-continue) to $0 to continue."
4209 QT_LFLAGS_MYSQL_R=""
4217 if [ "$CFG_SQL_psql" != "no" ]; then
4218 # Be careful not to use native pg_config when cross building.
4219 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4220 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4221 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4223 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4224 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4225 # But, respect PSQL_LIBS if set
4226 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4227 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
4228 if [ "$CFG_SQL_psql" = "auto" ]; then
4232 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4233 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4234 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4235 echo " If you believe this message is in error you may use the continue"
4236 echo " switch (-continue) to $0 to continue."
4247 if [ "$CFG_SQL_odbc" != "no" ]; then
4248 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
4249 if [ "$CFG_SQL_odbc" = "auto" ]; then
4253 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
4254 QT_LFLAGS_ODBC="-liodbc"
4255 if [ "$CFG_SQL_odbc" = "auto" ]; then
4259 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4260 echo "ODBC support cannot be enabled due to functionality tests!"
4261 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4262 echo " If you believe this message is in error you may use the continue"
4263 echo " switch (-continue) to $0 to continue."
4273 if [ "$CFG_SQL_oci" != "no" ]; then
4274 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
4275 if [ "$CFG_SQL_oci" = "auto" ]; then
4279 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4280 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4281 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4282 echo " If you believe this message is in error you may use the continue"
4283 echo " switch (-continue) to $0 to continue."
4292 if [ "$CFG_SQL_tds" != "no" ]; then
4293 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4294 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4295 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
4296 if [ "$CFG_SQL_tds" = "auto" ]; then
4300 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4301 echo "TDS support cannot be enabled due to functionality tests!"
4302 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4303 echo " If you believe this message is in error you may use the continue"
4304 echo " switch (-continue) to $0 to continue."
4313 if [ "$CFG_SQL_db2" != "no" ]; then
4314 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
4315 if [ "$CFG_SQL_db2" = "auto" ]; then
4319 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4320 echo "ODBC support cannot be enabled due to functionality tests!"
4321 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4322 echo " If you believe this message is in error you may use the continue"
4323 echo " switch (-continue) to $0 to continue."
4332 if [ "$CFG_SQL_ibase" != "no" ]; then
4333 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
4334 if [ "$CFG_SQL_ibase" = "auto" ]; then
4335 CFG_SQL_ibase=plugin
4338 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4339 echo "InterBase support cannot be enabled due to functionality tests!"
4340 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4341 echo " If you believe this message is in error you may use the continue"
4342 echo " switch (-continue) to $0 to continue."
4351 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4352 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
4353 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4354 CFG_SQL_sqlite2=plugin
4357 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4358 echo "SQLite2 support cannot be enabled due to functionality tests!"
4359 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4360 echo " If you believe this message is in error you may use the continue"
4361 echo " switch (-continue) to $0 to continue."
4370 if [ "$CFG_SQL_sqlite" != "no" ]; then
4371 SQLITE_AUTODETECT_FAILED="no"
4372 if [ "$CFG_SQLITE" = "system" ]; then
4373 if [ -n "$PKG_CONFIG" ]; then
4374 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4375 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4377 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
4378 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4379 CFG_SQL_sqlite=plugin
4381 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4383 SQLITE_AUTODETECT_FAILED="yes"
4386 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4387 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4388 CFG_SQL_sqlite=plugin
4391 SQLITE_AUTODETECT_FAILED="yes"
4395 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4396 echo "SQLite support cannot be enabled due to functionality tests!"
4397 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4398 echo " If you believe this message is in error you may use the continue"
4399 echo " switch (-continue) to $0 to continue."
4405 if [ "$OPT_VERBOSE" = "yes" ]; then
4406 echo "unknown SQL driver: $_SQLDR"
4412 # auto-detect NIS support
4413 if [ "$CFG_NIS" != "no" ]; then
4414 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
4417 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4418 echo "NIS support cannot be enabled due to functionality tests!"
4419 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4420 echo " If you believe this message is in error you may use the continue"
4421 echo " switch (-continue) to $0 to continue."
4429 # auto-detect CUPS support
4430 if [ "$CFG_CUPS" != "no" ]; then
4431 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
4434 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4435 echo "Cups support cannot be enabled due to functionality tests!"
4436 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4437 echo " If you believe this message is in error you may use the continue"
4438 echo " switch (-continue) to $0 to continue."
4446 # auto-detect iconv(3) support
4447 if [ "$CFG_ICONV" != "no" ]; then
4448 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4450 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
4452 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
4454 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
4457 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4458 echo "Iconv support cannot be enabled due to functionality tests!"
4459 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4460 echo " If you believe this message is in error you may use the continue"
4461 echo " switch (-continue) to $0 to continue."
4469 # auto-detect libdbus-1 support
4470 if [ "$CFG_DBUS" != "no" ]; then
4471 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4472 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4473 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4475 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
4476 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4477 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4478 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4480 if [ "$CFG_DBUS" = "auto" ]; then
4482 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4483 # CFG_DBUS is "yes" or "linked" here
4485 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4486 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4487 echo " If you believe this message is in error you may use the continue"
4488 echo " switch (-continue) to $0 to continue."
4495 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4497 # auto-detect Glib support
4498 if [ "$CFG_GLIB" != "no" ]; then
4499 if [ -n "$PKG_CONFIG" ]; then
4500 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4501 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4503 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
4505 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4506 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4508 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4509 echo "Glib support cannot be enabled due to functionality tests!"
4510 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4511 echo " If you believe this message is in error you may use the continue"
4512 echo " switch (-continue) to $0 to continue."
4521 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4522 if [ -n "$PKG_CONFIG" ]; then
4523 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4524 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4526 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
4528 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4529 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4531 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4532 echo "Gstreamer support cannot be enabled due to functionality tests!"
4533 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4534 echo " If you believe this message is in error you may use the continue"
4535 echo " switch (-continue) to $0 to continue."
4541 elif [ "$CFG_GLIB" = "no" ]; then
4545 # auto-detect libicu support
4546 if [ "$CFG_ICU" != "no" ]; then
4547 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4548 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4550 if [ "$CFG_ICU" = "auto" ]; then
4552 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4555 echo "The ICU library support cannot be enabled."
4556 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4557 echo " If you believe this message is in error you may use the continue"
4558 echo " switch (-continue) to $0 to continue."
4564 # Auto-detect PulseAudio support
4565 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4566 if [ -n "$PKG_CONFIG" ]; then
4567 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4568 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4570 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
4572 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4573 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4575 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4576 echo "PulseAudio support cannot be enabled due to functionality tests!"
4577 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4578 echo " If you believe this message is in error you may use the continue"
4579 echo " switch (-continue) to $0 to continue."
4589 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4590 x11tests="$relpath/config.tests/x11"
4593 # work around broken X11 headers when using GCC 2.95 or later
4595 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4596 if [ $NOTYPE = "yes" ]; then
4597 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4598 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4601 # Check we actually have X11 :-)
4602 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4603 if [ $? != "0" ]; then
4604 echo "Basic XLib functionality test failed!"
4605 echo " You might need to modify the include and library search paths by editing"
4606 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4612 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4613 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4614 if [ "$CFG_GUI" = "no" ]; then
4615 if [ "$CFG_OPENGL" = "auto" ]; then
4618 if [ "$CFG_OPENGL" != "no" ]; then
4619 echo "OpenGL enabled, but GUI disabled."
4620 echo " You might need to either enable the GUI or disable OpenGL"
4624 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4625 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
4627 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
4630 if [ "$CFG_OPENGL" = "yes" ]; then
4631 echo "All the OpenGL functionality tests failed!"
4632 echo " You might need to modify the include and library search paths by editing"
4633 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4634 echo " ${XQMAKESPEC}."
4641 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4642 if [ "$CFG_OPENGL" = "desktop" ]; then
4643 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4644 if [ $? != "0" ]; then
4645 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4652 elif [ "$CFG_OPENGL" = "es2" ]; then
4654 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4655 if [ $? != "0" ]; then
4656 echo "The OpenGL ES 2.0 functionality test failed!"
4657 echo " You might need to modify the include and library search paths by editing"
4658 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4659 echo " ${XQMAKESPEC}."
4662 elif [ "$CFG_OPENGL" = "desktop" ]; then
4663 # Desktop OpenGL support
4664 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4665 if [ $? != "0" ]; then
4666 echo "The OpenGL functionality test failed!"
4667 echo " You might need to modify the include and library search paths by editing"
4668 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4669 echo " ${XQMAKESPEC}."
4674 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4675 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4676 if [ $? != "0" ]; then
4677 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4684 fi # X11/MINGW OpenGL
4687 if [ "$PLATFORM_X11" = "yes" ]; then
4688 # auto-detect Xcursor support
4689 if [ "$CFG_XCURSOR" != "no" ]; then
4690 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
4691 if [ "$CFG_XCURSOR" != "runtime" ]; then
4695 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4696 echo "Xcursor support cannot be enabled due to functionality tests!"
4697 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4698 echo " If you believe this message is in error you may use the continue"
4699 echo " switch (-continue) to $0 to continue."
4707 # auto-detect Xfixes support
4708 if [ "$CFG_XFIXES" != "no" ]; then
4709 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4710 if [ "$CFG_XFIXES" != "runtime" ]; then
4714 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4715 echo "Xfixes 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 Xrandr support (resize and rotate extension)
4727 if [ "$CFG_XRANDR" != "no" ]; then
4728 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
4729 if [ "$CFG_XRANDR" != "runtime" ]; then
4733 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4734 echo "Xrandr support cannot be enabled due to functionality tests!"
4735 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4736 echo " If you believe this message is in error you may use the continue"
4737 echo " switch (-continue) to $0 to continue."
4745 # auto-detect Xrender support
4746 if [ "$CFG_XRENDER" != "no" ]; then
4747 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
4750 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4751 echo "Xrender support cannot be enabled due to functionality tests!"
4752 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4753 echo " If you believe this message is in error you may use the continue"
4754 echo " switch (-continue) to $0 to continue."
4762 # auto-detect MIT-SHM support
4763 if [ "$CFG_MITSHM" != "no" ]; then
4764 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
4767 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4768 echo "MITSHM support cannot be enabled due to functionality tests!"
4769 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4770 echo " If you believe this message is in error you may use the continue"
4771 echo " switch (-continue) to $0 to continue."
4779 # auto-detect Session Management support
4780 if [ "$CFG_SM" = "auto" ]; then
4781 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
4784 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4785 echo "Session Management support cannot be enabled due to functionality tests!"
4786 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4787 echo " If you believe this message is in error you may use the continue"
4788 echo " switch (-continue) to $0 to continue."
4796 # auto-detect SHAPE support
4797 if [ "$CFG_XSHAPE" != "no" ]; then
4798 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
4801 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4802 echo "XShape support cannot be enabled due to functionality tests!"
4803 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4804 echo " If you believe this message is in error you may use the continue"
4805 echo " switch (-continue) to $0 to continue."
4813 # auto-detect XVideo support
4814 if [ "$CFG_XVIDEO" != "no" ]; then
4815 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
4818 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4819 echo "XVideo support cannot be enabled due to functionality tests!"
4820 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4821 echo " If you believe this message is in error you may use the continue"
4822 echo " switch (-continue) to $0 to continue."
4830 # auto-detect XSync support
4831 if [ "$CFG_XSYNC" != "no" ]; then
4832 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
4835 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4836 echo "XSync support cannot be enabled due to functionality tests!"
4837 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4838 echo " If you believe this message is in error you may use the continue"
4839 echo " switch (-continue) to $0 to continue."
4847 # auto-detect Xinerama support
4848 if [ "$CFG_XINERAMA" != "no" ]; then
4849 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
4850 if [ "$CFG_XINERAMA" != "runtime" ]; then
4854 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4855 echo "Xinerama support cannot be enabled due to functionality tests!"
4856 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4857 echo " If you believe this message is in error you may use the continue"
4858 echo " switch (-continue) to $0 to continue."
4866 # auto-detect Xinput support
4867 if [ "$CFG_XINPUT" != "no" ]; then
4868 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
4869 if [ "$CFG_XINPUT" != "runtime" ]; then
4873 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4874 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4875 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4876 echo " If you believe this message is in error you may use the continue"
4877 echo " switch (-continue) to $0 to continue."
4885 # auto-detect XKB support
4886 if [ "$CFG_XKB" != "no" ]; then
4887 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
4890 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4891 echo "XKB support cannot be enabled due to functionality tests!"
4892 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4893 echo " If you believe this message is in error you may use the continue"
4894 echo " switch (-continue) to $0 to continue."
4902 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4903 if [ -n "$PKG_CONFIG" ]; then
4904 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4905 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4907 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4909 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4910 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4912 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4913 echo "Gtk theme support cannot be enabled due to functionality tests!"
4914 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4915 echo " If you believe this message is in error you may use the continue"
4916 echo " switch (-continue) to $0 to continue."
4922 elif [ "$CFG_GLIB" = "no" ]; then
4927 # auto-detect FontConfig support
4928 if [ "$CFG_FONTCONFIG" != "no" ]; then
4929 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4930 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4931 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4933 QT_CFLAGS_FONTCONFIG=
4934 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4936 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
4938 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4939 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4940 CFG_LIBFREETYPE=system
4942 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4943 echo "FontConfig support cannot be enabled due to functionality tests!"
4944 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4945 echo " If you believe this message is in error you may use the continue"
4946 echo " switch (-continue) to $0 to continue."
4955 if [ "$BUILD_ON_MAC" = "yes" ]; then
4956 if [ "$CFG_PHONON" != "no" ]; then
4957 # Always enable Phonon (unless it was explicitly disabled)
4961 if [ "$CFG_COREWLAN" = "auto" ]; then
4962 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
4970 if [ "$PLATFORM_QPA" = "yes" ]; then
4971 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4972 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4973 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
4975 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
4978 if [ "$CFG_OPENGL" = "yes" ]; then
4979 echo "All the OpenGL functionality tests failed!"
4980 echo " You might need to modify the include and library search paths by editing"
4981 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4982 echo " ${XQMAKESPEC}."
4987 elif [ "$CFG_OPENGL" = "es2" ]; then
4989 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4990 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4991 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4992 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4993 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4994 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4995 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4996 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4999 "$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
5000 if [ $? != "0" ]; then
5001 echo "The OpenGL ES 2.0 functionality test failed!"
5002 echo " You might need to modify the include and library search paths by editing"
5003 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5004 echo " ${XQMAKESPEC}."
5007 elif [ "$CFG_OPENGL" = "desktop" ]; then
5008 # Desktop OpenGL support
5009 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5010 if [ $? != "0" ]; then
5011 echo "The OpenGL functionality test failed!"
5012 echo " You might need to modify the include and library search paths by editing"
5013 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5014 echo " ${XQMAKESPEC}."
5019 # auto-detect FontConfig support
5020 if [ "$CFG_FONTCONFIG" != "no" ]; then
5021 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5022 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5023 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5025 QT_CFLAGS_FONTCONFIG=
5026 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5028 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
5029 QT_CONFIG="$QT_CONFIG fontconfig"
5030 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5031 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5032 CFG_LIBFREETYPE=system
5037 # Save these for a check later
5038 ORIG_CFG_XCB="$CFG_XCB"
5039 ORIG_CFG_EGLFS="$CFG_EGLFS"
5041 if [ "$CFG_LIBUDEV" != "no" ]; then
5042 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5043 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5044 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5045 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5046 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5048 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
5050 QT_CONFIG="$QT_CONFIG libudev"
5051 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5052 echo "The libudev functionality test failed!"
5056 QMakeVar add DEFINES QT_NO_LIBUDEV
5060 if [ "$CFG_EVDEV" != "no" ]; then
5061 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5063 QT_CONFIG="$QT_CONFIG evdev"
5064 elif [ "$CFG_EVDEV" = "yes" ]; then
5065 echo "The evdev functionality test failed!"
5069 QMakeVar add DEFINES QT_NO_EVDEV
5073 # Check we actually have X11 :-)
5074 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
5075 QT_CONFIG="$QT_CONFIG xlib"
5078 # auto-detect Xrender support
5079 if [ "$CFG_XRENDER" != "no" ]; then
5080 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
5082 QT_CONFIG="$QT_CONFIG xrender"
5084 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5085 echo "Xrender support cannot be enabled due to functionality tests!"
5086 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5087 echo " If you believe this message is in error you may use the continue"
5088 echo " switch (-continue) to $0 to continue."
5096 if [ "$CFG_XCB" != "no" ]; then
5097 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
5098 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5099 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5101 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
5103 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
5104 QT_CONFIG="$QT_CONFIG xcb-render"
5107 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
5109 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5112 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
5113 QT_CONFIG="$QT_CONFIG xcb-xlib"
5116 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5117 # auto-detect XInput2/Xinput support
5118 if [ "$CFG_XINPUT2" != "no" ]; then
5119 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
5123 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5124 echo "XInput2 support cannot be enabled due to functionality tests!"
5125 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5126 echo " If you believe this message is in error you may use the continue"
5127 echo " switch (-continue) to $0 to continue."
5136 if [ "$CFG_XCB" = "yes" ]; then
5137 echo "The XCB test failed!"
5138 echo " You might need to install dependency packages."
5139 echo " See src/plugins/platforms/xcb/README."
5143 QMakeVar add DEFINES QT_NO_XCB
5147 # Detect libxkbcommon
5148 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5149 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5150 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5151 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5152 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5154 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5158 if [ "$CFG_EGL" != "no" ]; then
5159 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
5160 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5161 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
5162 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
5163 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
5164 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
5165 fi # detect EGL support
5166 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/qpa/egl" "EGL" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
5168 elif [ "$CFG_EGL" = "yes" ]; then
5169 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
5170 echo " You might need to modify the include and library search paths by editing"
5171 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
5178 if [ "$CFG_EGLFS" != "no" ]; then
5179 CFG_EGLFS="$CFG_EGL"
5182 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5183 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5184 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5185 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5188 if [ "$BUILD_ON_MAC" = "yes" ]; then
5189 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
5190 QT_CONFIG="$QT_CONFIG coreservices"
5192 QMakeVar add DEFINES QT_NO_CORESERVICES
5196 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5197 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
5198 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
5199 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
5200 echo "No QPA platform plugin enabled!"
5201 echo " If you really want to build without a QPA platform plugin you must pass"
5202 echo " -no-xcb and -no-eglfs to configure. Doing this will"
5203 echo " produce a Qt that cannot run GUI applications."
5204 echo " The dependencies needed for xcb to build are listed in"
5205 echo " src/plugins/platforms/xcb/README"
5213 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5216 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5217 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5218 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
5219 CFG_LIBFREETYPE=system
5226 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5230 if [ "$CFG_STL" != "no" ]; then
5231 if [ "$HAVE_STL" = "yes" ]; then
5234 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5235 echo "STL support cannot be enabled due to functionality tests!"
5236 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5237 echo " If you believe this message is in error you may use the continue"
5238 echo " switch (-continue) to $0 to continue."
5246 # detect POSIX clock_gettime()
5247 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5248 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
5249 CFG_CLOCK_GETTIME=yes
5251 CFG_CLOCK_GETTIME=no
5255 # detect POSIX monotonic clocks
5256 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5257 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
5258 CFG_CLOCK_MONOTONIC=yes
5260 CFG_CLOCK_MONOTONIC=no
5262 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5263 CFG_CLOCK_MONOTONIC=no
5267 if [ "$CFG_MREMAP" = "auto" ]; then
5268 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5275 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5276 if [ "$CFG_GETADDRINFO" != "no" ]; then
5277 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5280 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5281 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5282 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5283 echo " If you believe this message is in error you may use the continue"
5284 echo " switch (-continue) to $0 to continue."
5292 # find if the platform provides inotify
5293 if [ "$CFG_INOTIFY" != "no" ]; then
5294 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5297 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5298 echo "inotify support cannot be enabled due to functionality tests!"
5299 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5300 echo " If you believe this message is in error you may use the continue"
5301 echo " switch (-continue) to $0 to continue."
5309 # find if the platform provides if_nametoindex (ipv6 interface name support)
5310 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5311 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
5314 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5315 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5316 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5317 echo " If you believe this message is in error you may use the continue"
5318 echo " switch (-continue) to $0 to continue."
5326 # find if the platform provides getifaddrs (network interface enumeration)
5327 if [ "$CFG_GETIFADDRS" != "no" ]; then
5328 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5331 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5332 echo "getifaddrs support cannot be enabled due to functionality tests!"
5333 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5334 echo " If you believe this message is in error you may use the continue"
5335 echo " switch (-continue) to $0 to continue."
5344 if [ "$CFG_OPENSSL" != "no" ]; then
5345 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
5346 if [ "$CFG_OPENSSL" = "auto" ]; then
5350 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5351 echo "OpenSSL support cannot be enabled due to functionality tests!"
5352 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5353 echo " If you believe this message is in error you may use the continue"
5354 echo " switch (-continue) to $0 to continue."
5363 if [ "$CFG_PCRE" != "qt" ]; then
5364 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5367 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5368 echo "PCRE support cannot be enabled due to functionality tests!"
5369 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5370 echo " If you believe this message is in error you may use the continue"
5371 echo " switch (-continue) to $0 to continue."
5379 # detect OpenVG support
5380 if [ "$CFG_OPENVG" != "no" ]; then
5381 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
5382 if [ "$CFG_OPENVG" = "auto" ]; then
5385 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
5386 if [ "$CFG_OPENVG" = "auto" ]; then
5389 CFG_OPENVG_ON_OPENGL=yes
5390 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
5391 if [ "$CFG_OPENVG" = "auto" ]; then
5394 CFG_OPENVG_LC_INCLUDES=yes
5395 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
5396 if [ "$CFG_OPENVG" = "auto" ]; then
5399 CFG_OPENVG_LC_INCLUDES=yes
5400 CFG_OPENVG_ON_OPENGL=yes
5402 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5403 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5404 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5405 echo " If you believe this message is in error you may use the continue"
5406 echo " switch (-continue) to $0 to continue."
5412 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
5413 CFG_OPENVG_SHIVA=yes
5417 if [ "$CFG_ALSA" = "auto" ]; then
5418 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5425 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5426 if [ "$CFG_ARCH" = "arm" ]; then
5427 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5428 if [ $? != "0" ]; then
5429 CFG_JAVASCRIPTCORE_JIT=no
5432 case "$XPLATFORM" in
5434 CFG_JAVASCRIPTCORE_JIT=no
5440 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5441 QMakeVar set JAVASCRIPTCORE_JIT yes
5442 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5443 QMakeVar set JAVASCRIPTCORE_JIT no
5446 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5447 CFG_AUDIO_BACKEND=yes
5450 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5451 echo "Warning: largefile support cannot be disabled for win32."
5455 #-------------------------------------------------------------------------------
5456 # ask for all that hasn't been auto-detected or specified in the arguments
5457 #-------------------------------------------------------------------------------
5459 # enable dwarf2 support on Mac
5460 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5461 QT_CONFIG="$QT_CONFIG dwarf2"
5464 # Detect the default arch (x86 or x86_64) on Mac OS X
5465 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5467 case `file "${outpath}/bin/qmake"` in
5475 # unsupported/unknown
5479 if [ -n "$DEFAULT_ARCH" ]; then
5480 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5481 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5482 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5483 # Make the application arch follow the Qt arch
5484 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5489 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5490 QT_CONFIG="$QT_CONFIG phonon-backend"
5493 # disable accessibility
5494 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5495 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5497 QT_CONFIG="$QT_CONFIG accessibility"
5501 if [ "$CFG_EGL" = "yes" ]; then
5502 QT_CONFIG="$QT_CONFIG egl"
5504 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5508 if [ "$CFG_EGLFS" = "yes" ]; then
5509 QT_CONFIG="$QT_CONFIG eglfs"
5511 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5515 if [ "$CFG_OPENVG" = "no" ]; then
5516 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5518 QT_CONFIG="$QT_CONFIG openvg"
5519 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5520 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5522 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5523 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5525 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5526 QT_CONFIG="$QT_CONFIG shivavg"
5527 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5532 if [ "$CFG_OPENGL" = "no" ]; then
5533 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5535 QT_CONFIG="$QT_CONFIG opengl"
5538 if [ "$CFG_OPENGL" = "es2" ]; then
5539 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5542 if [ "$CFG_OPENGL" = "es2" ]; then
5543 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5544 QT_CONFIG="$QT_CONFIG opengles2"
5547 # safe execution environment
5548 if [ "$CFG_SXE" != "no" ]; then
5549 QT_CONFIG="$QT_CONFIG sxe"
5552 # build up the variables for output
5553 if [ "$CFG_DEBUG" = "yes" ]; then
5554 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5555 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5556 elif [ "$CFG_DEBUG" = "no" ]; then
5557 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5558 QMAKE_CONFIG="$QMAKE_CONFIG release"
5560 if [ "$CFG_SHARED" = "yes" ]; then
5561 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5562 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5563 elif [ "$CFG_SHARED" = "no" ]; then
5564 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5565 QMAKE_CONFIG="$QMAKE_CONFIG static"
5567 if [ "$PLATFORM_QPA" = "yes" ]; then
5568 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5569 QT_CONFIG="$QT_CONFIG qpa"
5570 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5571 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5574 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5575 # Do not set this here for Windows. Let qmake do it so
5576 # debug and release precompiled headers are kept separate.
5577 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5579 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5580 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5581 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5582 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5583 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5584 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5586 if [ "$CFG_STL" = "no" ]; then
5587 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5589 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5591 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5592 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5594 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5595 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5596 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5597 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5598 QMakeVar add QMAKE_CFLAGS -g
5599 QMakeVar add QMAKE_CXXFLAGS -g
5600 QT_CONFIG="$QT_CONFIG separate_debug_info"
5602 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5603 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5605 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5606 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5607 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5608 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5609 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5610 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5611 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5612 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5613 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5614 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5615 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5616 if [ "$CFG_ARCH" = "mips" ]; then
5617 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5618 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5620 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5621 QT_CONFIG="$QT_CONFIG clock-gettime"
5623 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5624 QT_CONFIG="$QT_CONFIG clock-monotonic"
5626 if [ "$CFG_MREMAP" = "yes" ]; then
5627 QT_CONFIG="$QT_CONFIG mremap"
5629 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5630 QT_CONFIG="$QT_CONFIG getaddrinfo"
5632 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5633 QT_CONFIG="$QT_CONFIG ipv6ifname"
5635 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5636 QT_CONFIG="$QT_CONFIG getifaddrs"
5638 if [ "$CFG_INOTIFY" = "yes" ]; then
5639 QT_CONFIG="$QT_CONFIG inotify"
5641 if [ "$CFG_LIBJPEG" = "no" ]; then
5643 elif [ "$CFG_LIBJPEG" = "system" ]; then
5644 QT_CONFIG="$QT_CONFIG system-jpeg"
5646 if [ "$CFG_JPEG" = "no" ]; then
5647 QT_CONFIG="$QT_CONFIG no-jpeg"
5648 elif [ "$CFG_JPEG" = "yes" ]; then
5649 QT_CONFIG="$QT_CONFIG jpeg"
5651 if [ "$CFG_LIBPNG" = "no" ]; then
5654 if [ "$CFG_LIBPNG" = "system" ]; then
5655 QT_CONFIG="$QT_CONFIG system-png"
5657 if [ "$CFG_PNG" = "no" ]; then
5658 QT_CONFIG="$QT_CONFIG no-png"
5659 elif [ "$CFG_PNG" = "yes" ]; then
5660 QT_CONFIG="$QT_CONFIG png"
5662 if [ "$CFG_GIF" = "no" ]; then
5663 QT_CONFIG="$QT_CONFIG no-gif"
5664 elif [ "$CFG_GIF" = "yes" ]; then
5665 QT_CONFIG="$QT_CONFIG gif"
5667 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5668 QT_CONFIG="$QT_CONFIG no-freetype"
5669 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5670 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5671 QT_CONFIG="$QT_CONFIG system-freetype"
5673 QT_CONFIG="$QT_CONFIG freetype"
5675 if [ "$CFG_GUI" = "auto" ]; then
5678 if [ "$CFG_GUI" = "no" ]; then
5679 QT_CONFIG="$QT_CONFIG no-gui"
5682 if [ "$CFG_WIDGETS" = "no" ]; then
5683 QT_CONFIG="$QT_CONFIG no-widgets"
5684 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5687 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5688 #On Mac we implicitly link against libz, so we
5689 #never use the 3rdparty stuff.
5690 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5692 if [ "$CFG_ZLIB" = "yes" ]; then
5693 QT_CONFIG="$QT_CONFIG zlib"
5694 elif [ "$CFG_ZLIB" = "system" ]; then
5695 QT_CONFIG="$QT_CONFIG system-zlib"
5698 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5699 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5700 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5701 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5702 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5703 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5704 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5705 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5706 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5707 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
5708 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5709 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5710 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5711 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5712 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5714 if [ "$PLATFORM_X11" = "yes" ]; then
5715 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5717 # for some reason, the following libraries are not always built shared,
5718 # so *every* program/lib (including Qt) has to link against them
5719 if [ "$CFG_XSHAPE" = "yes" ]; then
5720 QT_CONFIG="$QT_CONFIG xshape"
5722 if [ "$CFG_XVIDEO" = "yes" ]; then
5723 QT_CONFIG="$QT_CONFIG xvideo"
5725 if [ "$CFG_XSYNC" = "yes" ]; then
5726 QT_CONFIG="$QT_CONFIG xsync"
5728 if [ "$CFG_XINERAMA" = "yes" ]; then
5729 QT_CONFIG="$QT_CONFIG xinerama"
5730 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5732 if [ "$CFG_XCURSOR" = "yes" ]; then
5733 QT_CONFIG="$QT_CONFIG xcursor"
5734 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5736 if [ "$CFG_XFIXES" = "yes" ]; then
5737 QT_CONFIG="$QT_CONFIG xfixes"
5738 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5740 if [ "$CFG_XRANDR" = "yes" ]; then
5741 QT_CONFIG="$QT_CONFIG xrandr"
5742 if [ "$CFG_XRENDER" != "yes" ]; then
5743 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5744 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5746 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5749 if [ "$CFG_XRENDER" = "yes" ]; then
5750 QT_CONFIG="$QT_CONFIG xrender"
5751 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5753 if [ "$CFG_MITSHM" = "yes" ]; then
5754 QT_CONFIG="$QT_CONFIG mitshm"
5756 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5757 QT_CONFIG="$QT_CONFIG fontconfig"
5759 if [ "$CFG_XINPUT" = "yes" ]; then
5760 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5762 if [ "$CFG_XINPUT" = "yes" ]; then
5763 QT_CONFIG="$QT_CONFIG xinput tablet"
5765 if [ "$CFG_XKB" = "yes" ]; then
5766 QT_CONFIG="$QT_CONFIG xkb"
5770 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5771 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5772 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5774 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5775 if [ "$CFG_RPATH" = "yes" ]; then
5776 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5777 # set the default rpath to the library installation directory
5778 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5780 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5781 if [ -n "$RPATH_FLAGS" ]; then
5783 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5787 elif [ "$CFG_RPATH" = "yes" ]; then
5788 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5792 if [ "$CFG_RPATH" = "yes" ]; then
5793 # set the default rpath to the library installation directory
5794 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5796 if [ -n "$RPATH_FLAGS" ]; then
5797 # add the user defined rpaths
5798 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5802 if [ '!' -z "$I_FLAGS" ]; then
5803 # add the user define include paths
5804 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5805 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5808 if [ '!' -z "$W_FLAGS" ]; then
5809 # add the user defined warning flags
5810 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5811 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5812 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5815 # turn off exceptions for the compilers that support it
5816 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5817 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5819 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5822 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5823 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5826 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5827 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5828 # Follow default behavior of configure.exe by overriding with "rtti".
5829 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5832 if [ "$CFG_ALSA" = "yes" ]; then
5833 QT_CONFIG="$QT_CONFIG alsa"
5836 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5837 QT_CONFIG="$QT_CONFIG pulseaudio"
5840 if [ "$CFG_COREWLAN" = "yes" ]; then
5841 QT_CONFIG="$QT_CONFIG corewlan"
5844 if [ "$CFG_ICU" = "yes" ]; then
5845 QT_CONFIG="$QT_CONFIG icu"
5848 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5849 QT_CONFIG="$QT_CONFIG force_asserts"
5852 if [ "$CFG_PCRE" = "qt" ]; then
5853 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5857 # Some Qt modules are too advanced in C++ for some old compilers
5858 # Detect here the platforms where they are known to work.
5860 # See Qt documentation for more information on which features are
5861 # supported and on which compilers.
5863 canBuildQtConcurrent="yes"
5864 canUseV8Snapshot="yes"
5866 case "$XPLATFORM" in
5868 # PA-RISC's assembly is too limited
5869 # gcc 3.4 on that platform can't build QtXmlPatterns
5870 # the assembly it generates cannot be compiled
5872 # Check gcc's version
5873 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5877 canBuildQtXmlPatterns="no"
5881 canBuildQtXmlPatterns="no"
5885 unsupported/vxworks-*-g++*)
5888 unsupported/vxworks-*-dcc*)
5890 canBuildQtXmlPatterns="no"
5893 # Check gcc's version
5894 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5902 canBuildQtXmlPatterns="no"
5907 # Check the compiler version
5908 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5911 canBuildQtXmlPatterns="no"
5912 canBuildQtConcurrent="no"
5916 canBuildQtConcurrent="no"
5922 canBuildQtXmlPatterns="no"
5923 canBuildQtConcurrent="no"
5929 # Get the xlC version
5930 cat > xlcver.c <<EOF
5934 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5939 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5940 xlcver=`./xlcver 2>/dev/null`
5943 if [ "$OPT_VERBOSE" = "yes" ]; then
5944 if [ -n "$xlcver" ]; then
5945 echo Found IBM xlC version: $xlcver.
5947 echo Could not determine IBM xlC version, assuming oldest supported.
5954 canBuildQtXmlPatterns="no"
5955 canBuildQtConcurrent="no"
5959 canBuildQtConcurrent="no"
5965 canBuildQtConcurrent="no"
5969 if [ "$CFG_GUI" = "no" ]; then
5970 # WebKit requires QtGui
5974 if [ "$CFG_SHARED" = "no" ]; then
5976 echo "WARNING: Using static linking will disable the WebKit module."
5981 CFG_CONCURRENT="yes"
5982 if [ "$canBuildQtConcurrent" = "no" ]; then
5983 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5986 QT_CONFIG="$QT_CONFIG concurrent"
5990 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5991 QT_CONFIG="$QT_CONFIG audio-backend"
5995 if [ "$CFG_WEBKIT" = "debug" ]; then
5996 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6000 QT_CONFIG="$QT_CONFIG v8"
6001 # Detect snapshot support
6002 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6003 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6006 *) canUseV8Snapshot="no"
6010 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6011 # QEMU crashes when building inside Scratchbox with an ARM target
6012 canUseV8Snapshot="no"
6015 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6016 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6018 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6019 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6022 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6023 QT_CONFIG="$QT_CONFIG v8snapshot"
6027 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6028 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6031 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6034 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6035 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6036 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6041 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6042 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6043 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6050 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6056 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6058 case "$COMPILER_VERSION" in
6060 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6061 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6062 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6065 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6066 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6067 QT_GCC_PATCH_VERSION=0
6077 #-------------------------------------------------------------------------------
6078 # part of configuration information goes into qconfig.h
6079 #-------------------------------------------------------------------------------
6081 case "$CFG_QCONFIG" in
6083 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6086 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6087 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6088 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6089 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6090 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6091 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6093 echo "#endif" >>"$tmpconfig"
6097 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6101 # define QT_EDITION $QT_EDITION
6105 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6106 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6108 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6109 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6112 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6113 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6116 if [ "$BUILD_ON_MAC" = "yes" ]; then
6117 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6118 #if defined(__LP64__)
6119 # define QT_POINTER_SIZE 8
6121 # define QT_POINTER_SIZE 4
6125 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6126 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6129 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6130 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6131 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6135 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6137 if [ "$CFG_DEV" = "yes" ]; then
6138 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6141 if [ "$PLATFORM_QPA" = "yes" ]; then
6142 # Add QPA to config.h
6143 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6146 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6147 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6150 # Add turned on SQL drivers
6151 for DRIVER in $CFG_SQL_AVAILABLE; do
6152 eval "VAL=\$CFG_SQL_$DRIVER"
6155 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6156 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6157 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6160 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6166 QMakeVar set sql-drivers "$SQL_DRIVERS"
6167 QMakeVar set sql-plugins "$SQL_PLUGINS"
6169 # Add other configuration options to the qconfig.h file
6170 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6171 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6172 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6173 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6174 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6175 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6176 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6178 # X11/Unix/Mac only configs
6179 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6180 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6181 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6182 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6183 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6184 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6185 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6186 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6187 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6188 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6189 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6190 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6191 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6192 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6193 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6195 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6196 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6197 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6198 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6199 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6200 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6201 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6202 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6203 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6204 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6205 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6206 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6207 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6209 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6210 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6211 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6212 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6213 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6214 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6215 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6216 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6218 # sort QCONFIG_FLAGS for neatness if we can
6219 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6220 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6222 if [ -n "$QCONFIG_FLAGS" ]; then
6223 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6224 #ifndef QT_BOOTSTRAPPED
6227 for cfg in $QCONFIG_FLAGS; do
6228 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6229 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6230 # figure out define logic, so we can output the correct
6231 # ifdefs to override the global defines in a project
6233 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6234 # QT_NO_option can be forcefully turned on by QT_option
6235 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6236 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6237 # QT_option can be forcefully turned off by QT_NO_option
6238 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6241 if [ -z $cfgdNeg ]; then
6242 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6249 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6250 #if defined($cfgd) && defined($cfgdNeg)
6252 #elif !defined($cfgd) && !defined($cfgdNeg)
6259 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6260 #endif // QT_BOOTSTRAPPED
6265 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6266 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6267 #define QT_VISIBILITY_AVAILABLE
6272 if [ -n "$QT_LIBINFIX" ]; then
6273 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6274 #define QT_LIBINFIX "$QT_LIBINFIX"
6279 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6280 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6281 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6283 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6284 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6285 chmod -w "$outpath/src/corelib/global/qconfig.h"
6286 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6287 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6291 #-------------------------------------------------------------------------------
6292 # save configuration into qconfig.pri
6293 #-------------------------------------------------------------------------------
6294 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6295 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6296 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6297 if [ "$CFG_DEBUG" = "yes" ]; then
6298 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6299 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6300 QT_CONFIG="$QT_CONFIG release"
6302 QT_CONFIG="$QT_CONFIG debug"
6303 elif [ "$CFG_DEBUG" = "no" ]; then
6304 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6305 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6306 QT_CONFIG="$QT_CONFIG debug"
6308 QT_CONFIG="$QT_CONFIG release"
6310 if [ "$CFG_STL" = "yes" ]; then
6311 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6313 if [ "$CFG_FRAMEWORK" = "no" ]; then
6314 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6316 QT_CONFIG="$QT_CONFIG qt_framework"
6317 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6319 if [ "$CFG_DEV" = "yes" ]; then
6320 QT_CONFIG="$QT_CONFIG private_tests"
6323 cat >>"$QTCONFIG.tmp" <<EOF
6325 CONFIG += $QTCONFIG_CONFIG
6327 QT_HOST_ARCH = $CFG_HOST_ARCH
6328 QT_EDITION = $Edition
6329 QT_CONFIG += $QT_CONFIG
6332 QT_VERSION = $QT_VERSION
6333 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6334 QT_MINOR_VERSION = $QT_MINOR_VERSION
6335 QT_PATCH_VERSION = $QT_PATCH_VERSION
6338 QT_LIBINFIX = $QT_LIBINFIX
6339 QT_NAMESPACE = $QT_NAMESPACE
6342 if [ -n "$CFG_SYSROOT" ]; then
6343 echo "# sysroot" >>"$QTCONFIG.tmp"
6344 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6345 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6346 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6347 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6348 echo "}" >> "$QTCONFIG.tmp"
6349 echo >> "$QTCONFIG.tmp"
6351 if [ -n "$RPATH_FLAGS" ]; then
6352 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
6354 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6355 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6356 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6357 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6360 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6361 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6362 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6365 # replace qconfig.pri if it differs from the newly created temp file
6366 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6367 rm -f "$QTCONFIG.tmp"
6369 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6372 #-------------------------------------------------------------------------------
6373 # save configuration into qmodule.pri
6374 #-------------------------------------------------------------------------------
6375 QTMODULE="$outpath/mkspecs/qmodule.pri"
6377 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6379 # Ensure we can link to uninistalled libraries
6380 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6381 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6383 if [ -n "$QT_CFLAGS_PSQL" ]; then
6384 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6386 if [ -n "$QT_LFLAGS_PSQL" ]; then
6387 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6389 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6390 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6392 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6393 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6395 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6396 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6398 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6399 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6401 if [ -n "$QT_LFLAGS_ODBC" ]; then
6402 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6404 if [ -n "$QT_LFLAGS_TDS" ]; then
6405 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6408 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6409 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6412 #dump in the OPENSSL_LIBS info
6413 if [ '!' -z "$OPENSSL_LIBS" ]; then
6414 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6415 elif [ "$CFG_OPENSSL" = "linked" ]; then
6416 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6419 #dump in the SDK info
6420 if [ '!' -z "$CFG_SDK" ]; then
6421 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6425 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6426 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6428 # replace qmodule.pri if it differs from the newly created temp file
6429 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6430 rm -f "$QTMODULE.tmp"
6432 mv -f "$QTMODULE.tmp" "$QTMODULE"
6435 #-------------------------------------------------------------------------------
6436 # save configuration into .qmake.cache
6437 #-------------------------------------------------------------------------------
6439 CACHEFILE="$outpath/.qmake.cache"
6440 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6441 cat >>"$CACHEFILE.tmp" <<EOF
6443 QT_SOURCE_TREE = \$\$quote($relpath)
6444 QT_BUILD_TREE = \$\$quote($outpath)
6445 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6447 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6448 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6449 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6451 include(\$\$PWD/mkspecs/qmodule.pri)
6452 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6456 #dump the qmake spec
6457 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6458 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6460 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6463 # replace .qmake.cache if it differs from the newly created temp file
6464 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6465 rm -f "$CACHEFILE.tmp"
6467 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6470 #-------------------------------------------------------------------------------
6471 # give feedback on configuration
6472 #-------------------------------------------------------------------------------
6476 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6479 This target is using the GNU C++ compiler ($PLATFORM).
6481 Recent versions of this compiler automatically include code for
6482 exceptions, which increase both the size of the Qt libraries and
6483 the amount of memory taken by your applications.
6485 You may choose to re-run `basename $0` with the -no-exceptions
6486 option to compile Qt without exceptions. This is completely binary
6487 compatible, and existing applications will continue to work.
6495 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6498 This target is using the MIPSpro C++ compiler ($PLATFORM).
6500 You may choose to re-run `basename $0` with the -no-exceptions
6501 option to compile Qt without exceptions. This will make the
6502 size of the Qt library smaller and reduce the amount of memory
6503 taken by your applications.
6515 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6516 echo "Build type: $PLATFORM"
6518 echo "Building on: $PLATFORM"
6519 echo "Building for: $XPLATFORM"
6522 echo "Architecture: $CFG_ARCH"
6523 if [ "$PLATFORM_QPA" = "yes" ]; then
6524 echo "Host architecture: $CFG_HOST_ARCH"
6527 if [ -n "$PLATFORM_NOTES" ]; then
6528 echo "Platform notes:"
6529 echo "$PLATFORM_NOTES"
6534 if [ "$OPT_VERBOSE" = "yes" ]; then
6535 echo $ECHO_N "qmake vars .......... $ECHO_C"
6536 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6537 echo "qmake switches ......... $QMAKE_SWITCHES"
6540 echo "Build .................. $CFG_BUILD_PARTS"
6541 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6542 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6543 echo "Debug .................. yes (combined)"
6544 if [ "$CFG_DEBUG" = "yes" ]; then
6545 echo "Default Link ........... debug"
6547 echo "Default Link ........... release"
6550 echo "Debug .................. $CFG_DEBUG"
6552 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6553 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6554 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6555 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6556 echo "QtGui module ........... $CFG_GUI"
6557 echo "QtWidgets module ....... $CFG_WIDGETS"
6558 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6559 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6561 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6563 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6564 echo "STL support ............ $CFG_STL"
6565 echo "PCH support ............ $CFG_PRECOMPILE"
6566 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6567 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6568 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6569 echo "AVX..................... ${CFG_AVX}"
6570 elif [ "$CFG_ARCH" = "arm" ]; then
6571 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6572 echo "NEON support ........... ${CFG_NEON}"
6574 if [ "$CFG_ARCH" = "mips" ]; then
6575 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
6577 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6578 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6579 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6580 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6581 echo "NIS support ............ $CFG_NIS"
6582 echo "CUPS support ........... $CFG_CUPS"
6583 echo "Iconv support .......... $CFG_ICONV"
6584 echo "Glib support ........... $CFG_GLIB"
6585 echo "GStreamer support ...... $CFG_GSTREAMER"
6586 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6587 echo "Large File support ..... $CFG_LARGEFILE"
6588 echo "GIF support ............ $CFG_GIF"
6589 if [ "$CFG_JPEG" = "no" ]; then
6590 echo "JPEG support ........... $CFG_JPEG"
6592 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6594 if [ "$CFG_PNG" = "no" ]; then
6595 echo "PNG support ............ $CFG_PNG"
6597 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6599 echo "zlib support ........... $CFG_ZLIB"
6600 echo "Session management ..... $CFG_SM"
6601 echo "libudev support ........ $CFG_LIBUDEV"
6603 if [ "$CFG_OPENGL" = "desktop" ]; then
6604 echo "OpenGL support ......... yes (Desktop OpenGL)"
6605 elif [ "$CFG_OPENGL" = "es2" ]; then
6606 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6608 echo "OpenGL support ......... no"
6611 if [ "$CFG_OPENVG" ]; then
6612 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6613 echo "OpenVG support ......... ShivaVG"
6615 echo "OpenVG support ......... $CFG_OPENVG"
6618 if [ "$PLATFORM_X11" = "yes" ]; then
6619 echo "NAS sound support ...... $CFG_NAS"
6620 echo "XShape support ......... $CFG_XSHAPE"
6621 echo "XVideo support ......... $CFG_XVIDEO"
6622 echo "XSync support .......... $CFG_XSYNC"
6623 echo "Xinerama support ....... $CFG_XINERAMA"
6624 echo "Xcursor support ........ $CFG_XCURSOR"
6625 echo "Xfixes support ......... $CFG_XFIXES"
6626 echo "Xrandr support ......... $CFG_XRANDR"
6627 echo "Xi support ............. $CFG_XINPUT"
6628 echo "MIT-SHM support ........ $CFG_MITSHM"
6629 echo "FontConfig support ..... $CFG_FONTCONFIG"
6630 echo "XKB Support ............ $CFG_XKB"
6631 echo "immodule support ....... $CFG_IM"
6632 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6634 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6635 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6636 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6637 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6638 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6639 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6640 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6641 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6642 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6645 if [ "$CFG_OPENSSL" = "yes" ]; then
6646 OPENSSL_LINKAGE="(run-time)"
6647 elif [ "$CFG_OPENSSL" = "linked" ]; then
6648 OPENSSL_LINKAGE="(linked)"
6650 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6651 echo "Alsa support ........... $CFG_ALSA"
6652 if [ "$BUILD_ON_MAC" = "yes" ]; then
6653 echo "CoreWlan support ....... $CFG_COREWLAN"
6655 echo "libICU support ......... $CFG_ICU"
6656 echo "PCRE support ........... $CFG_PCRE"
6657 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6658 echo "Xcb support ............ limited (old version)"
6660 echo "Xcb support ............ $CFG_XCB"
6662 echo "Xrender support ........ $CFG_XRENDER"
6663 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6664 echo "XInput2 support ........ $CFG_XINPUT2"
6666 echo "EGLFS support .......... $CFG_EGLFS"
6669 # complain about not being able to use dynamic plugins if we are using a static build
6670 if [ "$CFG_SHARED" = "no" ]; then
6672 echo "WARNING: Using static linking will disable the use of dynamically"
6673 echo "loaded plugins. Make sure to import all needed static plugins,"
6674 echo "or compile needed modules into the library."
6677 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6679 echo "NOTE: When linking against OpenSSL, you can override the default"
6680 echo "library names through OPENSSL_LIBS."
6682 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6685 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6687 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6688 echo "if you want a pure debug build."
6693 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6698 #-------------------------------------------------------------------------------
6699 # build makefiles based on the configuration
6700 #-------------------------------------------------------------------------------
6702 echo "Finding project files. Please wait..."
6703 if [ "$CFG_NOPROCESS" != "yes" ]; then
6704 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6705 if [ -f "${relpath}/qtbase.pro" ]; then
6706 mkfile="${outpath}/Makefile"
6707 [ -f "$mkfile" ] && chmod +w "$mkfile"
6708 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6712 # .projects -> projects to process
6713 # .projects.1 -> qt and moc
6714 # .projects.2 -> subdirs and libs
6715 # .projects.3 -> the rest
6716 rm -f .projects .projects.1 .projects.2 .projects.3
6718 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6719 if [ -z "$AWK" ]; then
6720 for p in `echo $QMAKE_PROJECTS`; do
6721 echo "$p" >> .projects
6724 cat >projects.awk <<EOF
6730 first = "./.projects.1.tmp"
6731 second = "./.projects.2.tmp"
6732 third = "./.projects.3.tmp"
6737 if ( ! target_file )
6739 print input_file >target_file
6744 input_file = FILENAME
6749 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6752 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6753 target_file = second
6758 matched_target == 0 && /^(TEMPLATE.*=)/ {
6759 if ( \$3 == "subdirs" )
6760 target_file = second
6761 else if ( \$3 == "lib" )
6767 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6768 if ( \$0 ~ /plugin/ )
6771 target_file = second
6776 if ( ! target_file )
6778 print input_file >>target_file
6785 for p in `echo $QMAKE_PROJECTS`; do
6786 echo "$p" >> .projects.all
6789 # if you get errors about the length of the command line to awk, change the -l arg
6791 split -l 100 .projects.all .projects.all.
6792 for p in .projects.all.*; do
6793 "$AWK" -f projects.awk `cat $p`
6794 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6795 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6796 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6797 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6799 rm -f .projects.all* projects.awk
6801 [ -f .projects.1 ] && cat .projects.1 >>.projects
6802 [ -f .projects.2 ] && cat .projects.2 >>.projects
6803 rm -f .projects.1 .projects.2
6804 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6805 cat .projects.3 >>.projects
6809 # don't sort Qt and MOC in with the other project files
6810 # also work around a segfaulting uniq(1)
6811 if [ -f .sorted.projects.2 ]; then
6812 sort .sorted.projects.2 > .sorted.projects.2.new
6813 mv -f .sorted.projects.2.new .sorted.projects.2
6814 cat .sorted.projects.2 >> .sorted.projects.1
6816 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6817 rm -f .sorted.projects.2 .sorted.projects.1
6821 if [ -f .projects ]; then
6822 uniq .projects >.tmp
6823 mv -f .tmp .projects
6824 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6826 if [ -f .projects.3 ]; then
6827 uniq .projects.3 >.tmp
6828 mv -f .tmp .projects.3
6829 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6831 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6835 for part in $CFG_BUILD_PARTS; do
6837 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6838 libs) PART_ROOTS="$PART_ROOTS src" ;;
6839 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6840 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6845 if [ "$CFG_DEV" = "yes" ]; then
6846 PART_ROOTS="$PART_ROOTS tests"
6849 echo "Creating makefiles. Please wait..."
6850 for file in .projects .projects.3; do
6851 [ '!' -f "$file" ] && continue
6852 for a in `cat $file`; do
6854 for r in $PART_ROOTS; do
6855 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6860 [ "$IN_ROOT" = "no" ] && continue
6863 *winmain/winmain.pro)
6864 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6868 */qmake/qmake.pro) continue ;;
6869 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6870 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6876 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6877 test -d "$dir" || mkdir -p "$dir"
6878 OUTDIR="$outpath/$dir"
6879 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6880 # fast configure - the makefile exists, skip it
6881 # since the makefile exists, it was generated by qmake, which means we
6882 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6884 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6887 QMAKE_SPEC_ARGS="-spec $SPEC"
6888 echo $ECHO_N " for $a$ECHO_C"
6890 QMAKE="$outpath/bin/qmake"
6891 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6892 if [ "$file" = ".projects.3" ]; then
6895 cat >"${OUTDIR}/Makefile" <<EOF
6896 # ${OUTDIR}/Makefile: generated by configure
6898 # WARNING: This makefile will be replaced with a real makefile.
6899 # All changes made to this file will be lost.
6901 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6903 cat >>"${OUTDIR}/Makefile" <<EOF
6905 all clean install qmake first Makefile: FORCE
6906 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6914 if [ "$OPT_VERBOSE" = "yes" ]; then
6915 echo " (`basename $SPEC`)"
6916 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6921 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6922 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6926 rm -f .projects .projects.3
6928 #-------------------------------------------------------------------------------
6929 # check for platforms that we don't yet know about
6930 #-------------------------------------------------------------------------------
6931 if [ "$CFG_ARCH" = "unknown" ]; then
6934 NOTICE: configure was unable to determine the architecture
6935 for the $XQMAKESPEC target.
6937 Qt will not use a specialized implementation for any atomic
6938 operations. Instead a generic implemention based on either GCC
6939 intrinsics or C++11 std::atomic<T> will be used (when
6940 available). The generic implementations are generally as fast
6941 as and always as safe as a specialized implementation.
6943 If no generic implementation is available, Qt will use a
6944 fallback UNIX implementation which uses a single
6945 pthread_mutex_t to protect all atomic operations. This
6946 implementation is the slow (but safe) fallback implementation
6947 for architectures Qt does not yet support.
6951 #-------------------------------------------------------------------------------
6952 # check if the user passed the -no-zlib option, which is no longer supported
6953 #-------------------------------------------------------------------------------
6954 if [ -n "$ZLIB_FORCED" ]; then
6955 which_zlib="supplied"
6956 if [ "$CFG_ZLIB" = "system" ]; then
6962 NOTICE: The -no-zlib option was supplied but is no longer
6965 Qt now requires zlib support in all builds, so the -no-zlib
6966 option was ignored. Qt will be built using the $which_zlib
6971 #-------------------------------------------------------------------------------
6972 # check if the user passed the obsoleted -wayland or -no-wayland flag
6973 #-------------------------------------------------------------------------------
6974 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6977 NOTICE: The -wayland and -no-wayland flags are now obsolete
6979 All configuring of QtWayland plugin and QtCompositor happens in the module
6983 #-------------------------------------------------------------------------------
6984 # check if the user passed the obsoleted -arch or -host-arch options
6985 #-------------------------------------------------------------------------------
6986 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6989 NOTICE: The -arch and -host-arch options are obsolete.
6991 Qt now detects the target and host architectures based on compiler
6992 output. Qt will be built using $CFG_ARCH for the target architecture
6993 and $CFG_HOST_ARCH for the host architecture (note that these two
6994 will be the same unless you are cross-compiling).
6998 #-------------------------------------------------------------------------------
6999 # finally save the executed command to another script
7000 #-------------------------------------------------------------------------------
7001 if [ `basename $0` != "config.status" ]; then
7002 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7004 # add the system variables
7005 for varname in $SYSTEM_VARIABLES; do
7007 'if [ -n "\$'${varname}'" ]; then
7008 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7013 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7015 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7016 echo "#!/bin/sh" > "$outpath/config.status"
7017 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
7018 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
7019 [ -n "$PKG_CONFIG_LIBDIR" ] && \
7020 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
7021 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7022 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7023 echo "else" >> "$outpath/config.status"
7024 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7025 echo "fi" >> "$outpath/config.status"
7026 chmod +x "$outpath/config.status"
7029 if [ -n "$RPATH_MESSAGE" ]; then
7031 echo "$RPATH_MESSAGE"
7034 MAKE=`basename "$MAKE"`
7036 echo Qt is now configured for building. Just run \'$MAKE\'.
7037 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7038 echo Once everything is built, Qt is installed.
7039 echo You should not run \'$MAKE install\'.
7041 echo Once everything is built, you must run \'$MAKE install\'.
7042 echo Qt will be installed into $QT_INSTALL_PREFIX
7045 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.