2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
134 values["LITERAL_WHITESPACE"] = " "
135 values["LITERAL_DOLLAR"] = "$"
137 /^[_A-Z0-9.]+[ \t]*\+?=/ {
138 valStart = index($0, "=") + 1
141 if (substr($0, valStart - 2, 1) == "+") {
145 variable = substr($0, 0, valStart - 2 - append)
146 value = substr($0, valStart)
147 gsub("[ \t]+", "", variable)
148 gsub("^[ \t]+", "", value)
149 gsub("[ \t]+$", "", value)
152 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
153 ovalue = ovalue substr(value, 1, RSTART - 1)
154 var = substr(value, RSTART + 2, RLENGTH - 2)
155 value = substr(value, RSTART + RLENGTH)
157 var = substr(var, 2, length(var) - 2)
159 ovalue = ovalue values[var]
161 ovalue = ovalue value
163 combinedValue = values[variable]
164 if (append == 1 && length(combinedValue) > 0) {
165 combinedValue = combinedValue " " ovalue
167 combinedValue = ovalue
169 values[variable] = combinedValue
172 for (var in values) {
173 print var "=" values[var]
181 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
184 # relies on $QMAKESPEC being set correctly. parses include statements in
185 # qmake.conf and prints out the expanded file
188 if [ -z "$specvals" ]; then
189 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
191 getQMakeConf3 "$1" "$specvals"
196 if [ -z "$xspecvals" ]; then
197 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
199 getQMakeConf3 "$1" "$xspecvals"
202 # relies on $TEST_COMPILER being set correctly
203 compilerSupportsFlag()
205 cat >conftest.cpp <<EOF
206 int main() { return 0; }
208 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
210 rm -f conftest.cpp conftest.o
214 # relies on $TEST_COMPILER being set correctly
220 safe_flag=`shellEscape "$flag"`
221 lflags=$lflags,$safe_flag
223 compilerSupportsFlag "$lflags" >/dev/null 2>&1
226 #-------------------------------------------------------------------------------
227 # operating system detection
228 #-------------------------------------------------------------------------------
230 # need that throughout the script
231 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
232 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
233 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
234 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
236 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
237 if echo '\c' | grep '\c' >/dev/null; then
243 #-------------------------------------------------------------------------------
244 # window system detection
245 #-------------------------------------------------------------------------------
251 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
256 #-----------------------------------------------------------------------------
257 # Qt version detection
258 #-----------------------------------------------------------------------------
259 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
263 if [ -n "$QT_VERSION" ]; then
264 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
265 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
266 if [ -n "$MAJOR" ]; then
267 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
268 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
269 QT_MAJOR_VERSION="$MAJOR"
270 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
271 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
274 if [ -z "$QT_MAJOR_VERSION" ]; then
275 echo "Cannot process version from qglobal.h: $QT_VERSION"
276 echo "Cannot proceed."
280 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
281 if [ -z "$QT_PACKAGEDATE" ]; then
282 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
283 echo "Cannot proceed"
287 #-------------------------------------------------------------------------------
289 #-------------------------------------------------------------------------------
293 EditionString=Commercial
297 # parse the arguments, setting things to "yes" or "no"
298 while [ "$#" -gt 0 ]; do
302 #Autoconf style options
304 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
308 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
312 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
313 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
316 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
321 # this option may or may not be followed by an argument
322 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
329 -h|help|--help|-help)
330 if [ "$VAL" = "yes" ]; then
332 COMMERCIAL_USER="no" #doesn't matter we will display the help
335 COMMERCIAL_USER="no" #doesn't matter we will display the help
339 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
343 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
350 if [ "$UNKNOWN_ARG" = "yes" ]; then
359 if [ "$PLATFORM_QPA" != "no" ]; then
360 if [ "$PLATFORM_QPA" = "maybe" ]; then
365 echo "No license exists to enable Qt QPA. Disabling."
372 COMMERCIAL_USER="yes"
386 if [ "$COMMERCIAL_USER" = "ask" ]; then
388 echo "Which edition of Qt do you want to use ?"
390 echo "Type 'c' if you want to use the Commercial Edition."
391 echo "Type 'o' if you want to use the Open Source Edition."
395 if [ "$commercial" = "c" ]; then
396 COMMERCIAL_USER="yes"
398 elif [ "$commercial" = "o" ]; then
405 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
406 # Commercial preview release
407 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
410 QT_EDITION="QT_EDITION_DESKTOP"
411 LicenseType="Technology Preview"
412 elif [ $COMMERCIAL_USER = "yes" ]; then
413 # one of commercial editions
414 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
415 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
417 # read in the license file
418 if [ -f "$LICENSE_FILE" ]; then
419 . "$LICENSE_FILE" >/dev/null 2>&1
420 if [ -z "$LicenseKeyExt" ]; then
422 echo "You are using an old license file."
424 echo "Please install the license file supplied by Nokia,"
425 echo "or install the Qt Open Source Edition if you intend to"
426 echo "develop free software."
429 if [ -z "$Licensee" ]; then
431 echo "Invalid license key. Please check the license key."
435 if [ -z "$LicenseKeyExt" ]; then
437 echo $ECHO_N "Please enter your license key: $ECHO_C"
439 Licensee="Unknown user"
444 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
445 && LicenseValid="yes" \
447 if [ "$LicenseValid" != "yes" ]; then
449 echo "Invalid license key. Please check the license key."
452 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
453 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
454 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
455 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
457 # determine which edition we are licensed to use
458 case "$LicenseTypeCode" in
460 LicenseType="Commercial"
464 QT_EDITION="QT_EDITION_UNIVERSAL"
467 Edition="FullFramework"
468 EditionString="Full Framework"
469 QT_EDITION="QT_EDITION_DESKTOP"
472 Edition="GUIFramework"
473 EditionString="GUI Framework"
474 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
479 LicenseType="Evaluation"
480 QMakeVar add DEFINES QT_EVAL
484 QT_EDITION="QT_EDITION_EVALUATION"
489 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
491 echo "Invalid license key. Please check the license key."
495 # verify that we are licensed to use Qt on this platform
497 case "$PlatformCode" in
500 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
504 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
507 ### EMBEDDED_QPA logic missing ###
508 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
509 X9,* | XC,* | XU,* | XW,* | XM,*)
511 LICENSE_EXTENSION="-ALLOS"
513 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
514 # Qt for Embedded Linux
515 LICENSE_EXTENSION="-EMBEDDED"
517 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
519 LICENSE_EXTENSION="-EMBEDDED"
521 FM,*,no | LM,yes,* | ZM,no,no)
523 LICENSE_EXTENSION="-DESKTOP"
527 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
529 echo "You are not licensed for the $Platform platform."
531 echo "Please contact qt-info@nokia.com to upgrade your license to"
532 echo "include the $Platform platform, or install the Qt Open Source Edition"
533 echo "if you intend to develop free software."
538 if test -r "$relpath/.LICENSE"; then
539 # Generic, non-final license
541 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
546 *TECHNOLOGY?PREVIEW*)
553 echo >&2 "Invalid license files; cannot continue"
558 EditionString="$Edition"
559 QT_EDITION="QT_EDITION_DESKTOP"
562 case "$LicenseFeatureCode" in
565 case "$LicenseType" in
567 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
570 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
576 case "$LicenseType" in
578 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
581 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
587 echo "Invalid license key. Please check the license key."
591 case "$LicenseFeatureCode" in
599 if [ '!' -f "$outpath/LICENSE" ]; then
600 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
601 echo "this software has disappeared."
603 echo "Sorry, you are not licensed to use this software."
604 echo "Try re-installing."
608 elif [ $COMMERCIAL_USER = "no" ]; then
609 # Open Source edition - may only be used under the terms of the GPL or LGPL.
610 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
611 Licensee="Open Source"
613 EditionString="Open Source"
614 QT_EDITION="QT_EDITION_OPENSOURCE"
617 #-------------------------------------------------------------------------------
618 # initalize variables
619 #-------------------------------------------------------------------------------
621 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
622 for varname in $SYSTEM_VARIABLES; do
623 qmakevarname="${varname}"
624 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
625 if [ "${varname}" = "LDFLAGS" ]; then
626 qmakevarname="LFLAGS"
627 elif [ "${varname}" = "LD" ]; then
631 'if [ -n "\$'${varname}'" ]; then
632 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
636 # Use CC/CXX to run config.tests
637 mkdir -p "$outpath/config.tests"
638 rm -f "$outpath/config.tests/.qmake.cache"
639 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
641 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
643 # QTDIR may be set and point to an old or system-wide Qt installation
646 # the minimum version of libdbus-1 that we require:
647 MIN_DBUS_1_VERSION=0.93
649 # initalize internal variables
650 CFG_CONFIGURE_EXIT_ON_ERROR=yes
652 CFG_EXCEPTIONS=unspecified
653 CFG_GUI=auto # (yes|no|auto)
679 CFG_OPENVG_LC_INCLUDES=no
680 CFG_OPENVG_SHIVA=auto
681 CFG_OPENVG_ON_OPENGL=auto
683 CFG_EGL_GLES_INCLUDES=no
688 QT_DEFAULT_BUILD_PARTS="libs examples tests"
692 CFG_AUDIO_BACKEND=auto
694 CFG_DECLARATIVE_DEBUG=yes
695 CFG_JAVASCRIPTCORE_JIT=auto
697 # Target architecture
699 # Host architecture, same as CFG_ARCH when not cross-compiling
701 # Set when the -arch or -host-arch arguments are used
702 OPT_OBSOLETE_HOST_ARG=no
712 CFG_OBSOLETE_WAYLAND=no
725 CFG_SEPARATE_DEBUG_INFO=no
726 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
727 CFG_REDUCE_EXPORTS=auto
737 CFG_REDUCE_RELOCATIONS=auto
739 CFG_ACCESSIBILITY=auto
742 CFG_CLOCK_GETTIME=auto
743 CFG_CLOCK_MONOTONIC=auto
751 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
755 CFG_PREFIX_INSTALL=yes
764 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
765 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
769 OPT_CONFIRM_LICENSE=no
783 # initalize variables used for installation
792 QT_INSTALL_TRANSLATIONS=
801 #flags for SQL drivers
809 QT_LFLAGS_ODBC="-lodbc"
812 # flags for libdbus-1
816 # flags for Glib (X11 only)
820 # flags for GStreamer (X11 only)
824 #-------------------------------------------------------------------------------
825 # check SQL drivers available in this package
826 #-------------------------------------------------------------------------------
828 # opensource version removes some drivers, so force them to be off
834 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
835 for a in "$relpath/src/plugins/sqldrivers/"*; do
837 base_a=`basename "$a"`
838 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
839 eval "CFG_SQL_${base_a}=auto"
844 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
845 if [ -d "$relpath/src/plugins/imageformats" ]; then
846 for a in "$relpath/src/plugins/imageformats/"*; do
848 base_a=`basename "$a"`
849 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
854 #-------------------------------------------------------------------------------
855 # parse command line arguments
856 #-------------------------------------------------------------------------------
858 # parse the arguments, setting things to "yes" or "no"
859 while [ "$#" -gt 0 ]; do
863 #Autoconf style options
865 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
869 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
873 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
874 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
877 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
881 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
885 -no-*-*|-plugin-*-*|-qt-*-*)
886 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
887 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
891 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
894 #Qt style yes options
895 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
896 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
899 #Qt style options that pass an argument
901 if [ "$PLATFORM_QPA" != "yes" ]; then
903 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
907 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
911 -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)
912 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
916 #Qt style complex options in one command
917 -enable-*|-disable-*)
918 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
919 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
921 #Qt Builtin/System style options
922 -no-*|-system-*|-qt-*)
923 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
924 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
926 #Options that cannot be generalized
933 # this option may or may not be followed by an argument
934 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
943 # this option may or may not be followed by an argument
944 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
953 # this option may or may not be followed by an argument
954 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
962 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
963 # this option may or may not be followed by an argument
964 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
983 if [ "$1" = "-D" ]; then
987 VAL=`echo $1 | sed 's,-D,,'`
992 # this option may or may not be followed by an argument
993 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1002 if [ "$1" = "-I" ]; then
1006 VAL=`echo $1 | sed 's,-I,,'`
1011 if [ "$1" = "-L" ]; then
1015 VAL=`echo $1 | sed 's,-L,,'`
1020 if [ "$1" = "-R" ]; then
1024 VAL=`echo $1 | sed 's,-R,,'`
1029 VAL=`echo $1 | sed 's,-l,,'`
1033 if [ "$1" = "-F" ]; then
1037 VAL=`echo $1 | sed 's,-F,,'`
1042 if [ "$1" = "-fw" ]; then
1046 VAL=`echo $1 | sed 's,-fw,,'`
1054 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1061 if [ "$UNKNOWN_ARG" = "yes" ]; then
1062 echo "$1: unknown argument"
1073 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1074 CFG_ACCESSIBILITY="$VAL"
1083 CFG_USE_GNUMAKE="$VAL"
1086 CFG_MYSQL_CONFIG="$VAL"
1089 QT_INSTALL_PREFIX="$VAL"
1092 QT_HOST_PREFIX="$VAL"
1101 QT_FORCE_PKGCONFIG=yes
1104 QT_INSTALL_DOCS="$VAL"
1107 QT_INSTALL_HEADERS="$VAL"
1110 QT_INSTALL_PLUGINS="$VAL"
1113 QT_INSTALL_IMPORTS="$VAL"
1116 QT_INSTALL_DATA="$VAL"
1119 QT_INSTALL_LIBS="$VAL"
1128 QT_INSTALL_TRANSLATIONS="$VAL"
1130 sysconfdir|settingsdir)
1131 QT_INSTALL_SETTINGS="$VAL"
1134 QT_INSTALL_EXAMPLES="$VAL"
1137 QT_INSTALL_TESTS="$VAL"
1146 QT_INSTALL_BINS="$VAL"
1156 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1163 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1164 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1165 [ "$VAL" = "es2" ]; then
1167 if [ "$VAL" = "es2" ]; then
1175 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1177 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1185 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1188 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1196 if [ "$BUILD_ON_MAC" = "yes" ]; then
1203 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1204 CFG_MAC_DWARF2="$VAL"
1210 OPT_OBSOLETE_HOST_ARG=yes
1213 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1214 CFG_MAC_HARFBUZZ="$VAL"
1221 if [ "$BUILD_ON_MAC" = "yes" ]; then
1222 CFG_FRAMEWORK="$VAL"
1228 if [ "$VAL" = "yes" ]; then
1230 QMakeVar add QMAKE_CFLAGS -pg
1231 QMakeVar add QMAKE_CXXFLAGS -pg
1232 QMakeVar add QMAKE_LFLAGS -pg
1233 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1239 if [ "$VAL" = "yes" ]; then
1240 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1243 exceptions|g++-exceptions)
1244 if [ "$VAL" = "no" ]; then
1246 elif [ "$VAL" = "yes" ]; then
1254 # keep compatibility with old platform names
1260 PLATFORM=hpux-acc-o64
1263 PLATFORM=hpux-acc-64
1266 PLATFORM=hpux-acc-64
1278 PLATFORM=reliant-cds-64
1281 PLATFORM=solaris-cc-64
1284 PLATFORM=unixware-cc
1287 PLATFORM=unixware-g++
1290 PLATFORM=unixware-cc
1293 PLATFORM=unixware-g++
1299 i386) NATIVE_64_ARCH="x86_64" ;;
1300 powerpc) NATIVE_64_ARCH="ppc64" ;;
1301 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1303 if [ ! -z "$NATIVE_64_ARCH" ]; then
1304 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1311 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1314 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1315 CFG_DEBUG_RELEASE="$VAL"
1321 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1322 CFG_RELEASE_QMAKE="$VAL"
1328 if [ "$VAL" = "yes" ]; then
1330 elif [ "$VAL" = "no" ]; then
1337 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1338 CFG_PREFIX_INSTALL="$VAL"
1346 developer-build|commercial|opensource)
1347 # These switches have been dealt with already
1350 if [ "$VAL" = "yes" ]; then
1352 elif [ "$VAL" = "no" ]; then
1359 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1360 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1366 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1367 if [ "$VAL" = "no" ]; then
1368 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1369 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1370 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1376 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1383 if [ "$VAL" = "no" ]; then
1390 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1398 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1405 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1412 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1419 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1426 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1433 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1440 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1447 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1454 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1455 CFG_PRECOMPILE="$VAL"
1460 separate-debug-info)
1461 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1462 CFG_SEPARATE_DEBUG_INFO="$VAL"
1463 elif [ "$VAL" = "nocopy" ] ; then
1464 CFG_SEPARATE_DEBUG_INFO="yes"
1465 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1471 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1472 CFG_REDUCE_EXPORTS="$VAL"
1478 if [ "$VAL" = "no" ]; then
1485 if [ "$VAL" = "no" ]; then
1492 if [ "$VAL" = "no" ]; then
1499 if [ "$VAL" = "no" ]; then
1506 if [ "$VAL" = "no" ]; then
1513 if [ "$VAL" = "no" ]; then
1520 if [ "$VAL" = "no" ]; then
1527 if [ "$VAL" = "no" ]; then
1534 if [ "$VAL" = "no" ]; then
1544 if [ "$VAL" = "no" ]; then
1551 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1552 CFG_REDUCE_RELOCATIONS="$VAL"
1558 [ "$VAL" = "qt" ] && VAL=yes
1559 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1564 # No longer supported:
1565 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1568 if [ "$VAL" = "system" ]; then
1575 [ "$VAL" = "yes" ] && VAL=qt
1576 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1583 [ "$VAL" = "yes" ] && VAL=qt
1584 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1591 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1598 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1605 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1612 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1619 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1626 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1633 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1634 CFG_FONTCONFIG="$VAL"
1640 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1647 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1654 CFG_OBSOLETE_WAYLAND=yes
1657 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1664 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1678 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1685 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1692 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1693 CFG_GSTREAMER="$VAL"
1699 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1700 CFG_QGTKSTYLE="$VAL"
1706 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1709 if [ "$VAL" = "no" ]; then
1717 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1719 elif [ "$VAL" = "no" ]; then
1726 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1728 elif [ "$VAL" = "runtime" ]; then
1735 if [ "$VAL" = "yes" ]; then
1742 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1749 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1750 CFG_LARGEFILE="$VAL"
1756 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1763 if [ "$VAL" = "yes" ]; then
1764 CFG_OPENSSL="linked"
1770 if [ "$VAL" = "yes" ]; then
1771 CFG_DECLARATIVE_DEBUG="yes"
1773 if [ "$VAL" = "no" ]; then
1774 CFG_DECLARATIVE_DEBUG="no"
1781 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1782 CFG_JAVASCRIPTCORE_JIT="$VAL"
1788 if [ "$VAL" = "yes" ]; then
1789 OPT_CONFIRM_LICENSE="$VAL"
1795 if [ "$VAL" = "yes" ]; then
1801 sql-*|imageformat-*)
1802 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1803 # if autoconf style options were used, $VAL can be "yes" or "no"
1804 [ "$VAL" = "yes" ] && VAL=qt
1805 # now $VAL should be "no", "qt", or "plugin"... double-check
1806 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1809 # now $VAL is "no", "qt", or "plugin"
1811 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1812 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1814 # Grab the available values
1817 avail="$CFG_SQL_AVAILABLE"
1820 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1821 if [ "$OPT" != "plugin" ]; then
1822 # png is always built in
1828 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1832 # Check that that user's value is available.
1835 if [ "$VAL" = "$d" ]; then
1840 [ "$found" = yes ] || ERROR=yes
1842 if [ "$VAR" = "sql" ]; then
1843 # set the CFG_SQL_driver
1844 eval "CFG_SQL_$VAL=\$OPT"
1846 elif [ "$VAR" = "imageformat" ]; then
1847 [ "$OPT" = "qt" ] && OPT=yes
1848 VAL="`echo $VAL |tr a-z A-Z`"
1849 eval "CFG_$VAL=$OPT"
1853 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1854 if [ "$OPT" = "plugin" ]; then
1857 QMakeVar add "${VAR}s" "${VAL}"
1858 elif [ "$OPT" = "no" ]; then
1859 PLUG_VAR="${VAR}-plugin"
1861 QMakeVar del "${IN_VAR}s" "$VAL"
1862 QMakeVar del "${PLUG_VAR}s" "$VAL"
1864 if [ "$ERROR" = "yes" ]; then
1865 echo "$CURRENT_OPT: unknown argument"
1870 if [ "$VAL" = "yes" ]; then
1871 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1872 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1876 elif [ "$VAL" = "no" ]; then
1877 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1878 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1887 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1894 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1901 D_FLAGS="$D_FLAGS \"$VAL\""
1904 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1907 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1910 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1913 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1916 if [ "$BUILD_ON_MAC" = "yes" ]; then
1917 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1918 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1924 if [ "$BUILD_ON_MAC" = "yes" ]; then
1925 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1931 W_FLAGS="$W_FLAGS \"${VAL}\""
1937 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1938 CFG_PHONON_BACKEND="$VAL"
1950 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1951 CFG_AUDIO_BACKEND="$VAL"
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1965 CFG_FORCE_ASSERTS="$VAL"
1971 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1981 if [ "$UNKNOWN_OPT" = "yes" ]; then
1982 echo "${CURRENT_OPT}: invalid command-line switch"
1988 # update QT_CONFIG to show our current predefined configuration
1989 case "$CFG_QCONFIG" in
1990 minimal|small|medium|large|full)
1991 # these are a sequence of increasing functionality
1992 for c in minimal small medium large full; do
1993 QT_CONFIG="$QT_CONFIG $c-config"
1994 [ "$CFG_QCONFIG" = $c ] && break
1998 # not known to be sufficient for anything
1999 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2000 echo >&2 "Error: configuration file not found:"
2001 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2003 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2008 #-------------------------------------------------------------------------------
2009 # build tree initialization
2010 #-------------------------------------------------------------------------------
2012 # where to find which..
2013 unixtests="$relpath/config.tests/unix"
2014 mactests="$relpath/config.tests/mac"
2015 WHICH="$unixtests/which.test"
2017 PERL=`$WHICH perl 2>/dev/null`
2019 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2021 for e in gawk nawk awk; do
2022 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2029 PERL="/usr/bin/perl"
2030 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2034 ### skip this if the user just needs help...
2035 if [ "$OPT_HELP" != "yes" ]; then
2037 # is this a shadow build?
2038 if [ "$OPT_SHADOW" = "maybe" ]; then
2040 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2041 if [ -h "$outpath" ]; then
2042 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2048 if [ "$OPT_SHADOW" = "yes" ]; then
2049 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2050 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2051 echo >&2 "Cannot proceed."
2054 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2057 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2059 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2060 echo "Qt can be built in release mode with separate debug information, so"
2061 echo "-debug-and-release is not necessary anymore"
2065 if [ "$CFG_SILENT" = "yes" ]; then
2066 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2069 # if the source tree is different from the build tree,
2070 # symlink or copy part of the sources
2071 if [ "$OPT_SHADOW" = "yes" ]; then
2072 echo "Preparing build tree..."
2074 if [ -z "$PERL" ]; then
2076 echo "You need perl in your PATH to make a shadow build."
2077 echo "Cannot proceed."
2081 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2083 # make a syncqt script that can be used in the shadow
2084 rm -f "$outpath/bin/syncqt"
2085 if [ -x "$relpath/bin/syncqt" ]; then
2086 mkdir -p "$outpath/bin"
2087 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2088 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2089 chmod 755 "$outpath/bin/syncqt"
2092 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2093 rm -f "$outpath/bin/$i"
2094 if [ -x "$relpath/bin/$i" ]; then
2095 mkdir -p "$outpath/bin"
2096 echo "#!/bin/sh" >"$outpath/bin/$i"
2097 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2098 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2099 chmod 755 "$outpath/bin/$i"
2103 # symlink the mkspecs directory
2104 mkdir -p "$outpath/mkspecs"
2105 rm -rf "$outpath"/mkspecs/*
2106 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2107 rm -f "$outpath/mkspecs/default"
2111 rm -rf "$outpath/mkspecs/$1"
2112 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2113 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2116 # Special case for mkspecs/features directory.
2117 # To be able to place .prf files into a shadow build directory,
2118 # we're creating links for files only. The directory structure is reproduced.
2119 ShadowMkspecs features
2121 # The modules dir is special, too.
2122 ShadowMkspecs modules
2124 # symlink the doc directory
2125 rm -rf "$outpath/doc"
2126 ln -s "$relpath/doc" "$outpath/doc"
2129 # symlink fonts to be able to run application from build directory
2130 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2131 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2132 mkdir -p "${outpath}/lib"
2133 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2137 if [ "$OPT_FAST" = "auto" ]; then
2138 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2145 # find a make command
2146 if [ -z "$MAKE" ]; then
2148 for mk in gmake make; do
2149 if "$WHICH" $mk >/dev/null 2>&1; then
2154 if [ -z "$MAKE" ]; then
2155 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2156 echo >&2 "Cannot proceed."
2159 # export MAKE, we need it later in the config.tests
2165 #-------------------------------------------------------------------------------
2166 # auto-detect all that hasn't been specified in the arguments
2167 #-------------------------------------------------------------------------------
2169 if [ -z "$PLATFORM" ]; then
2171 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2173 if [ "$PLATFORM_QPA" = "yes" ]; then
2174 OSX_VERSION=`uname -r | cut -d. -f1`
2175 if [ "$OSX_VERSION" -ge 11 ]; then
2176 # We're on Lion or above. Check if we have a supported Clang version
2177 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2180 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2195 #PLATFORM=aix-g++-64
2197 #PLATFORM=aix-xlc-64
2199 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2209 # PLATFORM=dynix-g++
2215 PLATFORM=freebsd-g++
2217 - Also available for FreeBSD: freebsd-icc
2221 PLATFORM=openbsd-g++
2232 #PLATFORM=irix-cc-64
2234 - Also available for IRIX: irix-g++ irix-cc-64
2238 case "$UNAME_MACHINE" in
2240 #PLATFORM=hpuxi-acc-32
2241 PLATFORM=hpuxi-acc-64
2243 - Also available for HP-UXi: hpuxi-acc-32
2249 #PLATFORM=hpux-acc-64
2251 #PLATFORM=hpux-acc-o64
2253 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2262 - Also available for Tru64: tru64-g++
2266 case "$UNAME_MACHINE" in
2268 PLATFORM=linux-g++-64
2275 - Also available for Linux: linux-kcc linux-icc linux-cxx
2279 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2280 PLATFORM="solaris-g++"
2282 #PLATFORM=solaris-g++
2284 #PLATFORM=solaris-cc64
2287 - Also available for Solaris: solaris-g++ solaris-cc-64
2290 ReliantUNIX-*:*|SINIX-*:*)
2291 PLATFORM=reliant-cds
2292 #PLATFORM=reliant-cds-64
2294 - Also available for Reliant UNIX: reliant-cds-64
2304 #PLATFORM=unixware-g++
2305 PLATFORM=unixware-cc
2307 - Also available for OpenUNIX: unixware-g++
2311 #PLATFORM=unixware-g++
2312 PLATFORM=unixware-cc
2314 - Also available for UnixWare: unixware-g++
2321 - Also available for SCO OpenServer: sco-g++
2325 PLATFORM=unixware-g++
2328 PLATFORM=unsupported/qnx-g++
2331 if [ "$OPT_HELP" != "yes" ]; then
2333 for p in $PLATFORMS; do
2334 echo " $relconf $* -platform $p"
2337 echo " The build script does not currently recognize all" >&2
2338 echo " platforms supported by Qt." >&2
2339 echo " Rerun this script with a -platform option listed to" >&2
2340 echo " set the system/compiler combination you use." >&2
2347 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2349 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2351 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2352 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2354 if [ -d "$PLATFORM" ]; then
2355 QMAKESPEC="$PLATFORM"
2357 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2359 if [ -d "$XPLATFORM" ]; then
2360 XQMAKESPEC="$XPLATFORM"
2362 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2364 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2365 QT_CROSS_COMPILE=yes
2366 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2367 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2370 if [ "$BUILD_ON_MAC" = "yes" ]; then
2371 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2373 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2374 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2375 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2376 echo " built with 'macx-g++'" >&2
2382 # check specified platforms are supported
2383 if [ '!' -d "$QMAKESPEC" ]; then
2385 echo " The specified system/compiler is not supported:"
2389 echo " Please see the README file for a complete list."
2393 if [ '!' -d "$XQMAKESPEC" ]; then
2395 echo " The specified system/compiler is not supported:"
2399 echo " Please see the README file for a complete list."
2403 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2405 echo " The specified system/compiler port is not complete:"
2407 echo " $XQMAKESPEC/qplatformdefs.h"
2409 echo " Please contact qt-info@nokia.com."
2414 # now look at the configs and figure out what platform we are config'd for
2415 [ "$PLATFORM_QPA" != "yes" ] \
2416 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2418 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2420 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2421 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2422 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2423 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2424 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2428 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2429 case `basename "$XPLATFORM"` in
2432 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2434 echo "Please contact qt-info@nokia.com to upgrade your license to"
2435 echo "include this platform, or install the Qt Open Source Edition"
2436 echo "if you intend to develop free software."
2442 #-------------------------------------------------------------------------------
2443 # tests that don't need qmake (must be run before displaying help)
2444 #-------------------------------------------------------------------------------
2446 # detect build style
2447 if [ "$CFG_DEBUG" = "auto" ]; then
2448 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2449 CFG_DEBUG_RELEASE=yes
2451 elif [ "$CFG_DEV" = "yes" ]; then
2452 CFG_DEBUG_RELEASE=no
2455 CFG_DEBUG_RELEASE=no
2459 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2460 QT_CONFIG="$QT_CONFIG build_all"
2463 if [ -z "$PKG_CONFIG" ]; then
2464 # See if PKG_CONFIG is set in the mkspec:
2465 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2467 if [ -z "$PKG_CONFIG" ]; then
2468 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2471 # Work out if we can use pkg-config
2472 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2473 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2475 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2476 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2477 echo >&2 "environment!"
2479 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2481 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2482 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2483 echo >&2 "This is probably not what you want."
2485 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2487 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2488 echo >&2 "been set. This means your toolchain's .pc files must contain"
2489 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2490 echo >&2 "tests are failing, please check these files."
2495 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2496 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2497 echo >&2 "dependencies"
2503 if [ ! -n "$PKG_CONFIG" ]; then
2504 QT_CONFIG="$QT_CONFIG no-pkg-config"
2507 # pass on $CFG_SDK to the configure tests.
2508 if [ '!' -z "$CFG_SDK" ]; then
2509 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2512 # find the default framework value
2513 if [ "$BUILD_ON_MAC" = "yes" ]; then
2514 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2515 CFG_FRAMEWORK="$CFG_SHARED"
2516 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2518 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2526 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2528 TEST_COMPILER=$QMAKE_CONF_COMPILER
2529 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2530 if [ -z "$TEST_COMPILER" ]; then
2531 echo "ERROR: Cannot set the compiler for the configuration tests"
2537 if [ -n "$CFG_SYSROOT" ]; then
2538 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2539 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2540 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2542 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2546 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2548 # auto-detect precompiled header support
2549 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2550 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2557 #auto-detect DWARF2 on the mac
2558 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2559 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2566 # don't autodetect support for separate debug info on objcopy when
2567 # cross-compiling as lots of toolchains seems to have problems with this
2568 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2569 CFG_SEPARATE_DEBUG_INFO="no"
2572 # auto-detect support for separate debug info in objcopy
2573 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2574 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2575 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2576 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2577 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2578 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2579 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2580 CFG_SEPARATE_DEBUG_INFO=no
2584 # binutils on HP-UX is buggy; default to no.
2585 CFG_SEPARATE_DEBUG_INFO=no
2588 CFG_SEPARATE_DEBUG_INFO=yes
2594 # auto-detect -fvisibility support
2595 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2596 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2597 CFG_REDUCE_EXPORTS=no
2599 CFG_REDUCE_EXPORTS=yes
2603 # detect the availability of the -Bsymbolic-functions linker optimization
2604 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2605 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2606 CFG_REDUCE_RELOCATIONS=no
2608 CFG_REDUCE_RELOCATIONS=yes
2612 # auto-detect GNU make support
2613 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2617 # find the default framework value
2618 if [ "$BUILD_ON_MAC" = "yes" ]; then
2619 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2620 CFG_FRAMEWORK="$CFG_SHARED"
2621 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2623 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2631 # x11 tests are done after qmake is built
2634 #setup the build parts
2635 if [ -z "$CFG_BUILD_PARTS" ]; then
2636 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2638 # don't build tools by default when cross-compiling
2639 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2640 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2643 for nobuild in $CFG_NOBUILD_PARTS; do
2644 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2646 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2648 # echo "WARNING: libs is a required part of the build."
2650 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2653 #-------------------------------------------------------------------------------
2654 # post process QT_INSTALL_* variables
2655 #-------------------------------------------------------------------------------
2657 if [ -z "$QT_INSTALL_PREFIX" ]; then
2658 if [ "$CFG_DEV" = "yes" ]; then
2659 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2661 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2664 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2666 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2667 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2668 if [ "$BUILD_ON_MAC" = "yes" ]; then
2669 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2672 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2675 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2677 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2678 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2679 if [ "$BUILD_ON_MAC" = "yes" ]; then
2680 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2685 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2688 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2690 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2691 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2692 if [ "$BUILD_ON_MAC" = "yes" ]; then
2693 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2694 QT_INSTALL_LIBS="/Libraries/Frameworks"
2698 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2700 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2702 if [ -z "$QT_INSTALL_BINS" ]; then #default
2703 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2704 if [ "$BUILD_ON_MAC" = "yes" ]; then
2705 QT_INSTALL_BINS="/Developer/Applications/Qt"
2708 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2710 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2712 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2713 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2714 if [ "$BUILD_ON_MAC" = "yes" ]; then
2715 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2718 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2720 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2722 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2723 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2724 if [ "$BUILD_ON_MAC" = "yes" ]; then
2725 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2728 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2730 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2732 if [ -z "$QT_INSTALL_DATA" ]; then #default
2733 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2735 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2737 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2738 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2740 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2742 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2743 if [ "$BUILD_ON_MAC" = "yes" ]; then
2744 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2746 QT_INSTALL_SETTINGS=/etc/xdg
2749 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2751 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2752 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2753 if [ "$BUILD_ON_MAC" = "yes" ]; then
2754 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2757 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2759 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2762 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2763 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2764 if [ "$BUILD_ON_MAC" = "yes" ]; then
2765 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2768 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2770 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2772 #------- host paths --------
2774 if [ -z "$QT_HOST_PREFIX" ]; then
2775 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2778 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2782 if [ -z "$QT_HOST_BINS" ]; then #default
2784 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2785 if [ "$BUILD_ON_MAC" = "yes" ]; then
2786 QT_HOST_BINS="/Developer/Applications/Qt"
2789 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2791 QT_HOST_BINS="$QT_INSTALL_BINS"
2794 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2796 if [ -z "$QT_HOST_DATA" ]; then #default
2798 QT_HOST_DATA="$QT_HOST_PREFIX"
2800 QT_HOST_DATA="$QT_INSTALL_DATA"
2803 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2806 #-------------------------------------------------------------------------------
2807 # help - interactive parts of the script _after_ this section please
2808 #-------------------------------------------------------------------------------
2810 # next, emit a usage message if something failed.
2811 if [ "$OPT_HELP" = "yes" ]; then
2812 [ "x$ERROR" = "xyes" ] && echo
2813 if [ "$CFG_NIS" = "no" ]; then
2820 if [ "$CFG_CUPS" = "no" ]; then
2827 if [ "$CFG_ICONV" = "no" ]; then
2834 if [ "$CFG_LARGEFILE" = "no" ]; then
2841 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
2848 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2856 if [ "$CFG_XCB" = "no" ]; then
2864 if [ "$CFG_XINPUT2" = "no" ]; then
2873 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2874 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2875 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2876 [-release] [-debug] [-debug-and-release]
2877 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2878 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2879 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
2880 [-plugin-sql-<driver>] [-system-sqlite]
2881 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2882 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2883 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2884 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2885 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2886 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2887 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
2888 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2889 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2890 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2891 [-no-audio-backend] [-audio-backend]
2892 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
2893 [-no-optimized-qmake] [-optimized-qmake]
2894 [-no-openssl] [-openssl] [-openssl-linked]
2895 [-no-gtkstyle] [-gtkstyle]
2896 [-qt-pcre] [-system-pcre]
2897 [additional platform specific options (see below)]
2900 Installation options:
2902 -qpa ................ This will enable the QPA build.
2903 QPA is a window system agnostic implementation of Qt.
2905 These are optional, but you may specify install directories.
2907 -prefix <dir> ...... This will install everything relative to <dir>
2908 (default $QT_INSTALL_PREFIX)
2910 if [ "$PLATFORM_QPA" = "yes" ]; then
2913 -hostprefix [dir] .. Tools and libraries needed when developing
2914 applications are installed in [dir]. If [dir] is
2915 not given, the current build directory will be used.
2921 * -prefix-install .... Force a sandboxed "local" installation of
2922 Qt. This will install into
2923 $QT_INSTALL_PREFIX, if this option is
2924 disabled then some platforms will attempt a
2925 "system" install by placing default values to
2926 be placed in a system location other than
2929 You may use these to separate different parts of the install:
2931 -bindir <dir> ......... Executables will be installed to <dir>
2932 (default PREFIX/bin)
2933 -libdir <dir> ......... Libraries will be installed to <dir>
2934 (default PREFIX/lib)
2935 -docdir <dir> ......... Documentation will be installed to <dir>
2936 (default PREFIX/doc)
2937 -headerdir <dir> ...... Headers will be installed to <dir>
2938 (default PREFIX/include)
2939 -plugindir <dir> ...... Plugins will be installed to <dir>
2940 (default PREFIX/plugins)
2941 -importdir <dir> ...... Imports for QML will be installed to <dir>
2942 (default PREFIX/imports)
2943 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2945 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2946 (default PREFIX/translations)
2947 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2948 (default PREFIX/etc/settings)
2949 -examplesdir <dir> .... Examples will be installed to <dir>
2950 (default PREFIX/examples)
2951 -testsdir <dir> ....... Tests will be installed to <dir>
2952 (default PREFIX/tests)
2954 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2957 -hostbindir <dir> .. Host executables will be installed to <dir>
2958 (default HOSTPREFIX/bin)
2959 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2960 (default HOSTPREFIX)
2967 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2968 that needs to be evaluated. If the evaluation succeeds, the feature is
2969 included. Here is a short explanation of each option:
2971 * -release ........... Compile and link Qt with debugging turned off.
2972 -debug ............. Compile and link Qt with debugging turned on.
2973 -debug-and-release . Compile and link two versions of Qt, with and without
2974 debugging turned on (Mac only).
2976 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2978 -opensource ........ Compile and link the Open-Source Edition of Qt.
2979 -commercial ........ Compile and link the Commercial Edition of Qt.
2982 * -shared ............ Create and use shared Qt libraries.
2983 -static ............ Create and use static Qt libraries.
2985 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2987 -fast .............. Configure Qt quickly by generating Makefiles only for
2988 library and subdirectory targets. All other Makefiles
2989 are created as wrappers, which will in turn run qmake.
2991 -no-largefile ...... Disables large file support.
2992 + -largefile ......... Enables Qt to access files larger than 4 GB.
2995 if [ "$PLATFORM_QPA" = "yes" ]; then
3002 if [ "$CFG_DBUS" = "no" ]; then
3011 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3012 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3014 -no-accessibility .. Do not compile Accessibility support.
3015 * -accessibility ..... Compile Accessibility support.
3017 $SHN -no-stl ............ Do not compile STL support.
3018 $SHY -stl ............... Compile STL support.
3020 -no-sql-<driver> ... Disable SQL <driver> entirely.
3021 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3023 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3026 Possible values for <driver>:
3027 [ $CFG_SQL_AVAILABLE ]
3029 -system-sqlite ..... Use sqlite from the operating system.
3031 -no-phonon-backend.. Do not build the platform phonon plugin.
3032 + -phonon-backend..... Build the platform phonon plugin.
3034 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3035 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3037 -no-declarative-debug ..... Do not build the declarative debugging support.
3038 + -declarative-debug ....... Build the declarative debugging support.
3040 -platform target ... The operating system and compiler you are building
3043 See the README file for a list of supported
3044 operating systems and compilers.
3047 if [ "${PLATFORM_QPA}" != "yes" ]; then
3049 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3050 raster - Software rasterizer
3051 opengl - Rendering via OpenGL, Experimental!
3052 openvg - Rendering via OpenVG, Experimental!
3059 -no-mmx ............ Do not compile with use of MMX instructions.
3060 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3061 -no-sse ............ Do not compile with use of SSE instructions.
3062 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3063 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3064 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3065 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3066 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3067 -no-avx ............ Do not compile with use of AVX instructions.
3068 -no-neon ........... Do not compile with use of NEON instructions.
3070 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3071 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3073 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3075 -D <string> ........ Add an explicit define to the preprocessor.
3076 -I <string> ........ Add an explicit include path.
3077 -L <string> ........ Add an explicit library path.
3079 -help, -h .......... Display this information.
3081 Third Party Libraries:
3083 -qt-zlib ........... Use the zlib bundled with Qt.
3084 + -system-zlib ....... Use zlib from the operating system.
3085 See http://www.gzip.org/zlib
3087 -no-gif ............ Do not compile GIF reading support.
3089 -no-libpng ......... Do not compile PNG support.
3090 -qt-libpng ......... Use the libpng bundled with Qt.
3091 + -system-libpng ..... Use libpng from the operating system.
3092 See http://www.libpng.org/pub/png
3094 -no-libjpeg ........ Do not compile JPEG support.
3095 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3096 + -system-libjpeg .... Use libjpeg from the operating system.
3097 See http://www.ijg.org
3099 -no-openssl ........ Do not compile support for OpenSSL.
3100 + -openssl ........... Enable run-time OpenSSL support.
3101 -openssl-linked .... Enabled linked OpenSSL support.
3103 -qt-pcre ........... Use the PCRE library bundled with Qt.
3104 + -system-pcre ....... Use the PCRE library from the operating system.
3108 -make <part> ....... Add part to the list of parts to be built at make time.
3109 ($QT_DEFAULT_BUILD_PARTS)
3110 -nomake <part> ..... Exclude part from the list of parts to be built.
3112 -R <string> ........ Add an explicit runtime library path to the Qt
3114 -l <string> ........ Add an explicit library.
3116 -no-rpath .......... Do not use the library install path as a runtime
3118 + -rpath ............. Link Qt libraries and executables using the library
3119 install path as a runtime library path. Equivalent
3120 to -R install_libpath
3122 -continue .......... Continue as far as possible if an error occurs.
3124 -verbose, -v ....... Print verbose information about each step of the
3127 -silent ............ Reduce the build output so that warnings and errors
3128 can be seen more easily.
3130 * -no-optimized-qmake ... Do not build qmake optimized.
3131 -optimized-qmake ...... Build qmake optimized.
3133 -no-gui ............ Don't build the Qt GUI library
3135 $NSN -no-nis ............ Do not compile NIS support.
3136 $NSY -nis ............... Compile NIS support.
3138 $CUN -no-cups ........... Do not compile CUPS support.
3139 $CUY -cups .............. Compile CUPS support.
3140 Requires cups/cups.h and libcups.so.2.
3142 $CIN -no-iconv .......... Do not compile support for iconv(3).
3143 $CIY -iconv ............. Compile support for iconv(3).
3145 $PHN -no-pch ............ Do not use precompiled header support.
3146 $PHY -pch ............... Use precompiled header support.
3148 $DBN -no-dbus ........... Do not compile the QtDBus module.
3149 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3150 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3152 -reduce-relocations ..... Reduce relocations in the libraries through extra
3153 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3154 experimental; needs GNU ld >= 2.18).
3156 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3160 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3161 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3168 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3176 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3180 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3181 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3183 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3184 $XCBY -xcb ............... Compile Xcb support.
3190 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3194 $X2N -no-xinput2......... Do not compile XInput2 support.
3195 $X2Y -xinput2............ Compile XInput2 support.
3201 if [ "$PLATFORM_X11" = "yes" ]; then
3202 if [ "$CFG_SM" = "no" ]; then
3209 if [ "$CFG_XSHAPE" = "no" ]; then
3216 if [ "$CFG_XVIDEO" = "no" ]; then
3223 if [ "$CFG_XINERAMA" = "no" ]; then
3230 if [ "$CFG_FONTCONFIG" = "no" ]; then
3237 if [ "$CFG_XCURSOR" = "no" ]; then
3244 if [ "$CFG_XFIXES" = "no" ]; then
3251 if [ "$CFG_XRANDR" = "no" ]; then
3258 if [ "$CFG_XRENDER" = "no" ]; then
3265 if [ "$CFG_MITSHM" = "no" ]; then
3272 if [ "$CFG_XINPUT" = "no" ]; then
3279 if [ "$CFG_XKB" = "no" ]; then
3286 if [ "$CFG_IM" = "no" ]; then
3297 -no-gtkstyle ....... Do not build the GTK theme integration.
3298 + -gtkstyle .......... Build the GTK theme integration.
3300 * -no-nas-sound ...... Do not compile in NAS sound support.
3301 -system-nas-sound .. Use NAS libaudio from the operating system.
3302 See http://radscan.com/nas.html
3304 -egl ............... Use EGL instead of GLX to manage contexts.
3305 When building for desktop OpenGL, this option will
3306 make Qt use EGL to manage contexts rather than the
3307 GLX, which is the default. Note: For OpenGL ES, EGL
3310 -no-opengl ......... Do not support OpenGL.
3311 + -opengl <api> ...... Enable OpenGL support.
3312 With no parameter, this will auto-detect the "best"
3313 OpenGL API to use. If desktop OpenGL is available, it
3314 will be used. Use desktop or es2 for <api>
3315 to force the use of the Desktop OpenGL or
3316 OpenGL ES 2 APIs instead.
3318 -no-openvg ........ Do not support OpenVG.
3319 + -openvg ........... Enable OpenVG support.
3320 Requires EGL support, typically supplied by an OpenGL
3321 or other graphics implementation.
3323 $SMN -no-sm ............. Do not support X Session Management.
3324 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3326 $SHN -no-xshape ......... Do not compile XShape support.
3327 $SHY -xshape ............ Compile XShape support.
3328 Requires X11/extensions/shape.h.
3330 $XVN -no-xvideo ......... Do not compile XVideo support.
3331 $XVY -xvideo ............ Compile XVideo support.
3332 Requires X11/extensions/Xv.h & Xvlib.h.
3334 $SHN -no-xsync .......... Do not compile XSync support.
3335 $SHY -xsync ............. Compile XSync support.
3336 Requires X11/extensions/sync.h.
3338 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3339 $XAY -xinerama .......... Compile Xinerama support.
3340 Requires X11/extensions/Xinerama.h and libXinerama.
3341 By default, Xinerama support will be compiled if
3342 available and the shared libraries are dynamically
3345 $XCN -no-xcursor ........ Do not compile Xcursor support.
3346 $XCY -xcursor ........... Compile Xcursor support.
3347 Requires X11/Xcursor/Xcursor.h and libXcursor.
3348 By default, Xcursor support will be compiled if
3349 available and the shared libraries are dynamically
3352 $XFN -no-xfixes ......... Do not compile Xfixes support.
3353 $XFY -xfixes ............ Compile Xfixes support.
3354 Requires X11/extensions/Xfixes.h and libXfixes.
3355 By default, Xfixes support will be compiled if
3356 available and the shared libraries are dynamically
3359 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3360 $XZY -xrandr ............ Compile Xrandr support.
3361 Requires X11/extensions/Xrandr.h and libXrandr.
3363 $XRN -no-xrender ........ Do not compile Xrender support.
3364 $XRY -xrender ........... Compile Xrender support.
3365 Requires X11/extensions/Xrender.h and libXrender.
3367 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3368 $XMY -mitshm ............ Compile MIT-SHM support.
3369 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3371 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3372 $FCGY -fontconfig ........ Compile FontConfig support.
3373 Requires fontconfig/fontconfig.h, libfontconfig,
3374 freetype.h and libfreetype.
3376 $XIN -no-xinput ......... Do not compile Xinput support.
3377 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3378 which requires IRIX with wacom.h and libXi or
3379 XFree86 with X11/extensions/XInput.h and libXi.
3381 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3382 $XKY -xkb ............... Compile XKB support.
3387 if [ "$BUILD_ON_MAC" = "yes" ]; then
3392 -Fstring ........... Add an explicit framework path.
3393 -fw string ......... Add an explicit framework.
3395 * -framework ......... Build Qt as a series of frameworks and
3396 link tools against those frameworks.
3397 -no-framework ...... Do not build Qt as a series of frameworks.
3399 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3400 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3402 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3403 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3405 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3406 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3407 QT_ENABLE_HARFBUZZ environment variable.
3412 if [ "$PLATFORM_QPA" = "yes" ]; then
3418 if [ "$PLATFORM_QPA" = "yes" ]; then
3421 -xplatform target ... The target platform when cross-compiling.
3423 -no-feature-<feature> Do not compile in <feature>.
3424 -feature-<feature> .. Compile in <feature>. The available features
3425 are described in src/corelib/global/qfeatures.txt
3427 -no-freetype ........ Do not compile in Freetype2 support.
3428 -qt-freetype ........ Use the libfreetype bundled with Qt.
3429 * -system-freetype .... Use libfreetype from the operating system.
3430 See http://www.freetype.org/
3432 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3433 default ($CFG_QCONFIG).
3435 -no-opengl .......... Do not support OpenGL.
3436 -opengl <api> ....... Enable OpenGL ES support
3437 With no parameter, this will attempt to auto-detect
3438 OpenGL ES 2, or regular desktop OpenGL.
3439 Use es2 for <api> to override auto-detection.
3443 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3444 if [ "$CFG_GLIB" = "no" ]; then
3452 $GBN -no-glib ........... Do not compile Glib support.
3453 $GBY -glib .............. Compile Glib support.
3458 [ "x$ERROR" = "xyes" ] && exit 1
3463 # -----------------------------------------------------------------------------
3464 # LICENSING, INTERACTIVE PART
3465 # -----------------------------------------------------------------------------
3467 if [ "$PLATFORM_QPA" = "yes" ]; then
3468 Platform="Qt Lighthouse"
3469 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3470 Platform="Qt for Windows"
3471 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3473 Platform="Qt for Linux/X11"
3477 echo "This is the $Platform ${EditionString} Edition."
3480 if [ "$Edition" = "OpenSource" ]; then
3482 echo "You are licensed to use this software under the terms of"
3483 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3484 if [ -f "$relpath/LICENSE.GPL3" ]; then
3485 echo "You are also licensed to use this software under the terms of"
3486 echo "the GNU General Public License (GPL) versions 3."
3492 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3493 echo "You have already accepted the terms of the $LicenseType license."
3496 if [ -f "$relpath/LICENSE.GPL3" ]; then
3497 echo "Type '3' to view the GNU General Public License version 3."
3499 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3500 echo "Type 'yes' to accept this license offer."
3501 echo "Type 'no' to decline this license offer."
3503 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3507 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3509 elif [ "$acceptance" = "no" ]; then
3510 echo "You are not licensed to use this software."
3513 elif [ "$acceptance" = "3" ]; then
3514 more "$relpath/LICENSE.GPL3"
3515 elif [ "$acceptance" = "L" ]; then
3516 more "$relpath/LICENSE.LGPL"
3519 elif [ "$Edition" = "Preview" ]; then
3520 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3523 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3524 echo "You have already accepted the terms of the $LicenseType license."
3527 echo "You are licensed to use this software under the terms of"
3528 echo "the $TheLicense"
3530 echo "Type '?' to read the Preview License."
3531 echo "Type 'yes' to accept this license offer."
3532 echo "Type 'no' to decline this license offer."
3534 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3538 if [ "$acceptance" = "yes" ]; then
3540 elif [ "$acceptance" = "no" ] ;then
3541 echo "You are not licensed to use this software."
3544 elif [ "$acceptance" = "?" ]; then
3545 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3548 elif [ "$Edition" != "OpenSource" ]; then
3549 if [ -n "$ExpiryDate" ]; then
3550 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3551 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3552 Today=`date +%Y%m%d`
3553 if [ "$Today" -gt "$ExpiryDate" ]; then
3554 case "$LicenseType" in
3555 Commercial|Academic|Educational)
3556 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3558 echo "NOTICE NOTICE NOTICE NOTICE"
3560 echo " Your support and upgrade period has expired."
3562 echo " You are no longer licensed to use this version of Qt."
3563 echo " Please contact qt-info@nokia.com to renew your support"
3564 echo " and upgrades for this license."
3566 echo "NOTICE NOTICE NOTICE NOTICE"
3571 echo "WARNING WARNING WARNING WARNING"
3573 echo " Your support and upgrade period has expired."
3575 echo " You may continue to use your last licensed release"
3576 echo " of Qt under the terms of your existing license"
3577 echo " agreement. But you are not entitled to technical"
3578 echo " support, nor are you entitled to use any more recent"
3579 echo " Qt releases."
3581 echo " Please contact qt-info@nokia.com to renew your"
3582 echo " support and upgrades for this license."
3584 echo "WARNING WARNING WARNING WARNING"
3591 echo "NOTICE NOTICE NOTICE NOTICE"
3593 echo " Your Evaluation license has expired."
3595 echo " You are no longer licensed to use this software. Please"
3596 echo " contact qt-info@nokia.com to purchase license, or install"
3597 echo " the Qt Open Source Edition if you intend to develop free"
3600 echo "NOTICE NOTICE NOTICE NOTICE"
3607 TheLicense=`head -n 1 "$outpath/LICENSE"`
3609 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3610 echo "You have already accepted the terms of the $TheLicense."
3613 echo "You are licensed to use this software under the terms of"
3614 echo "the $TheLicense."
3616 echo "Type '?' to view the $TheLicense."
3617 echo "Type 'yes' to accept this license offer."
3618 echo "Type 'no' to decline this license offer."
3620 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3624 if [ "$acceptance" = "yes" ]; then
3626 elif [ "$acceptance" = "no" ]; then
3627 echo "You are not licensed to use this software."
3630 else [ "$acceptance" = "?" ]
3631 more "$outpath/LICENSE"
3636 # this should be moved somewhere else
3639 AIX_VERSION=`uname -v`
3640 if [ "$AIX_VERSION" -lt "5" ]; then
3641 QMakeVar add QMAKE_LIBS_X11 -lbind
3648 #-------------------------------------------------------------------------------
3649 # generate qconfig.cpp
3650 #-------------------------------------------------------------------------------
3651 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3653 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3655 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3656 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3658 /* Installation date */
3659 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3661 /* Installation Info */
3662 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3663 "qt_prfxpath=$QT_INSTALL_PREFIX",
3664 "qt_docspath=$QT_INSTALL_DOCS",
3665 "qt_hdrspath=$QT_INSTALL_HEADERS",
3666 "qt_libspath=$QT_INSTALL_LIBS",
3667 "qt_binspath=$QT_INSTALL_BINS",
3668 "qt_plugpath=$QT_INSTALL_PLUGINS",
3669 "qt_impspath=$QT_INSTALL_IMPORTS",
3670 "qt_datapath=$QT_INSTALL_DATA",
3671 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3672 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3673 "qt_tstspath=$QT_INSTALL_TESTS",
3674 #ifdef QT_BUILD_QMAKE
3675 "qt_ssrtpath=$CFG_SYSROOT",
3676 "qt_hpfxpath=$QT_HOST_PREFIX",
3677 "qt_hbinpath=$QT_HOST_BINS",
3678 "qt_hdatpath=$QT_HOST_DATA",
3681 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3684 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3686 /* strlen( "qt_lcnsxxxx" ) == 12 */
3687 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3688 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3690 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3693 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3694 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3695 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3697 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3698 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3699 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3702 # -----------------------------------------------------------------------------
3703 if [ "$LicenseType" = "Evaluation" ]; then
3704 EVALKEY=qt_qevalkey=$LicenseKeyExt
3705 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3706 EVALKEY=qt_qevalkey=
3709 if [ -n "$EVALKEY" ]; then
3710 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3711 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3712 /* Evaluation license key */
3713 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3715 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3719 # -----------------------------------------------------------------------------
3721 # -----------------------------------------------------------------------------
3724 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3726 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3727 if [ "$OPT_SHADOW" = "yes" ]; then
3728 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3729 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3730 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3734 # $1: input variable name (awk regexp)
3735 # $2: optional output variable name
3736 # $3: optional value transformation (sed command)
3737 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3738 # is where the resulting variable is written to
3739 setBootstrapVariable()
3741 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3745 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3746 echo "Creating qmake. Please wait..."
3749 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3750 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3751 if [ -f "$QCONFIG_H" ]; then
3752 OLD_QCONFIG_H=$QCONFIG_H
3753 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3756 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3757 # when building qmake, we use #defines for the install paths,
3758 # however they are real functions in the library
3759 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3760 mkdir -p "$outpath/src/corelib/global"
3761 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3762 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3765 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3767 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3768 rm -rf mkspecs/default
3769 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3770 mkdir -p "$outpath/qmake" || exit
3772 for mkfile in GNUmakefile Makefile; do
3775 in_mkfile="${mkfile}.in"
3776 if [ "$mkfile" = "Makefile" ]; then
3777 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3778 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3780 in_mkfile="${mkfile}.unix"
3782 in_mkfile="$relpath/qmake/$in_mkfile"
3783 mkfile="$outpath/qmake/$mkfile"
3784 if [ -f "$mkfile" ]; then
3785 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3788 [ -f "$in_mkfile" ] || continue
3790 echo "########################################################################" > "$mkfile"
3791 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3792 echo "########################################################################" >> "$mkfile"
3795 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3796 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3797 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3799 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3800 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3803 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3804 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3805 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3806 setBootstrapVariable QMAKE_CFLAGS
3807 setBootstrapVariable QMAKE_CXXFLAGS
3808 setBootstrapVariable QMAKE_LFLAGS
3810 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3811 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3812 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3814 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3815 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3816 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3817 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3818 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3819 elif [ "$CFG_DEBUG" = "yes" ]; then
3820 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3821 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3822 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3823 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3826 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3827 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3828 for rpath in $RPATH_FLAGS; do
3829 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3832 if [ "$BUILD_ON_MAC" = "yes" ]; then
3833 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3834 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3835 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3836 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3837 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3838 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3839 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3840 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3841 if [ '!' -z "$CFG_SDK" ]; then
3842 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3843 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3844 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3845 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3846 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3849 if [ '!' -z "$D_FLAGS" ]; then
3850 for DEF in $D_FLAGS; do
3851 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3854 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3855 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3856 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3857 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3859 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3860 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3861 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3862 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3863 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3864 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3865 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3866 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3867 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3868 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3870 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3871 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3872 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3873 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3878 QMAKE_BUILD_ERROR=no
3879 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3880 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3881 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3882 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3885 #-------------------------------------------------------------------------------
3886 # tests that need qmake
3887 #-------------------------------------------------------------------------------
3889 #-------------------------------------------------------------------------------
3890 # determine the target and host architectures
3891 #-------------------------------------------------------------------------------
3893 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3894 CFG_ARCH=`"$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -e "s,^Project MESSAGE: ,," -e "s,^#.*$,,g" | grep -v "^$"`
3895 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3896 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3897 # Do the same test again, using the host compiler
3898 CFG_HOST_ARCH=`"$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -e "s,^Project MESSAGE: ,," -e "s,^#.*$,,g" | grep -v "^$"`
3899 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3901 # not cross compiling, host == target
3902 CFG_HOST_ARCH="$CFG_ARCH"
3905 if [ "$OPT_VERBOSE" = "yes" ]; then
3906 echo "System architecture: '$CFG_ARCH'"
3907 if [ "$PLATFORM_QPA" = "yes" ]; then
3908 echo "Host architecture: '$CFG_HOST_ARCH'"
3912 #-------------------------------------------------------------------------------
3913 # functionality tests
3914 #-------------------------------------------------------------------------------
3916 # detect availability of float math.h functions
3917 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3918 CFG_USE_FLOATMATH=yes
3920 CFG_USE_FLOATMATH=no
3923 # detect mmx support
3924 if [ "${CFG_MMX}" = "auto" ]; then
3925 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
3932 # detect 3dnow support
3933 if [ "${CFG_3DNOW}" = "auto" ]; then
3934 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
3941 # detect sse support
3942 if [ "${CFG_SSE}" = "auto" ]; then
3943 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
3950 # detect sse2 support
3951 if [ "${CFG_SSE2}" = "auto" ]; then
3952 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3959 # detect sse3 support
3960 if [ "${CFG_SSE3}" = "auto" ]; then
3961 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3968 # detect ssse3 support
3969 if [ "${CFG_SSSE3}" = "auto" ]; then
3970 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3977 # detect sse4.1 support
3978 if [ "${CFG_SSE4_1}" = "auto" ]; then
3979 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
3986 # detect sse4.2 support
3987 if [ "${CFG_SSE4_2}" = "auto" ]; then
3988 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
3995 # detect avx support
3996 if [ "${CFG_AVX}" = "auto" ]; then
3997 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4004 # check iWMMXt support
4005 if [ "$CFG_IWMMXT" = "yes" ]; then
4006 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4007 if [ $? != "0" ]; then
4008 echo "The iWMMXt functionality test failed!"
4009 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4014 # detect neon support
4015 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4016 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
4021 elif [ "$CFG_ARCH" != "arm" ]; then
4025 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4028 if [ "$CFG_ZLIB" = "no" ]; then
4029 # Note: Qt no longer support builds without zlib
4030 # So we force a "no" to be "auto" here.
4031 # If you REALLY really need no zlib support, you can still disable
4032 # it by doing the following:
4033 # add "no-zlib" to mkspecs/qconfig.pri
4034 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4036 # There's no guarantee that Qt will build under those conditions
4041 if [ "$CFG_ZLIB" = "auto" ]; then
4042 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
4049 if [ "$CFG_LARGEFILE" = "auto" ]; then
4050 #Large files should be enabled for all Linux systems
4054 # detect how jpeg should be built
4055 if [ "$CFG_JPEG" = "auto" ]; then
4056 if [ "$CFG_SHARED" = "yes" ]; then
4063 if [ "$CFG_LIBJPEG" = "auto" ]; then
4064 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
4071 # detect how gif should be built
4072 if [ "$CFG_GIF" = "auto" ]; then
4073 if [ "$CFG_SHARED" = "yes" ]; then
4081 if [ "$CFG_LIBPNG" = "auto" ]; then
4082 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
4089 # detect accessibility
4090 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4091 CFG_ACCESSIBILITY=yes
4094 # auto-detect SQL-modules support
4095 for _SQLDR in $CFG_SQL_AVAILABLE; do
4098 if [ "$CFG_SQL_mysql" != "no" ]; then
4099 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4100 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4101 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4102 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4103 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4104 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4105 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4107 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4108 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4109 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4110 echo " You need MySql 4 or higher."
4111 echo " If you believe this message is in error you may use the continue"
4112 echo " switch (-continue) to $0 to continue."
4117 QT_LFLAGS_MYSQL_R=""
4121 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
4122 QMakeVar add CONFIG use_libmysqlclient_r
4123 if [ "$CFG_SQL_mysql" = "auto" ]; then
4124 CFG_SQL_mysql=plugin
4126 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4127 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
4128 if [ "$CFG_SQL_mysql" = "auto" ]; then
4129 CFG_SQL_mysql=plugin
4132 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4133 echo "MySQL support cannot be enabled due to functionality tests!"
4134 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4135 echo " If you believe this message is in error you may use the continue"
4136 echo " switch (-continue) to $0 to continue."
4141 QT_LFLAGS_MYSQL_R=""
4149 if [ "$CFG_SQL_psql" != "no" ]; then
4150 # Be careful not to use native pg_config when cross building.
4151 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4152 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4153 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4155 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4156 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4157 # But, respect PSQL_LIBS if set
4158 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4159 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
4160 if [ "$CFG_SQL_psql" = "auto" ]; then
4164 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4165 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4166 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4167 echo " If you believe this message is in error you may use the continue"
4168 echo " switch (-continue) to $0 to continue."
4179 if [ "$CFG_SQL_odbc" != "no" ]; then
4180 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
4181 if [ "$CFG_SQL_odbc" = "auto" ]; then
4185 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
4186 QT_LFLAGS_ODBC="-liodbc"
4187 if [ "$CFG_SQL_odbc" = "auto" ]; then
4191 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4192 echo "ODBC support cannot be enabled due to functionality tests!"
4193 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4194 echo " If you believe this message is in error you may use the continue"
4195 echo " switch (-continue) to $0 to continue."
4205 if [ "$CFG_SQL_oci" != "no" ]; then
4206 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
4207 if [ "$CFG_SQL_oci" = "auto" ]; then
4211 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4212 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4213 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4214 echo " If you believe this message is in error you may use the continue"
4215 echo " switch (-continue) to $0 to continue."
4224 if [ "$CFG_SQL_tds" != "no" ]; then
4225 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4226 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4227 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
4228 if [ "$CFG_SQL_tds" = "auto" ]; then
4232 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4233 echo "TDS support cannot be enabled due to functionality tests!"
4234 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4235 echo " If you believe this message is in error you may use the continue"
4236 echo " switch (-continue) to $0 to continue."
4245 if [ "$CFG_SQL_db2" != "no" ]; then
4246 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
4247 if [ "$CFG_SQL_db2" = "auto" ]; then
4251 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4252 echo "ODBC support cannot be enabled due to functionality tests!"
4253 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4254 echo " If you believe this message is in error you may use the continue"
4255 echo " switch (-continue) to $0 to continue."
4264 if [ "$CFG_SQL_ibase" != "no" ]; then
4265 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
4266 if [ "$CFG_SQL_ibase" = "auto" ]; then
4267 CFG_SQL_ibase=plugin
4270 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4271 echo "InterBase support cannot be enabled due to functionality tests!"
4272 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4273 echo " If you believe this message is in error you may use the continue"
4274 echo " switch (-continue) to $0 to continue."
4283 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4284 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
4285 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4286 CFG_SQL_sqlite2=plugin
4289 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4290 echo "SQLite2 support cannot be enabled due to functionality tests!"
4291 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4292 echo " If you believe this message is in error you may use the continue"
4293 echo " switch (-continue) to $0 to continue."
4302 if [ "$CFG_SQL_sqlite" != "no" ]; then
4303 SQLITE_AUTODETECT_FAILED="no"
4304 if [ "$CFG_SQLITE" = "system" ]; then
4305 if [ -n "$PKG_CONFIG" ]; then
4306 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4307 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4309 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
4310 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4311 CFG_SQL_sqlite=plugin
4313 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4315 SQLITE_AUTODETECT_FAILED="yes"
4318 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4319 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4320 CFG_SQL_sqlite=plugin
4323 SQLITE_AUTODETECT_FAILED="yes"
4327 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4328 echo "SQLite support cannot be enabled due to functionality tests!"
4329 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4330 echo " If you believe this message is in error you may use the continue"
4331 echo " switch (-continue) to $0 to continue."
4337 if [ "$OPT_VERBOSE" = "yes" ]; then
4338 echo "unknown SQL driver: $_SQLDR"
4344 # auto-detect NIS support
4345 if [ "$CFG_NIS" != "no" ]; then
4346 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
4349 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4350 echo "NIS support cannot be enabled due to functionality tests!"
4351 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4352 echo " If you believe this message is in error you may use the continue"
4353 echo " switch (-continue) to $0 to continue."
4361 # auto-detect CUPS support
4362 if [ "$CFG_CUPS" != "no" ]; then
4363 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
4366 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4367 echo "Cups support cannot be enabled due to functionality tests!"
4368 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4369 echo " If you believe this message is in error you may use the continue"
4370 echo " switch (-continue) to $0 to continue."
4378 # auto-detect iconv(3) support
4379 if [ "$CFG_ICONV" != "no" ]; then
4380 if [ "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
4382 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
4384 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
4386 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
4389 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4390 echo "Iconv support cannot be enabled due to functionality tests!"
4391 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4392 echo " If you believe this message is in error you may use the continue"
4393 echo " switch (-continue) to $0 to continue."
4401 # auto-detect libdbus-1 support
4402 if [ "$CFG_DBUS" != "no" ]; then
4403 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4404 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4405 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4407 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
4408 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4409 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4410 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4412 if [ "$CFG_DBUS" = "auto" ]; then
4414 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4415 # CFG_DBUS is "yes" or "linked" here
4417 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4418 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4419 echo " If you believe this message is in error you may use the continue"
4420 echo " switch (-continue) to $0 to continue."
4427 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4429 # auto-detect Glib support
4430 if [ "$CFG_GLIB" != "no" ]; then
4431 if [ -n "$PKG_CONFIG" ]; then
4432 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4433 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4435 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
4437 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4438 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4440 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4441 echo "Glib support cannot be enabled due to functionality tests!"
4442 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4443 echo " If you believe this message is in error you may use the continue"
4444 echo " switch (-continue) to $0 to continue."
4453 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4454 if [ -n "$PKG_CONFIG" ]; then
4455 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4456 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4458 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
4460 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4461 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4463 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4464 echo "Gstreamer support cannot be enabled due to functionality tests!"
4465 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4466 echo " If you believe this message is in error you may use the continue"
4467 echo " switch (-continue) to $0 to continue."
4473 elif [ "$CFG_GLIB" = "no" ]; then
4477 # auto-detect libicu support
4478 if [ "$CFG_ICU" != "no" ]; then
4479 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4480 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4482 if [ "$CFG_ICU" = "auto" ]; then
4484 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4487 echo "The ICU library support cannot be enabled."
4488 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4489 echo " If you believe this message is in error you may use the continue"
4490 echo " switch (-continue) to $0 to continue."
4496 # Auto-detect PulseAudio support
4497 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4498 if [ -n "$PKG_CONFIG" ]; then
4499 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4500 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4502 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
4504 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4505 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4507 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4508 echo "PulseAudio support cannot be enabled due to functionality tests!"
4509 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4510 echo " If you believe this message is in error you may use the continue"
4511 echo " switch (-continue) to $0 to continue."
4521 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4522 x11tests="$relpath/config.tests/x11"
4525 # work around broken X11 headers when using GCC 2.95 or later
4527 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4528 if [ $NOTYPE = "yes" ]; then
4529 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4530 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4533 # Check we actually have X11 :-)
4534 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4535 if [ $? != "0" ]; then
4536 echo "Basic XLib functionality test failed!"
4537 echo " You might need to modify the include and library search paths by editing"
4538 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4544 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4545 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4546 if [ "$CFG_GUI" = "no" ]; then
4547 if [ "$CFG_OPENGL" = "auto" ]; then
4550 if [ "$CFG_OPENGL" != "no" ]; then
4551 echo "OpenGL enabled, but GUI disabled."
4552 echo " You might need to either enable the GUI or disable OpenGL"
4556 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4557 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
4559 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
4561 if [ "$CFG_EGL" = "no" ]; then
4565 if [ "$CFG_OPENGL" = "yes" ]; then
4566 echo "All the OpenGL functionality tests failed!"
4567 echo " You might need to modify the include and library search paths by editing"
4568 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4569 echo " ${XQMAKESPEC}."
4576 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4577 if [ "$CFG_OPENGL" = "desktop" ]; then
4578 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4579 if [ $? != "0" ]; then
4580 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4587 elif [ "$CFG_OPENGL" = "es2" ]; then
4589 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4590 if [ $? != "0" ]; then
4591 echo "The OpenGL ES 2.0 functionality test failed!"
4592 echo " You might need to modify the include and library search paths by editing"
4593 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4594 echo " ${XQMAKESPEC}."
4597 elif [ "$CFG_OPENGL" = "desktop" ]; then
4598 # Desktop OpenGL support
4599 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4600 if [ $? != "0" ]; then
4601 echo "The OpenGL functionality test failed!"
4602 echo " You might need to modify the include and library search paths by editing"
4603 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4604 echo " ${XQMAKESPEC}."
4609 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4610 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4611 if [ $? != "0" ]; then
4612 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4619 fi # X11/MINGW OpenGL
4622 if [ "$PLATFORM_X11" = "yes" ]; then
4623 # auto-detect Xcursor support
4624 if [ "$CFG_XCURSOR" != "no" ]; then
4625 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
4626 if [ "$CFG_XCURSOR" != "runtime" ]; then
4630 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4631 echo "Xcursor support cannot be enabled due to functionality tests!"
4632 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4633 echo " If you believe this message is in error you may use the continue"
4634 echo " switch (-continue) to $0 to continue."
4642 # auto-detect Xfixes support
4643 if [ "$CFG_XFIXES" != "no" ]; then
4644 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4645 if [ "$CFG_XFIXES" != "runtime" ]; then
4649 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4650 echo "Xfixes support cannot be enabled due to functionality tests!"
4651 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4652 echo " If you believe this message is in error you may use the continue"
4653 echo " switch (-continue) to $0 to continue."
4661 # auto-detect Xrandr support (resize and rotate extension)
4662 if [ "$CFG_XRANDR" != "no" ]; then
4663 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
4664 if [ "$CFG_XRANDR" != "runtime" ]; then
4668 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4669 echo "Xrandr support cannot be enabled due to functionality tests!"
4670 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4671 echo " If you believe this message is in error you may use the continue"
4672 echo " switch (-continue) to $0 to continue."
4680 # auto-detect Xrender support
4681 if [ "$CFG_XRENDER" != "no" ]; then
4682 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
4685 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4686 echo "Xrender support cannot be enabled due to functionality tests!"
4687 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4688 echo " If you believe this message is in error you may use the continue"
4689 echo " switch (-continue) to $0 to continue."
4697 # auto-detect MIT-SHM support
4698 if [ "$CFG_MITSHM" != "no" ]; then
4699 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
4702 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4703 echo "MITSHM support cannot be enabled due to functionality tests!"
4704 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4705 echo " If you believe this message is in error you may use the continue"
4706 echo " switch (-continue) to $0 to continue."
4714 # auto-detect FontConfig support
4715 if [ "$CFG_FONTCONFIG" != "no" ]; then
4716 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4717 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4718 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4720 QT_CFLAGS_FONTCONFIG=
4721 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4723 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
4725 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4726 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4727 CFG_LIBFREETYPE=system
4729 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4730 echo "FontConfig support cannot be enabled due to functionality tests!"
4731 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4732 echo " If you believe this message is in error you may use the continue"
4733 echo " switch (-continue) to $0 to continue."
4741 # auto-detect Session Management support
4742 if [ "$CFG_SM" = "auto" ]; then
4743 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
4746 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4747 echo "Session Management support cannot be enabled due to functionality tests!"
4748 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4749 echo " If you believe this message is in error you may use the continue"
4750 echo " switch (-continue) to $0 to continue."
4758 # auto-detect SHAPE support
4759 if [ "$CFG_XSHAPE" != "no" ]; then
4760 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
4763 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4764 echo "XShape support cannot be enabled due to functionality tests!"
4765 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4766 echo " If you believe this message is in error you may use the continue"
4767 echo " switch (-continue) to $0 to continue."
4775 # auto-detect XVideo support
4776 if [ "$CFG_XVIDEO" != "no" ]; then
4777 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
4780 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4781 echo "XVideo support cannot be enabled due to functionality tests!"
4782 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4783 echo " If you believe this message is in error you may use the continue"
4784 echo " switch (-continue) to $0 to continue."
4792 # auto-detect XSync support
4793 if [ "$CFG_XSYNC" != "no" ]; then
4794 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
4797 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4798 echo "XSync support cannot be enabled due to functionality tests!"
4799 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4800 echo " If you believe this message is in error you may use the continue"
4801 echo " switch (-continue) to $0 to continue."
4809 # auto-detect Xinerama support
4810 if [ "$CFG_XINERAMA" != "no" ]; then
4811 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
4812 if [ "$CFG_XINERAMA" != "runtime" ]; then
4816 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4817 echo "Xinerama support cannot be enabled due to functionality tests!"
4818 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4819 echo " If you believe this message is in error you may use the continue"
4820 echo " switch (-continue) to $0 to continue."
4828 # auto-detect Xinput support
4829 if [ "$CFG_XINPUT" != "no" ]; then
4830 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
4831 if [ "$CFG_XINPUT" != "runtime" ]; then
4835 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4836 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4837 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4838 echo " If you believe this message is in error you may use the continue"
4839 echo " switch (-continue) to $0 to continue."
4847 # auto-detect XKB support
4848 if [ "$CFG_XKB" != "no" ]; then
4849 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
4852 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4853 echo "XKB support cannot be enabled due to functionality tests!"
4854 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4855 echo " If you believe this message is in error you may use the continue"
4856 echo " switch (-continue) to $0 to continue."
4864 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4865 if [ -n "$PKG_CONFIG" ]; then
4866 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4867 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4869 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4871 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4872 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4874 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4875 echo "Gtk theme 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."
4884 elif [ "$CFG_GLIB" = "no" ]; then
4890 if [ "$BUILD_ON_MAC" = "yes" ]; then
4891 if [ "$CFG_PHONON" != "no" ]; then
4892 # Always enable Phonon (unless it was explicitly disabled)
4896 if [ "$CFG_COREWLAN" = "auto" ]; then
4897 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
4906 if [ "$PLATFORM_QPA" = "yes" ]; then
4907 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4908 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4909 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
4911 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
4914 if [ "$CFG_OPENGL" = "yes" ]; then
4915 echo "All the OpenGL functionality tests failed!"
4916 echo " You might need to modify the include and library search paths by editing"
4917 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4918 echo " ${XQMAKESPEC}."
4923 elif [ "$CFG_OPENGL" = "es2" ]; then
4925 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4926 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4927 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4928 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4929 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4930 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4931 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4932 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4935 "$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
4936 if [ $? != "0" ]; then
4937 echo "The OpenGL ES 2.0 functionality test failed!"
4938 echo " You might need to modify the include and library search paths by editing"
4939 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4940 echo " ${XQMAKESPEC}."
4943 elif [ "$CFG_OPENGL" = "desktop" ]; then
4944 # Desktop OpenGL support
4945 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4946 if [ $? != "0" ]; then
4947 echo "The OpenGL functionality test failed!"
4948 echo " You might need to modify the include and library search paths by editing"
4949 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4950 echo " ${XQMAKESPEC}."
4955 # auto-detect FontConfig support
4956 if [ "$CFG_FONTCONFIG" != "no" ]; then
4957 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4958 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4959 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4961 QT_CFLAGS_FONTCONFIG=
4962 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4964 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
4965 QT_CONFIG="$QT_CONFIG fontconfig"
4966 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4967 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4968 CFG_LIBFREETYPE=system
4973 # Save these for a check later
4974 ORIG_CFG_XCB="$CFG_XCB"
4976 if [ "$CFG_LIBUDEV" != "no" ]; then
4977 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4978 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4979 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4980 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4981 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4983 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
4985 QT_CONFIG="$QT_CONFIG libudev"
4986 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4987 echo "The libudev functionality test failed!"
4991 QMakeVar add DEFINES QT_NO_LIBUDEV
4995 if [ "$CFG_EVDEV" != "no" ]; then
4996 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
4998 QT_CONFIG="$QT_CONFIG evdev"
4999 elif [ "$CFG_EVDEV" = "yes" ]; then
5000 echo "The evdev functionality test failed!"
5004 QMakeVar add DEFINES QT_NO_EVDEV
5008 # Check we actually have X11 :-)
5009 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
5010 QT_CONFIG="$QT_CONFIG xlib"
5013 # auto-detect Xrender support
5014 if [ "$CFG_XRENDER" != "no" ]; then
5015 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
5017 QT_CONFIG="$QT_CONFIG xrender"
5019 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5020 echo "Xrender support cannot be enabled due to functionality tests!"
5021 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5022 echo " If you believe this message is in error you may use the continue"
5023 echo " switch (-continue) to $0 to continue."
5031 if [ "$CFG_XCB" != "no" ]; then
5032 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then
5033 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5034 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5036 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
5038 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
5039 QT_CONFIG="$QT_CONFIG xcb-render"
5042 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
5044 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5047 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
5048 QT_CONFIG="$QT_CONFIG xcb-xlib"
5051 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5052 # auto-detect XInput2/Xinput support
5053 if [ "$CFG_XINPUT2" != "no" ]; then
5054 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
5058 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5059 echo "XInput2 support cannot be enabled due to functionality tests!"
5060 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5061 echo " If you believe this message is in error you may use the continue"
5062 echo " switch (-continue) to $0 to continue."
5071 if [ "$CFG_XCB" = "yes" ]; then
5072 echo "The XCB test failed!"
5073 echo " You might need to install dependency packages."
5074 echo " See src/plugins/platforms/xcb/README."
5078 QMakeVar add DEFINES QT_NO_XCB
5082 # Detect libxkbcommon
5083 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5084 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5085 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5086 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5087 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5089 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5092 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5093 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5094 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5095 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5098 if [ "$BUILD_ON_MAC" = "yes" ]; then
5099 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
5100 QT_CONFIG="$QT_CONFIG coreservices"
5102 QMakeVar add DEFINES QT_NO_CORESERVICES
5106 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5107 if [ "$CFG_XCB" = "no" ]; then
5108 if [ "$ORIG_CFG_XCB" = "auto" ]; then
5109 echo "No QPA platform plugin enabled!"
5110 echo " If you really want to build without a QPA platform plugin you must pass"
5111 echo " -no-xcb. Doing this will produce a Qt that"
5112 echo " cannot run GUI applications."
5113 echo " The dependencies needed for xcb to build are listed in"
5114 echo " src/plugins/platforms/xcb/README"
5124 if [ "$PLATFORM_X11" = "yes" ]; then
5125 if [ "$CFG_EGL" != "no" ]; then
5126 # detect EGL support
5127 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
5128 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5133 if [ "$EGL_VARIANT" = "none" ]; then
5134 if [ "$CFG_EGL" = "yes" ]; then
5135 echo "The EGL functionality test failed!"
5136 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5137 echo " You might need to modify the include and library search paths by editing"
5138 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5139 echo " ${XQMAKESPEC}."
5143 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5144 if [ "$CFG_OPENGL" = "es2" ]; then
5151 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5154 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5155 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5156 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
5157 CFG_LIBFREETYPE=system
5164 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5168 if [ "$CFG_STL" != "no" ]; then
5169 if [ "$HAVE_STL" = "yes" ]; then
5172 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5173 echo "STL support cannot be enabled due to functionality tests!"
5174 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5175 echo " If you believe this message is in error you may use the continue"
5176 echo " switch (-continue) to $0 to continue."
5184 # detect POSIX clock_gettime()
5185 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5186 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
5187 CFG_CLOCK_GETTIME=yes
5189 CFG_CLOCK_GETTIME=no
5193 # detect POSIX monotonic clocks
5194 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5195 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
5196 CFG_CLOCK_MONOTONIC=yes
5198 CFG_CLOCK_MONOTONIC=no
5200 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5201 CFG_CLOCK_MONOTONIC=no
5205 if [ "$CFG_MREMAP" = "auto" ]; then
5206 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5213 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5214 if [ "$CFG_GETADDRINFO" != "no" ]; then
5215 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5218 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5219 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5220 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5221 echo " If you believe this message is in error you may use the continue"
5222 echo " switch (-continue) to $0 to continue."
5230 # find if the platform provides inotify
5231 if [ "$CFG_INOTIFY" != "no" ]; then
5232 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5235 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5236 echo "inotify 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 # find if the platform provides if_nametoindex (ipv6 interface name support)
5248 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5249 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
5252 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5253 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5254 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5255 echo " If you believe this message is in error you may use the continue"
5256 echo " switch (-continue) to $0 to continue."
5264 # find if the platform provides getifaddrs (network interface enumeration)
5265 if [ "$CFG_GETIFADDRS" != "no" ]; then
5266 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5269 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5270 echo "getifaddrs support cannot be enabled due to functionality tests!"
5271 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5272 echo " If you believe this message is in error you may use the continue"
5273 echo " switch (-continue) to $0 to continue."
5282 if [ "$CFG_OPENSSL" != "no" ]; then
5283 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
5284 if [ "$CFG_OPENSSL" = "auto" ]; then
5288 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5289 echo "OpenSSL support cannot be enabled due to functionality tests!"
5290 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5291 echo " If you believe this message is in error you may use the continue"
5292 echo " switch (-continue) to $0 to continue."
5301 if [ "$CFG_PCRE" != "qt" ]; then
5302 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5305 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5306 echo "PCRE support cannot be enabled due to functionality tests!"
5307 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5308 echo " If you believe this message is in error you may use the continue"
5309 echo " switch (-continue) to $0 to continue."
5317 # detect OpenVG support
5318 if [ "$CFG_OPENVG" != "no" ]; then
5319 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
5320 if [ "$CFG_OPENVG" = "auto" ]; then
5323 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
5324 if [ "$CFG_OPENVG" = "auto" ]; then
5327 CFG_OPENVG_ON_OPENGL=yes
5328 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
5329 if [ "$CFG_OPENVG" = "auto" ]; then
5332 CFG_OPENVG_LC_INCLUDES=yes
5333 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
5334 if [ "$CFG_OPENVG" = "auto" ]; then
5337 CFG_OPENVG_LC_INCLUDES=yes
5338 CFG_OPENVG_ON_OPENGL=yes
5340 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5341 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5342 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5343 echo " If you believe this message is in error you may use the continue"
5344 echo " switch (-continue) to $0 to continue."
5350 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
5351 CFG_OPENVG_SHIVA=yes
5355 if [ "$CFG_ALSA" = "auto" ]; then
5356 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5363 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5364 if [ "$CFG_ARCH" = "arm" ]; then
5365 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5366 if [ $? != "0" ]; then
5367 CFG_JAVASCRIPTCORE_JIT=no
5370 case "$XPLATFORM" in
5372 CFG_JAVASCRIPTCORE_JIT=no
5378 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5379 QMakeVar set JAVASCRIPTCORE_JIT yes
5380 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5381 QMakeVar set JAVASCRIPTCORE_JIT no
5384 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5385 CFG_AUDIO_BACKEND=yes
5388 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5389 echo "Warning: largefile support cannot be disabled for win32."
5393 #-------------------------------------------------------------------------------
5394 # ask for all that hasn't been auto-detected or specified in the arguments
5395 #-------------------------------------------------------------------------------
5397 # enable dwarf2 support on Mac
5398 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5399 QT_CONFIG="$QT_CONFIG dwarf2"
5402 # Detect the default arch (x86 or x86_64) on Mac OS X
5403 if [ "$BUILD_ON_MAC" = "yes" ]; then
5405 case `file "${outpath}/bin/qmake"` in
5413 # unsupported/unknown
5417 if [ -n "$DEFAULT_ARCH" ]; then
5418 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5419 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5420 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5421 # Make the application arch follow the Qt arch
5422 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5427 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5428 QT_CONFIG="$QT_CONFIG phonon-backend"
5431 # disable accessibility
5432 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5433 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5435 QT_CONFIG="$QT_CONFIG accessibility"
5438 # egl stuff does not belong in lighthouse, but rather in plugins
5439 if [ "$PLATFORM_QPA" = "yes" ]; then
5444 if [ "$CFG_EGL" = "no" ]; then
5445 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5447 QT_CONFIG="$QT_CONFIG egl"
5448 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5449 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5454 if [ "$CFG_OPENVG" = "no" ]; then
5455 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5457 QT_CONFIG="$QT_CONFIG openvg"
5458 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5459 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5461 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5462 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5464 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5465 QT_CONFIG="$QT_CONFIG shivavg"
5466 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5471 if [ "$CFG_OPENGL" = "no" ]; then
5472 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5474 QT_CONFIG="$QT_CONFIG opengl"
5477 if [ "$CFG_OPENGL" = "es2" ]; then
5478 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5481 if [ "$CFG_OPENGL" = "es2" ]; then
5482 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5483 QT_CONFIG="$QT_CONFIG opengles2"
5486 # safe execution environment
5487 if [ "$CFG_SXE" != "no" ]; then
5488 QT_CONFIG="$QT_CONFIG sxe"
5491 # build up the variables for output
5492 if [ "$CFG_DEBUG" = "yes" ]; then
5493 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5494 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5495 elif [ "$CFG_DEBUG" = "no" ]; then
5496 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5497 QMAKE_CONFIG="$QMAKE_CONFIG release"
5499 if [ "$CFG_SHARED" = "yes" ]; then
5500 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5501 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5502 elif [ "$CFG_SHARED" = "no" ]; then
5503 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5504 QMAKE_CONFIG="$QMAKE_CONFIG static"
5506 if [ "$PLATFORM_QPA" = "yes" ]; then
5507 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5508 QT_CONFIG="$QT_CONFIG qpa"
5509 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5510 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5513 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5514 # Do not set this here for Windows. Let qmake do it so
5515 # debug and release precompiled headers are kept separate.
5516 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5518 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5519 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5520 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5521 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5522 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5523 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5525 if [ "$CFG_STL" = "no" ]; then
5526 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5528 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5530 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5531 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5533 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5534 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5535 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5536 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5537 QMakeVar add QMAKE_CFLAGS -g
5538 QMakeVar add QMAKE_CXXFLAGS -g
5539 QT_CONFIG="$QT_CONFIG separate_debug_info"
5541 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5542 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5544 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5545 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5546 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5547 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5548 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5549 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5550 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5551 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5552 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5553 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5554 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5555 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5556 QT_CONFIG="$QT_CONFIG clock-gettime"
5558 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5559 QT_CONFIG="$QT_CONFIG clock-monotonic"
5561 if [ "$CFG_MREMAP" = "yes" ]; then
5562 QT_CONFIG="$QT_CONFIG mremap"
5564 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5565 QT_CONFIG="$QT_CONFIG getaddrinfo"
5567 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5568 QT_CONFIG="$QT_CONFIG ipv6ifname"
5570 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5571 QT_CONFIG="$QT_CONFIG getifaddrs"
5573 if [ "$CFG_INOTIFY" = "yes" ]; then
5574 QT_CONFIG="$QT_CONFIG inotify"
5576 if [ "$CFG_LIBJPEG" = "no" ]; then
5578 elif [ "$CFG_LIBJPEG" = "system" ]; then
5579 QT_CONFIG="$QT_CONFIG system-jpeg"
5581 if [ "$CFG_JPEG" = "no" ]; then
5582 QT_CONFIG="$QT_CONFIG no-jpeg"
5583 elif [ "$CFG_JPEG" = "yes" ]; then
5584 QT_CONFIG="$QT_CONFIG jpeg"
5586 if [ "$CFG_LIBPNG" = "no" ]; then
5589 if [ "$CFG_LIBPNG" = "system" ]; then
5590 QT_CONFIG="$QT_CONFIG system-png"
5592 if [ "$CFG_PNG" = "no" ]; then
5593 QT_CONFIG="$QT_CONFIG no-png"
5594 elif [ "$CFG_PNG" = "yes" ]; then
5595 QT_CONFIG="$QT_CONFIG png"
5597 if [ "$CFG_GIF" = "no" ]; then
5598 QT_CONFIG="$QT_CONFIG no-gif"
5599 elif [ "$CFG_GIF" = "yes" ]; then
5600 QT_CONFIG="$QT_CONFIG gif"
5602 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5603 QT_CONFIG="$QT_CONFIG no-freetype"
5604 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5605 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5606 QT_CONFIG="$QT_CONFIG system-freetype"
5608 QT_CONFIG="$QT_CONFIG freetype"
5610 if [ "$CFG_GUI" = "auto" ]; then
5613 if [ "$CFG_GUI" = "no" ]; then
5614 QT_CONFIG="$QT_CONFIG no-gui"
5617 if [ "$CFG_WIDGETS" = "no" ]; then
5618 QT_CONFIG="$QT_CONFIG no-widgets"
5619 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5622 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5623 #On Mac we implicitly link against libz, so we
5624 #never use the 3rdparty stuff.
5625 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5627 if [ "$CFG_ZLIB" = "yes" ]; then
5628 QT_CONFIG="$QT_CONFIG zlib"
5629 elif [ "$CFG_ZLIB" = "system" ]; then
5630 QT_CONFIG="$QT_CONFIG system-zlib"
5633 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5634 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5635 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5636 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5637 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5638 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5639 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5640 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5641 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5642 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
5643 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5644 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5645 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5646 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5647 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5649 if [ "$PLATFORM_X11" = "yes" ]; then
5650 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5652 # for some reason, the following libraries are not always built shared,
5653 # so *every* program/lib (including Qt) has to link against them
5654 if [ "$CFG_XSHAPE" = "yes" ]; then
5655 QT_CONFIG="$QT_CONFIG xshape"
5657 if [ "$CFG_XVIDEO" = "yes" ]; then
5658 QT_CONFIG="$QT_CONFIG xvideo"
5660 if [ "$CFG_XSYNC" = "yes" ]; then
5661 QT_CONFIG="$QT_CONFIG xsync"
5663 if [ "$CFG_XINERAMA" = "yes" ]; then
5664 QT_CONFIG="$QT_CONFIG xinerama"
5665 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5667 if [ "$CFG_XCURSOR" = "yes" ]; then
5668 QT_CONFIG="$QT_CONFIG xcursor"
5669 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5671 if [ "$CFG_XFIXES" = "yes" ]; then
5672 QT_CONFIG="$QT_CONFIG xfixes"
5673 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5675 if [ "$CFG_XRANDR" = "yes" ]; then
5676 QT_CONFIG="$QT_CONFIG xrandr"
5677 if [ "$CFG_XRENDER" != "yes" ]; then
5678 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5679 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5681 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5684 if [ "$CFG_XRENDER" = "yes" ]; then
5685 QT_CONFIG="$QT_CONFIG xrender"
5686 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5688 if [ "$CFG_MITSHM" = "yes" ]; then
5689 QT_CONFIG="$QT_CONFIG mitshm"
5691 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5692 QT_CONFIG="$QT_CONFIG fontconfig"
5694 if [ "$CFG_XINPUT" = "yes" ]; then
5695 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5697 if [ "$CFG_XINPUT" = "yes" ]; then
5698 QT_CONFIG="$QT_CONFIG xinput tablet"
5700 if [ "$CFG_XKB" = "yes" ]; then
5701 QT_CONFIG="$QT_CONFIG xkb"
5705 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5706 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5707 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5709 if [ "$PLATFORM_MAC" = "yes" ]; then
5710 if [ "$CFG_RPATH" = "yes" ]; then
5711 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5713 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5714 if [ -n "$RPATH_FLAGS" ]; then
5716 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5720 elif [ "$CFG_RPATH" = "yes" ]; then
5721 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5725 if [ "$CFG_RPATH" = "yes" ]; then
5726 # set the default rpath to the library installation directory
5727 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5729 if [ -n "$RPATH_FLAGS" ]; then
5730 # add the user defined rpaths
5731 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5735 if [ '!' -z "$I_FLAGS" ]; then
5736 # add the user define include paths
5737 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5738 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5741 if [ '!' -z "$W_FLAGS" ]; then
5742 # add the user defined warning flags
5743 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5744 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5745 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5748 # turn off exceptions for the compilers that support it
5749 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5750 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5752 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5755 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5756 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5759 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5760 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5761 # Follow default behavior of configure.exe by overriding with "rtti".
5762 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5765 if [ "$CFG_ALSA" = "yes" ]; then
5766 QT_CONFIG="$QT_CONFIG alsa"
5769 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5770 QT_CONFIG="$QT_CONFIG pulseaudio"
5773 if [ "$CFG_COREWLAN" = "yes" ]; then
5774 QT_CONFIG="$QT_CONFIG corewlan"
5777 if [ "$CFG_ICU" = "yes" ]; then
5778 QT_CONFIG="$QT_CONFIG icu"
5781 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5782 QT_CONFIG="$QT_CONFIG force_asserts"
5785 if [ "$CFG_PCRE" = "qt" ]; then
5786 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5790 # Some Qt modules are too advanced in C++ for some old compilers
5791 # Detect here the platforms where they are known to work.
5793 # See Qt documentation for more information on which features are
5794 # supported and on which compilers.
5796 canBuildQtConcurrent="yes"
5797 canUseV8Snapshot="yes"
5799 case "$XPLATFORM" in
5801 # PA-RISC's assembly is too limited
5802 # gcc 3.4 on that platform can't build QtXmlPatterns
5803 # the assembly it generates cannot be compiled
5805 # Check gcc's version
5806 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5810 canBuildQtXmlPatterns="no"
5814 canBuildQtXmlPatterns="no"
5818 unsupported/vxworks-*-g++*)
5821 unsupported/vxworks-*-dcc*)
5823 canBuildQtXmlPatterns="no"
5826 # Check gcc's version
5827 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5835 canBuildQtXmlPatterns="no"
5840 # Check the compiler version
5841 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5844 canBuildQtXmlPatterns="no"
5845 canBuildQtConcurrent="no"
5849 canBuildQtConcurrent="no"
5855 canBuildQtXmlPatterns="no"
5856 canBuildQtConcurrent="no"
5862 # Get the xlC version
5863 cat > xlcver.c <<EOF
5867 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5872 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5873 xlcver=`./xlcver 2>/dev/null`
5876 if [ "$OPT_VERBOSE" = "yes" ]; then
5877 if [ -n "$xlcver" ]; then
5878 echo Found IBM xlC version: $xlcver.
5880 echo Could not determine IBM xlC version, assuming oldest supported.
5887 canBuildQtXmlPatterns="no"
5888 canBuildQtConcurrent="no"
5892 canBuildQtConcurrent="no"
5898 canBuildQtConcurrent="no"
5902 if [ "$CFG_GUI" = "no" ]; then
5903 # WebKit requires QtGui
5907 if [ "$CFG_SHARED" = "no" ]; then
5909 echo "WARNING: Using static linking will disable the WebKit module."
5914 CFG_CONCURRENT="yes"
5915 if [ "$canBuildQtConcurrent" = "no" ]; then
5916 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5919 QT_CONFIG="$QT_CONFIG concurrent"
5923 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5924 QT_CONFIG="$QT_CONFIG audio-backend"
5928 if [ "$CFG_WEBKIT" = "debug" ]; then
5929 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5933 QT_CONFIG="$QT_CONFIG v8"
5934 # Detect snapshot support
5935 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5936 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5939 *) canUseV8Snapshot="no"
5943 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5944 # QEMU crashes when building inside Scratchbox with an ARM target
5945 canUseV8Snapshot="no"
5948 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5949 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5951 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5952 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5955 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5956 QT_CONFIG="$QT_CONFIG v8snapshot"
5960 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
5961 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
5964 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5967 QMakeVar add QMAKE_CFLAGS -fno-exceptions
5968 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
5969 QMakeVar add QMAKE_LFLAGS -fno-exceptions
5974 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
5975 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
5976 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
5983 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
5989 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5991 case "$COMPILER_VERSION" in
5993 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5994 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5995 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5998 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5999 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6000 QT_GCC_PATCH_VERSION=0
6010 #-------------------------------------------------------------------------------
6011 # part of configuration information goes into qconfig.h
6012 #-------------------------------------------------------------------------------
6014 case "$CFG_QCONFIG" in
6016 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6019 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6020 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6021 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6022 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6023 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6024 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6026 echo "#endif" >>"$tmpconfig"
6030 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6034 # define QT_EDITION $QT_EDITION
6038 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6039 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6041 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6042 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6045 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6046 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6049 if [ "$BUILD_ON_MAC" = "yes" ]; then
6050 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6051 #if defined(__LP64__)
6052 # define QT_POINTER_SIZE 8
6054 # define QT_POINTER_SIZE 4
6058 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6059 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6062 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6063 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6064 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6068 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6070 if [ "$CFG_DEV" = "yes" ]; then
6071 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6074 if [ "$PLATFORM_QPA" = "yes" ]; then
6075 # Add QPA to config.h
6076 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6079 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6080 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6083 # Add turned on SQL drivers
6084 for DRIVER in $CFG_SQL_AVAILABLE; do
6085 eval "VAL=\$CFG_SQL_$DRIVER"
6088 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6089 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6090 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6093 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6099 QMakeVar set sql-drivers "$SQL_DRIVERS"
6100 QMakeVar set sql-plugins "$SQL_PLUGINS"
6102 # Add other configuration options to the qconfig.h file
6103 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6104 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6105 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6106 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6107 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6108 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6109 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6111 # X11/Unix/Mac only configs
6112 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6113 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6114 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6115 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6116 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6117 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6118 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6119 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6120 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6121 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6122 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6123 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6124 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6125 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6126 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6128 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6129 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6130 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6131 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6132 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6133 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6134 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6135 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6136 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6137 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6138 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6139 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6140 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6142 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6143 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6144 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6145 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6146 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6147 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6148 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6149 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6151 # sort QCONFIG_FLAGS for neatness if we can
6152 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6153 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6155 if [ -n "$QCONFIG_FLAGS" ]; then
6156 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6157 #ifndef QT_BOOTSTRAPPED
6160 for cfg in $QCONFIG_FLAGS; do
6161 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6162 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6163 # figure out define logic, so we can output the correct
6164 # ifdefs to override the global defines in a project
6166 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6167 # QT_NO_option can be forcefully turned on by QT_option
6168 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6169 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6170 # QT_option can be forcefully turned off by QT_NO_option
6171 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6174 if [ -z $cfgdNeg ]; then
6175 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6182 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6183 #if defined($cfgd) && defined($cfgdNeg)
6185 #elif !defined($cfgd) && !defined($cfgdNeg)
6192 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6193 #endif // QT_BOOTSTRAPPED
6198 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6199 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6200 #define QT_VISIBILITY_AVAILABLE
6205 if [ -n "$QT_LIBINFIX" ]; then
6206 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6207 #define QT_LIBINFIX "$QT_LIBINFIX"
6212 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6213 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6214 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6216 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6217 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6218 chmod -w "$outpath/src/corelib/global/qconfig.h"
6219 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6220 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6224 #-------------------------------------------------------------------------------
6225 # save configuration into qconfig.pri
6226 #-------------------------------------------------------------------------------
6227 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6228 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6229 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6230 if [ "$CFG_DEBUG" = "yes" ]; then
6231 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6232 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6233 QT_CONFIG="$QT_CONFIG release"
6235 QT_CONFIG="$QT_CONFIG debug"
6236 elif [ "$CFG_DEBUG" = "no" ]; then
6237 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6238 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6239 QT_CONFIG="$QT_CONFIG debug"
6241 QT_CONFIG="$QT_CONFIG release"
6243 if [ "$CFG_STL" = "yes" ]; then
6244 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6246 if [ "$CFG_FRAMEWORK" = "no" ]; then
6247 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6249 QT_CONFIG="$QT_CONFIG qt_framework"
6250 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6252 if [ "$CFG_DEV" = "yes" ]; then
6253 QT_CONFIG="$QT_CONFIG private_tests"
6256 cat >>"$QTCONFIG.tmp" <<EOF
6258 CONFIG += $QTCONFIG_CONFIG
6260 QT_HOST_ARCH = $CFG_HOST_ARCH
6261 QT_EDITION = $Edition
6262 QT_CONFIG += $QT_CONFIG
6265 QT_VERSION = $QT_VERSION
6266 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6267 QT_MINOR_VERSION = $QT_MINOR_VERSION
6268 QT_PATCH_VERSION = $QT_PATCH_VERSION
6271 QT_LIBINFIX = $QT_LIBINFIX
6272 QT_NAMESPACE = $QT_NAMESPACE
6275 if [ -n "$CFG_SYSROOT" ]; then
6276 echo "# sysroot" >>"$QTCONFIG.tmp"
6277 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6278 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6279 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6280 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6281 echo "}" >> "$QTCONFIG.tmp"
6282 echo >> "$QTCONFIG.tmp"
6284 if [ "$CFG_RPATH" = "yes" ]; then
6285 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6287 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6288 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6289 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6290 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6293 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6294 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6295 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6298 # replace qconfig.pri if it differs from the newly created temp file
6299 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6300 rm -f "$QTCONFIG.tmp"
6302 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6305 #-------------------------------------------------------------------------------
6306 # save configuration into qmodule.pri
6307 #-------------------------------------------------------------------------------
6308 QTMODULE="$outpath/mkspecs/qmodule.pri"
6310 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6312 # Ensure we can link to uninistalled libraries
6313 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6314 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6316 if [ -n "$QT_CFLAGS_PSQL" ]; then
6317 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6319 if [ -n "$QT_LFLAGS_PSQL" ]; then
6320 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6322 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6323 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6325 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6326 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6328 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6329 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6331 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6332 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6334 if [ -n "$QT_LFLAGS_ODBC" ]; then
6335 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6337 if [ -n "$QT_LFLAGS_TDS" ]; then
6338 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6341 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6342 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6345 #dump in the OPENSSL_LIBS info
6346 if [ '!' -z "$OPENSSL_LIBS" ]; then
6347 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6348 elif [ "$CFG_OPENSSL" = "linked" ]; then
6349 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6352 #dump in the SDK info
6353 if [ '!' -z "$CFG_SDK" ]; then
6354 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6358 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6359 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6361 # replace qmodule.pri if it differs from the newly created temp file
6362 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6363 rm -f "$QTMODULE.tmp"
6365 mv -f "$QTMODULE.tmp" "$QTMODULE"
6368 #-------------------------------------------------------------------------------
6369 # save configuration into .qmake.cache
6370 #-------------------------------------------------------------------------------
6372 CACHEFILE="$outpath/.qmake.cache"
6373 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6374 cat >>"$CACHEFILE.tmp" <<EOF
6376 QT_SOURCE_TREE = \$\$quote($relpath)
6377 QT_BUILD_TREE = \$\$quote($outpath)
6378 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6380 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6381 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6382 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6384 include(\$\$PWD/mkspecs/qmodule.pri)
6385 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6389 #dump the qmake spec
6390 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6391 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6393 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6396 # replace .qmake.cache if it differs from the newly created temp file
6397 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6398 rm -f "$CACHEFILE.tmp"
6400 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6403 #-------------------------------------------------------------------------------
6404 # give feedback on configuration
6405 #-------------------------------------------------------------------------------
6409 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6412 This target is using the GNU C++ compiler ($PLATFORM).
6414 Recent versions of this compiler automatically include code for
6415 exceptions, which increase both the size of the Qt libraries and
6416 the amount of memory taken by your applications.
6418 You may choose to re-run `basename $0` with the -no-exceptions
6419 option to compile Qt without exceptions. This is completely binary
6420 compatible, and existing applications will continue to work.
6428 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6431 This target is using the MIPSpro C++ compiler ($PLATFORM).
6433 You may choose to re-run `basename $0` with the -no-exceptions
6434 option to compile Qt without exceptions. This will make the
6435 size of the Qt library smaller and reduce the amount of memory
6436 taken by your applications.
6448 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6449 echo "Build type: $PLATFORM"
6451 echo "Building on: $PLATFORM"
6452 echo "Building for: $XPLATFORM"
6455 echo "Architecture: $CFG_ARCH"
6456 if [ "$PLATFORM_QPA" = "yes" ]; then
6457 echo "Host architecture: $CFG_HOST_ARCH"
6460 if [ -n "$PLATFORM_NOTES" ]; then
6461 echo "Platform notes:"
6462 echo "$PLATFORM_NOTES"
6467 if [ "$OPT_VERBOSE" = "yes" ]; then
6468 echo $ECHO_N "qmake vars .......... $ECHO_C"
6469 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6470 echo "qmake switches ......... $QMAKE_SWITCHES"
6473 echo "Build .................. $CFG_BUILD_PARTS"
6474 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6475 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6476 echo "Debug .................. yes (combined)"
6477 if [ "$CFG_DEBUG" = "yes" ]; then
6478 echo "Default Link ........... debug"
6480 echo "Default Link ........... release"
6483 echo "Debug .................. $CFG_DEBUG"
6485 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6486 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6487 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6488 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6489 echo "QtGui module ........... $CFG_GUI"
6490 echo "QtWidgets module ....... $CFG_WIDGETS"
6491 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6492 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6494 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6496 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6497 echo "STL support ............ $CFG_STL"
6498 echo "PCH support ............ $CFG_PRECOMPILE"
6499 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6500 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6501 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6502 echo "AVX..................... ${CFG_AVX}"
6503 elif [ "$CFG_ARCH" = "arm" ]; then
6504 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6505 echo "NEON support ........... ${CFG_NEON}"
6507 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6508 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6509 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6510 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6511 echo "NIS support ............ $CFG_NIS"
6512 echo "CUPS support ........... $CFG_CUPS"
6513 echo "Iconv support .......... $CFG_ICONV"
6514 echo "Glib support ........... $CFG_GLIB"
6515 echo "GStreamer support ...... $CFG_GSTREAMER"
6516 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6517 echo "Large File support ..... $CFG_LARGEFILE"
6518 echo "GIF support ............ $CFG_GIF"
6519 if [ "$CFG_JPEG" = "no" ]; then
6520 echo "JPEG support ........... $CFG_JPEG"
6522 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6524 if [ "$CFG_PNG" = "no" ]; then
6525 echo "PNG support ............ $CFG_PNG"
6527 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6529 echo "zlib support ........... $CFG_ZLIB"
6530 echo "Session management ..... $CFG_SM"
6531 echo "libudev support ........ $CFG_LIBUDEV"
6533 if [ "$CFG_OPENGL" = "desktop" ]; then
6534 echo "OpenGL support ......... yes (Desktop OpenGL)"
6535 elif [ "$CFG_OPENGL" = "es2" ]; then
6536 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6538 echo "OpenGL support ......... no"
6540 if [ "$CFG_EGL" != "no" ]; then
6541 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6542 echo "EGL support ............ yes <GLES/egl.h>"
6544 echo "EGL support ............ yes <EGL/egl.h>"
6547 if [ "$CFG_OPENVG" ]; then
6548 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6549 echo "OpenVG support ......... ShivaVG"
6551 echo "OpenVG support ......... $CFG_OPENVG"
6554 if [ "$PLATFORM_X11" = "yes" ]; then
6555 echo "NAS sound support ...... $CFG_NAS"
6556 echo "XShape support ......... $CFG_XSHAPE"
6557 echo "XVideo support ......... $CFG_XVIDEO"
6558 echo "XSync support .......... $CFG_XSYNC"
6559 echo "Xinerama support ....... $CFG_XINERAMA"
6560 echo "Xcursor support ........ $CFG_XCURSOR"
6561 echo "Xfixes support ......... $CFG_XFIXES"
6562 echo "Xrandr support ......... $CFG_XRANDR"
6563 echo "Xi support ............. $CFG_XINPUT"
6564 echo "MIT-SHM support ........ $CFG_MITSHM"
6565 echo "FontConfig support ..... $CFG_FONTCONFIG"
6566 echo "XKB Support ............ $CFG_XKB"
6567 echo "immodule support ....... $CFG_IM"
6568 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6570 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6571 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6572 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6573 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6574 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6575 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6576 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6577 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6578 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6581 if [ "$CFG_OPENSSL" = "yes" ]; then
6582 OPENSSL_LINKAGE="(run-time)"
6583 elif [ "$CFG_OPENSSL" = "linked" ]; then
6584 OPENSSL_LINKAGE="(linked)"
6586 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6587 echo "Alsa support ........... $CFG_ALSA"
6588 if [ "$BUILD_ON_MAC" = "yes" ]; then
6589 echo "CoreWlan support ....... $CFG_COREWLAN"
6591 echo "libICU support ......... $CFG_ICU"
6592 echo "PCRE support ........... $CFG_PCRE"
6593 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6594 echo "Xcb support ............ limited (old version)"
6596 echo "Xcb support ............ $CFG_XCB"
6598 echo "Xrender support ........ $CFG_XRENDER"
6599 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6600 echo "XInput2 support ........ $CFG_XINPUT2"
6604 # complain about not being able to use dynamic plugins if we are using a static build
6605 if [ "$CFG_SHARED" = "no" ]; then
6607 echo "WARNING: Using static linking will disable the use of dynamically"
6608 echo "loaded plugins. Make sure to import all needed static plugins,"
6609 echo "or compile needed modules into the library."
6612 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6614 echo "NOTE: When linking against OpenSSL, you can override the default"
6615 echo "library names through OPENSSL_LIBS."
6617 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6620 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6622 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6623 echo "if you want a pure debug build."
6628 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6633 #-------------------------------------------------------------------------------
6634 # build makefiles based on the configuration
6635 #-------------------------------------------------------------------------------
6637 echo "Finding project files. Please wait..."
6638 if [ "$CFG_NOPROCESS" != "yes" ]; then
6639 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6640 if [ -f "${relpath}/qtbase.pro" ]; then
6641 mkfile="${outpath}/Makefile"
6642 [ -f "$mkfile" ] && chmod +w "$mkfile"
6643 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6647 # .projects -> projects to process
6648 # .projects.1 -> qt and moc
6649 # .projects.2 -> subdirs and libs
6650 # .projects.3 -> the rest
6651 rm -f .projects .projects.1 .projects.2 .projects.3
6653 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6654 if [ -z "$AWK" ]; then
6655 for p in `echo $QMAKE_PROJECTS`; do
6656 echo "$p" >> .projects
6659 cat >projects.awk <<EOF
6665 first = "./.projects.1.tmp"
6666 second = "./.projects.2.tmp"
6667 third = "./.projects.3.tmp"
6672 if ( ! target_file )
6674 print input_file >target_file
6679 input_file = FILENAME
6684 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6687 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6688 target_file = second
6693 matched_target == 0 && /^(TEMPLATE.*=)/ {
6694 if ( \$3 == "subdirs" )
6695 target_file = second
6696 else if ( \$3 == "lib" )
6702 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6703 if ( \$0 ~ /plugin/ )
6706 target_file = second
6711 if ( ! target_file )
6713 print input_file >>target_file
6720 for p in `echo $QMAKE_PROJECTS`; do
6721 echo "$p" >> .projects.all
6724 # if you get errors about the length of the command line to awk, change the -l arg
6726 split -l 100 .projects.all .projects.all.
6727 for p in .projects.all.*; do
6728 "$AWK" -f projects.awk `cat $p`
6729 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6730 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6731 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6732 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6734 rm -f .projects.all* projects.awk
6736 [ -f .projects.1 ] && cat .projects.1 >>.projects
6737 [ -f .projects.2 ] && cat .projects.2 >>.projects
6738 rm -f .projects.1 .projects.2
6739 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6740 cat .projects.3 >>.projects
6744 # don't sort Qt and MOC in with the other project files
6745 # also work around a segfaulting uniq(1)
6746 if [ -f .sorted.projects.2 ]; then
6747 sort .sorted.projects.2 > .sorted.projects.2.new
6748 mv -f .sorted.projects.2.new .sorted.projects.2
6749 cat .sorted.projects.2 >> .sorted.projects.1
6751 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6752 rm -f .sorted.projects.2 .sorted.projects.1
6756 if [ -f .projects ]; then
6757 uniq .projects >.tmp
6758 mv -f .tmp .projects
6759 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6761 if [ -f .projects.3 ]; then
6762 uniq .projects.3 >.tmp
6763 mv -f .tmp .projects.3
6764 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6766 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6770 for part in $CFG_BUILD_PARTS; do
6772 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6773 libs) PART_ROOTS="$PART_ROOTS src" ;;
6774 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6775 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6780 if [ "$CFG_DEV" = "yes" ]; then
6781 PART_ROOTS="$PART_ROOTS tests"
6784 echo "Creating makefiles. Please wait..."
6785 for file in .projects .projects.3; do
6786 [ '!' -f "$file" ] && continue
6787 for a in `cat $file`; do
6789 for r in $PART_ROOTS; do
6790 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6795 [ "$IN_ROOT" = "no" ] && continue
6798 *winmain/winmain.pro)
6799 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6803 */qmake/qmake.pro) continue ;;
6804 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6805 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6811 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6812 test -d "$dir" || mkdir -p "$dir"
6813 OUTDIR="$outpath/$dir"
6814 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6815 # fast configure - the makefile exists, skip it
6816 # since the makefile exists, it was generated by qmake, which means we
6817 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6819 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6822 QMAKE_SPEC_ARGS="-spec $SPEC"
6823 echo $ECHO_N " for $a$ECHO_C"
6825 QMAKE="$outpath/bin/qmake"
6826 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6827 if [ "$file" = ".projects.3" ]; then
6830 cat >"${OUTDIR}/Makefile" <<EOF
6831 # ${OUTDIR}/Makefile: generated by configure
6833 # WARNING: This makefile will be replaced with a real makefile.
6834 # All changes made to this file will be lost.
6836 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6838 cat >>"${OUTDIR}/Makefile" <<EOF
6840 all clean install qmake first Makefile: FORCE
6841 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6849 if [ "$OPT_VERBOSE" = "yes" ]; then
6850 echo " (`basename $SPEC`)"
6851 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6856 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6857 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6861 rm -f .projects .projects.3
6863 #-------------------------------------------------------------------------------
6864 # check for platforms that we don't yet know about
6865 #-------------------------------------------------------------------------------
6866 if [ "$CFG_ARCH" = "unknown" ]; then
6869 NOTICE: configure was unable to determine the architecture
6870 for the $XQMAKESPEC target.
6872 Qt will not use a specialized implementation for any atomic
6873 operations. Instead a generic implemention based on either GCC
6874 intrinsics or C++11 std::atomic<T> will be used (when
6875 available). The generic implementations are generally as fast
6876 as and always as safe as a specialized implementation.
6878 If no generic implementation is available, Qt will use a
6879 fallback UNIX implementation which uses a single
6880 pthread_mutex_t to protect all atomic operations. This
6881 implementation is the slow (but safe) fallback implementation
6882 for architectures Qt does not yet support.
6886 #-------------------------------------------------------------------------------
6887 # check if the user passed the -no-zlib option, which is no longer supported
6888 #-------------------------------------------------------------------------------
6889 if [ -n "$ZLIB_FORCED" ]; then
6890 which_zlib="supplied"
6891 if [ "$CFG_ZLIB" = "system" ]; then
6897 NOTICE: The -no-zlib option was supplied but is no longer
6900 Qt now requires zlib support in all builds, so the -no-zlib
6901 option was ignored. Qt will be built using the $which_zlib
6906 #-------------------------------------------------------------------------------
6907 # check if the user passed the obsoleted -wayland or -no-wayland flag
6908 #-------------------------------------------------------------------------------
6909 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6912 NOTICE: The -wayland and -no-wayland flags are now obsolete
6914 All configuring of QtWayland plugin and QtCompositor happens in the module
6918 #-------------------------------------------------------------------------------
6919 # check if the user passed the obsoleted -arch or -host-arch options
6920 #-------------------------------------------------------------------------------
6921 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6924 NOTICE: The -arch and -host-arch options are obsolete.
6926 Qt now detects the target and host architectures based on compiler
6927 output. Qt will be built using $CFG_ARCH for the target architecture
6928 and $CFG_HOST_ARCH for the host architecture (note that these two
6929 will be the same unless you are cross-compiling).
6933 #-------------------------------------------------------------------------------
6934 # finally save the executed command to another script
6935 #-------------------------------------------------------------------------------
6936 if [ `basename $0` != "config.status" ]; then
6937 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6939 # add the system variables
6940 for varname in $SYSTEM_VARIABLES; do
6942 'if [ -n "\$'${varname}'" ]; then
6943 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6948 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6950 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6951 echo "#!/bin/sh" > "$outpath/config.status"
6952 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6953 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6954 echo "else" >> "$outpath/config.status"
6955 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6956 echo "fi" >> "$outpath/config.status"
6957 chmod +x "$outpath/config.status"
6960 if [ -n "$RPATH_MESSAGE" ]; then
6962 echo "$RPATH_MESSAGE"
6965 MAKE=`basename "$MAKE"`
6967 echo Qt is now configured for building. Just run \'$MAKE\'.
6968 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6969 echo Once everything is built, Qt is installed.
6970 echo You should not run \'$MAKE install\'.
6972 echo Once everything is built, you must run \'$MAKE install\'.
6973 echo Qt will be installed into $QT_INSTALL_PREFIX
6976 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.