2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
74 DEVICE_VARS_FILE=.device.vars
77 :> "$DEVICE_VARS_FILE"
79 #-------------------------------------------------------------------------------
81 #-------------------------------------------------------------------------------
85 echo "$@" | sed 's/ /\ /g'
88 # Adds a new qmake variable to the cache
89 # Usage: QMakeVar mode varname contents
90 # where mode is one of: set, add, del
104 echo >&2 "BUG: wrong command to QMakeVar: $1"
108 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
111 # Helper function for getQMakeConf. It parses include statements in
112 # qmake.conf and prints out the expanded file
115 while read line; do case "$line" in
117 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
118 current_dir=`dirname "$1"`
119 conf_file="$current_dir/$inc_file"
120 if [ ! -f "$conf_file" ]; then
121 echo "WARNING: Unable to find file $conf_file" >&2
124 getQMakeConf1 "$conf_file"
136 values["LITERAL_WHITESPACE"] = " "
137 values["LITERAL_DOLLAR"] = "$"
139 /^[_A-Z0-9.]+[ \t]*\+?=/ {
140 valStart = index($0, "=") + 1
143 if (substr($0, valStart - 2, 1) == "+") {
147 variable = substr($0, 0, valStart - 2 - append)
148 value = substr($0, valStart)
149 gsub("[ \t]+", "", variable)
150 gsub("^[ \t]+", "", value)
151 gsub("[ \t]+$", "", value)
154 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
155 ovalue = ovalue substr(value, 1, RSTART - 1)
156 var = substr(value, RSTART + 2, RLENGTH - 2)
157 value = substr(value, RSTART + RLENGTH)
159 var = substr(var, 2, length(var) - 2)
161 ovalue = ovalue values[var]
163 ovalue = ovalue value
165 combinedValue = values[variable]
166 if (append == 1 && length(combinedValue) > 0) {
167 combinedValue = combinedValue " " ovalue
169 combinedValue = ovalue
171 values[variable] = combinedValue
174 for (var in values) {
175 print var "=" values[var]
183 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
186 # relies on $QMAKESPEC being set correctly. parses include statements in
187 # qmake.conf and prints out the expanded file
190 if [ -z "$specvals" ]; then
191 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
193 getQMakeConf3 "$1" "$specvals"
198 if [ -z "$xspecvals" ]; then
199 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$xspecvals"
204 # relies on $TEST_COMPILER being set correctly
205 compilerSupportsFlag()
207 cat >conftest.cpp <<EOF
208 int main() { return 0; }
210 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
212 rm -f conftest.cpp conftest.o
216 # relies on $TEST_COMPILER being set correctly
222 safe_flag=`shellEscape "$flag"`
223 lflags=$lflags,$safe_flag
225 compilerSupportsFlag "$lflags" >/dev/null 2>&1
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
238 echo >&2 "BUG: wrong command to QMakeVar: $1"
242 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
245 #-------------------------------------------------------------------------------
246 # operating system detection
247 #-------------------------------------------------------------------------------
249 # need that throughout the script
250 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
251 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
252 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
253 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
255 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
256 if echo '\c' | grep '\c' >/dev/null; then
262 #-------------------------------------------------------------------------------
263 # window system detection
264 #-------------------------------------------------------------------------------
270 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
275 #-----------------------------------------------------------------------------
276 # Qt version detection
277 #-----------------------------------------------------------------------------
278 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
282 if [ -n "$QT_VERSION" ]; then
283 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
284 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
285 if [ -n "$MAJOR" ]; then
286 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
287 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
288 QT_MAJOR_VERSION="$MAJOR"
289 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
290 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
293 if [ -z "$QT_MAJOR_VERSION" ]; then
294 echo "Cannot process version from qglobal.h: $QT_VERSION"
295 echo "Cannot proceed."
299 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
300 if [ -z "$QT_PACKAGEDATE" ]; then
301 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
302 echo "Cannot proceed"
306 #-------------------------------------------------------------------------------
308 #-------------------------------------------------------------------------------
312 EditionString=Commercial
316 # parse the arguments, setting things to "yes" or "no"
317 while [ "$#" -gt 0 ]; do
321 #Autoconf style options
323 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
327 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
331 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
332 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
335 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
340 # this option may or may not be followed by an argument
341 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
348 -h|help|--help|-help)
349 if [ "$VAL" = "yes" ]; then
351 COMMERCIAL_USER="no" #doesn't matter we will display the help
354 COMMERCIAL_USER="no" #doesn't matter we will display the help
358 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
362 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
369 if [ "$UNKNOWN_ARG" = "yes" ]; then
378 if [ "$PLATFORM_QPA" != "no" ]; then
379 if [ "$PLATFORM_QPA" = "maybe" ]; then
384 echo "No license exists to enable Qt QPA. Disabling."
391 COMMERCIAL_USER="yes"
405 if [ "$COMMERCIAL_USER" = "ask" ]; then
407 echo "Which edition of Qt do you want to use ?"
409 echo "Type 'c' if you want to use the Commercial Edition."
410 echo "Type 'o' if you want to use the Open Source Edition."
414 if [ "$commercial" = "c" ]; then
415 COMMERCIAL_USER="yes"
417 elif [ "$commercial" = "o" ]; then
424 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
425 # Commercial preview release
426 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
429 QT_EDITION="QT_EDITION_DESKTOP"
430 LicenseType="Technology Preview"
431 elif [ $COMMERCIAL_USER = "yes" ]; then
432 # one of commercial editions
433 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
434 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
436 # read in the license file
437 if [ -f "$LICENSE_FILE" ]; then
438 . "$LICENSE_FILE" >/dev/null 2>&1
439 if [ -z "$LicenseKeyExt" ]; then
441 echo "You are using an old license file."
443 echo "Please install the license file supplied by Nokia,"
444 echo "or install the Qt Open Source Edition if you intend to"
445 echo "develop free software."
448 if [ -z "$Licensee" ]; then
450 echo "Invalid license key. Please check the license key."
454 if [ -z "$LicenseKeyExt" ]; then
456 echo $ECHO_N "Please enter your license key: $ECHO_C"
458 Licensee="Unknown user"
463 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
464 && LicenseValid="yes" \
466 if [ "$LicenseValid" != "yes" ]; then
468 echo "Invalid license key. Please check the license key."
471 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
472 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
473 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
474 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
476 # determine which edition we are licensed to use
477 case "$LicenseTypeCode" in
479 LicenseType="Commercial"
483 QT_EDITION="QT_EDITION_UNIVERSAL"
486 Edition="FullFramework"
487 EditionString="Full Framework"
488 QT_EDITION="QT_EDITION_DESKTOP"
491 Edition="GUIFramework"
492 EditionString="GUI Framework"
493 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
498 LicenseType="Evaluation"
499 QMakeVar add DEFINES QT_EVAL
503 QT_EDITION="QT_EDITION_EVALUATION"
508 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
510 echo "Invalid license key. Please check the license key."
514 # verify that we are licensed to use Qt on this platform
516 case "$PlatformCode" in
519 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
523 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
526 ### EMBEDDED_QPA logic missing ###
527 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
528 X9,* | XC,* | XU,* | XW,* | XM,*)
530 LICENSE_EXTENSION="-ALLOS"
532 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
533 # Qt for Embedded Linux
534 LICENSE_EXTENSION="-EMBEDDED"
536 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
538 LICENSE_EXTENSION="-EMBEDDED"
540 FM,*,no | LM,yes,* | ZM,no,no)
542 LICENSE_EXTENSION="-DESKTOP"
546 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
548 echo "You are not licensed for the $Platform platform."
550 echo "Please contact qt-info@nokia.com to upgrade your license to"
551 echo "include the $Platform platform, or install the Qt Open Source Edition"
552 echo "if you intend to develop free software."
557 if test -r "$relpath/.LICENSE"; then
558 # Generic, non-final license
560 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
565 *TECHNOLOGY?PREVIEW*)
572 echo >&2 "Invalid license files; cannot continue"
577 EditionString="$Edition"
578 QT_EDITION="QT_EDITION_DESKTOP"
581 case "$LicenseFeatureCode" in
584 case "$LicenseType" in
586 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
589 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
595 case "$LicenseType" in
597 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
600 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
606 echo "Invalid license key. Please check the license key."
610 case "$LicenseFeatureCode" in
618 if [ '!' -f "$outpath/LICENSE" ]; then
619 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
620 echo "this software has disappeared."
622 echo "Sorry, you are not licensed to use this software."
623 echo "Try re-installing."
627 elif [ $COMMERCIAL_USER = "no" ]; then
628 # Open Source edition - may only be used under the terms of the GPL or LGPL.
629 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
630 Licensee="Open Source"
632 EditionString="Open Source"
633 QT_EDITION="QT_EDITION_OPENSOURCE"
636 #-------------------------------------------------------------------------------
637 # initalize variables
638 #-------------------------------------------------------------------------------
640 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
641 for varname in $SYSTEM_VARIABLES; do
642 qmakevarname="${varname}"
643 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
644 if [ "${varname}" = "LDFLAGS" ]; then
645 qmakevarname="LFLAGS"
646 elif [ "${varname}" = "LD" ]; then
650 'if [ -n "\$'${varname}'" ]; then
651 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
655 # Use CC/CXX to run config.tests
656 mkdir -p "$outpath/config.tests"
657 rm -f "$outpath/config.tests/.qmake.cache"
658 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
660 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
662 # QTDIR may be set and point to an old or system-wide Qt installation
665 # the minimum version of libdbus-1 that we require:
666 MIN_DBUS_1_VERSION=0.93
668 # initalize internal variables
669 CFG_CONFIGURE_EXIT_ON_ERROR=yes
671 CFG_EXCEPTIONS=unspecified
672 CFG_GUI=auto # (yes|no|auto)
698 CFG_OPENVG_LC_INCLUDES=no
699 CFG_OPENVG_SHIVA=auto
700 CFG_OPENVG_ON_OPENGL=auto
706 QT_DEFAULT_BUILD_PARTS="libs examples tests"
710 CFG_AUDIO_BACKEND=auto
712 CFG_DECLARATIVE_DEBUG=yes
713 CFG_JAVASCRIPTCORE_JIT=auto
715 # Target architecture
717 # Host architecture, same as CFG_ARCH when not cross-compiling
719 # Set when the -arch or -host-arch arguments are used
720 OPT_OBSOLETE_HOST_ARG=no
731 CFG_OBSOLETE_WAYLAND=no
743 CFG_SEPARATE_DEBUG_INFO=no
744 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
745 CFG_REDUCE_EXPORTS=auto
753 CFG_REDUCE_RELOCATIONS=auto
754 CFG_ACCESSIBILITY=auto
759 CFG_CLOCK_GETTIME=auto
760 CFG_CLOCK_MONOTONIC=auto
768 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
772 CFG_PREFIX_INSTALL=yes
781 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
782 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
786 OPT_CONFIRM_LICENSE=no
799 QPA_PLATFORM_GUARD=yes
801 # initalize variables used for installation
810 QT_INSTALL_TRANSLATIONS=
819 #flags for SQL drivers
827 QT_LFLAGS_ODBC="-lodbc"
830 # flags for libdbus-1
834 # flags for Glib (X11 only)
838 # flags for GStreamer (X11 only)
842 #-------------------------------------------------------------------------------
843 # check SQL drivers available in this package
844 #-------------------------------------------------------------------------------
846 # opensource version removes some drivers, so force them to be off
852 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
853 for a in "$relpath/src/plugins/sqldrivers/"*; do
855 base_a=`basename "$a"`
856 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
857 eval "CFG_SQL_${base_a}=auto"
862 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
863 if [ -d "$relpath/src/plugins/imageformats" ]; then
864 for a in "$relpath/src/plugins/imageformats/"*; do
866 base_a=`basename "$a"`
867 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
872 #-------------------------------------------------------------------------------
873 # parse command line arguments
874 #-------------------------------------------------------------------------------
876 # parse the arguments, setting things to "yes" or "no"
877 while [ "$#" -gt 0 ]; do
881 #Autoconf style options
883 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
887 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
891 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
892 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
895 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
899 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
903 -no-*-*|-plugin-*-*|-qt-*-*)
904 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
905 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
909 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
912 #Qt style yes options
913 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-eglfs|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
914 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
917 #Qt style options that pass an argument
919 if [ "$PLATFORM_QPA" != "yes" ]; then
921 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
925 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
929 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
930 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
934 #Qt style complex options in one command
935 -enable-*|-disable-*)
936 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
937 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
939 #Qt Builtin/System style options
940 -no-*|-system-*|-qt-*)
941 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
942 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
944 #Options that cannot be generalized
951 # this option may or may not be followed by an argument
952 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
961 # this option may or may not be followed by an argument
962 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
971 # this option may or may not be followed by an argument
972 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
980 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
981 # this option may or may not be followed by an argument
982 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1001 if [ "$1" = "-D" ]; then
1005 VAL=`echo $1 | sed 's,-D,,'`
1010 # this option may or may not be followed by an argument
1011 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1020 if [ "$1" = "-I" ]; then
1024 VAL=`echo $1 | sed 's,-I,,'`
1029 if [ "$1" = "-L" ]; then
1033 VAL=`echo $1 | sed 's,-L,,'`
1038 if [ "$1" = "-R" ]; then
1042 VAL=`echo $1 | sed 's,-R,,'`
1047 VAL=`echo $1 | sed 's,-l,,'`
1051 if [ "$1" = "-F" ]; then
1055 VAL=`echo $1 | sed 's,-F,,'`
1060 if [ "$1" = "-fw" ]; then
1064 VAL=`echo $1 | sed 's,-fw,,'`
1072 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1079 if [ "$UNKNOWN_ARG" = "yes" ]; then
1080 echo "$1: unknown argument"
1091 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1092 CFG_ACCESSIBILITY="$VAL"
1101 CFG_USE_GNUMAKE="$VAL"
1104 CFG_MYSQL_CONFIG="$VAL"
1107 QT_INSTALL_PREFIX="$VAL"
1110 QT_HOST_PREFIX="$VAL"
1119 QT_FORCE_PKGCONFIG=yes
1122 QT_INSTALL_DOCS="$VAL"
1125 QT_INSTALL_HEADERS="$VAL"
1128 QT_INSTALL_PLUGINS="$VAL"
1131 QT_INSTALL_IMPORTS="$VAL"
1134 QT_INSTALL_DATA="$VAL"
1137 QT_INSTALL_LIBS="$VAL"
1146 QT_INSTALL_TRANSLATIONS="$VAL"
1148 sysconfdir|settingsdir)
1149 QT_INSTALL_SETTINGS="$VAL"
1152 QT_INSTALL_EXAMPLES="$VAL"
1155 QT_INSTALL_TESTS="$VAL"
1164 QT_INSTALL_BINS="$VAL"
1174 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1181 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1182 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1183 [ "$VAL" = "es2" ]; then
1190 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1197 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1200 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1208 if [ "$BUILD_ON_MAC" = "yes" ]; then
1215 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1216 CFG_MAC_DWARF2="$VAL"
1222 OPT_OBSOLETE_HOST_ARG=yes
1225 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1226 CFG_MAC_HARFBUZZ="$VAL"
1233 if [ "$BUILD_ON_MAC" = "yes" ]; then
1234 CFG_FRAMEWORK="$VAL"
1240 if [ "$VAL" = "yes" ]; then
1242 QMakeVar add QMAKE_CFLAGS -pg
1243 QMakeVar add QMAKE_CXXFLAGS -pg
1244 QMakeVar add QMAKE_LFLAGS -pg
1245 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1251 if [ "$VAL" = "yes" ]; then
1252 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1255 exceptions|g++-exceptions)
1256 if [ "$VAL" = "no" ]; then
1258 elif [ "$VAL" = "yes" ]; then
1266 # keep compatibility with old platform names
1272 PLATFORM=hpux-acc-o64
1275 PLATFORM=hpux-acc-64
1278 PLATFORM=hpux-acc-64
1290 PLATFORM=reliant-cds-64
1293 PLATFORM=solaris-cc-64
1296 PLATFORM=unixware-cc
1299 PLATFORM=unixware-g++
1302 PLATFORM=unixware-cc
1305 PLATFORM=unixware-g++
1311 i386) NATIVE_64_ARCH="x86_64" ;;
1312 powerpc) NATIVE_64_ARCH="ppc64" ;;
1313 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1315 if [ ! -z "$NATIVE_64_ARCH" ]; then
1316 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1323 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1326 XPLATFORM="devices/$VAL"
1329 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1330 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1331 DeviceVar set $DEV_VAR $DEV_VAL
1334 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1335 CFG_DEBUG_RELEASE="$VAL"
1341 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1342 CFG_RELEASE_QMAKE="$VAL"
1348 if [ "$VAL" = "yes" ]; then
1350 elif [ "$VAL" = "no" ]; then
1357 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1358 CFG_PREFIX_INSTALL="$VAL"
1366 developer-build|commercial|opensource)
1367 # These switches have been dealt with already
1370 if [ "$VAL" = "yes" ]; then
1372 elif [ "$VAL" = "no" ]; then
1379 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1380 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1386 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1387 if [ "$VAL" = "no" ]; then
1388 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1389 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1390 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1396 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1403 if [ "$VAL" = "no" ]; then
1410 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1418 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1425 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1432 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1439 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1446 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1453 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1460 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1467 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1468 CFG_PRECOMPILE="$VAL"
1473 separate-debug-info)
1474 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1475 CFG_SEPARATE_DEBUG_INFO="$VAL"
1476 elif [ "$VAL" = "nocopy" ] ; then
1477 CFG_SEPARATE_DEBUG_INFO="yes"
1478 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1484 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1485 CFG_REDUCE_EXPORTS="$VAL"
1491 if [ "$VAL" = "no" ]; then
1498 if [ "$VAL" = "no" ]; then
1505 if [ "$VAL" = "no" ]; then
1512 if [ "$VAL" = "no" ]; then
1519 if [ "$VAL" = "no" ]; then
1526 if [ "$VAL" = "no" ]; then
1533 if [ "$VAL" = "no" ]; then
1543 if [ "$VAL" = "no" ]; then
1550 if [ "$VAL" = "no" ]; then
1557 if [ "$VAL" = "no" ]; then
1558 CFG_MIPS_DSPR2="$VAL"
1564 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1565 CFG_REDUCE_RELOCATIONS="$VAL"
1571 [ "$VAL" = "qt" ] && VAL=yes
1572 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1577 # No longer supported:
1578 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1581 if [ "$VAL" = "system" ]; then
1588 [ "$VAL" = "yes" ] && VAL=qt
1589 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1596 [ "$VAL" = "yes" ] && VAL=qt
1597 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1604 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1611 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1618 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1625 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1632 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1639 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1640 CFG_FONTCONFIG="$VAL"
1646 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1653 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1660 CFG_OBSOLETE_WAYLAND=yes
1663 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1684 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1691 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1698 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1705 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1706 CFG_GSTREAMER="$VAL"
1712 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1713 CFG_QGTKSTYLE="$VAL"
1719 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1722 if [ "$VAL" = "no" ]; then
1730 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1732 elif [ "$VAL" = "no" ]; then
1739 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1740 QPA_PLATFORM_GUARD="$VAL"
1746 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1748 elif [ "$VAL" = "runtime" ]; then
1755 if [ "$VAL" = "yes" ]; then
1762 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1769 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1770 CFG_LARGEFILE="$VAL"
1776 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1783 if [ "$VAL" = "yes" ]; then
1784 CFG_OPENSSL="linked"
1790 if [ "$VAL" = "yes" ]; then
1791 CFG_DECLARATIVE_DEBUG="yes"
1793 if [ "$VAL" = "no" ]; then
1794 CFG_DECLARATIVE_DEBUG="no"
1801 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1802 CFG_JAVASCRIPTCORE_JIT="$VAL"
1808 if [ "$VAL" = "yes" ]; then
1809 OPT_CONFIRM_LICENSE="$VAL"
1815 if [ "$VAL" = "yes" ]; then
1821 sql-*|imageformat-*)
1822 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1823 # if autoconf style options were used, $VAL can be "yes" or "no"
1824 [ "$VAL" = "yes" ] && VAL=qt
1825 # now $VAL should be "no", "qt", or "plugin"... double-check
1826 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1829 # now $VAL is "no", "qt", or "plugin"
1831 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1832 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1834 # Grab the available values
1837 avail="$CFG_SQL_AVAILABLE"
1840 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1841 if [ "$OPT" != "plugin" ]; then
1842 # png is always built in
1848 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1852 # Check that that user's value is available.
1855 if [ "$VAL" = "$d" ]; then
1860 [ "$found" = yes ] || ERROR=yes
1862 if [ "$VAR" = "sql" ]; then
1863 # set the CFG_SQL_driver
1864 eval "CFG_SQL_$VAL=\$OPT"
1866 elif [ "$VAR" = "imageformat" ]; then
1867 [ "$OPT" = "qt" ] && OPT=yes
1868 VAL="`echo $VAL |tr a-z A-Z`"
1869 eval "CFG_$VAL=$OPT"
1873 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1874 if [ "$OPT" = "plugin" ]; then
1877 QMakeVar add "${VAR}s" "${VAL}"
1878 elif [ "$OPT" = "no" ]; then
1879 PLUG_VAR="${VAR}-plugin"
1881 QMakeVar del "${IN_VAR}s" "$VAL"
1882 QMakeVar del "${PLUG_VAR}s" "$VAL"
1884 if [ "$ERROR" = "yes" ]; then
1885 echo "$CURRENT_OPT: unknown argument"
1890 if [ "$VAL" = "yes" ]; then
1891 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1892 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1896 elif [ "$VAL" = "no" ]; then
1897 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1898 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1907 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1914 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1921 D_FLAGS="$D_FLAGS \"$VAL\""
1924 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1927 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1930 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1933 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1936 if [ "$BUILD_ON_MAC" = "yes" ]; then
1937 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1938 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1944 if [ "$BUILD_ON_MAC" = "yes" ]; then
1945 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1951 W_FLAGS="$W_FLAGS \"${VAL}\""
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1958 CFG_PHONON_BACKEND="$VAL"
1970 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1971 CFG_AUDIO_BACKEND="$VAL"
1977 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1984 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1985 CFG_FORCE_ASSERTS="$VAL"
1991 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2001 if [ "$UNKNOWN_OPT" = "yes" ]; then
2002 echo "${CURRENT_OPT}: invalid command-line switch"
2008 # update QT_CONFIG to show our current predefined configuration
2009 case "$CFG_QCONFIG" in
2010 minimal|small|medium|large|full)
2011 # these are a sequence of increasing functionality
2012 for c in minimal small medium large full; do
2013 QT_CONFIG="$QT_CONFIG $c-config"
2014 [ "$CFG_QCONFIG" = $c ] && break
2018 # not known to be sufficient for anything
2019 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2020 echo >&2 "Error: configuration file not found:"
2021 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2023 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2028 #-------------------------------------------------------------------------------
2029 # build tree initialization
2030 #-------------------------------------------------------------------------------
2032 # where to find which..
2033 unixtests="$relpath/config.tests/unix"
2034 mactests="$relpath/config.tests/mac"
2035 WHICH="$unixtests/which.test"
2037 PERL=`$WHICH perl 2>/dev/null`
2039 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2041 for e in gawk nawk awk; do
2042 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2049 PERL="/usr/bin/perl"
2050 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2054 ### skip this if the user just needs help...
2055 if [ "$OPT_HELP" != "yes" ]; then
2057 # is this a shadow build?
2058 if [ "$OPT_SHADOW" = "maybe" ]; then
2060 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2061 if [ -h "$outpath" ]; then
2062 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2068 if [ "$OPT_SHADOW" = "yes" ]; then
2069 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2070 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2071 echo >&2 "Cannot proceed."
2074 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2077 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2079 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2080 echo "Qt can be built in release mode with separate debug information, so"
2081 echo "-debug-and-release is not necessary anymore"
2085 if [ "$CFG_SILENT" = "yes" ]; then
2086 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2089 # if the source tree is different from the build tree,
2090 # symlink or copy part of the sources
2091 if [ "$OPT_SHADOW" = "yes" ]; then
2092 echo "Preparing build tree..."
2094 if [ -z "$PERL" ]; then
2096 echo "You need perl in your PATH to make a shadow build."
2097 echo "Cannot proceed."
2101 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2103 # make a syncqt script that can be used in the shadow
2104 rm -f "$outpath/bin/syncqt"
2105 if [ -x "$relpath/bin/syncqt" ]; then
2106 mkdir -p "$outpath/bin"
2107 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2108 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2109 chmod 755 "$outpath/bin/syncqt"
2112 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2113 rm -f "$outpath/bin/$i"
2114 if [ -x "$relpath/bin/$i" ]; then
2115 mkdir -p "$outpath/bin"
2116 echo "#!/bin/sh" >"$outpath/bin/$i"
2117 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2118 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2119 chmod 755 "$outpath/bin/$i"
2123 # symlink the mkspecs directory
2124 mkdir -p "$outpath/mkspecs"
2125 rm -rf "$outpath"/mkspecs/*
2126 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2127 rm -f "$outpath/mkspecs/default"
2131 rm -rf "$outpath/mkspecs/$1"
2132 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2133 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2136 # Special case for mkspecs/features directory.
2137 # To be able to place .prf files into a shadow build directory,
2138 # we're creating links for files only. The directory structure is reproduced.
2139 ShadowMkspecs features
2141 # The modules dir is special, too.
2142 ShadowMkspecs modules
2144 # symlink the doc directory
2145 rm -rf "$outpath/doc"
2146 ln -s "$relpath/doc" "$outpath/doc"
2149 # symlink fonts to be able to run application from build directory
2150 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2151 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2152 mkdir -p "${outpath}/lib"
2153 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2157 if [ "$OPT_FAST" = "auto" ]; then
2158 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2165 # find a make command
2166 if [ -z "$MAKE" ]; then
2168 for mk in gmake make; do
2169 if "$WHICH" $mk >/dev/null 2>&1; then
2174 if [ -z "$MAKE" ]; then
2175 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2176 echo >&2 "Cannot proceed."
2179 # export MAKE, we need it later in the config.tests
2185 #-------------------------------------------------------------------------------
2186 # auto-detect all that hasn't been specified in the arguments
2187 #-------------------------------------------------------------------------------
2189 if [ -z "$PLATFORM" ]; then
2191 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2193 if [ "$PLATFORM_QPA" = "yes" ]; then
2194 OSX_VERSION=`uname -r | cut -d. -f1`
2195 if [ "$OSX_VERSION" -ge 11 ]; then
2196 # We're on Lion or above. Check if we have a supported Clang version
2197 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2200 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2215 #PLATFORM=aix-g++-64
2217 #PLATFORM=aix-xlc-64
2219 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2229 # PLATFORM=dynix-g++
2235 PLATFORM=freebsd-g++
2237 - Also available for FreeBSD: freebsd-icc
2241 PLATFORM=openbsd-g++
2252 #PLATFORM=irix-cc-64
2254 - Also available for IRIX: irix-g++ irix-cc-64
2258 case "$UNAME_MACHINE" in
2260 #PLATFORM=hpuxi-acc-32
2261 PLATFORM=hpuxi-acc-64
2263 - Also available for HP-UXi: hpuxi-acc-32
2269 #PLATFORM=hpux-acc-64
2271 #PLATFORM=hpux-acc-o64
2273 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2282 - Also available for Tru64: tru64-g++
2286 case "$UNAME_MACHINE" in
2288 PLATFORM=linux-g++-64
2295 - Also available for Linux: linux-kcc linux-icc linux-cxx
2299 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2300 PLATFORM="solaris-g++"
2302 #PLATFORM=solaris-g++
2304 #PLATFORM=solaris-cc64
2307 - Also available for Solaris: solaris-g++ solaris-cc-64
2310 ReliantUNIX-*:*|SINIX-*:*)
2311 PLATFORM=reliant-cds
2312 #PLATFORM=reliant-cds-64
2314 - Also available for Reliant UNIX: reliant-cds-64
2324 #PLATFORM=unixware-g++
2325 PLATFORM=unixware-cc
2327 - Also available for OpenUNIX: unixware-g++
2331 #PLATFORM=unixware-g++
2332 PLATFORM=unixware-cc
2334 - Also available for UnixWare: unixware-g++
2341 - Also available for SCO OpenServer: sco-g++
2345 PLATFORM=unixware-g++
2348 PLATFORM=unsupported/qnx-g++
2351 if [ "$OPT_HELP" != "yes" ]; then
2353 for p in $PLATFORMS; do
2354 echo " $relconf $* -platform $p"
2357 echo " The build script does not currently recognize all" >&2
2358 echo " platforms supported by Qt." >&2
2359 echo " Rerun this script with a -platform option listed to" >&2
2360 echo " set the system/compiler combination you use." >&2
2367 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2369 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2371 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2372 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2374 if [ -d "$PLATFORM" ]; then
2375 QMAKESPEC="$PLATFORM"
2377 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2379 if [ -d "$XPLATFORM" ]; then
2380 XQMAKESPEC="$XPLATFORM"
2382 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2384 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2385 QT_CROSS_COMPILE=yes
2386 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2387 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2390 if [ "$BUILD_ON_MAC" = "yes" ]; then
2391 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2393 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2394 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2395 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2396 echo " built with 'macx-g++'" >&2
2402 # check specified platforms are supported
2403 if [ '!' -d "$QMAKESPEC" ]; then
2405 echo " The specified system/compiler is not supported:"
2409 echo " Please see the README file for a complete list."
2413 if [ '!' -d "$XQMAKESPEC" ]; then
2415 echo " The specified system/compiler is not supported:"
2419 echo " Please see the README file for a complete list."
2423 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2425 echo " The specified system/compiler port is not complete:"
2427 echo " $XQMAKESPEC/qplatformdefs.h"
2429 echo " Please contact qt-info@nokia.com."
2434 # now look at the configs and figure out what platform we are config'd for
2435 [ "$PLATFORM_QPA" != "yes" ] \
2436 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2438 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2440 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2441 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2442 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2443 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2444 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2448 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2449 case `basename "$XPLATFORM"` in
2452 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2454 echo "Please contact qt-info@nokia.com to upgrade your license to"
2455 echo "include this platform, or install the Qt Open Source Edition"
2456 echo "if you intend to develop free software."
2462 #-------------------------------------------------------------------------------
2463 # write out device config before we run the test.
2464 #-------------------------------------------------------------------------------
2465 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
2466 rm -f "$DEVICE_VARS_FILE"
2468 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
2471 #-------------------------------------------------------------------------------
2472 # tests that don't need qmake (must be run before displaying help)
2473 #-------------------------------------------------------------------------------
2475 # detect build style
2476 if [ "$CFG_DEBUG" = "auto" ]; then
2477 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2478 CFG_DEBUG_RELEASE=yes
2480 elif [ "$CFG_DEV" = "yes" ]; then
2481 CFG_DEBUG_RELEASE=no
2484 CFG_DEBUG_RELEASE=no
2488 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2489 QT_CONFIG="$QT_CONFIG build_all"
2492 if [ -z "$PKG_CONFIG" ]; then
2493 # See if PKG_CONFIG is set in the mkspec:
2494 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2496 if [ -z "$PKG_CONFIG" ]; then
2497 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2500 # Work out if we can use pkg-config
2501 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2502 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2504 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2505 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2506 echo >&2 "environment!"
2508 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2510 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2511 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2512 echo >&2 "This is probably not what you want."
2514 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2516 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2517 echo >&2 "been set. This means your toolchain's .pc files must contain"
2518 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2519 echo >&2 "tests are failing, please check these files."
2524 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2525 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2526 echo >&2 "dependencies"
2532 if [ ! -n "$PKG_CONFIG" ]; then
2533 QT_CONFIG="$QT_CONFIG no-pkg-config"
2536 # pass on $CFG_SDK to the configure tests.
2537 if [ '!' -z "$CFG_SDK" ]; then
2538 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2541 # find the default framework value
2542 if [ "$BUILD_ON_MAC" = "yes" ]; then
2543 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2544 CFG_FRAMEWORK="$CFG_SHARED"
2545 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2547 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2555 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2557 TEST_COMPILER=$QMAKE_CONF_COMPILER
2558 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2559 if [ -z "$TEST_COMPILER" ]; then
2560 echo "ERROR: Cannot set the compiler for the configuration tests"
2566 if [ -n "$CFG_SYSROOT" ]; then
2567 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2568 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2569 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2571 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2575 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2577 # auto-detect precompiled header support
2578 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2579 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2586 #auto-detect DWARF2 on the mac
2587 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2588 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2595 # don't autodetect support for separate debug info on objcopy when
2596 # cross-compiling as lots of toolchains seems to have problems with this
2597 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2598 CFG_SEPARATE_DEBUG_INFO="no"
2601 # auto-detect support for separate debug info in objcopy
2602 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2603 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2604 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2605 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2606 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2607 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2608 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2609 CFG_SEPARATE_DEBUG_INFO=no
2613 # binutils on HP-UX is buggy; default to no.
2614 CFG_SEPARATE_DEBUG_INFO=no
2617 CFG_SEPARATE_DEBUG_INFO=yes
2623 # auto-detect -fvisibility support
2624 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2625 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2626 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2627 echo "-reduce-exports was requested but this compiler does not support it"
2628 echo "Re-run configure with -v for more information"
2631 CFG_REDUCE_EXPORTS=no
2633 CFG_REDUCE_EXPORTS=yes
2637 # detect the availability of the -Bsymbolic-functions linker optimization
2638 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2639 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2640 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2641 echo "-reduce-relocations was requested but this compiler does not support it"
2642 echo "Re-run configure with -v for more information"
2645 CFG_REDUCE_RELOCATIONS=no
2647 CFG_REDUCE_RELOCATIONS=yes
2651 # auto-detect GNU make support
2652 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2656 # find the default framework value
2657 if [ "$BUILD_ON_MAC" = "yes" ]; then
2658 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2659 CFG_FRAMEWORK="$CFG_SHARED"
2660 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2662 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2670 # x11 tests are done after qmake is built
2673 #setup the build parts
2674 if [ -z "$CFG_BUILD_PARTS" ]; then
2675 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2677 # don't build tools by default when cross-compiling
2678 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2679 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2682 for nobuild in $CFG_NOBUILD_PARTS; do
2683 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2685 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2687 # echo "WARNING: libs is a required part of the build."
2689 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2692 #-------------------------------------------------------------------------------
2693 # post process QT_INSTALL_* variables
2694 #-------------------------------------------------------------------------------
2696 if [ -z "$QT_INSTALL_PREFIX" ]; then
2697 if [ "$CFG_DEV" = "yes" ]; then
2698 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2700 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2703 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2705 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2706 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2707 if [ "$BUILD_ON_MAC" = "yes" ]; then
2708 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2711 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2714 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2716 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2717 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2718 if [ "$BUILD_ON_MAC" = "yes" ]; then
2719 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2724 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2727 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2729 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2730 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2731 if [ "$BUILD_ON_MAC" = "yes" ]; then
2732 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2733 QT_INSTALL_LIBS="/Libraries/Frameworks"
2737 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2739 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2741 if [ -z "$QT_INSTALL_BINS" ]; then #default
2742 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2743 if [ "$BUILD_ON_MAC" = "yes" ]; then
2744 QT_INSTALL_BINS="/Developer/Applications/Qt"
2747 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2749 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2751 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2752 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2753 if [ "$BUILD_ON_MAC" = "yes" ]; then
2754 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2757 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2759 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2761 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2762 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2763 if [ "$BUILD_ON_MAC" = "yes" ]; then
2764 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2767 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2769 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2771 if [ -z "$QT_INSTALL_DATA" ]; then #default
2772 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2774 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2776 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2777 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2779 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2781 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2782 if [ "$BUILD_ON_MAC" = "yes" ]; then
2783 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2785 QT_INSTALL_SETTINGS=/etc/xdg
2788 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2790 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2791 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2792 if [ "$BUILD_ON_MAC" = "yes" ]; then
2793 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2796 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2798 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2801 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2802 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2803 if [ "$BUILD_ON_MAC" = "yes" ]; then
2804 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2807 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2809 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2811 #------- host paths --------
2813 if [ -z "$QT_HOST_PREFIX" ]; then
2814 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2817 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2821 if [ -z "$QT_HOST_BINS" ]; then #default
2823 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2824 if [ "$BUILD_ON_MAC" = "yes" ]; then
2825 QT_HOST_BINS="/Developer/Applications/Qt"
2828 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2830 QT_HOST_BINS="$QT_INSTALL_BINS"
2833 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2835 if [ -z "$QT_HOST_DATA" ]; then #default
2837 QT_HOST_DATA="$QT_HOST_PREFIX"
2839 QT_HOST_DATA="$QT_INSTALL_DATA"
2842 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2845 #-------------------------------------------------------------------------------
2846 # help - interactive parts of the script _after_ this section please
2847 #-------------------------------------------------------------------------------
2849 # next, emit a usage message if something failed.
2850 if [ "$OPT_HELP" = "yes" ]; then
2851 [ "x$ERROR" = "xyes" ] && echo
2852 if [ "$CFG_NIS" = "no" ]; then
2859 if [ "$CFG_CUPS" = "no" ]; then
2866 if [ "$CFG_ICONV" = "no" ]; then
2873 if [ "$CFG_LARGEFILE" = "no" ]; then
2880 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2888 if [ "$CFG_XCB" = "no" ]; then
2896 if [ "$CFG_EGLFS" = "no" ]; then
2904 if [ "$CFG_XINPUT2" = "no" ]; then
2913 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2914 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2915 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2916 [-release] [-debug] [-debug-and-release]
2917 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2918 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2919 [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2920 [-plugin-sql-<driver>] [-system-sqlite]
2921 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2922 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2923 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2924 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2925 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2926 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2927 [-no-separate-debug-info] [-no-sse2]
2928 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2929 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2930 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2931 [-no-audio-backend] [-audio-backend]
2932 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
2933 [-no-optimized-qmake] [-optimized-qmake]
2934 [-no-openssl] [-openssl] [-openssl-linked]
2935 [-no-gtkstyle] [-gtkstyle]
2936 [-qt-pcre] [-system-pcre]
2937 [-device <name>] [-device-option <key=value>]
2938 [additional platform specific options (see below)]
2941 Installation options:
2943 -qpa ................ This will enable the QPA build.
2944 QPA is a window system agnostic implementation of Qt.
2946 These are optional, but you may specify install directories.
2948 -prefix <dir> ...... This will install everything relative to <dir>
2949 (default $QT_INSTALL_PREFIX)
2951 if [ "$PLATFORM_QPA" = "yes" ]; then
2954 -hostprefix [dir] .. Tools and libraries needed when developing
2955 applications are installed in [dir]. If [dir] is
2956 not given, the current build directory will be used.
2962 * -prefix-install .... Force a sandboxed "local" installation of
2963 Qt. This will install into
2964 $QT_INSTALL_PREFIX, if this option is
2965 disabled then some platforms will attempt a
2966 "system" install by placing default values to
2967 be placed in a system location other than
2970 You may use these to separate different parts of the install:
2972 -bindir <dir> ......... Executables will be installed to <dir>
2973 (default PREFIX/bin)
2974 -libdir <dir> ......... Libraries will be installed to <dir>
2975 (default PREFIX/lib)
2976 -docdir <dir> ......... Documentation will be installed to <dir>
2977 (default PREFIX/doc)
2978 -headerdir <dir> ...... Headers will be installed to <dir>
2979 (default PREFIX/include)
2980 -plugindir <dir> ...... Plugins will be installed to <dir>
2981 (default PREFIX/plugins)
2982 -importdir <dir> ...... Imports for QML will be installed to <dir>
2983 (default PREFIX/imports)
2984 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2986 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2987 (default PREFIX/translations)
2988 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2989 (default PREFIX/etc/settings)
2990 -examplesdir <dir> .... Examples will be installed to <dir>
2991 (default PREFIX/examples)
2992 -testsdir <dir> ....... Tests will be installed to <dir>
2993 (default PREFIX/tests)
2995 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2998 -hostbindir <dir> .. Host executables will be installed to <dir>
2999 (default HOSTPREFIX/bin)
3000 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
3001 (default HOSTPREFIX)
3008 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3009 that needs to be evaluated. If the evaluation succeeds, the feature is
3010 included. Here is a short explanation of each option:
3012 * -release ........... Compile and link Qt with debugging turned off.
3013 -debug ............. Compile and link Qt with debugging turned on.
3014 -debug-and-release . Compile and link two versions of Qt, with and without
3015 debugging turned on (Mac only).
3017 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3019 -opensource ........ Compile and link the Open-Source Edition of Qt.
3020 -commercial ........ Compile and link the Commercial Edition of Qt.
3023 * -shared ............ Create and use shared Qt libraries.
3024 -static ............ Create and use static Qt libraries.
3026 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3028 -fast .............. Configure Qt quickly by generating Makefiles only for
3029 library and subdirectory targets. All other Makefiles
3030 are created as wrappers, which will in turn run qmake.
3032 -no-largefile ...... Disables large file support.
3033 + -largefile ......... Enables Qt to access files larger than 4 GB.
3036 if [ "$PLATFORM_QPA" = "yes" ]; then
3043 if [ "$CFG_DBUS" = "no" ]; then
3052 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3053 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3055 -no-accessibility .. Do not compile Accessibility support.
3056 * -accessibility ..... Compile Accessibility support.
3058 -no-sql-<driver> ... Disable SQL <driver> entirely.
3059 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3061 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3064 Possible values for <driver>:
3065 [ $CFG_SQL_AVAILABLE ]
3067 -system-sqlite ..... Use sqlite from the operating system.
3069 -no-phonon-backend.. Do not build the platform phonon plugin.
3070 + -phonon-backend..... Build the platform phonon plugin.
3072 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3073 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3075 -no-declarative-debug ..... Do not build the declarative debugging support.
3076 + -declarative-debug ....... Build the declarative debugging support.
3078 -platform target ... The operating system and compiler you are building
3081 See the README file for a list of supported
3082 operating systems and compilers.
3085 if [ "${PLATFORM_QPA}" != "yes" ]; then
3087 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3088 raster - Software rasterizer
3089 opengl - Rendering via OpenGL, Experimental!
3090 openvg - Rendering via OpenVG, Experimental!
3097 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3098 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3099 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3100 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3101 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3102 -no-avx ............ Do not compile with use of AVX instructions.
3103 -no-avx2 ........... Do not compile with use of AVX2 instructions.
3104 -no-neon ........... Do not compile with use of NEON instructions.
3105 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3106 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3108 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3109 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3111 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3113 -D <string> ........ Add an explicit define to the preprocessor.
3114 -I <string> ........ Add an explicit include path.
3115 -L <string> ........ Add an explicit library path.
3117 -help, -h .......... Display this information.
3119 Third Party Libraries:
3121 -qt-zlib ........... Use the zlib bundled with Qt.
3122 + -system-zlib ....... Use zlib from the operating system.
3123 See http://www.gzip.org/zlib
3125 -no-gif ............ Do not compile GIF reading support.
3127 -no-libpng ......... Do not compile PNG support.
3128 -qt-libpng ......... Use the libpng bundled with Qt.
3129 + -system-libpng ..... Use libpng from the operating system.
3130 See http://www.libpng.org/pub/png
3132 -no-libjpeg ........ Do not compile JPEG support.
3133 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3134 + -system-libjpeg .... Use libjpeg from the operating system.
3135 See http://www.ijg.org
3137 -no-openssl ........ Do not compile support for OpenSSL.
3138 + -openssl ........... Enable run-time OpenSSL support.
3139 -openssl-linked .... Enabled linked OpenSSL support.
3141 -qt-pcre ........... Use the PCRE library bundled with Qt.
3142 + -system-pcre ....... Use the PCRE library from the operating system.
3146 -make <part> ....... Add part to the list of parts to be built at make time.
3147 ($QT_DEFAULT_BUILD_PARTS)
3148 -nomake <part> ..... Exclude part from the list of parts to be built.
3150 -R <string> ........ Add an explicit runtime library path to the Qt
3152 -l <string> ........ Add an explicit library.
3154 -no-rpath .......... Do not use the library install path as a runtime
3156 + -rpath ............. Link Qt libraries and executables using the library
3157 install path as a runtime library path. Equivalent
3158 to -R install_libpath
3160 -continue .......... Continue as far as possible if an error occurs.
3162 -verbose, -v ....... Print verbose information about each step of the
3165 -silent ............ Reduce the build output so that warnings and errors
3166 can be seen more easily.
3168 * -no-optimized-qmake ... Do not build qmake optimized.
3169 -optimized-qmake ...... Build qmake optimized.
3171 -no-gui ............ Don't build the Qt GUI library
3173 $NSN -no-nis ............ Do not compile NIS support.
3174 $NSY -nis ............... Compile NIS support.
3176 $CUN -no-cups ........... Do not compile CUPS support.
3177 $CUY -cups .............. Compile CUPS support.
3178 Requires cups/cups.h and libcups.so.2.
3180 $CIN -no-iconv .......... Do not compile support for iconv(3).
3181 $CIY -iconv ............. Compile support for iconv(3).
3183 $PHN -no-pch ............ Do not use precompiled header support.
3184 $PHY -pch ............... Use precompiled header support.
3186 $DBN -no-dbus ........... Do not compile the QtDBus module.
3187 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3188 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3190 -reduce-relocations ..... Reduce relocations in the libraries through extra
3191 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3192 experimental; needs GNU ld >= 2.18).
3194 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3196 -device <name> ............... Cross-compile for device <name> (experimental)
3197 -device-option <key=value> ... Add device specific options for the device mkspec
3202 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3203 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3210 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3218 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3222 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3223 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3225 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3226 $XCBY -xcb ............... Compile Xcb support.
3228 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3229 $EGLFSY -eglfs ............. Compile EGLFS support.
3235 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3239 $X2N -no-xinput2......... Do not compile XInput2 support.
3240 $X2Y -xinput2............ Compile XInput2 support.
3246 if [ "$PLATFORM_X11" = "yes" ]; then
3247 if [ "$CFG_SM" = "no" ]; then
3254 if [ "$CFG_XSHAPE" = "no" ]; then
3261 if [ "$CFG_XVIDEO" = "no" ]; then
3268 if [ "$CFG_XINERAMA" = "no" ]; then
3275 if [ "$CFG_FONTCONFIG" = "no" ]; then
3282 if [ "$CFG_XCURSOR" = "no" ]; then
3289 if [ "$CFG_XFIXES" = "no" ]; then
3296 if [ "$CFG_XRANDR" = "no" ]; then
3303 if [ "$CFG_XRENDER" = "no" ]; then
3310 if [ "$CFG_MITSHM" = "no" ]; then
3317 if [ "$CFG_XINPUT" = "no" ]; then
3324 if [ "$CFG_XKB" = "no" ]; then
3331 if [ "$CFG_IM" = "no" ]; then
3342 -no-gtkstyle ....... Do not build the GTK theme integration.
3343 + -gtkstyle .......... Build the GTK theme integration.
3345 * -no-nas-sound ...... Do not compile in NAS sound support.
3346 -system-nas-sound .. Use NAS libaudio from the operating system.
3347 See http://radscan.com/nas.html
3349 -no-opengl ......... Do not support OpenGL.
3350 + -opengl <api> ...... Enable OpenGL support.
3351 With no parameter, this will auto-detect the "best"
3352 OpenGL API to use. If desktop OpenGL is available, it
3353 will be used. Use desktop or es2 for <api>
3354 to force the use of the Desktop OpenGL or
3355 OpenGL ES 2 APIs instead.
3357 -no-openvg ........ Do not support OpenVG.
3358 + -openvg ........... Enable OpenVG support.
3359 Requires EGL support, typically supplied by an OpenGL
3360 or other graphics implementation.
3362 $SMN -no-sm ............. Do not support X Session Management.
3363 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3365 $SHN -no-xshape ......... Do not compile XShape support.
3366 $SHY -xshape ............ Compile XShape support.
3367 Requires X11/extensions/shape.h.
3369 $XVN -no-xvideo ......... Do not compile XVideo support.
3370 $XVY -xvideo ............ Compile XVideo support.
3371 Requires X11/extensions/Xv.h & Xvlib.h.
3373 $SHN -no-xsync .......... Do not compile XSync support.
3374 $SHY -xsync ............. Compile XSync support.
3375 Requires X11/extensions/sync.h.
3377 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3378 $XAY -xinerama .......... Compile Xinerama support.
3379 Requires X11/extensions/Xinerama.h and libXinerama.
3380 By default, Xinerama support will be compiled if
3381 available and the shared libraries are dynamically
3384 $XCN -no-xcursor ........ Do not compile Xcursor support.
3385 $XCY -xcursor ........... Compile Xcursor support.
3386 Requires X11/Xcursor/Xcursor.h and libXcursor.
3387 By default, Xcursor support will be compiled if
3388 available and the shared libraries are dynamically
3391 $XFN -no-xfixes ......... Do not compile Xfixes support.
3392 $XFY -xfixes ............ Compile Xfixes support.
3393 Requires X11/extensions/Xfixes.h and libXfixes.
3394 By default, Xfixes support will be compiled if
3395 available and the shared libraries are dynamically
3398 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3399 $XZY -xrandr ............ Compile Xrandr support.
3400 Requires X11/extensions/Xrandr.h and libXrandr.
3402 $XRN -no-xrender ........ Do not compile Xrender support.
3403 $XRY -xrender ........... Compile Xrender support.
3404 Requires X11/extensions/Xrender.h and libXrender.
3406 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3407 $XMY -mitshm ............ Compile MIT-SHM support.
3408 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3410 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3411 $FCGY -fontconfig ........ Compile FontConfig support.
3412 Requires fontconfig/fontconfig.h, libfontconfig,
3413 freetype.h and libfreetype.
3415 $XIN -no-xinput ......... Do not compile Xinput support.
3416 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3417 which requires IRIX with wacom.h and libXi or
3418 XFree86 with X11/extensions/XInput.h and libXi.
3420 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3421 $XKY -xkb ............... Compile XKB support.
3426 if [ "$BUILD_ON_MAC" = "yes" ]; then
3431 -Fstring ........... Add an explicit framework path.
3432 -fw string ......... Add an explicit framework.
3434 * -framework ......... Build Qt as a series of frameworks and
3435 link tools against those frameworks.
3436 -no-framework ...... Do not build Qt as a series of frameworks.
3438 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3439 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3441 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3442 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3444 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3445 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3446 QT_ENABLE_HARFBUZZ environment variable.
3451 if [ "$PLATFORM_QPA" = "yes" ]; then
3457 if [ "$PLATFORM_QPA" = "yes" ]; then
3460 -xplatform target ... The target platform when cross-compiling.
3462 -no-feature-<feature> Do not compile in <feature>.
3463 -feature-<feature> .. Compile in <feature>. The available features
3464 are described in src/corelib/global/qfeatures.txt
3466 -no-freetype ........ Do not compile in Freetype2 support.
3467 -qt-freetype ........ Use the libfreetype bundled with Qt.
3468 * -system-freetype .... Use libfreetype from the operating system.
3469 See http://www.freetype.org/
3471 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3472 default ($CFG_QCONFIG).
3474 -no-opengl .......... Do not support OpenGL.
3475 -opengl <api> ....... Enable OpenGL ES support
3476 With no parameter, this will attempt to auto-detect
3477 OpenGL ES 2, or regular desktop OpenGL.
3478 Use es2 for <api> to override auto-detection.
3482 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3483 if [ "$CFG_GLIB" = "no" ]; then
3491 $GBN -no-glib ........... Do not compile Glib support.
3492 $GBY -glib .............. Compile Glib support.
3497 [ "x$ERROR" = "xyes" ] && exit 1
3502 # -----------------------------------------------------------------------------
3503 # LICENSING, INTERACTIVE PART
3504 # -----------------------------------------------------------------------------
3506 if [ "$PLATFORM_QPA" = "yes" ]; then
3507 Platform="Qt Lighthouse"
3508 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3509 Platform="Qt for Windows"
3510 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3512 Platform="Qt for Linux/X11"
3516 echo "This is the $Platform ${EditionString} Edition."
3519 if [ "$Edition" = "OpenSource" ]; then
3521 echo "You are licensed to use this software under the terms of"
3522 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3523 if [ -f "$relpath/LICENSE.GPL3" ]; then
3524 echo "You are also licensed to use this software under the terms of"
3525 echo "the GNU General Public License (GPL) versions 3."
3531 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3532 echo "You have already accepted the terms of the $LicenseType license."
3535 if [ -f "$relpath/LICENSE.GPL3" ]; then
3536 echo "Type '3' to view the GNU General Public License version 3."
3538 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3539 echo "Type 'yes' to accept this license offer."
3540 echo "Type 'no' to decline this license offer."
3542 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3546 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3548 elif [ "$acceptance" = "no" ]; then
3549 echo "You are not licensed to use this software."
3552 elif [ "$acceptance" = "3" ]; then
3553 more "$relpath/LICENSE.GPL3"
3554 elif [ "$acceptance" = "L" ]; then
3555 more "$relpath/LICENSE.LGPL"
3558 elif [ "$Edition" = "Preview" ]; then
3559 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3562 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3563 echo "You have already accepted the terms of the $LicenseType license."
3566 echo "You are licensed to use this software under the terms of"
3567 echo "the $TheLicense"
3569 echo "Type '?' to read the Preview License."
3570 echo "Type 'yes' to accept this license offer."
3571 echo "Type 'no' to decline this license offer."
3573 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3577 if [ "$acceptance" = "yes" ]; then
3579 elif [ "$acceptance" = "no" ] ;then
3580 echo "You are not licensed to use this software."
3583 elif [ "$acceptance" = "?" ]; then
3584 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3587 elif [ "$Edition" != "OpenSource" ]; then
3588 if [ -n "$ExpiryDate" ]; then
3589 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3590 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3591 Today=`date +%Y%m%d`
3592 if [ "$Today" -gt "$ExpiryDate" ]; then
3593 case "$LicenseType" in
3594 Commercial|Academic|Educational)
3595 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3597 echo "NOTICE NOTICE NOTICE NOTICE"
3599 echo " Your support and upgrade period has expired."
3601 echo " You are no longer licensed to use this version of Qt."
3602 echo " Please contact qt-info@nokia.com to renew your support"
3603 echo " and upgrades for this license."
3605 echo "NOTICE NOTICE NOTICE NOTICE"
3610 echo "WARNING WARNING WARNING WARNING"
3612 echo " Your support and upgrade period has expired."
3614 echo " You may continue to use your last licensed release"
3615 echo " of Qt under the terms of your existing license"
3616 echo " agreement. But you are not entitled to technical"
3617 echo " support, nor are you entitled to use any more recent"
3618 echo " Qt releases."
3620 echo " Please contact qt-info@nokia.com to renew your"
3621 echo " support and upgrades for this license."
3623 echo "WARNING WARNING WARNING WARNING"
3630 echo "NOTICE NOTICE NOTICE NOTICE"
3632 echo " Your Evaluation license has expired."
3634 echo " You are no longer licensed to use this software. Please"
3635 echo " contact qt-info@nokia.com to purchase license, or install"
3636 echo " the Qt Open Source Edition if you intend to develop free"
3639 echo "NOTICE NOTICE NOTICE NOTICE"
3646 TheLicense=`head -n 1 "$outpath/LICENSE"`
3648 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3649 echo "You have already accepted the terms of the $TheLicense."
3652 echo "You are licensed to use this software under the terms of"
3653 echo "the $TheLicense."
3655 echo "Type '?' to view the $TheLicense."
3656 echo "Type 'yes' to accept this license offer."
3657 echo "Type 'no' to decline this license offer."
3659 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3663 if [ "$acceptance" = "yes" ]; then
3665 elif [ "$acceptance" = "no" ]; then
3666 echo "You are not licensed to use this software."
3669 else [ "$acceptance" = "?" ]
3670 more "$outpath/LICENSE"
3675 # this should be moved somewhere else
3678 AIX_VERSION=`uname -v`
3679 if [ "$AIX_VERSION" -lt "5" ]; then
3680 QMakeVar add QMAKE_LIBS_X11 -lbind
3687 #-------------------------------------------------------------------------------
3688 # generate qconfig.cpp
3689 #-------------------------------------------------------------------------------
3690 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3692 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3694 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3695 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3697 /* Installation date */
3698 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3700 /* Installation Info */
3701 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3702 "qt_prfxpath=$QT_INSTALL_PREFIX",
3703 "qt_docspath=$QT_INSTALL_DOCS",
3704 "qt_hdrspath=$QT_INSTALL_HEADERS",
3705 "qt_libspath=$QT_INSTALL_LIBS",
3706 "qt_binspath=$QT_INSTALL_BINS",
3707 "qt_plugpath=$QT_INSTALL_PLUGINS",
3708 "qt_impspath=$QT_INSTALL_IMPORTS",
3709 "qt_datapath=$QT_INSTALL_DATA",
3710 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3711 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3712 "qt_tstspath=$QT_INSTALL_TESTS",
3713 #ifdef QT_BUILD_QMAKE
3714 "qt_ssrtpath=$CFG_SYSROOT",
3715 "qt_hpfxpath=$QT_HOST_PREFIX",
3716 "qt_hbinpath=$QT_HOST_BINS",
3717 "qt_hdatpath=$QT_HOST_DATA",
3720 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3723 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3725 /* strlen( "qt_lcnsxxxx" ) == 12 */
3726 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3727 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3729 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3732 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3733 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3734 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3736 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3737 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3738 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3741 # -----------------------------------------------------------------------------
3742 if [ "$LicenseType" = "Evaluation" ]; then
3743 EVALKEY=qt_qevalkey=$LicenseKeyExt
3744 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3745 EVALKEY=qt_qevalkey=
3748 if [ -n "$EVALKEY" ]; then
3749 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3750 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3751 /* Evaluation license key */
3752 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3754 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3758 # -----------------------------------------------------------------------------
3760 # -----------------------------------------------------------------------------
3763 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3765 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3766 if [ "$OPT_SHADOW" = "yes" ]; then
3767 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3768 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3769 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3773 # $1: input variable name (awk regexp)
3774 # $2: optional output variable name
3775 # $3: optional value transformation (sed command)
3776 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3777 # is where the resulting variable is written to
3778 setBootstrapVariable()
3780 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3784 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3785 echo "Creating qmake. Please wait..."
3788 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3789 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3790 if [ -f "$QCONFIG_H" ]; then
3791 OLD_QCONFIG_H=$QCONFIG_H
3792 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3795 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3796 # when building qmake, we use #defines for the install paths,
3797 # however they are real functions in the library
3798 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3799 mkdir -p "$outpath/src/corelib/global"
3800 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3801 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3804 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3806 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3807 rm -rf mkspecs/default
3808 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3809 mkdir -p "$outpath/qmake" || exit
3811 for mkfile in GNUmakefile Makefile; do
3814 in_mkfile="${mkfile}.in"
3815 if [ "$mkfile" = "Makefile" ]; then
3816 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3817 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3819 in_mkfile="${mkfile}.unix"
3821 in_mkfile="$relpath/qmake/$in_mkfile"
3822 mkfile="$outpath/qmake/$mkfile"
3823 if [ -f "$mkfile" ]; then
3824 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3827 [ -f "$in_mkfile" ] || continue
3829 echo "########################################################################" > "$mkfile"
3830 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3831 echo "########################################################################" >> "$mkfile"
3834 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3835 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3836 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3838 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3839 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3842 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3843 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3844 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3845 setBootstrapVariable QMAKE_CFLAGS
3846 setBootstrapVariable QMAKE_CXXFLAGS
3847 setBootstrapVariable QMAKE_LFLAGS
3849 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3850 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3851 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3853 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3854 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3855 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3856 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3857 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3858 elif [ "$CFG_DEBUG" = "yes" ]; then
3859 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3860 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3861 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3862 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3865 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3866 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3867 for rpath in $RPATH_FLAGS; do
3868 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3871 if [ "$BUILD_ON_MAC" = "yes" ]; then
3872 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3873 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3874 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3875 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3876 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3877 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3878 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3879 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3880 if [ '!' -z "$CFG_SDK" ]; then
3881 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3882 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3883 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3884 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3885 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3888 if [ '!' -z "$D_FLAGS" ]; then
3889 for DEF in $D_FLAGS; do
3890 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3893 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3894 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3895 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3896 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3898 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3899 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3900 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3901 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3902 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3903 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3904 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3905 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3906 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3907 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3909 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3910 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3911 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3912 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3917 QMAKE_BUILD_ERROR=no
3918 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3919 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3920 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3921 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3924 #-------------------------------------------------------------------------------
3925 # tests that need qmake
3926 #-------------------------------------------------------------------------------
3928 #-------------------------------------------------------------------------------
3929 # determine the target and host architectures
3930 #-------------------------------------------------------------------------------
3932 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3933 CFG_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3935 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3936 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3937 # Do the same test again, using the host compiler
3938 CFG_HOST_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3939 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3941 # not cross compiling, host == target
3942 CFG_HOST_ARCH="$CFG_ARCH"
3945 if [ "$OPT_VERBOSE" = "yes" ]; then
3946 echo "System architecture: '$CFG_ARCH'"
3947 if [ "$PLATFORM_QPA" = "yes" ]; then
3948 echo "Host architecture: '$CFG_HOST_ARCH'"
3952 #-------------------------------------------------------------------------------
3953 # functionality tests
3954 #-------------------------------------------------------------------------------
3956 # detect availability of float math.h functions
3957 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3958 CFG_USE_FLOATMATH=yes
3960 CFG_USE_FLOATMATH=no
3963 # detect sse2 support
3964 if [ "${CFG_SSE2}" = "auto" ]; then
3965 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3972 # detect sse3 support
3973 if [ "${CFG_SSE3}" = "auto" ]; then
3974 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3981 # detect ssse3 support
3982 if [ "${CFG_SSSE3}" = "auto" ]; then
3983 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3990 # detect sse4.1 support
3991 if [ "${CFG_SSE4_1}" = "auto" ]; then
3992 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
3999 # detect sse4.2 support
4000 if [ "${CFG_SSE4_2}" = "auto" ]; then
4001 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
4008 # detect avx support
4009 if [ "${CFG_AVX}" = "auto" ]; then
4010 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4017 # detect avx2 support
4018 if [ "${CFG_AVX2}" = "auto" ]; then
4019 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx2 "avx2" $L_FLAGS $I_FLAGS $l_FLAGS "-march=core-avx2"; then
4026 # check iWMMXt support
4027 if [ "$CFG_IWMMXT" = "yes" ]; then
4028 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4029 if [ $? != "0" ]; then
4030 echo "The iWMMXt functionality test failed!"
4031 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4036 # detect neon support
4037 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4038 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
4043 elif [ "$CFG_ARCH" != "arm" ]; then
4047 # detect mips_dsp support
4048 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
4054 # detect mips_dspr2 support
4055 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
4061 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4064 if [ "$CFG_ZLIB" = "no" ]; then
4065 # Note: Qt no longer support builds without zlib
4066 # So we force a "no" to be "auto" here.
4067 # If you REALLY really need no zlib support, you can still disable
4068 # it by doing the following:
4069 # add "no-zlib" to mkspecs/qconfig.pri
4070 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4072 # There's no guarantee that Qt will build under those conditions
4077 if [ "$CFG_ZLIB" = "auto" ]; then
4078 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
4085 if [ "$CFG_LARGEFILE" = "auto" ]; then
4086 #Large files should be enabled for all Linux systems
4090 if [ "$CFG_GUI" = "no" ]; then
4091 QPA_PLATFORM_GUARD=no
4094 # detect how jpeg should be built
4095 if [ "$CFG_JPEG" = "auto" ]; then
4096 if [ "$CFG_SHARED" = "yes" ]; then
4103 if [ "$CFG_LIBJPEG" = "auto" ]; then
4104 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
4111 # detect how gif should be built
4112 if [ "$CFG_GIF" = "auto" ]; then
4113 if [ "$CFG_SHARED" = "yes" ]; then
4121 if [ "$CFG_LIBPNG" = "auto" ]; then
4122 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
4129 # detect accessibility
4130 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4131 CFG_ACCESSIBILITY=yes
4134 if [ "$CFG_EGLFS" = "yes" ]; then
4135 if [ "$CFG_EGL" = "no" ]; then
4136 echo "The EGLFS plugin requires EGL support and cannot be built"
4142 # auto-detect SQL-modules support
4143 for _SQLDR in $CFG_SQL_AVAILABLE; do
4146 if [ "$CFG_SQL_mysql" != "no" ]; then
4147 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4148 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4149 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4150 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4151 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4152 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4153 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4155 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4156 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4157 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4158 echo " You need MySql 4 or higher."
4159 echo " If you believe this message is in error you may use the continue"
4160 echo " switch (-continue) to $0 to continue."
4165 QT_LFLAGS_MYSQL_R=""
4169 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
4170 QMakeVar add CONFIG use_libmysqlclient_r
4171 if [ "$CFG_SQL_mysql" = "auto" ]; then
4172 CFG_SQL_mysql=plugin
4174 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4175 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
4176 if [ "$CFG_SQL_mysql" = "auto" ]; then
4177 CFG_SQL_mysql=plugin
4180 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4181 echo "MySQL support cannot be enabled due to functionality tests!"
4182 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4183 echo " If you believe this message is in error you may use the continue"
4184 echo " switch (-continue) to $0 to continue."
4189 QT_LFLAGS_MYSQL_R=""
4197 if [ "$CFG_SQL_psql" != "no" ]; then
4198 # Be careful not to use native pg_config when cross building.
4199 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4200 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4201 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4203 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4204 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4205 # But, respect PSQL_LIBS if set
4206 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4207 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
4208 if [ "$CFG_SQL_psql" = "auto" ]; then
4212 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4213 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4214 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4215 echo " If you believe this message is in error you may use the continue"
4216 echo " switch (-continue) to $0 to continue."
4227 if [ "$CFG_SQL_odbc" != "no" ]; then
4228 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
4229 if [ "$CFG_SQL_odbc" = "auto" ]; then
4233 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
4234 QT_LFLAGS_ODBC="-liodbc"
4235 if [ "$CFG_SQL_odbc" = "auto" ]; then
4239 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4240 echo "ODBC support cannot be enabled due to functionality tests!"
4241 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4242 echo " If you believe this message is in error you may use the continue"
4243 echo " switch (-continue) to $0 to continue."
4253 if [ "$CFG_SQL_oci" != "no" ]; then
4254 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
4255 if [ "$CFG_SQL_oci" = "auto" ]; then
4259 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4260 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4261 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4262 echo " If you believe this message is in error you may use the continue"
4263 echo " switch (-continue) to $0 to continue."
4272 if [ "$CFG_SQL_tds" != "no" ]; then
4273 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4274 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4275 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
4276 if [ "$CFG_SQL_tds" = "auto" ]; then
4280 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4281 echo "TDS support cannot be enabled due to functionality tests!"
4282 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4283 echo " If you believe this message is in error you may use the continue"
4284 echo " switch (-continue) to $0 to continue."
4293 if [ "$CFG_SQL_db2" != "no" ]; then
4294 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
4295 if [ "$CFG_SQL_db2" = "auto" ]; then
4299 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4300 echo "ODBC support cannot be enabled due to functionality tests!"
4301 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4302 echo " If you believe this message is in error you may use the continue"
4303 echo " switch (-continue) to $0 to continue."
4312 if [ "$CFG_SQL_ibase" != "no" ]; then
4313 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
4314 if [ "$CFG_SQL_ibase" = "auto" ]; then
4315 CFG_SQL_ibase=plugin
4318 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4319 echo "InterBase support cannot be enabled due to functionality tests!"
4320 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4321 echo " If you believe this message is in error you may use the continue"
4322 echo " switch (-continue) to $0 to continue."
4331 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4332 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
4333 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4334 CFG_SQL_sqlite2=plugin
4337 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4338 echo "SQLite2 support cannot be enabled due to functionality tests!"
4339 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4340 echo " If you believe this message is in error you may use the continue"
4341 echo " switch (-continue) to $0 to continue."
4350 if [ "$CFG_SQL_sqlite" != "no" ]; then
4351 SQLITE_AUTODETECT_FAILED="no"
4352 if [ "$CFG_SQLITE" = "system" ]; then
4353 if [ -n "$PKG_CONFIG" ]; then
4354 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4355 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4357 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
4358 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4359 CFG_SQL_sqlite=plugin
4361 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4363 SQLITE_AUTODETECT_FAILED="yes"
4366 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4367 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4368 CFG_SQL_sqlite=plugin
4371 SQLITE_AUTODETECT_FAILED="yes"
4375 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4376 echo "SQLite support cannot be enabled due to functionality tests!"
4377 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4378 echo " If you believe this message is in error you may use the continue"
4379 echo " switch (-continue) to $0 to continue."
4385 if [ "$OPT_VERBOSE" = "yes" ]; then
4386 echo "unknown SQL driver: $_SQLDR"
4392 # auto-detect NIS support
4393 if [ "$CFG_NIS" != "no" ]; then
4394 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
4397 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4398 echo "NIS support cannot be enabled due to functionality tests!"
4399 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4400 echo " If you believe this message is in error you may use the continue"
4401 echo " switch (-continue) to $0 to continue."
4409 # auto-detect CUPS support
4410 if [ "$CFG_CUPS" != "no" ]; then
4411 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
4414 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4415 echo "Cups support cannot be enabled due to functionality tests!"
4416 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4417 echo " If you believe this message is in error you may use the continue"
4418 echo " switch (-continue) to $0 to continue."
4426 # auto-detect iconv(3) support
4427 if [ "$CFG_ICONV" != "no" ]; then
4428 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4430 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
4432 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
4434 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
4437 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4438 echo "Iconv support cannot be enabled due to functionality tests!"
4439 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4440 echo " If you believe this message is in error you may use the continue"
4441 echo " switch (-continue) to $0 to continue."
4449 # auto-detect libdbus-1 support
4450 if [ "$CFG_DBUS" != "no" ]; then
4451 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4452 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4453 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4455 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
4456 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4457 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4458 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4460 if [ "$CFG_DBUS" = "auto" ]; then
4462 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4463 # CFG_DBUS is "yes" or "linked" here
4465 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4466 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4467 echo " If you believe this message is in error you may use the continue"
4468 echo " switch (-continue) to $0 to continue."
4475 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4477 # auto-detect Glib support
4478 if [ "$CFG_GLIB" != "no" ]; then
4479 if [ -n "$PKG_CONFIG" ]; then
4480 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4481 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4483 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
4485 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4486 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4488 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4489 echo "Glib support cannot be enabled due to functionality tests!"
4490 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4491 echo " If you believe this message is in error you may use the continue"
4492 echo " switch (-continue) to $0 to continue."
4501 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4502 if [ -n "$PKG_CONFIG" ]; then
4503 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4504 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4506 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
4508 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4509 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4511 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4512 echo "Gstreamer support cannot be enabled due to functionality tests!"
4513 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4514 echo " If you believe this message is in error you may use the continue"
4515 echo " switch (-continue) to $0 to continue."
4521 elif [ "$CFG_GLIB" = "no" ]; then
4525 # auto-detect libicu support
4526 if [ "$CFG_ICU" != "no" ]; then
4527 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4528 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4530 if [ "$CFG_ICU" = "auto" ]; then
4532 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4535 echo "The ICU library support cannot be enabled."
4536 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4537 echo " If you believe this message is in error you may use the continue"
4538 echo " switch (-continue) to $0 to continue."
4544 # Auto-detect PulseAudio support
4545 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4546 if [ -n "$PKG_CONFIG" ]; then
4547 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4548 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4550 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
4552 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4553 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4555 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4556 echo "PulseAudio support cannot be enabled due to functionality tests!"
4557 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4558 echo " If you believe this message is in error you may use the continue"
4559 echo " switch (-continue) to $0 to continue."
4569 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4570 x11tests="$relpath/config.tests/x11"
4573 # work around broken X11 headers when using GCC 2.95 or later
4575 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4576 if [ $NOTYPE = "yes" ]; then
4577 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4578 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4581 # Check we actually have X11 :-)
4582 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4583 if [ $? != "0" ]; then
4584 echo "Basic XLib functionality test failed!"
4585 echo " You might need to modify the include and library search paths by editing"
4586 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4592 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4593 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4594 if [ "$CFG_GUI" = "no" ]; then
4595 if [ "$CFG_OPENGL" = "auto" ]; then
4598 if [ "$CFG_OPENGL" != "no" ]; then
4599 echo "OpenGL enabled, but GUI disabled."
4600 echo " You might need to either enable the GUI or disable OpenGL"
4604 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4605 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
4607 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
4610 if [ "$CFG_OPENGL" = "yes" ]; then
4611 echo "All the OpenGL functionality tests failed!"
4612 echo " You might need to modify the include and library search paths by editing"
4613 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4614 echo " ${XQMAKESPEC}."
4621 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4622 if [ "$CFG_OPENGL" = "desktop" ]; then
4623 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4624 if [ $? != "0" ]; then
4625 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4632 elif [ "$CFG_OPENGL" = "es2" ]; then
4634 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4635 if [ $? != "0" ]; then
4636 echo "The OpenGL ES 2.0 functionality test failed!"
4637 echo " You might need to modify the include and library search paths by editing"
4638 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4639 echo " ${XQMAKESPEC}."
4642 elif [ "$CFG_OPENGL" = "desktop" ]; then
4643 # Desktop OpenGL support
4644 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4645 if [ $? != "0" ]; then
4646 echo "The OpenGL functionality test failed!"
4647 echo " You might need to modify the include and library search paths by editing"
4648 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4649 echo " ${XQMAKESPEC}."
4654 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4655 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4656 if [ $? != "0" ]; then
4657 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4664 fi # X11/MINGW OpenGL
4667 if [ "$PLATFORM_X11" = "yes" ]; then
4668 # auto-detect Xcursor support
4669 if [ "$CFG_XCURSOR" != "no" ]; then
4670 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
4671 if [ "$CFG_XCURSOR" != "runtime" ]; then
4675 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4676 echo "Xcursor support cannot be enabled due to functionality tests!"
4677 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4678 echo " If you believe this message is in error you may use the continue"
4679 echo " switch (-continue) to $0 to continue."
4687 # auto-detect Xfixes support
4688 if [ "$CFG_XFIXES" != "no" ]; then
4689 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4690 if [ "$CFG_XFIXES" != "runtime" ]; then
4694 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4695 echo "Xfixes support cannot be enabled due to functionality tests!"
4696 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4697 echo " If you believe this message is in error you may use the continue"
4698 echo " switch (-continue) to $0 to continue."
4706 # auto-detect Xrandr support (resize and rotate extension)
4707 if [ "$CFG_XRANDR" != "no" ]; then
4708 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
4709 if [ "$CFG_XRANDR" != "runtime" ]; then
4713 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4714 echo "Xrandr support cannot be enabled due to functionality tests!"
4715 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4716 echo " If you believe this message is in error you may use the continue"
4717 echo " switch (-continue) to $0 to continue."
4725 # auto-detect Xrender support
4726 if [ "$CFG_XRENDER" != "no" ]; then
4727 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
4730 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4731 echo "Xrender support cannot be enabled due to functionality tests!"
4732 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4733 echo " If you believe this message is in error you may use the continue"
4734 echo " switch (-continue) to $0 to continue."
4742 # auto-detect MIT-SHM support
4743 if [ "$CFG_MITSHM" != "no" ]; then
4744 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
4747 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4748 echo "MITSHM support cannot be enabled due to functionality tests!"
4749 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4750 echo " If you believe this message is in error you may use the continue"
4751 echo " switch (-continue) to $0 to continue."
4759 # auto-detect Session Management support
4760 if [ "$CFG_SM" = "auto" ]; then
4761 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
4764 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4765 echo "Session Management support cannot be enabled due to functionality tests!"
4766 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4767 echo " If you believe this message is in error you may use the continue"
4768 echo " switch (-continue) to $0 to continue."
4776 # auto-detect SHAPE support
4777 if [ "$CFG_XSHAPE" != "no" ]; then
4778 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
4781 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4782 echo "XShape support cannot be enabled due to functionality tests!"
4783 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4784 echo " If you believe this message is in error you may use the continue"
4785 echo " switch (-continue) to $0 to continue."
4793 # auto-detect XVideo support
4794 if [ "$CFG_XVIDEO" != "no" ]; then
4795 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
4798 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4799 echo "XVideo support cannot be enabled due to functionality tests!"
4800 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4801 echo " If you believe this message is in error you may use the continue"
4802 echo " switch (-continue) to $0 to continue."
4810 # auto-detect XSync support
4811 if [ "$CFG_XSYNC" != "no" ]; then
4812 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
4815 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4816 echo "XSync support cannot be enabled due to functionality tests!"
4817 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4818 echo " If you believe this message is in error you may use the continue"
4819 echo " switch (-continue) to $0 to continue."
4827 # auto-detect Xinerama support
4828 if [ "$CFG_XINERAMA" != "no" ]; then
4829 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
4830 if [ "$CFG_XINERAMA" != "runtime" ]; then
4834 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4835 echo "Xinerama support cannot be enabled due to functionality tests!"
4836 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4837 echo " If you believe this message is in error you may use the continue"
4838 echo " switch (-continue) to $0 to continue."
4846 # auto-detect Xinput support
4847 if [ "$CFG_XINPUT" != "no" ]; then
4848 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
4849 if [ "$CFG_XINPUT" != "runtime" ]; then
4853 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4854 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4855 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4856 echo " If you believe this message is in error you may use the continue"
4857 echo " switch (-continue) to $0 to continue."
4865 # auto-detect XKB support
4866 if [ "$CFG_XKB" != "no" ]; then
4867 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
4870 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4871 echo "XKB support cannot be enabled due to functionality tests!"
4872 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4873 echo " If you believe this message is in error you may use the continue"
4874 echo " switch (-continue) to $0 to continue."
4882 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4883 if [ -n "$PKG_CONFIG" ]; then
4884 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4885 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4887 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4889 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4890 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4892 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4893 echo "Gtk theme support cannot be enabled due to functionality tests!"
4894 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4895 echo " If you believe this message is in error you may use the continue"
4896 echo " switch (-continue) to $0 to continue."
4902 elif [ "$CFG_GLIB" = "no" ]; then
4907 # auto-detect FontConfig support
4908 if [ "$CFG_FONTCONFIG" != "no" ]; then
4909 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4910 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4911 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4913 QT_CFLAGS_FONTCONFIG=
4914 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4916 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
4918 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4919 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4920 CFG_LIBFREETYPE=system
4922 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4923 echo "FontConfig support cannot be enabled due to functionality tests!"
4924 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4925 echo " If you believe this message is in error you may use the continue"
4926 echo " switch (-continue) to $0 to continue."
4935 if [ "$BUILD_ON_MAC" = "yes" ]; then
4936 if [ "$CFG_PHONON" != "no" ]; then
4937 # Always enable Phonon (unless it was explicitly disabled)
4941 if [ "$CFG_COREWLAN" = "auto" ]; then
4942 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
4950 if [ "$PLATFORM_QPA" = "yes" ]; then
4951 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4952 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4953 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
4955 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
4958 if [ "$CFG_OPENGL" = "yes" ]; then
4959 echo "All the OpenGL functionality tests failed!"
4960 echo " You might need to modify the include and library search paths by editing"
4961 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4962 echo " ${XQMAKESPEC}."
4967 elif [ "$CFG_OPENGL" = "es2" ]; then
4969 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4970 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4971 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4972 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4973 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4974 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4975 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4976 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4979 "$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
4980 if [ $? != "0" ]; then
4981 echo "The OpenGL ES 2.0 functionality test failed!"
4982 echo " You might need to modify the include and library search paths by editing"
4983 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4984 echo " ${XQMAKESPEC}."
4987 elif [ "$CFG_OPENGL" = "desktop" ]; then
4988 # Desktop OpenGL support
4989 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4990 if [ $? != "0" ]; then
4991 echo "The OpenGL functionality test failed!"
4992 echo " You might need to modify the include and library search paths by editing"
4993 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4994 echo " ${XQMAKESPEC}."
4999 # auto-detect FontConfig support
5000 if [ "$CFG_FONTCONFIG" != "no" ]; then
5001 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5002 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5003 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5005 QT_CFLAGS_FONTCONFIG=
5006 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5008 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
5009 QT_CONFIG="$QT_CONFIG fontconfig"
5010 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5011 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5012 CFG_LIBFREETYPE=system
5017 # Save these for a check later
5018 ORIG_CFG_XCB="$CFG_XCB"
5019 ORIG_CFG_EGLFS="$CFG_EGLFS"
5021 if [ "$CFG_LIBUDEV" != "no" ]; then
5022 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5023 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5024 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5025 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5026 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5028 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
5030 QT_CONFIG="$QT_CONFIG libudev"
5031 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5032 echo "The libudev functionality test failed!"
5036 QMakeVar add DEFINES QT_NO_LIBUDEV
5040 if [ "$CFG_EVDEV" != "no" ]; then
5041 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5043 QT_CONFIG="$QT_CONFIG evdev"
5044 elif [ "$CFG_EVDEV" = "yes" ]; then
5045 echo "The evdev functionality test failed!"
5049 QMakeVar add DEFINES QT_NO_EVDEV
5053 # Check we actually have X11 :-)
5054 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
5055 QT_CONFIG="$QT_CONFIG xlib"
5058 # auto-detect Xrender support
5059 if [ "$CFG_XRENDER" != "no" ]; then
5060 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
5062 QT_CONFIG="$QT_CONFIG xrender"
5064 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5065 echo "Xrender support cannot be enabled due to functionality tests!"
5066 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5067 echo " If you believe this message is in error you may use the continue"
5068 echo " switch (-continue) to $0 to continue."
5076 if [ "$CFG_XCB" != "no" ]; then
5077 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
5078 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5079 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5081 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
5083 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
5084 QT_CONFIG="$QT_CONFIG xcb-render"
5087 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
5089 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5092 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
5093 QT_CONFIG="$QT_CONFIG xcb-xlib"
5096 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5097 # auto-detect XInput2/Xinput support
5098 if [ "$CFG_XINPUT2" != "no" ]; then
5099 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
5103 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5104 echo "XInput2 support cannot be enabled due to functionality tests!"
5105 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5106 echo " If you believe this message is in error you may use the continue"
5107 echo " switch (-continue) to $0 to continue."
5116 if [ "$CFG_XCB" = "yes" ]; then
5117 echo "The XCB test failed!"
5118 echo " You might need to install dependency packages."
5119 echo " See src/plugins/platforms/xcb/README."
5123 QMakeVar add DEFINES QT_NO_XCB
5127 # Detect libxkbcommon
5128 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5129 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5130 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5131 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5132 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5134 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5138 if [ "$CFG_EGL" != "no" ]; then
5139 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
5140 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5141 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
5142 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
5143 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
5144 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
5145 fi # detect EGL support
5146 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/qpa/egl" "EGL" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
5148 elif [ "$CFG_EGL" = "yes" ]; then
5149 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
5150 echo " You might need to modify the include and library search paths by editing"
5151 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
5158 if [ "$CFG_EGLFS" != "no" ]; then
5159 CFG_EGLFS="$CFG_EGL"
5162 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5163 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5164 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5165 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5168 if [ "$BUILD_ON_MAC" = "yes" ]; then
5169 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
5170 QT_CONFIG="$QT_CONFIG coreservices"
5172 QMakeVar add DEFINES QT_NO_CORESERVICES
5176 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5177 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
5178 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
5179 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
5180 echo "No QPA platform plugin enabled!"
5181 echo " If you really want to build without a QPA platform plugin you must pass"
5182 echo " -no-xcb and -no-eglfs to configure. Doing this will"
5183 echo " produce a Qt that cannot run GUI applications."
5184 echo " The dependencies needed for xcb to build are listed in"
5185 echo " src/plugins/platforms/xcb/README"
5193 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5196 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5197 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5198 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
5199 CFG_LIBFREETYPE=system
5205 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS &&
5206 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5207 echo "STL functionality check failed! Cannot build Qt with this STL library."
5208 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5213 # detect POSIX clock_gettime()
5214 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5215 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
5216 CFG_CLOCK_GETTIME=yes
5218 CFG_CLOCK_GETTIME=no
5222 # detect POSIX monotonic clocks
5223 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5224 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
5225 CFG_CLOCK_MONOTONIC=yes
5227 CFG_CLOCK_MONOTONIC=no
5229 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5230 CFG_CLOCK_MONOTONIC=no
5234 if [ "$CFG_MREMAP" = "auto" ]; then
5235 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5242 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5243 if [ "$CFG_GETADDRINFO" != "no" ]; then
5244 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5247 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5248 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5249 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5250 echo " If you believe this message is in error you may use the continue"
5251 echo " switch (-continue) to $0 to continue."
5259 # find if the platform provides inotify
5260 if [ "$CFG_INOTIFY" != "no" ]; then
5261 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5264 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5265 echo "inotify support cannot be enabled due to functionality tests!"
5266 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5267 echo " If you believe this message is in error you may use the continue"
5268 echo " switch (-continue) to $0 to continue."
5276 # find if the platform provides if_nametoindex (ipv6 interface name support)
5277 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5278 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
5281 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5282 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5283 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5284 echo " If you believe this message is in error you may use the continue"
5285 echo " switch (-continue) to $0 to continue."
5293 # find if the platform provides getifaddrs (network interface enumeration)
5294 if [ "$CFG_GETIFADDRS" != "no" ]; then
5295 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5298 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5299 echo "getifaddrs support cannot be enabled due to functionality tests!"
5300 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5301 echo " If you believe this message is in error you may use the continue"
5302 echo " switch (-continue) to $0 to continue."
5311 if [ "$CFG_OPENSSL" != "no" ]; then
5312 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
5313 if [ "$CFG_OPENSSL" = "auto" ]; then
5317 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5318 echo "OpenSSL support cannot be enabled due to functionality tests!"
5319 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5320 echo " If you believe this message is in error you may use the continue"
5321 echo " switch (-continue) to $0 to continue."
5330 if [ "$CFG_PCRE" != "qt" ]; then
5331 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5334 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5335 echo "PCRE support cannot be enabled due to functionality tests!"
5336 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5337 echo " If you believe this message is in error you may use the continue"
5338 echo " switch (-continue) to $0 to continue."
5346 # detect OpenVG support
5347 if [ "$CFG_OPENVG" != "no" ]; then
5348 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
5349 if [ "$CFG_OPENVG" = "auto" ]; then
5352 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
5353 if [ "$CFG_OPENVG" = "auto" ]; then
5356 CFG_OPENVG_ON_OPENGL=yes
5357 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
5358 if [ "$CFG_OPENVG" = "auto" ]; then
5361 CFG_OPENVG_LC_INCLUDES=yes
5362 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
5363 if [ "$CFG_OPENVG" = "auto" ]; then
5366 CFG_OPENVG_LC_INCLUDES=yes
5367 CFG_OPENVG_ON_OPENGL=yes
5369 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5370 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5371 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5372 echo " If you believe this message is in error you may use the continue"
5373 echo " switch (-continue) to $0 to continue."
5379 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
5380 CFG_OPENVG_SHIVA=yes
5384 if [ "$CFG_ALSA" = "auto" ]; then
5385 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5392 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5393 if [ "$CFG_ARCH" = "arm" ]; then
5394 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5395 if [ $? != "0" ]; then
5396 CFG_JAVASCRIPTCORE_JIT=no
5399 case "$XPLATFORM" in
5401 CFG_JAVASCRIPTCORE_JIT=no
5407 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5408 QMakeVar set JAVASCRIPTCORE_JIT yes
5409 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5410 QMakeVar set JAVASCRIPTCORE_JIT no
5413 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5414 CFG_AUDIO_BACKEND=yes
5417 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5418 echo "Warning: largefile support cannot be disabled for win32."
5422 #-------------------------------------------------------------------------------
5423 # ask for all that hasn't been auto-detected or specified in the arguments
5424 #-------------------------------------------------------------------------------
5426 # enable dwarf2 support on Mac
5427 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5428 QT_CONFIG="$QT_CONFIG dwarf2"
5431 # Detect the default arch (x86 or x86_64) on Mac OS X
5432 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5434 case `file "${outpath}/bin/qmake"` in
5442 # unsupported/unknown
5446 if [ -n "$DEFAULT_ARCH" ]; then
5447 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5448 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5449 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5450 # Make the application arch follow the Qt arch
5451 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5456 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5457 QT_CONFIG="$QT_CONFIG phonon-backend"
5460 # disable accessibility
5461 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5462 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5464 QT_CONFIG="$QT_CONFIG accessibility"
5468 if [ "$CFG_EGL" = "yes" ]; then
5469 QT_CONFIG="$QT_CONFIG egl"
5471 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5475 if [ "$CFG_EGLFS" = "yes" ]; then
5476 QT_CONFIG="$QT_CONFIG eglfs"
5478 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5482 if [ "$CFG_OPENVG" = "no" ]; then
5483 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5485 QT_CONFIG="$QT_CONFIG openvg"
5486 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5487 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5489 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5490 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5492 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5493 QT_CONFIG="$QT_CONFIG shivavg"
5494 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5499 if [ "$CFG_OPENGL" = "no" ]; then
5500 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5502 QT_CONFIG="$QT_CONFIG opengl"
5505 if [ "$CFG_OPENGL" = "es2" ]; then
5506 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5509 if [ "$CFG_OPENGL" = "es2" ]; then
5510 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5511 QT_CONFIG="$QT_CONFIG opengles2"
5514 # safe execution environment
5515 if [ "$CFG_SXE" != "no" ]; then
5516 QT_CONFIG="$QT_CONFIG sxe"
5519 # build up the variables for output
5520 if [ "$CFG_DEBUG" = "yes" ]; then
5521 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5522 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5523 elif [ "$CFG_DEBUG" = "no" ]; then
5524 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5525 QMAKE_CONFIG="$QMAKE_CONFIG release"
5527 if [ "$CFG_SHARED" = "yes" ]; then
5528 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5529 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5530 elif [ "$CFG_SHARED" = "no" ]; then
5531 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5532 QMAKE_CONFIG="$QMAKE_CONFIG static"
5534 if [ "$PLATFORM_QPA" = "yes" ]; then
5535 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5536 QT_CONFIG="$QT_CONFIG qpa"
5537 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5538 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5541 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5542 # Do not set this here for Windows. Let qmake do it so
5543 # debug and release precompiled headers are kept separate.
5544 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5546 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5547 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5548 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5549 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5550 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5551 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5553 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5554 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5556 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5557 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5558 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5559 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5560 QMakeVar add QMAKE_CFLAGS -g
5561 QMakeVar add QMAKE_CXXFLAGS -g
5562 QT_CONFIG="$QT_CONFIG separate_debug_info"
5564 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5565 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5567 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5568 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5569 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5570 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5571 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5572 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5573 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5574 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5575 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5576 if [ "$CFG_ARCH" = "mips" ]; then
5577 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5578 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5580 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5581 QT_CONFIG="$QT_CONFIG clock-gettime"
5583 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5584 QT_CONFIG="$QT_CONFIG clock-monotonic"
5586 if [ "$CFG_MREMAP" = "yes" ]; then
5587 QT_CONFIG="$QT_CONFIG mremap"
5589 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5590 QT_CONFIG="$QT_CONFIG getaddrinfo"
5592 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5593 QT_CONFIG="$QT_CONFIG ipv6ifname"
5595 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5596 QT_CONFIG="$QT_CONFIG getifaddrs"
5598 if [ "$CFG_INOTIFY" = "yes" ]; then
5599 QT_CONFIG="$QT_CONFIG inotify"
5601 if [ "$CFG_LIBJPEG" = "no" ]; then
5603 elif [ "$CFG_LIBJPEG" = "system" ]; then
5604 QT_CONFIG="$QT_CONFIG system-jpeg"
5606 if [ "$CFG_JPEG" = "no" ]; then
5607 QT_CONFIG="$QT_CONFIG no-jpeg"
5608 elif [ "$CFG_JPEG" = "yes" ]; then
5609 QT_CONFIG="$QT_CONFIG jpeg"
5611 if [ "$CFG_LIBPNG" = "no" ]; then
5614 if [ "$CFG_LIBPNG" = "system" ]; then
5615 QT_CONFIG="$QT_CONFIG system-png"
5617 if [ "$CFG_PNG" = "no" ]; then
5618 QT_CONFIG="$QT_CONFIG no-png"
5619 elif [ "$CFG_PNG" = "yes" ]; then
5620 QT_CONFIG="$QT_CONFIG png"
5622 if [ "$CFG_GIF" = "no" ]; then
5623 QT_CONFIG="$QT_CONFIG no-gif"
5624 elif [ "$CFG_GIF" = "yes" ]; then
5625 QT_CONFIG="$QT_CONFIG gif"
5627 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5628 QT_CONFIG="$QT_CONFIG no-freetype"
5629 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5630 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5631 QT_CONFIG="$QT_CONFIG system-freetype"
5633 QT_CONFIG="$QT_CONFIG freetype"
5635 if [ "$CFG_GUI" = "auto" ]; then
5638 if [ "$CFG_GUI" = "no" ]; then
5639 QT_CONFIG="$QT_CONFIG no-gui"
5642 if [ "$CFG_WIDGETS" = "no" ]; then
5643 QT_CONFIG="$QT_CONFIG no-widgets"
5644 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5647 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5648 #On Mac we implicitly link against libz, so we
5649 #never use the 3rdparty stuff.
5650 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5652 if [ "$CFG_ZLIB" = "yes" ]; then
5653 QT_CONFIG="$QT_CONFIG zlib"
5654 elif [ "$CFG_ZLIB" = "system" ]; then
5655 QT_CONFIG="$QT_CONFIG system-zlib"
5658 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5659 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5660 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5661 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5662 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5663 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5664 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5665 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5666 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5667 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5668 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5669 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5670 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5671 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5673 if [ "$PLATFORM_X11" = "yes" ]; then
5674 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5676 # for some reason, the following libraries are not always built shared,
5677 # so *every* program/lib (including Qt) has to link against them
5678 if [ "$CFG_XSHAPE" = "yes" ]; then
5679 QT_CONFIG="$QT_CONFIG xshape"
5681 if [ "$CFG_XVIDEO" = "yes" ]; then
5682 QT_CONFIG="$QT_CONFIG xvideo"
5684 if [ "$CFG_XSYNC" = "yes" ]; then
5685 QT_CONFIG="$QT_CONFIG xsync"
5687 if [ "$CFG_XINERAMA" = "yes" ]; then
5688 QT_CONFIG="$QT_CONFIG xinerama"
5689 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5691 if [ "$CFG_XCURSOR" = "yes" ]; then
5692 QT_CONFIG="$QT_CONFIG xcursor"
5693 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5695 if [ "$CFG_XFIXES" = "yes" ]; then
5696 QT_CONFIG="$QT_CONFIG xfixes"
5697 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5699 if [ "$CFG_XRANDR" = "yes" ]; then
5700 QT_CONFIG="$QT_CONFIG xrandr"
5701 if [ "$CFG_XRENDER" != "yes" ]; then
5702 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5703 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5705 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5708 if [ "$CFG_XRENDER" = "yes" ]; then
5709 QT_CONFIG="$QT_CONFIG xrender"
5710 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5712 if [ "$CFG_MITSHM" = "yes" ]; then
5713 QT_CONFIG="$QT_CONFIG mitshm"
5715 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5716 QT_CONFIG="$QT_CONFIG fontconfig"
5718 if [ "$CFG_XINPUT" = "yes" ]; then
5719 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5721 if [ "$CFG_XINPUT" = "yes" ]; then
5722 QT_CONFIG="$QT_CONFIG xinput tablet"
5724 if [ "$CFG_XKB" = "yes" ]; then
5725 QT_CONFIG="$QT_CONFIG xkb"
5729 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5730 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5731 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5733 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5734 if [ "$CFG_RPATH" = "yes" ]; then
5735 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5736 # set the default rpath to the library installation directory
5737 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5739 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5740 if [ -n "$RPATH_FLAGS" ]; then
5742 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5746 elif [ "$CFG_RPATH" = "yes" ]; then
5747 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5751 if [ "$CFG_RPATH" = "yes" ]; then
5752 # set the default rpath to the library installation directory
5753 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5755 if [ -n "$RPATH_FLAGS" ]; then
5756 # add the user defined rpaths
5757 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5761 if [ '!' -z "$I_FLAGS" ]; then
5762 # add the user define include paths
5763 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5764 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5767 if [ '!' -z "$W_FLAGS" ]; then
5768 # add the user defined warning flags
5769 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5770 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5771 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5774 # turn off exceptions for the compilers that support it
5775 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5776 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5778 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5781 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5782 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5785 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5786 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5787 # Follow default behavior of configure.exe by overriding with "rtti".
5788 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5791 if [ "$CFG_ALSA" = "yes" ]; then
5792 QT_CONFIG="$QT_CONFIG alsa"
5795 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5796 QT_CONFIG="$QT_CONFIG pulseaudio"
5799 if [ "$CFG_COREWLAN" = "yes" ]; then
5800 QT_CONFIG="$QT_CONFIG corewlan"
5803 if [ "$CFG_ICU" = "yes" ]; then
5804 QT_CONFIG="$QT_CONFIG icu"
5807 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5808 QT_CONFIG="$QT_CONFIG force_asserts"
5811 if [ "$CFG_PCRE" = "qt" ]; then
5812 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5816 # Some Qt modules are too advanced in C++ for some old compilers
5817 # Detect here the platforms where they are known to work.
5819 # See Qt documentation for more information on which features are
5820 # supported and on which compilers.
5822 canBuildQtConcurrent="yes"
5823 canUseV8Snapshot="yes"
5825 case "$XPLATFORM" in
5827 # PA-RISC's assembly is too limited
5828 # gcc 3.4 on that platform can't build QtXmlPatterns
5829 # the assembly it generates cannot be compiled
5831 # Check gcc's version
5832 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5836 canBuildQtXmlPatterns="no"
5840 canBuildQtXmlPatterns="no"
5844 unsupported/vxworks-*-g++*)
5847 unsupported/vxworks-*-dcc*)
5849 canBuildQtXmlPatterns="no"
5852 # Check gcc's version
5853 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5861 canBuildQtXmlPatterns="no"
5866 # Check the compiler version
5867 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5870 canBuildQtXmlPatterns="no"
5871 canBuildQtConcurrent="no"
5875 canBuildQtConcurrent="no"
5881 canBuildQtXmlPatterns="no"
5882 canBuildQtConcurrent="no"
5888 # Get the xlC version
5889 cat > xlcver.c <<EOF
5893 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5898 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5899 xlcver=`./xlcver 2>/dev/null`
5902 if [ "$OPT_VERBOSE" = "yes" ]; then
5903 if [ -n "$xlcver" ]; then
5904 echo Found IBM xlC version: $xlcver.
5906 echo Could not determine IBM xlC version, assuming oldest supported.
5913 canBuildQtXmlPatterns="no"
5914 canBuildQtConcurrent="no"
5918 canBuildQtConcurrent="no"
5924 canBuildQtConcurrent="no"
5928 if [ "$CFG_GUI" = "no" ]; then
5929 # WebKit requires QtGui
5933 if [ "$CFG_SHARED" = "no" ]; then
5935 echo "WARNING: Using static linking will disable the WebKit module."
5940 CFG_CONCURRENT="yes"
5941 if [ "$canBuildQtConcurrent" = "no" ]; then
5942 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5945 QT_CONFIG="$QT_CONFIG concurrent"
5949 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5950 QT_CONFIG="$QT_CONFIG audio-backend"
5954 if [ "$CFG_WEBKIT" = "debug" ]; then
5955 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5959 QT_CONFIG="$QT_CONFIG v8"
5960 # Detect snapshot support
5961 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5962 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5965 *) canUseV8Snapshot="no"
5969 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5970 # QEMU crashes when building inside Scratchbox with an ARM target
5971 canUseV8Snapshot="no"
5974 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5975 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5977 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5978 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5981 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5982 QT_CONFIG="$QT_CONFIG v8snapshot"
5986 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
5987 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
5990 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5993 QMakeVar add QMAKE_CFLAGS -fno-exceptions
5994 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
5995 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6000 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6001 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6002 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6009 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6015 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6017 case "$COMPILER_VERSION" in
6019 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6020 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6021 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6024 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6025 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6026 QT_GCC_PATCH_VERSION=0
6036 #-------------------------------------------------------------------------------
6037 # part of configuration information goes into qconfig.h
6038 #-------------------------------------------------------------------------------
6040 case "$CFG_QCONFIG" in
6042 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6045 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6046 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6047 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6048 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6049 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6050 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6052 echo "#endif" >>"$tmpconfig"
6056 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6060 # define QT_EDITION $QT_EDITION
6064 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6065 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6067 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6068 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6071 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6072 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6075 if [ "$BUILD_ON_MAC" = "yes" ]; then
6076 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6077 #if defined(__LP64__)
6078 # define QT_POINTER_SIZE 8
6080 # define QT_POINTER_SIZE 4
6084 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6085 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6088 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6089 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6090 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6094 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6096 if [ "$CFG_DEV" = "yes" ]; then
6097 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6100 if [ "$PLATFORM_QPA" = "yes" ]; then
6101 # Add QPA to config.h
6102 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6105 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6106 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6109 # Add turned on SQL drivers
6110 for DRIVER in $CFG_SQL_AVAILABLE; do
6111 eval "VAL=\$CFG_SQL_$DRIVER"
6114 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6115 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6116 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6119 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6125 QMakeVar set sql-drivers "$SQL_DRIVERS"
6126 QMakeVar set sql-plugins "$SQL_PLUGINS"
6128 # Add other configuration options to the qconfig.h file
6129 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6130 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6131 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6132 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6133 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6134 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6135 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6137 # X11/Unix/Mac only configs
6138 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6139 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6140 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6141 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6142 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6143 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6144 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6145 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6146 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6147 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6148 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6149 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6150 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6151 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6153 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6154 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6155 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6156 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6157 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6158 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6159 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6160 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6161 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6162 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6163 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6164 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6165 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6167 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6168 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6169 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6170 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6171 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6172 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6173 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6174 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6176 # sort QCONFIG_FLAGS for neatness if we can
6177 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6178 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6180 if [ -n "$QCONFIG_FLAGS" ]; then
6181 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6182 #ifndef QT_BOOTSTRAPPED
6185 for cfg in $QCONFIG_FLAGS; do
6186 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6187 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6188 # figure out define logic, so we can output the correct
6189 # ifdefs to override the global defines in a project
6191 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6192 # QT_NO_option can be forcefully turned on by QT_option
6193 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6194 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6195 # QT_option can be forcefully turned off by QT_NO_option
6196 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6199 if [ -z $cfgdNeg ]; then
6200 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6207 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6208 #if defined($cfgd) && defined($cfgdNeg)
6210 #elif !defined($cfgd) && !defined($cfgdNeg)
6217 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6218 #endif // QT_BOOTSTRAPPED
6223 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6224 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6225 #define QT_VISIBILITY_AVAILABLE
6230 if [ -n "$QT_LIBINFIX" ]; then
6231 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6232 #define QT_LIBINFIX "$QT_LIBINFIX"
6237 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6238 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6239 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6241 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6242 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6243 chmod -w "$outpath/src/corelib/global/qconfig.h"
6244 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6245 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6249 #-------------------------------------------------------------------------------
6250 # save configuration into qconfig.pri
6251 #-------------------------------------------------------------------------------
6252 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6253 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6254 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6255 if [ "$CFG_DEBUG" = "yes" ]; then
6256 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6257 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6258 QT_CONFIG="$QT_CONFIG release"
6260 QT_CONFIG="$QT_CONFIG debug"
6261 elif [ "$CFG_DEBUG" = "no" ]; then
6262 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6263 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6264 QT_CONFIG="$QT_CONFIG debug"
6266 QT_CONFIG="$QT_CONFIG release"
6268 if [ "$CFG_FRAMEWORK" = "no" ]; then
6269 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6271 QT_CONFIG="$QT_CONFIG qt_framework"
6272 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6274 if [ "$CFG_DEV" = "yes" ]; then
6275 QT_CONFIG="$QT_CONFIG private_tests"
6278 cat >>"$QTCONFIG.tmp" <<EOF
6280 CONFIG += $QTCONFIG_CONFIG
6282 QT_HOST_ARCH = $CFG_HOST_ARCH
6283 QT_EDITION = $Edition
6284 QT_CONFIG += $QT_CONFIG
6287 QT_VERSION = $QT_VERSION
6288 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6289 QT_MINOR_VERSION = $QT_MINOR_VERSION
6290 QT_PATCH_VERSION = $QT_PATCH_VERSION
6293 QT_LIBINFIX = $QT_LIBINFIX
6294 QT_NAMESPACE = $QT_NAMESPACE
6297 if [ -n "$CFG_SYSROOT" ]; then
6298 echo "# sysroot" >>"$QTCONFIG.tmp"
6299 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6300 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6301 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6302 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6303 echo "}" >> "$QTCONFIG.tmp"
6304 echo >> "$QTCONFIG.tmp"
6306 if [ -n "$RPATH_FLAGS" ]; then
6307 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
6309 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6310 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6311 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6312 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6315 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6316 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6317 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6320 # replace qconfig.pri if it differs from the newly created temp file
6321 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6322 rm -f "$QTCONFIG.tmp"
6324 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6327 #-------------------------------------------------------------------------------
6328 # save configuration into qmodule.pri
6329 #-------------------------------------------------------------------------------
6330 QTMODULE="$outpath/mkspecs/qmodule.pri"
6332 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6334 # Ensure we can link to uninistalled libraries
6335 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6336 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6338 if [ -n "$QT_CFLAGS_PSQL" ]; then
6339 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6341 if [ -n "$QT_LFLAGS_PSQL" ]; then
6342 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6344 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6345 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6347 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6348 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6350 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6351 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6353 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6354 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6356 if [ -n "$QT_LFLAGS_ODBC" ]; then
6357 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6359 if [ -n "$QT_LFLAGS_TDS" ]; then
6360 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6363 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6364 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6367 #dump in the OPENSSL_LIBS info
6368 if [ '!' -z "$OPENSSL_LIBS" ]; then
6369 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6370 elif [ "$CFG_OPENSSL" = "linked" ]; then
6371 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6374 #dump in the SDK info
6375 if [ '!' -z "$CFG_SDK" ]; then
6376 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6380 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6381 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6383 # replace qmodule.pri if it differs from the newly created temp file
6384 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6385 rm -f "$QTMODULE.tmp"
6387 mv -f "$QTMODULE.tmp" "$QTMODULE"
6390 #-------------------------------------------------------------------------------
6391 # save configuration into .qmake.cache
6392 #-------------------------------------------------------------------------------
6394 CACHEFILE="$outpath/.qmake.cache"
6395 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6396 cat >>"$CACHEFILE.tmp" <<EOF
6398 QT_SOURCE_TREE = \$\$quote($relpath)
6399 QT_BUILD_TREE = \$\$quote($outpath)
6400 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6402 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6403 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6404 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6406 include(\$\$PWD/mkspecs/qmodule.pri)
6407 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6411 #dump the qmake spec
6412 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6413 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6415 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6418 # replace .qmake.cache if it differs from the newly created temp file
6419 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6420 rm -f "$CACHEFILE.tmp"
6422 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6425 #-------------------------------------------------------------------------------
6426 # give feedback on configuration
6427 #-------------------------------------------------------------------------------
6431 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6434 This target is using the GNU C++ compiler ($PLATFORM).
6436 Recent versions of this compiler automatically include code for
6437 exceptions, which increase both the size of the Qt libraries and
6438 the amount of memory taken by your applications.
6440 You may choose to re-run `basename $0` with the -no-exceptions
6441 option to compile Qt without exceptions. This is completely binary
6442 compatible, and existing applications will continue to work.
6450 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6453 This target is using the MIPSpro C++ compiler ($PLATFORM).
6455 You may choose to re-run `basename $0` with the -no-exceptions
6456 option to compile Qt without exceptions. This will make the
6457 size of the Qt library smaller and reduce the amount of memory
6458 taken by your applications.
6470 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6471 echo "Build type: $PLATFORM"
6473 echo "Building on: $PLATFORM"
6474 echo "Building for: $XPLATFORM"
6477 echo "Architecture: $CFG_ARCH"
6478 if [ "$PLATFORM_QPA" = "yes" ]; then
6479 echo "Host architecture: $CFG_HOST_ARCH"
6482 if [ -n "$PLATFORM_NOTES" ]; then
6483 echo "Platform notes:"
6484 echo "$PLATFORM_NOTES"
6489 if [ "$OPT_VERBOSE" = "yes" ]; then
6490 echo $ECHO_N "qmake vars .......... $ECHO_C"
6491 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6492 echo "qmake switches ......... $QMAKE_SWITCHES"
6495 echo "Build .................. $CFG_BUILD_PARTS"
6496 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6497 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6498 echo "Debug .................. yes (combined)"
6499 if [ "$CFG_DEBUG" = "yes" ]; then
6500 echo "Default Link ........... debug"
6502 echo "Default Link ........... release"
6505 echo "Debug .................. $CFG_DEBUG"
6507 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6508 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6509 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6510 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6511 echo "QtGui module ........... $CFG_GUI"
6512 echo "QtWidgets module ....... $CFG_WIDGETS"
6513 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6514 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6516 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6518 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6519 echo "PCH support ............ $CFG_PRECOMPILE"
6520 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
6521 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
6522 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6523 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
6524 elif [ "$CFG_ARCH" = "arm" ]; then
6525 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6526 echo "NEON support ........... ${CFG_NEON}"
6528 if [ "$CFG_ARCH" = "mips" ]; then
6529 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
6531 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6532 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6533 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6534 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6535 echo "NIS support ............ $CFG_NIS"
6536 echo "CUPS support ........... $CFG_CUPS"
6537 echo "Iconv support .......... $CFG_ICONV"
6538 echo "Glib support ........... $CFG_GLIB"
6539 echo "GStreamer support ...... $CFG_GSTREAMER"
6540 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6541 echo "Large File support ..... $CFG_LARGEFILE"
6542 echo "GIF support ............ $CFG_GIF"
6543 if [ "$CFG_JPEG" = "no" ]; then
6544 echo "JPEG support ........... $CFG_JPEG"
6546 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6548 if [ "$CFG_PNG" = "no" ]; then
6549 echo "PNG support ............ $CFG_PNG"
6551 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6553 echo "zlib support ........... $CFG_ZLIB"
6554 echo "Session management ..... $CFG_SM"
6555 echo "libudev support ........ $CFG_LIBUDEV"
6557 if [ "$CFG_OPENGL" = "desktop" ]; then
6558 echo "OpenGL support ......... yes (Desktop OpenGL)"
6559 elif [ "$CFG_OPENGL" = "es2" ]; then
6560 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6562 echo "OpenGL support ......... no"
6565 if [ "$CFG_OPENVG" ]; then
6566 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6567 echo "OpenVG support ......... ShivaVG"
6569 echo "OpenVG support ......... $CFG_OPENVG"
6572 if [ "$PLATFORM_X11" = "yes" ]; then
6573 echo "NAS sound support ...... $CFG_NAS"
6574 echo "XShape support ......... $CFG_XSHAPE"
6575 echo "XVideo support ......... $CFG_XVIDEO"
6576 echo "XSync support .......... $CFG_XSYNC"
6577 echo "Xinerama support ....... $CFG_XINERAMA"
6578 echo "Xcursor support ........ $CFG_XCURSOR"
6579 echo "Xfixes support ......... $CFG_XFIXES"
6580 echo "Xrandr support ......... $CFG_XRANDR"
6581 echo "Xi support ............. $CFG_XINPUT"
6582 echo "MIT-SHM support ........ $CFG_MITSHM"
6583 echo "FontConfig support ..... $CFG_FONTCONFIG"
6584 echo "XKB Support ............ $CFG_XKB"
6585 echo "immodule support ....... $CFG_IM"
6586 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6588 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6589 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6590 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6591 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6592 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6593 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6594 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6595 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6596 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6599 if [ "$CFG_OPENSSL" = "yes" ]; then
6600 OPENSSL_LINKAGE="(run-time)"
6601 elif [ "$CFG_OPENSSL" = "linked" ]; then
6602 OPENSSL_LINKAGE="(linked)"
6604 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6605 echo "Alsa support ........... $CFG_ALSA"
6606 if [ "$BUILD_ON_MAC" = "yes" ]; then
6607 echo "CoreWlan support ....... $CFG_COREWLAN"
6609 echo "libICU support ......... $CFG_ICU"
6610 echo "PCRE support ........... $CFG_PCRE"
6611 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6612 echo "Xcb support ............ limited (old version)"
6614 echo "Xcb support ............ $CFG_XCB"
6616 echo "Xrender support ........ $CFG_XRENDER"
6617 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6618 echo "XInput2 support ........ $CFG_XINPUT2"
6620 echo "EGLFS support .......... $CFG_EGLFS"
6623 # complain about not being able to use dynamic plugins if we are using a static build
6624 if [ "$CFG_SHARED" = "no" ]; then
6626 echo "WARNING: Using static linking will disable the use of dynamically"
6627 echo "loaded plugins. Make sure to import all needed static plugins,"
6628 echo "or compile needed modules into the library."
6631 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6633 echo "NOTE: When linking against OpenSSL, you can override the default"
6634 echo "library names through OPENSSL_LIBS."
6636 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6639 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6641 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6642 echo "if you want a pure debug build."
6647 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6652 #-------------------------------------------------------------------------------
6653 # build makefiles based on the configuration
6654 #-------------------------------------------------------------------------------
6656 echo "Finding project files. Please wait..."
6657 if [ "$CFG_NOPROCESS" != "yes" ]; then
6658 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6659 if [ -f "${relpath}/qtbase.pro" ]; then
6660 mkfile="${outpath}/Makefile"
6661 [ -f "$mkfile" ] && chmod +w "$mkfile"
6662 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6666 # .projects -> projects to process
6667 # .projects.1 -> qt and moc
6668 # .projects.2 -> subdirs and libs
6669 # .projects.3 -> the rest
6670 rm -f .projects .projects.1 .projects.2 .projects.3
6672 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6673 if [ -z "$AWK" ]; then
6674 for p in `echo $QMAKE_PROJECTS`; do
6675 echo "$p" >> .projects
6678 cat >projects.awk <<EOF
6684 first = "./.projects.1.tmp"
6685 second = "./.projects.2.tmp"
6686 third = "./.projects.3.tmp"
6691 if ( ! target_file )
6693 print input_file >target_file
6698 input_file = FILENAME
6703 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6706 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6707 target_file = second
6712 matched_target == 0 && /^(TEMPLATE.*=)/ {
6713 if ( \$3 == "subdirs" )
6714 target_file = second
6715 else if ( \$3 == "lib" )
6721 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6722 if ( \$0 ~ /plugin/ )
6725 target_file = second
6730 if ( ! target_file )
6732 print input_file >>target_file
6739 for p in `echo $QMAKE_PROJECTS`; do
6740 echo "$p" >> .projects.all
6743 # if you get errors about the length of the command line to awk, change the -l arg
6745 split -l 100 .projects.all .projects.all.
6746 for p in .projects.all.*; do
6747 "$AWK" -f projects.awk `cat $p`
6748 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6749 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6750 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6751 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6753 rm -f .projects.all* projects.awk
6755 [ -f .projects.1 ] && cat .projects.1 >>.projects
6756 [ -f .projects.2 ] && cat .projects.2 >>.projects
6757 rm -f .projects.1 .projects.2
6758 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6759 cat .projects.3 >>.projects
6763 # don't sort Qt and MOC in with the other project files
6764 # also work around a segfaulting uniq(1)
6765 if [ -f .sorted.projects.2 ]; then
6766 sort .sorted.projects.2 > .sorted.projects.2.new
6767 mv -f .sorted.projects.2.new .sorted.projects.2
6768 cat .sorted.projects.2 >> .sorted.projects.1
6770 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6771 rm -f .sorted.projects.2 .sorted.projects.1
6775 if [ -f .projects ]; then
6776 uniq .projects >.tmp
6777 mv -f .tmp .projects
6778 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6780 if [ -f .projects.3 ]; then
6781 uniq .projects.3 >.tmp
6782 mv -f .tmp .projects.3
6783 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6785 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6789 for part in $CFG_BUILD_PARTS; do
6791 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6792 libs) PART_ROOTS="$PART_ROOTS src" ;;
6793 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6794 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6799 if [ "$CFG_DEV" = "yes" ]; then
6800 PART_ROOTS="$PART_ROOTS tests"
6803 echo "Creating makefiles. Please wait..."
6804 for file in .projects .projects.3; do
6805 [ '!' -f "$file" ] && continue
6806 for a in `cat $file`; do
6808 for r in $PART_ROOTS; do
6809 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6814 [ "$IN_ROOT" = "no" ] && continue
6817 *winmain/winmain.pro)
6818 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6822 */qmake/qmake.pro) continue ;;
6823 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*|*tools/qdbusxml2cpp*|*tools/qdbuscpp2xml*) SPEC=$QMAKESPEC ;;
6824 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6830 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6831 test -d "$dir" || mkdir -p "$dir"
6832 OUTDIR="$outpath/$dir"
6833 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6834 # fast configure - the makefile exists, skip it
6835 # since the makefile exists, it was generated by qmake, which means we
6836 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6838 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6841 QMAKE_SPEC_ARGS="-spec $SPEC"
6842 echo $ECHO_N " for $a$ECHO_C"
6844 QMAKE="$outpath/bin/qmake"
6845 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6846 if [ "$file" = ".projects.3" ]; then
6849 cat >"${OUTDIR}/Makefile" <<EOF
6850 # ${OUTDIR}/Makefile: generated by configure
6852 # WARNING: This makefile will be replaced with a real makefile.
6853 # All changes made to this file will be lost.
6855 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6857 cat >>"${OUTDIR}/Makefile" <<EOF
6859 all clean install qmake first Makefile: FORCE
6860 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6868 if [ "$OPT_VERBOSE" = "yes" ]; then
6869 echo " (`basename $SPEC`)"
6870 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6875 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6876 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6880 rm -f .projects .projects.3
6882 #-------------------------------------------------------------------------------
6883 # check for platforms that we don't yet know about
6884 #-------------------------------------------------------------------------------
6885 if [ "$CFG_ARCH" = "unknown" ]; then
6888 NOTICE: configure was unable to determine the architecture
6889 for the $XQMAKESPEC target.
6891 Qt will not use a specialized implementation for any atomic
6892 operations. Instead a generic implemention based on either GCC
6893 intrinsics or C++11 std::atomic<T> will be used (when
6894 available). The generic implementations are generally as fast
6895 as and always as safe as a specialized implementation.
6897 If no generic implementation is available, Qt will use a
6898 fallback UNIX implementation which uses a single
6899 pthread_mutex_t to protect all atomic operations. This
6900 implementation is the slow (but safe) fallback implementation
6901 for architectures Qt does not yet support.
6905 #-------------------------------------------------------------------------------
6906 # check if the user passed the -no-zlib option, which is no longer supported
6907 #-------------------------------------------------------------------------------
6908 if [ -n "$ZLIB_FORCED" ]; then
6909 which_zlib="supplied"
6910 if [ "$CFG_ZLIB" = "system" ]; then
6916 NOTICE: The -no-zlib option was supplied but is no longer
6919 Qt now requires zlib support in all builds, so the -no-zlib
6920 option was ignored. Qt will be built using the $which_zlib
6925 #-------------------------------------------------------------------------------
6926 # check if the user passed the obsoleted -wayland or -no-wayland flag
6927 #-------------------------------------------------------------------------------
6928 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6931 NOTICE: The -wayland and -no-wayland flags are now obsolete
6933 All configuring of QtWayland plugin and QtCompositor happens in the module
6937 #-------------------------------------------------------------------------------
6938 # check if the user passed the obsoleted -arch or -host-arch options
6939 #-------------------------------------------------------------------------------
6940 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6943 NOTICE: The -arch and -host-arch options are obsolete.
6945 Qt now detects the target and host architectures based on compiler
6946 output. Qt will be built using $CFG_ARCH for the target architecture
6947 and $CFG_HOST_ARCH for the host architecture (note that these two
6948 will be the same unless you are cross-compiling).
6952 #-------------------------------------------------------------------------------
6953 # finally save the executed command to another script
6954 #-------------------------------------------------------------------------------
6955 if [ `basename $0` != "config.status" ]; then
6956 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6958 # add the system variables
6959 for varname in $SYSTEM_VARIABLES; do
6961 'if [ -n "\$'${varname}'" ]; then
6962 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6967 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6969 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6970 echo "#!/bin/sh" > "$outpath/config.status"
6971 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6972 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6973 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6974 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6975 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6976 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6977 echo "else" >> "$outpath/config.status"
6978 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6979 echo "fi" >> "$outpath/config.status"
6980 chmod +x "$outpath/config.status"
6983 if [ -n "$RPATH_MESSAGE" ]; then
6985 echo "$RPATH_MESSAGE"
6988 MAKE=`basename "$MAKE"`
6990 echo Qt is now configured for building. Just run \'$MAKE\'.
6991 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6992 echo Once everything is built, Qt is installed.
6993 echo You should not run \'$MAKE install\'.
6995 echo Once everything is built, you must run \'$MAKE install\'.
6996 echo Qt will be installed into $QT_INSTALL_PREFIX
6999 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.