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 #-------------------------------------------------------------------------------
268 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
273 #-----------------------------------------------------------------------------
274 # Qt version detection
275 #-----------------------------------------------------------------------------
276 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
280 if [ -n "$QT_VERSION" ]; then
281 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
282 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
283 if [ -n "$MAJOR" ]; then
284 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
285 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
286 QT_MAJOR_VERSION="$MAJOR"
287 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
288 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
291 if [ -z "$QT_MAJOR_VERSION" ]; then
292 echo "Cannot process version from qglobal.h: $QT_VERSION"
293 echo "Cannot proceed."
297 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
298 if [ -z "$QT_PACKAGEDATE" ]; then
299 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
300 echo "Cannot proceed"
304 #-------------------------------------------------------------------------------
306 #-------------------------------------------------------------------------------
310 EditionString=Commercial
314 # parse the arguments, setting things to "yes" or "no"
315 while [ "$#" -gt 0 ]; do
319 #Autoconf style options
321 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
325 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
329 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
330 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
333 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
336 -h|help|--help|-help)
337 if [ "$VAL" = "yes" ]; then
339 COMMERCIAL_USER="no" #doesn't matter we will display the help
342 COMMERCIAL_USER="no" #doesn't matter we will display the help
346 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
350 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
357 if [ "$UNKNOWN_ARG" = "yes" ]; then
369 COMMERCIAL_USER="yes"
383 if [ "$COMMERCIAL_USER" = "ask" ]; then
385 echo "Which edition of Qt do you want to use ?"
387 echo "Type 'c' if you want to use the Commercial Edition."
388 echo "Type 'o' if you want to use the Open Source Edition."
392 if [ "$commercial" = "c" ]; then
393 COMMERCIAL_USER="yes"
395 elif [ "$commercial" = "o" ]; then
402 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
403 # Commercial preview release
404 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
407 QT_EDITION="QT_EDITION_DESKTOP"
408 LicenseType="Technology Preview"
409 elif [ $COMMERCIAL_USER = "yes" ]; then
410 # one of commercial editions
411 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
413 # read in the license file
414 if [ -f "$LICENSE_FILE" ]; then
415 . "$LICENSE_FILE" >/dev/null 2>&1
416 if [ -z "$LicenseKeyExt" ]; then
418 echo "You are using an old license file."
420 echo "Please install the license file supplied by Nokia,"
421 echo "or install the Qt Open Source Edition if you intend to"
422 echo "develop free software."
425 if [ -z "$Licensee" ]; then
427 echo "Invalid license key. Please check the license key."
431 if [ -z "$LicenseKeyExt" ]; then
433 echo $ECHO_N "Please enter your license key: $ECHO_C"
435 Licensee="Unknown user"
440 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
441 && LicenseValid="yes" \
443 if [ "$LicenseValid" != "yes" ]; then
445 echo "Invalid license key. Please check the license key."
448 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
449 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
450 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
451 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
453 # determine which edition we are licensed to use
454 case "$LicenseTypeCode" in
456 LicenseType="Commercial"
460 QT_EDITION="QT_EDITION_UNIVERSAL"
463 Edition="FullFramework"
464 EditionString="Full Framework"
465 QT_EDITION="QT_EDITION_DESKTOP"
468 Edition="GUIFramework"
469 EditionString="GUI Framework"
470 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
475 LicenseType="Evaluation"
476 QMakeVar add DEFINES QT_EVAL
480 QT_EDITION="QT_EDITION_EVALUATION"
485 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
487 echo "Invalid license key. Please check the license key."
491 # verify that we are licensed to use Qt on this platform
493 case "$PlatformCode" in
496 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
500 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
503 ### EMBEDDED_QPA logic missing ###
504 case "$PlatformCode,$PLATFORM_MAC" in
505 X9,* | XC,* | XU,* | XW,* | XM,*)
507 LICENSE_EXTENSION="-ALLOS"
509 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
510 # Qt for Embedded Linux
511 LICENSE_EXTENSION="-EMBEDDED"
513 6M,* | N7,* | N9,* | NX,*)
515 LICENSE_EXTENSION="-EMBEDDED"
517 FM,* | LM,yes | ZM,no)
519 LICENSE_EXTENSION="-DESKTOP"
523 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
525 echo "You are not licensed for the $Platform platform."
527 echo "Please contact qt-info@nokia.com to upgrade your license to"
528 echo "include the $Platform platform, or install the Qt Open Source Edition"
529 echo "if you intend to develop free software."
534 if test -r "$relpath/.LICENSE"; then
535 # Generic, non-final license
537 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
542 *TECHNOLOGY?PREVIEW*)
549 echo >&2 "Invalid license files; cannot continue"
554 EditionString="$Edition"
555 QT_EDITION="QT_EDITION_DESKTOP"
558 case "$LicenseFeatureCode" in
561 case "$LicenseType" in
563 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
566 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
572 case "$LicenseType" in
574 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
577 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
583 echo "Invalid license key. Please check the license key."
587 case "$LicenseFeatureCode" in
595 if [ '!' -f "$outpath/LICENSE" ]; then
596 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
597 echo "this software has disappeared."
599 echo "Sorry, you are not licensed to use this software."
600 echo "Try re-installing."
604 elif [ $COMMERCIAL_USER = "no" ]; then
605 # Open Source edition - may only be used under the terms of the GPL or LGPL.
606 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
607 Licensee="Open Source"
609 EditionString="Open Source"
610 QT_EDITION="QT_EDITION_OPENSOURCE"
613 #-------------------------------------------------------------------------------
614 # initalize variables
615 #-------------------------------------------------------------------------------
617 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
618 for varname in $SYSTEM_VARIABLES; do
619 qmakevarname="${varname}"
620 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
621 if [ "${varname}" = "LDFLAGS" ]; then
622 qmakevarname="LFLAGS"
623 elif [ "${varname}" = "LD" ]; then
627 'if [ -n "\$'${varname}'" ]; then
628 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
632 # Use CC/CXX to run config.tests
633 mkdir -p "$outpath/config.tests"
634 rm -f "$outpath/config.tests/.qmake.cache"
635 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
637 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
639 # QTDIR may be set and point to an old or system-wide Qt installation
642 # the minimum version of libdbus-1 that we require:
643 MIN_DBUS_1_VERSION=0.93
645 # initalize internal variables
646 CFG_CONFIGURE_EXIT_ON_ERROR=yes
648 CFG_EXCEPTIONS=unspecified
649 CFG_GUI=auto # (yes|no|auto)
675 CFG_OPENVG_LC_INCLUDES=no
676 CFG_OPENVG_SHIVA=auto
677 CFG_OPENVG_ON_OPENGL=auto
683 QT_DEFAULT_BUILD_PARTS="libs examples"
687 CFG_AUDIO_BACKEND=auto
690 CFG_JAVASCRIPTCORE_JIT=auto
692 # Target architecture
694 # Host architecture, same as CFG_ARCH when not cross-compiling
696 # Set when the -arch or -host-arch arguments are used
697 OPT_OBSOLETE_HOST_ARG=no
708 CFG_OBSOLETE_WAYLAND=no
720 CFG_SEPARATE_DEBUG_INFO=no
721 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
722 CFG_REDUCE_EXPORTS=auto
730 CFG_REDUCE_RELOCATIONS=auto
731 CFG_ACCESSIBILITY=auto
736 CFG_CLOCK_GETTIME=auto
737 CFG_CLOCK_MONOTONIC=auto
745 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
749 CFG_PREFIX_INSTALL=yes
758 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
759 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
763 OPT_CONFIRM_LICENSE=no
776 QPA_PLATFORM_GUARD=yes
778 # initalize variables used for installation
787 QT_INSTALL_TRANSLATIONS=
796 #flags for SQL drivers
804 QT_LFLAGS_ODBC="-lodbc"
807 # flags for libdbus-1
811 # flags for Glib (X11 only)
815 # flags for GStreamer (X11 only)
819 #-------------------------------------------------------------------------------
820 # check SQL drivers available in this package
821 #-------------------------------------------------------------------------------
823 # opensource version removes some drivers, so force them to be off
829 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
830 for a in "$relpath/src/plugins/sqldrivers/"*; do
832 base_a=`basename "$a"`
833 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
834 eval "CFG_SQL_${base_a}=auto"
839 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
840 if [ -d "$relpath/src/plugins/imageformats" ]; then
841 for a in "$relpath/src/plugins/imageformats/"*; do
843 base_a=`basename "$a"`
844 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
849 #-------------------------------------------------------------------------------
850 # parse command line arguments
851 #-------------------------------------------------------------------------------
853 # parse the arguments, setting things to "yes" or "no"
854 while [ "$#" -gt 0 ]; do
858 #Autoconf style options
860 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
864 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
868 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
869 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
872 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
876 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
880 -no-*-*|-plugin-*-*|-qt-*-*)
881 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
882 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
886 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
889 #Qt style yes options
890 -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|-qml-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
891 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
894 #Qt style options that pass an argument
897 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
901 -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)
902 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
906 #Qt style complex options in one command
907 -enable-*|-disable-*)
908 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
909 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
911 #Qt Builtin/System style options
912 -no-*|-system-*|-qt-*)
913 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
914 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
916 #Options that cannot be generalized
923 # this option may or may not be followed by an argument
924 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
933 # this option may or may not be followed by an argument
934 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
942 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
943 # this option may or may not be followed by an argument
944 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
963 if [ "$1" = "-D" ]; then
967 VAL=`echo $1 | sed 's,-D,,'`
972 # this option may or may not be followed by an argument
973 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
982 if [ "$1" = "-I" ]; then
986 VAL=`echo $1 | sed 's,-I,,'`
991 if [ "$1" = "-L" ]; then
995 VAL=`echo $1 | sed 's,-L,,'`
1000 if [ "$1" = "-R" ]; then
1004 VAL=`echo $1 | sed 's,-R,,'`
1009 VAL=`echo $1 | sed 's,-l,,'`
1013 if [ "$1" = "-F" ]; then
1017 VAL=`echo $1 | sed 's,-F,,'`
1022 if [ "$1" = "-fw" ]; then
1026 VAL=`echo $1 | sed 's,-fw,,'`
1034 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1041 if [ "$UNKNOWN_ARG" = "yes" ]; then
1042 echo "$1: unknown argument"
1053 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1054 CFG_ACCESSIBILITY="$VAL"
1063 CFG_USE_GNUMAKE="$VAL"
1066 CFG_MYSQL_CONFIG="$VAL"
1069 QT_INSTALL_PREFIX="$VAL"
1072 QT_HOST_PREFIX="$VAL"
1081 QT_FORCE_PKGCONFIG=yes
1084 QT_INSTALL_DOCS="$VAL"
1087 QT_INSTALL_HEADERS="$VAL"
1090 QT_INSTALL_PLUGINS="$VAL"
1093 QT_INSTALL_IMPORTS="$VAL"
1096 QT_INSTALL_DATA="$VAL"
1099 QT_INSTALL_LIBS="$VAL"
1108 QT_INSTALL_TRANSLATIONS="$VAL"
1110 sysconfdir|settingsdir)
1111 QT_INSTALL_SETTINGS="$VAL"
1114 QT_INSTALL_EXAMPLES="$VAL"
1117 QT_INSTALL_TESTS="$VAL"
1126 QT_INSTALL_BINS="$VAL"
1132 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1139 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1140 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1141 [ "$VAL" = "es2" ]; then
1148 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1155 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1158 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1161 if [ "$BUILD_ON_MAC" = "yes" ]; then
1168 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1169 CFG_MAC_DWARF2="$VAL"
1175 OPT_OBSOLETE_HOST_ARG=yes
1178 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1179 CFG_MAC_HARFBUZZ="$VAL"
1186 if [ "$BUILD_ON_MAC" = "yes" ]; then
1187 CFG_FRAMEWORK="$VAL"
1193 if [ "$VAL" = "yes" ]; then
1195 QMakeVar add QMAKE_CFLAGS -pg
1196 QMakeVar add QMAKE_CXXFLAGS -pg
1197 QMakeVar add QMAKE_LFLAGS -pg
1198 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1204 if [ "$VAL" = "yes" ]; then
1205 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1208 exceptions|g++-exceptions)
1209 if [ "$VAL" = "no" ]; then
1211 elif [ "$VAL" = "yes" ]; then
1219 # keep compatibility with old platform names
1225 PLATFORM=hpux-acc-o64
1228 PLATFORM=hpux-acc-64
1231 PLATFORM=hpux-acc-64
1243 PLATFORM=reliant-cds-64
1246 PLATFORM=solaris-cc-64
1249 PLATFORM=unixware-cc
1252 PLATFORM=unixware-g++
1255 PLATFORM=unixware-cc
1258 PLATFORM=unixware-g++
1264 i386) NATIVE_64_ARCH="x86_64" ;;
1265 powerpc) NATIVE_64_ARCH="ppc64" ;;
1266 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1268 if [ ! -z "$NATIVE_64_ARCH" ]; then
1269 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1276 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1279 XPLATFORM="devices/$VAL"
1282 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1283 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1284 DeviceVar set $DEV_VAR $DEV_VAL
1287 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1288 CFG_DEBUG_RELEASE="$VAL"
1294 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1295 CFG_RELEASE_QMAKE="$VAL"
1301 if [ "$VAL" = "yes" ]; then
1303 elif [ "$VAL" = "no" ]; then
1310 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1311 CFG_PREFIX_INSTALL="$VAL"
1319 developer-build|commercial|opensource)
1320 # These switches have been dealt with already
1323 if [ "$VAL" = "yes" ]; then
1325 elif [ "$VAL" = "no" ]; then
1332 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1333 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1339 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1340 if [ "$VAL" = "no" ]; then
1341 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1342 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1343 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1349 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1356 if [ "$VAL" = "no" ]; then
1363 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1371 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1378 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1385 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1392 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1399 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1406 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1413 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1420 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1421 CFG_PRECOMPILE="$VAL"
1426 separate-debug-info)
1427 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1428 CFG_SEPARATE_DEBUG_INFO="$VAL"
1429 elif [ "$VAL" = "nocopy" ] ; then
1430 CFG_SEPARATE_DEBUG_INFO="yes"
1431 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1437 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1438 CFG_REDUCE_EXPORTS="$VAL"
1444 if [ "$VAL" = "no" ]; then
1451 if [ "$VAL" = "no" ]; then
1458 if [ "$VAL" = "no" ]; then
1465 if [ "$VAL" = "no" ]; then
1472 if [ "$VAL" = "no" ]; then
1479 if [ "$VAL" = "no" ]; then
1486 if [ "$VAL" = "no" ]; then
1496 if [ "$VAL" = "no" ]; then
1503 if [ "$VAL" = "no" ]; then
1510 if [ "$VAL" = "no" ]; then
1511 CFG_MIPS_DSPR2="$VAL"
1517 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1518 CFG_REDUCE_RELOCATIONS="$VAL"
1524 [ "$VAL" = "qt" ] && VAL=yes
1525 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1530 # No longer supported:
1531 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1534 if [ "$VAL" = "system" ]; then
1541 [ "$VAL" = "yes" ] && VAL=qt
1542 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1549 [ "$VAL" = "yes" ] && VAL=qt
1550 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1557 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1564 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1571 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1578 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1585 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1592 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1593 CFG_FONTCONFIG="$VAL"
1599 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1606 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1613 CFG_OBSOLETE_WAYLAND=yes
1616 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1623 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1630 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1637 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1644 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1651 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1658 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1659 CFG_GSTREAMER="$VAL"
1665 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1666 CFG_QGTKSTYLE="$VAL"
1672 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1675 if [ "$VAL" = "no" ]; then
1683 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1685 elif [ "$VAL" = "no" ]; then
1692 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1693 QPA_PLATFORM_GUARD="$VAL"
1699 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1701 elif [ "$VAL" = "runtime" ]; then
1708 if [ "$VAL" = "yes" ]; then
1715 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1722 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1723 CFG_LARGEFILE="$VAL"
1729 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1736 if [ "$VAL" = "yes" ]; then
1737 CFG_OPENSSL="linked"
1743 if [ "$VAL" = "yes" ]; then
1746 if [ "$VAL" = "no" ]; then
1754 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1755 CFG_JAVASCRIPTCORE_JIT="$VAL"
1761 if [ "$VAL" = "yes" ]; then
1762 OPT_CONFIRM_LICENSE="$VAL"
1768 if [ "$VAL" = "yes" ]; then
1774 sql-*|imageformat-*)
1775 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1776 # if autoconf style options were used, $VAL can be "yes" or "no"
1777 [ "$VAL" = "yes" ] && VAL=qt
1778 # now $VAL should be "no", "qt", or "plugin"... double-check
1779 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1782 # now $VAL is "no", "qt", or "plugin"
1784 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1785 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1787 # Grab the available values
1790 avail="$CFG_SQL_AVAILABLE"
1793 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1794 if [ "$OPT" != "plugin" ]; then
1795 # png is always built in
1801 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1805 # Check that that user's value is available.
1808 if [ "$VAL" = "$d" ]; then
1813 [ "$found" = yes ] || ERROR=yes
1815 if [ "$VAR" = "sql" ]; then
1816 # set the CFG_SQL_driver
1817 eval "CFG_SQL_$VAL=\$OPT"
1819 elif [ "$VAR" = "imageformat" ]; then
1820 [ "$OPT" = "qt" ] && OPT=yes
1821 VAL="`echo $VAL |tr a-z A-Z`"
1822 eval "CFG_$VAL=$OPT"
1826 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1827 if [ "$OPT" = "plugin" ]; then
1830 QMakeVar add "${VAR}s" "${VAL}"
1831 elif [ "$OPT" = "no" ]; then
1832 PLUG_VAR="${VAR}-plugin"
1834 QMakeVar del "${IN_VAR}s" "$VAL"
1835 QMakeVar del "${PLUG_VAR}s" "$VAL"
1837 if [ "$ERROR" = "yes" ]; then
1838 echo "$CURRENT_OPT: unknown argument"
1843 if [ "$VAL" = "yes" ]; then
1844 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1845 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1849 elif [ "$VAL" = "no" ]; then
1850 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1851 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1860 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1867 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1874 D_FLAGS="$D_FLAGS \"$VAL\""
1877 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1880 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1883 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1886 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1889 if [ "$BUILD_ON_MAC" = "yes" ]; then
1890 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1891 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1897 if [ "$BUILD_ON_MAC" = "yes" ]; then
1898 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1904 W_FLAGS="$W_FLAGS \"${VAL}\""
1910 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1911 CFG_PHONON_BACKEND="$VAL"
1923 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1924 CFG_AUDIO_BACKEND="$VAL"
1930 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1937 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1938 CFG_FORCE_ASSERTS="$VAL"
1944 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1954 if [ "$UNKNOWN_OPT" = "yes" ]; then
1955 echo "${CURRENT_OPT}: invalid command-line switch"
1961 # update QT_CONFIG to show our current predefined configuration
1962 case "$CFG_QCONFIG" in
1963 minimal|small|medium|large|full)
1964 # these are a sequence of increasing functionality
1965 for c in minimal small medium large full; do
1966 QT_CONFIG="$QT_CONFIG $c-config"
1967 [ "$CFG_QCONFIG" = $c ] && break
1971 # not known to be sufficient for anything
1972 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
1973 echo >&2 "Error: configuration file not found:"
1974 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
1976 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
1981 #-------------------------------------------------------------------------------
1982 # build tree initialization
1983 #-------------------------------------------------------------------------------
1985 # where to find which..
1986 unixtests="$relpath/config.tests/unix"
1987 mactests="$relpath/config.tests/mac"
1988 WHICH="$unixtests/which.test"
1990 PERL=`$WHICH perl 2>/dev/null`
1992 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
1994 for e in gawk nawk awk; do
1995 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2002 PERL="/usr/bin/perl"
2003 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2007 ### skip this if the user just needs help...
2008 if [ "$OPT_HELP" != "yes" ]; then
2010 # is this a shadow build?
2011 if [ "$OPT_SHADOW" = "maybe" ]; then
2013 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2014 if [ -h "$outpath" ]; then
2015 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2021 if [ "$OPT_SHADOW" = "yes" ]; then
2022 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2023 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2024 echo >&2 "Cannot proceed."
2027 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2030 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2032 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2033 echo "Qt can be built in release mode with separate debug information, so"
2034 echo "-debug-and-release is not necessary anymore"
2038 if [ "$CFG_SILENT" = "yes" ]; then
2039 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2042 # if the source tree is different from the build tree,
2043 # symlink or copy part of the sources
2044 if [ "$OPT_SHADOW" = "yes" ]; then
2045 echo "Preparing build tree..."
2047 if [ -z "$PERL" ]; then
2049 echo "You need perl in your PATH to make a shadow build."
2050 echo "Cannot proceed."
2054 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2056 # make a syncqt script that can be used in the shadow
2057 rm -f "$outpath/bin/syncqt"
2058 if [ -x "$relpath/bin/syncqt" ]; then
2059 mkdir -p "$outpath/bin"
2060 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2061 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2062 chmod 755 "$outpath/bin/syncqt"
2065 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2066 rm -f "$outpath/bin/$i"
2067 if [ -x "$relpath/bin/$i" ]; then
2068 mkdir -p "$outpath/bin"
2069 echo "#!/bin/sh" >"$outpath/bin/$i"
2070 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2071 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2072 chmod 755 "$outpath/bin/$i"
2076 # save a pre-existing mkspecs/modules dir
2077 test -d "$outpath/mkspecs/modules" && \
2078 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2080 # symlink the mkspecs directory
2081 mkdir -p "$outpath/mkspecs"
2082 rm -rf "$outpath"/mkspecs/*
2083 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2084 rm -f "$outpath/mkspecs/default"
2088 rm -rf "$outpath/mkspecs/$1"
2089 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2090 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2093 # Special case for mkspecs/features directory.
2094 # To be able to place .prf files into a shadow build directory,
2095 # we're creating links for files only. The directory structure is reproduced.
2096 ShadowMkspecs features
2098 # The modules dir is special, too.
2099 if test -d "$outpath/mkspecs-modules"; then
2100 rm -rf "$outpath/mkspecs/modules"
2101 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2103 ShadowMkspecs modules
2106 # symlink the doc directory
2107 rm -rf "$outpath/doc"
2108 ln -s "$relpath/doc" "$outpath/doc"
2111 # symlink fonts to be able to run application from build directory
2112 if [ ! -d "${outpath}/lib/fonts" ]; then
2113 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2114 mkdir -p "${outpath}/lib"
2115 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2119 if [ "$OPT_FAST" = "auto" ]; then
2120 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2127 # find a make command
2128 if [ -z "$MAKE" ]; then
2130 for mk in gmake make; do
2131 if "$WHICH" $mk >/dev/null 2>&1; then
2136 if [ -z "$MAKE" ]; then
2137 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2138 echo >&2 "Cannot proceed."
2141 # export MAKE, we need it later in the config.tests
2147 #-------------------------------------------------------------------------------
2148 # auto-detect all that hasn't been specified in the arguments
2149 #-------------------------------------------------------------------------------
2151 if [ -z "$PLATFORM" ]; then
2153 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2155 OSX_VERSION=`uname -r | cut -d. -f1`
2156 if [ "$OSX_VERSION" -ge 11 ]; then
2157 # We're on Lion or above. Check if we have a supported Clang version
2158 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2161 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2173 #PLATFORM=aix-g++-64
2175 #PLATFORM=aix-xlc-64
2177 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2187 # PLATFORM=dynix-g++
2193 PLATFORM=freebsd-g++
2195 - Also available for FreeBSD: freebsd-icc
2199 PLATFORM=openbsd-g++
2210 #PLATFORM=irix-cc-64
2212 - Also available for IRIX: irix-g++ irix-cc-64
2216 case "$UNAME_MACHINE" in
2218 #PLATFORM=hpuxi-acc-32
2219 PLATFORM=hpuxi-acc-64
2221 - Also available for HP-UXi: hpuxi-acc-32
2227 #PLATFORM=hpux-acc-64
2229 #PLATFORM=hpux-acc-o64
2231 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2240 - Also available for Tru64: tru64-g++
2244 case "$UNAME_MACHINE" in
2246 PLATFORM=linux-g++-64
2253 - Also available for Linux: linux-kcc linux-icc linux-cxx
2257 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2258 PLATFORM="solaris-g++"
2260 #PLATFORM=solaris-g++
2262 #PLATFORM=solaris-cc64
2265 - Also available for Solaris: solaris-g++ solaris-cc-64
2268 ReliantUNIX-*:*|SINIX-*:*)
2269 PLATFORM=reliant-cds
2270 #PLATFORM=reliant-cds-64
2272 - Also available for Reliant UNIX: reliant-cds-64
2282 #PLATFORM=unixware-g++
2283 PLATFORM=unixware-cc
2285 - Also available for OpenUNIX: unixware-g++
2289 #PLATFORM=unixware-g++
2290 PLATFORM=unixware-cc
2292 - Also available for UnixWare: unixware-g++
2299 - Also available for SCO OpenServer: sco-g++
2303 PLATFORM=unixware-g++
2306 PLATFORM=unsupported/qnx-g++
2309 if [ "$OPT_HELP" != "yes" ]; then
2311 for p in $PLATFORMS; do
2312 echo " $relconf $* -platform $p"
2315 echo " The build script does not currently recognize all" >&2
2316 echo " platforms supported by Qt." >&2
2317 echo " Rerun this script with a -platform option listed to" >&2
2318 echo " set the system/compiler combination you use." >&2
2325 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2327 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2329 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2330 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2332 if [ -d "$PLATFORM" ]; then
2333 QMAKESPEC="$PLATFORM"
2335 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2337 if [ -d "$XPLATFORM" ]; then
2338 XQMAKESPEC="$XPLATFORM"
2340 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2342 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2343 QT_CROSS_COMPILE=yes
2344 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2345 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2348 if [ "$BUILD_ON_MAC" = "yes" ]; then
2349 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2351 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2352 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2353 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2354 echo " built with 'macx-g++'" >&2
2360 # check specified platforms are supported
2361 if [ '!' -d "$QMAKESPEC" ]; then
2363 echo " The specified system/compiler is not supported:"
2367 echo " Please see the README file for a complete list."
2371 if [ '!' -d "$XQMAKESPEC" ]; then
2373 echo " The specified system/compiler is not supported:"
2377 echo " Please see the README file for a complete list."
2381 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2383 echo " The specified system/compiler port is not complete:"
2385 echo " $XQMAKESPEC/qplatformdefs.h"
2387 echo " Please contact qt-info@nokia.com."
2392 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2393 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2394 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2395 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2396 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2400 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2401 case `basename "$XPLATFORM"` in
2404 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2406 echo "Please contact qt-info@nokia.com to upgrade your license to"
2407 echo "include this platform, or install the Qt Open Source Edition"
2408 echo "if you intend to develop free software."
2414 #-------------------------------------------------------------------------------
2415 # write out device config before we run the test.
2416 #-------------------------------------------------------------------------------
2417 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
2418 rm -f "$DEVICE_VARS_FILE"
2420 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
2423 #-------------------------------------------------------------------------------
2424 # tests that don't need qmake (must be run before displaying help)
2425 #-------------------------------------------------------------------------------
2427 # detect build style
2428 if [ "$CFG_DEBUG" = "auto" ]; then
2429 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2430 CFG_DEBUG_RELEASE=yes
2432 elif [ "$CFG_DEV" = "yes" ]; then
2433 CFG_DEBUG_RELEASE=no
2436 CFG_DEBUG_RELEASE=no
2440 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2441 QT_CONFIG="$QT_CONFIG build_all"
2444 if [ -z "$PKG_CONFIG" ]; then
2445 # See if PKG_CONFIG is set in the mkspec:
2446 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2448 if [ -z "$PKG_CONFIG" ]; then
2449 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2452 # Work out if we can use pkg-config
2453 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2454 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2456 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2457 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2458 echo >&2 "environment!"
2460 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
2462 echo >&2 "Warning: PKG_CONFIG_LIBDIR has not been set. This could mean"
2463 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
2464 echo >&2 "This is probably not what you want."
2466 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2468 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2469 echo >&2 "been set. This means your toolchain's .pc files must contain"
2470 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2471 echo >&2 "tests are failing, please check these files."
2476 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2477 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2478 echo >&2 "dependencies"
2484 if [ ! -n "$PKG_CONFIG" ]; then
2485 QT_CONFIG="$QT_CONFIG no-pkg-config"
2488 # pass on $CFG_SDK to the configure tests.
2489 if [ '!' -z "$CFG_SDK" ]; then
2490 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2493 # find the default framework value
2494 if [ "$BUILD_ON_MAC" = "yes" ]; then
2495 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2496 CFG_FRAMEWORK="$CFG_SHARED"
2497 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2499 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2507 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2509 TEST_COMPILER=$QMAKE_CONF_COMPILER
2510 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2511 if [ -z "$TEST_COMPILER" ]; then
2512 echo "ERROR: Cannot set the compiler for the configuration tests"
2517 if [ -n "$CFG_SYSROOT" ]; then
2518 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2522 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2524 # auto-detect precompiled header support
2525 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2526 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2533 #auto-detect DWARF2 on the mac
2534 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2535 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2542 # auto-detect support for separate debug info in objcopy
2543 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2544 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2545 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2546 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2547 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2548 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2549 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2550 CFG_SEPARATE_DEBUG_INFO=no
2554 # binutils on HP-UX is buggy; default to no.
2555 CFG_SEPARATE_DEBUG_INFO=no
2558 CFG_SEPARATE_DEBUG_INFO=yes
2564 # auto-detect -fvisibility support
2565 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2566 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2567 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2568 echo "-reduce-exports was requested but this compiler does not support it"
2569 echo "Re-run configure with -v for more information"
2572 CFG_REDUCE_EXPORTS=no
2574 CFG_REDUCE_EXPORTS=yes
2578 # detect the availability of the -Bsymbolic-functions linker optimization
2579 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2580 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2581 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2582 echo "-reduce-relocations was requested but this compiler does not support it"
2583 echo "Re-run configure with -v for more information"
2586 CFG_REDUCE_RELOCATIONS=no
2588 CFG_REDUCE_RELOCATIONS=yes
2592 # auto-detect GNU make support
2593 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2597 # find the default framework value
2598 if [ "$BUILD_ON_MAC" = "yes" ]; then
2599 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2600 CFG_FRAMEWORK="$CFG_SHARED"
2601 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2603 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2611 #setup the build parts
2612 if [ -z "$CFG_BUILD_PARTS" ]; then
2613 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2615 # build tests by default, if a developer build
2616 if [ "$CFG_DEV" = "yes" ]; then
2617 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2620 # don't build tools by default when cross-compiling
2621 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2622 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2625 for nobuild in $CFG_NOBUILD_PARTS; do
2626 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2628 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2630 # echo "WARNING: libs is a required part of the build."
2632 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2635 #-------------------------------------------------------------------------------
2636 # post process QT_INSTALL_* variables
2637 #-------------------------------------------------------------------------------
2639 if [ -z "$QT_INSTALL_PREFIX" ]; then
2640 if [ "$CFG_DEV" = "yes" ]; then
2641 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2643 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2646 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2648 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2649 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2650 if [ "$BUILD_ON_MAC" = "yes" ]; then
2651 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2654 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2657 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2659 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2660 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2661 if [ "$BUILD_ON_MAC" = "yes" ]; then
2662 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2667 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2670 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2672 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2673 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2674 if [ "$BUILD_ON_MAC" = "yes" ]; then
2675 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2676 QT_INSTALL_LIBS="/Libraries/Frameworks"
2680 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2682 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2684 if [ -z "$QT_INSTALL_BINS" ]; then #default
2685 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2686 if [ "$BUILD_ON_MAC" = "yes" ]; then
2687 QT_INSTALL_BINS="/Developer/Applications/Qt"
2690 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2692 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2694 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2695 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2696 if [ "$BUILD_ON_MAC" = "yes" ]; then
2697 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2700 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2702 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2704 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2705 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2706 if [ "$BUILD_ON_MAC" = "yes" ]; then
2707 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2710 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2712 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2714 if [ -z "$QT_INSTALL_DATA" ]; then #default
2715 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2717 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2719 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2720 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2722 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2724 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2725 if [ "$BUILD_ON_MAC" = "yes" ]; then
2726 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2728 QT_INSTALL_SETTINGS=/etc/xdg
2731 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2733 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2734 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2735 if [ "$BUILD_ON_MAC" = "yes" ]; then
2736 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2739 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2741 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2744 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2745 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2746 if [ "$BUILD_ON_MAC" = "yes" ]; then
2747 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2750 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2752 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2754 #------- host paths --------
2756 if [ -z "$QT_HOST_PREFIX" ]; then
2757 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2760 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2764 if [ -z "$QT_HOST_BINS" ]; then #default
2766 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2767 if [ "$BUILD_ON_MAC" = "yes" ]; then
2768 QT_HOST_BINS="/Developer/Applications/Qt"
2771 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2773 QT_HOST_BINS="$QT_INSTALL_BINS"
2776 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2778 if [ -z "$QT_HOST_DATA" ]; then #default
2780 QT_HOST_DATA="$QT_HOST_PREFIX"
2782 QT_HOST_DATA="$QT_INSTALL_DATA"
2785 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2788 #-------------------------------------------------------------------------------
2789 # help - interactive parts of the script _after_ this section please
2790 #-------------------------------------------------------------------------------
2792 # next, emit a usage message if something failed.
2793 if [ "$OPT_HELP" = "yes" ]; then
2794 [ "x$ERROR" = "xyes" ] && echo
2795 if [ "$CFG_NIS" = "no" ]; then
2802 if [ "$CFG_CUPS" = "no" ]; then
2809 if [ "$CFG_ICONV" = "no" ]; then
2816 if [ "$CFG_LARGEFILE" = "no" ]; then
2823 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2831 if [ "$CFG_XCB" = "no" ]; then
2839 if [ "$CFG_EGLFS" = "no" ]; then
2847 if [ "$CFG_XINPUT2" = "no" ]; then
2855 if [ "$CFG_DBUS" = "no" ]; then
2863 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2871 if [ "$CFG_GLIB" = "no" ]; then
2880 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2881 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2882 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2883 [-release] [-debug] [-debug-and-release]
2884 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2885 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
2886 [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2887 [-plugin-sql-<driver>] [-system-sqlite]
2888 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2889 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2890 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2891 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2892 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2893 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2894 [-no-separate-debug-info] [-no-sse2]
2895 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2896 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2897 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2898 [-no-audio-backend] [-audio-backend]
2899 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2900 [-no-optimized-qmake] [-optimized-qmake]
2901 [-no-openssl] [-openssl] [-openssl-linked]
2902 [-no-gtkstyle] [-gtkstyle]
2903 [-qt-pcre] [-system-pcre]
2904 [-device <name>] [-device-option <key=value>]
2905 [additional platform specific options (see below)]
2908 Installation options:
2910 These are optional, but you may specify install directories.
2912 -prefix <dir> ...... This will install everything relative to <dir>
2913 (default $QT_INSTALL_PREFIX)
2915 -hostprefix [dir] .. Tools and libraries needed when developing
2916 applications are installed in [dir]. If [dir] is
2917 not given, the current build directory will be used.
2920 * -prefix-install .... Force a sandboxed "local" installation of
2921 Qt. This will install into
2922 $QT_INSTALL_PREFIX, if this option is
2923 disabled then some platforms will attempt a
2924 "system" install by placing default values to
2925 be placed in a system location other than
2928 You may use these to separate different parts of the install:
2930 -bindir <dir> ......... Executables will be installed to <dir>
2931 (default PREFIX/bin)
2932 -libdir <dir> ......... Libraries will be installed to <dir>
2933 (default PREFIX/lib)
2934 -docdir <dir> ......... Documentation will be installed to <dir>
2935 (default PREFIX/doc)
2936 -headerdir <dir> ...... Headers will be installed to <dir>
2937 (default PREFIX/include)
2938 -plugindir <dir> ...... Plugins will be installed to <dir>
2939 (default PREFIX/plugins)
2940 -importdir <dir> ...... Imports for QML will be installed to <dir>
2941 (default PREFIX/imports)
2942 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2944 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2945 (default PREFIX/translations)
2946 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2947 (default PREFIX/etc/settings)
2948 -examplesdir <dir> .... Examples will be installed to <dir>
2949 (default PREFIX/examples)
2950 -testsdir <dir> ....... Tests will be installed to <dir>
2951 (default PREFIX/tests)
2953 -hostbindir <dir> .. Host executables will be installed to <dir>
2954 (default HOSTPREFIX/bin)
2955 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2956 (default HOSTPREFIX)
2960 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2961 that needs to be evaluated. If the evaluation succeeds, the feature is
2962 included. Here is a short explanation of each option:
2964 * -release ........... Compile and link Qt with debugging turned off.
2965 -debug ............. Compile and link Qt with debugging turned on.
2966 -debug-and-release . Compile and link two versions of Qt, with and without
2967 debugging turned on (Mac only).
2969 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2971 -opensource ........ Compile and link the Open-Source Edition of Qt.
2972 -commercial ........ Compile and link the Commercial Edition of Qt.
2975 * -shared ............ Create and use shared Qt libraries.
2976 -static ............ Create and use static Qt libraries.
2978 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2980 -fast .............. Configure Qt quickly by generating Makefiles only for
2981 library and subdirectory targets. All other Makefiles
2982 are created as wrappers, which will in turn run qmake.
2984 -no-largefile ...... Disables large file support.
2985 + -largefile ......... Enables Qt to access files larger than 4 GB.
2987 -no-exceptions ..... Disable exceptions on compilers that support it.
2988 * -exceptions ........ Enable exceptions on compilers that support it.
2990 -no-accessibility .. Do not compile Accessibility support.
2991 * -accessibility ..... Compile Accessibility support.
2993 -no-sql-<driver> ... Disable SQL <driver> entirely.
2994 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2996 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2999 Possible values for <driver>:
3000 [ $CFG_SQL_AVAILABLE ]
3002 -system-sqlite ..... Use sqlite from the operating system.
3004 -no-phonon-backend.. Do not build the platform phonon plugin.
3005 + -phonon-backend..... Build the platform phonon plugin.
3007 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3008 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3010 -no-qml-debug ...... Do not build the in-process QML debugging support.
3011 + -qml-debug ......... Build the QML debugging support.
3013 -platform target ... The operating system and compiler you are building
3016 See the README file for a list of supported
3017 operating systems and compilers.
3019 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3020 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3021 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3022 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3023 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3024 -no-avx ............ Do not compile with use of AVX instructions.
3025 -no-avx2 ........... Do not compile with use of AVX2 instructions.
3026 -no-neon ........... Do not compile with use of NEON instructions.
3027 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3028 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3030 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3031 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3033 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3035 -D <string> ........ Add an explicit define to the preprocessor.
3036 -I <string> ........ Add an explicit include path.
3037 -L <string> ........ Add an explicit library path.
3039 -help, -h .......... Display this information.
3041 Third Party Libraries:
3043 -qt-zlib ........... Use the zlib bundled with Qt.
3044 + -system-zlib ....... Use zlib from the operating system.
3045 See http://www.gzip.org/zlib
3047 -no-gif ............ Do not compile GIF reading support.
3049 -no-libpng ......... Do not compile PNG support.
3050 -qt-libpng ......... Use the libpng bundled with Qt.
3051 + -system-libpng ..... Use libpng from the operating system.
3052 See http://www.libpng.org/pub/png
3054 -no-libjpeg ........ Do not compile JPEG support.
3055 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3056 + -system-libjpeg .... Use libjpeg from the operating system.
3057 See http://www.ijg.org
3059 -no-openssl ........ Do not compile support for OpenSSL.
3060 + -openssl ........... Enable run-time OpenSSL support.
3061 -openssl-linked .... Enabled linked OpenSSL support.
3063 -qt-pcre ........... Use the PCRE library bundled with Qt.
3064 + -system-pcre ....... Use the PCRE library from the operating system.
3068 -make <part> ....... Add part to the list of parts to be built at make time.
3069 ($QT_DEFAULT_BUILD_PARTS)
3070 -nomake <part> ..... Exclude part from the list of parts to be built.
3072 -R <string> ........ Add an explicit runtime library path to the Qt
3074 -l <string> ........ Add an explicit library.
3076 -no-rpath .......... Do not use the library install path as a runtime
3078 + -rpath ............. Link Qt libraries and executables using the library
3079 install path as a runtime library path. Equivalent
3080 to -R install_libpath
3082 -continue .......... Continue as far as possible if an error occurs.
3084 -verbose, -v ....... Print verbose information about each step of the
3087 -silent ............ Reduce the build output so that warnings and errors
3088 can be seen more easily.
3090 * -no-optimized-qmake ... Do not build qmake optimized.
3091 -optimized-qmake ...... Build qmake optimized.
3093 -no-gui ............ Don't build the Qt GUI library
3095 $NSN -no-nis ............ Do not compile NIS support.
3096 $NSY -nis ............... Compile NIS support.
3098 $CUN -no-cups ........... Do not compile CUPS support.
3099 $CUY -cups .............. Compile CUPS support.
3100 Requires cups/cups.h and libcups.so.2.
3102 $CIN -no-iconv .......... Do not compile support for iconv(3).
3103 $CIY -iconv ............. Compile support for iconv(3).
3105 $PHN -no-pch ............ Do not use precompiled header support.
3106 $PHY -pch ............... Use precompiled header support.
3108 $DBN -no-dbus ........... Do not compile the QtDBus module.
3109 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3110 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3112 -reduce-relocations ..... Reduce relocations in the libraries through extra
3113 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3114 experimental; needs GNU ld >= 2.18).
3116 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3118 -device <name> ............... Cross-compile for device <name> (experimental)
3119 -device-option <key=value> ... Add device specific options for the device mkspec
3122 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3123 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3125 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3126 $XCBY -xcb ............... Compile Xcb support.
3128 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3129 $EGLFSY -eglfs ............. Compile EGLFS support.
3131 -xplatform target ... The target platform when cross-compiling.
3133 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3135 -no-feature-<feature> Do not compile in <feature>.
3136 -feature-<feature> .. Compile in <feature>. The available features
3137 are described in src/corelib/global/qfeatures.txt
3139 -no-freetype ........ Do not compile in Freetype2 support.
3140 -qt-freetype ........ Use the libfreetype bundled with Qt.
3141 * -system-freetype .... Use libfreetype from the operating system.
3142 See http://www.freetype.org/
3144 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3145 default ($CFG_QCONFIG).
3147 -no-opengl .......... Do not support OpenGL.
3148 -opengl <api> ....... Enable OpenGL support
3149 With no parameter, this will attempt to auto-detect
3150 OpenGL ES 2, or regular desktop OpenGL.
3151 Use es2 for <api> to override auto-detection.
3153 $GBN -no-glib ........... Do not compile Glib support.
3154 $GBY -glib .............. Compile Glib support.
3157 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3160 $X2N -no-xinput2......... Do not compile XInput2 support.
3161 $X2Y -xinput2............ Compile XInput2 support.
3167 if [ "$BUILD_ON_MAC" = "yes" ]; then
3172 -Fstring ........... Add an explicit framework path.
3173 -fw string ......... Add an explicit framework.
3175 * -framework ......... Build Qt as a series of frameworks and
3176 link tools against those frameworks.
3177 -no-framework ...... Do not build Qt as a series of frameworks.
3179 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3180 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3182 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3183 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3185 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3186 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3187 QT_ENABLE_HARFBUZZ environment variable.
3192 [ "x$ERROR" = "xyes" ] && exit 1
3197 # -----------------------------------------------------------------------------
3198 # LICENSING, INTERACTIVE PART
3199 # -----------------------------------------------------------------------------
3202 echo "This is the Qt ${EditionString} Edition."
3205 if [ "$Edition" = "OpenSource" ]; then
3207 echo "You are licensed to use this software under the terms of"
3208 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3209 if [ -f "$relpath/LICENSE.GPL3" ]; then
3210 echo "You are also licensed to use this software under the terms of"
3211 echo "the GNU General Public License (GPL) versions 3."
3217 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3218 echo "You have already accepted the terms of the $LicenseType license."
3221 if [ -f "$relpath/LICENSE.GPL3" ]; then
3222 echo "Type '3' to view the GNU General Public License version 3."
3224 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3225 echo "Type 'yes' to accept this license offer."
3226 echo "Type 'no' to decline this license offer."
3228 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3232 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3234 elif [ "$acceptance" = "no" ]; then
3235 echo "You are not licensed to use this software."
3238 elif [ "$acceptance" = "3" ]; then
3239 more "$relpath/LICENSE.GPL3"
3240 elif [ "$acceptance" = "L" ]; then
3241 more "$relpath/LICENSE.LGPL"
3244 elif [ "$Edition" = "Preview" ]; then
3245 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3248 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3249 echo "You have already accepted the terms of the $LicenseType license."
3252 echo "You are licensed to use this software under the terms of"
3253 echo "the $TheLicense"
3255 echo "Type '?' to read the Preview License."
3256 echo "Type 'yes' to accept this license offer."
3257 echo "Type 'no' to decline this license offer."
3259 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3263 if [ "$acceptance" = "yes" ]; then
3265 elif [ "$acceptance" = "no" ] ;then
3266 echo "You are not licensed to use this software."
3269 elif [ "$acceptance" = "?" ]; then
3270 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3273 elif [ "$Edition" != "OpenSource" ]; then
3274 if [ -n "$ExpiryDate" ]; then
3275 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3276 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3277 Today=`date +%Y%m%d`
3278 if [ "$Today" -gt "$ExpiryDate" ]; then
3279 case "$LicenseType" in
3280 Commercial|Academic|Educational)
3281 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3283 echo "NOTICE NOTICE NOTICE NOTICE"
3285 echo " Your support and upgrade period has expired."
3287 echo " You are no longer licensed to use this version of Qt."
3288 echo " Please contact qt-info@nokia.com to renew your support"
3289 echo " and upgrades for this license."
3291 echo "NOTICE NOTICE NOTICE NOTICE"
3296 echo "WARNING WARNING WARNING WARNING"
3298 echo " Your support and upgrade period has expired."
3300 echo " You may continue to use your last licensed release"
3301 echo " of Qt under the terms of your existing license"
3302 echo " agreement. But you are not entitled to technical"
3303 echo " support, nor are you entitled to use any more recent"
3304 echo " Qt releases."
3306 echo " Please contact qt-info@nokia.com to renew your"
3307 echo " support and upgrades for this license."
3309 echo "WARNING WARNING WARNING WARNING"
3316 echo "NOTICE NOTICE NOTICE NOTICE"
3318 echo " Your Evaluation license has expired."
3320 echo " You are no longer licensed to use this software. Please"
3321 echo " contact qt-info@nokia.com to purchase license, or install"
3322 echo " the Qt Open Source Edition if you intend to develop free"
3325 echo "NOTICE NOTICE NOTICE NOTICE"
3332 TheLicense=`head -n 1 "$outpath/LICENSE"`
3334 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3335 echo "You have already accepted the terms of the $TheLicense."
3338 echo "You are licensed to use this software under the terms of"
3339 echo "the $TheLicense."
3341 echo "Type '?' to view the $TheLicense."
3342 echo "Type 'yes' to accept this license offer."
3343 echo "Type 'no' to decline this license offer."
3345 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3349 if [ "$acceptance" = "yes" ]; then
3351 elif [ "$acceptance" = "no" ]; then
3352 echo "You are not licensed to use this software."
3355 else [ "$acceptance" = "?" ]
3356 more "$outpath/LICENSE"
3361 # this should be moved somewhere else
3364 AIX_VERSION=`uname -v`
3365 if [ "$AIX_VERSION" -lt "5" ]; then
3366 QMakeVar add QMAKE_LIBS_X11 -lbind
3373 #-------------------------------------------------------------------------------
3374 # generate qconfig.cpp
3375 #-------------------------------------------------------------------------------
3376 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3378 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3380 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3381 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3383 /* Installation date */
3384 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3386 /* Installation Info */
3387 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3388 "qt_prfxpath=$QT_INSTALL_PREFIX",
3389 "qt_docspath=$QT_INSTALL_DOCS",
3390 "qt_hdrspath=$QT_INSTALL_HEADERS",
3391 "qt_libspath=$QT_INSTALL_LIBS",
3392 "qt_binspath=$QT_INSTALL_BINS",
3393 "qt_plugpath=$QT_INSTALL_PLUGINS",
3394 "qt_impspath=$QT_INSTALL_IMPORTS",
3395 "qt_datapath=$QT_INSTALL_DATA",
3396 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3397 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3398 "qt_tstspath=$QT_INSTALL_TESTS",
3399 #ifdef QT_BUILD_QMAKE
3400 "qt_ssrtpath=$CFG_SYSROOT",
3401 "qt_hpfxpath=$QT_HOST_PREFIX",
3402 "qt_hbinpath=$QT_HOST_BINS",
3403 "qt_hdatpath=$QT_HOST_DATA",
3406 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3409 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3411 /* strlen( "qt_lcnsxxxx" ) == 12 */
3412 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3413 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3415 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3418 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3419 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3420 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3422 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3423 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3424 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3427 # -----------------------------------------------------------------------------
3428 if [ "$LicenseType" = "Evaluation" ]; then
3429 EVALKEY=qt_qevalkey=$LicenseKeyExt
3430 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3431 EVALKEY=qt_qevalkey=
3434 if [ -n "$EVALKEY" ]; then
3435 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3436 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3437 /* Evaluation license key */
3438 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3440 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3444 # -----------------------------------------------------------------------------
3446 # -----------------------------------------------------------------------------
3449 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3451 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3452 if [ "$OPT_SHADOW" = "yes" ]; then
3453 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3454 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3455 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3459 # $1: input variable name (awk regexp)
3460 # $2: optional output variable name
3461 # $3: optional value transformation (sed command)
3462 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3463 # is where the resulting variable is written to
3464 setBootstrapVariable()
3466 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3470 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3471 echo "Creating qmake. Please wait..."
3474 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3475 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3476 if [ -f "$QCONFIG_H" ]; then
3477 OLD_QCONFIG_H=$QCONFIG_H
3478 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3481 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3482 # when building qmake, we use #defines for the install paths,
3483 # however they are real functions in the library
3484 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3485 mkdir -p "$outpath/src/corelib/global"
3486 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3487 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3490 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3492 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3493 rm -rf mkspecs/default
3494 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3495 mkdir -p "$outpath/qmake" || exit
3497 for mkfile in GNUmakefile Makefile; do
3500 in_mkfile="${mkfile}.in"
3501 if [ "$mkfile" = "Makefile" ]; then
3502 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3503 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3505 in_mkfile="${mkfile}.unix"
3507 in_mkfile="$relpath/qmake/$in_mkfile"
3508 mkfile="$outpath/qmake/$mkfile"
3509 if [ -f "$mkfile" ]; then
3510 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3513 [ -f "$in_mkfile" ] || continue
3515 echo "########################################################################" > "$mkfile"
3516 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3517 echo "########################################################################" >> "$mkfile"
3520 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3521 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3522 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3524 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3525 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3528 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3529 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3530 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3531 setBootstrapVariable QMAKE_CFLAGS
3532 setBootstrapVariable QMAKE_CXXFLAGS
3533 setBootstrapVariable QMAKE_LFLAGS
3535 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3536 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3537 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3539 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3540 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3541 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3542 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3543 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3544 elif [ "$CFG_DEBUG" = "yes" ]; then
3545 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3546 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3547 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3548 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3551 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3552 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3553 for rpath in $RPATH_FLAGS; do
3554 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3557 if [ "$BUILD_ON_MAC" = "yes" ]; then
3558 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3559 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3560 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3561 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3562 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3563 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3564 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3565 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3566 if [ '!' -z "$CFG_SDK" ]; then
3567 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3568 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3569 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3570 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3571 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3574 if [ '!' -z "$D_FLAGS" ]; then
3575 for DEF in $D_FLAGS; do
3576 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3579 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3580 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3581 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3582 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3584 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3585 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3586 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3587 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3588 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3589 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3590 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3591 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3592 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3593 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3595 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3596 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3597 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3598 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3603 QMAKE_BUILD_ERROR=no
3604 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3605 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3606 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3607 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3610 #-------------------------------------------------------------------------------
3611 # tests that need qmake
3612 #-------------------------------------------------------------------------------
3614 #-------------------------------------------------------------------------------
3615 # determine the target and host architectures
3616 #-------------------------------------------------------------------------------
3618 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3619 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'`
3621 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3622 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3623 # Do the same test again, using the host compiler
3624 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'`
3625 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3627 # not cross compiling, host == target
3628 CFG_HOST_ARCH="$CFG_ARCH"
3631 if [ "$OPT_VERBOSE" = "yes" ]; then
3632 echo "System architecture: '$CFG_ARCH'"
3633 echo "Host architecture: '$CFG_HOST_ARCH'"
3636 #-------------------------------------------------------------------------------
3637 # functionality tests
3638 #-------------------------------------------------------------------------------
3640 # detect availability of float math.h functions
3641 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3642 CFG_USE_FLOATMATH=yes
3644 CFG_USE_FLOATMATH=no
3647 # detect sse2 support
3648 if [ "${CFG_SSE2}" = "auto" ]; then
3649 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3656 # detect sse3 support
3657 if [ "${CFG_SSE3}" = "auto" ]; then
3658 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3665 # detect ssse3 support
3666 if [ "${CFG_SSSE3}" = "auto" ]; then
3667 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3674 # detect sse4.1 support
3675 if [ "${CFG_SSE4_1}" = "auto" ]; then
3676 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
3683 # detect sse4.2 support
3684 if [ "${CFG_SSE4_2}" = "auto" ]; then
3685 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
3692 # detect avx support
3693 if [ "${CFG_AVX}" = "auto" ]; then
3694 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
3701 # detect avx2 support
3702 if [ "${CFG_AVX2}" = "auto" ]; then
3703 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
3710 # check iWMMXt support
3711 if [ "$CFG_IWMMXT" = "yes" ]; then
3712 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
3713 if [ $? != "0" ]; then
3714 echo "The iWMMXt functionality test failed!"
3715 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3720 # detect neon support
3721 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3722 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
3727 elif [ "$CFG_ARCH" != "arm" ]; then
3731 # detect mips_dsp support
3732 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3738 # detect mips_dspr2 support
3739 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3745 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3748 if [ "$CFG_ZLIB" = "no" ]; then
3749 # Note: Qt no longer support builds without zlib
3750 # So we force a "no" to be "auto" here.
3751 # If you REALLY really need no zlib support, you can still disable
3752 # it by doing the following:
3753 # add "no-zlib" to mkspecs/qconfig.pri
3754 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3756 # There's no guarantee that Qt will build under those conditions
3761 if [ "$CFG_ZLIB" = "auto" ]; then
3762 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
3769 if [ "$CFG_LARGEFILE" = "auto" ]; then
3770 #Large files should be enabled for all Linux systems
3774 if [ "$CFG_GUI" = "no" ]; then
3775 QPA_PLATFORM_GUARD=no
3778 # detect how jpeg should be built
3779 if [ "$CFG_JPEG" = "auto" ]; then
3780 if [ "$CFG_SHARED" = "yes" ]; then
3787 if [ "$CFG_LIBJPEG" = "auto" ]; then
3788 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
3795 # detect how gif should be built
3796 if [ "$CFG_GIF" = "auto" ]; then
3797 if [ "$CFG_SHARED" = "yes" ]; then
3805 if [ "$CFG_LIBPNG" = "auto" ]; then
3806 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
3813 # detect accessibility
3814 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3815 CFG_ACCESSIBILITY=yes
3818 if [ "$CFG_EGLFS" = "yes" ]; then
3819 if [ "$CFG_EGL" = "no" ]; then
3820 echo "The EGLFS plugin requires EGL support and cannot be built"
3826 # auto-detect SQL-modules support
3827 for _SQLDR in $CFG_SQL_AVAILABLE; do
3830 if [ "$CFG_SQL_mysql" != "no" ]; then
3831 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3832 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3833 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3834 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3835 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3836 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3837 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3839 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3840 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3841 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3842 echo " You need MySql 4 or higher."
3843 echo " If you believe this message is in error you may use the continue"
3844 echo " switch (-continue) to $0 to continue."
3849 QT_LFLAGS_MYSQL_R=""
3853 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
3854 QMakeVar add CONFIG use_libmysqlclient_r
3855 if [ "$CFG_SQL_mysql" = "auto" ]; then
3856 CFG_SQL_mysql=plugin
3858 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3859 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
3860 if [ "$CFG_SQL_mysql" = "auto" ]; then
3861 CFG_SQL_mysql=plugin
3864 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3865 echo "MySQL support cannot be enabled due to functionality tests!"
3866 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3867 echo " If you believe this message is in error you may use the continue"
3868 echo " switch (-continue) to $0 to continue."
3873 QT_LFLAGS_MYSQL_R=""
3881 if [ "$CFG_SQL_psql" != "no" ]; then
3882 # Be careful not to use native pg_config when cross building.
3883 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
3884 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
3885 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
3887 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
3888 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
3889 # But, respect PSQL_LIBS if set
3890 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
3891 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
3892 if [ "$CFG_SQL_psql" = "auto" ]; then
3896 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3897 echo "PostgreSQL support cannot be enabled due to functionality tests!"
3898 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3899 echo " If you believe this message is in error you may use the continue"
3900 echo " switch (-continue) to $0 to continue."
3911 if [ "$CFG_SQL_odbc" != "no" ]; then
3912 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
3913 if [ "$CFG_SQL_odbc" = "auto" ]; then
3917 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
3918 QT_LFLAGS_ODBC="-liodbc"
3919 if [ "$CFG_SQL_odbc" = "auto" ]; then
3923 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3924 echo "ODBC support cannot be enabled due to functionality tests!"
3925 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3926 echo " If you believe this message is in error you may use the continue"
3927 echo " switch (-continue) to $0 to continue."
3937 if [ "$CFG_SQL_oci" != "no" ]; then
3938 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
3939 if [ "$CFG_SQL_oci" = "auto" ]; then
3943 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3944 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
3945 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3946 echo " If you believe this message is in error you may use the continue"
3947 echo " switch (-continue) to $0 to continue."
3956 if [ "$CFG_SQL_tds" != "no" ]; then
3957 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
3958 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
3959 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
3960 if [ "$CFG_SQL_tds" = "auto" ]; then
3964 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3965 echo "TDS support cannot be enabled due to functionality tests!"
3966 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3967 echo " If you believe this message is in error you may use the continue"
3968 echo " switch (-continue) to $0 to continue."
3977 if [ "$CFG_SQL_db2" != "no" ]; then
3978 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
3979 if [ "$CFG_SQL_db2" = "auto" ]; then
3983 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3984 echo "ODBC support cannot be enabled due to functionality tests!"
3985 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3986 echo " If you believe this message is in error you may use the continue"
3987 echo " switch (-continue) to $0 to continue."
3996 if [ "$CFG_SQL_ibase" != "no" ]; then
3997 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
3998 if [ "$CFG_SQL_ibase" = "auto" ]; then
3999 CFG_SQL_ibase=plugin
4002 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4003 echo "InterBase support cannot be enabled due to functionality tests!"
4004 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4005 echo " If you believe this message is in error you may use the continue"
4006 echo " switch (-continue) to $0 to continue."
4015 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4016 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
4017 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4018 CFG_SQL_sqlite2=plugin
4021 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4022 echo "SQLite2 support cannot be enabled due to functionality tests!"
4023 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4024 echo " If you believe this message is in error you may use the continue"
4025 echo " switch (-continue) to $0 to continue."
4034 if [ "$CFG_SQL_sqlite" != "no" ]; then
4035 SQLITE_AUTODETECT_FAILED="no"
4036 if [ "$CFG_SQLITE" = "system" ]; then
4037 if [ -n "$PKG_CONFIG" ]; then
4038 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4039 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4041 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
4042 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4043 CFG_SQL_sqlite=plugin
4045 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4047 SQLITE_AUTODETECT_FAILED="yes"
4050 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4051 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4052 CFG_SQL_sqlite=plugin
4055 SQLITE_AUTODETECT_FAILED="yes"
4059 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4060 echo "SQLite support cannot be enabled due to functionality tests!"
4061 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4062 echo " If you believe this message is in error you may use the continue"
4063 echo " switch (-continue) to $0 to continue."
4069 if [ "$OPT_VERBOSE" = "yes" ]; then
4070 echo "unknown SQL driver: $_SQLDR"
4076 # auto-detect NIS support
4077 if [ "$CFG_NIS" != "no" ]; then
4078 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
4081 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4082 echo "NIS support cannot be enabled due to functionality tests!"
4083 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4084 echo " If you believe this message is in error you may use the continue"
4085 echo " switch (-continue) to $0 to continue."
4093 # auto-detect CUPS support
4094 if [ "$CFG_CUPS" != "no" ]; then
4095 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
4098 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4099 echo "Cups support cannot be enabled due to functionality tests!"
4100 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4101 echo " If you believe this message is in error you may use the continue"
4102 echo " switch (-continue) to $0 to continue."
4110 # auto-detect iconv(3) support
4111 if [ "$CFG_ICONV" != "no" ]; then
4112 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4114 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
4116 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
4118 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
4121 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4122 echo "Iconv support cannot be enabled due to functionality tests!"
4123 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4124 echo " If you believe this message is in error you may use the continue"
4125 echo " switch (-continue) to $0 to continue."
4133 # auto-detect libdbus-1 support
4134 if [ "$CFG_DBUS" != "no" ]; then
4135 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4136 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4137 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4139 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
4140 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4141 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4142 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4144 if [ "$CFG_DBUS" = "auto" ]; then
4146 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4147 # CFG_DBUS is "yes" or "linked" here
4149 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4150 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4151 echo " If you believe this message is in error you may use the continue"
4152 echo " switch (-continue) to $0 to continue."
4158 # auto-detect Glib support
4159 if [ "$CFG_GLIB" != "no" ]; then
4160 if [ -n "$PKG_CONFIG" ]; then
4161 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4162 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4164 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; then
4166 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4167 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4169 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4170 echo "Glib support cannot be enabled due to functionality tests!"
4171 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4172 echo " If you believe this message is in error you may use the continue"
4173 echo " switch (-continue) to $0 to continue."
4182 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4183 if [ -n "$PKG_CONFIG" ]; then
4184 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4185 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4187 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; then
4189 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4190 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4192 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4193 echo "Gstreamer support cannot be enabled due to functionality tests!"
4194 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4195 echo " If you believe this message is in error you may use the continue"
4196 echo " switch (-continue) to $0 to continue."
4202 elif [ "$CFG_GLIB" = "no" ]; then
4206 # auto-detect libicu support
4207 if [ "$CFG_ICU" != "no" ]; then
4208 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4209 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4211 if [ "$CFG_ICU" = "auto" ]; then
4213 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4216 echo "The ICU library support cannot be enabled."
4217 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4218 echo " If you believe this message is in error you may use the continue"
4219 echo " switch (-continue) to $0 to continue."
4225 # Auto-detect PulseAudio support
4226 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4227 if [ -n "$PKG_CONFIG" ]; then
4228 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4229 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4231 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; then
4233 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4234 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4236 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4237 echo "PulseAudio support cannot be enabled due to functionality tests!"
4238 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4239 echo " If you believe this message is in error you may use the continue"
4240 echo " switch (-continue) to $0 to continue."
4249 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4250 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4251 if [ "$CFG_GUI" = "no" ]; then
4252 if [ "$CFG_OPENGL" = "auto" ]; then
4255 if [ "$CFG_OPENGL" != "no" ]; then
4256 echo "OpenGL enabled, but GUI disabled."
4257 echo " You might need to either enable the GUI or disable OpenGL"
4261 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4262 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4264 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
4267 if [ "$CFG_OPENGL" = "yes" ]; then
4268 echo "All the OpenGL functionality tests failed!"
4269 echo " You might need to modify the include and library search paths by editing"
4270 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4271 echo " ${XQMAKESPEC}."
4278 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4279 if [ "$CFG_OPENGL" = "desktop" ]; then
4280 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4281 if [ $? != "0" ]; then
4282 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4289 elif [ "$CFG_OPENGL" = "es2" ]; then
4291 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4292 if [ $? != "0" ]; then
4293 echo "The OpenGL ES 2.0 functionality test failed!"
4294 echo " You might need to modify the include and library search paths by editing"
4295 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4296 echo " ${XQMAKESPEC}."
4299 elif [ "$CFG_OPENGL" = "desktop" ]; then
4300 # Desktop OpenGL support
4301 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4302 if [ $? != "0" ]; then
4303 echo "The OpenGL functionality test failed!"
4304 echo " You might need to modify the include and library search paths by editing"
4305 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4306 echo " ${XQMAKESPEC}."
4311 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4312 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4313 if [ $? != "0" ]; then
4314 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4321 fi # X11/MINGW OpenGL
4323 if [ "$BUILD_ON_MAC" = "yes" ]; then
4324 if [ "$CFG_PHONON" != "no" ]; then
4325 # Always enable Phonon (unless it was explicitly disabled)
4329 if [ "$CFG_COREWLAN" = "auto" ]; then
4330 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
4338 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4339 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4340 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4342 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
4345 if [ "$CFG_OPENGL" = "yes" ]; then
4346 echo "All the OpenGL functionality tests failed!"
4347 echo " You might need to modify the include and library search paths by editing"
4348 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4349 echo " ${XQMAKESPEC}."
4354 elif [ "$CFG_OPENGL" = "es2" ]; then
4356 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4357 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4358 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4359 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4360 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4361 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4362 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4363 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4366 "$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
4367 if [ $? != "0" ]; then
4368 echo "The OpenGL ES 2.0 functionality test failed!"
4369 echo " You might need to modify the include and library search paths by editing"
4370 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4371 echo " ${XQMAKESPEC}."
4374 elif [ "$CFG_OPENGL" = "desktop" ]; then
4375 # Desktop OpenGL support
4376 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4377 if [ $? != "0" ]; then
4378 echo "The OpenGL functionality test failed!"
4379 echo " You might need to modify the include and library search paths by editing"
4380 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4381 echo " ${XQMAKESPEC}."
4386 # auto-detect FontConfig support
4387 if [ "$CFG_FONTCONFIG" != "no" ]; then
4388 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4389 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4390 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4392 QT_CFLAGS_FONTCONFIG=
4393 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4395 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4396 QT_CONFIG="$QT_CONFIG fontconfig"
4397 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4398 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4399 CFG_LIBFREETYPE=system
4404 # Save these for a check later
4405 ORIG_CFG_XCB="$CFG_XCB"
4406 ORIG_CFG_EGLFS="$CFG_EGLFS"
4408 if [ "$CFG_LIBUDEV" != "no" ]; then
4409 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4410 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4411 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4412 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4413 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4415 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
4417 QT_CONFIG="$QT_CONFIG libudev"
4418 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4419 echo "The libudev functionality test failed!"
4423 QMakeVar add DEFINES QT_NO_LIBUDEV
4427 if [ "$CFG_EVDEV" != "no" ]; then
4428 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
4430 QT_CONFIG="$QT_CONFIG evdev"
4431 elif [ "$CFG_EVDEV" = "yes" ]; then
4432 echo "The evdev functionality test failed!"
4436 QMakeVar add DEFINES QT_NO_EVDEV
4440 # Check we actually have X11 :-)
4441 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS; then
4442 QT_CONFIG="$QT_CONFIG xlib"
4445 # auto-detect Xrender support
4446 if [ "$CFG_XRENDER" != "no" ]; then
4447 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS; then
4449 QT_CONFIG="$QT_CONFIG xrender"
4451 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4452 echo "Xrender support cannot be enabled due to functionality tests!"
4453 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4454 echo " If you believe this message is in error you may use the continue"
4455 echo " switch (-continue) to $0 to continue."
4463 if [ "$CFG_XCB" != "no" ]; then
4464 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4465 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4466 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4468 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
4470 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
4471 QT_CONFIG="$QT_CONFIG xcb-render"
4474 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
4476 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4479 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
4480 QT_CONFIG="$QT_CONFIG xcb-xlib"
4483 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4484 # auto-detect XInput2/Xinput support
4485 if [ "$CFG_XINPUT2" != "no" ]; then
4486 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4490 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4491 echo "XInput2 support cannot be enabled due to functionality tests!"
4492 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4493 echo " If you believe this message is in error you may use the continue"
4494 echo " switch (-continue) to $0 to continue."
4503 if [ "$CFG_XCB" = "yes" ]; then
4504 echo "The XCB test failed!"
4505 echo " You might need to install dependency packages."
4506 echo " See src/plugins/platforms/xcb/README."
4510 QMakeVar add DEFINES QT_NO_XCB
4514 # Detect libxkbcommon
4515 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4516 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4517 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4518 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4519 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4521 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4525 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4526 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4527 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4528 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4529 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4530 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4531 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4532 fi # detect EGL support
4533 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
4535 elif [ "$CFG_EGL" = "yes" ]; then
4536 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4537 echo " You might need to modify the include and library search paths by editing"
4538 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4543 elif [ "$CFG_OPENGL" = "desktop" ]; then
4544 if [ "$CFG_EGL" = "yes" ]; then
4545 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4546 echo "Either disable EGL support or enable OpenGL ES support."
4552 if [ "$CFG_EGLFS" != "no" ]; then
4553 CFG_EGLFS="$CFG_EGL"
4556 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4557 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4558 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4559 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4562 if [ "$BUILD_ON_MAC" = "yes" ]; then
4563 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
4564 QT_CONFIG="$QT_CONFIG coreservices"
4566 QMakeVar add DEFINES QT_NO_CORESERVICES
4570 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
4571 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ]; then
4572 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4573 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] ); then
4574 echo "No QPA platform plugin enabled!"
4575 echo " If you really want to build without a QPA platform plugin you must pass"
4576 echo " -no-xcb and -no-eglfs to configure. Doing this will"
4577 echo " produce a Qt that cannot run GUI applications."
4578 echo " The dependencies needed for xcb to build are listed in"
4579 echo " src/plugins/platforms/xcb/README"
4585 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4588 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4589 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4590 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
4591 CFG_LIBFREETYPE=system
4597 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS &&
4598 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4599 echo "STL functionality check failed! Cannot build Qt with this STL library."
4600 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4605 # detect POSIX clock_gettime()
4606 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4607 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
4608 CFG_CLOCK_GETTIME=yes
4610 CFG_CLOCK_GETTIME=no
4614 # detect POSIX monotonic clocks
4615 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4616 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
4617 CFG_CLOCK_MONOTONIC=yes
4619 CFG_CLOCK_MONOTONIC=no
4621 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4622 CFG_CLOCK_MONOTONIC=no
4626 if [ "$CFG_MREMAP" = "auto" ]; then
4627 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
4634 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4635 if [ "$CFG_GETADDRINFO" != "no" ]; then
4636 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
4639 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4640 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4641 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4642 echo " If you believe this message is in error you may use the continue"
4643 echo " switch (-continue) to $0 to continue."
4651 # find if the platform provides inotify
4652 if [ "$CFG_INOTIFY" != "no" ]; then
4653 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
4656 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4657 echo "inotify support cannot be enabled due to functionality tests!"
4658 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4659 echo " If you believe this message is in error you may use the continue"
4660 echo " switch (-continue) to $0 to continue."
4668 # find if the platform provides if_nametoindex (ipv6 interface name support)
4669 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4670 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
4673 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4674 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4675 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4676 echo " If you believe this message is in error you may use the continue"
4677 echo " switch (-continue) to $0 to continue."
4685 # find if the platform provides getifaddrs (network interface enumeration)
4686 if [ "$CFG_GETIFADDRS" != "no" ]; then
4687 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
4690 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4691 echo "getifaddrs support cannot be enabled due to functionality tests!"
4692 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4693 echo " If you believe this message is in error you may use the continue"
4694 echo " switch (-continue) to $0 to continue."
4703 if [ "$CFG_OPENSSL" != "no" ]; then
4704 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
4705 if [ "$CFG_OPENSSL" = "auto" ]; then
4709 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4710 echo "OpenSSL support cannot be enabled due to functionality tests!"
4711 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4712 echo " If you believe this message is in error you may use the continue"
4713 echo " switch (-continue) to $0 to continue."
4722 if [ "$CFG_PCRE" != "qt" ]; then
4723 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
4726 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4727 echo "PCRE support cannot be enabled due to functionality tests!"
4728 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4729 echo " If you believe this message is in error you may use the continue"
4730 echo " switch (-continue) to $0 to continue."
4738 # detect OpenVG support
4739 if [ "$CFG_OPENVG" != "no" ]; then
4740 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
4741 if [ "$CFG_OPENVG" = "auto" ]; then
4744 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
4745 if [ "$CFG_OPENVG" = "auto" ]; then
4748 CFG_OPENVG_ON_OPENGL=yes
4749 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
4750 if [ "$CFG_OPENVG" = "auto" ]; then
4753 CFG_OPENVG_LC_INCLUDES=yes
4754 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
4755 if [ "$CFG_OPENVG" = "auto" ]; then
4758 CFG_OPENVG_LC_INCLUDES=yes
4759 CFG_OPENVG_ON_OPENGL=yes
4761 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4762 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4763 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4764 echo " If you believe this message is in error you may use the continue"
4765 echo " switch (-continue) to $0 to continue."
4771 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
4772 CFG_OPENVG_SHIVA=yes
4776 if [ "$CFG_ALSA" = "auto" ]; then
4777 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
4784 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4785 if [ "$CFG_ARCH" = "arm" ]; then
4786 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
4787 if [ $? != "0" ]; then
4788 CFG_JAVASCRIPTCORE_JIT=no
4791 case "$XPLATFORM" in
4793 CFG_JAVASCRIPTCORE_JIT=no
4799 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
4800 QMakeVar set JAVASCRIPTCORE_JIT yes
4801 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
4802 QMakeVar set JAVASCRIPTCORE_JIT no
4805 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
4806 CFG_AUDIO_BACKEND=yes
4809 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
4810 echo "Warning: largefile support cannot be disabled for win32."
4814 #-------------------------------------------------------------------------------
4815 # ask for all that hasn't been auto-detected or specified in the arguments
4816 #-------------------------------------------------------------------------------
4818 # enable dwarf2 support on Mac
4819 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
4820 QT_CONFIG="$QT_CONFIG dwarf2"
4823 # Detect the default arch (x86 or x86_64) on Mac OS X
4824 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
4826 case `file "${outpath}/bin/qmake"` in
4834 # unsupported/unknown
4838 if [ -n "$DEFAULT_ARCH" ]; then
4839 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
4840 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
4841 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
4842 # Make the application arch follow the Qt arch
4843 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
4848 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
4849 QT_CONFIG="$QT_CONFIG phonon-backend"
4852 # disable accessibility
4853 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
4854 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
4856 QT_CONFIG="$QT_CONFIG accessibility"
4860 if [ "$CFG_EGL" = "yes" ]; then
4861 QT_CONFIG="$QT_CONFIG egl"
4863 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
4867 if [ "$CFG_EGLFS" = "yes" ]; then
4868 QT_CONFIG="$QT_CONFIG eglfs"
4870 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
4874 if [ "$CFG_OPENVG" = "no" ]; then
4875 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
4877 QT_CONFIG="$QT_CONFIG openvg"
4878 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
4879 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
4881 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
4882 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
4884 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
4885 QT_CONFIG="$QT_CONFIG shivavg"
4886 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
4891 if [ "$CFG_OPENGL" = "no" ]; then
4892 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
4894 QT_CONFIG="$QT_CONFIG opengl"
4897 if [ "$CFG_OPENGL" = "es2" ]; then
4898 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
4901 if [ "$CFG_OPENGL" = "es2" ]; then
4902 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
4903 QT_CONFIG="$QT_CONFIG opengles2"
4906 # safe execution environment
4907 if [ "$CFG_SXE" != "no" ]; then
4908 QT_CONFIG="$QT_CONFIG sxe"
4911 # build up the variables for output
4912 if [ "$CFG_DEBUG" = "yes" ]; then
4913 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
4914 QMAKE_CONFIG="$QMAKE_CONFIG debug"
4915 elif [ "$CFG_DEBUG" = "no" ]; then
4916 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
4917 QMAKE_CONFIG="$QMAKE_CONFIG release"
4919 if [ "$CFG_SHARED" = "yes" ]; then
4920 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
4921 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
4922 elif [ "$CFG_SHARED" = "no" ]; then
4923 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
4924 QMAKE_CONFIG="$QMAKE_CONFIG static"
4927 #FIXME: qpa is implicit this should all be removed
4928 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
4929 QT_CONFIG="$QT_CONFIG qpa"
4930 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
4931 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
4933 if [ "$XPLATFORM_MINGW" != "yes" ]; then
4934 # Do not set this here for Windows. Let qmake do it so
4935 # debug and release precompiled headers are kept separate.
4936 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
4938 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
4939 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
4940 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
4941 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
4942 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
4943 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
4945 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
4946 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
4948 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
4949 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
4950 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
4951 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4952 QMakeVar add QMAKE_CFLAGS -g
4953 QMakeVar add QMAKE_CXXFLAGS -g
4954 QT_CONFIG="$QT_CONFIG separate_debug_info"
4956 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
4957 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
4959 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
4960 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
4961 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
4962 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
4963 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
4964 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
4965 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
4966 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
4967 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
4968 if [ "$CFG_ARCH" = "mips" ]; then
4969 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
4970 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
4972 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
4973 QT_CONFIG="$QT_CONFIG clock-gettime"
4975 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
4976 QT_CONFIG="$QT_CONFIG clock-monotonic"
4978 if [ "$CFG_MREMAP" = "yes" ]; then
4979 QT_CONFIG="$QT_CONFIG mremap"
4981 if [ "$CFG_GETADDRINFO" = "yes" ]; then
4982 QT_CONFIG="$QT_CONFIG getaddrinfo"
4984 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
4985 QT_CONFIG="$QT_CONFIG ipv6ifname"
4987 if [ "$CFG_GETIFADDRS" = "yes" ]; then
4988 QT_CONFIG="$QT_CONFIG getifaddrs"
4990 if [ "$CFG_INOTIFY" = "yes" ]; then
4991 QT_CONFIG="$QT_CONFIG inotify"
4993 if [ "$CFG_LIBJPEG" = "no" ]; then
4995 elif [ "$CFG_LIBJPEG" = "system" ]; then
4996 QT_CONFIG="$QT_CONFIG system-jpeg"
4998 if [ "$CFG_JPEG" = "no" ]; then
4999 QT_CONFIG="$QT_CONFIG no-jpeg"
5000 elif [ "$CFG_JPEG" = "yes" ]; then
5001 QT_CONFIG="$QT_CONFIG jpeg"
5003 if [ "$CFG_LIBPNG" = "no" ]; then
5006 if [ "$CFG_LIBPNG" = "system" ]; then
5007 QT_CONFIG="$QT_CONFIG system-png"
5009 if [ "$CFG_PNG" = "no" ]; then
5010 QT_CONFIG="$QT_CONFIG no-png"
5011 elif [ "$CFG_PNG" = "yes" ]; then
5012 QT_CONFIG="$QT_CONFIG png"
5014 if [ "$CFG_GIF" = "no" ]; then
5015 QT_CONFIG="$QT_CONFIG no-gif"
5016 elif [ "$CFG_GIF" = "yes" ]; then
5017 QT_CONFIG="$QT_CONFIG gif"
5019 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5020 QT_CONFIG="$QT_CONFIG no-freetype"
5021 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5022 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5023 QT_CONFIG="$QT_CONFIG system-freetype"
5025 QT_CONFIG="$QT_CONFIG freetype"
5027 if [ "$CFG_GUI" = "auto" ]; then
5030 if [ "$CFG_GUI" = "no" ]; then
5031 QT_CONFIG="$QT_CONFIG no-gui"
5034 if [ "$CFG_WIDGETS" = "no" ]; then
5035 QT_CONFIG="$QT_CONFIG no-widgets"
5036 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5039 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5040 #On Mac we implicitly link against libz, so we
5041 #never use the 3rdparty stuff.
5042 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5044 if [ "$CFG_ZLIB" = "yes" ]; then
5045 QT_CONFIG="$QT_CONFIG zlib"
5046 elif [ "$CFG_ZLIB" = "system" ]; then
5047 QT_CONFIG="$QT_CONFIG system-zlib"
5050 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5051 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5052 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5053 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5054 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5055 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5056 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5057 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5058 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5059 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5060 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5061 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5062 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5063 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5065 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5066 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5067 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5069 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5070 if [ "$CFG_RPATH" = "yes" ]; then
5071 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5072 # set the default rpath to the library installation directory
5073 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5075 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5076 if [ -n "$RPATH_FLAGS" ]; then
5078 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5082 elif [ "$CFG_RPATH" = "yes" ]; then
5083 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5087 if [ "$CFG_RPATH" = "yes" ]; then
5088 # set the default rpath to the library installation directory
5089 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5091 if [ -n "$RPATH_FLAGS" ]; then
5092 # add the user defined rpaths
5093 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5097 if [ '!' -z "$I_FLAGS" ]; then
5098 # add the user define include paths
5099 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5100 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5103 if [ '!' -z "$W_FLAGS" ]; then
5104 # add the user defined warning flags
5105 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5106 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5107 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5110 # turn off exceptions for the compilers that support it
5111 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5112 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5114 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5117 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5118 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5121 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5122 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5123 # Follow default behavior of configure.exe by overriding with "rtti".
5124 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5127 if [ "$CFG_ALSA" = "yes" ]; then
5128 QT_CONFIG="$QT_CONFIG alsa"
5131 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5132 QT_CONFIG="$QT_CONFIG pulseaudio"
5135 if [ "$CFG_COREWLAN" = "yes" ]; then
5136 QT_CONFIG="$QT_CONFIG corewlan"
5139 if [ "$CFG_ICU" = "yes" ]; then
5140 QT_CONFIG="$QT_CONFIG icu"
5143 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5144 QT_CONFIG="$QT_CONFIG force_asserts"
5147 if [ "$CFG_PCRE" = "qt" ]; then
5148 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5152 # Some Qt modules are too advanced in C++ for some old compilers
5153 # Detect here the platforms where they are known to work.
5155 # See Qt documentation for more information on which features are
5156 # supported and on which compilers.
5158 canBuildQtConcurrent="yes"
5159 canUseV8Snapshot="yes"
5161 case "$XPLATFORM" in
5163 # PA-RISC's assembly is too limited
5164 # gcc 3.4 on that platform can't build QtXmlPatterns
5165 # the assembly it generates cannot be compiled
5167 # Check gcc's version
5168 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5172 canBuildQtXmlPatterns="no"
5176 canBuildQtXmlPatterns="no"
5180 unsupported/vxworks-*-g++*)
5183 unsupported/vxworks-*-dcc*)
5185 canBuildQtXmlPatterns="no"
5188 # Check gcc's version
5189 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5197 canBuildQtXmlPatterns="no"
5202 # Check the compiler version
5203 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5206 canBuildQtXmlPatterns="no"
5207 canBuildQtConcurrent="no"
5211 canBuildQtConcurrent="no"
5217 canBuildQtXmlPatterns="no"
5218 canBuildQtConcurrent="no"
5224 # Get the xlC version
5225 cat > xlcver.c <<EOF
5229 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5234 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5235 xlcver=`./xlcver 2>/dev/null`
5238 if [ "$OPT_VERBOSE" = "yes" ]; then
5239 if [ -n "$xlcver" ]; then
5240 echo Found IBM xlC version: $xlcver.
5242 echo Could not determine IBM xlC version, assuming oldest supported.
5249 canBuildQtXmlPatterns="no"
5250 canBuildQtConcurrent="no"
5254 canBuildQtConcurrent="no"
5260 canBuildQtConcurrent="no"
5264 if [ "$CFG_GUI" = "no" ]; then
5265 # WebKit requires QtGui
5269 if [ "$CFG_SHARED" = "no" ]; then
5271 echo "WARNING: Using static linking will disable the WebKit module."
5276 CFG_CONCURRENT="yes"
5277 if [ "$canBuildQtConcurrent" = "no" ]; then
5278 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5281 QT_CONFIG="$QT_CONFIG concurrent"
5285 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5286 QT_CONFIG="$QT_CONFIG audio-backend"
5290 if [ "$CFG_WEBKIT" = "debug" ]; then
5291 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5295 QT_CONFIG="$QT_CONFIG v8"
5296 # Detect snapshot support
5297 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5298 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5301 *) canUseV8Snapshot="no"
5305 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5306 # QEMU crashes when building inside Scratchbox with an ARM target
5307 canUseV8Snapshot="no"
5310 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5311 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5313 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5314 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5317 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5318 QT_CONFIG="$QT_CONFIG v8snapshot"
5322 if [ "$CFG_QML_DEBUG" = "no" ]; then
5323 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5326 if [ "$CFG_EXCEPTIONS" = "no" ]; then
5329 QMakeVar add QMAKE_CFLAGS -fno-exceptions
5330 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
5331 QMakeVar add QMAKE_LFLAGS -fno-exceptions
5336 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
5337 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
5338 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
5345 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
5351 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5353 case "$COMPILER_VERSION" in
5355 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5356 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5357 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5360 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5361 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5362 QT_GCC_PATCH_VERSION=0
5372 #-------------------------------------------------------------------------------
5373 # part of configuration information goes into qconfig.h
5374 #-------------------------------------------------------------------------------
5376 case "$CFG_QCONFIG" in
5378 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5381 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5382 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5383 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5384 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5385 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5386 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5388 echo "#endif" >>"$tmpconfig"
5392 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5396 # define QT_EDITION $QT_EDITION
5400 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5401 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5403 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5404 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5407 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5408 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5411 if [ "$BUILD_ON_MAC" = "yes" ]; then
5412 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5413 #if defined(__LP64__)
5414 # define QT_POINTER_SIZE 8
5416 # define QT_POINTER_SIZE 4
5420 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5421 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5424 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5425 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5426 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5430 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5432 if [ "$CFG_DEV" = "yes" ]; then
5433 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5436 # Add QPA to config.h
5437 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5439 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5440 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5443 # Add turned on SQL drivers
5444 for DRIVER in $CFG_SQL_AVAILABLE; do
5445 eval "VAL=\$CFG_SQL_$DRIVER"
5448 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5449 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5450 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5453 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5459 QMakeVar set sql-drivers "$SQL_DRIVERS"
5460 QMakeVar set sql-plugins "$SQL_PLUGINS"
5462 # Add other configuration options to the qconfig.h file
5463 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5464 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5465 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5466 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5467 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
5468 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5469 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5471 # X11/Unix/Mac only configs
5472 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5473 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5474 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5475 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5476 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5477 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5478 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5479 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5480 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5481 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5482 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5483 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5484 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5485 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5487 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5488 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5489 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5490 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5491 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5492 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5493 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5494 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5495 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5496 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5497 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5498 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5499 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5501 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5502 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5503 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5504 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5505 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5506 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5507 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5508 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5510 # sort QCONFIG_FLAGS for neatness if we can
5511 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5512 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5514 if [ -n "$QCONFIG_FLAGS" ]; then
5515 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5516 #ifndef QT_BOOTSTRAPPED
5519 for cfg in $QCONFIG_FLAGS; do
5520 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5521 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5522 # figure out define logic, so we can output the correct
5523 # ifdefs to override the global defines in a project
5525 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5526 # QT_NO_option can be forcefully turned on by QT_option
5527 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5528 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5529 # QT_option can be forcefully turned off by QT_NO_option
5530 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5533 if [ -z $cfgdNeg ]; then
5534 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5541 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5542 #if defined($cfgd) && defined($cfgdNeg)
5544 #elif !defined($cfgd) && !defined($cfgdNeg)
5551 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5552 #endif // QT_BOOTSTRAPPED
5557 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5558 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5559 #define QT_VISIBILITY_AVAILABLE
5564 if [ -n "$QT_LIBINFIX" ]; then
5565 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5566 #define QT_LIBINFIX "$QT_LIBINFIX"
5571 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5572 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5573 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5575 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5576 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5577 chmod -w "$outpath/src/corelib/global/qconfig.h"
5578 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5579 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5583 #-------------------------------------------------------------------------------
5584 # save configuration into qconfig.pri
5585 #-------------------------------------------------------------------------------
5586 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5587 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5588 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5589 if [ "$CFG_DEBUG" = "yes" ]; then
5590 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5591 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5592 QT_CONFIG="$QT_CONFIG release"
5594 QT_CONFIG="$QT_CONFIG debug"
5595 elif [ "$CFG_DEBUG" = "no" ]; then
5596 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5597 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5598 QT_CONFIG="$QT_CONFIG debug"
5600 QT_CONFIG="$QT_CONFIG release"
5602 if [ "$CFG_FRAMEWORK" = "no" ]; then
5603 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5605 QT_CONFIG="$QT_CONFIG qt_framework"
5606 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5608 if [ "$CFG_DEV" = "yes" ]; then
5609 QT_CONFIG="$QT_CONFIG private_tests"
5612 cat >>"$QTCONFIG.tmp" <<EOF
5614 CONFIG += $QTCONFIG_CONFIG
5616 QT_HOST_ARCH = $CFG_HOST_ARCH
5617 QT_EDITION = $Edition
5618 QT_CONFIG += $QT_CONFIG
5621 QT_VERSION = $QT_VERSION
5622 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5623 QT_MINOR_VERSION = $QT_MINOR_VERSION
5624 QT_PATCH_VERSION = $QT_PATCH_VERSION
5627 QT_LIBINFIX = $QT_LIBINFIX
5628 QT_NAMESPACE = $QT_NAMESPACE
5631 if [ -n "$CFG_SYSROOT" ]; then
5632 echo "# sysroot" >>"$QTCONFIG.tmp"
5633 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5634 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5635 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5636 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5637 echo "}" >> "$QTCONFIG.tmp"
5638 echo >> "$QTCONFIG.tmp"
5640 if [ -n "$RPATH_FLAGS" ]; then
5641 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5643 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5644 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5645 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5646 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5649 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5650 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5651 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5654 # replace qconfig.pri if it differs from the newly created temp file
5655 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5656 rm -f "$QTCONFIG.tmp"
5658 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5661 #-------------------------------------------------------------------------------
5662 # save configuration into qmodule.pri
5663 #-------------------------------------------------------------------------------
5664 QTMODULE="$outpath/mkspecs/qmodule.pri"
5666 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
5668 # Ensure we can link to uninistalled libraries
5669 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5670 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5672 if [ -n "$QT_CFLAGS_PSQL" ]; then
5673 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5675 if [ -n "$QT_LFLAGS_PSQL" ]; then
5676 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5678 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5679 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5681 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5682 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5684 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5685 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5687 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5688 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5690 if [ -n "$QT_LFLAGS_ODBC" ]; then
5691 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5693 if [ -n "$QT_LFLAGS_TDS" ]; then
5694 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5697 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5698 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5701 #dump in the OPENSSL_LIBS info
5702 if [ '!' -z "$OPENSSL_LIBS" ]; then
5703 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5704 elif [ "$CFG_OPENSSL" = "linked" ]; then
5705 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5708 #dump in the SDK info
5709 if [ '!' -z "$CFG_SDK" ]; then
5710 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5714 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5715 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5717 # replace qmodule.pri if it differs from the newly created temp file
5718 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5719 rm -f "$QTMODULE.tmp"
5721 mv -f "$QTMODULE.tmp" "$QTMODULE"
5724 #-------------------------------------------------------------------------------
5725 # save configuration into .qmake.cache
5726 #-------------------------------------------------------------------------------
5728 CACHEFILE="$outpath/.qmake.cache"
5729 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5730 cat >>"$CACHEFILE.tmp" <<EOF
5732 QT_SOURCE_TREE = \$\$quote($relpath)
5733 QT_BUILD_TREE = \$\$quote($outpath)
5734 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5736 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5737 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5738 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5740 include(\$\$PWD/mkspecs/qmodule.pri)
5741 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5745 #dump the qmake spec
5746 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5747 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5749 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5752 # replace .qmake.cache if it differs from the newly created temp file
5753 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5754 rm -f "$CACHEFILE.tmp"
5756 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5759 #-------------------------------------------------------------------------------
5760 # give feedback on configuration
5761 #-------------------------------------------------------------------------------
5765 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5768 This target is using the GNU C++ compiler ($PLATFORM).
5770 Recent versions of this compiler automatically include code for
5771 exceptions, which increase both the size of the Qt libraries and
5772 the amount of memory taken by your applications.
5774 You may choose to re-run `basename $0` with the -no-exceptions
5775 option to compile Qt without exceptions. This is completely binary
5776 compatible, and existing applications will continue to work.
5784 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5787 This target is using the MIPSpro C++ compiler ($PLATFORM).
5789 You may choose to re-run `basename $0` with the -no-exceptions
5790 option to compile Qt without exceptions. This will make the
5791 size of the Qt library smaller and reduce the amount of memory
5792 taken by your applications.
5804 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5805 echo "Build type: $PLATFORM"
5807 echo "Building on: $PLATFORM"
5808 echo "Building for: $XPLATFORM"
5811 echo "Architecture: $CFG_ARCH"
5812 echo "Host architecture: $CFG_HOST_ARCH"
5814 if [ -n "$PLATFORM_NOTES" ]; then
5815 echo "Platform notes:"
5816 echo "$PLATFORM_NOTES"
5821 if [ "$OPT_VERBOSE" = "yes" ]; then
5822 echo $ECHO_N "qmake vars .......... $ECHO_C"
5823 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5824 echo "qmake switches ......... $QMAKE_SWITCHES"
5827 echo "Build .................. $CFG_BUILD_PARTS"
5828 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5829 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5830 echo "Debug .................. yes (combined)"
5831 if [ "$CFG_DEBUG" = "yes" ]; then
5832 echo "Default Link ........... debug"
5834 echo "Default Link ........... release"
5837 echo "Debug .................. $CFG_DEBUG"
5839 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5840 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5841 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5842 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5843 echo "QtGui module ........... $CFG_GUI"
5844 echo "QtWidgets module ....... $CFG_WIDGETS"
5845 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5846 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5848 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5850 echo "QML debugging .......... $CFG_QML_DEBUG"
5851 echo "PCH support ............ $CFG_PRECOMPILE"
5852 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5853 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5854 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5855 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5856 elif [ "$CFG_ARCH" = "arm" ]; then
5857 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5858 echo "NEON support ........... ${CFG_NEON}"
5860 if [ "$CFG_ARCH" = "mips" ]; then
5861 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5863 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5864 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5865 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5866 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5867 echo "NIS support ............ $CFG_NIS"
5868 echo "CUPS support ........... $CFG_CUPS"
5869 echo "Iconv support .......... $CFG_ICONV"
5870 echo "Glib support ........... $CFG_GLIB"
5871 echo "GStreamer support ...... $CFG_GSTREAMER"
5872 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
5873 echo "Large File support ..... $CFG_LARGEFILE"
5874 echo "GIF support ............ $CFG_GIF"
5875 if [ "$CFG_JPEG" = "no" ]; then
5876 echo "JPEG support ........... $CFG_JPEG"
5878 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
5880 if [ "$CFG_PNG" = "no" ]; then
5881 echo "PNG support ............ $CFG_PNG"
5883 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
5885 echo "zlib support ........... $CFG_ZLIB"
5886 echo "Session management ..... $CFG_SM"
5887 echo "libudev support ........ $CFG_LIBUDEV"
5889 if [ "$CFG_OPENGL" = "desktop" ]; then
5890 echo "OpenGL support ......... yes (Desktop OpenGL)"
5891 elif [ "$CFG_OPENGL" = "es2" ]; then
5892 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
5894 echo "OpenGL support ......... no"
5897 if [ "$CFG_OPENVG" ]; then
5898 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5899 echo "OpenVG support ......... ShivaVG"
5901 echo "OpenVG support ......... $CFG_OPENVG"
5905 echo "XShape support ......... $CFG_XSHAPE"
5906 echo "XVideo support ......... $CFG_XVIDEO"
5907 echo "XSync support .......... $CFG_XSYNC"
5908 echo "Xinerama support ....... $CFG_XINERAMA"
5909 echo "Xcursor support ........ $CFG_XCURSOR"
5910 echo "Xfixes support ......... $CFG_XFIXES"
5911 echo "Xrandr support ......... $CFG_XRANDR"
5912 echo "Xi support ............. $CFG_XINPUT"
5913 echo "MIT-SHM support ........ $CFG_MITSHM"
5914 echo "FontConfig support ..... $CFG_FONTCONFIG"
5915 echo "XKB Support ............ $CFG_XKB"
5916 echo "immodule support ....... $CFG_IM"
5917 echo "GTK theme support ...... $CFG_QGTKSTYLE"
5919 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
5920 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
5921 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
5922 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
5923 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
5924 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
5925 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
5926 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
5927 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
5930 if [ "$CFG_OPENSSL" = "yes" ]; then
5931 OPENSSL_LINKAGE="(run-time)"
5932 elif [ "$CFG_OPENSSL" = "linked" ]; then
5933 OPENSSL_LINKAGE="(linked)"
5935 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
5936 echo "Alsa support ........... $CFG_ALSA"
5937 if [ "$BUILD_ON_MAC" = "yes" ]; then
5938 echo "CoreWlan support ....... $CFG_COREWLAN"
5940 echo "libICU support ......... $CFG_ICU"
5941 echo "PCRE support ........... $CFG_PCRE"
5942 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
5943 echo "Xcb support ............ limited (old version)"
5945 echo "Xcb support ............ $CFG_XCB"
5947 echo "Xrender support ........ $CFG_XRENDER"
5948 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
5949 echo "XInput2 support ........ $CFG_XINPUT2"
5951 echo "EGLFS support .......... $CFG_EGLFS"
5954 # complain about not being able to use dynamic plugins if we are using a static build
5955 if [ "$CFG_SHARED" = "no" ]; then
5957 echo "WARNING: Using static linking will disable the use of dynamically"
5958 echo "loaded plugins. Make sure to import all needed static plugins,"
5959 echo "or compile needed modules into the library."
5962 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
5964 echo "NOTE: When linking against OpenSSL, you can override the default"
5965 echo "library names through OPENSSL_LIBS."
5967 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
5970 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
5972 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
5973 echo "if you want a pure debug build."
5978 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
5983 #-------------------------------------------------------------------------------
5984 # build makefiles based on the configuration
5985 #-------------------------------------------------------------------------------
5987 echo "Finding project files. Please wait..."
5988 if [ "$CFG_NOPROCESS" != "yes" ]; then
5989 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
5990 if [ -f "${relpath}/qtbase.pro" ]; then
5991 mkfile="${outpath}/Makefile"
5992 [ -f "$mkfile" ] && chmod +w "$mkfile"
5993 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
5997 # .projects -> projects to process
5998 # .projects.1 -> qt and moc
5999 # .projects.2 -> subdirs and libs
6000 # .projects.3 -> the rest
6001 rm -f .projects .projects.1 .projects.2 .projects.3
6003 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6004 if [ -z "$AWK" ]; then
6005 for p in `echo $QMAKE_PROJECTS`; do
6006 echo "$p" >> .projects
6009 cat >projects.awk <<EOF
6015 first = "./.projects.1.tmp"
6016 second = "./.projects.2.tmp"
6017 third = "./.projects.3.tmp"
6022 if ( ! target_file )
6024 print input_file >target_file
6029 input_file = FILENAME
6034 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6037 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6038 target_file = second
6043 matched_target == 0 && /^(TEMPLATE.*=)/ {
6044 if ( \$3 == "subdirs" )
6045 target_file = second
6046 else if ( \$3 == "lib" )
6052 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6053 if ( \$0 ~ /plugin/ )
6056 target_file = second
6061 if ( ! target_file )
6063 print input_file >>target_file
6070 for p in `echo $QMAKE_PROJECTS`; do
6071 echo "$p" >> .projects.all
6074 # if you get errors about the length of the command line to awk, change the -l arg
6076 split -l 100 .projects.all .projects.all.
6077 for p in .projects.all.*; do
6078 "$AWK" -f projects.awk `cat $p`
6079 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6080 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6081 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6082 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6084 rm -f .projects.all* projects.awk
6086 [ -f .projects.1 ] && cat .projects.1 >>.projects
6087 [ -f .projects.2 ] && cat .projects.2 >>.projects
6088 rm -f .projects.1 .projects.2
6089 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6090 cat .projects.3 >>.projects
6094 # don't sort Qt and MOC in with the other project files
6095 # also work around a segfaulting uniq(1)
6096 if [ -f .sorted.projects.2 ]; then
6097 sort .sorted.projects.2 > .sorted.projects.2.new
6098 mv -f .sorted.projects.2.new .sorted.projects.2
6099 cat .sorted.projects.2 >> .sorted.projects.1
6101 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6102 rm -f .sorted.projects.2 .sorted.projects.1
6106 if [ -f .projects ]; then
6107 uniq .projects >.tmp
6108 mv -f .tmp .projects
6109 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6111 if [ -f .projects.3 ]; then
6112 uniq .projects.3 >.tmp
6113 mv -f .tmp .projects.3
6114 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6116 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6120 for part in $CFG_BUILD_PARTS; do
6122 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6123 libs) PART_ROOTS="$PART_ROOTS src" ;;
6124 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6125 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6130 if [ "$CFG_DEV" = "yes" ]; then
6131 PART_ROOTS="$PART_ROOTS tests"
6134 echo "Creating makefiles. Please wait..."
6135 for file in .projects .projects.3; do
6136 [ '!' -f "$file" ] && continue
6137 for a in `cat $file`; do
6139 for r in $PART_ROOTS; do
6140 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6145 [ "$IN_ROOT" = "no" ] && continue
6148 *winmain/winmain.pro)
6149 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6153 */qmake/qmake.pro) continue ;;
6154 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*|*tools/qdbusxml2cpp*|*tools/qdbuscpp2xml*) SPEC=$QMAKESPEC ;;
6155 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6161 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6162 test -d "$dir" || mkdir -p "$dir"
6163 OUTDIR="$outpath/$dir"
6164 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6165 # fast configure - the makefile exists, skip it
6166 # since the makefile exists, it was generated by qmake, which means we
6167 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6169 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6172 QMAKE_SPEC_ARGS="-spec $SPEC"
6173 echo $ECHO_N " for $a$ECHO_C"
6175 QMAKE="$outpath/bin/qmake"
6176 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6177 if [ "$file" = ".projects.3" ]; then
6180 cat >"${OUTDIR}/Makefile" <<EOF
6181 # ${OUTDIR}/Makefile: generated by configure
6183 # WARNING: This makefile will be replaced with a real makefile.
6184 # All changes made to this file will be lost.
6186 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6188 cat >>"${OUTDIR}/Makefile" <<EOF
6190 all clean install qmake first Makefile: FORCE
6191 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6199 if [ "$OPT_VERBOSE" = "yes" ]; then
6200 echo " (`basename $SPEC`)"
6201 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6206 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6207 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6211 rm -f .projects .projects.3
6213 #-------------------------------------------------------------------------------
6214 # check for platforms that we don't yet know about
6215 #-------------------------------------------------------------------------------
6216 if [ "$CFG_ARCH" = "unknown" ]; then
6219 NOTICE: configure was unable to determine the architecture
6220 for the $XQMAKESPEC target.
6222 Qt will not use a specialized implementation for any atomic
6223 operations. Instead a generic implemention based on either GCC
6224 intrinsics or C++11 std::atomic<T> will be used (when
6225 available). The generic implementations are generally as fast
6226 as and always as safe as a specialized implementation.
6228 If no generic implementation is available, Qt will use a
6229 fallback UNIX implementation which uses a single
6230 pthread_mutex_t to protect all atomic operations. This
6231 implementation is the slow (but safe) fallback implementation
6232 for architectures Qt does not yet support.
6236 #-------------------------------------------------------------------------------
6237 # check if the user passed the -no-zlib option, which is no longer supported
6238 #-------------------------------------------------------------------------------
6239 if [ -n "$ZLIB_FORCED" ]; then
6240 which_zlib="supplied"
6241 if [ "$CFG_ZLIB" = "system" ]; then
6247 NOTICE: The -no-zlib option was supplied but is no longer
6250 Qt now requires zlib support in all builds, so the -no-zlib
6251 option was ignored. Qt will be built using the $which_zlib
6256 #-------------------------------------------------------------------------------
6257 # check if the user passed the obsoleted -wayland or -no-wayland flag
6258 #-------------------------------------------------------------------------------
6259 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6262 NOTICE: The -wayland and -no-wayland flags are now obsolete
6264 All configuring of QtWayland plugin and QtCompositor happens in the module
6268 #-------------------------------------------------------------------------------
6269 # check if the user passed the obsoleted -arch or -host-arch options
6270 #-------------------------------------------------------------------------------
6271 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6274 NOTICE: The -arch and -host-arch options are obsolete.
6276 Qt now detects the target and host architectures based on compiler
6277 output. Qt will be built using $CFG_ARCH for the target architecture
6278 and $CFG_HOST_ARCH for the host architecture (note that these two
6279 will be the same unless you are cross-compiling).
6283 #-------------------------------------------------------------------------------
6284 # finally save the executed command to another script
6285 #-------------------------------------------------------------------------------
6286 if [ `basename $0` != "config.status" ]; then
6287 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6289 # add the system variables
6290 for varname in $SYSTEM_VARIABLES; do
6292 'if [ -n "\$'${varname}'" ]; then
6293 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6298 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6300 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6301 echo "#!/bin/sh" > "$outpath/config.status"
6302 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6303 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6304 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6305 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6306 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6307 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6308 echo "else" >> "$outpath/config.status"
6309 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6310 echo "fi" >> "$outpath/config.status"
6311 chmod +x "$outpath/config.status"
6314 if [ -n "$RPATH_MESSAGE" ]; then
6316 echo "$RPATH_MESSAGE"
6319 MAKE=`basename "$MAKE"`
6321 echo Qt is now configured for building. Just run \'$MAKE\'.
6322 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6323 echo Once everything is built, Qt is installed.
6324 echo You should not run \'$MAKE install\'.
6326 echo Once everything is built, you must run \'$MAKE install\'.
6327 echo Qt will be installed into $QT_INSTALL_PREFIX
6330 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.