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 -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3938 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3939 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3940 # Do the same test again, using the host compiler
3941 CFG_HOST_ARCH=`"$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3942 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3944 # not cross compiling, host == target
3945 CFG_HOST_ARCH="$CFG_ARCH"
3948 if [ "$OPT_VERBOSE" = "yes" ]; then
3949 echo "System architecture: '$CFG_ARCH'"
3950 if [ "$PLATFORM_QPA" = "yes" ]; then
3951 echo "Host architecture: '$CFG_HOST_ARCH'"
3955 #-------------------------------------------------------------------------------
3956 # functionality tests
3957 #-------------------------------------------------------------------------------
3959 # detect availability of float math.h functions
3960 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3961 CFG_USE_FLOATMATH=yes
3963 CFG_USE_FLOATMATH=no
3966 # detect mmx support
3967 if [ "${CFG_MMX}" = "auto" ]; then
3968 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
3975 # detect 3dnow support
3976 if [ "${CFG_3DNOW}" = "auto" ]; then
3977 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
3984 # detect sse support
3985 if [ "${CFG_SSE}" = "auto" ]; then
3986 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
3993 # detect sse2 support
3994 if [ "${CFG_SSE2}" = "auto" ]; then
3995 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4002 # detect sse3 support
4003 if [ "${CFG_SSE3}" = "auto" ]; then
4004 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4011 # detect ssse3 support
4012 if [ "${CFG_SSSE3}" = "auto" ]; then
4013 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4020 # detect sse4.1 support
4021 if [ "${CFG_SSE4_1}" = "auto" ]; then
4022 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
4029 # detect sse4.2 support
4030 if [ "${CFG_SSE4_2}" = "auto" ]; then
4031 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
4038 # detect avx support
4039 if [ "${CFG_AVX}" = "auto" ]; then
4040 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4047 # check iWMMXt support
4048 if [ "$CFG_IWMMXT" = "yes" ]; then
4049 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4050 if [ $? != "0" ]; then
4051 echo "The iWMMXt functionality test failed!"
4052 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4057 # detect neon support
4058 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4059 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
4064 elif [ "$CFG_ARCH" != "arm" ]; then
4068 # detect mips_dsp support
4069 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
4075 # detect mips_dspr2 support
4076 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
4082 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4085 if [ "$CFG_ZLIB" = "no" ]; then
4086 # Note: Qt no longer support builds without zlib
4087 # So we force a "no" to be "auto" here.
4088 # If you REALLY really need no zlib support, you can still disable
4089 # it by doing the following:
4090 # add "no-zlib" to mkspecs/qconfig.pri
4091 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4093 # There's no guarantee that Qt will build under those conditions
4098 if [ "$CFG_ZLIB" = "auto" ]; then
4099 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
4106 if [ "$CFG_LARGEFILE" = "auto" ]; then
4107 #Large files should be enabled for all Linux systems
4111 if [ "$CFG_GUI" = "no" ]; then
4112 QPA_PLATFORM_GUARD=no
4115 # detect how jpeg should be built
4116 if [ "$CFG_JPEG" = "auto" ]; then
4117 if [ "$CFG_SHARED" = "yes" ]; then
4124 if [ "$CFG_LIBJPEG" = "auto" ]; then
4125 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
4132 # detect how gif should be built
4133 if [ "$CFG_GIF" = "auto" ]; then
4134 if [ "$CFG_SHARED" = "yes" ]; then
4142 if [ "$CFG_LIBPNG" = "auto" ]; then
4143 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
4150 # detect accessibility
4151 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4152 CFG_ACCESSIBILITY=yes
4155 if [ "$CFG_EGLFS" = "yes" ]; then
4156 if [ "$CFG_EGL" = "no" ]; then
4157 echo "The EGLFS plugin requires EGL support and cannot be built"
4163 # auto-detect SQL-modules support
4164 for _SQLDR in $CFG_SQL_AVAILABLE; do
4167 if [ "$CFG_SQL_mysql" != "no" ]; then
4168 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4169 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4170 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4171 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4172 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4173 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4174 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4176 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4177 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4178 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4179 echo " You need MySql 4 or higher."
4180 echo " If you believe this message is in error you may use the continue"
4181 echo " switch (-continue) to $0 to continue."
4186 QT_LFLAGS_MYSQL_R=""
4190 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
4191 QMakeVar add CONFIG use_libmysqlclient_r
4192 if [ "$CFG_SQL_mysql" = "auto" ]; then
4193 CFG_SQL_mysql=plugin
4195 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4196 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
4197 if [ "$CFG_SQL_mysql" = "auto" ]; then
4198 CFG_SQL_mysql=plugin
4201 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4202 echo "MySQL support cannot be enabled due to functionality tests!"
4203 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4204 echo " If you believe this message is in error you may use the continue"
4205 echo " switch (-continue) to $0 to continue."
4210 QT_LFLAGS_MYSQL_R=""
4218 if [ "$CFG_SQL_psql" != "no" ]; then
4219 # Be careful not to use native pg_config when cross building.
4220 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4221 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4222 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4224 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4225 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4226 # But, respect PSQL_LIBS if set
4227 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4228 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
4229 if [ "$CFG_SQL_psql" = "auto" ]; then
4233 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4234 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4235 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4236 echo " If you believe this message is in error you may use the continue"
4237 echo " switch (-continue) to $0 to continue."
4248 if [ "$CFG_SQL_odbc" != "no" ]; then
4249 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
4250 if [ "$CFG_SQL_odbc" = "auto" ]; then
4254 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
4255 QT_LFLAGS_ODBC="-liodbc"
4256 if [ "$CFG_SQL_odbc" = "auto" ]; then
4260 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4261 echo "ODBC support cannot be enabled due to functionality tests!"
4262 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4263 echo " If you believe this message is in error you may use the continue"
4264 echo " switch (-continue) to $0 to continue."
4274 if [ "$CFG_SQL_oci" != "no" ]; then
4275 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
4276 if [ "$CFG_SQL_oci" = "auto" ]; then
4280 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4281 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4282 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4283 echo " If you believe this message is in error you may use the continue"
4284 echo " switch (-continue) to $0 to continue."
4293 if [ "$CFG_SQL_tds" != "no" ]; then
4294 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4295 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4296 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
4297 if [ "$CFG_SQL_tds" = "auto" ]; then
4301 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4302 echo "TDS support cannot be enabled due to functionality tests!"
4303 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4304 echo " If you believe this message is in error you may use the continue"
4305 echo " switch (-continue) to $0 to continue."
4314 if [ "$CFG_SQL_db2" != "no" ]; then
4315 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
4316 if [ "$CFG_SQL_db2" = "auto" ]; then
4320 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4321 echo "ODBC support cannot be enabled due to functionality tests!"
4322 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4323 echo " If you believe this message is in error you may use the continue"
4324 echo " switch (-continue) to $0 to continue."
4333 if [ "$CFG_SQL_ibase" != "no" ]; then
4334 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
4335 if [ "$CFG_SQL_ibase" = "auto" ]; then
4336 CFG_SQL_ibase=plugin
4339 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4340 echo "InterBase support cannot be enabled due to functionality tests!"
4341 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4342 echo " If you believe this message is in error you may use the continue"
4343 echo " switch (-continue) to $0 to continue."
4352 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4353 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
4354 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4355 CFG_SQL_sqlite2=plugin
4358 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4359 echo "SQLite2 support cannot be enabled due to functionality tests!"
4360 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4361 echo " If you believe this message is in error you may use the continue"
4362 echo " switch (-continue) to $0 to continue."
4371 if [ "$CFG_SQL_sqlite" != "no" ]; then
4372 SQLITE_AUTODETECT_FAILED="no"
4373 if [ "$CFG_SQLITE" = "system" ]; then
4374 if [ -n "$PKG_CONFIG" ]; then
4375 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4376 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4378 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
4379 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4380 CFG_SQL_sqlite=plugin
4382 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4384 SQLITE_AUTODETECT_FAILED="yes"
4387 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4388 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4389 CFG_SQL_sqlite=plugin
4392 SQLITE_AUTODETECT_FAILED="yes"
4396 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4397 echo "SQLite support cannot be enabled due to functionality tests!"
4398 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4399 echo " If you believe this message is in error you may use the continue"
4400 echo " switch (-continue) to $0 to continue."
4406 if [ "$OPT_VERBOSE" = "yes" ]; then
4407 echo "unknown SQL driver: $_SQLDR"
4413 # auto-detect NIS support
4414 if [ "$CFG_NIS" != "no" ]; then
4415 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
4418 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4419 echo "NIS support cannot be enabled due to functionality tests!"
4420 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4421 echo " If you believe this message is in error you may use the continue"
4422 echo " switch (-continue) to $0 to continue."
4430 # auto-detect CUPS support
4431 if [ "$CFG_CUPS" != "no" ]; then
4432 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
4435 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4436 echo "Cups support cannot be enabled due to functionality tests!"
4437 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4438 echo " If you believe this message is in error you may use the continue"
4439 echo " switch (-continue) to $0 to continue."
4447 # auto-detect iconv(3) support
4448 if [ "$CFG_ICONV" != "no" ]; then
4449 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4451 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
4453 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
4455 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
4458 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4459 echo "Iconv support cannot be enabled due to functionality tests!"
4460 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4461 echo " If you believe this message is in error you may use the continue"
4462 echo " switch (-continue) to $0 to continue."
4470 # auto-detect libdbus-1 support
4471 if [ "$CFG_DBUS" != "no" ]; then
4472 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4473 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4474 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4476 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
4477 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4478 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4479 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4481 if [ "$CFG_DBUS" = "auto" ]; then
4483 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4484 # CFG_DBUS is "yes" or "linked" here
4486 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4487 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4488 echo " If you believe this message is in error you may use the continue"
4489 echo " switch (-continue) to $0 to continue."
4496 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4498 # auto-detect Glib support
4499 if [ "$CFG_GLIB" != "no" ]; then
4500 if [ -n "$PKG_CONFIG" ]; then
4501 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4502 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4504 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
4506 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4507 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4509 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4510 echo "Glib support cannot be enabled due to functionality tests!"
4511 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4512 echo " If you believe this message is in error you may use the continue"
4513 echo " switch (-continue) to $0 to continue."
4522 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4523 if [ -n "$PKG_CONFIG" ]; then
4524 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4525 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4527 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
4529 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4530 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4532 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4533 echo "Gstreamer support cannot be enabled due to functionality tests!"
4534 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4535 echo " If you believe this message is in error you may use the continue"
4536 echo " switch (-continue) to $0 to continue."
4542 elif [ "$CFG_GLIB" = "no" ]; then
4546 # auto-detect libicu support
4547 if [ "$CFG_ICU" != "no" ]; then
4548 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4549 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4551 if [ "$CFG_ICU" = "auto" ]; then
4553 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4556 echo "The ICU library support cannot be enabled."
4557 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4558 echo " If you believe this message is in error you may use the continue"
4559 echo " switch (-continue) to $0 to continue."
4565 # Auto-detect PulseAudio support
4566 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4567 if [ -n "$PKG_CONFIG" ]; then
4568 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4569 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4571 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
4573 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4574 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4576 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4577 echo "PulseAudio support cannot be enabled due to functionality tests!"
4578 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4579 echo " If you believe this message is in error you may use the continue"
4580 echo " switch (-continue) to $0 to continue."
4590 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4591 x11tests="$relpath/config.tests/x11"
4594 # work around broken X11 headers when using GCC 2.95 or later
4596 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4597 if [ $NOTYPE = "yes" ]; then
4598 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4599 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4602 # Check we actually have X11 :-)
4603 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4604 if [ $? != "0" ]; then
4605 echo "Basic XLib functionality test failed!"
4606 echo " You might need to modify the include and library search paths by editing"
4607 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4613 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4614 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4615 if [ "$CFG_GUI" = "no" ]; then
4616 if [ "$CFG_OPENGL" = "auto" ]; then
4619 if [ "$CFG_OPENGL" != "no" ]; then
4620 echo "OpenGL enabled, but GUI disabled."
4621 echo " You might need to either enable the GUI or disable OpenGL"
4625 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4626 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
4628 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
4631 if [ "$CFG_OPENGL" = "yes" ]; then
4632 echo "All the OpenGL functionality tests failed!"
4633 echo " You might need to modify the include and library search paths by editing"
4634 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4635 echo " ${XQMAKESPEC}."
4642 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4643 if [ "$CFG_OPENGL" = "desktop" ]; then
4644 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4645 if [ $? != "0" ]; then
4646 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4653 elif [ "$CFG_OPENGL" = "es2" ]; then
4655 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4656 if [ $? != "0" ]; then
4657 echo "The OpenGL ES 2.0 functionality test failed!"
4658 echo " You might need to modify the include and library search paths by editing"
4659 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4660 echo " ${XQMAKESPEC}."
4663 elif [ "$CFG_OPENGL" = "desktop" ]; then
4664 # Desktop OpenGL support
4665 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4666 if [ $? != "0" ]; then
4667 echo "The OpenGL functionality test failed!"
4668 echo " You might need to modify the include and library search paths by editing"
4669 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4670 echo " ${XQMAKESPEC}."
4675 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4676 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4677 if [ $? != "0" ]; then
4678 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4685 fi # X11/MINGW OpenGL
4688 if [ "$PLATFORM_X11" = "yes" ]; then
4689 # auto-detect Xcursor support
4690 if [ "$CFG_XCURSOR" != "no" ]; then
4691 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
4692 if [ "$CFG_XCURSOR" != "runtime" ]; then
4696 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4697 echo "Xcursor support cannot be enabled due to functionality tests!"
4698 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4699 echo " If you believe this message is in error you may use the continue"
4700 echo " switch (-continue) to $0 to continue."
4708 # auto-detect Xfixes support
4709 if [ "$CFG_XFIXES" != "no" ]; then
4710 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4711 if [ "$CFG_XFIXES" != "runtime" ]; then
4715 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4716 echo "Xfixes support cannot be enabled due to functionality tests!"
4717 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4718 echo " If you believe this message is in error you may use the continue"
4719 echo " switch (-continue) to $0 to continue."
4727 # auto-detect Xrandr support (resize and rotate extension)
4728 if [ "$CFG_XRANDR" != "no" ]; then
4729 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
4730 if [ "$CFG_XRANDR" != "runtime" ]; then
4734 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4735 echo "Xrandr support cannot be enabled due to functionality tests!"
4736 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4737 echo " If you believe this message is in error you may use the continue"
4738 echo " switch (-continue) to $0 to continue."
4746 # auto-detect Xrender support
4747 if [ "$CFG_XRENDER" != "no" ]; then
4748 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
4751 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4752 echo "Xrender support cannot be enabled due to functionality tests!"
4753 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4754 echo " If you believe this message is in error you may use the continue"
4755 echo " switch (-continue) to $0 to continue."
4763 # auto-detect MIT-SHM support
4764 if [ "$CFG_MITSHM" != "no" ]; then
4765 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
4768 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4769 echo "MITSHM support cannot be enabled due to functionality tests!"
4770 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4771 echo " If you believe this message is in error you may use the continue"
4772 echo " switch (-continue) to $0 to continue."
4780 # auto-detect Session Management support
4781 if [ "$CFG_SM" = "auto" ]; then
4782 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
4785 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4786 echo "Session Management support cannot be enabled due to functionality tests!"
4787 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4788 echo " If you believe this message is in error you may use the continue"
4789 echo " switch (-continue) to $0 to continue."
4797 # auto-detect SHAPE support
4798 if [ "$CFG_XSHAPE" != "no" ]; then
4799 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
4802 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4803 echo "XShape support cannot be enabled due to functionality tests!"
4804 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4805 echo " If you believe this message is in error you may use the continue"
4806 echo " switch (-continue) to $0 to continue."
4814 # auto-detect XVideo support
4815 if [ "$CFG_XVIDEO" != "no" ]; then
4816 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
4819 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4820 echo "XVideo support cannot be enabled due to functionality tests!"
4821 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4822 echo " If you believe this message is in error you may use the continue"
4823 echo " switch (-continue) to $0 to continue."
4831 # auto-detect XSync support
4832 if [ "$CFG_XSYNC" != "no" ]; then
4833 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
4836 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4837 echo "XSync support cannot be enabled due to functionality tests!"
4838 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4839 echo " If you believe this message is in error you may use the continue"
4840 echo " switch (-continue) to $0 to continue."
4848 # auto-detect Xinerama support
4849 if [ "$CFG_XINERAMA" != "no" ]; then
4850 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
4851 if [ "$CFG_XINERAMA" != "runtime" ]; then
4855 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4856 echo "Xinerama support cannot be enabled due to functionality tests!"
4857 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4858 echo " If you believe this message is in error you may use the continue"
4859 echo " switch (-continue) to $0 to continue."
4867 # auto-detect Xinput support
4868 if [ "$CFG_XINPUT" != "no" ]; then
4869 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
4870 if [ "$CFG_XINPUT" != "runtime" ]; then
4874 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4875 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4876 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4877 echo " If you believe this message is in error you may use the continue"
4878 echo " switch (-continue) to $0 to continue."
4886 # auto-detect XKB support
4887 if [ "$CFG_XKB" != "no" ]; then
4888 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
4891 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4892 echo "XKB support cannot be enabled due to functionality tests!"
4893 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4894 echo " If you believe this message is in error you may use the continue"
4895 echo " switch (-continue) to $0 to continue."
4903 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4904 if [ -n "$PKG_CONFIG" ]; then
4905 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4906 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4908 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4910 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4911 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4913 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4914 echo "Gtk theme support cannot be enabled due to functionality tests!"
4915 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4916 echo " If you believe this message is in error you may use the continue"
4917 echo " switch (-continue) to $0 to continue."
4923 elif [ "$CFG_GLIB" = "no" ]; then
4928 # auto-detect FontConfig support
4929 if [ "$CFG_FONTCONFIG" != "no" ]; then
4930 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4931 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4932 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4934 QT_CFLAGS_FONTCONFIG=
4935 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4937 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
4939 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4940 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4941 CFG_LIBFREETYPE=system
4943 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4944 echo "FontConfig support cannot be enabled due to functionality tests!"
4945 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4946 echo " If you believe this message is in error you may use the continue"
4947 echo " switch (-continue) to $0 to continue."
4956 if [ "$BUILD_ON_MAC" = "yes" ]; then
4957 if [ "$CFG_PHONON" != "no" ]; then
4958 # Always enable Phonon (unless it was explicitly disabled)
4962 if [ "$CFG_COREWLAN" = "auto" ]; then
4963 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
4971 if [ "$PLATFORM_QPA" = "yes" ]; then
4972 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4973 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4974 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
4976 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
4979 if [ "$CFG_OPENGL" = "yes" ]; then
4980 echo "All the OpenGL functionality tests failed!"
4981 echo " You might need to modify the include and library search paths by editing"
4982 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4983 echo " ${XQMAKESPEC}."
4988 elif [ "$CFG_OPENGL" = "es2" ]; then
4990 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4991 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4992 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4993 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4994 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4995 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4996 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4997 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5000 "$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
5001 if [ $? != "0" ]; then
5002 echo "The OpenGL ES 2.0 functionality test failed!"
5003 echo " You might need to modify the include and library search paths by editing"
5004 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5005 echo " ${XQMAKESPEC}."
5008 elif [ "$CFG_OPENGL" = "desktop" ]; then
5009 # Desktop OpenGL support
5010 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5011 if [ $? != "0" ]; then
5012 echo "The OpenGL functionality test failed!"
5013 echo " You might need to modify the include and library search paths by editing"
5014 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5015 echo " ${XQMAKESPEC}."
5020 # auto-detect FontConfig support
5021 if [ "$CFG_FONTCONFIG" != "no" ]; then
5022 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5023 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5024 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5026 QT_CFLAGS_FONTCONFIG=
5027 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5029 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
5030 QT_CONFIG="$QT_CONFIG fontconfig"
5031 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5032 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5033 CFG_LIBFREETYPE=system
5038 # Save these for a check later
5039 ORIG_CFG_XCB="$CFG_XCB"
5040 ORIG_CFG_EGLFS="$CFG_EGLFS"
5042 if [ "$CFG_LIBUDEV" != "no" ]; then
5043 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5044 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5045 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5046 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5047 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5049 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
5051 QT_CONFIG="$QT_CONFIG libudev"
5052 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5053 echo "The libudev functionality test failed!"
5057 QMakeVar add DEFINES QT_NO_LIBUDEV
5061 if [ "$CFG_EVDEV" != "no" ]; then
5062 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5064 QT_CONFIG="$QT_CONFIG evdev"
5065 elif [ "$CFG_EVDEV" = "yes" ]; then
5066 echo "The evdev functionality test failed!"
5070 QMakeVar add DEFINES QT_NO_EVDEV
5074 # Check we actually have X11 :-)
5075 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
5076 QT_CONFIG="$QT_CONFIG xlib"
5079 # auto-detect Xrender support
5080 if [ "$CFG_XRENDER" != "no" ]; then
5081 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
5083 QT_CONFIG="$QT_CONFIG xrender"
5085 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5086 echo "Xrender support cannot be enabled due to functionality tests!"
5087 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5088 echo " If you believe this message is in error you may use the continue"
5089 echo " switch (-continue) to $0 to continue."
5097 if [ "$CFG_XCB" != "no" ]; then
5098 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
5099 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5100 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5102 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
5104 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
5105 QT_CONFIG="$QT_CONFIG xcb-render"
5108 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
5110 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5113 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
5114 QT_CONFIG="$QT_CONFIG xcb-xlib"
5117 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5118 # auto-detect XInput2/Xinput support
5119 if [ "$CFG_XINPUT2" != "no" ]; then
5120 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
5124 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5125 echo "XInput2 support cannot be enabled due to functionality tests!"
5126 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5127 echo " If you believe this message is in error you may use the continue"
5128 echo " switch (-continue) to $0 to continue."
5137 if [ "$CFG_XCB" = "yes" ]; then
5138 echo "The XCB test failed!"
5139 echo " You might need to install dependency packages."
5140 echo " See src/plugins/platforms/xcb/README."
5144 QMakeVar add DEFINES QT_NO_XCB
5148 # Detect libxkbcommon
5149 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5150 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5151 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5152 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5153 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5155 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5159 if [ "$CFG_EGL" != "no" ]; then
5160 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
5161 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5162 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
5163 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
5164 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
5165 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
5166 fi # detect EGL support
5167 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
5169 elif [ "$CFG_EGL" = "yes" ]; then
5170 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
5171 echo " You might need to modify the include and library search paths by editing"
5172 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
5179 if [ "$CFG_EGLFS" != "no" ]; then
5180 CFG_EGLFS="$CFG_EGL"
5183 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5184 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5185 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5186 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5189 if [ "$BUILD_ON_MAC" = "yes" ]; then
5190 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
5191 QT_CONFIG="$QT_CONFIG coreservices"
5193 QMakeVar add DEFINES QT_NO_CORESERVICES
5197 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5198 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
5199 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
5200 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
5201 echo "No QPA platform plugin enabled!"
5202 echo " If you really want to build without a QPA platform plugin you must pass"
5203 echo " -no-xcb and -no-eglfs to configure. Doing this will"
5204 echo " produce a Qt that cannot run GUI applications."
5205 echo " The dependencies needed for xcb to build are listed in"
5206 echo " src/plugins/platforms/xcb/README"
5214 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5217 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5218 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5219 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
5220 CFG_LIBFREETYPE=system
5227 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5231 if [ "$CFG_STL" != "no" ]; then
5232 if [ "$HAVE_STL" = "yes" ]; then
5235 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5236 echo "STL support cannot be enabled due to functionality tests!"
5237 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5238 echo " If you believe this message is in error you may use the continue"
5239 echo " switch (-continue) to $0 to continue."
5247 # detect POSIX clock_gettime()
5248 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5249 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
5250 CFG_CLOCK_GETTIME=yes
5252 CFG_CLOCK_GETTIME=no
5256 # detect POSIX monotonic clocks
5257 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5258 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
5259 CFG_CLOCK_MONOTONIC=yes
5261 CFG_CLOCK_MONOTONIC=no
5263 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5264 CFG_CLOCK_MONOTONIC=no
5268 if [ "$CFG_MREMAP" = "auto" ]; then
5269 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5276 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5277 if [ "$CFG_GETADDRINFO" != "no" ]; then
5278 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5281 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5282 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5283 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5284 echo " If you believe this message is in error you may use the continue"
5285 echo " switch (-continue) to $0 to continue."
5293 # find if the platform provides inotify
5294 if [ "$CFG_INOTIFY" != "no" ]; then
5295 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5298 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5299 echo "inotify support cannot be enabled due to functionality tests!"
5300 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5301 echo " If you believe this message is in error you may use the continue"
5302 echo " switch (-continue) to $0 to continue."
5310 # find if the platform provides if_nametoindex (ipv6 interface name support)
5311 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5312 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
5315 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5316 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5317 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5318 echo " If you believe this message is in error you may use the continue"
5319 echo " switch (-continue) to $0 to continue."
5327 # find if the platform provides getifaddrs (network interface enumeration)
5328 if [ "$CFG_GETIFADDRS" != "no" ]; then
5329 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5332 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5333 echo "getifaddrs support cannot be enabled due to functionality tests!"
5334 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5335 echo " If you believe this message is in error you may use the continue"
5336 echo " switch (-continue) to $0 to continue."
5345 if [ "$CFG_OPENSSL" != "no" ]; then
5346 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
5347 if [ "$CFG_OPENSSL" = "auto" ]; then
5351 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5352 echo "OpenSSL support cannot be enabled due to functionality tests!"
5353 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5354 echo " If you believe this message is in error you may use the continue"
5355 echo " switch (-continue) to $0 to continue."
5364 if [ "$CFG_PCRE" != "qt" ]; then
5365 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5368 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5369 echo "PCRE support cannot be enabled due to functionality tests!"
5370 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5371 echo " If you believe this message is in error you may use the continue"
5372 echo " switch (-continue) to $0 to continue."
5380 # detect OpenVG support
5381 if [ "$CFG_OPENVG" != "no" ]; then
5382 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
5383 if [ "$CFG_OPENVG" = "auto" ]; then
5386 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
5387 if [ "$CFG_OPENVG" = "auto" ]; then
5390 CFG_OPENVG_ON_OPENGL=yes
5391 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
5392 if [ "$CFG_OPENVG" = "auto" ]; then
5395 CFG_OPENVG_LC_INCLUDES=yes
5396 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
5397 if [ "$CFG_OPENVG" = "auto" ]; then
5400 CFG_OPENVG_LC_INCLUDES=yes
5401 CFG_OPENVG_ON_OPENGL=yes
5403 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5404 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5405 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5406 echo " If you believe this message is in error you may use the continue"
5407 echo " switch (-continue) to $0 to continue."
5413 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
5414 CFG_OPENVG_SHIVA=yes
5418 if [ "$CFG_ALSA" = "auto" ]; then
5419 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5426 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5427 if [ "$CFG_ARCH" = "arm" ]; then
5428 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5429 if [ $? != "0" ]; then
5430 CFG_JAVASCRIPTCORE_JIT=no
5433 case "$XPLATFORM" in
5435 CFG_JAVASCRIPTCORE_JIT=no
5441 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5442 QMakeVar set JAVASCRIPTCORE_JIT yes
5443 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5444 QMakeVar set JAVASCRIPTCORE_JIT no
5447 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5448 CFG_AUDIO_BACKEND=yes
5451 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5452 echo "Warning: largefile support cannot be disabled for win32."
5456 #-------------------------------------------------------------------------------
5457 # ask for all that hasn't been auto-detected or specified in the arguments
5458 #-------------------------------------------------------------------------------
5460 # enable dwarf2 support on Mac
5461 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5462 QT_CONFIG="$QT_CONFIG dwarf2"
5465 # Detect the default arch (x86 or x86_64) on Mac OS X
5466 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5468 case `file "${outpath}/bin/qmake"` in
5476 # unsupported/unknown
5480 if [ -n "$DEFAULT_ARCH" ]; then
5481 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5482 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5483 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5484 # Make the application arch follow the Qt arch
5485 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5490 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5491 QT_CONFIG="$QT_CONFIG phonon-backend"
5494 # disable accessibility
5495 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5496 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5498 QT_CONFIG="$QT_CONFIG accessibility"
5502 if [ "$CFG_EGL" = "yes" ]; then
5503 QT_CONFIG="$QT_CONFIG egl"
5505 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5509 if [ "$CFG_EGLFS" = "yes" ]; then
5510 QT_CONFIG="$QT_CONFIG eglfs"
5512 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5516 if [ "$CFG_OPENVG" = "no" ]; then
5517 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5519 QT_CONFIG="$QT_CONFIG openvg"
5520 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5521 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5523 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5524 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5526 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5527 QT_CONFIG="$QT_CONFIG shivavg"
5528 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5533 if [ "$CFG_OPENGL" = "no" ]; then
5534 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5536 QT_CONFIG="$QT_CONFIG opengl"
5539 if [ "$CFG_OPENGL" = "es2" ]; then
5540 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5543 if [ "$CFG_OPENGL" = "es2" ]; then
5544 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5545 QT_CONFIG="$QT_CONFIG opengles2"
5548 # safe execution environment
5549 if [ "$CFG_SXE" != "no" ]; then
5550 QT_CONFIG="$QT_CONFIG sxe"
5553 # build up the variables for output
5554 if [ "$CFG_DEBUG" = "yes" ]; then
5555 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5556 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5557 elif [ "$CFG_DEBUG" = "no" ]; then
5558 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5559 QMAKE_CONFIG="$QMAKE_CONFIG release"
5561 if [ "$CFG_SHARED" = "yes" ]; then
5562 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5563 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5564 elif [ "$CFG_SHARED" = "no" ]; then
5565 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5566 QMAKE_CONFIG="$QMAKE_CONFIG static"
5568 if [ "$PLATFORM_QPA" = "yes" ]; then
5569 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5570 QT_CONFIG="$QT_CONFIG qpa"
5571 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5572 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5575 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5576 # Do not set this here for Windows. Let qmake do it so
5577 # debug and release precompiled headers are kept separate.
5578 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5580 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5581 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5582 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5583 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5584 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5585 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5587 if [ "$CFG_STL" = "no" ]; then
5588 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5590 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5592 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5593 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5595 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5596 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5597 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5598 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5599 QMakeVar add QMAKE_CFLAGS -g
5600 QMakeVar add QMAKE_CXXFLAGS -g
5601 QT_CONFIG="$QT_CONFIG separate_debug_info"
5603 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5604 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5606 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5607 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5608 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5609 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5610 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5611 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5612 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5613 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5614 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5615 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5616 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5617 if [ "$CFG_ARCH" = "mips" ]; then
5618 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5619 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5621 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5622 QT_CONFIG="$QT_CONFIG clock-gettime"
5624 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5625 QT_CONFIG="$QT_CONFIG clock-monotonic"
5627 if [ "$CFG_MREMAP" = "yes" ]; then
5628 QT_CONFIG="$QT_CONFIG mremap"
5630 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5631 QT_CONFIG="$QT_CONFIG getaddrinfo"
5633 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5634 QT_CONFIG="$QT_CONFIG ipv6ifname"
5636 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5637 QT_CONFIG="$QT_CONFIG getifaddrs"
5639 if [ "$CFG_INOTIFY" = "yes" ]; then
5640 QT_CONFIG="$QT_CONFIG inotify"
5642 if [ "$CFG_LIBJPEG" = "no" ]; then
5644 elif [ "$CFG_LIBJPEG" = "system" ]; then
5645 QT_CONFIG="$QT_CONFIG system-jpeg"
5647 if [ "$CFG_JPEG" = "no" ]; then
5648 QT_CONFIG="$QT_CONFIG no-jpeg"
5649 elif [ "$CFG_JPEG" = "yes" ]; then
5650 QT_CONFIG="$QT_CONFIG jpeg"
5652 if [ "$CFG_LIBPNG" = "no" ]; then
5655 if [ "$CFG_LIBPNG" = "system" ]; then
5656 QT_CONFIG="$QT_CONFIG system-png"
5658 if [ "$CFG_PNG" = "no" ]; then
5659 QT_CONFIG="$QT_CONFIG no-png"
5660 elif [ "$CFG_PNG" = "yes" ]; then
5661 QT_CONFIG="$QT_CONFIG png"
5663 if [ "$CFG_GIF" = "no" ]; then
5664 QT_CONFIG="$QT_CONFIG no-gif"
5665 elif [ "$CFG_GIF" = "yes" ]; then
5666 QT_CONFIG="$QT_CONFIG gif"
5668 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5669 QT_CONFIG="$QT_CONFIG no-freetype"
5670 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5671 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5672 QT_CONFIG="$QT_CONFIG system-freetype"
5674 QT_CONFIG="$QT_CONFIG freetype"
5676 if [ "$CFG_GUI" = "auto" ]; then
5679 if [ "$CFG_GUI" = "no" ]; then
5680 QT_CONFIG="$QT_CONFIG no-gui"
5683 if [ "$CFG_WIDGETS" = "no" ]; then
5684 QT_CONFIG="$QT_CONFIG no-widgets"
5685 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5688 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5689 #On Mac we implicitly link against libz, so we
5690 #never use the 3rdparty stuff.
5691 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5693 if [ "$CFG_ZLIB" = "yes" ]; then
5694 QT_CONFIG="$QT_CONFIG zlib"
5695 elif [ "$CFG_ZLIB" = "system" ]; then
5696 QT_CONFIG="$QT_CONFIG system-zlib"
5699 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5700 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5701 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5702 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5703 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5704 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5705 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5706 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5707 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5708 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
5709 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5710 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5711 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5712 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5713 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5715 if [ "$PLATFORM_X11" = "yes" ]; then
5716 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5718 # for some reason, the following libraries are not always built shared,
5719 # so *every* program/lib (including Qt) has to link against them
5720 if [ "$CFG_XSHAPE" = "yes" ]; then
5721 QT_CONFIG="$QT_CONFIG xshape"
5723 if [ "$CFG_XVIDEO" = "yes" ]; then
5724 QT_CONFIG="$QT_CONFIG xvideo"
5726 if [ "$CFG_XSYNC" = "yes" ]; then
5727 QT_CONFIG="$QT_CONFIG xsync"
5729 if [ "$CFG_XINERAMA" = "yes" ]; then
5730 QT_CONFIG="$QT_CONFIG xinerama"
5731 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5733 if [ "$CFG_XCURSOR" = "yes" ]; then
5734 QT_CONFIG="$QT_CONFIG xcursor"
5735 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5737 if [ "$CFG_XFIXES" = "yes" ]; then
5738 QT_CONFIG="$QT_CONFIG xfixes"
5739 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5741 if [ "$CFG_XRANDR" = "yes" ]; then
5742 QT_CONFIG="$QT_CONFIG xrandr"
5743 if [ "$CFG_XRENDER" != "yes" ]; then
5744 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5745 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5747 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5750 if [ "$CFG_XRENDER" = "yes" ]; then
5751 QT_CONFIG="$QT_CONFIG xrender"
5752 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5754 if [ "$CFG_MITSHM" = "yes" ]; then
5755 QT_CONFIG="$QT_CONFIG mitshm"
5757 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5758 QT_CONFIG="$QT_CONFIG fontconfig"
5760 if [ "$CFG_XINPUT" = "yes" ]; then
5761 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5763 if [ "$CFG_XINPUT" = "yes" ]; then
5764 QT_CONFIG="$QT_CONFIG xinput tablet"
5766 if [ "$CFG_XKB" = "yes" ]; then
5767 QT_CONFIG="$QT_CONFIG xkb"
5771 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5772 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5773 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5775 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5776 if [ "$CFG_RPATH" = "yes" ]; then
5777 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5778 # set the default rpath to the library installation directory
5779 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5781 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5782 if [ -n "$RPATH_FLAGS" ]; then
5784 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5788 elif [ "$CFG_RPATH" = "yes" ]; then
5789 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5793 if [ "$CFG_RPATH" = "yes" ]; then
5794 # set the default rpath to the library installation directory
5795 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5797 if [ -n "$RPATH_FLAGS" ]; then
5798 # add the user defined rpaths
5799 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5803 if [ '!' -z "$I_FLAGS" ]; then
5804 # add the user define include paths
5805 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5806 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5809 if [ '!' -z "$W_FLAGS" ]; then
5810 # add the user defined warning flags
5811 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5812 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5813 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5816 # turn off exceptions for the compilers that support it
5817 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5818 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5820 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5823 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5824 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5827 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5828 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5829 # Follow default behavior of configure.exe by overriding with "rtti".
5830 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5833 if [ "$CFG_ALSA" = "yes" ]; then
5834 QT_CONFIG="$QT_CONFIG alsa"
5837 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5838 QT_CONFIG="$QT_CONFIG pulseaudio"
5841 if [ "$CFG_COREWLAN" = "yes" ]; then
5842 QT_CONFIG="$QT_CONFIG corewlan"
5845 if [ "$CFG_ICU" = "yes" ]; then
5846 QT_CONFIG="$QT_CONFIG icu"
5849 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5850 QT_CONFIG="$QT_CONFIG force_asserts"
5853 if [ "$CFG_PCRE" = "qt" ]; then
5854 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5858 # Some Qt modules are too advanced in C++ for some old compilers
5859 # Detect here the platforms where they are known to work.
5861 # See Qt documentation for more information on which features are
5862 # supported and on which compilers.
5864 canBuildQtConcurrent="yes"
5865 canUseV8Snapshot="yes"
5867 case "$XPLATFORM" in
5869 # PA-RISC's assembly is too limited
5870 # gcc 3.4 on that platform can't build QtXmlPatterns
5871 # the assembly it generates cannot be compiled
5873 # Check gcc's version
5874 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5878 canBuildQtXmlPatterns="no"
5882 canBuildQtXmlPatterns="no"
5886 unsupported/vxworks-*-g++*)
5889 unsupported/vxworks-*-dcc*)
5891 canBuildQtXmlPatterns="no"
5894 # Check gcc's version
5895 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5903 canBuildQtXmlPatterns="no"
5908 # Check the compiler version
5909 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5912 canBuildQtXmlPatterns="no"
5913 canBuildQtConcurrent="no"
5917 canBuildQtConcurrent="no"
5923 canBuildQtXmlPatterns="no"
5924 canBuildQtConcurrent="no"
5930 # Get the xlC version
5931 cat > xlcver.c <<EOF
5935 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5940 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5941 xlcver=`./xlcver 2>/dev/null`
5944 if [ "$OPT_VERBOSE" = "yes" ]; then
5945 if [ -n "$xlcver" ]; then
5946 echo Found IBM xlC version: $xlcver.
5948 echo Could not determine IBM xlC version, assuming oldest supported.
5955 canBuildQtXmlPatterns="no"
5956 canBuildQtConcurrent="no"
5960 canBuildQtConcurrent="no"
5966 canBuildQtConcurrent="no"
5970 if [ "$CFG_GUI" = "no" ]; then
5971 # WebKit requires QtGui
5975 if [ "$CFG_SHARED" = "no" ]; then
5977 echo "WARNING: Using static linking will disable the WebKit module."
5982 CFG_CONCURRENT="yes"
5983 if [ "$canBuildQtConcurrent" = "no" ]; then
5984 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5987 QT_CONFIG="$QT_CONFIG concurrent"
5991 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5992 QT_CONFIG="$QT_CONFIG audio-backend"
5996 if [ "$CFG_WEBKIT" = "debug" ]; then
5997 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6001 QT_CONFIG="$QT_CONFIG v8"
6002 # Detect snapshot support
6003 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6004 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6007 *) canUseV8Snapshot="no"
6011 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6012 # QEMU crashes when building inside Scratchbox with an ARM target
6013 canUseV8Snapshot="no"
6016 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6017 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6019 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6020 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6023 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6024 QT_CONFIG="$QT_CONFIG v8snapshot"
6028 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6029 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6032 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6035 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6036 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6037 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6042 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6043 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6044 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6051 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6057 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6059 case "$COMPILER_VERSION" in
6061 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6062 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6063 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6066 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6067 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6068 QT_GCC_PATCH_VERSION=0
6078 #-------------------------------------------------------------------------------
6079 # part of configuration information goes into qconfig.h
6080 #-------------------------------------------------------------------------------
6082 case "$CFG_QCONFIG" in
6084 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6087 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6088 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6089 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6090 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6091 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6092 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6094 echo "#endif" >>"$tmpconfig"
6098 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6102 # define QT_EDITION $QT_EDITION
6106 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6107 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6109 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6110 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6113 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6114 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6117 if [ "$BUILD_ON_MAC" = "yes" ]; then
6118 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6119 #if defined(__LP64__)
6120 # define QT_POINTER_SIZE 8
6122 # define QT_POINTER_SIZE 4
6126 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6127 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6130 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6131 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6132 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6136 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6138 if [ "$CFG_DEV" = "yes" ]; then
6139 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6142 if [ "$PLATFORM_QPA" = "yes" ]; then
6143 # Add QPA to config.h
6144 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6147 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6148 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6151 # Add turned on SQL drivers
6152 for DRIVER in $CFG_SQL_AVAILABLE; do
6153 eval "VAL=\$CFG_SQL_$DRIVER"
6156 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6157 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6158 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6161 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6167 QMakeVar set sql-drivers "$SQL_DRIVERS"
6168 QMakeVar set sql-plugins "$SQL_PLUGINS"
6170 # Add other configuration options to the qconfig.h file
6171 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6172 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6173 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6174 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6175 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6176 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6177 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6179 # X11/Unix/Mac only configs
6180 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6181 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6182 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6183 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6184 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6185 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6186 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6187 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6188 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6189 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6190 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6191 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6192 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6193 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6194 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6196 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6197 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6198 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6199 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6200 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6201 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6202 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6203 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6204 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6205 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6206 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6207 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6208 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6210 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6211 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6212 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6213 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6214 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6215 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6216 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6217 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6219 # sort QCONFIG_FLAGS for neatness if we can
6220 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6221 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6223 if [ -n "$QCONFIG_FLAGS" ]; then
6224 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6225 #ifndef QT_BOOTSTRAPPED
6228 for cfg in $QCONFIG_FLAGS; do
6229 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6230 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6231 # figure out define logic, so we can output the correct
6232 # ifdefs to override the global defines in a project
6234 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6235 # QT_NO_option can be forcefully turned on by QT_option
6236 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6237 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6238 # QT_option can be forcefully turned off by QT_NO_option
6239 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6242 if [ -z $cfgdNeg ]; then
6243 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6250 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6251 #if defined($cfgd) && defined($cfgdNeg)
6253 #elif !defined($cfgd) && !defined($cfgdNeg)
6260 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6261 #endif // QT_BOOTSTRAPPED
6266 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6267 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6268 #define QT_VISIBILITY_AVAILABLE
6273 if [ -n "$QT_LIBINFIX" ]; then
6274 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6275 #define QT_LIBINFIX "$QT_LIBINFIX"
6280 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6281 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6282 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6284 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6285 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6286 chmod -w "$outpath/src/corelib/global/qconfig.h"
6287 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6288 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6292 #-------------------------------------------------------------------------------
6293 # save configuration into qconfig.pri
6294 #-------------------------------------------------------------------------------
6295 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6296 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6297 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6298 if [ "$CFG_DEBUG" = "yes" ]; then
6299 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6300 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6301 QT_CONFIG="$QT_CONFIG release"
6303 QT_CONFIG="$QT_CONFIG debug"
6304 elif [ "$CFG_DEBUG" = "no" ]; then
6305 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6306 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6307 QT_CONFIG="$QT_CONFIG debug"
6309 QT_CONFIG="$QT_CONFIG release"
6311 if [ "$CFG_STL" = "yes" ]; then
6312 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6314 if [ "$CFG_FRAMEWORK" = "no" ]; then
6315 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6317 QT_CONFIG="$QT_CONFIG qt_framework"
6318 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6320 if [ "$CFG_DEV" = "yes" ]; then
6321 QT_CONFIG="$QT_CONFIG private_tests"
6324 cat >>"$QTCONFIG.tmp" <<EOF
6326 CONFIG += $QTCONFIG_CONFIG
6328 QT_HOST_ARCH = $CFG_HOST_ARCH
6329 QT_EDITION = $Edition
6330 QT_CONFIG += $QT_CONFIG
6333 QT_VERSION = $QT_VERSION
6334 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6335 QT_MINOR_VERSION = $QT_MINOR_VERSION
6336 QT_PATCH_VERSION = $QT_PATCH_VERSION
6339 QT_LIBINFIX = $QT_LIBINFIX
6340 QT_NAMESPACE = $QT_NAMESPACE
6343 if [ -n "$CFG_SYSROOT" ]; then
6344 echo "# sysroot" >>"$QTCONFIG.tmp"
6345 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6346 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6347 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6348 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6349 echo "}" >> "$QTCONFIG.tmp"
6350 echo >> "$QTCONFIG.tmp"
6352 if [ -n "$RPATH_FLAGS" ]; then
6353 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
6355 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6356 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6357 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6358 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6361 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6362 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6363 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6366 # replace qconfig.pri if it differs from the newly created temp file
6367 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6368 rm -f "$QTCONFIG.tmp"
6370 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6373 #-------------------------------------------------------------------------------
6374 # save configuration into qmodule.pri
6375 #-------------------------------------------------------------------------------
6376 QTMODULE="$outpath/mkspecs/qmodule.pri"
6378 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6380 # Ensure we can link to uninistalled libraries
6381 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6382 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6384 if [ -n "$QT_CFLAGS_PSQL" ]; then
6385 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6387 if [ -n "$QT_LFLAGS_PSQL" ]; then
6388 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6390 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6391 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6393 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6394 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6396 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6397 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6399 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6400 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6402 if [ -n "$QT_LFLAGS_ODBC" ]; then
6403 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6405 if [ -n "$QT_LFLAGS_TDS" ]; then
6406 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6409 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6410 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6413 #dump in the OPENSSL_LIBS info
6414 if [ '!' -z "$OPENSSL_LIBS" ]; then
6415 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6416 elif [ "$CFG_OPENSSL" = "linked" ]; then
6417 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6420 #dump in the SDK info
6421 if [ '!' -z "$CFG_SDK" ]; then
6422 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6426 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6427 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6429 # replace qmodule.pri if it differs from the newly created temp file
6430 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6431 rm -f "$QTMODULE.tmp"
6433 mv -f "$QTMODULE.tmp" "$QTMODULE"
6436 #-------------------------------------------------------------------------------
6437 # save configuration into .qmake.cache
6438 #-------------------------------------------------------------------------------
6440 CACHEFILE="$outpath/.qmake.cache"
6441 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6442 cat >>"$CACHEFILE.tmp" <<EOF
6444 QT_SOURCE_TREE = \$\$quote($relpath)
6445 QT_BUILD_TREE = \$\$quote($outpath)
6446 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6448 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6449 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6450 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6452 include(\$\$PWD/mkspecs/qmodule.pri)
6453 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6457 #dump the qmake spec
6458 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6459 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6461 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6464 # replace .qmake.cache if it differs from the newly created temp file
6465 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6466 rm -f "$CACHEFILE.tmp"
6468 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6471 #-------------------------------------------------------------------------------
6472 # give feedback on configuration
6473 #-------------------------------------------------------------------------------
6477 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6480 This target is using the GNU C++ compiler ($PLATFORM).
6482 Recent versions of this compiler automatically include code for
6483 exceptions, which increase both the size of the Qt libraries and
6484 the amount of memory taken by your applications.
6486 You may choose to re-run `basename $0` with the -no-exceptions
6487 option to compile Qt without exceptions. This is completely binary
6488 compatible, and existing applications will continue to work.
6496 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6499 This target is using the MIPSpro C++ compiler ($PLATFORM).
6501 You may choose to re-run `basename $0` with the -no-exceptions
6502 option to compile Qt without exceptions. This will make the
6503 size of the Qt library smaller and reduce the amount of memory
6504 taken by your applications.
6516 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6517 echo "Build type: $PLATFORM"
6519 echo "Building on: $PLATFORM"
6520 echo "Building for: $XPLATFORM"
6523 echo "Architecture: $CFG_ARCH"
6524 if [ "$PLATFORM_QPA" = "yes" ]; then
6525 echo "Host architecture: $CFG_HOST_ARCH"
6528 if [ -n "$PLATFORM_NOTES" ]; then
6529 echo "Platform notes:"
6530 echo "$PLATFORM_NOTES"
6535 if [ "$OPT_VERBOSE" = "yes" ]; then
6536 echo $ECHO_N "qmake vars .......... $ECHO_C"
6537 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6538 echo "qmake switches ......... $QMAKE_SWITCHES"
6541 echo "Build .................. $CFG_BUILD_PARTS"
6542 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6543 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6544 echo "Debug .................. yes (combined)"
6545 if [ "$CFG_DEBUG" = "yes" ]; then
6546 echo "Default Link ........... debug"
6548 echo "Default Link ........... release"
6551 echo "Debug .................. $CFG_DEBUG"
6553 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6554 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6555 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6556 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6557 echo "QtGui module ........... $CFG_GUI"
6558 echo "QtWidgets module ....... $CFG_WIDGETS"
6559 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6560 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6562 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6564 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6565 echo "STL support ............ $CFG_STL"
6566 echo "PCH support ............ $CFG_PRECOMPILE"
6567 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6568 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6569 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6570 echo "AVX..................... ${CFG_AVX}"
6571 elif [ "$CFG_ARCH" = "arm" ]; then
6572 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6573 echo "NEON support ........... ${CFG_NEON}"
6575 if [ "$CFG_ARCH" = "mips" ]; then
6576 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
6578 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6579 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6580 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6581 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6582 echo "NIS support ............ $CFG_NIS"
6583 echo "CUPS support ........... $CFG_CUPS"
6584 echo "Iconv support .......... $CFG_ICONV"
6585 echo "Glib support ........... $CFG_GLIB"
6586 echo "GStreamer support ...... $CFG_GSTREAMER"
6587 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6588 echo "Large File support ..... $CFG_LARGEFILE"
6589 echo "GIF support ............ $CFG_GIF"
6590 if [ "$CFG_JPEG" = "no" ]; then
6591 echo "JPEG support ........... $CFG_JPEG"
6593 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6595 if [ "$CFG_PNG" = "no" ]; then
6596 echo "PNG support ............ $CFG_PNG"
6598 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6600 echo "zlib support ........... $CFG_ZLIB"
6601 echo "Session management ..... $CFG_SM"
6602 echo "libudev support ........ $CFG_LIBUDEV"
6604 if [ "$CFG_OPENGL" = "desktop" ]; then
6605 echo "OpenGL support ......... yes (Desktop OpenGL)"
6606 elif [ "$CFG_OPENGL" = "es2" ]; then
6607 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6609 echo "OpenGL support ......... no"
6612 if [ "$CFG_OPENVG" ]; then
6613 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6614 echo "OpenVG support ......... ShivaVG"
6616 echo "OpenVG support ......... $CFG_OPENVG"
6619 if [ "$PLATFORM_X11" = "yes" ]; then
6620 echo "NAS sound support ...... $CFG_NAS"
6621 echo "XShape support ......... $CFG_XSHAPE"
6622 echo "XVideo support ......... $CFG_XVIDEO"
6623 echo "XSync support .......... $CFG_XSYNC"
6624 echo "Xinerama support ....... $CFG_XINERAMA"
6625 echo "Xcursor support ........ $CFG_XCURSOR"
6626 echo "Xfixes support ......... $CFG_XFIXES"
6627 echo "Xrandr support ......... $CFG_XRANDR"
6628 echo "Xi support ............. $CFG_XINPUT"
6629 echo "MIT-SHM support ........ $CFG_MITSHM"
6630 echo "FontConfig support ..... $CFG_FONTCONFIG"
6631 echo "XKB Support ............ $CFG_XKB"
6632 echo "immodule support ....... $CFG_IM"
6633 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6635 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6636 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6637 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6638 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6639 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6640 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6641 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6642 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6643 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6646 if [ "$CFG_OPENSSL" = "yes" ]; then
6647 OPENSSL_LINKAGE="(run-time)"
6648 elif [ "$CFG_OPENSSL" = "linked" ]; then
6649 OPENSSL_LINKAGE="(linked)"
6651 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6652 echo "Alsa support ........... $CFG_ALSA"
6653 if [ "$BUILD_ON_MAC" = "yes" ]; then
6654 echo "CoreWlan support ....... $CFG_COREWLAN"
6656 echo "libICU support ......... $CFG_ICU"
6657 echo "PCRE support ........... $CFG_PCRE"
6658 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6659 echo "Xcb support ............ limited (old version)"
6661 echo "Xcb support ............ $CFG_XCB"
6663 echo "Xrender support ........ $CFG_XRENDER"
6664 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6665 echo "XInput2 support ........ $CFG_XINPUT2"
6667 echo "EGLFS support .......... $CFG_EGLFS"
6670 # complain about not being able to use dynamic plugins if we are using a static build
6671 if [ "$CFG_SHARED" = "no" ]; then
6673 echo "WARNING: Using static linking will disable the use of dynamically"
6674 echo "loaded plugins. Make sure to import all needed static plugins,"
6675 echo "or compile needed modules into the library."
6678 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6680 echo "NOTE: When linking against OpenSSL, you can override the default"
6681 echo "library names through OPENSSL_LIBS."
6683 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6686 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6688 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6689 echo "if you want a pure debug build."
6694 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6699 #-------------------------------------------------------------------------------
6700 # build makefiles based on the configuration
6701 #-------------------------------------------------------------------------------
6703 echo "Finding project files. Please wait..."
6704 if [ "$CFG_NOPROCESS" != "yes" ]; then
6705 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6706 if [ -f "${relpath}/qtbase.pro" ]; then
6707 mkfile="${outpath}/Makefile"
6708 [ -f "$mkfile" ] && chmod +w "$mkfile"
6709 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6713 # .projects -> projects to process
6714 # .projects.1 -> qt and moc
6715 # .projects.2 -> subdirs and libs
6716 # .projects.3 -> the rest
6717 rm -f .projects .projects.1 .projects.2 .projects.3
6719 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6720 if [ -z "$AWK" ]; then
6721 for p in `echo $QMAKE_PROJECTS`; do
6722 echo "$p" >> .projects
6725 cat >projects.awk <<EOF
6731 first = "./.projects.1.tmp"
6732 second = "./.projects.2.tmp"
6733 third = "./.projects.3.tmp"
6738 if ( ! target_file )
6740 print input_file >target_file
6745 input_file = FILENAME
6750 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6753 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6754 target_file = second
6759 matched_target == 0 && /^(TEMPLATE.*=)/ {
6760 if ( \$3 == "subdirs" )
6761 target_file = second
6762 else if ( \$3 == "lib" )
6768 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6769 if ( \$0 ~ /plugin/ )
6772 target_file = second
6777 if ( ! target_file )
6779 print input_file >>target_file
6786 for p in `echo $QMAKE_PROJECTS`; do
6787 echo "$p" >> .projects.all
6790 # if you get errors about the length of the command line to awk, change the -l arg
6792 split -l 100 .projects.all .projects.all.
6793 for p in .projects.all.*; do
6794 "$AWK" -f projects.awk `cat $p`
6795 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6796 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6797 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6798 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6800 rm -f .projects.all* projects.awk
6802 [ -f .projects.1 ] && cat .projects.1 >>.projects
6803 [ -f .projects.2 ] && cat .projects.2 >>.projects
6804 rm -f .projects.1 .projects.2
6805 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6806 cat .projects.3 >>.projects
6810 # don't sort Qt and MOC in with the other project files
6811 # also work around a segfaulting uniq(1)
6812 if [ -f .sorted.projects.2 ]; then
6813 sort .sorted.projects.2 > .sorted.projects.2.new
6814 mv -f .sorted.projects.2.new .sorted.projects.2
6815 cat .sorted.projects.2 >> .sorted.projects.1
6817 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6818 rm -f .sorted.projects.2 .sorted.projects.1
6822 if [ -f .projects ]; then
6823 uniq .projects >.tmp
6824 mv -f .tmp .projects
6825 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6827 if [ -f .projects.3 ]; then
6828 uniq .projects.3 >.tmp
6829 mv -f .tmp .projects.3
6830 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6832 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6836 for part in $CFG_BUILD_PARTS; do
6838 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6839 libs) PART_ROOTS="$PART_ROOTS src" ;;
6840 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6841 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6846 if [ "$CFG_DEV" = "yes" ]; then
6847 PART_ROOTS="$PART_ROOTS tests"
6850 echo "Creating makefiles. Please wait..."
6851 for file in .projects .projects.3; do
6852 [ '!' -f "$file" ] && continue
6853 for a in `cat $file`; do
6855 for r in $PART_ROOTS; do
6856 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6861 [ "$IN_ROOT" = "no" ] && continue
6864 *winmain/winmain.pro)
6865 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6869 */qmake/qmake.pro) continue ;;
6870 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6871 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6877 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6878 test -d "$dir" || mkdir -p "$dir"
6879 OUTDIR="$outpath/$dir"
6880 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6881 # fast configure - the makefile exists, skip it
6882 # since the makefile exists, it was generated by qmake, which means we
6883 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6885 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6888 QMAKE_SPEC_ARGS="-spec $SPEC"
6889 echo $ECHO_N " for $a$ECHO_C"
6891 QMAKE="$outpath/bin/qmake"
6892 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6893 if [ "$file" = ".projects.3" ]; then
6896 cat >"${OUTDIR}/Makefile" <<EOF
6897 # ${OUTDIR}/Makefile: generated by configure
6899 # WARNING: This makefile will be replaced with a real makefile.
6900 # All changes made to this file will be lost.
6902 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6904 cat >>"${OUTDIR}/Makefile" <<EOF
6906 all clean install qmake first Makefile: FORCE
6907 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6915 if [ "$OPT_VERBOSE" = "yes" ]; then
6916 echo " (`basename $SPEC`)"
6917 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6922 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6923 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6927 rm -f .projects .projects.3
6929 #-------------------------------------------------------------------------------
6930 # check for platforms that we don't yet know about
6931 #-------------------------------------------------------------------------------
6932 if [ "$CFG_ARCH" = "unknown" ]; then
6935 NOTICE: configure was unable to determine the architecture
6936 for the $XQMAKESPEC target.
6938 Qt will not use a specialized implementation for any atomic
6939 operations. Instead a generic implemention based on either GCC
6940 intrinsics or C++11 std::atomic<T> will be used (when
6941 available). The generic implementations are generally as fast
6942 as and always as safe as a specialized implementation.
6944 If no generic implementation is available, Qt will use a
6945 fallback UNIX implementation which uses a single
6946 pthread_mutex_t to protect all atomic operations. This
6947 implementation is the slow (but safe) fallback implementation
6948 for architectures Qt does not yet support.
6952 #-------------------------------------------------------------------------------
6953 # check if the user passed the -no-zlib option, which is no longer supported
6954 #-------------------------------------------------------------------------------
6955 if [ -n "$ZLIB_FORCED" ]; then
6956 which_zlib="supplied"
6957 if [ "$CFG_ZLIB" = "system" ]; then
6963 NOTICE: The -no-zlib option was supplied but is no longer
6966 Qt now requires zlib support in all builds, so the -no-zlib
6967 option was ignored. Qt will be built using the $which_zlib
6972 #-------------------------------------------------------------------------------
6973 # check if the user passed the obsoleted -wayland or -no-wayland flag
6974 #-------------------------------------------------------------------------------
6975 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6978 NOTICE: The -wayland and -no-wayland flags are now obsolete
6980 All configuring of QtWayland plugin and QtCompositor happens in the module
6984 #-------------------------------------------------------------------------------
6985 # check if the user passed the obsoleted -arch or -host-arch options
6986 #-------------------------------------------------------------------------------
6987 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6990 NOTICE: The -arch and -host-arch options are obsolete.
6992 Qt now detects the target and host architectures based on compiler
6993 output. Qt will be built using $CFG_ARCH for the target architecture
6994 and $CFG_HOST_ARCH for the host architecture (note that these two
6995 will be the same unless you are cross-compiling).
6999 #-------------------------------------------------------------------------------
7000 # finally save the executed command to another script
7001 #-------------------------------------------------------------------------------
7002 if [ `basename $0` != "config.status" ]; then
7003 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7005 # add the system variables
7006 for varname in $SYSTEM_VARIABLES; do
7008 'if [ -n "\$'${varname}'" ]; then
7009 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7014 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7016 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7017 echo "#!/bin/sh" > "$outpath/config.status"
7018 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
7019 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
7020 [ -n "$PKG_CONFIG_LIBDIR" ] && \
7021 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
7022 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7023 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7024 echo "else" >> "$outpath/config.status"
7025 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7026 echo "fi" >> "$outpath/config.status"
7027 chmod +x "$outpath/config.status"
7030 if [ -n "$RPATH_MESSAGE" ]; then
7032 echo "$RPATH_MESSAGE"
7035 MAKE=`basename "$MAKE"`
7037 echo Qt is now configured for building. Just run \'$MAKE\'.
7038 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7039 echo Once everything is built, Qt is installed.
7040 echo You should not run \'$MAKE install\'.
7042 echo Once everything is built, you must run \'$MAKE install\'.
7043 echo Qt will be installed into $QT_INSTALL_PREFIX
7046 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.