2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
74 DEVICE_VARS_FILE=.device.vars
77 :> "$DEVICE_VARS_FILE"
79 #-------------------------------------------------------------------------------
81 #-------------------------------------------------------------------------------
85 echo "$@" | sed 's/ /\ /g'
88 # Adds a new qmake variable to the cache
89 # Usage: QMakeVar mode varname contents
90 # where mode is one of: set, add, del
104 echo >&2 "BUG: wrong command to QMakeVar: $1"
108 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
111 # Helper function for getQMakeConf. It parses include statements in
112 # qmake.conf and prints out the expanded file
115 while read line; do case "$line" in
117 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
118 current_dir=`dirname "$1"`
119 conf_file="$current_dir/$inc_file"
120 if [ ! -f "$conf_file" ]; then
121 echo "WARNING: Unable to find file $conf_file" >&2
124 getQMakeConf1 "$conf_file"
136 values["LITERAL_WHITESPACE"] = " "
137 values["LITERAL_DOLLAR"] = "$"
139 /^[_A-Z0-9.]+[ \t]*\+?=/ {
140 valStart = index($0, "=") + 1
143 if (substr($0, valStart - 2, 1) == "+") {
147 variable = substr($0, 0, valStart - 2 - append)
148 value = substr($0, valStart)
149 gsub("[ \t]+", "", variable)
150 gsub("^[ \t]+", "", value)
151 gsub("[ \t]+$", "", value)
154 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
155 ovalue = ovalue substr(value, 1, RSTART - 1)
156 var = substr(value, RSTART + 2, RLENGTH - 2)
157 value = substr(value, RSTART + RLENGTH)
159 var = substr(var, 2, length(var) - 2)
161 ovalue = ovalue values[var]
163 ovalue = ovalue value
165 combinedValue = values[variable]
166 if (append == 1 && length(combinedValue) > 0) {
167 combinedValue = combinedValue " " ovalue
169 combinedValue = ovalue
171 values[variable] = combinedValue
174 for (var in values) {
175 print var "=" values[var]
183 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
186 # relies on $QMAKESPEC being set correctly. parses include statements in
187 # qmake.conf and prints out the expanded file
190 if [ -z "$specvals" ]; then
191 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
193 getQMakeConf3 "$1" "$specvals"
198 if [ -z "$xspecvals" ]; then
199 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
201 getQMakeConf3 "$1" "$xspecvals"
204 # relies on $TEST_COMPILER being set correctly
205 compilerSupportsFlag()
207 cat >conftest.cpp <<EOF
208 int main() { return 0; }
210 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
212 rm -f conftest.cpp conftest.o
216 # relies on $TEST_COMPILER being set correctly
222 safe_flag=`shellEscape "$flag"`
223 lflags=$lflags,$safe_flag
225 compilerSupportsFlag "$lflags" >/dev/null 2>&1
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
238 echo >&2 "BUG: wrong command to QMakeVar: $1"
242 echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
245 resolveDeviceMkspec()
247 result=$(find "$relpath/mkspecs/devices/" -type d -name "*$VAL*" | sed "s,^$relpath/mkspecs/,,")
248 match_count=$(echo "$result" | wc -w)
249 if [ "$match_count" -gt 1 ]; then
250 echo >&2 "Error: Multiple matches for device '$VAL'. Candidates are:"
251 tabbed_result=$(echo "$result" | sed "s,^, ,")
252 echo >&2 "$tabbed_result"
254 elif [ "$match_count" -eq 0 ]; then
255 echo >&2 "Error: No device matching '$VAL'"
260 #-------------------------------------------------------------------------------
261 # operating system detection
262 #-------------------------------------------------------------------------------
264 # need that throughout the script
265 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
266 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
267 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
268 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
270 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
271 if echo '\c' | grep '\c' >/dev/null; then
277 #-------------------------------------------------------------------------------
278 # window system detection
279 #-------------------------------------------------------------------------------
283 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
288 #-----------------------------------------------------------------------------
289 # Qt version detection
290 #-----------------------------------------------------------------------------
291 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
295 if [ -n "$QT_VERSION" ]; then
296 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
297 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
298 if [ -n "$MAJOR" ]; then
299 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
300 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
301 QT_MAJOR_VERSION="$MAJOR"
302 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
303 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
306 if [ -z "$QT_MAJOR_VERSION" ]; then
307 echo "Cannot process version from qglobal.h: $QT_VERSION"
308 echo "Cannot proceed."
312 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
313 if [ -z "$QT_PACKAGEDATE" ]; then
314 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
315 echo "Cannot proceed"
319 #-------------------------------------------------------------------------------
321 #-------------------------------------------------------------------------------
325 EditionString=Commercial
329 # parse the arguments, setting things to "yes" or "no"
330 while [ "$#" -gt 0 ]; do
334 #Autoconf style options
336 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
340 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
344 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
345 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
348 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
351 -h|help|--help|-help)
352 if [ "$VAL" = "yes" ]; then
354 COMMERCIAL_USER="no" #doesn't matter we will display the help
357 COMMERCIAL_USER="no" #doesn't matter we will display the help
361 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
365 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
372 if [ "$UNKNOWN_ARG" = "yes" ]; then
384 COMMERCIAL_USER="yes"
398 if [ "$COMMERCIAL_USER" = "ask" ]; then
400 echo "Which edition of Qt do you want to use ?"
402 echo "Type 'c' if you want to use the Commercial Edition."
403 echo "Type 'o' if you want to use the Open Source Edition."
407 if [ "$commercial" = "c" ]; then
408 COMMERCIAL_USER="yes"
410 elif [ "$commercial" = "o" ]; then
417 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
418 # Commercial preview release
419 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
422 QT_EDITION="QT_EDITION_DESKTOP"
423 LicenseType="Technology Preview"
424 elif [ $COMMERCIAL_USER = "yes" ]; then
425 # one of commercial editions
426 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
428 # read in the license file
429 if [ -f "$LICENSE_FILE" ]; then
430 . "$LICENSE_FILE" >/dev/null 2>&1
431 if [ -z "$LicenseKeyExt" ]; then
433 echo "You are using an old license file."
435 echo "Please install the license file supplied by Nokia,"
436 echo "or install the Qt Open Source Edition if you intend to"
437 echo "develop free software."
440 if [ -z "$Licensee" ]; then
442 echo "Invalid license key. Please check the license key."
446 if [ -z "$LicenseKeyExt" ]; then
448 echo $ECHO_N "Please enter your license key: $ECHO_C"
450 Licensee="Unknown user"
455 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
456 && LicenseValid="yes" \
458 if [ "$LicenseValid" != "yes" ]; then
460 echo "Invalid license key. Please check the license key."
463 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
464 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
465 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
466 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
468 # determine which edition we are licensed to use
469 case "$LicenseTypeCode" in
471 LicenseType="Commercial"
475 QT_EDITION="QT_EDITION_UNIVERSAL"
478 Edition="FullFramework"
479 EditionString="Full Framework"
480 QT_EDITION="QT_EDITION_DESKTOP"
483 Edition="GUIFramework"
484 EditionString="GUI Framework"
485 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
490 LicenseType="Evaluation"
491 QMakeVar add DEFINES QT_EVAL
495 QT_EDITION="QT_EDITION_EVALUATION"
500 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
502 echo "Invalid license key. Please check the license key."
506 # verify that we are licensed to use Qt on this platform
508 case "$PlatformCode" in
511 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
515 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
518 ### EMBEDDED_QPA logic missing ###
519 case "$PlatformCode,$PLATFORM_MAC" in
520 X9,* | XC,* | XU,* | XW,* | XM,*)
522 LICENSE_EXTENSION="-ALLOS"
524 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
525 # Qt for Embedded Linux
526 LICENSE_EXTENSION="-EMBEDDED"
528 6M,* | N7,* | N9,* | NX,*)
530 LICENSE_EXTENSION="-EMBEDDED"
532 FM,* | LM,yes | ZM,no)
534 LICENSE_EXTENSION="-DESKTOP"
538 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
540 echo "You are not licensed for the $Platform platform."
542 echo "Please contact qt-info@nokia.com to upgrade your license to"
543 echo "include the $Platform platform, or install the Qt Open Source Edition"
544 echo "if you intend to develop free software."
549 if test -r "$relpath/.LICENSE"; then
550 # Generic, non-final license
552 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
557 *TECHNOLOGY?PREVIEW*)
564 echo >&2 "Invalid license files; cannot continue"
569 EditionString="$Edition"
570 QT_EDITION="QT_EDITION_DESKTOP"
573 case "$LicenseFeatureCode" in
576 case "$LicenseType" in
578 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
581 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
587 case "$LicenseType" in
589 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
592 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
598 echo "Invalid license key. Please check the license key."
602 case "$LicenseFeatureCode" in
610 if [ '!' -f "$outpath/LICENSE" ]; then
611 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
612 echo "this software has disappeared."
614 echo "Sorry, you are not licensed to use this software."
615 echo "Try re-installing."
619 elif [ $COMMERCIAL_USER = "no" ]; then
620 # Open Source edition - may only be used under the terms of the GPL or LGPL.
621 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
622 Licensee="Open Source"
624 EditionString="Open Source"
625 QT_EDITION="QT_EDITION_OPENSOURCE"
628 #-------------------------------------------------------------------------------
629 # initalize variables
630 #-------------------------------------------------------------------------------
632 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
633 for varname in $SYSTEM_VARIABLES; do
634 qmakevarname="${varname}"
635 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
636 if [ "${varname}" = "LDFLAGS" ]; then
637 qmakevarname="LFLAGS"
638 elif [ "${varname}" = "LD" ]; then
642 'if [ -n "\$'${varname}'" ]; then
643 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
647 # Use CC/CXX to run config.tests
648 mkdir -p "$outpath/config.tests"
649 rm -f "$outpath/config.tests/.qmake.cache"
650 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
652 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
654 # QTDIR may be set and point to an old or system-wide Qt installation
657 # the minimum version of libdbus-1 that we require:
658 MIN_DBUS_1_VERSION=0.93
660 # initalize internal variables
661 CFG_CONFIGURE_EXIT_ON_ERROR=yes
663 CFG_GUI=auto # (yes|no|auto)
689 CFG_OPENVG_LC_INCLUDES=no
690 CFG_OPENVG_SHIVA=auto
691 CFG_OPENVG_ON_OPENGL=auto
697 QT_DEFAULT_BUILD_PARTS="libs examples"
701 CFG_AUDIO_BACKEND=auto
704 CFG_JAVASCRIPTCORE_JIT=auto
707 # Target architecture
709 # Host architecture, same as CFG_ARCH when not cross-compiling
711 # Set when the -arch or -host-arch arguments are used
712 OPT_OBSOLETE_HOST_ARG=no
724 CFG_OBSOLETE_WAYLAND=no
736 CFG_SEPARATE_DEBUG_INFO=no
737 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
738 CFG_REDUCE_EXPORTS=auto
746 CFG_REDUCE_RELOCATIONS=auto
747 CFG_ACCESSIBILITY=auto
752 CFG_CLOCK_GETTIME=auto
753 CFG_CLOCK_MONOTONIC=auto
761 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
764 CFG_PREFIX_INSTALL=yes
773 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
774 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
778 OPT_CONFIRM_LICENSE=no
791 QPA_PLATFORM_GUARD=yes
793 # initalize variables used for installation
802 QT_INSTALL_TRANSLATIONS=
811 #flags for SQL drivers
819 QT_LFLAGS_ODBC="-lodbc"
822 # flags for libdbus-1
826 # flags for Glib (X11 only)
830 # flags for GStreamer (X11 only)
834 # default qpa platform
835 QT_QPA_DEFAULT_PLATFORM=
837 #-------------------------------------------------------------------------------
838 # check SQL drivers available in this package
839 #-------------------------------------------------------------------------------
841 # opensource version removes some drivers, so force them to be off
847 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
848 for a in "$relpath/src/plugins/sqldrivers/"*; do
850 base_a=`basename "$a"`
851 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
852 eval "CFG_SQL_${base_a}=auto"
857 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
858 if [ -d "$relpath/src/plugins/imageformats" ]; then
859 for a in "$relpath/src/plugins/imageformats/"*; do
861 base_a=`basename "$a"`
862 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
867 #-------------------------------------------------------------------------------
868 # parse command line arguments
869 #-------------------------------------------------------------------------------
871 # parse the arguments, setting things to "yes" or "no"
872 while [ "$#" -gt 0 ]; do
876 #Autoconf style options
878 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
882 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
886 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
887 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
890 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
894 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
898 -no-*-*|-plugin-*-*|-qt-*-*)
899 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
900 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
904 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
907 #Qt style yes options
908 -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)
909 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
912 #Qt style options that pass an argument
915 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
919 -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)
920 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
924 #Qt style complex options in one command
925 -enable-*|-disable-*)
926 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
927 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
929 #Qt Builtin/System style options
930 -no-*|-system-*|-qt-*)
931 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
932 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
934 #Options that cannot be generalized
941 # this option may or may not be followed by an argument
942 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
951 # this option may or may not be followed by an argument
952 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
960 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
961 # this option may or may not be followed by an argument
962 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
981 if [ "$1" = "-D" ]; then
985 VAL=`echo $1 | sed 's,-D,,'`
990 # this option may or may not be followed by an argument
991 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1000 if [ "$1" = "-I" ]; then
1004 VAL=`echo $1 | sed 's,-I,,'`
1009 if [ "$1" = "-L" ]; then
1013 VAL=`echo $1 | sed 's,-L,,'`
1018 if [ "$1" = "-R" ]; then
1022 VAL=`echo $1 | sed 's,-R,,'`
1027 VAL=`echo $1 | sed 's,-l,,'`
1031 if [ "$1" = "-F" ]; then
1035 VAL=`echo $1 | sed 's,-F,,'`
1040 if [ "$1" = "-fw" ]; then
1044 VAL=`echo $1 | sed 's,-fw,,'`
1052 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1059 if [ "$UNKNOWN_ARG" = "yes" ]; then
1060 echo "$1: unknown argument"
1071 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1072 CFG_ACCESSIBILITY="$VAL"
1081 CFG_USE_GNUMAKE="$VAL"
1084 CFG_MYSQL_CONFIG="$VAL"
1087 QT_INSTALL_PREFIX="$VAL"
1090 QT_HOST_PREFIX="$VAL"
1099 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1100 CFG_PKGCONFIG="$VAL"
1106 CFG_PKGCONFIG="force"
1109 QT_INSTALL_DOCS="$VAL"
1112 QT_INSTALL_HEADERS="$VAL"
1115 QT_INSTALL_PLUGINS="$VAL"
1118 QT_INSTALL_IMPORTS="$VAL"
1121 QT_INSTALL_DATA="$VAL"
1124 QT_INSTALL_LIBS="$VAL"
1133 QT_INSTALL_TRANSLATIONS="$VAL"
1135 sysconfdir|settingsdir)
1136 QT_INSTALL_SETTINGS="$VAL"
1139 QT_INSTALL_EXAMPLES="$VAL"
1142 QT_INSTALL_TESTS="$VAL"
1151 QT_INSTALL_BINS="$VAL"
1157 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1164 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1165 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1166 [ "$VAL" = "es2" ]; then
1173 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1180 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1183 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1186 if [ "$BUILD_ON_MAC" = "yes" ]; then
1193 OPT_OBSOLETE_HOST_ARG=yes
1196 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1197 CFG_MAC_HARFBUZZ="$VAL"
1204 if [ "$BUILD_ON_MAC" = "yes" ]; then
1205 CFG_FRAMEWORK="$VAL"
1211 if [ "$VAL" = "yes" ]; then
1213 QMakeVar add QMAKE_CFLAGS -pg
1214 QMakeVar add QMAKE_CXXFLAGS -pg
1215 QMakeVar add QMAKE_LFLAGS -pg
1216 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1222 if [ "$VAL" = "yes" ]; then
1223 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1228 # keep compatibility with old platform names
1234 PLATFORM=hpux-acc-o64
1237 PLATFORM=hpux-acc-64
1240 PLATFORM=hpux-acc-64
1252 PLATFORM=reliant-cds-64
1255 PLATFORM=solaris-cc-64
1258 PLATFORM=unixware-cc
1261 PLATFORM=unixware-g++
1264 PLATFORM=unixware-cc
1267 PLATFORM=unixware-g++
1273 i386) NATIVE_64_ARCH="x86_64" ;;
1274 powerpc) NATIVE_64_ARCH="ppc64" ;;
1275 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1277 if [ ! -z "$NATIVE_64_ARCH" ]; then
1278 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1285 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1288 XPLATFORM=`resolveDeviceMkspec $VAL`
1289 [ "$XPLATFORM" = "undefined" ] && exit 101
1292 DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
1293 DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
1294 DeviceVar set $DEV_VAR $DEV_VAL
1297 QT_QPA_DEFAULT_PLATFORM="$VAL"
1300 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1301 CFG_DEBUG_RELEASE="$VAL"
1307 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1308 CFG_RELEASE_QMAKE="$VAL"
1314 if [ "$VAL" = "yes" ]; then
1316 elif [ "$VAL" = "no" ]; then
1323 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1324 CFG_PREFIX_INSTALL="$VAL"
1332 developer-build|commercial|opensource)
1333 # These switches have been dealt with already
1336 if [ "$VAL" = "yes" ]; then
1338 elif [ "$VAL" = "no" ]; then
1345 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1346 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1352 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1353 if [ "$VAL" = "no" ]; then
1354 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1355 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1356 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1362 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1369 if [ "$VAL" = "no" ]; then
1376 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1384 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1391 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1398 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1405 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1412 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1419 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1426 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1433 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1434 CFG_PRECOMPILE="$VAL"
1439 separate-debug-info)
1440 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1441 CFG_SEPARATE_DEBUG_INFO="$VAL"
1442 elif [ "$VAL" = "nocopy" ] ; then
1443 CFG_SEPARATE_DEBUG_INFO="yes"
1444 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1450 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1451 CFG_REDUCE_EXPORTS="$VAL"
1457 if [ "$VAL" = "no" ]; then
1464 if [ "$VAL" = "no" ]; then
1471 if [ "$VAL" = "no" ]; then
1478 if [ "$VAL" = "no" ]; then
1485 if [ "$VAL" = "no" ]; then
1492 if [ "$VAL" = "no" ]; then
1499 if [ "$VAL" = "no" ]; then
1509 if [ "$VAL" = "no" ]; then
1516 if [ "$VAL" = "no" ]; then
1523 if [ "$VAL" = "no" ]; then
1524 CFG_MIPS_DSPR2="$VAL"
1530 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1531 CFG_REDUCE_RELOCATIONS="$VAL"
1537 [ "$VAL" = "qt" ] && VAL=yes
1538 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1543 # No longer supported:
1544 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1547 if [ "$VAL" = "system" ]; then
1554 [ "$VAL" = "yes" ] && VAL=qt
1555 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1562 [ "$VAL" = "yes" ] && VAL=qt
1563 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1570 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1577 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1584 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1591 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1598 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1605 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1606 CFG_FONTCONFIG="$VAL"
1612 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1619 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1626 CFG_OBSOLETE_WAYLAND=yes
1629 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1636 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1643 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1650 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1657 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1664 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1678 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1679 CFG_GSTREAMER="$VAL"
1685 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1686 CFG_QGTKSTYLE="$VAL"
1692 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1695 if [ "$VAL" = "no" ]; then
1703 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1705 elif [ "$VAL" = "no" ]; then
1712 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1713 QPA_PLATFORM_GUARD="$VAL"
1719 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1721 elif [ "$VAL" = "runtime" ]; then
1728 if [ "$VAL" = "yes" ]; then
1735 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1742 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1743 CFG_LARGEFILE="$VAL"
1749 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1756 if [ "$VAL" = "yes" ]; then
1757 CFG_OPENSSL="linked"
1763 if [ "$VAL" = "yes" ]; then
1766 if [ "$VAL" = "no" ]; then
1774 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1775 CFG_JAVASCRIPTCORE_JIT="$VAL"
1781 if [ "$VAL" = "yes" ]; then
1782 OPT_CONFIRM_LICENSE="$VAL"
1788 if [ "$VAL" = "yes" ]; then
1794 sql-*|imageformat-*)
1795 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1796 # if autoconf style options were used, $VAL can be "yes" or "no"
1797 [ "$VAL" = "yes" ] && VAL=qt
1798 # now $VAL should be "no", "qt", or "plugin"... double-check
1799 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1802 # now $VAL is "no", "qt", or "plugin"
1804 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1805 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1807 # Grab the available values
1810 avail="$CFG_SQL_AVAILABLE"
1813 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1814 if [ "$OPT" != "plugin" ]; then
1815 # png is always built in
1821 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1825 # Check that that user's value is available.
1828 if [ "$VAL" = "$d" ]; then
1833 [ "$found" = yes ] || ERROR=yes
1835 if [ "$VAR" = "sql" ]; then
1836 # set the CFG_SQL_driver
1837 eval "CFG_SQL_$VAL=\$OPT"
1839 elif [ "$VAR" = "imageformat" ]; then
1840 [ "$OPT" = "qt" ] && OPT=yes
1841 VAL="`echo $VAL |tr a-z A-Z`"
1842 eval "CFG_$VAL=$OPT"
1846 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1847 if [ "$OPT" = "plugin" ]; then
1850 QMakeVar add "${VAR}s" "${VAL}"
1851 elif [ "$OPT" = "no" ]; then
1852 PLUG_VAR="${VAR}-plugin"
1854 QMakeVar del "${IN_VAR}s" "$VAL"
1855 QMakeVar del "${PLUG_VAR}s" "$VAL"
1857 if [ "$ERROR" = "yes" ]; then
1858 echo "$CURRENT_OPT: unknown argument"
1863 if [ "$VAL" = "yes" ]; then
1864 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1865 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1869 elif [ "$VAL" = "no" ]; then
1870 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1871 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1880 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1887 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1894 D_FLAGS="$D_FLAGS \"$VAL\""
1897 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1900 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1903 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1906 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1909 if [ "$BUILD_ON_MAC" = "yes" ]; then
1910 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1911 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1917 if [ "$BUILD_ON_MAC" = "yes" ]; then
1918 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1924 W_FLAGS="$W_FLAGS \"${VAL}\""
1930 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1931 CFG_PHONON_BACKEND="$VAL"
1943 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1944 CFG_AUDIO_BACKEND="$VAL"
1950 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1958 CFG_FORCE_ASSERTS="$VAL"
1964 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1974 if [ "$UNKNOWN_OPT" = "yes" ]; then
1975 echo "${CURRENT_OPT}: invalid command-line switch"
1981 # update QT_CONFIG to show our current predefined configuration
1982 case "$CFG_QCONFIG" in
1983 minimal|small|medium|large|full)
1984 # these are a sequence of increasing functionality
1985 for c in minimal small medium large full; do
1986 QT_CONFIG="$QT_CONFIG $c-config"
1987 [ "$CFG_QCONFIG" = $c ] && break
1991 # not known to be sufficient for anything
1992 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
1993 echo >&2 "Error: configuration file not found:"
1994 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
1996 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2001 #-------------------------------------------------------------------------------
2002 # build tree initialization
2003 #-------------------------------------------------------------------------------
2005 # where to find which..
2006 unixtests="$relpath/config.tests/unix"
2007 mactests="$relpath/config.tests/mac"
2008 WHICH="$unixtests/which.test"
2010 PERL=`$WHICH perl 2>/dev/null`
2012 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2014 for e in gawk nawk awk; do
2015 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2022 PERL="/usr/bin/perl"
2023 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2027 ### skip this if the user just needs help...
2028 if [ "$OPT_HELP" != "yes" ]; then
2030 # is this a shadow build?
2031 if [ "$OPT_SHADOW" = "maybe" ]; then
2033 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2034 if [ -h "$outpath" ]; then
2035 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2041 if [ "$OPT_SHADOW" = "yes" ]; then
2042 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2043 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2044 echo >&2 "Cannot proceed."
2047 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2050 if [ "$PLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
2052 echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
2053 echo "Qt can be built in release mode with separate debug information, so"
2054 echo "-debug-and-release is not necessary anymore"
2058 if [ "$CFG_SILENT" = "yes" ]; then
2059 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2062 # if the source tree is different from the build tree,
2063 # symlink or copy part of the sources
2064 if [ "$OPT_SHADOW" = "yes" ]; then
2065 echo "Preparing build tree..."
2067 if [ -z "$PERL" ]; then
2069 echo "You need perl in your PATH to make a shadow build."
2070 echo "Cannot proceed."
2074 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2076 # make a syncqt script that can be used in the shadow
2077 rm -f "$outpath/bin/syncqt"
2078 if [ -x "$relpath/bin/syncqt" ]; then
2079 mkdir -p "$outpath/bin"
2080 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2081 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2082 chmod 755 "$outpath/bin/syncqt"
2085 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2086 rm -f "$outpath/bin/$i"
2087 if [ -x "$relpath/bin/$i" ]; then
2088 mkdir -p "$outpath/bin"
2089 echo "#!/bin/sh" >"$outpath/bin/$i"
2090 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2091 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2092 chmod 755 "$outpath/bin/$i"
2096 # save a pre-existing mkspecs/modules dir
2097 test -d "$outpath/mkspecs/modules" && \
2098 mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
2100 # symlink the mkspecs directory
2101 mkdir -p "$outpath/mkspecs"
2102 rm -rf "$outpath"/mkspecs/*
2103 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2104 rm -f "$outpath/mkspecs/default"
2108 rm -rf "$outpath/mkspecs/$1"
2109 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2110 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2113 # Special case for mkspecs/features directory.
2114 # To be able to place .prf files into a shadow build directory,
2115 # we're creating links for files only. The directory structure is reproduced.
2116 ShadowMkspecs features
2118 # The modules dir is special, too.
2119 if test -d "$outpath/mkspecs-modules"; then
2120 rm -rf "$outpath/mkspecs/modules"
2121 mv "$outpath/mkspecs-modules" "$outpath/mkspecs/modules"
2123 ShadowMkspecs modules
2126 # symlink the doc directory
2127 rm -rf "$outpath/doc"
2128 ln -s "$relpath/doc" "$outpath/doc"
2131 # symlink fonts to be able to run application from build directory
2132 if [ ! -d "${outpath}/lib/fonts" ]; then
2133 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2134 mkdir -p "${outpath}/lib"
2135 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2139 if [ "$OPT_FAST" = "auto" ]; then
2140 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2147 # find a make command
2148 if [ -z "$MAKE" ]; then
2150 for mk in gmake make; do
2151 if "$WHICH" $mk >/dev/null 2>&1; then
2156 if [ -z "$MAKE" ]; then
2157 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2158 echo >&2 "Cannot proceed."
2161 # export MAKE, we need it later in the config.tests
2167 #-------------------------------------------------------------------------------
2168 # auto-detect all that hasn't been specified in the arguments
2169 #-------------------------------------------------------------------------------
2171 if [ -z "$PLATFORM" ]; then
2173 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2175 OSX_VERSION=`uname -r | cut -d. -f1`
2176 # Select compiler. Use g++ unless we find a usable Clang version
2178 if [ "$OSX_VERSION" -ge 12 ]; then
2179 # We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
2181 elif [ "$OSX_VERSION" -eq 11 ]; then
2182 # We're on Lion. Check if we have a supported Clang version
2183 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2186 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2193 #PLATFORM=aix-g++-64
2195 #PLATFORM=aix-xlc-64
2197 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2207 # PLATFORM=dynix-g++
2213 PLATFORM=freebsd-g++
2215 - Also available for FreeBSD: freebsd-icc
2219 PLATFORM=openbsd-g++
2230 #PLATFORM=irix-cc-64
2232 - Also available for IRIX: irix-g++ irix-cc-64
2236 case "$UNAME_MACHINE" in
2238 #PLATFORM=hpuxi-acc-32
2239 PLATFORM=hpuxi-acc-64
2241 - Also available for HP-UXi: hpuxi-acc-32
2247 #PLATFORM=hpux-acc-64
2249 #PLATFORM=hpux-acc-o64
2251 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2260 - Also available for Tru64: tru64-g++
2264 case "$UNAME_MACHINE" in
2266 PLATFORM=linux-g++-64
2273 - Also available for Linux: linux-kcc linux-icc linux-cxx
2277 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2278 PLATFORM="solaris-g++"
2280 #PLATFORM=solaris-g++
2282 #PLATFORM=solaris-cc64
2285 - Also available for Solaris: solaris-g++ solaris-cc-64
2288 ReliantUNIX-*:*|SINIX-*:*)
2289 PLATFORM=reliant-cds
2290 #PLATFORM=reliant-cds-64
2292 - Also available for Reliant UNIX: reliant-cds-64
2302 #PLATFORM=unixware-g++
2303 PLATFORM=unixware-cc
2305 - Also available for OpenUNIX: unixware-g++
2309 #PLATFORM=unixware-g++
2310 PLATFORM=unixware-cc
2312 - Also available for UnixWare: unixware-g++
2319 - Also available for SCO OpenServer: sco-g++
2323 PLATFORM=unixware-g++
2326 PLATFORM=unsupported/qnx-g++
2329 if [ "$OPT_HELP" != "yes" ]; then
2331 for p in $PLATFORMS; do
2332 echo " $relconf $* -platform $p"
2335 echo " The build script does not currently recognize all" >&2
2336 echo " platforms supported by Qt." >&2
2337 echo " Rerun this script with a -platform option listed to" >&2
2338 echo " set the system/compiler combination you use." >&2
2345 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2347 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2349 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2350 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2351 case "$XPLATFORM" in qnx-*) XPLATFORM_QNX=yes;; esac
2353 if [ -d "$PLATFORM" ]; then
2354 QMAKESPEC="$PLATFORM"
2356 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2358 if [ -d "$XPLATFORM" ]; then
2359 XQMAKESPEC="$XPLATFORM"
2361 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2363 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2364 QT_CROSS_COMPILE=yes
2365 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2366 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2369 if [ "$BUILD_ON_MAC" = "yes" ]; then
2370 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2372 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2373 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2374 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2375 echo " built with 'macx-g++'" >&2
2381 # check specified platforms are supported
2382 if [ '!' -d "$QMAKESPEC" ]; then
2384 echo " The specified system/compiler is not supported:"
2388 echo " Please see the README file for a complete list."
2392 if [ '!' -d "$XQMAKESPEC" ]; then
2394 echo " The specified system/compiler is not supported:"
2398 echo " Please see the README file for a complete list."
2402 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2404 echo " The specified system/compiler port is not complete:"
2406 echo " $XQMAKESPEC/qplatformdefs.h"
2408 echo " Please contact qt-info@nokia.com."
2413 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2414 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2415 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2416 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2417 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2421 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2422 case `basename "$XPLATFORM"` in
2425 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2427 echo "Please contact qt-info@nokia.com to upgrade your license to"
2428 echo "include this platform, or install the Qt Open Source Edition"
2429 echo "if you intend to develop free software."
2435 #-------------------------------------------------------------------------------
2436 # tests that don't need qmake (must be run before displaying help)
2437 #-------------------------------------------------------------------------------
2439 # detect build style
2440 if [ "$CFG_DEBUG" = "auto" ]; then
2441 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2442 CFG_DEBUG_RELEASE=yes
2444 elif [ "$CFG_DEV" = "yes" ]; then
2445 CFG_DEBUG_RELEASE=no
2448 CFG_DEBUG_RELEASE=no
2452 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2453 QT_CONFIG="$QT_CONFIG build_all"
2456 # pass on $CFG_SDK to the configure tests.
2457 if [ '!' -z "$CFG_SDK" ]; then
2458 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2461 # find the default framework value
2462 if [ "$BUILD_ON_MAC" = "yes" ]; then
2463 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2464 CFG_FRAMEWORK="$CFG_SHARED"
2465 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2467 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2475 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2477 TEST_COMPILER=$QMAKE_CONF_COMPILER
2478 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2479 if [ -z "$TEST_COMPILER" ]; then
2480 echo "ERROR: Cannot set the compiler for the configuration tests"
2485 if [ -n "$CFG_SYSROOT" ]; then
2486 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2490 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2492 # auto-detect precompiled header support
2493 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2494 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2501 # auto-detect support for separate debug info in objcopy
2502 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2503 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2504 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2505 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2506 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2507 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2508 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2509 CFG_SEPARATE_DEBUG_INFO=no
2513 # binutils on HP-UX is buggy; default to no.
2514 CFG_SEPARATE_DEBUG_INFO=no
2517 CFG_SEPARATE_DEBUG_INFO=yes
2523 # auto-detect -fvisibility support
2524 if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
2525 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2526 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
2527 echo "-reduce-exports was requested but this compiler does not support it"
2528 echo "Re-run configure with -v for more information"
2531 CFG_REDUCE_EXPORTS=no
2533 CFG_REDUCE_EXPORTS=yes
2537 # detect the availability of the -Bsymbolic-functions linker optimization
2538 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2539 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2540 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
2541 echo "-reduce-relocations was requested but this compiler does not support it"
2542 echo "Re-run configure with -v for more information"
2545 CFG_REDUCE_RELOCATIONS=no
2547 CFG_REDUCE_RELOCATIONS=yes
2551 # auto-detect GNU make support
2552 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2556 # find the default framework value
2557 if [ "$BUILD_ON_MAC" = "yes" ]; then
2558 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2559 CFG_FRAMEWORK="$CFG_SHARED"
2560 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2562 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2570 #setup the build parts
2571 if [ -z "$CFG_BUILD_PARTS" ]; then
2572 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2574 # build tests by default, if a developer build
2575 if [ "$CFG_DEV" = "yes" ]; then
2576 CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
2579 # don't build tools by default when cross-compiling
2580 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2581 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2584 for nobuild in $CFG_NOBUILD_PARTS; do
2585 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2587 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2589 # echo "WARNING: libs is a required part of the build."
2591 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2594 #-------------------------------------------------------------------------------
2595 # post process QT_INSTALL_* variables
2596 #-------------------------------------------------------------------------------
2598 if [ -z "$QT_INSTALL_PREFIX" ]; then
2599 if [ "$CFG_DEV" = "yes" ]; then
2600 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2602 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2605 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2607 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2608 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2609 if [ "$BUILD_ON_MAC" = "yes" ]; then
2610 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2613 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2616 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2618 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2619 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2620 if [ "$BUILD_ON_MAC" = "yes" ]; then
2621 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2626 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2629 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2631 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2632 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2633 if [ "$BUILD_ON_MAC" = "yes" ]; then
2634 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2635 QT_INSTALL_LIBS="/Libraries/Frameworks"
2639 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2641 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2643 if [ -z "$QT_INSTALL_BINS" ]; then #default
2644 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2645 if [ "$BUILD_ON_MAC" = "yes" ]; then
2646 QT_INSTALL_BINS="/Developer/Applications/Qt"
2649 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2651 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2653 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2654 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2655 if [ "$BUILD_ON_MAC" = "yes" ]; then
2656 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2659 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2661 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2663 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2664 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2665 if [ "$BUILD_ON_MAC" = "yes" ]; then
2666 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2669 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2671 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2673 if [ -z "$QT_INSTALL_DATA" ]; then #default
2674 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2676 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2678 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2679 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2681 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2683 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2684 if [ "$BUILD_ON_MAC" = "yes" ]; then
2685 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2687 QT_INSTALL_SETTINGS=/etc/xdg
2690 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2692 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2693 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2694 if [ "$BUILD_ON_MAC" = "yes" ]; then
2695 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2698 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2700 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2703 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2704 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2705 if [ "$BUILD_ON_MAC" = "yes" ]; then
2706 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2709 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2711 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2713 #------- host paths --------
2715 if [ -z "$QT_HOST_PREFIX" ]; then
2716 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2719 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2723 if [ -z "$QT_HOST_BINS" ]; then #default
2725 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2726 if [ "$BUILD_ON_MAC" = "yes" ]; then
2727 QT_HOST_BINS="/Developer/Applications/Qt"
2730 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2732 QT_HOST_BINS="$QT_INSTALL_BINS"
2735 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2737 if [ -z "$QT_HOST_DATA" ]; then #default
2739 QT_HOST_DATA="$QT_HOST_PREFIX"
2741 QT_HOST_DATA="$QT_INSTALL_DATA"
2744 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2747 #-------------------------------------------------------------------------------
2748 # help - interactive parts of the script _after_ this section please
2749 #-------------------------------------------------------------------------------
2751 # next, emit a usage message if something failed.
2752 if [ "$OPT_HELP" = "yes" ]; then
2753 [ "x$ERROR" = "xyes" ] && echo
2754 if [ "$CFG_NIS" = "no" ]; then
2761 if [ "$CFG_CUPS" = "no" ]; then
2768 if [ "$CFG_ICONV" = "no" ]; then
2775 if [ "$CFG_LARGEFILE" = "no" ]; then
2782 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
2790 if [ "$CFG_XCB" = "no" ]; then
2798 if [ "$CFG_EGLFS" = "no" ]; then
2806 if [ "$CFG_DIRECTFB" = "no" ]; then
2813 if [ "$CFG_XINPUT2" = "no" ]; then
2821 if [ "$CFG_DBUS" = "no" ]; then
2829 if [ "$CFG_SEPARATE_DEBUG_INFO" = "no" ]; then
2837 if [ "$CFG_GLIB" = "no" ]; then
2846 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
2847 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
2848 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
2849 [-release] [-debug] [-debug-and-release]
2850 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
2851 [-largefile] [-no-accessibility] [-accessibility] [-no-sql-<driver>] [-sql-<driver>]
2852 [-plugin-sql-<driver>] [-system-sqlite]
2853 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
2854 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
2855 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
2856 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
2857 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
2858 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
2859 [-no-separate-debug-info] [-no-sse2]
2860 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
2861 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
2862 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
2863 [-no-audio-backend] [-audio-backend]
2864 [-no-javascript-jit] [-javascript-jit] [-no-qml-debug] [-qml-debug]
2865 [-no-optimized-qmake] [-optimized-qmake]
2866 [-no-openssl] [-openssl] [-openssl-linked]
2867 [-no-gtkstyle] [-gtkstyle]
2868 [-qt-pcre] [-system-pcre]
2869 [-device <name>] [-device-option <key=value>]
2870 [additional platform specific options (see below)]
2873 Installation options:
2875 These are optional, but you may specify install directories.
2877 -prefix <dir> ...... This will install everything relative to <dir>
2878 (default $QT_INSTALL_PREFIX)
2880 -hostprefix [dir] .. Tools and libraries needed when developing
2881 applications are installed in [dir]. If [dir] is
2882 not given, the current build directory will be used.
2885 * -prefix-install .... Force a sandboxed "local" installation of
2886 Qt. This will install into
2887 $QT_INSTALL_PREFIX, if this option is
2888 disabled then some platforms will attempt a
2889 "system" install by placing default values to
2890 be placed in a system location other than
2893 You may use these to separate different parts of the install:
2895 -bindir <dir> ......... Executables will be installed to <dir>
2896 (default PREFIX/bin)
2897 -libdir <dir> ......... Libraries will be installed to <dir>
2898 (default PREFIX/lib)
2899 -docdir <dir> ......... Documentation will be installed to <dir>
2900 (default PREFIX/doc)
2901 -headerdir <dir> ...... Headers will be installed to <dir>
2902 (default PREFIX/include)
2903 -plugindir <dir> ...... Plugins will be installed to <dir>
2904 (default PREFIX/plugins)
2905 -importdir <dir> ...... Imports for QML will be installed to <dir>
2906 (default PREFIX/imports)
2907 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
2909 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
2910 (default PREFIX/translations)
2911 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
2912 (default PREFIX/etc/settings)
2913 -examplesdir <dir> .... Examples will be installed to <dir>
2914 (default PREFIX/examples)
2915 -testsdir <dir> ....... Tests will be installed to <dir>
2916 (default PREFIX/tests)
2918 -hostbindir <dir> .. Host executables will be installed to <dir>
2919 (default HOSTPREFIX/bin)
2920 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
2921 (default HOSTPREFIX)
2925 The defaults (*) are usually acceptable. A plus (+) denotes a default value
2926 that needs to be evaluated. If the evaluation succeeds, the feature is
2927 included. Here is a short explanation of each option:
2929 * -release ........... Compile and link Qt with debugging turned off.
2930 -debug ............. Compile and link Qt with debugging turned on.
2931 -debug-and-release . Compile and link two versions of Qt, with and without
2932 debugging turned on (Mac only).
2934 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
2936 -opensource ........ Compile and link the Open-Source Edition of Qt.
2937 -commercial ........ Compile and link the Commercial Edition of Qt.
2940 * -shared ............ Create and use shared Qt libraries.
2941 -static ............ Create and use static Qt libraries.
2943 * -no-fast ........... Configure Qt normally by generating Makefiles for all
2945 -fast .............. Configure Qt quickly by generating Makefiles only for
2946 library and subdirectory targets. All other Makefiles
2947 are created as wrappers, which will in turn run qmake.
2949 -no-largefile ...... Disables large file support.
2950 + -largefile ......... Enables Qt to access files larger than 4 GB.
2952 -no-accessibility .. Do not compile Accessibility support.
2953 * -accessibility ..... Compile Accessibility support.
2955 -no-sql-<driver> ... Disable SQL <driver> entirely.
2956 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
2958 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
2961 Possible values for <driver>:
2962 [ $CFG_SQL_AVAILABLE ]
2964 -system-sqlite ..... Use sqlite from the operating system.
2966 -no-phonon-backend.. Do not build the platform phonon plugin.
2967 + -phonon-backend..... Build the platform phonon plugin.
2969 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
2970 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
2972 -no-qml-debug ...... Do not build the in-process QML debugging support.
2973 + -qml-debug ......... Build the QML debugging support.
2975 -platform target ... The operating system and compiler you are building
2978 See the README file for a list of supported
2979 operating systems and compilers.
2981 -no-sse2 ........... Do not compile with use of SSE2 instructions.
2982 -no-sse3 ........... Do not compile with use of SSE3 instructions.
2983 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
2984 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
2985 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
2986 -no-avx ............ Do not compile with use of AVX instructions.
2987 -no-avx2 ........... Do not compile with use of AVX2 instructions.
2988 -no-neon ........... Do not compile with use of NEON instructions.
2989 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
2990 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
2992 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
2993 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
2995 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
2997 -D <string> ........ Add an explicit define to the preprocessor.
2998 -I <string> ........ Add an explicit include path.
2999 -L <string> ........ Add an explicit library path.
3001 + -pkg-config ........ Use pkg-config to detect include and library paths. By default,
3002 configure determines whether to use pkg-config or not with
3003 some heuristics such as checking the environment variables.
3004 -no-pkg-config ..... Disable use of pkg-config.
3005 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
3006 detection heuristic).
3008 -help, -h .......... Display this information.
3010 Third Party Libraries:
3012 -qt-zlib ........... Use the zlib bundled with Qt.
3013 + -system-zlib ....... Use zlib from the operating system.
3014 See http://www.gzip.org/zlib
3016 -no-gif ............ Do not compile GIF reading support.
3018 -no-libpng ......... Do not compile PNG support.
3019 -qt-libpng ......... Use the libpng bundled with Qt.
3020 + -system-libpng ..... Use libpng from the operating system.
3021 See http://www.libpng.org/pub/png
3023 -no-libjpeg ........ Do not compile JPEG support.
3024 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3025 + -system-libjpeg .... Use libjpeg from the operating system.
3026 See http://www.ijg.org
3028 -no-openssl ........ Do not compile support for OpenSSL.
3029 + -openssl ........... Enable run-time OpenSSL support.
3030 -openssl-linked .... Enabled linked OpenSSL support.
3032 -qt-pcre ........... Use the PCRE library bundled with Qt.
3033 + -system-pcre ....... Use the PCRE library from the operating system.
3037 -make <part> ....... Add part to the list of parts to be built at make time.
3038 ($QT_DEFAULT_BUILD_PARTS)
3039 -nomake <part> ..... Exclude part from the list of parts to be built.
3041 -R <string> ........ Add an explicit runtime library path to the Qt
3043 -l <string> ........ Add an explicit library.
3045 -no-rpath .......... Do not use the library install path as a runtime
3047 + -rpath ............. Link Qt libraries and executables using the library
3048 install path as a runtime library path. Equivalent
3049 to -R install_libpath
3051 -continue .......... Continue as far as possible if an error occurs.
3053 -verbose, -v ....... Print verbose information about each step of the
3056 -silent ............ Reduce the build output so that warnings and errors
3057 can be seen more easily.
3059 * -no-optimized-qmake ... Do not build qmake optimized.
3060 -optimized-qmake ...... Build qmake optimized.
3062 -no-gui ............ Don't build the Qt GUI library
3064 $NSN -no-nis ............ Do not compile NIS support.
3065 $NSY -nis ............... Compile NIS support.
3067 $CUN -no-cups ........... Do not compile CUPS support.
3068 $CUY -cups .............. Compile CUPS support.
3069 Requires cups/cups.h and libcups.so.2.
3071 $CIN -no-iconv .......... Do not compile support for iconv(3).
3072 $CIY -iconv ............. Compile support for iconv(3).
3074 $PHN -no-pch ............ Do not use precompiled header support.
3075 $PHY -pch ............... Use precompiled header support.
3077 $DBN -no-dbus ........... Do not compile the QtDBus module.
3078 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3079 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3081 -reduce-relocations ..... Reduce relocations in the libraries through extra
3082 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3083 experimental; needs GNU ld >= 2.18).
3085 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3087 -device <name> ............... Cross-compile for device <name> (experimental)
3088 -device-option <key=value> ... Add device specific options for the device mkspec
3091 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3092 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3094 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3095 $XCBY -xcb ............... Compile Xcb support.
3097 $EGLFSN -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
3098 $EGLFSY -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
3100 $DFBN -no-directfb ....... Do not compile DirectFB support.
3101 $DFBY -directfb .......... Compile DirectFB support.
3103 -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
3105 -xplatform target ... The target platform when cross-compiling.
3107 -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot.
3109 -no-feature-<feature> Do not compile in <feature>.
3110 -feature-<feature> .. Compile in <feature>. The available features
3111 are described in src/corelib/global/qfeatures.txt
3113 -no-freetype ........ Do not compile in Freetype2 support.
3114 -qt-freetype ........ Use the libfreetype bundled with Qt.
3115 * -system-freetype .... Use libfreetype from the operating system.
3116 See http://www.freetype.org/
3118 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3119 default ($CFG_QCONFIG).
3121 -no-opengl .......... Do not support OpenGL.
3122 -opengl <api> ....... Enable OpenGL support
3123 With no parameter, this will attempt to auto-detect
3124 OpenGL ES 2, or regular desktop OpenGL.
3125 Use es2 for <api> to override auto-detection.
3127 $GBN -no-glib ........... Do not compile Glib support.
3128 $GBY -glib .............. Compile Glib support.
3131 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3134 $X2N -no-xinput2......... Do not compile XInput2 support.
3135 $X2Y -xinput2............ Compile XInput2 support.
3141 if [ "$BUILD_ON_MAC" = "yes" ]; then
3146 -Fstring ........... Add an explicit framework path.
3147 -fw string ......... Add an explicit framework.
3149 * -framework ......... Build Qt as a series of frameworks and
3150 link tools against those frameworks.
3151 -no-framework ...... Do not build Qt as a series of frameworks.
3153 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3154 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3156 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3157 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3158 QT_ENABLE_HARFBUZZ environment variable.
3163 [ "x$ERROR" = "xyes" ] && exit 1
3168 # -----------------------------------------------------------------------------
3169 # LICENSING, INTERACTIVE PART
3170 # -----------------------------------------------------------------------------
3173 echo "This is the Qt ${EditionString} Edition."
3176 if [ "$Edition" = "OpenSource" ]; then
3178 echo "You are licensed to use this software under the terms of"
3179 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3180 if [ -f "$relpath/LICENSE.GPL3" ]; then
3181 echo "You are also licensed to use this software under the terms of"
3182 echo "the GNU General Public License (GPL) versions 3."
3188 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3189 echo "You have already accepted the terms of the $LicenseType license."
3192 if [ -f "$relpath/LICENSE.GPL3" ]; then
3193 echo "Type '3' to view the GNU General Public License version 3."
3195 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3196 echo "Type 'yes' to accept this license offer."
3197 echo "Type 'no' to decline this license offer."
3199 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3203 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3205 elif [ "$acceptance" = "no" ]; then
3206 echo "You are not licensed to use this software."
3209 elif [ "$acceptance" = "3" ]; then
3210 more "$relpath/LICENSE.GPL3"
3211 elif [ "$acceptance" = "L" ]; then
3212 more "$relpath/LICENSE.LGPL"
3215 elif [ "$Edition" = "Preview" ]; then
3216 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3219 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3220 echo "You have already accepted the terms of the $LicenseType license."
3223 echo "You are licensed to use this software under the terms of"
3224 echo "the $TheLicense"
3226 echo "Type '?' to read the Preview License."
3227 echo "Type 'yes' to accept this license offer."
3228 echo "Type 'no' to decline this license offer."
3230 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3234 if [ "$acceptance" = "yes" ]; then
3236 elif [ "$acceptance" = "no" ] ;then
3237 echo "You are not licensed to use this software."
3240 elif [ "$acceptance" = "?" ]; then
3241 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3244 elif [ "$Edition" != "OpenSource" ]; then
3245 if [ -n "$ExpiryDate" ]; then
3246 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3247 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3248 Today=`date +%Y%m%d`
3249 if [ "$Today" -gt "$ExpiryDate" ]; then
3250 case "$LicenseType" in
3251 Commercial|Academic|Educational)
3252 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3254 echo "NOTICE NOTICE NOTICE NOTICE"
3256 echo " Your support and upgrade period has expired."
3258 echo " You are no longer licensed to use this version of Qt."
3259 echo " Please contact qt-info@nokia.com to renew your support"
3260 echo " and upgrades for this license."
3262 echo "NOTICE NOTICE NOTICE NOTICE"
3267 echo "WARNING WARNING WARNING WARNING"
3269 echo " Your support and upgrade period has expired."
3271 echo " You may continue to use your last licensed release"
3272 echo " of Qt under the terms of your existing license"
3273 echo " agreement. But you are not entitled to technical"
3274 echo " support, nor are you entitled to use any more recent"
3275 echo " Qt releases."
3277 echo " Please contact qt-info@nokia.com to renew your"
3278 echo " support and upgrades for this license."
3280 echo "WARNING WARNING WARNING WARNING"
3287 echo "NOTICE NOTICE NOTICE NOTICE"
3289 echo " Your Evaluation license has expired."
3291 echo " You are no longer licensed to use this software. Please"
3292 echo " contact qt-info@nokia.com to purchase license, or install"
3293 echo " the Qt Open Source Edition if you intend to develop free"
3296 echo "NOTICE NOTICE NOTICE NOTICE"
3303 TheLicense=`head -n 1 "$outpath/LICENSE"`
3305 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3306 echo "You have already accepted the terms of the $TheLicense."
3309 echo "You are licensed to use this software under the terms of"
3310 echo "the $TheLicense."
3312 echo "Type '?' to view the $TheLicense."
3313 echo "Type 'yes' to accept this license offer."
3314 echo "Type 'no' to decline this license offer."
3316 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3320 if [ "$acceptance" = "yes" ]; then
3322 elif [ "$acceptance" = "no" ]; then
3323 echo "You are not licensed to use this software."
3326 else [ "$acceptance" = "?" ]
3327 more "$outpath/LICENSE"
3332 # this should be moved somewhere else
3335 AIX_VERSION=`uname -v`
3336 if [ "$AIX_VERSION" -lt "5" ]; then
3337 QMakeVar add QMAKE_LIBS_X11 -lbind
3344 #-------------------------------------------------------------------------------
3345 # generate qconfig.cpp
3346 #-------------------------------------------------------------------------------
3347 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3349 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3351 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3352 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3354 /* Installation date */
3355 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3357 /* Installation Info */
3358 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3359 "qt_prfxpath=$QT_INSTALL_PREFIX",
3360 "qt_docspath=$QT_INSTALL_DOCS",
3361 "qt_hdrspath=$QT_INSTALL_HEADERS",
3362 "qt_libspath=$QT_INSTALL_LIBS",
3363 "qt_binspath=$QT_INSTALL_BINS",
3364 "qt_plugpath=$QT_INSTALL_PLUGINS",
3365 "qt_impspath=$QT_INSTALL_IMPORTS",
3366 "qt_datapath=$QT_INSTALL_DATA",
3367 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3368 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3369 "qt_tstspath=$QT_INSTALL_TESTS",
3370 #ifdef QT_BUILD_QMAKE
3371 "qt_ssrtpath=$CFG_SYSROOT",
3372 "qt_hpfxpath=$QT_HOST_PREFIX",
3373 "qt_hbinpath=$QT_HOST_BINS",
3374 "qt_hdatpath=$QT_HOST_DATA",
3377 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3380 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3382 /* strlen( "qt_lcnsxxxx" ) == 12 */
3383 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3384 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3386 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3389 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3390 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3391 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3393 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3394 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3395 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3398 # -----------------------------------------------------------------------------
3399 if [ "$LicenseType" = "Evaluation" ]; then
3400 EVALKEY=qt_qevalkey=$LicenseKeyExt
3401 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3402 EVALKEY=qt_qevalkey=
3405 if [ -n "$EVALKEY" ]; then
3406 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3407 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3408 /* Evaluation license key */
3409 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3411 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3415 # -----------------------------------------------------------------------------
3417 # -----------------------------------------------------------------------------
3420 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3422 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3423 if [ "$OPT_SHADOW" = "yes" ]; then
3424 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3425 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3426 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3430 # $1: input variable name (awk regexp)
3431 # $2: optional output variable name
3432 # $3: optional value transformation (sed command)
3433 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3434 # is where the resulting variable is written to
3435 setBootstrapVariable()
3437 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3441 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3442 echo "Creating qmake. Please wait..."
3445 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3446 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3447 if [ -f "$QCONFIG_H" ]; then
3448 OLD_QCONFIG_H=$QCONFIG_H
3449 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3452 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3453 # when building qmake, we use #defines for the install paths,
3454 # however they are real functions in the library
3455 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3456 mkdir -p "$outpath/src/corelib/global"
3457 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3458 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3461 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3463 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3464 rm -rf mkspecs/default
3465 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3466 mkdir -p "$outpath/qmake" || exit
3468 for mkfile in GNUmakefile Makefile; do
3471 in_mkfile="${mkfile}.in"
3472 if [ "$mkfile" = "Makefile" ]; then
3473 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3474 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3476 in_mkfile="${mkfile}.unix"
3478 in_mkfile="$relpath/qmake/$in_mkfile"
3479 mkfile="$outpath/qmake/$mkfile"
3480 if [ -f "$mkfile" ]; then
3481 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3484 [ -f "$in_mkfile" ] || continue
3486 echo "########################################################################" > "$mkfile"
3487 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3488 echo "########################################################################" >> "$mkfile"
3491 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3492 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3493 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3495 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3496 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3499 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3500 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3501 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3502 setBootstrapVariable QMAKE_CFLAGS
3503 setBootstrapVariable QMAKE_CXXFLAGS
3504 setBootstrapVariable QMAKE_LFLAGS
3506 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3507 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3508 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3510 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3511 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3512 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3513 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3514 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3515 elif [ "$CFG_DEBUG" = "yes" ]; then
3516 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3517 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3518 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3519 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3522 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3523 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3524 for rpath in $RPATH_FLAGS; do
3525 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3528 if [ "$BUILD_ON_MAC" = "yes" ]; then
3529 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
3530 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
3531 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
3532 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
3533 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
3534 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
3535 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
3536 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
3537 if [ '!' -z "$CFG_SDK" ]; then
3538 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
3539 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
3540 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
3541 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
3542 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
3545 if [ '!' -z "$D_FLAGS" ]; then
3546 for DEF in $D_FLAGS; do
3547 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
3550 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
3551 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
3552 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
3553 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
3555 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
3556 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
3557 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
3558 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
3559 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
3560 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
3561 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
3562 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
3563 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
3564 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
3566 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
3567 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
3568 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
3569 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
3574 QMAKE_BUILD_ERROR=no
3575 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
3576 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
3577 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
3578 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
3581 #-------------------------------------------------------------------------------
3583 #-------------------------------------------------------------------------------
3584 if [ -z "$PKG_CONFIG" ]; then
3585 # See if PKG_CONFIG is set in the mkspec:
3586 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
3588 if [ -z "$PKG_CONFIG" ]; then
3589 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3592 if [ "$CFG_PKGCONFIG" = "no" ]; then
3594 elif [ "$CFG_PKGCONFIG" = "force" ]; then
3596 echo >&2 "You have asked to use pkg-config. Please make sure you have"
3597 echo >&2 "a correctly setup pkg-config environment!"
3599 elif [ -n "$PKG_CONFIG" ]; then
3600 # found a pkg-config
3601 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3602 # when xcompiling, check environment to see if it's actually usable
3603 if [ -z "$PKG_CONFIG_LIBDIR" ]; then
3604 if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
3605 PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
3606 export PKG_CONFIG_LIBDIR
3607 echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
3608 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3609 echo >&2 "Error: PKG_CONFIG_LIBDIR has not been set. This could mean"
3610 echo >&2 "the host's .pc files will be used (even if you set PKG_CONFIG_PATH)."
3611 echo >&2 "Set this variable to the directory that contains target .pc files"
3612 echo >&2 "for pkg-config to function correctly when cross-compiling or"
3613 echo >&2 "use -force-pkg-config to override this test."
3617 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set."
3620 if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3621 if [ -n "$CFG_SYSROOT" ]; then
3622 PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
3623 export PKG_CONFIG_SYSROOT_DIR
3624 echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
3625 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3626 echo >&2 "Error: PKG_CONFIG_SYSROOT_DIR has not been set. Set this variable"
3627 echo >&2 "to your sysroot for pkg-config to function correctly when cross-compiling"
3628 echo >&2 "or use -force-pkg-config to override this test."
3632 echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
3636 elif [ "$CFG_PKGCONFIG" = "yes" ]; then
3637 echo >&2 "Could not detect pkg-config from mkspec or PATH."
3641 if [ -z "$PKG_CONFIG" ]; then
3642 QT_CONFIG="$QT_CONFIG no-pkg-config"
3645 #-------------------------------------------------------------------------------
3646 # write out device config before we run the test.
3647 #-------------------------------------------------------------------------------
3648 if cmp -s "$DEVICE_VARS_FILE" "$outpath/mkspecs/qdevice.pri"; then
3649 rm -f "$DEVICE_VARS_FILE"
3651 mv -f $DEVICE_VARS_FILE "$outpath/mkspecs/qdevice.pri"
3654 #-------------------------------------------------------------------------------
3655 # tests that need qmake
3656 #-------------------------------------------------------------------------------
3658 #-------------------------------------------------------------------------------
3659 # determine the target and host architectures
3660 #-------------------------------------------------------------------------------
3662 # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is
3663 CFG_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3665 [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
3666 if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
3667 # Do the same test again, using the host compiler
3668 CFG_HOST_ARCH=`OUTDIR="$outpath" "$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9_]*\).*,\1,p'`
3669 [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
3671 # not cross compiling, host == target
3672 CFG_HOST_ARCH="$CFG_ARCH"
3675 if [ "$OPT_VERBOSE" = "yes" ]; then
3676 echo "System architecture: '$CFG_ARCH'"
3677 echo "Host architecture: '$CFG_HOST_ARCH'"
3680 #-------------------------------------------------------------------------------
3681 # functionality tests
3682 #-------------------------------------------------------------------------------
3684 # detect availability of float math.h functions
3685 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
3686 CFG_USE_FLOATMATH=yes
3688 CFG_USE_FLOATMATH=no
3691 # detect sse2 support
3692 if [ "${CFG_SSE2}" = "auto" ]; then
3693 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
3700 # detect sse3 support
3701 if [ "${CFG_SSE3}" = "auto" ]; then
3702 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
3709 # detect ssse3 support
3710 if [ "${CFG_SSSE3}" = "auto" ]; then
3711 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
3718 # detect sse4.1 support
3719 if [ "${CFG_SSE4_1}" = "auto" ]; then
3720 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.1"; then
3727 # detect sse4.2 support
3728 if [ "${CFG_SSE4_2}" = "auto" ]; then
3729 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.2"; then
3736 # detect avx support
3737 if [ "${CFG_AVX}" = "auto" ]; then
3738 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
3739 case "$XQMAKESPEC" in
3741 # Some clang versions produce internal compiler errors compiling Qt AVX code
3742 case `$TEST_COMPILER --version` in
3743 Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
3745 if [ "$OPT_VERBOSE" = "yes" ]; then
3746 echo 'AVX support disabled for blacklisted clang compiler'
3763 # detect avx2 support
3764 if [ "${CFG_AVX}" = "no" ]; then
3767 if [ "${CFG_AVX2}" = "auto" ]; then
3768 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx2 "avx2" $L_FLAGS $I_FLAGS $l_FLAGS "-march=core-avx2"; then
3775 # check iWMMXt support
3776 if [ "$CFG_IWMMXT" = "yes" ]; then
3777 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
3778 if [ $? != "0" ]; then
3779 echo "The iWMMXt functionality test failed!"
3780 echo " Please make sure your compiler supports iWMMXt intrinsics!"
3785 # detect neon support
3786 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
3787 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then
3792 elif [ "$CFG_ARCH" != "arm" ]; then
3796 # detect mips_dsp support
3797 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSP}" = "yes" ]; then
3803 # detect mips_dspr2 support
3804 if [ "${CFG_ARCH}" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "yes" ]; then
3810 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
3813 if [ "$CFG_ZLIB" = "no" ]; then
3814 # Note: Qt no longer support builds without zlib
3815 # So we force a "no" to be "auto" here.
3816 # If you REALLY really need no zlib support, you can still disable
3817 # it by doing the following:
3818 # add "no-zlib" to mkspecs/qconfig.pri
3819 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
3821 # There's no guarantee that Qt will build under those conditions
3826 if [ "$CFG_ZLIB" = "auto" ]; then
3827 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3834 if [ "$CFG_LARGEFILE" = "auto" ]; then
3835 #Large files should be enabled for all Linux systems
3839 if [ "$CFG_GUI" = "no" ]; then
3840 QPA_PLATFORM_GUARD=no
3843 # detect how jpeg should be built
3844 if [ "$CFG_JPEG" = "auto" ]; then
3845 if [ "$CFG_SHARED" = "yes" ]; then
3852 if [ "$CFG_LIBJPEG" = "auto" ]; then
3853 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libjpeg "libjpeg" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3860 # detect how gif should be built
3861 if [ "$CFG_GIF" = "auto" ]; then
3862 if [ "$CFG_SHARED" = "yes" ]; then
3870 if [ "$CFG_LIBPNG" = "auto" ]; then
3871 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libpng "libpng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3878 # detect accessibility
3879 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
3880 CFG_ACCESSIBILITY=yes
3883 if [ "$CFG_EGLFS" = "yes" ]; then
3884 if [ "$CFG_EGL" = "no" ]; then
3885 echo "The EGLFS plugin requires EGL support and cannot be built"
3888 if [ "$CFG_OPENGL" != "es2" ]; then
3889 echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
3896 # auto-detect SQL-modules support
3897 for _SQLDR in $CFG_SQL_AVAILABLE; do
3900 if [ "$CFG_SQL_mysql" != "no" ]; then
3901 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
3902 if [ -x "$CFG_MYSQL_CONFIG" ]; then
3903 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
3904 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
3905 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
3906 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
3907 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
3909 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
3910 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3911 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
3912 echo " You need MySql 4 or higher."
3913 echo " If you believe this message is in error you may use the continue"
3914 echo " switch (-continue) to $0 to continue."
3919 QT_LFLAGS_MYSQL_R=""
3923 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3924 QMakeVar add CONFIG use_libmysqlclient_r
3925 if [ "$CFG_SQL_mysql" = "auto" ]; then
3926 CFG_SQL_mysql=plugin
3928 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
3929 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3930 if [ "$CFG_SQL_mysql" = "auto" ]; then
3931 CFG_SQL_mysql=plugin
3934 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3935 echo "MySQL support cannot be enabled due to functionality tests!"
3936 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3937 echo " If you believe this message is in error you may use the continue"
3938 echo " switch (-continue) to $0 to continue."
3943 QT_LFLAGS_MYSQL_R=""
3951 if [ "$CFG_SQL_psql" != "no" ]; then
3952 # Be careful not to use native pg_config when cross building.
3953 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
3954 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
3955 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
3957 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
3958 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
3959 # But, respect PSQL_LIBS if set
3960 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
3961 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3962 if [ "$CFG_SQL_psql" = "auto" ]; then
3966 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3967 echo "PostgreSQL support cannot be enabled due to functionality tests!"
3968 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3969 echo " If you believe this message is in error you may use the continue"
3970 echo " switch (-continue) to $0 to continue."
3981 if [ "$CFG_SQL_odbc" != "no" ]; then
3982 if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3983 if [ "$CFG_SQL_odbc" = "auto" ]; then
3987 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
3988 QT_LFLAGS_ODBC="-liodbc"
3989 if [ "$CFG_SQL_odbc" = "auto" ]; then
3993 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
3994 echo "ODBC support cannot be enabled due to functionality tests!"
3995 echo " Turn on verbose messaging (-v) to $0 to see the final report."
3996 echo " If you believe this message is in error you may use the continue"
3997 echo " switch (-continue) to $0 to continue."
4007 if [ "$CFG_SQL_oci" != "no" ]; then
4008 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4009 if [ "$CFG_SQL_oci" = "auto" ]; then
4013 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4014 echo "Oracle (OCI) 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."
4026 if [ "$CFG_SQL_tds" != "no" ]; then
4027 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4028 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4029 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4030 if [ "$CFG_SQL_tds" = "auto" ]; then
4034 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4035 echo "TDS support cannot be enabled due to functionality tests!"
4036 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4037 echo " If you believe this message is in error you may use the continue"
4038 echo " switch (-continue) to $0 to continue."
4047 if [ "$CFG_SQL_db2" != "no" ]; then
4048 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4049 if [ "$CFG_SQL_db2" = "auto" ]; then
4053 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4054 echo "ODBC support cannot be enabled due to functionality tests!"
4055 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4056 echo " If you believe this message is in error you may use the continue"
4057 echo " switch (-continue) to $0 to continue."
4066 if [ "$CFG_SQL_ibase" != "no" ]; then
4067 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4068 if [ "$CFG_SQL_ibase" = "auto" ]; then
4069 CFG_SQL_ibase=plugin
4072 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4073 echo "InterBase support cannot be enabled due to functionality tests!"
4074 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4075 echo " If you believe this message is in error you may use the continue"
4076 echo " switch (-continue) to $0 to continue."
4085 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4086 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4087 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4088 CFG_SQL_sqlite2=plugin
4091 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4092 echo "SQLite2 support cannot be enabled due to functionality tests!"
4093 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4094 echo " If you believe this message is in error you may use the continue"
4095 echo " switch (-continue) to $0 to continue."
4104 if [ "$CFG_SQL_sqlite" != "no" ]; then
4105 SQLITE_AUTODETECT_FAILED="no"
4106 if [ "$CFG_SQLITE" = "system" ]; then
4107 if [ -n "$PKG_CONFIG" ]; then
4108 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4109 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4111 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4112 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4113 CFG_SQL_sqlite=plugin
4115 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4117 SQLITE_AUTODETECT_FAILED="yes"
4120 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4121 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4122 CFG_SQL_sqlite=plugin
4125 SQLITE_AUTODETECT_FAILED="yes"
4129 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4130 echo "SQLite support cannot be enabled due to functionality tests!"
4131 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4132 echo " If you believe this message is in error you may use the continue"
4133 echo " switch (-continue) to $0 to continue."
4139 if [ "$OPT_VERBOSE" = "yes" ]; then
4140 echo "unknown SQL driver: $_SQLDR"
4146 # auto-detect NIS support
4147 if [ "$CFG_NIS" != "no" ]; then
4148 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4151 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4152 echo "NIS support cannot be enabled due to functionality tests!"
4153 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4154 echo " If you believe this message is in error you may use the continue"
4155 echo " switch (-continue) to $0 to continue."
4163 # auto-detect CUPS support
4164 if [ "$CFG_CUPS" != "no" ]; then
4165 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4168 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4169 echo "Cups support cannot be enabled due to functionality tests!"
4170 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4171 echo " If you believe this message is in error you may use the continue"
4172 echo " switch (-continue) to $0 to continue."
4180 # auto-detect iconv(3) support
4181 if [ "$CFG_ICONV" != "no" ]; then
4182 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4184 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4186 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/sun-libiconv" "SUN libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4188 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4191 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4192 echo "Iconv support cannot be enabled due to functionality tests!"
4193 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4194 echo " If you believe this message is in error you may use the continue"
4195 echo " switch (-continue) to $0 to continue."
4203 # auto-detect libdbus-1 support
4204 if [ "$CFG_DBUS" != "no" ]; then
4205 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4206 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4207 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4209 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then
4210 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4211 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4212 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4214 if [ "$CFG_DBUS" = "auto" ]; then
4216 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4217 # CFG_DBUS is "yes" or "linked" here
4219 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4220 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4221 echo " If you believe this message is in error you may use the continue"
4222 echo " switch (-continue) to $0 to continue."
4228 # auto-detect Glib support
4229 if [ "$CFG_GLIB" != "no" ]; then
4230 if [ -n "$PKG_CONFIG" ]; then
4231 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4232 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4234 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB; then
4236 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4237 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4239 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4240 echo "Glib support cannot be enabled due to functionality tests!"
4241 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4242 echo " If you believe this message is in error you may use the continue"
4243 echo " switch (-continue) to $0 to continue."
4251 # auto-detect GTK style support
4252 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
4253 if [ -n "$PKG_CONFIG" ]; then
4254 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
4255 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
4257 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
4259 QT_CONFIG="$QT_CONFIG gtkstyle"
4260 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
4261 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
4263 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4264 echo "Gtk theme support cannot be enabled due to functionality tests!"
4265 echo " Turn on verbose messaging (-v) to $0 to see the fin al report."
4266 echo " If you believe this message is in error you may use the continue"
4267 echo " switch (-continue) to $0 to continue."
4273 elif [ "$CFG_GLIB" = "no" ]; then
4278 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4279 if [ -n "$PKG_CONFIG" ]; then
4280 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4281 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4283 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER; then
4285 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4286 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4288 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4289 echo "Gstreamer support cannot be enabled due to functionality tests!"
4290 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4291 echo " If you believe this message is in error you may use the continue"
4292 echo " switch (-continue) to $0 to continue."
4298 elif [ "$CFG_GLIB" = "no" ]; then
4302 # auto-detect libicu support
4303 if [ "$CFG_ICU" != "no" ]; then
4304 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4305 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4307 if [ "$CFG_ICU" = "auto" ]; then
4309 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4312 echo "The ICU library support cannot be enabled."
4313 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4314 echo " If you believe this message is in error you may use the continue"
4315 echo " switch (-continue) to $0 to continue."
4321 # Auto-detect PulseAudio support
4322 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4323 if [ -n "$PKG_CONFIG" ]; then
4324 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4325 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4327 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO; then
4329 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4330 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4332 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4333 echo "PulseAudio support cannot be enabled due to functionality tests!"
4334 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4335 echo " If you believe this message is in error you may use the continue"
4336 echo " switch (-continue) to $0 to continue."
4345 if [ "$XPLATFORM_MINGW" = "yes" ]; then
4346 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4347 if [ "$CFG_GUI" = "no" ]; then
4348 if [ "$CFG_OPENGL" = "auto" ]; then
4351 if [ "$CFG_OPENGL" != "no" ]; then
4352 echo "OpenGL enabled, but GUI disabled."
4353 echo " You might need to either enable the GUI or disable OpenGL"
4357 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4358 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4360 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
4363 if [ "$CFG_OPENGL" = "yes" ]; then
4364 echo "All the OpenGL functionality tests failed!"
4365 echo " You might need to modify the include and library search paths by editing"
4366 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4367 echo " ${XQMAKESPEC}."
4374 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4375 if [ "$CFG_OPENGL" = "desktop" ]; then
4376 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4377 if [ $? != "0" ]; then
4378 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4385 elif [ "$CFG_OPENGL" = "es2" ]; then
4387 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4388 if [ $? != "0" ]; then
4389 echo "The OpenGL ES 2.0 functionality test failed!"
4390 echo " You might need to modify the include and library search paths by editing"
4391 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4392 echo " ${XQMAKESPEC}."
4395 elif [ "$CFG_OPENGL" = "desktop" ]; then
4396 # Desktop OpenGL support
4397 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4398 if [ $? != "0" ]; then
4399 echo "The OpenGL functionality test failed!"
4400 echo " You might need to modify the include and library search paths by editing"
4401 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4402 echo " ${XQMAKESPEC}."
4407 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4408 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4409 if [ $? != "0" ]; then
4410 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4417 fi # X11/MINGW OpenGL
4419 if [ "$BUILD_ON_MAC" = "yes" ]; then
4420 if [ "$CFG_PHONON" != "no" ]; then
4421 # Always enable Phonon (unless it was explicitly disabled)
4425 if [ "$CFG_COREWLAN" = "auto" ]; then
4426 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/corewlan "CoreWlan" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4434 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4435 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4436 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS; then
4438 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
4441 if [ "$CFG_OPENGL" = "yes" ]; then
4442 echo "All the OpenGL functionality tests failed!"
4443 echo " You might need to modify the include and library search paths by editing"
4444 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4445 echo " ${XQMAKESPEC}."
4450 elif [ "$CFG_OPENGL" = "es2" ]; then
4452 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
4453 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4454 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
4455 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
4456 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
4457 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
4458 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
4459 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
4462 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
4463 if [ $? != "0" ]; then
4464 echo "The OpenGL ES 2.0 functionality test failed!"
4465 echo " You might need to modify the include and library search paths by editing"
4466 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4467 echo " ${XQMAKESPEC}."
4470 elif [ "$CFG_OPENGL" = "desktop" ]; then
4471 # Desktop OpenGL support
4472 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS
4473 if [ $? != "0" ]; then
4474 echo "The OpenGL functionality test failed!"
4475 echo " You might need to modify the include and library search paths by editing"
4476 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4477 echo " ${XQMAKESPEC}."
4482 # auto-detect FontConfig support
4483 if [ "$CFG_FONTCONFIG" != "no" ]; then
4484 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4485 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4486 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4488 QT_CFLAGS_FONTCONFIG=
4489 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4491 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4492 QT_CONFIG="$QT_CONFIG fontconfig"
4493 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
4494 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
4495 CFG_LIBFREETYPE=system
4500 # Save these for a check later
4501 ORIG_CFG_XCB="$CFG_XCB"
4502 ORIG_CFG_EGLFS="$CFG_EGLFS"
4503 ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
4505 if [ "$CFG_LIBUDEV" != "no" ]; then
4506 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
4507 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4508 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
4509 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
4510 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
4512 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_INCDIR_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
4514 QT_CONFIG="$QT_CONFIG libudev"
4515 elif [ "$CFG_LIBUDEV" = "yes" ]; then
4516 echo "The libudev functionality test failed!"
4520 QMakeVar add DEFINES QT_NO_LIBUDEV
4524 if [ "$CFG_EVDEV" != "no" ]; then
4525 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
4527 QT_CONFIG="$QT_CONFIG evdev"
4528 elif [ "$CFG_EVDEV" = "yes" ]; then
4529 echo "The evdev functionality test failed!"
4533 QMakeVar add DEFINES QT_NO_EVDEV
4537 # Check we actually have X11 :-)
4538 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS; then
4539 QT_CONFIG="$QT_CONFIG xlib"
4542 # auto-detect Xrender support
4543 if [ "$CFG_XRENDER" != "no" ]; then
4544 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS; then
4546 QT_CONFIG="$QT_CONFIG xrender"
4548 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4549 echo "Xrender support cannot be enabled due to functionality tests!"
4550 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4551 echo " If you believe this message is in error you may use the continue"
4552 echo " switch (-continue) to $0 to continue."
4560 if [ "$CFG_XCB" != "no" ]; then
4561 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
4562 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
4563 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
4565 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4567 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4568 QT_CONFIG="$QT_CONFIG xcb-render"
4571 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4573 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
4576 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
4577 QT_CONFIG="$QT_CONFIG xcb-xlib"
4580 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4581 # auto-detect XInput2/Xinput support
4582 if [ "$CFG_XINPUT2" != "no" ]; then
4583 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS; then
4587 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4588 echo "XInput2 support cannot be enabled due to functionality tests!"
4589 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4590 echo " If you believe this message is in error you may use the continue"
4591 echo " switch (-continue) to $0 to continue."
4600 if [ "$CFG_XCB" = "yes" ]; then
4601 echo "The XCB test failed!"
4602 echo " You might need to install dependency packages."
4603 echo " See src/plugins/platforms/xcb/README."
4607 QMakeVar add DEFINES QT_NO_XCB
4611 if [ "$CFG_DIRECTFB" != "no" ]; then
4612 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
4613 QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
4614 QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
4615 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/directfb" "DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then
4617 elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4618 echo " DirectFB support cannot be enabled due to functionality tests!"
4619 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4620 echo " If you believe this message is in error you may use the continue"
4621 echo " switch (-continue) to $0 to continue."
4631 # Detect libxkbcommon
4632 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
4633 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
4634 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
4635 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
4636 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
4638 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
4642 if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
4643 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
4644 QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
4645 QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
4646 QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
4647 QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
4648 QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
4649 fi # detect EGL support
4650 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/qpa/egl" "EGL" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
4652 elif [ "$CFG_EGL" = "yes" ]; then
4653 echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
4654 echo " You might need to modify the include and library search paths by editing"
4655 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
4660 elif [ "$CFG_OPENGL" = "desktop" ]; then
4661 if [ "$CFG_EGL" = "yes" ]; then
4662 echo "EGL support was requested but Qt is being configured for desktop OpenGL."
4663 echo "Either disable EGL support or enable OpenGL ES support."
4669 if [ "$CFG_EGLFS" != "no" ]; then
4670 if [ "$CFG_OPENGL" = "es2" ]; then
4671 CFG_EGLFS="$CFG_EGL"
4677 # Determine the default QPA platform
4678 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4680 QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
4681 if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
4682 if [ "$BUILD_ON_MAC" = "yes" ]; then
4683 QT_QPA_DEFAULT_PLATFORM="cocoa"
4684 elif [ "$UNAME_SYSTEM" = "QNX" ]; then
4685 QT_QPA_DEFAULT_PLATFORM="qnx"
4687 QT_QPA_DEFAULT_PLATFORM="xcb"
4692 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
4693 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
4694 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
4695 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
4697 if [ "$CFG_DIRECTFB" = "yes" ]; then
4698 QT_CONFIG="$QT_CONFIG directfb"
4699 QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
4700 QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
4703 if [ "$BUILD_ON_MAC" = "yes" ]; then
4704 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4705 QT_CONFIG="$QT_CONFIG coreservices"
4707 QMakeVar add DEFINES QT_NO_CORESERVICES
4711 if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
4712 if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ]; then
4713 if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
4714 ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] ); then
4715 echo "No QPA platform plugin enabled!"
4716 echo " If you really want to build without a QPA platform plugin you must pass"
4717 echo " -no-qpa-platform-guard to configure. Doing this will"
4718 echo " produce a Qt that can not run GUI applications."
4719 echo " The dependencies needed for xcb to build are listed in"
4720 echo " src/plugins/platforms/xcb/README"
4726 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
4729 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
4730 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
4731 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4732 CFG_LIBFREETYPE=system
4738 if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS &&
4739 [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4740 echo "STL functionality check failed! Cannot build Qt with this STL library."
4741 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4746 # detect POSIX clock_gettime()
4747 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
4748 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $l_FLAGS; then
4749 CFG_CLOCK_GETTIME=yes
4751 CFG_CLOCK_GETTIME=no
4755 # detect POSIX monotonic clocks
4756 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
4757 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-monotonic "POSIX Monotonic Clock" $L_FLAGS $I_FLAGS $l_FLAGS; then
4758 CFG_CLOCK_MONOTONIC=yes
4760 CFG_CLOCK_MONOTONIC=no
4762 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
4763 CFG_CLOCK_MONOTONIC=no
4767 if [ "$CFG_MREMAP" = "auto" ]; then
4768 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
4775 # find if the platform provides getaddrinfo (ipv6 dns lookups)
4776 if [ "$CFG_GETADDRINFO" != "no" ]; then
4777 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
4780 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4781 echo "getaddrinfo support cannot be enabled due to functionality tests!"
4782 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4783 echo " If you believe this message is in error you may use the continue"
4784 echo " switch (-continue) to $0 to continue."
4792 # find if the platform provides inotify
4793 if [ "$CFG_INOTIFY" != "no" ]; then
4794 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
4797 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4798 echo "inotify support cannot be enabled due to functionality tests!"
4799 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4800 echo " If you believe this message is in error you may use the continue"
4801 echo " switch (-continue) to $0 to continue."
4809 # find if the platform provides if_nametoindex (ipv6 interface name support)
4810 if [ "$CFG_IPV6IFNAME" != "no" ]; then
4811 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6ifname "IPv6 interface name" $L_FLAGS $I_FLAGS $l_FLAGS; then
4814 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4815 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
4816 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4817 echo " If you believe this message is in error you may use the continue"
4818 echo " switch (-continue) to $0 to continue."
4826 # find if the platform provides getifaddrs (network interface enumeration)
4827 if [ "$CFG_GETIFADDRS" != "no" ]; then
4828 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
4831 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4832 echo "getifaddrs support cannot be enabled due to functionality tests!"
4833 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4834 echo " If you believe this message is in error you may use the continue"
4835 echo " switch (-continue) to $0 to continue."
4844 if [ "$CFG_OPENSSL" != "no" ]; then
4845 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4846 if [ "$CFG_OPENSSL" = "auto" ]; then
4850 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4851 echo "OpenSSL support cannot be enabled due to functionality tests!"
4852 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4853 echo " If you believe this message is in error you may use the continue"
4854 echo " switch (-continue) to $0 to continue."
4863 if [ "$CFG_PCRE" != "qt" ]; then
4864 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
4867 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4868 echo "PCRE support cannot be enabled due to functionality tests!"
4869 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4870 echo " If you believe this message is in error you may use the continue"
4871 echo " switch (-continue) to $0 to continue."
4879 # detect OpenVG support
4880 if [ "$CFG_OPENVG" != "no" ]; then
4881 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4882 if [ "$CFG_OPENVG" = "auto" ]; then
4885 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4886 if [ "$CFG_OPENVG" = "auto" ]; then
4889 CFG_OPENVG_ON_OPENGL=yes
4890 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4891 if [ "$CFG_OPENVG" = "auto" ]; then
4894 CFG_OPENVG_LC_INCLUDES=yes
4895 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4896 if [ "$CFG_OPENVG" = "auto" ]; then
4899 CFG_OPENVG_LC_INCLUDES=yes
4900 CFG_OPENVG_ON_OPENGL=yes
4902 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4903 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
4904 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4905 echo " If you believe this message is in error you may use the continue"
4906 echo " switch (-continue) to $0 to continue."
4912 if [ "$CFG_OPENVG" = "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
4913 CFG_OPENVG_SHIVA=yes
4917 if [ "$CFG_ALSA" = "auto" ]; then
4918 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
4925 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
4926 if [ "$CFG_ARCH" = "arm" ]; then
4927 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
4928 if [ $? != "0" ]; then
4929 CFG_JAVASCRIPTCORE_JIT=no
4932 case "$XPLATFORM" in
4934 CFG_JAVASCRIPTCORE_JIT=no
4940 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
4941 QMakeVar set JAVASCRIPTCORE_JIT yes
4942 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
4943 QMakeVar set JAVASCRIPTCORE_JIT no
4946 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
4947 CFG_AUDIO_BACKEND=yes
4950 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
4951 echo "Warning: largefile support cannot be disabled for win32."
4955 #-------------------------------------------------------------------------------
4956 # ask for all that hasn't been auto-detected or specified in the arguments
4957 #-------------------------------------------------------------------------------
4960 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
4961 QT_CONFIG="$QT_CONFIG phonon-backend"
4964 # disable accessibility
4965 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
4966 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
4968 QT_CONFIG="$QT_CONFIG accessibility"
4972 if [ "$CFG_EGL" = "yes" ]; then
4973 QT_CONFIG="$QT_CONFIG egl"
4975 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
4979 if [ "$CFG_EGLFS" = "yes" ]; then
4980 QT_CONFIG="$QT_CONFIG eglfs"
4982 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
4986 if [ "$CFG_OPENVG" = "no" ]; then
4987 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
4989 QT_CONFIG="$QT_CONFIG openvg"
4990 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
4991 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
4993 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
4994 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
4996 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
4997 QT_CONFIG="$QT_CONFIG shivavg"
4998 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5003 if [ "$CFG_OPENGL" = "no" ]; then
5004 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5006 QT_CONFIG="$QT_CONFIG opengl"
5009 if [ "$CFG_OPENGL" = "es2" ]; then
5010 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5013 if [ "$CFG_OPENGL" = "es2" ]; then
5014 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5015 QT_CONFIG="$QT_CONFIG opengles2"
5018 # safe execution environment
5019 if [ "$CFG_SXE" != "no" ]; then
5020 QT_CONFIG="$QT_CONFIG sxe"
5023 # build up the variables for output
5024 if [ "$CFG_DEBUG" = "yes" ]; then
5025 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5026 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5027 elif [ "$CFG_DEBUG" = "no" ]; then
5028 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5029 QMAKE_CONFIG="$QMAKE_CONFIG release"
5031 if [ "$CFG_SHARED" = "yes" ]; then
5032 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5033 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5034 elif [ "$CFG_SHARED" = "no" ]; then
5035 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5036 QMAKE_CONFIG="$QMAKE_CONFIG static"
5039 #FIXME: qpa is implicit this should all be removed
5040 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5041 QT_CONFIG="$QT_CONFIG qpa"
5042 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5043 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5045 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5046 # Do not set this here for Windows. Let qmake do it so
5047 # debug and release precompiled headers are kept separate.
5048 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5050 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5051 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5052 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5053 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5054 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5055 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5057 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5058 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5060 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5061 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5062 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5063 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5064 QMakeVar add QMAKE_CFLAGS -g
5065 QMakeVar add QMAKE_CXXFLAGS -g
5066 QT_CONFIG="$QT_CONFIG separate_debug_info"
5068 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5069 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5071 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5072 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5073 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5074 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5075 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5076 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5077 [ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
5078 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5079 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5080 if [ "$CFG_ARCH" = "mips" ]; then
5081 [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
5082 [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
5084 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5085 QT_CONFIG="$QT_CONFIG clock-gettime"
5087 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5088 QT_CONFIG="$QT_CONFIG clock-monotonic"
5090 if [ "$CFG_MREMAP" = "yes" ]; then
5091 QT_CONFIG="$QT_CONFIG mremap"
5093 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5094 QT_CONFIG="$QT_CONFIG getaddrinfo"
5096 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5097 QT_CONFIG="$QT_CONFIG ipv6ifname"
5099 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5100 QT_CONFIG="$QT_CONFIG getifaddrs"
5102 if [ "$CFG_INOTIFY" = "yes" ]; then
5103 QT_CONFIG="$QT_CONFIG inotify"
5105 if [ "$CFG_LIBJPEG" = "no" ]; then
5107 elif [ "$CFG_LIBJPEG" = "system" ]; then
5108 QT_CONFIG="$QT_CONFIG system-jpeg"
5110 if [ "$CFG_JPEG" = "no" ]; then
5111 QT_CONFIG="$QT_CONFIG no-jpeg"
5112 elif [ "$CFG_JPEG" = "yes" ]; then
5113 QT_CONFIG="$QT_CONFIG jpeg"
5115 if [ "$CFG_LIBPNG" = "no" ]; then
5118 if [ "$CFG_LIBPNG" = "system" ]; then
5119 QT_CONFIG="$QT_CONFIG system-png"
5121 if [ "$CFG_PNG" = "no" ]; then
5122 QT_CONFIG="$QT_CONFIG no-png"
5123 elif [ "$CFG_PNG" = "yes" ]; then
5124 QT_CONFIG="$QT_CONFIG png"
5126 if [ "$CFG_GIF" = "no" ]; then
5127 QT_CONFIG="$QT_CONFIG no-gif"
5128 elif [ "$CFG_GIF" = "yes" ]; then
5129 QT_CONFIG="$QT_CONFIG gif"
5131 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5132 QT_CONFIG="$QT_CONFIG no-freetype"
5133 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5134 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5135 QT_CONFIG="$QT_CONFIG system-freetype"
5137 QT_CONFIG="$QT_CONFIG freetype"
5139 if [ "$CFG_GUI" = "auto" ]; then
5142 if [ "$CFG_GUI" = "no" ]; then
5143 QT_CONFIG="$QT_CONFIG no-gui"
5146 if [ "$CFG_WIDGETS" = "no" ]; then
5147 QT_CONFIG="$QT_CONFIG no-widgets"
5148 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
5151 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5152 #On Mac we implicitly link against libz, so we
5153 #never use the 3rdparty stuff.
5154 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5156 if [ "$CFG_ZLIB" = "yes" ]; then
5157 QT_CONFIG="$QT_CONFIG zlib"
5158 elif [ "$CFG_ZLIB" = "system" ]; then
5159 QT_CONFIG="$QT_CONFIG system-zlib"
5162 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5163 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5164 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5165 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5166 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5167 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5168 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5169 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5170 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5171 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5172 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5173 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5174 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5175 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5177 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5178 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5179 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5181 if [ "$PLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
5182 if [ "$CFG_RPATH" = "yes" ]; then
5183 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5184 # set the default rpath to the library installation directory
5185 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5187 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5188 if [ -n "$RPATH_FLAGS" ]; then
5190 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5194 elif [ "$CFG_RPATH" = "yes" ]; then
5195 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5199 if [ "$CFG_RPATH" = "yes" ]; then
5200 # set the default rpath to the library installation directory
5201 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5203 if [ -n "$RPATH_FLAGS" ]; then
5204 # add the user defined rpaths
5205 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5209 if [ '!' -z "$I_FLAGS" ]; then
5210 # add the user define include paths
5211 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5212 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5215 if [ '!' -z "$W_FLAGS" ]; then
5216 # add the user defined warning flags
5217 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5218 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5219 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5222 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5223 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5224 # Follow default behavior of configure.exe by overriding with "rtti".
5225 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5228 if [ "$CFG_ALSA" = "yes" ]; then
5229 QT_CONFIG="$QT_CONFIG alsa"
5232 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5233 QT_CONFIG="$QT_CONFIG pulseaudio"
5236 if [ "$CFG_COREWLAN" = "yes" ]; then
5237 QT_CONFIG="$QT_CONFIG corewlan"
5240 if [ "$CFG_ICU" = "yes" ]; then
5241 QT_CONFIG="$QT_CONFIG icu"
5244 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5245 QT_CONFIG="$QT_CONFIG force_asserts"
5248 if [ "$CFG_PCRE" = "qt" ]; then
5249 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5253 # Some Qt modules are too advanced in C++ for some old compilers
5254 # Detect here the platforms where they are known to work.
5256 # See Qt documentation for more information on which features are
5257 # supported and on which compilers.
5259 canBuildQtConcurrent="yes"
5260 canUseV8Snapshot="yes"
5262 case "$XPLATFORM" in
5264 # PA-RISC's assembly is too limited
5265 # gcc 3.4 on that platform can't build QtXmlPatterns
5266 # the assembly it generates cannot be compiled
5268 # Check gcc's version
5269 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5273 canBuildQtXmlPatterns="no"
5277 canBuildQtXmlPatterns="no"
5281 unsupported/vxworks-*-g++*)
5284 unsupported/vxworks-*-dcc*)
5286 canBuildQtXmlPatterns="no"
5289 # Check gcc's version
5290 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5298 canBuildQtXmlPatterns="no"
5303 # Check the compiler version
5304 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
5307 canBuildQtXmlPatterns="no"
5308 canBuildQtConcurrent="no"
5312 canBuildQtConcurrent="no"
5318 canBuildQtXmlPatterns="no"
5319 canBuildQtConcurrent="no"
5325 # Get the xlC version
5326 cat > xlcver.c <<EOF
5330 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
5335 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
5336 xlcver=`./xlcver 2>/dev/null`
5339 if [ "$OPT_VERBOSE" = "yes" ]; then
5340 if [ -n "$xlcver" ]; then
5341 echo Found IBM xlC version: $xlcver.
5343 echo Could not determine IBM xlC version, assuming oldest supported.
5350 canBuildQtXmlPatterns="no"
5351 canBuildQtConcurrent="no"
5355 canBuildQtConcurrent="no"
5361 canBuildQtConcurrent="no"
5365 if [ "$CFG_GUI" = "no" ]; then
5366 # WebKit requires QtGui
5370 if [ "$CFG_SHARED" = "no" ]; then
5372 echo "WARNING: Using static linking will disable the WebKit module."
5377 CFG_CONCURRENT="yes"
5378 if [ "$canBuildQtConcurrent" = "no" ]; then
5379 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
5382 QT_CONFIG="$QT_CONFIG concurrent"
5386 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
5387 QT_CONFIG="$QT_CONFIG audio-backend"
5391 if [ "$CFG_WEBKIT" = "debug" ]; then
5392 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
5396 QT_CONFIG="$QT_CONFIG v8"
5397 # Detect snapshot support
5398 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
5399 case "$CFG_HOST_ARCH,$CFG_ARCH" in
5402 *) canUseV8Snapshot="no"
5406 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
5407 # QEMU crashes when building inside Scratchbox with an ARM target
5408 canUseV8Snapshot="no"
5411 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
5412 CFG_V8SNAPSHOT="$canUseV8Snapshot"
5414 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
5415 echo "Error: V8 snapshot was requested, but is not supported on this platform."
5418 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
5419 QT_CONFIG="$QT_CONFIG v8snapshot"
5423 if [ "$CFG_QML_DEBUG" = "no" ]; then
5424 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER"
5430 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
5432 case "$COMPILER_VERSION" in
5434 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
5435 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
5436 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
5439 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
5440 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
5441 QT_GCC_PATCH_VERSION=0
5451 #-------------------------------------------------------------------------------
5452 # part of configuration information goes into qconfig.h
5453 #-------------------------------------------------------------------------------
5455 case "$CFG_QCONFIG" in
5457 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
5460 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
5461 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
5462 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
5463 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
5464 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
5465 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
5467 echo "#endif" >>"$tmpconfig"
5471 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5475 # define QT_EDITION $QT_EDITION
5479 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
5480 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5482 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5483 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
5486 if [ "$CFG_FRAMEWORK" = "yes" ]; then
5487 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
5490 if [ "$BUILD_ON_MAC" = "yes" ]; then
5491 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
5492 #if defined(__LP64__)
5493 # define QT_POINTER_SIZE 8
5495 # define QT_POINTER_SIZE 4
5499 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5500 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
5503 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
5504 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
5505 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
5509 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
5511 if [ "$CFG_DEV" = "yes" ]; then
5512 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
5515 # Add QPA to config.h
5516 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
5518 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
5519 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
5522 # Add turned on SQL drivers
5523 for DRIVER in $CFG_SQL_AVAILABLE; do
5524 eval "VAL=\$CFG_SQL_$DRIVER"
5527 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5528 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
5529 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
5532 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
5538 QMakeVar set sql-drivers "$SQL_DRIVERS"
5539 QMakeVar set sql-plugins "$SQL_PLUGINS"
5541 # Add other configuration options to the qconfig.h file
5542 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
5543 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
5544 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
5545 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
5546 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
5547 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
5549 # X11/Unix/Mac only configs
5550 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
5551 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
5552 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
5553 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
5554 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
5555 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
5556 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
5557 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
5558 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
5559 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
5560 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
5561 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
5562 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
5563 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
5565 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
5566 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
5567 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
5568 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
5569 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
5570 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
5571 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
5572 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
5573 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
5574 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
5575 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
5576 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
5577 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
5579 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
5580 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
5581 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
5582 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
5583 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
5584 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
5585 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
5586 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
5588 # sort QCONFIG_FLAGS for neatness if we can
5589 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
5590 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
5592 if [ -n "$QCONFIG_FLAGS" ]; then
5593 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5594 #ifndef QT_BOOTSTRAPPED
5597 for cfg in $QCONFIG_FLAGS; do
5598 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
5599 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
5600 # figure out define logic, so we can output the correct
5601 # ifdefs to override the global defines in a project
5603 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
5604 # QT_NO_option can be forcefully turned on by QT_option
5605 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
5606 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
5607 # QT_option can be forcefully turned off by QT_NO_option
5608 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
5611 if [ -z $cfgdNeg ]; then
5612 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5619 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5620 #if defined($cfgd) && defined($cfgdNeg)
5622 #elif !defined($cfgd) && !defined($cfgdNeg)
5629 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5630 #endif // QT_BOOTSTRAPPED
5635 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
5636 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5637 #define QT_VISIBILITY_AVAILABLE
5642 if [ -n "$QT_LIBINFIX" ]; then
5643 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
5644 #define QT_LIBINFIX "$QT_LIBINFIX"
5649 echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new"
5651 # avoid unecessary rebuilds by copying only if qconfig.h has changed
5652 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
5653 rm -f "$outpath/src/corelib/global/qconfig.h.new"
5655 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
5656 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
5657 chmod -w "$outpath/src/corelib/global/qconfig.h"
5658 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
5659 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
5663 #-------------------------------------------------------------------------------
5664 # save configuration into qconfig.pri
5665 #-------------------------------------------------------------------------------
5666 QTCONFIG="$outpath/mkspecs/qconfig.pri"
5667 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
5668 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
5669 if [ "$CFG_DEBUG" = "yes" ]; then
5670 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
5671 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5672 QT_CONFIG="$QT_CONFIG release"
5674 QT_CONFIG="$QT_CONFIG debug"
5675 elif [ "$CFG_DEBUG" = "no" ]; then
5676 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
5677 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5678 QT_CONFIG="$QT_CONFIG debug"
5680 QT_CONFIG="$QT_CONFIG release"
5682 if [ "$CFG_FRAMEWORK" = "no" ]; then
5683 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
5685 QT_CONFIG="$QT_CONFIG qt_framework"
5686 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
5688 if [ "$CFG_DEV" = "yes" ]; then
5689 QT_CONFIG="$QT_CONFIG private_tests"
5692 cat >>"$QTCONFIG.tmp" <<EOF
5694 CONFIG += $QTCONFIG_CONFIG
5696 QT_HOST_ARCH = $CFG_HOST_ARCH
5697 QT_EDITION = $Edition
5698 QT_CONFIG += $QT_CONFIG
5701 QT_VERSION = $QT_VERSION
5702 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
5703 QT_MINOR_VERSION = $QT_MINOR_VERSION
5704 QT_PATCH_VERSION = $QT_PATCH_VERSION
5707 QT_LIBINFIX = $QT_LIBINFIX
5708 QT_NAMESPACE = $QT_NAMESPACE
5712 if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
5713 echo "# pkgconfig" >> "$QTCONFIG.tmp"
5714 echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
5715 echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp"
5716 echo >> $"$QTCONFIG.tmp"
5719 if [ -n "$CFG_SYSROOT" ]; then
5720 echo "# sysroot" >>"$QTCONFIG.tmp"
5721 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
5722 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5723 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5724 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
5725 echo "}" >> "$QTCONFIG.tmp"
5726 echo >> "$QTCONFIG.tmp"
5728 if [ -n "$RPATH_FLAGS" ]; then
5729 echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
5731 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
5732 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
5733 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
5734 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
5737 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
5738 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
5739 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
5742 # replace qconfig.pri if it differs from the newly created temp file
5743 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
5744 rm -f "$QTCONFIG.tmp"
5746 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
5749 #-------------------------------------------------------------------------------
5750 # save configuration into qmodule.pri
5751 #-------------------------------------------------------------------------------
5752 QTMODULE="$outpath/mkspecs/qmodule.pri"
5754 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
5756 # Ensure we can link to uninistalled libraries
5757 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
5758 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
5760 if [ -n "$QT_CFLAGS_PSQL" ]; then
5761 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
5763 if [ -n "$QT_LFLAGS_PSQL" ]; then
5764 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
5766 if [ -n "$QT_CFLAGS_MYSQL" ]; then
5767 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
5769 if [ -n "$QT_LFLAGS_MYSQL" ]; then
5770 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
5772 if [ -n "$QT_CFLAGS_SQLITE" ]; then
5773 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
5775 if [ -n "$QT_LFLAGS_SQLITE" ]; then
5776 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
5778 if [ -n "$QT_LFLAGS_ODBC" ]; then
5779 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
5781 if [ -n "$QT_LFLAGS_TDS" ]; then
5782 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
5785 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
5786 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
5789 #dump in the OPENSSL_LIBS info
5790 if [ '!' -z "$OPENSSL_LIBS" ]; then
5791 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
5792 elif [ "$CFG_OPENSSL" = "linked" ]; then
5793 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
5796 #dump in the SDK info
5797 if [ '!' -z "$CFG_SDK" ]; then
5798 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
5802 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
5803 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
5805 # replace qmodule.pri if it differs from the newly created temp file
5806 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
5807 rm -f "$QTMODULE.tmp"
5809 mv -f "$QTMODULE.tmp" "$QTMODULE"
5812 #-------------------------------------------------------------------------------
5813 # save configuration into .qmake.cache
5814 #-------------------------------------------------------------------------------
5816 CACHEFILE="$outpath/.qmake.cache"
5817 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
5818 cat >>"$CACHEFILE.tmp" <<EOF
5820 QT_SOURCE_TREE = \$\$quote($relpath)
5821 QT_BUILD_TREE = \$\$quote($outpath)
5822 QT_BUILD_PARTS = $CFG_BUILD_PARTS
5824 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
5825 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
5826 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
5828 include(\$\$PWD/mkspecs/qmodule.pri)
5829 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
5833 #dump the qmake spec
5834 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
5835 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
5837 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
5840 # replace .qmake.cache if it differs from the newly created temp file
5841 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
5842 rm -f "$CACHEFILE.tmp"
5844 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
5847 #-------------------------------------------------------------------------------
5848 # give feedback on configuration
5849 #-------------------------------------------------------------------------------
5850 exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary
5853 if [ "$XPLATFORM" = "$PLATFORM" ]; then
5854 echo "Build type: $PLATFORM"
5856 echo "Building on: $PLATFORM"
5857 echo "Building for: $XPLATFORM"
5860 echo "Architecture: $CFG_ARCH"
5861 echo "Host architecture: $CFG_HOST_ARCH"
5863 if [ -n "$PLATFORM_NOTES" ]; then
5864 echo "Platform notes:"
5865 echo "$PLATFORM_NOTES"
5870 if [ "$OPT_VERBOSE" = "yes" ]; then
5871 echo $ECHO_N "qmake vars .......... $ECHO_C"
5872 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
5873 echo "qmake switches ......... $QMAKE_SWITCHES"
5876 echo "Build .................. $CFG_BUILD_PARTS"
5877 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
5878 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
5879 echo "Debug .................. yes (combined)"
5880 if [ "$CFG_DEBUG" = "yes" ]; then
5881 echo "Default Link ........... debug"
5883 echo "Default Link ........... release"
5886 echo "Debug .................. $CFG_DEBUG"
5888 if [ -n "$PKG_CONFIG" ]; then
5889 echo "pkg-config ............. yes"
5891 echo "pkg-config ............. no"
5893 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
5894 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
5895 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
5896 echo "QtConcurrent code ...... $CFG_CONCURRENT"
5897 echo "QtGui module ........... $CFG_GUI"
5898 echo "QtWidgets module ....... $CFG_WIDGETS"
5899 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5900 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
5902 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
5904 echo "QML debugging .......... $CFG_QML_DEBUG"
5905 echo "PCH support ............ $CFG_PRECOMPILE"
5906 if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
5907 echo "SSE2/SSE3/SSSE3......... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}"
5908 echo "SSE4.1/SSE4.2........... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
5909 echo "AVX/AVX2................ ${CFG_AVX}/${CFG_AVX2}"
5910 elif [ "$CFG_ARCH" = "arm" ]; then
5911 echo "iWMMXt support ......... ${CFG_IWMMXT}"
5912 echo "NEON support ........... ${CFG_NEON}"
5914 if [ "$CFG_ARCH" = "mips" ]; then
5915 echo "MIPS_DSP/MIPS_DSPR2..... ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
5917 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
5918 echo "getaddrinfo support .... $CFG_GETADDRINFO"
5919 echo "getifaddrs support ..... $CFG_GETIFADDRS"
5920 echo "Accessibility .......... $CFG_ACCESSIBILITY"
5921 echo "NIS support ............ $CFG_NIS"
5922 echo "CUPS support ........... $CFG_CUPS"
5923 echo "Iconv support .......... $CFG_ICONV"
5924 echo "Glib support ........... $CFG_GLIB"
5925 echo "GStreamer support ...... $CFG_GSTREAMER"
5926 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
5927 echo "Large File support ..... $CFG_LARGEFILE"
5928 echo "GIF support ............ $CFG_GIF"
5929 if [ "$CFG_JPEG" = "no" ]; then
5930 echo "JPEG support ........... $CFG_JPEG"
5932 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
5934 if [ "$CFG_PNG" = "no" ]; then
5935 echo "PNG support ............ $CFG_PNG"
5937 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
5939 echo "zlib support ........... $CFG_ZLIB"
5940 echo "Session management ..... $CFG_SM"
5941 echo "libudev support ........ $CFG_LIBUDEV"
5943 if [ "$CFG_OPENGL" = "desktop" ]; then
5944 echo "OpenGL support ......... yes (Desktop OpenGL)"
5945 elif [ "$CFG_OPENGL" = "es2" ]; then
5946 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
5948 echo "OpenGL support ......... no"
5951 if [ "$CFG_OPENVG" ]; then
5952 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5953 echo "OpenVG support ......... ShivaVG"
5955 echo "OpenVG support ......... $CFG_OPENVG"
5959 echo "XShape support ......... $CFG_XSHAPE"
5960 echo "XVideo support ......... $CFG_XVIDEO"
5961 echo "XSync support .......... $CFG_XSYNC"
5962 echo "Xinerama support ....... $CFG_XINERAMA"
5963 echo "Xcursor support ........ $CFG_XCURSOR"
5964 echo "Xfixes support ......... $CFG_XFIXES"
5965 echo "Xrandr support ......... $CFG_XRANDR"
5966 echo "Xi support ............. $CFG_XINPUT"
5967 echo "MIT-SHM support ........ $CFG_MITSHM"
5968 echo "FontConfig support ..... $CFG_FONTCONFIG"
5969 echo "XKB Support ............ $CFG_XKB"
5970 echo "immodule support ....... $CFG_IM"
5971 echo "GTK theme support ...... $CFG_QGTKSTYLE"
5973 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
5974 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
5975 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
5976 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
5977 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
5978 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
5979 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
5980 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
5981 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
5984 if [ "$CFG_OPENSSL" = "yes" ]; then
5985 OPENSSL_LINKAGE="(run-time)"
5986 elif [ "$CFG_OPENSSL" = "linked" ]; then
5987 OPENSSL_LINKAGE="(linked)"
5989 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
5990 echo "Alsa support ........... $CFG_ALSA"
5991 if [ "$BUILD_ON_MAC" = "yes" ]; then
5992 echo "CoreWlan support ....... $CFG_COREWLAN"
5994 echo "libICU support ......... $CFG_ICU"
5995 echo "PCRE support ........... $CFG_PCRE"
5996 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
5997 echo "Xcb support ............ limited (old version)"
5999 echo "Xcb support ............ $CFG_XCB"
6001 echo "Xrender support ........ $CFG_XRENDER"
6002 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6003 echo "XInput2 support ........ $CFG_XINPUT2"
6005 echo "EGLFS support .......... $CFG_EGLFS"
6006 echo "DirectFB support ....... $CFG_DIRECTFB"
6009 # complain about not being able to use dynamic plugins if we are using a static build
6010 if [ "$CFG_SHARED" = "no" ]; then
6012 echo "WARNING: Using static linking will disable the use of dynamically"
6013 echo "loaded plugins. Make sure to import all needed static plugins,"
6014 echo "or compile needed modules into the library."
6017 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6019 echo "NOTE: When linking against OpenSSL, you can override the default"
6020 echo "library names through OPENSSL_LIBS."
6022 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6026 exec 1>&3 3>&- # restore stdout
6027 cat $outpath/config.summary # display config feedback to user
6029 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6031 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6032 echo "if you want a pure debug build."
6037 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6042 #-------------------------------------------------------------------------------
6043 # build makefiles based on the configuration
6044 #-------------------------------------------------------------------------------
6046 echo "Finding project files. Please wait..."
6047 if [ "$CFG_NOPROCESS" != "yes" ]; then
6048 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6049 if [ -f "${relpath}/qtbase.pro" ]; then
6050 mkfile="${outpath}/Makefile"
6051 [ -f "$mkfile" ] && chmod +w "$mkfile"
6052 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6056 # .projects -> projects to process
6057 # .projects.1 -> qt and moc
6058 # .projects.2 -> subdirs and libs
6059 # .projects.3 -> the rest
6060 rm -f .projects .projects.1 .projects.2 .projects.3
6062 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6063 if [ -z "$AWK" ]; then
6064 for p in `echo $QMAKE_PROJECTS`; do
6065 echo "$p" >> .projects
6068 cat >projects.awk <<EOF
6074 first = "./.projects.1.tmp"
6075 second = "./.projects.2.tmp"
6076 third = "./.projects.3.tmp"
6081 if ( ! target_file )
6083 print input_file >target_file
6088 input_file = FILENAME
6093 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6096 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6097 target_file = second
6102 matched_target == 0 && /^(TEMPLATE.*=)/ {
6103 if ( \$3 == "subdirs" )
6104 target_file = second
6105 else if ( \$3 == "lib" )
6111 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6112 if ( \$0 ~ /plugin/ )
6115 target_file = second
6120 if ( ! target_file )
6122 print input_file >>target_file
6129 for p in `echo $QMAKE_PROJECTS`; do
6130 echo "$p" >> .projects.all
6133 # if you get errors about the length of the command line to awk, change the -l arg
6135 split -l 100 .projects.all .projects.all.
6136 for p in .projects.all.*; do
6137 "$AWK" -f projects.awk `cat $p`
6138 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6139 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6140 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6141 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6143 rm -f .projects.all* projects.awk
6145 [ -f .projects.1 ] && cat .projects.1 >>.projects
6146 [ -f .projects.2 ] && cat .projects.2 >>.projects
6147 rm -f .projects.1 .projects.2
6148 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6149 cat .projects.3 >>.projects
6153 # don't sort Qt and MOC in with the other project files
6154 # also work around a segfaulting uniq(1)
6155 if [ -f .sorted.projects.2 ]; then
6156 sort .sorted.projects.2 > .sorted.projects.2.new
6157 mv -f .sorted.projects.2.new .sorted.projects.2
6158 cat .sorted.projects.2 >> .sorted.projects.1
6160 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6161 rm -f .sorted.projects.2 .sorted.projects.1
6165 if [ -f .projects ]; then
6166 uniq .projects >.tmp
6167 mv -f .tmp .projects
6168 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6170 if [ -f .projects.3 ]; then
6171 uniq .projects.3 >.tmp
6172 mv -f .tmp .projects.3
6173 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6175 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6179 for part in $CFG_BUILD_PARTS; do
6181 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6182 libs) PART_ROOTS="$PART_ROOTS src" ;;
6183 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6184 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6189 if [ "$CFG_DEV" = "yes" ]; then
6190 PART_ROOTS="$PART_ROOTS tests"
6193 echo "Creating makefiles. Please wait..."
6194 for file in .projects .projects.3; do
6195 [ '!' -f "$file" ] && continue
6196 for a in `cat $file`; do
6198 for r in $PART_ROOTS; do
6199 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6204 [ "$IN_ROOT" = "no" ] && continue
6207 *winmain/winmain.pro)
6208 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6212 */qmake/qmake.pro) continue ;;
6213 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*|*tools/qdbusxml2cpp*|*tools/qdbuscpp2xml*) SPEC=$QMAKESPEC ;;
6214 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6220 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6221 test -d "$dir" || mkdir -p "$dir"
6222 OUTDIR="$outpath/$dir"
6223 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6224 # fast configure - the makefile exists, skip it
6225 # since the makefile exists, it was generated by qmake, which means we
6226 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
6228 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
6231 QMAKE_SPEC_ARGS="-spec $SPEC"
6232 echo $ECHO_N " for $a$ECHO_C"
6234 QMAKE="$outpath/bin/qmake"
6235 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
6236 if [ "$file" = ".projects.3" ]; then
6239 cat >"${OUTDIR}/Makefile" <<EOF
6240 # ${OUTDIR}/Makefile: generated by configure
6242 # WARNING: This makefile will be replaced with a real makefile.
6243 # All changes made to this file will be lost.
6245 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
6247 cat >>"${OUTDIR}/Makefile" <<EOF
6249 all clean install qmake first Makefile: FORCE
6250 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
6258 if [ "$OPT_VERBOSE" = "yes" ]; then
6259 echo " (`basename $SPEC`)"
6260 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6265 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
6266 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
6270 rm -f .projects .projects.3
6272 #-------------------------------------------------------------------------------
6273 # check for platforms that we don't yet know about
6274 #-------------------------------------------------------------------------------
6275 if [ "$CFG_ARCH" = "unknown" ]; then
6278 NOTICE: configure was unable to determine the architecture
6279 for the $XQMAKESPEC target.
6281 Qt will not use a specialized implementation for any atomic
6282 operations. Instead a generic implemention based on either GCC
6283 intrinsics or C++11 std::atomic<T> will be used (when
6284 available). The generic implementations are generally as fast
6285 as and always as safe as a specialized implementation.
6287 If no generic implementation is available, Qt will use a
6288 fallback UNIX implementation which uses a single
6289 pthread_mutex_t to protect all atomic operations. This
6290 implementation is the slow (but safe) fallback implementation
6291 for architectures Qt does not yet support.
6295 #-------------------------------------------------------------------------------
6296 # check if the user passed the -no-zlib option, which is no longer supported
6297 #-------------------------------------------------------------------------------
6298 if [ -n "$ZLIB_FORCED" ]; then
6299 which_zlib="supplied"
6300 if [ "$CFG_ZLIB" = "system" ]; then
6306 NOTICE: The -no-zlib option was supplied but is no longer
6309 Qt now requires zlib support in all builds, so the -no-zlib
6310 option was ignored. Qt will be built using the $which_zlib
6315 #-------------------------------------------------------------------------------
6316 # check if the user passed the obsoleted -wayland or -no-wayland flag
6317 #-------------------------------------------------------------------------------
6318 if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
6321 NOTICE: The -wayland and -no-wayland flags are now obsolete
6323 All configuring of QtWayland plugin and QtCompositor happens in the module
6327 #-------------------------------------------------------------------------------
6328 # check if the user passed the obsoleted -arch or -host-arch options
6329 #-------------------------------------------------------------------------------
6330 if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
6333 NOTICE: The -arch and -host-arch options are obsolete.
6335 Qt now detects the target and host architectures based on compiler
6336 output. Qt will be built using $CFG_ARCH for the target architecture
6337 and $CFG_HOST_ARCH for the host architecture (note that these two
6338 will be the same unless you are cross-compiling).
6342 #-------------------------------------------------------------------------------
6343 # finally save the executed command to another script
6344 #-------------------------------------------------------------------------------
6345 if [ `basename $0` != "config.status" ]; then
6346 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
6348 # add the system variables
6349 for varname in $SYSTEM_VARIABLES; do
6351 'if [ -n "\$'${varname}'" ]; then
6352 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
6357 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
6359 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
6360 echo "#!/bin/sh" > "$outpath/config.status"
6361 [ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
6362 echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
6363 [ -n "$PKG_CONFIG_LIBDIR" ] && \
6364 echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
6365 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
6366 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
6367 echo "else" >> "$outpath/config.status"
6368 echo " $CONFIG_STATUS" >> "$outpath/config.status"
6369 echo "fi" >> "$outpath/config.status"
6370 chmod +x "$outpath/config.status"
6373 if [ -n "$RPATH_MESSAGE" ]; then
6375 echo "$RPATH_MESSAGE"
6378 MAKE=`basename "$MAKE"`
6380 echo Qt is now configured for building. Just run \'$MAKE\'.
6381 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
6382 echo Once everything is built, Qt is installed.
6383 echo You should not run \'$MAKE install\'.
6385 echo Once everything is built, you must run \'$MAKE install\'.
6386 echo Qt will be installed into $QT_INSTALL_PREFIX
6389 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.