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"
126 *load\(device_config\)*)
127 conf_file="$DEVICE_VARS_FILE"
128 if [ ! -f "$conf_file" ]; then
129 echo "WARNING: Unable to find file $conf_file" >&2
132 getQMakeConf1 "$conf_file"
144 values["LITERAL_WHITESPACE"] = " "
145 values["LITERAL_DOLLAR"] = "$"
147 /^[_A-Z0-9.]+[ \t]*\+?=/ {
148 valStart = index($0, "=") + 1
151 if (substr($0, valStart - 2, 1) == "+") {
155 variable = substr($0, 0, valStart - 2 - append)
156 value = substr($0, valStart)
157 gsub("[ \t]+", "", variable)
158 gsub("^[ \t]+", "", value)
159 gsub("[ \t]+$", "", value)
162 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
163 ovalue = ovalue substr(value, 1, RSTART - 1)
164 var = substr(value, RSTART + 2, RLENGTH - 2)
165 value = substr(value, RSTART + RLENGTH)
167 var = substr(var, 2, length(var) - 2)
169 ovalue = ovalue values[var]
171 ovalue = ovalue value
173 combinedValue = values[variable]
174 if (append == 1 && length(combinedValue) > 0) {
175 combinedValue = combinedValue " " ovalue
177 combinedValue = ovalue
179 values[variable] = combinedValue
182 for (var in values) {
183 print var "=" values[var]
191 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
194 # relies on $QMAKESPEC being set correctly. parses include statements in
195 # qmake.conf and prints out the expanded file
198 if [ -z "$specvals" ]; then
199 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$specvals"
206 if [ -z "$xspecvals" ]; then
207 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
209 getQMakeConf3 "$1" "$xspecvals"
212 # relies on $TEST_COMPILER being set correctly
213 compilerSupportsFlag()
215 cat >conftest.cpp <<EOF
216 int main() { return 0; }
218 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
220 rm -f conftest.cpp conftest.o
224 # relies on $TEST_COMPILER being set correctly
230 safe_flag=`shellEscape "$flag"`
231 lflags=$lflags,$safe_flag
233 compilerSupportsFlag "$lflags" >/dev/null 2>&1
236 #-------------------------------------------------------------------------------
238 #-------------------------------------------------------------------------------
246 echo >&2 "BUG: wrong command to QMakeVar: $1"
250 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
253 resolveDeviceMkspec()
255 result=$(find "$relpath/mkspecs/devices/" -type d -name "*$VAL*" | sed "s,^$relpath/mkspecs/,,")
256 match_count=$(echo "$result" | wc -w)
257 if [ "$match_count" -gt 1 ]; then
258 echo >&2 "Error: Multiple matches for device '$VAL'. Candidates are:"
259 tabbed_result=$(echo "$result" | sed "s,^, ,")
260 echo >&2 "$tabbed_result"
262 elif [ "$match_count" -eq 0 ]; then
263 echo >&2 "Error: No device matching '$VAL'"
270 #-------------------------------------------------------------------------------
271 # operating system detection
272 #-------------------------------------------------------------------------------
274 # need that throughout the script
275 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
276 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
277 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
278 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
280 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
281 if echo '\c' | grep '\c' >/dev/null; then
287 #-------------------------------------------------------------------------------
288 # window system detection
289 #-------------------------------------------------------------------------------
293 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
298 #-----------------------------------------------------------------------------
299 # Qt version detection
300 #-----------------------------------------------------------------------------
301 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
305 if [ -n "$QT_VERSION" ]; then
306 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
307 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
308 if [ -n "$MAJOR" ]; then
309 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
310 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
311 QT_MAJOR_VERSION="$MAJOR"
312 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
313 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
316 if [ -z "$QT_MAJOR_VERSION" ]; then
317 echo "Cannot process version from qglobal.h: $QT_VERSION"
318 echo "Cannot proceed."
322 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
323 if [ -z "$QT_PACKAGEDATE" ]; then
324 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
325 echo "Cannot proceed"
329 #-------------------------------------------------------------------------------
331 #-------------------------------------------------------------------------------
335 EditionString=Commercial
339 # parse the arguments, setting things to "yes" or "no"
340 while [ "$#" -gt 0 ]; do
344 #Autoconf style options
346 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
350 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
354 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
355 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
358 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
361 -h|help|--help|-help)
362 if [ "$VAL" = "yes" ]; then
364 COMMERCIAL_USER="no" #doesn't matter we will display the help
367 COMMERCIAL_USER="no" #doesn't matter we will display the help
371 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
375 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
382 if [ "$UNKNOWN_ARG" = "yes" ]; then
394 COMMERCIAL_USER="yes"
408 if [ "$COMMERCIAL_USER" = "ask" ]; then
410 echo "Which edition of Qt do you want to use ?"
412 echo "Type 'c' if you want to use the Commercial Edition."
413 echo "Type 'o' if you want to use the Open Source Edition."
417 if [ "$commercial" = "c" ]; then
418 COMMERCIAL_USER="yes"
420 elif [ "$commercial" = "o" ]; then
427 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
428 # Commercial preview release
429 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
432 QT_EDITION="QT_EDITION_DESKTOP"
433 LicenseType="Technology Preview"
434 elif [ $COMMERCIAL_USER = "yes" ]; then
435 # one of commercial editions
436 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
438 # read in the license file
439 if [ -f "$LICENSE_FILE" ]; then
440 . "$LICENSE_FILE" >/dev/null 2>&1
441 if [ -z "$LicenseKeyExt" ]; then
443 echo "You are using an old license file."
445 echo "Please install the license file supplied by Nokia,"
446 echo "or install the Qt Open Source Edition if you intend to"
447 echo "develop free software."
450 if [ -z "$Licensee" ]; then
452 echo "Invalid license key. Please check the license key."
456 if [ -z "$LicenseKeyExt" ]; then
458 echo $ECHO_N "Please enter your license key: $ECHO_C"
460 Licensee="Unknown user"
465 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
466 && LicenseValid="yes" \
468 if [ "$LicenseValid" != "yes" ]; then
470 echo "Invalid license key. Please check the license key."
473 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
474 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
475 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
476 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
478 # determine which edition we are licensed to use
479 case "$LicenseTypeCode" in
481 LicenseType="Commercial"
485 QT_EDITION="QT_EDITION_UNIVERSAL"
488 Edition="FullFramework"
489 EditionString="Full Framework"
490 QT_EDITION="QT_EDITION_DESKTOP"
493 Edition="GUIFramework"
494 EditionString="GUI Framework"
495 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
500 LicenseType="Evaluation"
501 QMakeVar add DEFINES QT_EVAL
505 QT_EDITION="QT_EDITION_EVALUATION"
510 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
512 echo "Invalid license key. Please check the license key."
516 # verify that we are licensed to use Qt on this platform
518 case "$PlatformCode" in
521 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
525 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
528 ### EMBEDDED_QPA logic missing ###
529 case "$PlatformCode,$PLATFORM_MAC" in
530 X9,* | XC,* | XU,* | XW,* | XM,*)
532 LICENSE_EXTENSION="-ALLOS"
534 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
535 # Qt for Embedded Linux
536 LICENSE_EXTENSION="-EMBEDDED"
538 6M,* | N7,* | N9,* | NX,*)
540 LICENSE_EXTENSION="-EMBEDDED"
542 FM,* | LM,yes | ZM,no)
544 LICENSE_EXTENSION="-DESKTOP"
548 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
550 echo "You are not licensed for the $Platform platform."
552 echo "Please contact qt-info@nokia.com to upgrade your license to"
553 echo "include the $Platform platform, or install the Qt Open Source Edition"
554 echo "if you intend to develop free software."
559 if test -r "$relpath/.LICENSE"; then
560 # Generic, non-final license
562 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
567 *TECHNOLOGY?PREVIEW*)
574 echo >&2 "Invalid license files; cannot continue"
579 EditionString="$Edition"
580 QT_EDITION="QT_EDITION_DESKTOP"
583 case "$LicenseFeatureCode" in
586 case "$LicenseType" in
588 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
591 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
597 case "$LicenseType" in
599 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
602 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
608 echo "Invalid license key. Please check the license key."
612 case "$LicenseFeatureCode" in
620 if [ '!' -f "$outpath/LICENSE" ]; then
621 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
622 echo "this software has disappeared."
624 echo "Sorry, you are not licensed to use this software."
625 echo "Try re-installing."
629 elif [ $COMMERCIAL_USER = "no" ]; then
630 # Open Source edition - may only be used under the terms of the GPL or LGPL.
631 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
632 Licensee="Open Source"
634 EditionString="Open Source"
635 QT_EDITION="QT_EDITION_OPENSOURCE"
638 #-------------------------------------------------------------------------------
639 # initalize variables
640 #-------------------------------------------------------------------------------
642 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
643 for varname in $SYSTEM_VARIABLES; do
644 qmakevarname="${varname}"
645 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
646 if [ "${varname}" = "LDFLAGS" ]; then
647 qmakevarname="LFLAGS"
648 elif [ "${varname}" = "LD" ]; then
652 'if [ -n "\$'${varname}'" ]; then
653 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
657 # Use CC/CXX to run config.tests
658 mkdir -p "$outpath/config.tests"
659 rm -f "$outpath/config.tests/.qmake.cache"
660 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
662 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
664 # QTDIR may be set and point to an old or system-wide Qt installation
667 # the minimum version of libdbus-1 that we require:
668 MIN_DBUS_1_VERSION=0.93
670 # initalize internal variables
671 CFG_CONFIGURE_EXIT_ON_ERROR=yes
673 CFG_GUI=auto # (yes|no|auto)
699 CFG_OPENVG_LC_INCLUDES=no
700 CFG_OPENVG_SHIVA=auto
701 CFG_OPENVG_ON_OPENGL=auto
707 QT_DEFAULT_BUILD_PARTS="libs examples"
711 CFG_AUDIO_BACKEND=auto
714 CFG_JAVASCRIPTCORE_JIT=auto
717 # Target architecture
720 # Host architecture, same as CFG_ARCH when not cross-compiling
722 CFG_HOST_CPUFEATURES=
723 # Set when the -arch or -host-arch arguments are used
724 OPT_OBSOLETE_HOST_ARG=no
736 CFG_OBSOLETE_WAYLAND=no
748 CFG_SEPARATE_DEBUG_INFO=no
749 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
750 CFG_REDUCE_EXPORTS=auto
758 CFG_REDUCE_RELOCATIONS=auto
759 CFG_ACCESSIBILITY=auto
764 CFG_CLOCK_GETTIME=auto
765 CFG_CLOCK_MONOTONIC=auto
773 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
776 CFG_PREFIX_INSTALL=yes
786 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
787 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
791 OPT_CONFIRM_LICENSE=no
804 QPA_PLATFORM_GUARD=yes
806 # initalize variables used for installation
815 QT_INSTALL_TRANSLATIONS=
824 #flags for SQL drivers
832 QT_LFLAGS_ODBC="-lodbc"
835 # flags for libdbus-1
839 # flags for Glib (X11 only)
843 # flags for GStreamer (X11 only)
847 # default qpa platform
848 QT_QPA_DEFAULT_PLATFORM=
850 #-------------------------------------------------------------------------------
851 # check SQL drivers available in this package
852 #-------------------------------------------------------------------------------
854 # opensource version removes some drivers, so force them to be off
860 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
861 for a in "$relpath/src/plugins/sqldrivers/"*; do
863 base_a=`basename "$a"`
864 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
865 eval "CFG_SQL_${base_a}=auto"
870 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
871 if [ -d "$relpath/src/plugins/imageformats" ]; then
872 for a in "$relpath/src/plugins/imageformats/"*; do
874 base_a=`basename "$a"`
875 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
880 #-------------------------------------------------------------------------------
881 # parse command line arguments
882 #-------------------------------------------------------------------------------
884 # parse the arguments, setting things to "yes" or "no"
885 while [ "$#" -gt 0 ]; do
889 #Autoconf style options
891 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
895 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
899 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
900 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
903 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
907 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
911 -no-*-*|-plugin-*-*|-qt-*-*)
912 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
913 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
917 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
920 #Qt style yes options
921 -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|-directfb|-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|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-qml-debug|-javascript-jit|-rpath|-pkg-config|-force-pkg-config|-icu|-force-asserts|-testcocoon)
922 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
925 #Qt style options that pass an argument
928 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
932 -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|-qpa)
933 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
937 #Qt style complex options in one command
938 -enable-*|-disable-*)
939 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
940 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
942 #Qt Builtin/System style options
943 -no-*|-system-*|-qt-*)
944 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
945 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
947 #Options that cannot be generalized
954 # this option may or may not be followed by an argument
955 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
964 # this option may or may not be followed by an argument
965 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
973 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
974 # this option may or may not be followed by an argument
975 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
994 if [ "$1" = "-D" ]; then
998 VAL=`echo $1 | sed 's,-D,,'`
1003 # this option may or may not be followed by an argument
1004 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1013 if [ "$1" = "-I" ]; then
1017 VAL=`echo $1 | sed 's,-I,,'`
1022 if [ "$1" = "-L" ]; then
1026 VAL=`echo $1 | sed 's,-L,,'`
1031 if [ "$1" = "-R" ]; then
1035 VAL=`echo $1 | sed 's,-R,,'`
1040 if [ "$1" = "-l" ]; then
1044 VAL=`echo $1 | sed 's,-l,,'`
1049 if [ "$1" = "-F" ]; then
1053 VAL=`echo $1 | sed 's,-F,,'`
1058 if [ "$1" = "-fw" ]; then
1062 VAL=`echo $1 | sed 's,-fw,,'`
1070 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1077 if [ "$UNKNOWN_ARG" = "yes" ]; then
1078 echo "$1: unknown argument"
1089 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1090 CFG_ACCESSIBILITY="$VAL"
1099 CFG_USE_GNUMAKE="$VAL"
1102 CFG_MYSQL_CONFIG="$VAL"
1105 QT_INSTALL_PREFIX="$VAL"
1108 QT_HOST_PREFIX="$VAL"
1117 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1118 CFG_PKGCONFIG="$VAL"
1124 CFG_PKGCONFIG="force"
1127 QT_INSTALL_DOCS="$VAL"
1130 QT_INSTALL_HEADERS="$VAL"
1133 QT_INSTALL_PLUGINS="$VAL"
1136 QT_INSTALL_IMPORTS="$VAL"
1139 QT_INSTALL_DATA="$VAL"
1142 QT_INSTALL_LIBS="$VAL"
1151 QT_INSTALL_TRANSLATIONS="$VAL"
1153 sysconfdir|settingsdir)
1154 QT_INSTALL_SETTINGS="$VAL"
1157 QT_INSTALL_EXAMPLES="$VAL"
1160 QT_INSTALL_TESTS="$VAL"
1169 QT_INSTALL_BINS="$VAL"
1175 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1182 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1183 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1184 [ "$VAL" = "es2" ]; then
1191 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1198 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1201 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1204 if [ "$BUILD_ON_MAC" = "yes" ]; then
1211 OPT_OBSOLETE_HOST_ARG=yes
1214 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1215 CFG_MAC_HARFBUZZ="$VAL"
1222 if [ "$BUILD_ON_MAC" = "yes" ]; then
1223 CFG_FRAMEWORK="$VAL"
1229 if [ "$VAL" = "yes" ]; then
1231 QMakeVar add QMAKE_CFLAGS -pg
1232 QMakeVar add QMAKE_CXXFLAGS -pg
1233 QMakeVar add QMAKE_LFLAGS -pg
1234 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1240 if [ "$VAL" = "yes" ]; then
1241 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1246 # keep compatibility with old platform names
1252 PLATFORM=hpux-acc-o64
1255 PLATFORM=hpux-acc-64
1258 PLATFORM=hpux-acc-64
1270 PLATFORM=reliant-cds-64
1273 PLATFORM=solaris-cc-64
1276 PLATFORM=unixware-cc
1279 PLATFORM=unixware-g++
1282 PLATFORM=unixware-cc
1285 PLATFORM=unixware-g++
1291 i386) NATIVE_64_ARCH="x86_64" ;;
1292 powerpc) NATIVE_64_ARCH="ppc64" ;;
1293 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1295 if [ ! -z "$NATIVE_64_ARCH" ]; then
1296 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1303 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1306 XPLATFORM=`resolveDeviceMkspec $VAL`
1307 [ "$XPLATFORM" = "undefined" ] && exit 101
1310 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1311 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1312 DeviceVar set $DEV_VAR $DEV_VAL
1315 QT_QPA_DEFAULT_PLATFORM="$VAL"
1318 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1319 CFG_DEBUG_RELEASE="$VAL"
1325 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1326 CFG_RELEASE_QMAKE="$VAL"
1332 if [ "$VAL" = "yes" ]; then
1334 elif [ "$VAL" = "no" ]; then
1341 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1342 CFG_PREFIX_INSTALL="$VAL"
1350 developer-build|commercial|opensource)
1351 # These switches have been dealt with already
1354 if [ "$VAL" = "yes" ]; then
1356 elif [ "$VAL" = "no" ]; then
1363 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1364 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1370 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1371 if [ "$VAL" = "no" ]; then
1372 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1373 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1374 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1380 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1387 if [ "$VAL" = "no" ]; then
1394 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1402 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1409 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1416 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1423 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1430 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1437 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1444 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1451 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1452 CFG_PRECOMPILE="$VAL"
1457 separate-debug-info)
1458 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1459 CFG_SEPARATE_DEBUG_INFO="$VAL"
1460 elif [ "$VAL" = "nocopy" ] ; then
1461 CFG_SEPARATE_DEBUG_INFO="yes"
1462 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1468 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1469 CFG_REDUCE_EXPORTS="$VAL"
1475 if [ "$VAL" = "no" ]; then
1482 if [ "$VAL" = "no" ]; then
1489 if [ "$VAL" = "no" ]; then
1496 if [ "$VAL" = "no" ]; then
1503 if [ "$VAL" = "no" ]; then
1510 if [ "$VAL" = "no" ]; then
1517 if [ "$VAL" = "no" ]; then
1527 if [ "$VAL" = "no" ]; then
1534 if [ "$VAL" = "no" ]; then
1541 if [ "$VAL" = "no" ]; then
1542 CFG_MIPS_DSPR2="$VAL"
1548 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1549 CFG_REDUCE_RELOCATIONS="$VAL"
1555 [ "$VAL" = "qt" ] && VAL=yes
1556 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1561 # No longer supported:
1562 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1565 if [ "$VAL" = "system" ]; then
1572 [ "$VAL" = "yes" ] && VAL=qt
1573 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1580 [ "$VAL" = "yes" ] && VAL=qt
1581 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1588 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1595 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1602 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1609 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1616 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1623 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1624 CFG_FONTCONFIG="$VAL"
1630 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1637 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1644 CFG_OBSOLETE_WAYLAND=yes
1647 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1654 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1661 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1668 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1675 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1682 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1689 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1697 CFG_GSTREAMER="$VAL"
1703 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1704 CFG_QGTKSTYLE="$VAL"
1710 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1713 if [ "$VAL" = "no" ]; then
1721 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1723 elif [ "$VAL" = "no" ]; then
1730 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1731 QPA_PLATFORM_GUARD="$VAL"
1737 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1739 elif [ "$VAL" = "runtime" ]; then
1746 if [ "$VAL" = "yes" ]; then
1753 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1760 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1761 CFG_LARGEFILE="$VAL"
1767 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1774 if [ "$VAL" = "yes" ]; then
1775 CFG_OPENSSL="linked"
1781 if [ "$VAL" = "yes" ]; then
1784 if [ "$VAL" = "no" ]; then
1792 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1793 CFG_JAVASCRIPTCORE_JIT="$VAL"
1799 if [ "$VAL" = "yes" ]; then
1800 OPT_CONFIRM_LICENSE="$VAL"
1806 if [ "$VAL" = "yes" ]; then
1812 sql-*|imageformat-*)
1813 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1814 # if autoconf style options were used, $VAL can be "yes" or "no"
1815 [ "$VAL" = "yes" ] && VAL=qt
1816 # now $VAL should be "no", "qt", or "plugin"... double-check
1817 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1820 # now $VAL is "no", "qt", or "plugin"
1822 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1823 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1825 # Grab the available values
1828 avail="$CFG_SQL_AVAILABLE"
1831 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1832 if [ "$OPT" != "plugin" ]; then
1833 # png is always built in
1839 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1843 # Check that that user's value is available.
1846 if [ "$VAL" = "$d" ]; then
1851 [ "$found" = yes ] || ERROR=yes
1853 if [ "$VAR" = "sql" ]; then
1854 # set the CFG_SQL_driver
1855 eval "CFG_SQL_$VAL=\$OPT"
1857 elif [ "$VAR" = "imageformat" ]; then
1858 [ "$OPT" = "qt" ] && OPT=yes
1859 VAL="`echo $VAL |tr a-z A-Z`"
1860 eval "CFG_$VAL=$OPT"
1864 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1865 if [ "$OPT" = "plugin" ]; then
1868 QMakeVar add "${VAR}s" "${VAL}"
1869 elif [ "$OPT" = "no" ]; then
1870 PLUG_VAR="${VAR}-plugin"
1872 QMakeVar del "${IN_VAR}s" "$VAL"
1873 QMakeVar del "${PLUG_VAR}s" "$VAL"
1875 if [ "$ERROR" = "yes" ]; then
1876 echo "$CURRENT_OPT: unknown argument"
1881 if [ "$VAL" = "yes" ]; then
1882 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1883 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1887 elif [ "$VAL" = "no" ]; then
1888 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1889 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1898 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1905 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1912 DEFINES="$DEFINES \"$VAL\""
1913 D_FLAGS="$D_FLAGS -D\"$VAL\""
1916 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1919 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1922 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1925 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1928 if [ "$BUILD_ON_MAC" = "yes" ]; then
1929 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1930 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1936 if [ "$BUILD_ON_MAC" = "yes" ]; then
1937 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1943 W_FLAGS="$W_FLAGS \"${VAL}\""
1949 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1950 CFG_PHONON_BACKEND="$VAL"
1962 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1963 CFG_AUDIO_BACKEND="$VAL"
1969 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1976 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1977 CFG_FORCE_ASSERTS="$VAL"
1983 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1993 if [ "$UNKNOWN_OPT" = "yes" ]; then
1994 echo "${CURRENT_OPT}: invalid command-line switch"
2000 # update QT_CONFIG to show our current predefined configuration
2001 case "$CFG_QCONFIG" in
2002 minimal|small|medium|large|full)
2003 # these are a sequence of increasing functionality
2004 for c in minimal small medium large full; do
2005 QT_CONFIG="$QT_CONFIG $c-config"
2006 [ "$CFG_QCONFIG" = $c ] && break
2010 # not known to be sufficient for anything
2011 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2012 echo >&2 "Error: configuration file not found:"
2013 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2015 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2020 #-------------------------------------------------------------------------------
2021 # build tree initialization
2022 #-------------------------------------------------------------------------------
2024 # where to find which..
2025 unixtests="$relpath/config.tests/unix"
2026 mactests="$relpath/config.tests/mac"
2027 WHICH="$unixtests/which.test"
2029 PERL=`$WHICH perl 2>/dev/null`
2031 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2033 for e in gawk nawk awk; do
2034 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2041 PERL="/usr/bin/perl"
2042 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2046 ### skip this if the user just needs help...
2047 if [ "$OPT_HELP" != "yes" ]; then
2049 # is this a shadow build?
2050 if [ "$OPT_SHADOW" = "maybe" ]; then
2052 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2053 if [ -h "$outpath" ]; then
2054 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2060 if [ "$OPT_SHADOW" = "yes" ]; then
2061 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2062 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2063 echo >&2 "Cannot proceed."
2066 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2069 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2071 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2072 echo "Qt can be built in release mode with separate debug information, so"
2073 echo "-debug-and-release is not necessary anymore"
2077 if [ "$CFG_SILENT" = "yes" ]; then
2078 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2081 # if the source tree is different from the build tree,
2082 # symlink or copy part of the sources
2083 if [ "$OPT_SHADOW" = "yes" ]; then
2084 echo "Preparing build tree..."
2086 if [ -z "$PERL" ]; then
2088 echo "You need perl in your PATH to make a shadow build."
2089 echo "Cannot proceed."
2093 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2095 # make a syncqt script that can be used in the shadow
2096 rm -f "$outpath/bin/syncqt"
2097 if [ -x "$relpath/bin/syncqt" ]; then
2098 mkdir -p "$outpath/bin"
2099 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2100 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2101 chmod 755 "$outpath/bin/syncqt"
2104 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2105 rm -f "$outpath/bin/$i"
2106 if [ -x "$relpath/bin/$i" ]; then
2107 mkdir -p "$outpath/bin"
2108 echo "#!/bin/sh" >"$outpath/bin/$i"
2109 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2110 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2111 chmod 755 "$outpath/bin/$i"
2115 # save a pre-existing mkspecs/modules dir
2116 test -d "$outpath/mkspecs/modules" && \
2117 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2119 # symlink the mkspecs directory
2120 mkdir -p "$outpath/mkspecs"
2121 rm -rf "$outpath"/mkspecs/*
2122 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2123 rm -f "$outpath/mkspecs/default"
2127 rm -rf "$outpath/mkspecs/$1"
2128 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2129 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2132 # Special case for mkspecs/features directory.
2133 # To be able to place .prf files into a shadow build directory,
2134 # we're creating links for files only. The directory structure is reproduced.
2135 ShadowMkspecs features
2137 # The modules dir is special, too.
2138 if test -d "$outpath/mkspecs-modules"; then
2139 rm -rf "$outpath/mkspecs/modules"
2140 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2142 ShadowMkspecs modules
2145 # symlink the doc directory
2146 rm -rf "$outpath/doc"
2147 ln -s "$relpath/doc" "$outpath/doc"
2150 # symlink fonts to be able to run application from build directory
2151 if [ ! -d "${outpath}/lib/fonts" ]; then
2152 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2153 mkdir -p "${outpath}/lib"
2154 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2158 if [ "$OPT_FAST" = "auto" ]; then
2159 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2166 # find a make command
2167 if [ -z "$MAKE" ]; then
2169 for mk in gmake make; do
2170 if "$WHICH" $mk >/dev/null 2>&1; then
2175 if [ -z "$MAKE" ]; then
2176 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2177 echo >&2 "Cannot proceed."
2180 # export MAKE, we need it later in the config.tests
2186 #-------------------------------------------------------------------------------
2187 # auto-detect all that hasn't been specified in the arguments
2188 #-------------------------------------------------------------------------------
2190 if [ -z "$PLATFORM" ]; then
2192 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2194 OSX_VERSION=`uname -r | cut -d. -f1`
2195 # Select compiler. Use g++ unless we find a usable Clang version
2197 if [ "$OSX_VERSION" -ge 12 ]; then
2198 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2200 elif [ "$OSX_VERSION" -eq 11 ]; then
2201 # We're on Lion. Check if we have a supported Clang version
2202 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2205 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2212 #PLATFORM=aix-g++-64
2214 #PLATFORM=aix-xlc-64
2216 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2226 # PLATFORM=dynix-g++
2232 PLATFORM=freebsd-g++
2234 - Also available for FreeBSD: freebsd-icc
2238 PLATFORM=openbsd-g++
2249 #PLATFORM=irix-cc-64
2251 - Also available for IRIX: irix-g++ irix-cc-64
2255 case "$UNAME_MACHINE" in
2257 #PLATFORM=hpuxi-acc-32
2258 PLATFORM=hpuxi-acc-64
2260 - Also available for HP-UXi: hpuxi-acc-32
2266 #PLATFORM=hpux-acc-64
2268 #PLATFORM=hpux-acc-o64
2270 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2279 - Also available for Tru64: tru64-g++
2283 case "$UNAME_MACHINE" in
2285 PLATFORM=linux-g++-64
2292 - Also available for Linux: linux-kcc linux-icc linux-cxx
2296 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2297 PLATFORM="solaris-g++"
2299 #PLATFORM=solaris-g++
2301 #PLATFORM=solaris-cc64
2304 - Also available for Solaris: solaris-g++ solaris-cc-64
2307 ReliantUNIX-*:*|SINIX-*:*)
2308 PLATFORM=reliant-cds
2309 #PLATFORM=reliant-cds-64
2311 - Also available for Reliant UNIX: reliant-cds-64
2321 #PLATFORM=unixware-g++
2322 PLATFORM=unixware-cc
2324 - Also available for OpenUNIX: unixware-g++
2328 #PLATFORM=unixware-g++
2329 PLATFORM=unixware-cc
2331 - Also available for UnixWare: unixware-g++
2338 - Also available for SCO OpenServer: sco-g++
2342 PLATFORM=unixware-g++
2345 PLATFORM=unsupported/qnx-g++
2348 if [ "$OPT_HELP" != "yes" ]; then
2350 for p in $PLATFORMS; do
2351 echo " $relconf $* -platform $p"
2354 echo " The build script does not currently recognize all" >&2
2355 echo " platforms supported by Qt." >&2
2356 echo " Rerun this script with a -platform option listed to" >&2
2357 echo " set the system/compiler combination you use." >&2
2364 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2366 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2368 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2369 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2370 case "$XPLATFORM" in qnx-*) XPLATFORM_QNX=yes;; esac
2372 if [ -d "$PLATFORM" ]; then
2373 QMAKESPEC="$PLATFORM"
2375 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2377 if [ -d "$XPLATFORM" ]; then
2378 XQMAKESPEC="$XPLATFORM"
2380 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2382 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2383 QT_CROSS_COMPILE=yes
2384 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2385 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2388 if [ "$BUILD_ON_MAC" = "yes" ]; then
2389 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2391 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2392 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2393 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2394 echo " built with 'macx-g++'" >&2
2400 # check specified platforms are supported
2401 if [ '!' -d "$QMAKESPEC" ]; then
2403 echo " The specified system/compiler is not supported:"
2407 echo " Please see the README file for a complete list."
2411 if [ '!' -d "$XQMAKESPEC" ]; then
2413 echo " The specified system/compiler is not supported:"
2417 echo " Please see the README file for a complete list."
2421 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2423 echo " The specified system/compiler port is not complete:"
2425 echo " $XQMAKESPEC/qplatformdefs.h"
2427 echo " Please contact qt-info@nokia.com."
2432 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2433 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2434 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2435 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2436 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2440 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2441 case `basename "$XPLATFORM"` in
2444 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2446 echo "Please contact qt-info@nokia.com to upgrade your license to"
2447 echo "include this platform, or install the Qt Open Source Edition"
2448 echo "if you intend to develop free software."
2454 #-------------------------------------------------------------------------------
2455 # tests that don't need qmake (must be run before displaying help)
2456 #-------------------------------------------------------------------------------
2458 # detect build style
2459 if [ "$CFG_DEBUG" = "auto" ]; then
2460 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2461 CFG_DEBUG_RELEASE=yes
2463 elif [ "$CFG_DEV" = "yes" ]; then
2464 CFG_DEBUG_RELEASE=no
2467 CFG_DEBUG_RELEASE=no
2471 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2472 QT_CONFIG="$QT_CONFIG build_all"
2475 # pass on $CFG_SDK to the configure tests.
2476 if [ '!' -z "$CFG_SDK" ]; then
2477 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2480 # find the default framework value
2481 if [ "$BUILD_ON_MAC" = "yes" ]; then
2482 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2483 CFG_FRAMEWORK="$CFG_SHARED"
2484 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2486 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2494 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2496 TEST_COMPILER=$QMAKE_CONF_COMPILER
2497 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2498 if [ -z "$TEST_COMPILER" ]; then
2499 echo "ERROR: Cannot set the compiler for the configuration tests"
2505 case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
2506 if [ -n "$GCC_MACHINE_DUMP" ]; then
2507 DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
2510 if [ -n "$CFG_SYSROOT" ]; then
2511 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2515 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2517 # auto-detect precompiled header support
2518 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2519 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2526 # auto-detect support for separate debug info in objcopy
2527 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2528 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2529 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2530 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2531 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2532 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2533 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2534 CFG_SEPARATE_DEBUG_INFO=no
2538 # binutils on HP-UX is buggy; default to no.
2539 CFG_SEPARATE_DEBUG_INFO=no
2542 CFG_SEPARATE_DEBUG_INFO=yes
2548 # auto-detect -fvisibility support
2549 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2550 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2551 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2552 echo "-reduce-exports was requested but this compiler does not support it"
2553 echo "Re-run configure with -v for more information"
2556 CFG_REDUCE_EXPORTS=no
2558 CFG_REDUCE_EXPORTS=yes
2562 # detect the availability of the -Bsymbolic-functions linker optimization
2563 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2564 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2565 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2566 echo "-reduce-relocations was requested but this compiler does not support it"
2567 echo "Re-run configure with -v for more information"
2570 CFG_REDUCE_RELOCATIONS=no
2572 CFG_REDUCE_RELOCATIONS=yes
2576 # auto-detect GNU make support
2577 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2581 # find the default framework value
2582 if [ "$BUILD_ON_MAC" = "yes" ]; then
2583 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2584 CFG_FRAMEWORK="$CFG_SHARED"
2585 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2587 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2595 #setup the build parts
2596 if [ -z "$CFG_BUILD_PARTS" ]; then
2597 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2599 # build tests by default, if a developer build
2600 if [ "$CFG_DEV" = "yes" ]; then
2601 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2604 # don't build tools by default when cross-compiling
2605 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2606 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2609 for nobuild in $CFG_NOBUILD_PARTS; do
2610 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2612 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2614 # echo "WARNING: libs is a required part of the build."
2616 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2619 #-------------------------------------------------------------------------------
2620 # post process QT_INSTALL_* variables
2621 #-------------------------------------------------------------------------------
2623 if [ -z "$QT_INSTALL_PREFIX" ]; then
2624 if [ "$CFG_DEV" = "yes" ]; then
2625 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2627 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2630 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2632 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2633 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2634 if [ "$BUILD_ON_MAC" = "yes" ]; then
2635 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2638 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2641 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2643 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2644 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2645 if [ "$BUILD_ON_MAC" = "yes" ]; then
2646 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2651 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2654 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2656 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2657 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2658 if [ "$BUILD_ON_MAC" = "yes" ]; then
2659 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2660 QT_INSTALL_LIBS="/Libraries/Frameworks"
2664 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2666 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2668 if [ -z "$QT_INSTALL_BINS" ]; then #default
2669 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2670 if [ "$BUILD_ON_MAC" = "yes" ]; then
2671 QT_INSTALL_BINS="/Developer/Applications/Qt"
2674 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2676 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2678 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2679 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2680 if [ "$BUILD_ON_MAC" = "yes" ]; then
2681 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2684 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2686 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2688 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2689 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2690 if [ "$BUILD_ON_MAC" = "yes" ]; then
2691 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2694 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2696 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2698 if [ -z "$QT_INSTALL_DATA" ]; then #default
2699 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2701 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2703 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2704 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2706 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2708 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2709 if [ "$BUILD_ON_MAC" = "yes" ]; then
2710 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2712 QT_INSTALL_SETTINGS=/etc/xdg
2715 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2717 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2718 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2719 if [ "$BUILD_ON_MAC" = "yes" ]; then
2720 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2723 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2725 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2728 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2729 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2730 if [ "$BUILD_ON_MAC" = "yes" ]; then
2731 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2734 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2736 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2738 #------- host paths --------
2740 if [ -z "$QT_HOST_PREFIX" ]; then
2741 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2744 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2748 if [ -z "$QT_HOST_BINS" ]; then #default
2750 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2751 if [ "$BUILD_ON_MAC" = "yes" ]; then
2752 QT_HOST_BINS="/Developer/Applications/Qt"
2755 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2757 QT_HOST_BINS="$QT_INSTALL_BINS"
2760 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2762 if [ -z "$QT_HOST_DATA" ]; then #default
2764 QT_HOST_DATA="$QT_HOST_PREFIX"
2766 QT_HOST_DATA="$QT_INSTALL_DATA"
2769 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2772 #-------------------------------------------------------------------------------
2773 # help - interactive parts of the script _after_ this section please
2774 #-------------------------------------------------------------------------------
2776 # next, emit a usage message if something failed.
2777 if [ "$OPT_HELP" = "yes" ]; then
2778 [ "x$ERROR" = "xyes" ] && echo
2779 if [ "$CFG_NIS" = "no" ]; then
2786 if [ "$CFG_CUPS" = "no" ]; then
2793 if [ "$CFG_ICONV" = "no" ]; then
2800 if [ "$CFG_LARGEFILE" = "no" ]; then
2807 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2815 if [ "$CFG_XCB" = "no" ]; then
2823 if [ "$CFG_EGLFS" = "no" ]; then
2831 if [ "$CFG_DIRECTFB" = "no" ]; then
2838 if [ "$CFG_XINPUT2" = "no" ]; then
2846 if [ "$CFG_DBUS" = "no" ]; then
2854 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2862 if [ "$CFG_GLIB" = "no" ]; then
2871 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2872 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2873 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2874 [-release] [-debug] [-debug-and-release]
2875 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2876 [-largefile] [-no-accessibility] [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2877 [-plugin-sql-<driver>] [-system-sqlite]
2878 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2879 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2880 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2881 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2882 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2883 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2884 [-no-separate-debug-info] [-no-sse2]
2885 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2886 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2887 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2888 [-no-audio-backend] [-audio-backend]
2889 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2890 [-no-optimized-qmake] [-optimized-qmake]
2891 [-no-openssl] [-openssl] [-openssl-linked]
2892 [-no-gtkstyle] [-gtkstyle]
2893 [-qt-pcre] [-system-pcre]
2894 [-device <name>] [-device-option <key=value>]
2895 [additional platform specific options (see below)]
2898 Installation options:
2900 These are optional, but you may specify install directories.
2902 -prefix <dir> ...... This will install everything relative to <dir>
2903 (default $QT_INSTALL_PREFIX)
2905 -hostprefix [dir] .. Tools and libraries needed when developing
2906 applications are installed in [dir]. If [dir] is
2907 not given, the current build directory will be used.
2910 * -prefix-install .... Force a sandboxed "local" installation of
2911 Qt. This will install into
2912 $QT_INSTALL_PREFIX, if this option is
2913 disabled then some platforms will attempt a
2914 "system" install by placing default values to
2915 be placed in a system location other than
2918 You may use these to separate different parts of the install:
2920 -bindir <dir> ......... Executables will be installed to <dir>
2921 (default PREFIX/bin)
2922 -libdir <dir> ......... Libraries will be installed to <dir>
2923 (default PREFIX/lib)
2924 -docdir <dir> ......... Documentation will be installed to <dir>
2925 (default PREFIX/doc)
2926 -headerdir <dir> ...... Headers will be installed to <dir>
2927 (default PREFIX/include)
2928 -plugindir <dir> ...... Plugins will be installed to <dir>
2929 (default PREFIX/plugins)
2930 -importdir <dir> ...... Imports for QML will be installed to <dir>
2931 (default PREFIX/imports)
2932 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2934 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2935 (default PREFIX/translations)
2936 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2937 (default PREFIX/etc/settings)
2938 -examplesdir <dir> .... Examples will be installed to <dir>
2939 (default PREFIX/examples)
2940 -testsdir <dir> ....... Tests will be installed to <dir>
2941 (default PREFIX/tests)
2943 -hostbindir <dir> .. Host executables will be installed to <dir>
2944 (default HOSTPREFIX/bin)
2945 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2946 (default HOSTPREFIX)
2950 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2951 that needs to be evaluated. If the evaluation succeeds, the feature is
2952 included. Here is a short explanation of each option:
2954 * -release ........... Compile and link Qt with debugging turned off.
2955 -debug ............. Compile and link Qt with debugging turned on.
2956 -debug-and-release . Compile and link two versions of Qt, with and without
2957 debugging turned on (Mac only).
2959 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2961 -opensource ........ Compile and link the Open-Source Edition of Qt.
2962 -commercial ........ Compile and link the Commercial Edition of Qt.
2965 * -shared ............ Create and use shared Qt libraries.
2966 -static ............ Create and use static Qt libraries.
2968 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2970 -fast .............. Configure Qt quickly by generating Makefiles only for
2971 library and subdirectory targets. All other Makefiles
2972 are created as wrappers, which will in turn run qmake.
2974 -no-largefile ...... Disables large file support.
2975 + -largefile ......... Enables Qt to access files larger than 4 GB.
2977 -no-accessibility .. Do not compile Accessibility support.
2978 * -accessibility ..... Compile Accessibility support.
2980 -no-sql-<driver> ... Disable SQL <driver> entirely.
2981 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2983 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2986 Possible values for <driver>:
2987 [ $CFG_SQL_AVAILABLE ]
2989 -system-sqlite ..... Use sqlite from the operating system.
2991 -no-phonon-backend.. Do not build the platform phonon plugin.
2992 + -phonon-backend..... Build the platform phonon plugin.
2994 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
2995 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
2997 -no-qml-debug ...... Do not build the in-process QML debugging support.
2998 + -qml-debug ......... Build the QML debugging support.
3000 -platform target ... The operating system and compiler you are building
3003 See the README file for a list of supported
3004 operating systems and compilers.
3006 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3007 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3008 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3009 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3010 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3011 -no-avx ............ Do not compile with use of AVX instructions.
3012 -no-avx2 ........... Do not compile with use of AVX2 instructions.
3013 -no-neon ........... Do not compile with use of NEON instructions.
3014 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
3015 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
3017 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3018 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3020 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3022 -D <string> ........ Add an explicit define to the preprocessor.
3023 -I <string> ........ Add an explicit include path.
3024 -L <string> ........ Add an explicit library path.
3026 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
3027 configure determines whether to use pkg-config or not with
3028 some heuristics such as checking the environment variables.
3029 -no-pkg-config ..... Disable use of pkg-config.
3030 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
3031 detection heuristic).
3033 -help, -h .......... Display this information.
3035 Third Party Libraries:
3037 -qt-zlib ........... Use the zlib bundled with Qt.
3038 + -system-zlib ....... Use zlib from the operating system.
3039 See http://www.gzip.org/zlib
3041 -no-gif ............ Do not compile GIF reading support.
3043 -no-libpng ......... Do not compile PNG support.
3044 -qt-libpng ......... Use the libpng bundled with Qt.
3045 + -system-libpng ..... Use libpng from the operating system.
3046 See http://www.libpng.org/pub/png
3048 -no-libjpeg ........ Do not compile JPEG support.
3049 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3050 + -system-libjpeg .... Use libjpeg from the operating system.
3051 See http://www.ijg.org
3053 -no-openssl ........ Do not compile support for OpenSSL.
3054 + -openssl ........... Enable run-time OpenSSL support.
3055 -openssl-linked .... Enabled linked OpenSSL support.
3057 -qt-pcre ........... Use the PCRE library bundled with Qt.
3058 + -system-pcre ....... Use the PCRE library from the operating system.
3062 -make <part> ....... Add part to the list of parts to be built at make time.
3063 ($QT_DEFAULT_BUILD_PARTS)
3064 -nomake <part> ..... Exclude part from the list of parts to be built.
3066 -R <string> ........ Add an explicit runtime library path to the Qt
3068 -l <string> ........ Add an explicit library.
3070 -no-rpath .......... Do not use the library install path as a runtime
3072 + -rpath ............. Link Qt libraries and executables using the library
3073 install path as a runtime library path. Equivalent
3074 to -R install_libpath
3076 -continue .......... Continue as far as possible if an error occurs.
3078 -verbose, -v ....... Print verbose information about each step of the
3081 -silent ............ Reduce the build output so that warnings and errors
3082 can be seen more easily.
3084 * -no-optimized-qmake ... Do not build qmake optimized.
3085 -optimized-qmake ...... Build qmake optimized.
3087 -no-gui ............ Don't build the Qt GUI library
3089 $NSN -no-nis ............ Do not compile NIS support.
3090 $NSY -nis ............... Compile NIS support.
3092 $CUN -no-cups ........... Do not compile CUPS support.
3093 $CUY -cups .............. Compile CUPS support.
3094 Requires cups/cups.h and libcups.so.2.
3096 $CIN -no-iconv .......... Do not compile support for iconv(3).
3097 $CIY -iconv ............. Compile support for iconv(3).
3099 $PHN -no-pch ............ Do not use precompiled header support.
3100 $PHY -pch ............... Use precompiled header support.
3102 $DBN -no-dbus ........... Do not compile the QtDBus module.
3103 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3104 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3106 -reduce-relocations ..... Reduce relocations in the libraries through extra
3107 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3108 experimental; needs GNU ld >= 2.18).
3110 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3112 -device <name> ............... Cross-compile for device <name> (experimental)
3113 -device-option <key=value> ... Add device specific options for the device mkspec
3116 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3117 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3119 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3120 $XCBY -xcb ............... Compile Xcb support.
3122 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3123 $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
3125 $DFBN -no-directfb ....... Do not compile DirectFB support.
3126 $DFBY -directfb .......... Compile DirectFB support.
3128 -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
3130 -xplatform target ... The target platform when cross-compiling.
3132 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3134 -no-feature-<feature> Do not compile in <feature>.
3135 -feature-<feature> .. Compile in <feature>. The available features
3136 are described in src/corelib/global/qfeatures.txt
3138 -no-freetype ........ Do not compile in Freetype2 support.
3139 -qt-freetype ........ Use the libfreetype bundled with Qt.
3140 * -system-freetype .... Use libfreetype from the operating system.
3141 See http://www.freetype.org/
3143 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3144 default ($CFG_QCONFIG).
3146 -no-opengl .......... Do not support OpenGL.
3147 -opengl <api> ....... Enable OpenGL support
3148 With no parameter, this will attempt to auto-detect
3149 OpenGL ES 2, or regular desktop OpenGL.
3150 Use es2 for <api> to override auto-detection.
3152 $GBN -no-glib ........... Do not compile Glib support.
3153 $GBY -glib .............. Compile Glib support.
3156 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3159 $X2N -no-xinput2......... Do not compile XInput2 support.
3160 $X2Y -xinput2............ Compile XInput2 support.
3166 if [ "$BUILD_ON_MAC" = "yes" ]; then
3171 -Fstring ........... Add an explicit framework path.
3172 -fw string ......... Add an explicit framework.
3174 * -framework ......... Build Qt as a series of frameworks and
3175 link tools against those frameworks.
3176 -no-framework ...... Do not build Qt as a series of frameworks.
3178 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3179 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3181 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3182 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3183 QT_ENABLE_HARFBUZZ environment variable.
3188 [ "x$ERROR" = "xyes" ] && exit 1
3193 # -----------------------------------------------------------------------------
3194 # LICENSING, INTERACTIVE PART
3195 # -----------------------------------------------------------------------------
3198 echo "This is the Qt ${EditionString} Edition."
3201 if [ "$Edition" = "OpenSource" ]; then
3203 echo "You are licensed to use this software under the terms of"
3204 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3205 if [ -f "$relpath/LICENSE.GPL3" ]; then
3206 echo "You are also licensed to use this software under the terms of"
3207 echo "the GNU General Public License (GPL) versions 3."
3213 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3214 echo "You have already accepted the terms of the $LicenseType license."
3217 if [ -f "$relpath/LICENSE.GPL3" ]; then
3218 echo "Type '3' to view the GNU General Public License version 3."
3220 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3221 echo "Type 'yes' to accept this license offer."
3222 echo "Type 'no' to decline this license offer."
3224 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3228 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3230 elif [ "$acceptance" = "no" ]; then
3231 echo "You are not licensed to use this software."
3234 elif [ "$acceptance" = "3" ]; then
3235 more "$relpath/LICENSE.GPL3"
3236 elif [ "$acceptance" = "L" ]; then
3237 more "$relpath/LICENSE.LGPL"
3240 elif [ "$Edition" = "Preview" ]; then
3241 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3244 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3245 echo "You have already accepted the terms of the $LicenseType license."
3248 echo "You are licensed to use this software under the terms of"
3249 echo "the $TheLicense"
3251 echo "Type '?' to read the Preview License."
3252 echo "Type 'yes' to accept this license offer."
3253 echo "Type 'no' to decline this license offer."
3255 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3259 if [ "$acceptance" = "yes" ]; then
3261 elif [ "$acceptance" = "no" ] ;then
3262 echo "You are not licensed to use this software."
3265 elif [ "$acceptance" = "?" ]; then
3266 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3269 elif [ "$Edition" != "OpenSource" ]; then
3270 if [ -n "$ExpiryDate" ]; then
3271 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3272 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3273 Today=`date +%Y%m%d`
3274 if [ "$Today" -gt "$ExpiryDate" ]; then
3275 case "$LicenseType" in
3276 Commercial|Academic|Educational)
3277 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3279 echo "NOTICE NOTICE NOTICE NOTICE"
3281 echo " Your support and upgrade period has expired."
3283 echo " You are no longer licensed to use this version of Qt."
3284 echo " Please contact qt-info@nokia.com to renew your support"
3285 echo " and upgrades for this license."
3287 echo "NOTICE NOTICE NOTICE NOTICE"
3292 echo "WARNING WARNING WARNING WARNING"
3294 echo " Your support and upgrade period has expired."
3296 echo " You may continue to use your last licensed release"
3297 echo " of Qt under the terms of your existing license"
3298 echo " agreement. But you are not entitled to technical"
3299 echo " support, nor are you entitled to use any more recent"
3300 echo " Qt releases."
3302 echo " Please contact qt-info@nokia.com to renew your"
3303 echo " support and upgrades for this license."
3305 echo "WARNING WARNING WARNING WARNING"
3312 echo "NOTICE NOTICE NOTICE NOTICE"
3314 echo " Your Evaluation license has expired."
3316 echo " You are no longer licensed to use this software. Please"
3317 echo " contact qt-info@nokia.com to purchase license, or install"
3318 echo " the Qt Open Source Edition if you intend to develop free"
3321 echo "NOTICE NOTICE NOTICE NOTICE"
3328 TheLicense=`head -n 1 "$outpath/LICENSE"`
3330 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3331 echo "You have already accepted the terms of the $TheLicense."
3334 echo "You are licensed to use this software under the terms of"
3335 echo "the $TheLicense."
3337 echo "Type '?' to view the $TheLicense."
3338 echo "Type 'yes' to accept this license offer."
3339 echo "Type 'no' to decline this license offer."
3341 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3345 if [ "$acceptance" = "yes" ]; then
3347 elif [ "$acceptance" = "no" ]; then
3348 echo "You are not licensed to use this software."
3351 else [ "$acceptance" = "?" ]
3352 more "$outpath/LICENSE"
3357 # this should be moved somewhere else
3360 AIX_VERSION=`uname -v`
3361 if [ "$AIX_VERSION" -lt "5" ]; then
3362 QMakeVar add QMAKE_LIBS_X11 -lbind
3369 #-------------------------------------------------------------------------------
3370 # generate qconfig.cpp
3371 #-------------------------------------------------------------------------------
3372 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3374 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3376 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3377 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3379 /* Installation date */
3380 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3382 /* Installation Info */
3383 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3384 "qt_prfxpath=$QT_INSTALL_PREFIX",
3385 "qt_docspath=$QT_INSTALL_DOCS",
3386 "qt_hdrspath=$QT_INSTALL_HEADERS",
3387 "qt_libspath=$QT_INSTALL_LIBS",
3388 "qt_binspath=$QT_INSTALL_BINS",
3389 "qt_plugpath=$QT_INSTALL_PLUGINS",
3390 "qt_impspath=$QT_INSTALL_IMPORTS",
3391 "qt_datapath=$QT_INSTALL_DATA",
3392 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3393 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3394 "qt_tstspath=$QT_INSTALL_TESTS",
3395 #ifdef QT_BUILD_QMAKE
3396 "qt_ssrtpath=$CFG_SYSROOT",
3397 "qt_hpfxpath=$QT_HOST_PREFIX",
3398 "qt_hbinpath=$QT_HOST_BINS",
3399 "qt_hdatpath=$QT_HOST_DATA",
3402 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3405 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3407 /* strlen( "qt_lcnsxxxx" ) == 12 */
3408 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3409 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3411 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3414 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3415 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3416 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3418 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3419 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3420 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3423 # -----------------------------------------------------------------------------
3424 if [ "$LicenseType" = "Evaluation" ]; then
3425 EVALKEY=qt_qevalkey=$LicenseKeyExt
3426 elif echo "$DEFINES" | grep QT_EVAL >/dev/null 2>&1; then
3427 EVALKEY=qt_qevalkey=
3430 if [ -n "$EVALKEY" ]; then
3431 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3432 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3433 /* Evaluation license key */
3434 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3436 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3440 # -----------------------------------------------------------------------------
3442 # -----------------------------------------------------------------------------
3445 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3447 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3448 if [ "$OPT_SHADOW" = "yes" ]; then
3449 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3450 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3451 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3455 # $1: input variable name (awk regexp)
3456 # $2: optional output variable name
3457 # $3: optional value transformation (sed command)
3458 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3459 # is where the resulting variable is written to
3460 setBootstrapVariable()
3462 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3466 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3467 echo "Creating qmake. Please wait..."
3470 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3471 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3472 if [ -f "$QCONFIG_H" ]; then
3473 OLD_QCONFIG_H=$QCONFIG_H
3474 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3477 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3478 # when building qmake, we use #defines for the install paths,
3479 # however they are real functions in the library
3480 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3481 mkdir -p "$outpath/src/corelib/global"
3482 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3483 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3486 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3488 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3489 rm -rf mkspecs/default
3490 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3491 mkdir -p "$outpath/qmake" || exit
3493 for mkfile in GNUmakefile Makefile; do
3496 in_mkfile="${mkfile}.in"
3497 if [ "$mkfile" = "Makefile" ]; then
3498 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3499 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3501 in_mkfile="${mkfile}.unix"
3503 in_mkfile="$relpath/qmake/$in_mkfile"
3504 mkfile="$outpath/qmake/$mkfile"
3505 if [ -f "$mkfile" ]; then
3506 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3509 [ -f "$in_mkfile" ] || continue
3511 echo "########################################################################" > "$mkfile"
3512 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3513 echo "########################################################################" >> "$mkfile"
3516 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3517 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3518 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3520 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3521 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3524 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3525 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3526 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3527 setBootstrapVariable QMAKE_CFLAGS
3528 setBootstrapVariable QMAKE_CXXFLAGS
3529 setBootstrapVariable QMAKE_LFLAGS
3531 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3532 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3533 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3535 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3536 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3537 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3538 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3539 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3540 elif [ "$CFG_DEBUG" = "yes" ]; then
3541 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3542 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3543 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3544 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3547 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3548 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3549 for rpath in $RPATH_FLAGS; do
3550 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3553 if [ "$BUILD_ON_MAC" = "yes" ]; then
3554 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3555 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3556 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3557 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3558 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3559 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3560 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3561 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3562 if [ '!' -z "$CFG_SDK" ]; then
3563 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3564 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3565 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3566 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3567 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3570 if [ '!' -z "$D_FLAGS" ]; then
3571 EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS"
3573 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3574 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3575 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3576 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3578 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3579 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3580 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3581 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3582 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3583 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3584 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3585 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3586 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3587 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3589 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3590 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3591 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3592 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3597 QMAKE_BUILD_ERROR=no
3598 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3599 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3600 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3601 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3604 #-------------------------------------------------------------------------------
3606 #-------------------------------------------------------------------------------
3607 if [ -z "$PKG_CONFIG" ]; then
3608 # See if PKG_CONFIG is set in the mkspec:
3609 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3611 if [ -z "$PKG_CONFIG" ]; then
3612 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3615 if [ "$CFG_PKGCONFIG" = "no" ]; then
3617 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3619 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3620 echo >&2 "a correctly setup pkg-config environment!"
3622 elif [ -n "$PKG_CONFIG" ]; then
3623 # found a pkg-config
3624 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3625 # when xcompiling, check environment to see if it's actually usable
3626 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3627 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3628 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3629 if [ -n "$GCC_MACHINE_DUMP" ]; then
3630 PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$CFG_SYSROOT/usr/lib/$GCC_MACHINE_DUMP/pkgconfig
3632 export PKG_CONFIG_LIBDIR
3633 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3634 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3635 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3636 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3637 echo >&2 "Set this variable to the directory that contains target .pc files"
3638 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3639 echo >&2 "use -force-pkg-config to override this test."
3643 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3646 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3647 if [ -n "$CFG_SYSROOT" ]; then
3648 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3649 export PKG_CONFIG_SYSROOT_DIR
3650 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3651 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3652 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3653 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3654 echo >&2 "or use -force-pkg-config to override this test."
3658 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3662 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3663 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3667 if [ -z "$PKG_CONFIG" ]; then
3668 QT_CONFIG="$QT_CONFIG no-pkg-config"
3671 #-------------------------------------------------------------------------------
3672 # write out device config before we run the test.
3673 #-------------------------------------------------------------------------------
3674 DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
3675 if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
3676 rm -f "$DEVICE_VARS_FILE"
3678 mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
3679 DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
3682 #-------------------------------------------------------------------------------
3683 # tests that need qmake
3684 #-------------------------------------------------------------------------------
3686 #-------------------------------------------------------------------------------
3687 # determine the target and host architectures
3688 #-------------------------------------------------------------------------------
3690 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3691 OUTFILE=$outpath/arch.result
3692 "$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG"
3693 if [ $? -eq 0 ]; then
3694 eval `cat "$OUTFILE"`
3697 echo "Could not determine the target architecture!"
3698 echo "Turn on verbose messaging (-v) to see the final report."
3700 rm -f "$OUTFILE" 2>/dev/null
3701 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3703 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3704 # Do the same test again, using the host compiler
3705 SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG_HOST"
3706 if [ $? -eq 0 ]; then
3707 eval `cat "$OUTFILE"`
3710 echo "Could not determine the host architecture!"
3711 echo "Turn on verbose messaging (-v) to see the final report."
3713 rm -f "$OUTFILE" 2>/dev/null
3714 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3716 # not cross compiling, host == target
3717 CFG_HOST_ARCH="$CFG_ARCH"
3718 CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES"
3722 if [ "$OPT_VERBOSE" = "yes" ]; then
3723 echo "System architecture: '$CFG_ARCH'"
3724 echo "Host architecture: '$CFG_HOST_ARCH'"
3727 #-------------------------------------------------------------------------------
3728 # functionality tests
3729 #-------------------------------------------------------------------------------
3731 # detect availability of float math.h functions
3732 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
3733 CFG_USE_FLOATMATH=yes
3735 CFG_USE_FLOATMATH=no
3738 # detect sse2 support
3739 if [ "${CFG_SSE2}" = "auto" ]; then
3740 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-msse2"; then
3747 # detect sse3 support
3748 if [ "${CFG_SSE3}" = "auto" ]; then
3749 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-msse3"; then
3756 # detect ssse3 support
3757 if [ "${CFG_SSSE3}" = "auto" ]; then
3758 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-mssse3"; then
3765 # detect sse4.1 support
3766 if [ "${CFG_SSE4_1}" = "auto" ]; then
3767 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-msse4.1"; then
3774 # detect sse4.2 support
3775 if [ "${CFG_SSE4_2}" = "auto" ]; then
3776 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-msse4.2"; then
3783 # detect avx support
3784 if [ "${CFG_AVX}" = "auto" ]; then
3785 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-mavx"; then
3786 case "$XQMAKESPEC" in
3788 # Some clang versions produce internal compiler errors compiling Qt AVX code
3789 case `$TEST_COMPILER --version` in
3790 Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
3792 if [ "$OPT_VERBOSE" = "yes" ]; then
3793 echo 'AVX support disabled for blacklisted clang compiler'
3810 # detect avx2 support
3811 if [ "${CFG_AVX}" = "no" ]; then
3814 if [ "${CFG_AVX2}" = "auto" ]; then
3815 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx2 "avx2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-march=core-avx2"; then
3822 # check iWMMXt support
3823 if [ "$CFG_IWMMXT" = "yes" ]; then
3824 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-mcpu=iwmmxt"
3825 if [ $? != "0" ]; then
3826 echo "The iWMMXt functionality test failed!"
3827 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3832 # detect neon support
3833 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3834 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS "-mfpu=neon"; then
3839 elif [ "$CFG_ARCH" != "arm" ]; then
3843 # detect mips_dsp support
3844 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3850 # detect mips_dspr2 support
3851 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3857 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3860 if [ "$CFG_ZLIB" = "no" ]; then
3861 # Note: Qt no longer support builds without zlib
3862 # So we force a "no" to be "auto" here.
3863 # If you REALLY really need no zlib support, you can still disable
3864 # it by doing the following:
3865 # add "no-zlib" to mkspecs/qconfig.pri
3866 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3868 # There's no guarantee that Qt will build under those conditions
3873 if [ "$CFG_ZLIB" = "auto" ]; then
3874 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3881 if [ "$CFG_LARGEFILE" = "auto" ]; then
3882 #Large files should be enabled for all Linux systems
3886 if [ "$CFG_GUI" = "no" ]; then
3887 QPA_PLATFORM_GUARD=no
3890 # detect how jpeg should be built
3891 if [ "$CFG_JPEG" = "auto" ]; then
3892 if [ "$CFG_SHARED" = "yes" ]; then
3899 if [ "$CFG_LIBJPEG" = "auto" ]; then
3900 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libjpeg "libjpeg" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3907 # detect how gif should be built
3908 if [ "$CFG_GIF" = "auto" ]; then
3909 if [ "$CFG_SHARED" = "yes" ]; then
3917 if [ "$CFG_LIBPNG" = "auto" ]; then
3918 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libpng "libpng" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3925 # detect accessibility
3926 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3927 CFG_ACCESSIBILITY=yes
3930 if [ "$CFG_EGLFS" = "yes" ]; then
3931 if [ "$CFG_EGL" = "no" ]; then
3932 echo "The EGLFS plugin requires EGL support and cannot be built"
3935 if [ "$CFG_OPENGL" != "es2" ]; then
3936 echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
3943 # auto-detect SQL-modules support
3944 for _SQLDR in $CFG_SQL_AVAILABLE; do
3947 if [ "$CFG_SQL_mysql" != "no" ]; then
3948 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3949 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3950 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3951 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3952 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3953 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3954 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3956 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3957 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3958 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3959 echo " You need MySql 4 or higher."
3960 echo " If you believe this message is in error you may use the continue"
3961 echo " switch (-continue) to $0 to continue."
3966 QT_LFLAGS_MYSQL_R=""
3970 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3971 QMakeVar add CONFIG use_libmysqlclient_r
3972 if [ "$CFG_SQL_mysql" = "auto" ]; then
3973 CFG_SQL_mysql=plugin
3975 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3976 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3977 if [ "$CFG_SQL_mysql" = "auto" ]; then
3978 CFG_SQL_mysql=plugin
3981 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3982 echo "MySQL support cannot be enabled due to functionality tests!"
3983 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3984 echo " If you believe this message is in error you may use the continue"
3985 echo " switch (-continue) to $0 to continue."
3990 QT_LFLAGS_MYSQL_R=""
3998 if [ "$CFG_SQL_psql" != "no" ]; then
3999 # Be careful not to use native pg_config when cross building.
4000 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4001 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4002 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4004 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4005 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4006 # But, respect PSQL_LIBS if set
4007 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4008 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4009 if [ "$CFG_SQL_psql" = "auto" ]; then
4013 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4014 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4015 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4016 echo " If you believe this message is in error you may use the continue"
4017 echo " switch (-continue) to $0 to continue."
4028 if [ "$CFG_SQL_odbc" != "no" ]; then
4029 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4030 if [ "$CFG_SQL_odbc" = "auto" ]; then
4034 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4035 QT_LFLAGS_ODBC="-liodbc"
4036 if [ "$CFG_SQL_odbc" = "auto" ]; then
4040 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4041 echo "ODBC support cannot be enabled due to functionality tests!"
4042 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4043 echo " If you believe this message is in error you may use the continue"
4044 echo " switch (-continue) to $0 to continue."
4054 if [ "$CFG_SQL_oci" != "no" ]; then
4055 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4056 if [ "$CFG_SQL_oci" = "auto" ]; then
4060 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4061 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4062 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4063 echo " If you believe this message is in error you may use the continue"
4064 echo " switch (-continue) to $0 to continue."
4073 if [ "$CFG_SQL_tds" != "no" ]; then
4074 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4075 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4076 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4077 if [ "$CFG_SQL_tds" = "auto" ]; then
4081 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4082 echo "TDS 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."
4094 if [ "$CFG_SQL_db2" != "no" ]; then
4095 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4096 if [ "$CFG_SQL_db2" = "auto" ]; then
4100 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4101 echo "ODBC support cannot be enabled due to functionality tests!"
4102 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4103 echo " If you believe this message is in error you may use the continue"
4104 echo " switch (-continue) to $0 to continue."
4113 if [ "$CFG_SQL_ibase" != "no" ]; then
4114 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4115 if [ "$CFG_SQL_ibase" = "auto" ]; then
4116 CFG_SQL_ibase=plugin
4119 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4120 echo "InterBase support cannot be enabled due to functionality tests!"
4121 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4122 echo " If you believe this message is in error you may use the continue"
4123 echo " switch (-continue) to $0 to continue."
4132 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4133 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4134 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4135 CFG_SQL_sqlite2=plugin
4138 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4139 echo "SQLite2 support cannot be enabled due to functionality tests!"
4140 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4141 echo " If you believe this message is in error you may use the continue"
4142 echo " switch (-continue) to $0 to continue."
4151 if [ "$CFG_SQL_sqlite" != "no" ]; then
4152 SQLITE_AUTODETECT_FAILED="no"
4153 if [ "$CFG_SQLITE" = "system" ]; then
4154 if [ -n "$PKG_CONFIG" ]; then
4155 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4156 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4158 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 $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4159 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4160 CFG_SQL_sqlite=plugin
4162 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4164 SQLITE_AUTODETECT_FAILED="yes"
4167 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4168 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4169 CFG_SQL_sqlite=plugin
4172 SQLITE_AUTODETECT_FAILED="yes"
4176 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4177 echo "SQLite support cannot be enabled due to functionality tests!"
4178 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4179 echo " If you believe this message is in error you may use the continue"
4180 echo " switch (-continue) to $0 to continue."
4186 if [ "$OPT_VERBOSE" = "yes" ]; then
4187 echo "unknown SQL driver: $_SQLDR"
4193 # auto-detect NIS support
4194 if [ "$CFG_NIS" != "no" ]; then
4195 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4198 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4199 echo "NIS support cannot be enabled due to functionality tests!"
4200 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4201 echo " If you believe this message is in error you may use the continue"
4202 echo " switch (-continue) to $0 to continue."
4210 # auto-detect CUPS support
4211 if [ "$CFG_CUPS" != "no" ]; then
4212 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4215 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4216 echo "Cups support cannot be enabled due to functionality tests!"
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."
4227 # auto-detect iconv(3) support
4228 if [ "$CFG_ICONV" != "no" ]; then
4229 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4231 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4233 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/sun-libiconv" "SUN libiconv" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4235 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4238 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4239 echo "Iconv support cannot be enabled due to functionality tests!"
4240 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4241 echo " If you believe this message is in error you may use the continue"
4242 echo " switch (-continue) to $0 to continue."
4250 # auto-detect libdbus-1 support
4251 if [ "$CFG_DBUS" != "no" ]; then
4252 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4253 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4254 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4256 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then
4257 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4258 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4259 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4261 if [ "$CFG_DBUS" = "auto" ]; then
4263 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4264 # CFG_DBUS is "yes" or "linked" here
4266 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4267 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4268 echo " If you believe this message is in error you may use the continue"
4269 echo " switch (-continue) to $0 to continue."
4275 # auto-detect Glib support
4276 if [ "$CFG_GLIB" != "no" ]; then
4277 if [ -n "$PKG_CONFIG" ]; then
4278 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4279 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4281 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB; then
4283 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4284 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4286 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4287 echo "Glib support cannot be enabled due to functionality tests!"
4288 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4289 echo " If you believe this message is in error you may use the continue"
4290 echo " switch (-continue) to $0 to continue."
4298 # auto-detect GTK style support
4299 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4300 if [ -n "$PKG_CONFIG" ]; then
4301 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4302 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4304 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4306 QT_CONFIG="$QT_CONFIG gtkstyle"
4307 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4308 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4310 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4311 echo "Gtk theme support cannot be enabled due to functionality tests!"
4312 echo " Turn on verbose messaging (-v) to $0 to see the fin al report."
4313 echo " If you believe this message is in error you may use the continue"
4314 echo " switch (-continue) to $0 to continue."
4320 elif [ "$CFG_GLIB" = "no" ]; then
4325 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4326 if [ -n "$PKG_CONFIG" ]; then
4327 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4328 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4330 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER; then
4332 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4333 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4335 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4336 echo "Gstreamer support cannot be enabled due to functionality tests!"
4337 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4338 echo " If you believe this message is in error you may use the continue"
4339 echo " switch (-continue) to $0 to continue."
4345 elif [ "$CFG_GLIB" = "no" ]; then
4349 # auto-detect libicu support
4350 if [ "$CFG_ICU" != "no" ]; then
4351 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4352 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4354 if [ "$CFG_ICU" = "auto" ]; then
4356 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4359 echo "The ICU library support cannot be enabled."
4360 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4361 echo " If you believe this message is in error you may use the continue"
4362 echo " switch (-continue) to $0 to continue."
4368 # Auto-detect PulseAudio support
4369 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4370 if [ -n "$PKG_CONFIG" ]; then
4371 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4372 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4374 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO; then
4376 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4377 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4379 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4380 echo "PulseAudio support cannot be enabled due to functionality tests!"
4381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4382 echo " If you believe this message is in error you may use the continue"
4383 echo " switch (-continue) to $0 to continue."
4392 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4393 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4394 if [ "$CFG_GUI" = "no" ]; then
4395 if [ "$CFG_OPENGL" = "auto" ]; then
4398 if [ "$CFG_OPENGL" != "no" ]; then
4399 echo "OpenGL enabled, but GUI disabled."
4400 echo " You might need to either enable the GUI or disable OpenGL"
4404 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4405 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4407 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4410 if [ "$CFG_OPENGL" = "yes" ]; then
4411 echo "All the OpenGL functionality tests failed!"
4412 echo " You might need to modify the include and library search paths by editing"
4413 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4414 echo " ${XQMAKESPEC}."
4421 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4422 if [ "$CFG_OPENGL" = "desktop" ]; then
4423 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4424 if [ $? != "0" ]; then
4425 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4432 elif [ "$CFG_OPENGL" = "es2" ]; then
4434 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4435 if [ $? != "0" ]; then
4436 echo "The OpenGL ES 2.0 functionality test failed!"
4437 echo " You might need to modify the include and library search paths by editing"
4438 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4439 echo " ${XQMAKESPEC}."
4442 elif [ "$CFG_OPENGL" = "desktop" ]; then
4443 # Desktop OpenGL support
4444 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4445 if [ $? != "0" ]; then
4446 echo "The OpenGL functionality test failed!"
4447 echo " You might need to modify the include and library search paths by editing"
4448 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4449 echo " ${XQMAKESPEC}."
4454 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4455 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4456 if [ $? != "0" ]; then
4457 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4464 fi # X11/MINGW OpenGL
4466 if [ "$BUILD_ON_MAC" = "yes" ]; then
4467 if [ "$CFG_PHONON" != "no" ]; then
4468 # Always enable Phonon (unless it was explicitly disabled)
4472 if [ "$CFG_COREWLAN" = "auto" ]; then
4473 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/corewlan "CoreWlan" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4481 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4482 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4483 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4485 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4488 if [ "$CFG_OPENGL" = "yes" ]; then
4489 echo "All the OpenGL functionality tests failed!"
4490 echo " You might need to modify the include and library search paths by editing"
4491 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4492 echo " ${XQMAKESPEC}."
4497 elif [ "$CFG_OPENGL" = "es2" ]; then
4499 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4500 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4501 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4502 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4503 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4504 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4505 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4506 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4509 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
4510 if [ $? != "0" ]; then
4511 echo "The OpenGL ES 2.0 functionality test failed!"
4512 echo " You might need to modify the include and library search paths by editing"
4513 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4514 echo " ${XQMAKESPEC}."
4517 elif [ "$CFG_OPENGL" = "desktop" ]; then
4518 # Desktop OpenGL support
4519 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4520 if [ $? != "0" ]; then
4521 echo "The OpenGL functionality test failed!"
4522 echo " You might need to modify the include and library search paths by editing"
4523 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4524 echo " ${XQMAKESPEC}."
4529 # auto-detect FontConfig support
4530 if [ "$CFG_FONTCONFIG" != "no" ]; then
4531 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4532 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4533 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4535 QT_CFLAGS_FONTCONFIG=
4536 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4538 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4539 QT_CONFIG="$QT_CONFIG fontconfig"
4540 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4541 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4542 CFG_LIBFREETYPE=system
4547 # Save these for a check later
4548 ORIG_CFG_XCB="$CFG_XCB"
4549 ORIG_CFG_EGLFS="$CFG_EGLFS"
4550 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4552 if [ "$CFG_LIBUDEV" != "no" ]; then
4553 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4554 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4555 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4556 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4557 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4559 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_INCDIR_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
4561 QT_CONFIG="$QT_CONFIG libudev"
4562 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4563 echo "The libudev functionality test failed!"
4567 QMakeVar add DEFINES QT_NO_LIBUDEV
4571 if [ "$CFG_EVDEV" != "no" ]; then
4572 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4574 QT_CONFIG="$QT_CONFIG evdev"
4575 elif [ "$CFG_EVDEV" = "yes" ]; then
4576 echo "The evdev functionality test failed!"
4580 QMakeVar add DEFINES QT_NO_EVDEV
4584 # Check we actually have X11 :-)
4585 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4586 QT_CONFIG="$QT_CONFIG xlib"
4589 # auto-detect Xrender support
4590 if [ "$CFG_XRENDER" != "no" ]; then
4591 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4593 QT_CONFIG="$QT_CONFIG xrender"
4595 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4596 echo "Xrender support cannot be enabled due to functionality tests!"
4597 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4598 echo " If you believe this message is in error you may use the continue"
4599 echo " switch (-continue) to $0 to continue."
4607 if [ "$CFG_XCB" != "no" ]; then
4608 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4609 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4610 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4612 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4614 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4615 QT_CONFIG="$QT_CONFIG xcb-render"
4618 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 $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4620 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4623 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4624 QT_CONFIG="$QT_CONFIG xcb-xlib"
4627 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4628 # auto-detect XInput2/Xinput support
4629 if [ "$CFG_XINPUT2" != "no" ]; then
4630 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4634 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4635 echo "XInput2 support cannot be enabled due to functionality tests!"
4636 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4637 echo " If you believe this message is in error you may use the continue"
4638 echo " switch (-continue) to $0 to continue."
4647 if [ "$CFG_XCB" = "yes" ]; then
4648 echo "The XCB test failed!"
4649 echo " You might need to install dependency packages."
4650 echo " See src/plugins/platforms/xcb/README."
4654 QMakeVar add DEFINES QT_NO_XCB
4658 if [ "$CFG_DIRECTFB" != "no" ]; then
4659 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4660 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4661 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4662 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/directfb" "DirectFB" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then
4664 elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4665 echo " DirectFB support cannot be enabled due to functionality tests!"
4666 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4667 echo " If you believe this message is in error you may use the continue"
4668 echo " switch (-continue) to $0 to continue."
4678 # Detect libxkbcommon
4679 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4680 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4681 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4682 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4683 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4685 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4689 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4690 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4691 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4692 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4693 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4694 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4695 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4696 fi # detect EGL support
4697 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/qpa/egl" "EGL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
4699 elif [ "$CFG_EGL" = "yes" ]; then
4700 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4701 echo " You might need to modify the include and library search paths by editing"
4702 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4707 elif [ "$CFG_OPENGL" = "desktop" ]; then
4708 if [ "$CFG_EGL" = "yes" ]; then
4709 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4710 echo "Either disable EGL support or enable OpenGL ES support."
4716 if [ "$CFG_EGLFS" != "no" ]; then
4717 if [ "$CFG_OPENGL" = "es2" ]; then
4718 CFG_EGLFS="$CFG_EGL"
4724 # Determine the default QPA platform
4725 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4727 QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
4728 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4729 if [ "$BUILD_ON_MAC" = "yes" ]; then
4730 QT_QPA_DEFAULT_PLATFORM="cocoa"
4731 elif [ "$UNAME_SYSTEM" = "QNX" ]; then
4732 QT_QPA_DEFAULT_PLATFORM="qnx"
4734 QT_QPA_DEFAULT_PLATFORM="xcb"
4739 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4740 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4741 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4742 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4744 if [ "$CFG_DIRECTFB" = "yes" ]; then
4745 QT_CONFIG="$QT_CONFIG directfb"
4746 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4747 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4750 if [ "$BUILD_ON_MAC" = "yes" ]; then
4751 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4752 QT_CONFIG="$QT_CONFIG coreservices"
4754 QMakeVar add DEFINES QT_NO_CORESERVICES
4758 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
4759 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4760 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4761 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4762 echo "No QPA platform plugin enabled!"
4763 echo " If you really want to build without a QPA platform plugin you must pass"
4764 echo " -no-qpa-platform-guard to configure. Doing this will"
4765 echo " produce a Qt that can not run GUI applications."
4766 echo " The dependencies needed for xcb to build are listed in"
4767 echo " src/plugins/platforms/xcb/README"
4773 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4776 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4777 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4778 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4779 CFG_LIBFREETYPE=system
4785 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS &&
4786 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4787 echo "STL functionality check failed! Cannot build Qt with this STL library."
4788 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4793 # detect POSIX clock_gettime()
4794 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4795 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4796 CFG_CLOCK_GETTIME=yes
4798 CFG_CLOCK_GETTIME=no
4802 # detect POSIX monotonic clocks
4803 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4804 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-monotonic "POSIX Monotonic Clock" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4805 CFG_CLOCK_MONOTONIC=yes
4807 CFG_CLOCK_MONOTONIC=no
4809 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4810 CFG_CLOCK_MONOTONIC=no
4814 if [ "$CFG_MREMAP" = "auto" ]; then
4815 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4822 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4823 if [ "$CFG_GETADDRINFO" != "no" ]; then
4824 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4827 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4828 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4829 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4830 echo " If you believe this message is in error you may use the continue"
4831 echo " switch (-continue) to $0 to continue."
4839 # find if the platform provides inotify
4840 if [ "$CFG_INOTIFY" != "no" ]; then
4841 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4844 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4845 echo "inotify support cannot be enabled due to functionality tests!"
4846 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4847 echo " If you believe this message is in error you may use the continue"
4848 echo " switch (-continue) to $0 to continue."
4856 # find if the platform provides if_nametoindex (ipv6 interface name support)
4857 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4858 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6ifname "IPv6 interface name" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4861 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4862 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4863 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4864 echo " If you believe this message is in error you may use the continue"
4865 echo " switch (-continue) to $0 to continue."
4873 # find if the platform provides getifaddrs (network interface enumeration)
4874 if [ "$CFG_GETIFADDRS" != "no" ]; then
4875 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4878 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4879 echo "getifaddrs support cannot be enabled due to functionality tests!"
4880 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4881 echo " If you believe this message is in error you may use the continue"
4882 echo " switch (-continue) to $0 to continue."
4891 if [ "$CFG_OPENSSL" != "no" ]; then
4892 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4893 if [ "$CFG_OPENSSL" = "auto" ]; then
4897 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4898 echo "OpenSSL support cannot be enabled due to functionality tests!"
4899 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4900 echo " If you believe this message is in error you may use the continue"
4901 echo " switch (-continue) to $0 to continue."
4910 if [ "$CFG_PCRE" != "qt" ]; then
4911 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4914 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4915 echo "PCRE support cannot be enabled due to functionality tests!"
4916 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4917 echo " If you believe this message is in error you may use the continue"
4918 echo " switch (-continue) to $0 to continue."
4926 # detect OpenVG support
4927 if [ "$CFG_OPENVG" != "no" ]; then
4928 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4929 if [ "$CFG_OPENVG" = "auto" ]; then
4932 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4933 if [ "$CFG_OPENVG" = "auto" ]; then
4936 CFG_OPENVG_ON_OPENGL=yes
4937 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 $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4938 if [ "$CFG_OPENVG" = "auto" ]; then
4941 CFG_OPENVG_LC_INCLUDES=yes
4942 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 $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4943 if [ "$CFG_OPENVG" = "auto" ]; then
4946 CFG_OPENVG_LC_INCLUDES=yes
4947 CFG_OPENVG_ON_OPENGL=yes
4949 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4950 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4951 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4952 echo " If you believe this message is in error you may use the continue"
4953 echo " switch (-continue) to $0 to continue."
4959 if [ "$CFG_OPENVG" = "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS $CONFIG_ARG; then
4960 CFG_OPENVG_SHIVA=yes
4964 if [ "$CFG_ALSA" = "auto" ]; then
4965 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
4972 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4973 if [ "$CFG_ARCH" = "arm" ]; then
4974 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS
4975 if [ $? != "0" ]; then
4976 CFG_JAVASCRIPTCORE_JIT=no
4979 case "$XPLATFORM" in
4981 CFG_JAVASCRIPTCORE_JIT=no
4987 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
4988 QMakeVar set JAVASCRIPTCORE_JIT yes
4989 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
4990 QMakeVar set JAVASCRIPTCORE_JIT no
4993 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
4994 CFG_AUDIO_BACKEND=yes
4997 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
4998 echo "Warning: largefile support cannot be disabled for win32."
5002 #-------------------------------------------------------------------------------
5003 # ask for all that hasn't been auto-detected or specified in the arguments
5004 #-------------------------------------------------------------------------------
5007 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5008 QT_CONFIG="$QT_CONFIG phonon-backend"
5011 # disable accessibility
5012 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5013 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5015 QT_CONFIG="$QT_CONFIG accessibility"
5019 if [ "$CFG_EGL" = "yes" ]; then
5020 QT_CONFIG="$QT_CONFIG egl"
5022 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5026 if [ "$CFG_EGLFS" = "yes" ]; then
5027 QT_CONFIG="$QT_CONFIG eglfs"
5029 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
5033 if [ "$CFG_OPENVG" = "no" ]; then
5034 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5036 QT_CONFIG="$QT_CONFIG openvg"
5037 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5038 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5040 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5041 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5043 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5044 QT_CONFIG="$QT_CONFIG shivavg"
5045 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5050 if [ "$CFG_OPENGL" = "no" ]; then
5051 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5053 QT_CONFIG="$QT_CONFIG opengl"
5056 if [ "$CFG_OPENGL" = "es2" ]; then
5057 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5060 if [ "$CFG_OPENGL" = "es2" ]; then
5061 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5062 QT_CONFIG="$QT_CONFIG opengles2"
5065 # safe execution environment
5066 if [ "$CFG_SXE" != "no" ]; then
5067 QT_CONFIG="$QT_CONFIG sxe"
5070 # build up the variables for output
5071 if [ "$CFG_DEBUG" = "yes" ]; then
5072 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5073 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5074 elif [ "$CFG_DEBUG" = "no" ]; then
5075 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5076 QMAKE_CONFIG="$QMAKE_CONFIG release"
5078 if [ "$CFG_SHARED" = "yes" ]; then
5079 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5080 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5081 elif [ "$CFG_SHARED" = "no" ]; then
5082 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5083 QMAKE_CONFIG="$QMAKE_CONFIG static"
5086 #FIXME: qpa is implicit this should all be removed
5087 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5088 QT_CONFIG="$QT_CONFIG qpa"
5089 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5090 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5092 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5093 # Do not set this here for Windows. Let qmake do it so
5094 # debug and release precompiled headers are kept separate.
5095 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5097 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5098 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5099 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5100 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5101 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5102 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5104 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5105 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5107 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5108 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5109 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5110 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5111 QMakeVar add QMAKE_CFLAGS -g
5112 QMakeVar add QMAKE_CXXFLAGS -g
5113 QT_CONFIG="$QT_CONFIG separate_debug_info"
5115 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5116 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5118 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5119 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5120 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5121 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5122 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5123 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5124 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5125 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5126 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5127 if [ "$CFG_ARCH" = "mips" ]; then
5128 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5129 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5131 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5132 QT_CONFIG="$QT_CONFIG clock-gettime"
5134 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5135 QT_CONFIG="$QT_CONFIG clock-monotonic"
5137 if [ "$CFG_MREMAP" = "yes" ]; then
5138 QT_CONFIG="$QT_CONFIG mremap"
5140 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5141 QT_CONFIG="$QT_CONFIG getaddrinfo"
5143 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5144 QT_CONFIG="$QT_CONFIG ipv6ifname"
5146 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5147 QT_CONFIG="$QT_CONFIG getifaddrs"
5149 if [ "$CFG_INOTIFY" = "yes" ]; then
5150 QT_CONFIG="$QT_CONFIG inotify"
5152 if [ "$CFG_LIBJPEG" = "no" ]; then
5154 elif [ "$CFG_LIBJPEG" = "system" ]; then
5155 QT_CONFIG="$QT_CONFIG system-jpeg"
5157 if [ "$CFG_JPEG" = "no" ]; then
5158 QT_CONFIG="$QT_CONFIG no-jpeg"
5159 elif [ "$CFG_JPEG" = "yes" ]; then
5160 QT_CONFIG="$QT_CONFIG jpeg"
5162 if [ "$CFG_LIBPNG" = "no" ]; then
5165 if [ "$CFG_LIBPNG" = "system" ]; then
5166 QT_CONFIG="$QT_CONFIG system-png"
5168 if [ "$CFG_PNG" = "no" ]; then
5169 QT_CONFIG="$QT_CONFIG no-png"
5170 elif [ "$CFG_PNG" = "yes" ]; then
5171 QT_CONFIG="$QT_CONFIG png"
5173 if [ "$CFG_GIF" = "no" ]; then
5174 QT_CONFIG="$QT_CONFIG no-gif"
5175 elif [ "$CFG_GIF" = "yes" ]; then
5176 QT_CONFIG="$QT_CONFIG gif"
5178 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5179 QT_CONFIG="$QT_CONFIG no-freetype"
5180 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5181 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5182 QT_CONFIG="$QT_CONFIG system-freetype"
5184 QT_CONFIG="$QT_CONFIG freetype"
5186 if [ "$CFG_GUI" = "auto" ]; then
5189 if [ "$CFG_GUI" = "no" ]; then
5190 QT_CONFIG="$QT_CONFIG no-gui"
5193 if [ "$CFG_WIDGETS" = "no" ]; then
5194 QT_CONFIG="$QT_CONFIG no-widgets"
5195 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5198 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5199 #On Mac we implicitly link against libz, so we
5200 #never use the 3rdparty stuff.
5201 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5203 if [ "$CFG_ZLIB" = "yes" ]; then
5204 QT_CONFIG="$QT_CONFIG zlib"
5205 elif [ "$CFG_ZLIB" = "system" ]; then
5206 QT_CONFIG="$QT_CONFIG system-zlib"
5209 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5210 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5211 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5212 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5213 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5214 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5215 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5216 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5217 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5218 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5219 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5220 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5221 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5222 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5224 [ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES"
5225 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5226 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5228 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5229 if [ "$CFG_RPATH" = "yes" ]; then
5230 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5231 # set the default rpath to the library installation directory
5232 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5234 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5235 if [ -n "$RPATH_FLAGS" ]; then
5237 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5241 elif [ "$CFG_RPATH" = "yes" ]; then
5242 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5246 if [ "$CFG_RPATH" = "yes" ]; then
5247 # set the default rpath to the library installation directory
5248 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5250 if [ -n "$RPATH_FLAGS" ]; then
5251 # add the user defined rpaths
5252 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5256 if [ '!' -z "$I_FLAGS" ]; then
5257 # add the user define include paths
5258 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5259 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5262 if [ '!' -z "$W_FLAGS" ]; then
5263 # add the user defined warning flags
5264 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5265 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5266 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5269 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5270 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5271 # Follow default behavior of configure.exe by overriding with "rtti".
5272 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5275 if [ "$CFG_ALSA" = "yes" ]; then
5276 QT_CONFIG="$QT_CONFIG alsa"
5279 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5280 QT_CONFIG="$QT_CONFIG pulseaudio"
5283 if [ "$CFG_COREWLAN" = "yes" ]; then
5284 QT_CONFIG="$QT_CONFIG corewlan"
5287 if [ "$CFG_ICU" = "yes" ]; then
5288 QT_CONFIG="$QT_CONFIG icu"
5291 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5292 QT_CONFIG="$QT_CONFIG force_asserts"
5295 if [ "$CFG_PCRE" = "qt" ]; then
5296 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5300 # Some Qt modules are too advanced in C++ for some old compilers
5301 # Detect here the platforms where they are known to work.
5303 # See Qt documentation for more information on which features are
5304 # supported and on which compilers.
5306 canBuildQtConcurrent="yes"
5307 canUseV8Snapshot="yes"
5309 case "$XPLATFORM" in
5311 # PA-RISC's assembly is too limited
5312 # gcc 3.4 on that platform can't build QtXmlPatterns
5313 # the assembly it generates cannot be compiled
5315 # Check gcc's version
5316 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5320 canBuildQtXmlPatterns="no"
5324 canBuildQtXmlPatterns="no"
5328 unsupported/vxworks-*-g++*)
5331 unsupported/vxworks-*-dcc*)
5333 canBuildQtXmlPatterns="no"
5336 # Check gcc's version
5337 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5345 canBuildQtXmlPatterns="no"
5350 # Check the compiler version
5351 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5354 canBuildQtXmlPatterns="no"
5355 canBuildQtConcurrent="no"
5359 canBuildQtConcurrent="no"
5365 canBuildQtXmlPatterns="no"
5366 canBuildQtConcurrent="no"
5372 # Get the xlC version
5373 cat > xlcver.c <<EOF
5377 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5382 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5383 xlcver=`./xlcver 2>/dev/null`
5386 if [ "$OPT_VERBOSE" = "yes" ]; then
5387 if [ -n "$xlcver" ]; then
5388 echo Found IBM xlC version: $xlcver.
5390 echo Could not determine IBM xlC version, assuming oldest supported.
5397 canBuildQtXmlPatterns="no"
5398 canBuildQtConcurrent="no"
5402 canBuildQtConcurrent="no"
5408 canBuildQtConcurrent="no"
5412 if [ "$CFG_GUI" = "no" ]; then
5413 # WebKit requires QtGui
5417 if [ "$CFG_SHARED" = "no" ]; then
5419 echo "WARNING: Using static linking will disable the WebKit module."
5424 CFG_CONCURRENT="yes"
5425 if [ "$canBuildQtConcurrent" = "no" ]; then
5426 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5429 QT_CONFIG="$QT_CONFIG concurrent"
5433 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5434 QT_CONFIG="$QT_CONFIG audio-backend"
5438 if [ "$CFG_WEBKIT" = "debug" ]; then
5439 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5443 QT_CONFIG="$QT_CONFIG v8"
5444 # Detect snapshot support
5445 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5446 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5449 *) canUseV8Snapshot="no"
5453 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5454 # QEMU crashes when building inside Scratchbox with an ARM target
5455 canUseV8Snapshot="no"
5458 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5459 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5461 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5462 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5465 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5466 QT_CONFIG="$QT_CONFIG v8snapshot"
5470 if [ "$CFG_QML_DEBUG" = "no" ]; then
5471 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5474 case "$QMAKE_CONF_COMPILER" in
5477 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5479 case "$COMPILER_VERSION" in
5481 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5482 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5483 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5486 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5487 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5488 QT_GCC_PATCH_VERSION=0
5498 #-------------------------------------------------------------------------------
5499 # part of configuration information goes into qconfig.h
5500 #-------------------------------------------------------------------------------
5502 case "$CFG_QCONFIG" in
5504 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5507 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5508 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5509 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5510 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5511 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5512 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5514 echo "#endif" >>"$tmpconfig"
5518 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5522 # define QT_EDITION $QT_EDITION
5526 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5527 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5529 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5530 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5533 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5534 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5537 if [ "$BUILD_ON_MAC" = "yes" ]; then
5538 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5539 #if defined(__LP64__)
5540 # define QT_POINTER_SIZE 8
5542 # define QT_POINTER_SIZE 4
5546 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5547 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5550 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5551 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5552 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5556 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5558 if [ "$CFG_DEV" = "yes" ]; then
5559 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5562 # Add QPA to config.h
5563 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5565 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5566 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5569 # Add turned on SQL drivers
5570 for DRIVER in $CFG_SQL_AVAILABLE; do
5571 eval "VAL=\$CFG_SQL_$DRIVER"
5574 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5575 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5576 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5579 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5585 QMakeVar set sql-drivers "$SQL_DRIVERS"
5586 QMakeVar set sql-plugins "$SQL_PLUGINS"
5588 # Add other configuration options to the qconfig.h file
5589 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5590 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5591 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5592 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5593 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5594 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5596 # X11/Unix/Mac only configs
5597 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5598 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5599 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5600 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5601 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5602 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5603 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5604 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5605 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5606 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5607 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5608 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5609 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5610 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5612 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5613 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5614 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5615 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5616 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5617 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5618 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5619 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5620 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5621 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5622 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5623 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5624 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5626 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5627 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5628 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5629 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5630 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5631 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5632 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5633 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5635 # sort QCONFIG_FLAGS for neatness if we can
5636 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5637 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5639 if [ -n "$QCONFIG_FLAGS" ]; then
5640 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5641 #ifndef QT_BOOTSTRAPPED
5644 for cfg in $QCONFIG_FLAGS; do
5645 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5646 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5647 # figure out define logic, so we can output the correct
5648 # ifdefs to override the global defines in a project
5650 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5651 # QT_NO_option can be forcefully turned on by QT_option
5652 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5653 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5654 # QT_option can be forcefully turned off by QT_NO_option
5655 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5658 if [ -z $cfgdNeg ]; then
5659 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5666 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5667 #if defined($cfgd) && defined($cfgdNeg)
5669 #elif !defined($cfgd) && !defined($cfgdNeg)
5676 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5677 #endif // QT_BOOTSTRAPPED
5682 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5683 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5684 #define QT_VISIBILITY_AVAILABLE
5689 if [ -n "$QT_LIBINFIX" ]; then
5690 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5691 #define QT_LIBINFIX "$QT_LIBINFIX"
5696 echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5698 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5699 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5700 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5702 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5703 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5704 chmod -w "$outpath/src/corelib/global/qconfig.h"
5705 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5706 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5710 #-------------------------------------------------------------------------------
5711 # save configuration into qconfig.pri
5712 #-------------------------------------------------------------------------------
5713 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5714 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5715 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5716 if [ "$CFG_DEBUG" = "yes" ]; then
5717 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5718 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5719 QT_CONFIG="$QT_CONFIG release"
5721 QT_CONFIG="$QT_CONFIG debug"
5722 elif [ "$CFG_DEBUG" = "no" ]; then
5723 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5724 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5725 QT_CONFIG="$QT_CONFIG debug"
5727 QT_CONFIG="$QT_CONFIG release"
5729 if [ "$CFG_FRAMEWORK" = "no" ]; then
5730 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5732 QT_CONFIG="$QT_CONFIG qt_framework"
5733 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5735 if [ "$CFG_DEV" = "yes" ]; then
5736 QT_CONFIG="$QT_CONFIG private_tests"
5739 cat >>"$QTCONFIG.tmp" <<EOF
5741 CONFIG += $QTCONFIG_CONFIG
5743 QT_HOST_ARCH = $CFG_HOST_ARCH
5744 QT_CPU_FEATURES = $CFG_CPUFEATURES
5745 QT_HOST_CPU_FEATURES = $CFG_HOST_CPUFEATURES
5746 QT_EDITION = $Edition
5747 QT_CONFIG += $QT_CONFIG
5750 QT_VERSION = $QT_VERSION
5751 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5752 QT_MINOR_VERSION = $QT_MINOR_VERSION
5753 QT_PATCH_VERSION = $QT_PATCH_VERSION
5756 QT_LIBINFIX = $QT_LIBINFIX
5757 QT_NAMESPACE = $QT_NAMESPACE
5761 if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
5762 echo "# pkgconfig" >> "$QTCONFIG.tmp"
5763 echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
5764 echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp"
5765 echo >> "$QTCONFIG.tmp"
5768 if [ -n "$CFG_SYSROOT" ]; then
5769 echo "# sysroot" >>"$QTCONFIG.tmp"
5770 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5771 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5772 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5773 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5774 echo "}" >> "$QTCONFIG.tmp"
5775 echo >> "$QTCONFIG.tmp"
5777 if [ -n "$RPATH_FLAGS" ]; then
5778 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5780 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5781 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5782 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5783 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5786 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5787 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5788 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5791 # replace qconfig.pri if it differs from the newly created temp file
5792 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5793 rm -f "$QTCONFIG.tmp"
5795 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5798 #-------------------------------------------------------------------------------
5799 # save configuration into qmodule.pri
5800 #-------------------------------------------------------------------------------
5801 QTMODULE="$outpath/mkspecs/qmodule.pri"
5803 echo "CONFIG += $QMAKE_CONFIG create_prl link_prl" >> "$QTMODULE.tmp"
5805 # Ensure we can link to uninistalled libraries
5806 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5807 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5809 if [ -n "$QT_CFLAGS_PSQL" ]; then
5810 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5812 if [ -n "$QT_LFLAGS_PSQL" ]; then
5813 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5815 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5816 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5818 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5819 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5821 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5822 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5824 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5825 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5827 if [ -n "$QT_LFLAGS_ODBC" ]; then
5828 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5830 if [ -n "$QT_LFLAGS_TDS" ]; then
5831 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5834 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5835 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5838 #dump in the OPENSSL_LIBS info
5839 if [ '!' -z "$OPENSSL_LIBS" ]; then
5840 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5841 elif [ "$CFG_OPENSSL" = "linked" ]; then
5842 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5845 #dump in the SDK info
5846 if [ '!' -z "$CFG_SDK" ]; then
5847 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5851 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5852 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5854 # replace qmodule.pri if it differs from the newly created temp file
5855 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5856 rm -f "$QTMODULE.tmp"
5858 mv -f "$QTMODULE.tmp" "$QTMODULE"
5861 #-------------------------------------------------------------------------------
5862 # save configuration into .qmake.cache
5863 #-------------------------------------------------------------------------------
5865 CACHEFILE="$outpath/.qmake.cache"
5866 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5867 cat >>"$CACHEFILE.tmp" <<EOF
5869 QT_SOURCE_TREE = \$\$quote($relpath)
5870 QT_BUILD_TREE = \$\$quote($outpath)
5871 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5873 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5874 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5875 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5877 include(\$\$PWD/mkspecs/qmodule.pri)
5878 CONFIG += dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5882 #dump the qmake spec
5883 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5884 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5886 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5889 # replace .qmake.cache if it differs from the newly created temp file
5890 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5891 rm -f "$CACHEFILE.tmp"
5893 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5896 #-------------------------------------------------------------------------------
5897 # give feedback on configuration
5898 #-------------------------------------------------------------------------------
5899 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5902 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5903 echo "Build type: $PLATFORM"
5905 echo "Building on: $PLATFORM"
5906 echo "Building for: $XPLATFORM"
5909 # the missing space before $CFG_FEATURES is intentional
5910 echo "Architecture: $CFG_ARCH, features:$CFG_CPUFEATURES"
5911 echo "Host architecture: $CFG_HOST_ARCH, features:$CFG_HOST_CPUFEATURES"
5913 if [ -n "$PLATFORM_NOTES" ]; then
5914 echo "Platform notes:"
5915 echo "$PLATFORM_NOTES"
5920 if [ "$OPT_VERBOSE" = "yes" ]; then
5921 echo $ECHO_N "qmake vars .......... $ECHO_C"
5922 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5923 echo "qmake switches ......... $QMAKE_SWITCHES"
5926 echo "Build .................. $CFG_BUILD_PARTS"
5927 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5928 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5929 echo "Debug .................. yes (combined)"
5930 if [ "$CFG_DEBUG" = "yes" ]; then
5931 echo "Default Link ........... debug"
5933 echo "Default Link ........... release"
5936 echo "Debug .................. $CFG_DEBUG"
5938 if [ -n "$PKG_CONFIG" ]; then
5939 echo "pkg-config ............. yes"
5941 echo "pkg-config ............. no"
5943 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5944 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5945 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5946 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5947 echo "QtGui module ........... $CFG_GUI"
5948 echo "QtWidgets module ....... $CFG_WIDGETS"
5949 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5950 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5952 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5954 echo "QML debugging .......... $CFG_QML_DEBUG"
5955 echo "PCH support ............ $CFG_PRECOMPILE"
5956 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5957 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5958 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5959 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5960 elif [ "$CFG_ARCH" = "arm" ]; then
5961 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5962 echo "NEON support ........... ${CFG_NEON}"
5964 if [ "$CFG_ARCH" = "mips" ]; then
5965 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5967 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5968 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5969 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5970 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5971 echo "NIS support ............ $CFG_NIS"
5972 echo "CUPS support ........... $CFG_CUPS"
5973 echo "Iconv support .......... $CFG_ICONV"
5974 echo "Glib support ........... $CFG_GLIB"
5975 echo "GStreamer support ...... $CFG_GSTREAMER"
5976 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
5977 echo "Large File support ..... $CFG_LARGEFILE"
5978 echo "GIF support ............ $CFG_GIF"
5979 if [ "$CFG_JPEG" = "no" ]; then
5980 echo "JPEG support ........... $CFG_JPEG"
5982 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
5984 if [ "$CFG_PNG" = "no" ]; then
5985 echo "PNG support ............ $CFG_PNG"
5987 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
5989 echo "zlib support ........... $CFG_ZLIB"
5990 echo "Session management ..... $CFG_SM"
5991 echo "libudev support ........ $CFG_LIBUDEV"
5993 if [ "$CFG_OPENGL" = "desktop" ]; then
5994 echo "OpenGL support ......... yes (Desktop OpenGL)"
5995 elif [ "$CFG_OPENGL" = "es2" ]; then
5996 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
5998 echo "OpenGL support ......... no"
6001 if [ "$CFG_OPENVG" ]; then
6002 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6003 echo "OpenVG support ......... ShivaVG"
6005 echo "OpenVG support ......... $CFG_OPENVG"
6009 echo "XShape support ......... $CFG_XSHAPE"
6010 echo "XVideo support ......... $CFG_XVIDEO"
6011 echo "XSync support .......... $CFG_XSYNC"
6012 echo "Xinerama support ....... $CFG_XINERAMA"
6013 echo "Xcursor support ........ $CFG_XCURSOR"
6014 echo "Xfixes support ......... $CFG_XFIXES"
6015 echo "Xrandr support ......... $CFG_XRANDR"
6016 echo "Xi support ............. $CFG_XINPUT"
6017 echo "MIT-SHM support ........ $CFG_MITSHM"
6018 echo "FontConfig support ..... $CFG_FONTCONFIG"
6019 echo "XKB Support ............ $CFG_XKB"
6020 echo "immodule support ....... $CFG_IM"
6021 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6023 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6024 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6025 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6026 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6027 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6028 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6029 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6030 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6031 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6034 if [ "$CFG_OPENSSL" = "yes" ]; then
6035 OPENSSL_LINKAGE="(run-time)"
6036 elif [ "$CFG_OPENSSL" = "linked" ]; then
6037 OPENSSL_LINKAGE="(linked)"
6039 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6040 echo "Alsa support ........... $CFG_ALSA"
6041 if [ "$BUILD_ON_MAC" = "yes" ]; then
6042 echo "CoreWlan support ....... $CFG_COREWLAN"
6044 echo "libICU support ......... $CFG_ICU"
6045 echo "PCRE support ........... $CFG_PCRE"
6046 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6047 echo "Xcb support ............ limited (old version)"
6049 echo "Xcb support ............ $CFG_XCB"
6051 echo "Xrender support ........ $CFG_XRENDER"
6052 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6053 echo "XInput2 support ........ $CFG_XINPUT2"
6055 echo "EGLFS support .......... $CFG_EGLFS"
6056 echo "DirectFB support ....... $CFG_DIRECTFB"
6059 # complain about not being able to use dynamic plugins if we are using a static build
6060 if [ "$CFG_SHARED" = "no" ]; then
6062 echo "WARNING: Using static linking will disable the use of dynamically"
6063 echo "loaded plugins. Make sure to import all needed static plugins,"
6064 echo "or compile needed modules into the library."
6067 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6069 echo "NOTE: When linking against OpenSSL, you can override the default"
6070 echo "library names through OPENSSL_LIBS."
6072 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6076 exec 1>&3 3>&- # restore stdout
6077 cat $outpath/config.summary # display config feedback to user
6079 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6081 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6082 echo "if you want a pure debug build."
6087 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6092 #-------------------------------------------------------------------------------
6093 # build makefiles based on the configuration
6094 #-------------------------------------------------------------------------------
6096 echo "Finding project files. Please wait..."
6097 if [ "$CFG_NOPROCESS" != "yes" ]; then
6098 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6099 if [ -f "${relpath}/qtbase.pro" ]; then
6100 mkfile="${outpath}/Makefile"
6101 [ -f "$mkfile" ] && chmod +w "$mkfile"
6102 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6106 # .projects -> projects to process
6107 # .projects.1 -> qt and moc
6108 # .projects.2 -> subdirs and libs
6109 # .projects.3 -> the rest
6110 rm -f .projects .projects.1 .projects.2 .projects.3
6112 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6113 if [ -z "$AWK" ]; then
6114 for p in `echo $QMAKE_PROJECTS`; do
6115 echo "$p" >> .projects
6118 cat >projects.awk <<EOF
6124 first = "./.projects.1.tmp"
6125 second = "./.projects.2.tmp"
6126 third = "./.projects.3.tmp"
6131 if ( ! target_file )
6133 print input_file >target_file
6138 input_file = FILENAME
6143 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6146 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6147 target_file = second
6152 matched_target == 0 && /^(TEMPLATE.*=)/ {
6153 if ( \$3 == "subdirs" )
6154 target_file = second
6155 else if ( \$3 == "lib" )
6161 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6162 if ( \$0 ~ /plugin/ )
6165 target_file = second
6170 if ( ! target_file )
6172 print input_file >>target_file
6179 for p in `echo $QMAKE_PROJECTS`; do
6180 echo "$p" >> .projects.all
6183 # if you get errors about the length of the command line to awk, change the -l arg
6185 split -l 100 .projects.all .projects.all.
6186 for p in .projects.all.*; do
6187 "$AWK" -f projects.awk `cat $p`
6188 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6189 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6190 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6191 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6193 rm -f .projects.all* projects.awk
6195 [ -f .projects.1 ] && cat .projects.1 >>.projects
6196 [ -f .projects.2 ] && cat .projects.2 >>.projects
6197 rm -f .projects.1 .projects.2
6198 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6199 cat .projects.3 >>.projects
6203 # don't sort Qt and MOC in with the other project files
6204 # also work around a segfaulting uniq(1)
6205 if [ -f .sorted.projects.2 ]; then
6206 sort .sorted.projects.2 > .sorted.projects.2.new
6207 mv -f .sorted.projects.2.new .sorted.projects.2
6208 cat .sorted.projects.2 >> .sorted.projects.1
6210 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6211 rm -f .sorted.projects.2 .sorted.projects.1
6215 if [ -f .projects ]; then
6216 uniq .projects >.tmp
6217 mv -f .tmp .projects
6218 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6220 if [ -f .projects.3 ]; then
6221 uniq .projects.3 >.tmp
6222 mv -f .tmp .projects.3
6223 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6225 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6229 for part in $CFG_BUILD_PARTS; do
6231 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6232 libs) PART_ROOTS="$PART_ROOTS src" ;;
6233 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6234 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6239 if [ "$CFG_DEV" = "yes" ]; then
6240 PART_ROOTS="$PART_ROOTS tests"
6243 echo "Creating makefiles. Please wait..."
6244 for file in .projects .projects.3; do
6245 [ '!' -f "$file" ] && continue
6246 for a in `cat $file`; do
6248 for r in $PART_ROOTS; do
6249 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6254 [ "$IN_ROOT" = "no" ] && continue
6257 *winmain/winmain.pro)
6258 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6262 */qmake/qmake.pro) continue ;;
6263 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*|*tools/qdbusxml2cpp*|*tools/qdbuscpp2xml*) SPEC=$QMAKESPEC ;;
6264 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6270 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6271 test -d "$dir" || mkdir -p "$dir"
6272 OUTDIR="$outpath/$dir"
6273 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6274 # fast configure - the makefile exists, skip it
6275 # since the makefile exists, it was generated by qmake, which means we
6276 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6278 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6281 QMAKE_SPEC_ARGS="-spec $SPEC"
6282 echo $ECHO_N " for $a$ECHO_C"
6284 QMAKE="$outpath/bin/qmake"
6285 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6286 if [ "$file" = ".projects.3" ]; then
6289 cat >"${OUTDIR}/Makefile" <<EOF
6290 # ${OUTDIR}/Makefile: generated by configure
6292 # WARNING: This makefile will be replaced with a real makefile.
6293 # All changes made to this file will be lost.
6295 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6297 cat >>"${OUTDIR}/Makefile" <<EOF
6299 all clean install qmake first Makefile: FORCE
6300 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6308 if [ "$OPT_VERBOSE" = "yes" ]; then
6309 echo " (`basename $SPEC`)"
6310 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6315 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6316 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6320 rm -f .projects .projects.3
6322 #-------------------------------------------------------------------------------
6323 # check for platforms that we don't yet know about
6324 #-------------------------------------------------------------------------------
6325 if [ "$CFG_ARCH" = "unknown" ]; then
6328 NOTICE: configure was unable to determine the architecture
6329 for the $XQMAKESPEC target.
6331 Qt will not use a specialized implementation for any atomic
6332 operations. Instead a generic implemention based on either GCC
6333 intrinsics or C++11 std::atomic<T> will be used (when
6334 available). The generic implementations are generally as fast
6335 as and always as safe as a specialized implementation.
6337 If no generic implementation is available, Qt will use a
6338 fallback UNIX implementation which uses a single
6339 pthread_mutex_t to protect all atomic operations. This
6340 implementation is the slow (but safe) fallback implementation
6341 for architectures Qt does not yet support.
6345 #-------------------------------------------------------------------------------
6346 # check if the user passed the -no-zlib option, which is no longer supported
6347 #-------------------------------------------------------------------------------
6348 if [ -n "$ZLIB_FORCED" ]; then
6349 which_zlib="supplied"
6350 if [ "$CFG_ZLIB" = "system" ]; then
6356 NOTICE: The -no-zlib option was supplied but is no longer
6359 Qt now requires zlib support in all builds, so the -no-zlib
6360 option was ignored. Qt will be built using the $which_zlib
6365 #-------------------------------------------------------------------------------
6366 # check if the user passed the obsoleted -wayland or -no-wayland flag
6367 #-------------------------------------------------------------------------------
6368 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6371 NOTICE: The -wayland and -no-wayland flags are now obsolete
6373 All configuring of QtWayland plugin and QtCompositor happens in the module
6377 #-------------------------------------------------------------------------------
6378 # check if the user passed the obsoleted -arch or -host-arch options
6379 #-------------------------------------------------------------------------------
6380 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6383 NOTICE: The -arch and -host-arch options are obsolete.
6385 Qt now detects the target and host architectures based on compiler
6386 output. Qt will be built using $CFG_ARCH for the target architecture
6387 and $CFG_HOST_ARCH for the host architecture (note that these two
6388 will be the same unless you are cross-compiling).
6392 #-------------------------------------------------------------------------------
6393 # finally save the executed command to another script
6394 #-------------------------------------------------------------------------------
6395 if [ `basename $0` != "config.status" ]; then
6396 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6398 # add the system variables
6399 for varname in $SYSTEM_VARIABLES; do
6401 'if [ -n "\$'${varname}'" ]; then
6402 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6407 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6409 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6410 echo "#!/bin/sh" > "$outpath/config.status"
6411 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6412 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6413 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6414 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6415 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6416 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6417 echo "else" >> "$outpath/config.status"
6418 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6419 echo "fi" >> "$outpath/config.status"
6420 chmod +x "$outpath/config.status"
6423 if [ -n "$RPATH_MESSAGE" ]; then
6425 echo "$RPATH_MESSAGE"
6428 MAKE=`basename "$MAKE"`
6430 echo Qt is now configured for building. Just run \'$MAKE\'.
6431 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6432 echo Once everything is built, Qt is installed.
6433 echo You should not run \'$MAKE install\'.
6435 echo Once everything is built, you must run \'$MAKE install\'.
6436 echo Qt will be installed into $QT_INSTALL_PREFIX
6439 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.