2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
134 values["LITERAL_WHITESPACE"] = " "
135 values["LITERAL_DOLLAR"] = "$"
137 /^[_A-Z0-9.]+[ \t]*\+?=/ {
138 valStart = index($0, "=") + 1
141 if (substr($0, valStart - 2, 1) == "+") {
145 variable = substr($0, 0, valStart - 2 - append)
146 value = substr($0, valStart)
147 gsub("[ \t]+", "", variable)
148 gsub("^[ \t]+", "", value)
149 gsub("[ \t]+$", "", value)
152 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
153 ovalue = ovalue substr(value, 1, RSTART - 1)
154 var = substr(value, RSTART + 2, RLENGTH - 2)
155 value = substr(value, RSTART + RLENGTH)
157 var = substr(var, 2, length(var) - 2)
159 ovalue = ovalue values[var]
161 ovalue = ovalue value
163 combinedValue = values[variable]
164 if (append == 1 && length(combinedValue) > 0) {
165 combinedValue = combinedValue " " ovalue
167 combinedValue = ovalue
169 values[variable] = combinedValue
172 for (var in values) {
173 print var "=" values[var]
181 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
184 # relies on $QMAKESPEC being set correctly. parses include statements in
185 # qmake.conf and prints out the expanded file
188 if [ -z "$specvals" ]; then
189 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
191 getQMakeConf3 "$1" "$specvals"
196 if [ -z "$xspecvals" ]; then
197 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
199 getQMakeConf3 "$1" "$xspecvals"
202 # relies on $TEST_COMPILER being set correctly
203 compilerSupportsFlag()
205 cat >conftest.cpp <<EOF
206 int main() { return 0; }
208 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
210 rm -f conftest.cpp conftest.o
214 # relies on $TEST_COMPILER being set correctly
220 safe_flag=`shellEscape "$flag"`
221 lflags=$lflags,$safe_flag
223 compilerSupportsFlag "$lflags" >/dev/null 2>&1
226 #-------------------------------------------------------------------------------
227 # operating system detection
228 #-------------------------------------------------------------------------------
230 # need that throughout the script
231 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
232 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
233 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
234 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
236 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
237 if echo '\c' | grep '\c' >/dev/null; then
243 #-------------------------------------------------------------------------------
244 # window system detection
245 #-------------------------------------------------------------------------------
251 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
256 #-----------------------------------------------------------------------------
257 # Qt version detection
258 #-----------------------------------------------------------------------------
259 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
263 if [ -n "$QT_VERSION" ]; then
264 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
265 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
266 if [ -n "$MAJOR" ]; then
267 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
268 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
269 QT_MAJOR_VERSION="$MAJOR"
270 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
271 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
274 if [ -z "$QT_MAJOR_VERSION" ]; then
275 echo "Cannot process version from qglobal.h: $QT_VERSION"
276 echo "Cannot proceed."
280 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
281 if [ -z "$QT_PACKAGEDATE" ]; then
282 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
283 echo "Cannot proceed"
287 #-------------------------------------------------------------------------------
289 #-------------------------------------------------------------------------------
293 EditionString=Commercial
297 # parse the arguments, setting things to "yes" or "no"
298 while [ "$#" -gt 0 ]; do
302 #Autoconf style options
304 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
308 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
312 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
313 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
316 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
321 # this option may or may not be followed by an argument
322 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
329 -h|help|--help|-help)
330 if [ "$VAL" = "yes" ]; then
332 COMMERCIAL_USER="no" #doesn't matter we will display the help
335 COMMERCIAL_USER="no" #doesn't matter we will display the help
339 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
343 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
350 if [ "$UNKNOWN_ARG" = "yes" ]; then
359 if [ "$PLATFORM_QPA" != "no" ]; then
360 if [ "$PLATFORM_QPA" = "maybe" ]; then
365 echo "No license exists to enable Qt QPA. Disabling."
372 COMMERCIAL_USER="yes"
386 if [ "$COMMERCIAL_USER" = "ask" ]; then
388 echo "Which edition of Qt do you want to use ?"
390 echo "Type 'c' if you want to use the Commercial Edition."
391 echo "Type 'o' if you want to use the Open Source Edition."
395 if [ "$commercial" = "c" ]; then
396 COMMERCIAL_USER="yes"
398 elif [ "$commercial" = "o" ]; then
405 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
406 # Commercial preview release
407 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
410 QT_EDITION="QT_EDITION_DESKTOP"
411 LicenseType="Technology Preview"
412 elif [ $COMMERCIAL_USER = "yes" ]; then
413 # one of commercial editions
414 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
415 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
417 # read in the license file
418 if [ -f "$LICENSE_FILE" ]; then
419 . "$LICENSE_FILE" >/dev/null 2>&1
420 if [ -z "$LicenseKeyExt" ]; then
422 echo "You are using an old license file."
424 echo "Please install the license file supplied by Nokia,"
425 echo "or install the Qt Open Source Edition if you intend to"
426 echo "develop free software."
429 if [ -z "$Licensee" ]; then
431 echo "Invalid license key. Please check the license key."
435 if [ -z "$LicenseKeyExt" ]; then
437 echo $ECHO_N "Please enter your license key: $ECHO_C"
439 Licensee="Unknown user"
444 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
445 && LicenseValid="yes" \
447 if [ "$LicenseValid" != "yes" ]; then
449 echo "Invalid license key. Please check the license key."
452 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
453 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
454 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
455 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
457 # determine which edition we are licensed to use
458 case "$LicenseTypeCode" in
460 LicenseType="Commercial"
464 QT_EDITION="QT_EDITION_UNIVERSAL"
467 Edition="FullFramework"
468 EditionString="Full Framework"
469 QT_EDITION="QT_EDITION_DESKTOP"
472 Edition="GUIFramework"
473 EditionString="GUI Framework"
474 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
479 LicenseType="Evaluation"
480 QMakeVar add DEFINES QT_EVAL
484 QT_EDITION="QT_EDITION_EVALUATION"
489 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
491 echo "Invalid license key. Please check the license key."
495 # verify that we are licensed to use Qt on this platform
497 case "$PlatformCode" in
500 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
504 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
507 ### EMBEDDED_QPA logic missing ###
508 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
509 X9,* | XC,* | XU,* | XW,* | XM,*)
511 LICENSE_EXTENSION="-ALLOS"
513 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
514 # Qt for Embedded Linux
515 LICENSE_EXTENSION="-EMBEDDED"
517 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
519 LICENSE_EXTENSION="-EMBEDDED"
521 FM,*,no | LM,yes,* | ZM,no,no)
523 LICENSE_EXTENSION="-DESKTOP"
527 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
529 echo "You are not licensed for the $Platform platform."
531 echo "Please contact qt-info@nokia.com to upgrade your license to"
532 echo "include the $Platform platform, or install the Qt Open Source Edition"
533 echo "if you intend to develop free software."
538 if test -r "$relpath/.LICENSE"; then
539 # Generic, non-final license
541 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
546 *TECHNOLOGY?PREVIEW*)
553 echo >&2 "Invalid license files; cannot continue"
558 EditionString="$Edition"
559 QT_EDITION="QT_EDITION_DESKTOP"
562 case "$LicenseFeatureCode" in
565 case "$LicenseType" in
567 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
570 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
576 case "$LicenseType" in
578 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
581 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
587 echo "Invalid license key. Please check the license key."
591 case "$LicenseFeatureCode" in
599 if [ '!' -f "$outpath/LICENSE" ]; then
600 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
601 echo "this software has disappeared."
603 echo "Sorry, you are not licensed to use this software."
604 echo "Try re-installing."
608 elif [ $COMMERCIAL_USER = "no" ]; then
609 # Open Source edition - may only be used under the terms of the GPL or LGPL.
610 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
611 Licensee="Open Source"
613 EditionString="Open Source"
614 QT_EDITION="QT_EDITION_OPENSOURCE"
617 #-------------------------------------------------------------------------------
618 # initalize variables
619 #-------------------------------------------------------------------------------
621 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
622 for varname in $SYSTEM_VARIABLES; do
623 qmakevarname="${varname}"
624 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
625 if [ "${varname}" = "LDFLAGS" ]; then
626 qmakevarname="LFLAGS"
627 elif [ "${varname}" = "LD" ]; then
631 'if [ -n "\$'${varname}'" ]; then
632 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
636 # Use CC/CXX to run config.tests
637 mkdir -p "$outpath/config.tests"
638 rm -f "$outpath/config.tests/.qmake.cache"
639 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
641 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
643 # QTDIR may be set and point to an old or system-wide Qt installation
646 # the minimum version of libdbus-1 that we require:
647 MIN_DBUS_1_VERSION=0.93
649 # initalize internal variables
650 CFG_CONFIGURE_EXIT_ON_ERROR=yes
652 CFG_EXCEPTIONS=unspecified
653 CFG_GUI=auto # (yes|no|auto)
679 CFG_OPENVG_LC_INCLUDES=no
680 CFG_OPENVG_SHIVA=auto
681 CFG_OPENVG_ON_OPENGL=auto
683 CFG_EGL_GLES_INCLUDES=no
688 QT_DEFAULT_BUILD_PARTS="libs examples tests"
692 CFG_AUDIO_BACKEND=auto
694 CFG_DECLARATIVE_DEBUG=yes
695 CFG_JAVASCRIPTCORE_JIT=auto
720 CFG_SEPARATE_DEBUG_INFO=no
721 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
722 CFG_REDUCE_EXPORTS=auto
732 CFG_REDUCE_RELOCATIONS=auto
734 CFG_ACCESSIBILITY=auto
737 CFG_CLOCK_GETTIME=auto
738 CFG_CLOCK_MONOTONIC=auto
747 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
751 CFG_PREFIX_INSTALL=yes
760 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
761 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
765 OPT_CONFIRM_LICENSE=no
779 # initalize variables used for installation
788 QT_INSTALL_TRANSLATIONS=
797 #flags for SQL drivers
805 QT_LFLAGS_ODBC="-lodbc"
808 # flags for libdbus-1
812 # flags for Glib (X11 only)
816 # flags for GStreamer (X11 only)
820 #-------------------------------------------------------------------------------
821 # check SQL drivers available in this package
822 #-------------------------------------------------------------------------------
824 # opensource version removes some drivers, so force them to be off
830 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
831 for a in "$relpath/src/plugins/sqldrivers/"*; do
833 base_a=`basename "$a"`
834 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
835 eval "CFG_SQL_${base_a}=auto"
840 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
841 if [ -d "$relpath/src/plugins/imageformats" ]; then
842 for a in "$relpath/src/plugins/imageformats/"*; do
844 base_a=`basename "$a"`
845 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
850 #-------------------------------------------------------------------------------
851 # parse command line arguments
852 #-------------------------------------------------------------------------------
854 # parse the arguments, setting things to "yes" or "no"
855 while [ "$#" -gt 0 ]; do
859 #Autoconf style options
861 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
865 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
869 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
870 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
873 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
877 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
881 -no-*-*|-plugin-*-*|-qt-*-*)
882 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
883 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
887 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
890 #Qt style yes options
891 -incremental|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-wayland|-nis|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
892 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
895 #Qt style options that pass an argument
897 if [ "$PLATFORM_QPA" != "yes" ]; then
899 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
903 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
907 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
908 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
912 #Qt style complex options in one command
913 -enable-*|-disable-*)
914 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
915 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
917 #Qt Builtin/System style options
918 -no-*|-system-*|-qt-*)
919 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
920 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
922 #Options that cannot be generalized
929 # this option may or may not be followed by an argument
930 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
939 # this option may or may not be followed by an argument
940 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
949 # this option may or may not be followed by an argument
950 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
958 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
959 # this option may or may not be followed by an argument
960 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
979 if [ "$1" = "-D" ]; then
983 VAL=`echo $1 | sed 's,-D,,'`
988 # this option may or may not be followed by an argument
989 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
998 if [ "$1" = "-I" ]; then
1002 VAL=`echo $1 | sed 's,-I,,'`
1007 if [ "$1" = "-L" ]; then
1011 VAL=`echo $1 | sed 's,-L,,'`
1016 if [ "$1" = "-R" ]; then
1020 VAL=`echo $1 | sed 's,-R,,'`
1025 VAL=`echo $1 | sed 's,-l,,'`
1029 if [ "$1" = "-F" ]; then
1033 VAL=`echo $1 | sed 's,-F,,'`
1038 if [ "$1" = "-fw" ]; then
1042 VAL=`echo $1 | sed 's,-fw,,'`
1050 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1057 if [ "$UNKNOWN_ARG" = "yes" ]; then
1058 echo "$1: unknown argument"
1069 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1070 CFG_ACCESSIBILITY="$VAL"
1079 CFG_USE_GNUMAKE="$VAL"
1082 CFG_MYSQL_CONFIG="$VAL"
1085 QT_INSTALL_PREFIX="$VAL"
1088 QT_HOST_PREFIX="$VAL"
1097 QT_FORCE_PKGCONFIG=yes
1100 QT_INSTALL_DOCS="$VAL"
1103 QT_INSTALL_HEADERS="$VAL"
1106 QT_INSTALL_PLUGINS="$VAL"
1109 QT_INSTALL_IMPORTS="$VAL"
1112 QT_INSTALL_DATA="$VAL"
1115 QT_INSTALL_LIBS="$VAL"
1124 QT_INSTALL_TRANSLATIONS="$VAL"
1126 sysconfdir|settingsdir)
1127 QT_INSTALL_SETTINGS="$VAL"
1130 QT_INSTALL_EXAMPLES="$VAL"
1133 QT_INSTALL_TESTS="$VAL"
1142 QT_INSTALL_BINS="$VAL"
1152 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1159 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1160 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1161 [ "$VAL" = "es2" ]; then
1163 if [ "$VAL" = "es2" ]; then
1171 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1173 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1181 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1184 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1192 if [ "$BUILD_ON_MAC" = "yes" ]; then
1199 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1200 CFG_MAC_DWARF2="$VAL"
1206 # if this is a Mac then "windows" probably means
1207 # we are cross-compiling for MinGW
1208 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1209 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1218 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1219 CFG_MAC_HARFBUZZ="$VAL"
1226 if [ "$BUILD_ON_MAC" = "yes" ]; then
1227 CFG_FRAMEWORK="$VAL"
1233 if [ "$VAL" = "yes" ]; then
1235 QMakeVar add QMAKE_CFLAGS -pg
1236 QMakeVar add QMAKE_CXXFLAGS -pg
1237 QMakeVar add QMAKE_LFLAGS -pg
1238 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1244 if [ "$VAL" = "yes" ]; then
1245 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1248 exceptions|g++-exceptions)
1249 if [ "$VAL" = "no" ]; then
1251 elif [ "$VAL" = "yes" ]; then
1259 # keep compatibility with old platform names
1265 PLATFORM=hpux-acc-o64
1268 PLATFORM=hpux-acc-64
1271 PLATFORM=hpux-acc-64
1283 PLATFORM=reliant-cds-64
1286 PLATFORM=solaris-cc-64
1289 PLATFORM=unixware-cc
1292 PLATFORM=unixware-g++
1295 PLATFORM=unixware-cc
1298 PLATFORM=unixware-g++
1304 i386) NATIVE_64_ARCH="x86_64" ;;
1305 powerpc) NATIVE_64_ARCH="ppc64" ;;
1306 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1308 if [ ! -z "$NATIVE_64_ARCH" ]; then
1309 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1316 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1319 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1320 CFG_DEBUG_RELEASE="$VAL"
1326 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1327 CFG_RELEASE_QMAKE="$VAL"
1333 if [ "$VAL" = "yes" ]; then
1335 elif [ "$VAL" = "no" ]; then
1342 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1343 CFG_PREFIX_INSTALL="$VAL"
1351 developer-build|commercial|opensource)
1352 # These switches have been dealt with already
1355 if [ "$VAL" = "yes" ]; then
1357 elif [ "$VAL" = "no" ]; then
1364 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1365 CFG_INCREMENTAL="$VAL"
1371 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1372 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1378 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1379 if [ "$VAL" = "no" ]; then
1380 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1381 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1382 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1388 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1395 if [ "$VAL" = "no" ]; then
1402 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1410 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1417 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1424 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1431 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1438 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1445 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1452 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1459 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1466 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1467 CFG_PRECOMPILE="$VAL"
1472 separate-debug-info)
1473 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1474 CFG_SEPARATE_DEBUG_INFO="$VAL"
1475 elif [ "$VAL" = "nocopy" ] ; then
1476 CFG_SEPARATE_DEBUG_INFO="yes"
1477 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1483 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1484 CFG_REDUCE_EXPORTS="$VAL"
1490 if [ "$VAL" = "no" ]; then
1497 if [ "$VAL" = "no" ]; then
1504 if [ "$VAL" = "no" ]; then
1511 if [ "$VAL" = "no" ]; then
1518 if [ "$VAL" = "no" ]; then
1525 if [ "$VAL" = "no" ]; then
1532 if [ "$VAL" = "no" ]; then
1539 if [ "$VAL" = "no" ]; then
1546 if [ "$VAL" = "no" ]; then
1556 if [ "$VAL" = "no" ]; then
1563 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1564 CFG_REDUCE_RELOCATIONS="$VAL"
1570 [ "$VAL" = "qt" ] && VAL=yes
1571 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1576 # No longer supported:
1577 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1580 if [ "$VAL" = "system" ]; then
1587 [ "$VAL" = "yes" ] && VAL=qt
1588 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1595 [ "$VAL" = "yes" ] && VAL=qt
1596 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1603 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1610 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1617 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1624 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1631 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1638 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1645 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1646 CFG_FONTCONFIG="$VAL"
1652 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1659 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1666 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1673 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1680 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1694 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1701 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1708 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1709 CFG_GSTREAMER="$VAL"
1715 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1716 CFG_QGTKSTYLE="$VAL"
1722 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1725 if [ "$VAL" = "no" ]; then
1733 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1735 elif [ "$VAL" = "runtime" ]; then
1742 if [ "$VAL" = "yes" ]; then
1749 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1756 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1757 CFG_LARGEFILE="$VAL"
1763 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1770 if [ "$VAL" = "yes" ]; then
1771 CFG_OPENSSL="linked"
1777 if [ "$VAL" = "yes" ]; then
1778 CFG_DECLARATIVE_DEBUG="yes"
1780 if [ "$VAL" = "no" ]; then
1781 CFG_DECLARATIVE_DEBUG="no"
1788 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1789 CFG_JAVASCRIPTCORE_JIT="$VAL"
1795 if [ "$VAL" = "yes" ]; then
1796 OPT_CONFIRM_LICENSE="$VAL"
1802 if [ "$VAL" = "yes" ]; then
1808 sql-*|imageformat-*)
1809 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1810 # if autoconf style options were used, $VAL can be "yes" or "no"
1811 [ "$VAL" = "yes" ] && VAL=qt
1812 # now $VAL should be "no", "qt", or "plugin"... double-check
1813 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1816 # now $VAL is "no", "qt", or "plugin"
1818 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1819 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1821 # Grab the available values
1824 avail="$CFG_SQL_AVAILABLE"
1827 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1828 if [ "$OPT" != "plugin" ]; then
1829 # png is always built in
1835 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1839 # Check that that user's value is available.
1842 if [ "$VAL" = "$d" ]; then
1847 [ "$found" = yes ] || ERROR=yes
1849 if [ "$VAR" = "sql" ]; then
1850 # set the CFG_SQL_driver
1851 eval "CFG_SQL_$VAL=\$OPT"
1853 elif [ "$VAR" = "imageformat" ]; then
1854 [ "$OPT" = "qt" ] && OPT=yes
1855 VAL="`echo $VAL |tr a-z A-Z`"
1856 eval "CFG_$VAL=$OPT"
1860 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1861 if [ "$OPT" = "plugin" ]; then
1864 QMakeVar add "${VAR}s" "${VAL}"
1865 elif [ "$OPT" = "no" ]; then
1866 PLUG_VAR="${VAR}-plugin"
1868 QMakeVar del "${IN_VAR}s" "$VAL"
1869 QMakeVar del "${PLUG_VAR}s" "$VAL"
1871 if [ "$ERROR" = "yes" ]; then
1872 echo "$CURRENT_OPT: unknown argument"
1877 if [ "$VAL" = "yes" ]; then
1878 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1879 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1883 elif [ "$VAL" = "no" ]; then
1884 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1885 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1894 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1901 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1908 D_FLAGS="$D_FLAGS \"$VAL\""
1911 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1914 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1917 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1920 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1923 if [ "$BUILD_ON_MAC" = "yes" ]; then
1924 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1925 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1931 if [ "$BUILD_ON_MAC" = "yes" ]; then
1932 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1938 W_FLAGS="$W_FLAGS \"${VAL}\""
1944 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1945 CFG_PHONON_BACKEND="$VAL"
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1958 CFG_AUDIO_BACKEND="$VAL"
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1971 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1972 CFG_FORCE_ASSERTS="$VAL"
1978 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1988 if [ "$UNKNOWN_OPT" = "yes" ]; then
1989 echo "${CURRENT_OPT}: invalid command-line switch"
1995 # update QT_CONFIG to show our current predefined configuration
1996 case "$CFG_QCONFIG" in
1997 minimal|small|medium|large|full)
1998 # these are a sequence of increasing functionality
1999 for c in minimal small medium large full; do
2000 QT_CONFIG="$QT_CONFIG $c-config"
2001 [ "$CFG_QCONFIG" = $c ] && break
2005 # not known to be sufficient for anything
2006 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2007 echo >&2 "Error: configuration file not found:"
2008 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2010 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2015 #-------------------------------------------------------------------------------
2016 # build tree initialization
2017 #-------------------------------------------------------------------------------
2019 # where to find which..
2020 unixtests="$relpath/config.tests/unix"
2021 mactests="$relpath/config.tests/mac"
2022 WHICH="$unixtests/which.test"
2024 PERL=`$WHICH perl 2>/dev/null`
2026 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2028 for e in gawk nawk awk; do
2029 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2036 PERL="/usr/bin/perl"
2037 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2041 ### skip this if the user just needs help...
2042 if [ "$OPT_HELP" != "yes" ]; then
2044 # is this a shadow build?
2045 if [ "$OPT_SHADOW" = "maybe" ]; then
2047 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2048 if [ -h "$outpath" ]; then
2049 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2055 if [ "$OPT_SHADOW" = "yes" ]; then
2056 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2057 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2058 echo >&2 "Cannot proceed."
2061 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2064 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2066 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2067 echo "Qt can be built in release mode with separate debug information, so"
2068 echo "-debug-and-release is not necessary anymore"
2072 if [ "$CFG_SILENT" = "yes" ]; then
2073 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2076 # if the source tree is different from the build tree,
2077 # symlink or copy part of the sources
2078 if [ "$OPT_SHADOW" = "yes" ]; then
2079 echo "Preparing build tree..."
2081 if [ -z "$PERL" ]; then
2083 echo "You need perl in your PATH to make a shadow build."
2084 echo "Cannot proceed."
2088 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2090 # make a syncqt script that can be used in the shadow
2091 rm -f "$outpath/bin/syncqt"
2092 if [ -x "$relpath/bin/syncqt" ]; then
2093 mkdir -p "$outpath/bin"
2094 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2095 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2096 chmod 755 "$outpath/bin/syncqt"
2099 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2100 rm -f "$outpath/bin/$i"
2101 if [ -x "$relpath/bin/$i" ]; then
2102 mkdir -p "$outpath/bin"
2103 echo "#!/bin/sh" >"$outpath/bin/$i"
2104 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2105 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2106 chmod 755 "$outpath/bin/$i"
2110 # symlink the mkspecs directory
2111 mkdir -p "$outpath/mkspecs"
2112 rm -rf "$outpath"/mkspecs/*
2113 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2114 rm -f "$outpath/mkspecs/default"
2118 rm -rf "$outpath/mkspecs/$1"
2119 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2120 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2123 # Special case for mkspecs/features directory.
2124 # To be able to place .prf files into a shadow build directory,
2125 # we're creating links for files only. The directory structure is reproduced.
2126 ShadowMkspecs features
2128 # The modules dir is special, too.
2129 ShadowMkspecs modules
2131 # symlink the doc directory
2132 rm -rf "$outpath/doc"
2133 ln -s "$relpath/doc" "$outpath/doc"
2136 # symlink fonts to be able to run application from build directory
2137 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2138 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2139 mkdir -p "${outpath}/lib"
2140 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2144 if [ "$OPT_FAST" = "auto" ]; then
2145 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2152 # find a make command
2153 if [ -z "$MAKE" ]; then
2155 for mk in gmake make; do
2156 if "$WHICH" $mk >/dev/null 2>&1; then
2161 if [ -z "$MAKE" ]; then
2162 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2163 echo >&2 "Cannot proceed."
2166 # export MAKE, we need it later in the config.tests
2172 #-------------------------------------------------------------------------------
2173 # auto-detect all that hasn't been specified in the arguments
2174 #-------------------------------------------------------------------------------
2176 if [ -z "$PLATFORM" ]; then
2178 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2180 if [ "$PLATFORM_QPA" = "yes" ]; then
2181 OSX_VERSION=`uname -r | cut -d. -f1`
2182 if [ "$OSX_VERSION" -ge 11 ]; then
2183 # We're on Lion or above. Check if we have a supported Clang version
2184 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2187 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2202 #PLATFORM=aix-g++-64
2204 #PLATFORM=aix-xlc-64
2206 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2216 # PLATFORM=dynix-g++
2222 PLATFORM=freebsd-g++
2224 - Also available for FreeBSD: freebsd-icc
2228 PLATFORM=openbsd-g++
2239 #PLATFORM=irix-cc-64
2241 - Also available for IRIX: irix-g++ irix-cc-64
2245 case "$UNAME_MACHINE" in
2247 #PLATFORM=hpuxi-acc-32
2248 PLATFORM=hpuxi-acc-64
2250 - Also available for HP-UXi: hpuxi-acc-32
2256 #PLATFORM=hpux-acc-64
2258 #PLATFORM=hpux-acc-o64
2260 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2269 - Also available for Tru64: tru64-g++
2273 case "$UNAME_MACHINE" in
2275 PLATFORM=linux-g++-64
2282 - Also available for Linux: linux-kcc linux-icc linux-cxx
2286 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2287 PLATFORM="solaris-g++"
2289 #PLATFORM=solaris-g++
2291 #PLATFORM=solaris-cc64
2294 - Also available for Solaris: solaris-g++ solaris-cc-64
2297 ReliantUNIX-*:*|SINIX-*:*)
2298 PLATFORM=reliant-cds
2299 #PLATFORM=reliant-cds-64
2301 - Also available for Reliant UNIX: reliant-cds-64
2311 #PLATFORM=unixware-g++
2312 PLATFORM=unixware-cc
2314 - Also available for OpenUNIX: unixware-g++
2318 #PLATFORM=unixware-g++
2319 PLATFORM=unixware-cc
2321 - Also available for UnixWare: unixware-g++
2328 - Also available for SCO OpenServer: sco-g++
2332 PLATFORM=unixware-g++
2335 PLATFORM=unsupported/qnx-g++
2338 if [ "$OPT_HELP" != "yes" ]; then
2340 for p in $PLATFORMS; do
2341 echo " $relconf $* -platform $p"
2344 echo " The build script does not currently recognize all" >&2
2345 echo " platforms supported by Qt." >&2
2346 echo " Rerun this script with a -platform option listed to" >&2
2347 echo " set the system/compiler combination you use." >&2
2354 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2356 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2358 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2359 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2361 if [ -d "$PLATFORM" ]; then
2362 QMAKESPEC="$PLATFORM"
2364 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2366 if [ -d "$XPLATFORM" ]; then
2367 XQMAKESPEC="$XPLATFORM"
2369 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2371 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2372 QT_CROSS_COMPILE=yes
2373 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2374 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2377 if [ "$BUILD_ON_MAC" = "yes" ]; then
2378 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2380 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2381 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2382 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2383 echo " built with 'macx-g++'" >&2
2389 # check specified platforms are supported
2390 if [ '!' -d "$QMAKESPEC" ]; then
2392 echo " The specified system/compiler is not supported:"
2396 echo " Please see the README file for a complete list."
2400 if [ '!' -d "$XQMAKESPEC" ]; then
2402 echo " The specified system/compiler is not supported:"
2406 echo " Please see the README file for a complete list."
2410 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2412 echo " The specified system/compiler port is not complete:"
2414 echo " $XQMAKESPEC/qplatformdefs.h"
2416 echo " Please contact qt-info@nokia.com."
2421 # now look at the configs and figure out what platform we are config'd for
2422 [ "$PLATFORM_QPA" != "yes" ] \
2423 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2425 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2427 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2428 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2429 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2430 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2431 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2435 #-------------------------------------------------------------------------------
2436 # determine the system architecture
2437 #-------------------------------------------------------------------------------
2438 if [ "$OPT_VERBOSE" = "yes" ]; then
2439 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2442 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2443 case `basename "$XPLATFORM"` in
2446 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2448 echo "Please contact qt-info@nokia.com to upgrade your license to"
2449 echo "include this platform, or install the Qt Open Source Edition"
2450 echo "if you intend to develop free software."
2456 if [ -z "${CFG_HOST_ARCH}" ]; then
2457 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2459 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2460 case "$CFG_HOST_ARCH" in
2465 if [ "$OPT_VERBOSE" = "yes" ]; then
2466 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2470 CFG_HOST_ARCH=`uname -p`
2471 if [ "$OPT_VERBOSE" = "yes" ]; then
2472 echo " SGI ($CFG_HOST_ARCH)"
2476 case "$UNAME_MACHINE" in
2478 if [ "$OPT_VERBOSE" = "yes" ]; then
2479 echo " Sun SPARC (sparc)"
2486 if [ "$OPT_VERBOSE" = "yes" ]; then
2487 echo " 64-bit AMD 80x86 (x86_64)"
2489 CFG_HOST_ARCH=x86_64
2492 if [ "$OPT_VERBOSE" = "yes" ]; then
2493 echo " 32-bit Intel 80x86 (i386)"
2501 if [ "$OPT_VERBOSE" = "yes" ]; then
2502 echo " 64-bit IBM PowerPC (powerpc)"
2504 CFG_HOST_ARCH=powerpc
2507 if [ "$OPT_VERBOSE" = "yes" ]; then
2508 echo " HP PA-RISC (parisc)"
2510 CFG_HOST_ARCH=parisc
2513 if [ "$OPT_VERBOSE" = "yes" ]; then
2514 echo " 32-bit Intel 80x86 (i386)"
2518 *:*:x86_64|*:*:amd64)
2519 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2520 if [ "$OPT_VERBOSE" = "yes" ]; then
2521 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2525 if [ "$OPT_VERBOSE" = "yes" ]; then
2526 echo " 64-bit AMD 80x86 (x86_64)"
2528 CFG_HOST_ARCH=x86_64
2532 if [ "$OPT_VERBOSE" = "yes" ]; then
2533 echo " 32-bit PowerPC (powerpc)"
2535 CFG_HOST_ARCH=powerpc
2538 if [ "$OPT_VERBOSE" = "yes" ]; then
2539 echo " 64-bit PowerPC (powerpc)"
2541 CFG_HOST_ARCH=powerpc
2544 if [ "$OPT_VERBOSE" = "yes" ]; then
2545 echo " IBM S/390 (s390)"
2550 if [ "$OPT_VERBOSE" = "yes" ]; then
2556 if [ "$OPT_VERBOSE" = "yes" ]; then
2557 echo " Linux on SPARC"
2562 case "$UNAME_MACHINE" in
2564 if [ "$OPT_VERBOSE" = "yes" ]; then
2565 echo " QNX on Intel 80x86 (i386)"
2572 if [ "$OPT_VERBOSE" = "yes" ]; then
2573 echo " Trying '$UNAME_MACHINE'..."
2575 CFG_HOST_ARCH="$UNAME_MACHINE"
2580 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2581 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2582 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2583 CFG_ARCH=$CFG_HOST_ARCH
2590 # previously, armv6 was a different arch
2596 if [ "$OPT_VERBOSE" = "yes" ]; then
2597 echo "System architecture: '$CFG_ARCH'"
2598 if [ "$PLATFORM_QPA" = "yes" ]; then
2599 echo "Host architecture: '$CFG_HOST_ARCH'"
2603 #-------------------------------------------------------------------------------
2604 # tests that don't need qmake (must be run before displaying help)
2605 #-------------------------------------------------------------------------------
2607 # detect build style
2608 if [ "$CFG_DEBUG" = "auto" ]; then
2609 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2610 CFG_DEBUG_RELEASE=yes
2612 elif [ "$CFG_DEV" = "yes" ]; then
2613 CFG_DEBUG_RELEASE=no
2616 CFG_DEBUG_RELEASE=no
2620 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2621 QT_CONFIG="$QT_CONFIG build_all"
2624 if [ -z "$PKG_CONFIG" ]; then
2625 # See if PKG_CONFIG is set in the mkspec:
2626 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2628 if [ -z "$PKG_CONFIG" ]; then
2629 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2632 # Work out if we can use pkg-config
2633 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2634 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2636 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2637 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2638 echo >&2 "environment!"
2640 if [ -z "$PKG_CONFIG_PATH" ]; then
2642 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2643 echo >&2 "the host compiler's .pc files will be used. This is probably"
2644 echo >&2 "not what you want."
2646 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2648 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2649 echo >&2 "been set. This means your toolchain's .pc files must contain"
2650 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2651 echo >&2 "tests are failing, please check these files."
2656 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2657 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2658 echo >&2 "dependencies"
2664 if [ ! -n "$PKG_CONFIG" ]; then
2665 QT_CONFIG="$QT_CONFIG no-pkg-config"
2668 # pass on $CFG_SDK to the configure tests.
2669 if [ '!' -z "$CFG_SDK" ]; then
2670 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2673 # find the default framework value
2674 if [ "$BUILD_ON_MAC" = "yes" ]; then
2675 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2676 CFG_FRAMEWORK="$CFG_SHARED"
2677 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2679 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2687 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2689 TEST_COMPILER=$QMAKE_CONF_COMPILER
2690 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2691 if [ -z "$TEST_COMPILER" ]; then
2692 echo "ERROR: Cannot set the compiler for the configuration tests"
2698 if [ -n "$CFG_SYSROOT" ]; then
2699 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2700 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2701 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2703 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2707 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2709 # auto-detect precompiled header support
2710 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2711 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2718 #auto-detect DWARF2 on the mac
2719 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2720 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2727 # don't autodetect support for separate debug info on objcopy when
2728 # cross-compiling as lots of toolchains seems to have problems with this
2729 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2730 CFG_SEPARATE_DEBUG_INFO="no"
2733 # auto-detect support for separate debug info in objcopy
2734 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2735 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2736 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2737 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2738 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2739 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2740 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2741 CFG_SEPARATE_DEBUG_INFO=no
2745 # binutils on HP-UX is buggy; default to no.
2746 CFG_SEPARATE_DEBUG_INFO=no
2749 CFG_SEPARATE_DEBUG_INFO=yes
2755 # auto-detect -fvisibility support
2756 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2757 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2758 CFG_REDUCE_EXPORTS=no
2760 CFG_REDUCE_EXPORTS=yes
2764 # detect the availability of the -Bsymbolic-functions linker optimization
2765 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2766 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2767 CFG_REDUCE_RELOCATIONS=no
2769 CFG_REDUCE_RELOCATIONS=yes
2773 # auto-detect GNU make support
2774 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2778 # find the default framework value
2779 if [ "$BUILD_ON_MAC" = "yes" ]; then
2780 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2781 CFG_FRAMEWORK="$CFG_SHARED"
2782 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2784 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2792 # x11 tests are done after qmake is built
2795 #setup the build parts
2796 if [ -z "$CFG_BUILD_PARTS" ]; then
2797 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2799 # don't build tools by default when cross-compiling
2800 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2801 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2804 for nobuild in $CFG_NOBUILD_PARTS; do
2805 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2807 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2809 # echo "WARNING: libs is a required part of the build."
2811 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2814 #-------------------------------------------------------------------------------
2815 # post process QT_INSTALL_* variables
2816 #-------------------------------------------------------------------------------
2818 if [ -z "$QT_INSTALL_PREFIX" ]; then
2819 if [ "$CFG_DEV" = "yes" ]; then
2820 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2822 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2825 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2827 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2828 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2829 if [ "$BUILD_ON_MAC" = "yes" ]; then
2830 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2833 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2836 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2838 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2839 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2840 if [ "$BUILD_ON_MAC" = "yes" ]; then
2841 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2846 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2849 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2851 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2852 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2853 if [ "$BUILD_ON_MAC" = "yes" ]; then
2854 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2855 QT_INSTALL_LIBS="/Libraries/Frameworks"
2859 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2861 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2863 if [ -z "$QT_INSTALL_BINS" ]; then #default
2864 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2865 if [ "$BUILD_ON_MAC" = "yes" ]; then
2866 QT_INSTALL_BINS="/Developer/Applications/Qt"
2869 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2871 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2873 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2874 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2875 if [ "$BUILD_ON_MAC" = "yes" ]; then
2876 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2879 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2881 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2883 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2884 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2885 if [ "$BUILD_ON_MAC" = "yes" ]; then
2886 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2889 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2891 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2893 if [ -z "$QT_INSTALL_DATA" ]; then #default
2894 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2896 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2898 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2899 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2901 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2903 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2904 if [ "$BUILD_ON_MAC" = "yes" ]; then
2905 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2907 QT_INSTALL_SETTINGS=/etc/xdg
2910 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2912 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2913 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2914 if [ "$BUILD_ON_MAC" = "yes" ]; then
2915 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2918 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2920 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2923 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2924 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2925 if [ "$BUILD_ON_MAC" = "yes" ]; then
2926 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2929 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2931 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2933 #------- host paths --------
2935 if [ -z "$QT_HOST_PREFIX" ]; then
2936 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2939 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2943 if [ -z "$QT_HOST_BINS" ]; then #default
2945 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2946 if [ "$BUILD_ON_MAC" = "yes" ]; then
2947 QT_HOST_BINS="/Developer/Applications/Qt"
2950 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2952 QT_HOST_BINS="$QT_INSTALL_BINS"
2955 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2957 if [ -z "$QT_HOST_DATA" ]; then #default
2959 QT_HOST_DATA="$QT_HOST_PREFIX"
2961 QT_HOST_DATA="$QT_INSTALL_DATA"
2964 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2967 #-------------------------------------------------------------------------------
2968 # help - interactive parts of the script _after_ this section please
2969 #-------------------------------------------------------------------------------
2971 # next, emit a usage message if something failed.
2972 if [ "$OPT_HELP" = "yes" ]; then
2973 [ "x$ERROR" = "xyes" ] && echo
2974 if [ "$CFG_NIS" = "no" ]; then
2981 if [ "$CFG_CUPS" = "no" ]; then
2988 if [ "$CFG_ICONV" = "no" ]; then
2995 if [ "$CFG_LARGEFILE" = "no" ]; then
3002 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3009 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3017 if [ "$CFG_XCB" = "no" ]; then
3025 if [ "$CFG_WAYLAND" = "no" ]; then
3032 if [ "$CFG_XINPUT2" = "no" ]; then
3041 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3042 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3043 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3044 [-release] [-debug] [-debug-and-release]
3045 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3046 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3047 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3048 [-plugin-sql-<driver>] [-system-sqlite]
3049 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3050 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3051 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3052 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3053 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3054 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3055 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3056 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3057 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
3058 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3059 [-no-audio-backend] [-audio-backend]
3060 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3061 [-no-optimized-qmake] [-optimized-qmake]
3062 [-no-openssl] [-openssl] [-openssl-linked]
3063 [-no-gtkstyle] [-gtkstyle]
3064 [-qt-pcre] [-system-pcre]
3065 [additional platform specific options (see below)]
3068 Installation options:
3070 -qpa ................ This will enable the QPA build.
3071 QPA is a window system agnostic implementation of Qt.
3073 These are optional, but you may specify install directories.
3075 -prefix <dir> ...... This will install everything relative to <dir>
3076 (default $QT_INSTALL_PREFIX)
3078 if [ "$PLATFORM_QPA" = "yes" ]; then
3081 -hostprefix [dir] .. Tools and libraries needed when developing
3082 applications are installed in [dir]. If [dir] is
3083 not given, the current build directory will be used.
3089 * -prefix-install .... Force a sandboxed "local" installation of
3090 Qt. This will install into
3091 $QT_INSTALL_PREFIX, if this option is
3092 disabled then some platforms will attempt a
3093 "system" install by placing default values to
3094 be placed in a system location other than
3097 You may use these to separate different parts of the install:
3099 -bindir <dir> ......... Executables will be installed to <dir>
3100 (default PREFIX/bin)
3101 -libdir <dir> ......... Libraries will be installed to <dir>
3102 (default PREFIX/lib)
3103 -docdir <dir> ......... Documentation will be installed to <dir>
3104 (default PREFIX/doc)
3105 -headerdir <dir> ...... Headers will be installed to <dir>
3106 (default PREFIX/include)
3107 -plugindir <dir> ...... Plugins will be installed to <dir>
3108 (default PREFIX/plugins)
3109 -importdir <dir> ...... Imports for QML will be installed to <dir>
3110 (default PREFIX/imports)
3111 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3113 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3114 (default PREFIX/translations)
3115 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3116 (default PREFIX/etc/settings)
3117 -examplesdir <dir> .... Examples will be installed to <dir>
3118 (default PREFIX/examples)
3119 -testsdir <dir> ....... Tests will be installed to <dir>
3120 (default PREFIX/tests)
3122 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3125 -hostbindir <dir> .. Host executables will be installed to <dir>
3126 (default HOSTPREFIX/bin)
3127 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
3128 (default HOSTPREFIX)
3135 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3136 that needs to be evaluated. If the evaluation succeeds, the feature is
3137 included. Here is a short explanation of each option:
3139 * -release ........... Compile and link Qt with debugging turned off.
3140 -debug ............. Compile and link Qt with debugging turned on.
3141 -debug-and-release . Compile and link two versions of Qt, with and without
3142 debugging turned on (Mac only).
3144 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3146 -opensource ........ Compile and link the Open-Source Edition of Qt.
3147 -commercial ........ Compile and link the Commercial Edition of Qt.
3150 * -shared ............ Create and use shared Qt libraries.
3151 -static ............ Create and use static Qt libraries.
3153 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3155 -fast .............. Configure Qt quickly by generating Makefiles only for
3156 library and subdirectory targets. All other Makefiles
3157 are created as wrappers, which will in turn run qmake.
3159 -no-largefile ...... Disables large file support.
3160 + -largefile ......... Enables Qt to access files larger than 4 GB.
3163 if [ "$PLATFORM_QPA" = "yes" ]; then
3170 if [ "$CFG_DBUS" = "no" ]; then
3179 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3180 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3182 -no-accessibility .. Do not compile Accessibility support.
3183 * -accessibility ..... Compile Accessibility support.
3185 $SHN -no-stl ............ Do not compile STL support.
3186 $SHY -stl ............... Compile STL support.
3188 -no-sql-<driver> ... Disable SQL <driver> entirely.
3189 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3191 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3194 Possible values for <driver>:
3195 [ $CFG_SQL_AVAILABLE ]
3197 -system-sqlite ..... Use sqlite from the operating system.
3199 -no-phonon-backend.. Do not build the platform phonon plugin.
3200 + -phonon-backend..... Build the platform phonon plugin.
3202 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3203 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3205 -no-declarative-debug ..... Do not build the declarative debugging support.
3206 + -declarative-debug ....... Build the declarative debugging support.
3208 -platform target ... The operating system and compiler you are building
3211 See the README file for a list of supported
3212 operating systems and compilers.
3215 if [ "${PLATFORM_QPA}" != "yes" ]; then
3217 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3218 raster - Software rasterizer
3219 opengl - Rendering via OpenGL, Experimental!
3220 openvg - Rendering via OpenVG, Experimental!
3227 -no-mmx ............ Do not compile with use of MMX instructions.
3228 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3229 -no-sse ............ Do not compile with use of SSE instructions.
3230 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3231 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3232 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3233 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3234 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3235 -no-avx ............ Do not compile with use of AVX instructions.
3236 -no-neon ........... Do not compile with use of NEON instructions.
3238 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3239 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3241 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3243 -D <string> ........ Add an explicit define to the preprocessor.
3244 -I <string> ........ Add an explicit include path.
3245 -L <string> ........ Add an explicit library path.
3247 -help, -h .......... Display this information.
3249 Third Party Libraries:
3251 -qt-zlib ........... Use the zlib bundled with Qt.
3252 + -system-zlib ....... Use zlib from the operating system.
3253 See http://www.gzip.org/zlib
3255 -no-gif ............ Do not compile GIF reading support.
3257 -no-libpng ......... Do not compile PNG support.
3258 -qt-libpng ......... Use the libpng bundled with Qt.
3259 + -system-libpng ..... Use libpng from the operating system.
3260 See http://www.libpng.org/pub/png
3262 -no-libjpeg ........ Do not compile JPEG support.
3263 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3264 + -system-libjpeg .... Use libjpeg from the operating system.
3265 See http://www.ijg.org
3267 -no-openssl ........ Do not compile support for OpenSSL.
3268 + -openssl ........... Enable run-time OpenSSL support.
3269 -openssl-linked .... Enabled linked OpenSSL support.
3271 -qt-pcre ........... Use the PCRE library bundled with Qt.
3272 + -system-pcre ....... Use the PCRE library from the operating system.
3276 -make <part> ....... Add part to the list of parts to be built at make time.
3277 ($QT_DEFAULT_BUILD_PARTS)
3278 -nomake <part> ..... Exclude part from the list of parts to be built.
3280 -R <string> ........ Add an explicit runtime library path to the Qt
3282 -l <string> ........ Add an explicit library.
3284 -no-rpath .......... Do not use the library install path as a runtime
3286 + -rpath ............. Link Qt libraries and executables using the library
3287 install path as a runtime library path. Equivalent
3288 to -R install_libpath
3290 -continue .......... Continue as far as possible if an error occurs.
3292 -verbose, -v ....... Print verbose information about each step of the
3295 -silent ............ Reduce the build output so that warnings and errors
3296 can be seen more easily.
3298 * -no-optimized-qmake ... Do not build qmake optimized.
3299 -optimized-qmake ...... Build qmake optimized.
3301 -no-gui ............ Don't build the Qt GUI library
3303 $NSN -no-nis ............ Do not compile NIS support.
3304 $NSY -nis ............... Compile NIS support.
3306 $CUN -no-cups ........... Do not compile CUPS support.
3307 $CUY -cups .............. Compile CUPS support.
3308 Requires cups/cups.h and libcups.so.2.
3310 $CIN -no-iconv .......... Do not compile support for iconv(3).
3311 $CIY -iconv ............. Compile support for iconv(3).
3313 $PHN -no-pch ............ Do not use precompiled header support.
3314 $PHY -pch ............... Use precompiled header support.
3316 $DBN -no-dbus ........... Do not compile the QtDBus module.
3317 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3318 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3320 -reduce-relocations ..... Reduce relocations in the libraries through extra
3321 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3322 experimental; needs GNU ld >= 2.18).
3324 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3328 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3329 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3336 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3344 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3348 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3349 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3351 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3352 $XCBY -xcb ............... Compile Xcb support.
3354 $XWN -no-wayland......... Do not compile Wayland support.
3355 $XWY -wayland .......... Compile Wayland support.
3361 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3365 $X2N -no-xinput2......... Do not compile XInput2 support.
3366 $X2Y -xinput2............ Compile XInput2 support.
3372 if [ "$PLATFORM_X11" = "yes" ]; then
3373 if [ "$CFG_SM" = "no" ]; then
3380 if [ "$CFG_XSHAPE" = "no" ]; then
3387 if [ "$CFG_XVIDEO" = "no" ]; then
3394 if [ "$CFG_XINERAMA" = "no" ]; then
3401 if [ "$CFG_FONTCONFIG" = "no" ]; then
3408 if [ "$CFG_XCURSOR" = "no" ]; then
3415 if [ "$CFG_XFIXES" = "no" ]; then
3422 if [ "$CFG_XRANDR" = "no" ]; then
3429 if [ "$CFG_XRENDER" = "no" ]; then
3436 if [ "$CFG_MITSHM" = "no" ]; then
3443 if [ "$CFG_XINPUT" = "no" ]; then
3450 if [ "$CFG_XKB" = "no" ]; then
3457 if [ "$CFG_IM" = "no" ]; then
3468 -no-gtkstyle ....... Do not build the GTK theme integration.
3469 + -gtkstyle .......... Build the GTK theme integration.
3471 * -no-nas-sound ...... Do not compile in NAS sound support.
3472 -system-nas-sound .. Use NAS libaudio from the operating system.
3473 See http://radscan.com/nas.html
3475 -egl ............... Use EGL instead of GLX to manage contexts.
3476 When building for desktop OpenGL, this option will
3477 make Qt use EGL to manage contexts rather than the
3478 GLX, which is the default. Note: For OpenGL ES, EGL
3481 -no-opengl ......... Do not support OpenGL.
3482 + -opengl <api> ...... Enable OpenGL support.
3483 With no parameter, this will auto-detect the "best"
3484 OpenGL API to use. If desktop OpenGL is available, it
3485 will be used. Use desktop or es2 for <api>
3486 to force the use of the Desktop OpenGL or
3487 OpenGL ES 2 APIs instead.
3489 -no-openvg ........ Do not support OpenVG.
3490 + -openvg ........... Enable OpenVG support.
3491 Requires EGL support, typically supplied by an OpenGL
3492 or other graphics implementation.
3494 $SMN -no-sm ............. Do not support X Session Management.
3495 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3497 $SHN -no-xshape ......... Do not compile XShape support.
3498 $SHY -xshape ............ Compile XShape support.
3499 Requires X11/extensions/shape.h.
3501 $XVN -no-xvideo ......... Do not compile XVideo support.
3502 $XVY -xvideo ............ Compile XVideo support.
3503 Requires X11/extensions/Xv.h & Xvlib.h.
3505 $SHN -no-xsync .......... Do not compile XSync support.
3506 $SHY -xsync ............. Compile XSync support.
3507 Requires X11/extensions/sync.h.
3509 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3510 $XAY -xinerama .......... Compile Xinerama support.
3511 Requires X11/extensions/Xinerama.h and libXinerama.
3512 By default, Xinerama support will be compiled if
3513 available and the shared libraries are dynamically
3516 $XCN -no-xcursor ........ Do not compile Xcursor support.
3517 $XCY -xcursor ........... Compile Xcursor support.
3518 Requires X11/Xcursor/Xcursor.h and libXcursor.
3519 By default, Xcursor support will be compiled if
3520 available and the shared libraries are dynamically
3523 $XFN -no-xfixes ......... Do not compile Xfixes support.
3524 $XFY -xfixes ............ Compile Xfixes support.
3525 Requires X11/extensions/Xfixes.h and libXfixes.
3526 By default, Xfixes support will be compiled if
3527 available and the shared libraries are dynamically
3530 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3531 $XZY -xrandr ............ Compile Xrandr support.
3532 Requires X11/extensions/Xrandr.h and libXrandr.
3534 $XRN -no-xrender ........ Do not compile Xrender support.
3535 $XRY -xrender ........... Compile Xrender support.
3536 Requires X11/extensions/Xrender.h and libXrender.
3538 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3539 $XMY -mitshm ............ Compile MIT-SHM support.
3540 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3542 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3543 $FCGY -fontconfig ........ Compile FontConfig support.
3544 Requires fontconfig/fontconfig.h, libfontconfig,
3545 freetype.h and libfreetype.
3547 $XIN -no-xinput ......... Do not compile Xinput support.
3548 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3549 which requires IRIX with wacom.h and libXi or
3550 XFree86 with X11/extensions/XInput.h and libXi.
3552 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3553 $XKY -xkb ............... Compile XKB support.
3558 if [ "$BUILD_ON_MAC" = "yes" ]; then
3563 -Fstring ........... Add an explicit framework path.
3564 -fw string ......... Add an explicit framework.
3566 * -framework ......... Build Qt as a series of frameworks and
3567 link tools against those frameworks.
3568 -no-framework ...... Do not build Qt as a series of frameworks.
3570 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3571 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3573 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3574 Only one arch value can be specified.
3576 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3577 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3579 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3580 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3581 QT_ENABLE_HARFBUZZ environment variable.
3586 if [ "$PLATFORM_QPA" = "yes" ]; then
3592 if [ "$PLATFORM_QPA" = "yes" ]; then
3595 -xplatform target ... The target platform when cross-compiling.
3597 -no-feature-<feature> Do not compile in <feature>.
3598 -feature-<feature> .. Compile in <feature>. The available features
3599 are described in src/corelib/global/qfeatures.txt
3601 -no-freetype ........ Do not compile in Freetype2 support.
3602 -qt-freetype ........ Use the libfreetype bundled with Qt.
3603 * -system-freetype .... Use libfreetype from the operating system.
3604 See http://www.freetype.org/
3606 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3607 default ($CFG_QCONFIG).
3609 -no-opengl .......... Do not support OpenGL.
3610 -opengl <api> ....... Enable OpenGL ES support
3611 With no parameter, this will attempt to auto-detect
3612 OpenGL ES 2, or regular desktop OpenGL.
3613 Use es2 for <api> to override auto-detection.
3617 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3618 if [ "$CFG_GLIB" = "no" ]; then
3626 $GBN -no-glib ........... Do not compile Glib support.
3627 $GBY -glib .............. Compile Glib support.
3632 [ "x$ERROR" = "xyes" ] && exit 1
3637 # -----------------------------------------------------------------------------
3638 # LICENSING, INTERACTIVE PART
3639 # -----------------------------------------------------------------------------
3641 if [ "$PLATFORM_QPA" = "yes" ]; then
3642 Platform="Qt Lighthouse"
3643 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3644 Platform="Qt for Windows"
3645 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3647 Platform="Qt for Linux/X11"
3651 echo "This is the $Platform ${EditionString} Edition."
3654 if [ "$Edition" = "OpenSource" ]; then
3656 echo "You are licensed to use this software under the terms of"
3657 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3658 if [ -f "$relpath/LICENSE.GPL3" ]; then
3659 echo "You are also licensed to use this software under the terms of"
3660 echo "the GNU General Public License (GPL) versions 3."
3666 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3667 echo "You have already accepted the terms of the $LicenseType license."
3670 if [ -f "$relpath/LICENSE.GPL3" ]; then
3671 echo "Type '3' to view the GNU General Public License version 3."
3673 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3674 echo "Type 'yes' to accept this license offer."
3675 echo "Type 'no' to decline this license offer."
3677 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3681 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3683 elif [ "$acceptance" = "no" ]; then
3684 echo "You are not licensed to use this software."
3687 elif [ "$acceptance" = "3" ]; then
3688 more "$relpath/LICENSE.GPL3"
3689 elif [ "$acceptance" = "L" ]; then
3690 more "$relpath/LICENSE.LGPL"
3693 elif [ "$Edition" = "Preview" ]; then
3694 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3697 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3698 echo "You have already accepted the terms of the $LicenseType license."
3701 echo "You are licensed to use this software under the terms of"
3702 echo "the $TheLicense"
3704 echo "Type '?' to read the Preview License."
3705 echo "Type 'yes' to accept this license offer."
3706 echo "Type 'no' to decline this license offer."
3708 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3712 if [ "$acceptance" = "yes" ]; then
3714 elif [ "$acceptance" = "no" ] ;then
3715 echo "You are not licensed to use this software."
3718 elif [ "$acceptance" = "?" ]; then
3719 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3722 elif [ "$Edition" != "OpenSource" ]; then
3723 if [ -n "$ExpiryDate" ]; then
3724 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3725 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3726 Today=`date +%Y%m%d`
3727 if [ "$Today" -gt "$ExpiryDate" ]; then
3728 case "$LicenseType" in
3729 Commercial|Academic|Educational)
3730 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3732 echo "NOTICE NOTICE NOTICE NOTICE"
3734 echo " Your support and upgrade period has expired."
3736 echo " You are no longer licensed to use this version of Qt."
3737 echo " Please contact qt-info@nokia.com to renew your support"
3738 echo " and upgrades for this license."
3740 echo "NOTICE NOTICE NOTICE NOTICE"
3745 echo "WARNING WARNING WARNING WARNING"
3747 echo " Your support and upgrade period has expired."
3749 echo " You may continue to use your last licensed release"
3750 echo " of Qt under the terms of your existing license"
3751 echo " agreement. But you are not entitled to technical"
3752 echo " support, nor are you entitled to use any more recent"
3753 echo " Qt releases."
3755 echo " Please contact qt-info@nokia.com to renew your"
3756 echo " support and upgrades for this license."
3758 echo "WARNING WARNING WARNING WARNING"
3765 echo "NOTICE NOTICE NOTICE NOTICE"
3767 echo " Your Evaluation license has expired."
3769 echo " You are no longer licensed to use this software. Please"
3770 echo " contact qt-info@nokia.com to purchase license, or install"
3771 echo " the Qt Open Source Edition if you intend to develop free"
3774 echo "NOTICE NOTICE NOTICE NOTICE"
3781 TheLicense=`head -n 1 "$outpath/LICENSE"`
3783 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3784 echo "You have already accepted the terms of the $TheLicense."
3787 echo "You are licensed to use this software under the terms of"
3788 echo "the $TheLicense."
3790 echo "Type '?' to view the $TheLicense."
3791 echo "Type 'yes' to accept this license offer."
3792 echo "Type 'no' to decline this license offer."
3794 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3798 if [ "$acceptance" = "yes" ]; then
3800 elif [ "$acceptance" = "no" ]; then
3801 echo "You are not licensed to use this software."
3804 else [ "$acceptance" = "?" ]
3805 more "$outpath/LICENSE"
3810 # this should be moved somewhere else
3813 AIX_VERSION=`uname -v`
3814 if [ "$AIX_VERSION" -lt "5" ]; then
3815 QMakeVar add QMAKE_LIBS_X11 -lbind
3822 #-------------------------------------------------------------------------------
3823 # generate qconfig.cpp
3824 #-------------------------------------------------------------------------------
3825 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3827 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3829 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3830 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3832 /* Installation date */
3833 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3835 /* Installation Info */
3836 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3837 "qt_prfxpath=$QT_INSTALL_PREFIX",
3838 "qt_docspath=$QT_INSTALL_DOCS",
3839 "qt_hdrspath=$QT_INSTALL_HEADERS",
3840 "qt_libspath=$QT_INSTALL_LIBS",
3841 "qt_binspath=$QT_INSTALL_BINS",
3842 "qt_plugpath=$QT_INSTALL_PLUGINS",
3843 "qt_impspath=$QT_INSTALL_IMPORTS",
3844 "qt_datapath=$QT_INSTALL_DATA",
3845 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3846 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3847 "qt_tstspath=$QT_INSTALL_TESTS",
3848 #ifdef QT_BUILD_QMAKE
3849 "qt_ssrtpath=$CFG_SYSROOT",
3850 "qt_hpfxpath=$QT_HOST_PREFIX",
3851 "qt_hbinpath=$QT_HOST_BINS",
3852 "qt_hdatpath=$QT_HOST_DATA",
3855 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3858 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3860 /* strlen( "qt_lcnsxxxx" ) == 12 */
3861 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3862 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3864 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3867 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3868 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3869 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3871 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3872 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3873 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3876 # -----------------------------------------------------------------------------
3877 if [ "$LicenseType" = "Evaluation" ]; then
3878 EVALKEY=qt_qevalkey=$LicenseKeyExt
3879 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3880 EVALKEY=qt_qevalkey=
3883 if [ -n "$EVALKEY" ]; then
3884 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3885 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3886 /* Evaluation license key */
3887 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3889 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3893 # -----------------------------------------------------------------------------
3895 # -----------------------------------------------------------------------------
3898 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3900 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3901 if [ "$OPT_SHADOW" = "yes" ]; then
3902 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3903 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3904 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3908 # $1: input variable name (awk regexp)
3909 # $2: optional output variable name
3910 # $3: optional value transformation (sed command)
3911 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3912 # is where the resulting variable is written to
3913 setBootstrapVariable()
3915 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3919 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3920 echo "Creating qmake. Please wait..."
3923 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3924 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3925 if [ -f "$QCONFIG_H" ]; then
3926 OLD_QCONFIG_H=$QCONFIG_H
3927 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3930 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3931 # when building qmake, we use #defines for the install paths,
3932 # however they are real functions in the library
3933 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3934 mkdir -p "$outpath/src/corelib/global"
3935 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3936 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3939 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3941 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3942 rm -rf mkspecs/default
3943 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3944 mkdir -p "$outpath/qmake" || exit
3946 for mkfile in GNUmakefile Makefile; do
3949 in_mkfile="${mkfile}.in"
3950 if [ "$mkfile" = "Makefile" ]; then
3951 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3952 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3954 in_mkfile="${mkfile}.unix"
3956 in_mkfile="$relpath/qmake/$in_mkfile"
3957 mkfile="$outpath/qmake/$mkfile"
3958 if [ -f "$mkfile" ]; then
3959 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3962 [ -f "$in_mkfile" ] || continue
3964 echo "########################################################################" > "$mkfile"
3965 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3966 echo "########################################################################" >> "$mkfile"
3969 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3970 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3971 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3973 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3974 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3977 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3978 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3979 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3980 setBootstrapVariable QMAKE_CFLAGS
3981 setBootstrapVariable QMAKE_CXXFLAGS
3982 setBootstrapVariable QMAKE_LFLAGS
3984 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3985 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3986 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3988 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3989 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3990 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3991 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3992 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3993 elif [ "$CFG_DEBUG" = "yes" ]; then
3994 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3995 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3996 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3997 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4000 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
4001 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
4002 for rpath in $RPATH_FLAGS; do
4003 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4006 if [ "$BUILD_ON_MAC" = "yes" ]; then
4007 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4008 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4009 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4010 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4011 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4012 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4013 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4014 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4015 if [ '!' -z "$CFG_SDK" ]; then
4016 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4017 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4018 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4019 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4020 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4023 if [ '!' -z "$D_FLAGS" ]; then
4024 for DEF in $D_FLAGS; do
4025 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4028 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4029 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4030 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4031 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4033 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4034 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4035 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4036 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4037 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4038 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4039 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4040 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4041 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4042 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4044 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4045 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4046 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4047 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4052 QMAKE_BUILD_ERROR=no
4053 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4054 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4055 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4056 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4059 #-------------------------------------------------------------------------------
4060 # tests that need qmake
4061 #-------------------------------------------------------------------------------
4063 # detect availability of float math.h functions
4064 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4065 CFG_USE_FLOATMATH=yes
4067 CFG_USE_FLOATMATH=no
4070 # detect mmx support
4071 if [ "${CFG_MMX}" = "auto" ]; then
4072 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4079 # detect 3dnow support
4080 if [ "${CFG_3DNOW}" = "auto" ]; then
4081 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4088 # detect sse support
4089 if [ "${CFG_SSE}" = "auto" ]; then
4090 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4097 # detect sse2 support
4098 if [ "${CFG_SSE2}" = "auto" ]; then
4099 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4106 # detect sse3 support
4107 if [ "${CFG_SSE3}" = "auto" ]; then
4108 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4115 # detect ssse3 support
4116 if [ "${CFG_SSSE3}" = "auto" ]; then
4117 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4124 # detect sse4.1 support
4125 if [ "${CFG_SSE4_1}" = "auto" ]; then
4126 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
4133 # detect sse4.2 support
4134 if [ "${CFG_SSE4_2}" = "auto" ]; then
4135 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
4142 # detect avx support
4143 if [ "${CFG_AVX}" = "auto" ]; then
4144 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4151 # check iWMMXt support
4152 if [ "$CFG_IWMMXT" = "yes" ]; then
4153 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4154 if [ $? != "0" ]; then
4155 echo "The iWMMXt functionality test failed!"
4156 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4161 # detect neon support
4162 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4163 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
4170 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4173 if [ "$CFG_ZLIB" = "no" ]; then
4174 # Note: Qt no longer support builds without zlib
4175 # So we force a "no" to be "auto" here.
4176 # If you REALLY really need no zlib support, you can still disable
4177 # it by doing the following:
4178 # add "no-zlib" to mkspecs/qconfig.pri
4179 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4181 # There's no guarantee that Qt will build under those conditions
4186 if [ "$CFG_ZLIB" = "auto" ]; then
4187 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
4194 if [ "$CFG_LARGEFILE" = "auto" ]; then
4195 #Large files should be enabled for all Linux systems
4199 # detect how jpeg should be built
4200 if [ "$CFG_JPEG" = "auto" ]; then
4201 if [ "$CFG_SHARED" = "yes" ]; then
4208 if [ "$CFG_LIBJPEG" = "auto" ]; then
4209 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
4216 # detect how gif should be built
4217 if [ "$CFG_GIF" = "auto" ]; then
4218 if [ "$CFG_SHARED" = "yes" ]; then
4226 if [ "$CFG_LIBPNG" = "auto" ]; then
4227 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
4234 # detect accessibility
4235 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4236 CFG_ACCESSIBILITY=yes
4239 # auto-detect SQL-modules support
4240 for _SQLDR in $CFG_SQL_AVAILABLE; do
4243 if [ "$CFG_SQL_mysql" != "no" ]; then
4244 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4245 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4246 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4247 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4248 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4249 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4250 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4252 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4253 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4254 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4255 echo " You need MySql 4 or higher."
4256 echo " If you believe this message is in error you may use the continue"
4257 echo " switch (-continue) to $0 to continue."
4262 QT_LFLAGS_MYSQL_R=""
4266 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
4267 QMakeVar add CONFIG use_libmysqlclient_r
4268 if [ "$CFG_SQL_mysql" = "auto" ]; then
4269 CFG_SQL_mysql=plugin
4271 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4272 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
4273 if [ "$CFG_SQL_mysql" = "auto" ]; then
4274 CFG_SQL_mysql=plugin
4277 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4278 echo "MySQL support cannot be enabled due to functionality tests!"
4279 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4280 echo " If you believe this message is in error you may use the continue"
4281 echo " switch (-continue) to $0 to continue."
4286 QT_LFLAGS_MYSQL_R=""
4294 if [ "$CFG_SQL_psql" != "no" ]; then
4295 # Be careful not to use native pg_config when cross building.
4296 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4297 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4298 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4300 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4301 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4302 # But, respect PSQL_LIBS if set
4303 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4304 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
4305 if [ "$CFG_SQL_psql" = "auto" ]; then
4309 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4310 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4311 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4312 echo " If you believe this message is in error you may use the continue"
4313 echo " switch (-continue) to $0 to continue."
4324 if [ "$CFG_SQL_odbc" != "no" ]; then
4325 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
4326 if [ "$CFG_SQL_odbc" = "auto" ]; then
4330 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
4331 QT_LFLAGS_ODBC="-liodbc"
4332 if [ "$CFG_SQL_odbc" = "auto" ]; then
4336 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4337 echo "ODBC support cannot be enabled due to functionality tests!"
4338 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4339 echo " If you believe this message is in error you may use the continue"
4340 echo " switch (-continue) to $0 to continue."
4350 if [ "$CFG_SQL_oci" != "no" ]; then
4351 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
4352 if [ "$CFG_SQL_oci" = "auto" ]; then
4356 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4357 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4358 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4359 echo " If you believe this message is in error you may use the continue"
4360 echo " switch (-continue) to $0 to continue."
4369 if [ "$CFG_SQL_tds" != "no" ]; then
4370 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4371 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4372 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
4373 if [ "$CFG_SQL_tds" = "auto" ]; then
4377 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4378 echo "TDS support cannot be enabled due to functionality tests!"
4379 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4380 echo " If you believe this message is in error you may use the continue"
4381 echo " switch (-continue) to $0 to continue."
4390 if [ "$CFG_SQL_db2" != "no" ]; then
4391 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
4392 if [ "$CFG_SQL_db2" = "auto" ]; then
4396 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4397 echo "ODBC support cannot be enabled due to functionality tests!"
4398 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4399 echo " If you believe this message is in error you may use the continue"
4400 echo " switch (-continue) to $0 to continue."
4409 if [ "$CFG_SQL_ibase" != "no" ]; then
4410 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
4411 if [ "$CFG_SQL_ibase" = "auto" ]; then
4412 CFG_SQL_ibase=plugin
4415 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4416 echo "InterBase support cannot be enabled due to functionality tests!"
4417 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4418 echo " If you believe this message is in error you may use the continue"
4419 echo " switch (-continue) to $0 to continue."
4428 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4429 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
4430 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4431 CFG_SQL_sqlite2=plugin
4434 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4435 echo "SQLite2 support cannot be enabled due to functionality tests!"
4436 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4437 echo " If you believe this message is in error you may use the continue"
4438 echo " switch (-continue) to $0 to continue."
4447 if [ "$CFG_SQL_sqlite" != "no" ]; then
4448 SQLITE_AUTODETECT_FAILED="no"
4449 if [ "$CFG_SQLITE" = "system" ]; then
4450 if [ -n "$PKG_CONFIG" ]; then
4451 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4452 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4454 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
4455 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4456 CFG_SQL_sqlite=plugin
4458 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4460 SQLITE_AUTODETECT_FAILED="yes"
4463 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4464 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4465 CFG_SQL_sqlite=plugin
4468 SQLITE_AUTODETECT_FAILED="yes"
4472 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4473 echo "SQLite support cannot be enabled due to functionality tests!"
4474 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4475 echo " If you believe this message is in error you may use the continue"
4476 echo " switch (-continue) to $0 to continue."
4482 if [ "$OPT_VERBOSE" = "yes" ]; then
4483 echo "unknown SQL driver: $_SQLDR"
4489 # auto-detect NIS support
4490 if [ "$CFG_NIS" != "no" ]; then
4491 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
4494 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4495 echo "NIS support cannot be enabled due to functionality tests!"
4496 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4497 echo " If you believe this message is in error you may use the continue"
4498 echo " switch (-continue) to $0 to continue."
4506 # auto-detect CUPS support
4507 if [ "$CFG_CUPS" != "no" ]; then
4508 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
4511 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4512 echo "Cups support cannot be enabled due to functionality tests!"
4513 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4514 echo " If you believe this message is in error you may use the continue"
4515 echo " switch (-continue) to $0 to continue."
4523 # auto-detect iconv(3) support
4524 if [ "$CFG_ICONV" != "no" ]; then
4525 if [ "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
4527 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
4529 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
4531 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
4534 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4535 echo "Iconv support cannot be enabled due to functionality tests!"
4536 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4537 echo " If you believe this message is in error you may use the continue"
4538 echo " switch (-continue) to $0 to continue."
4546 # auto-detect libdbus-1 support
4547 if [ "$CFG_DBUS" != "no" ]; then
4548 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4549 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4550 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4552 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
4553 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4554 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4555 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4557 if [ "$CFG_DBUS" = "auto" ]; then
4559 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4560 # CFG_DBUS is "yes" or "linked" here
4562 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4563 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4564 echo " If you believe this message is in error you may use the continue"
4565 echo " switch (-continue) to $0 to continue."
4572 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4574 # auto-detect Glib support
4575 if [ "$CFG_GLIB" != "no" ]; then
4576 if [ -n "$PKG_CONFIG" ]; then
4577 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4578 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4580 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB $X11TESTS_FLAGS ; then
4582 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4583 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4585 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4586 echo "Glib support cannot be enabled due to functionality tests!"
4587 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4588 echo " If you believe this message is in error you may use the continue"
4589 echo " switch (-continue) to $0 to continue."
4598 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4599 if [ -n "$PKG_CONFIG" ]; then
4600 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4601 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4603 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then
4605 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4606 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4608 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4609 echo "Gstreamer support cannot be enabled due to functionality tests!"
4610 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4611 echo " If you believe this message is in error you may use the continue"
4612 echo " switch (-continue) to $0 to continue."
4618 elif [ "$CFG_GLIB" = "no" ]; then
4622 # auto-detect libicu support
4623 if [ "$CFG_ICU" != "no" ]; then
4624 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4625 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4627 if [ "$CFG_ICU" = "auto" ]; then
4629 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4632 echo "The ICU library support cannot be enabled."
4633 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4634 echo " If you believe this message is in error you may use the continue"
4635 echo " switch (-continue) to $0 to continue."
4641 # Auto-detect PulseAudio support
4642 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4643 if [ -n "$PKG_CONFIG" ]; then
4644 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4645 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4647 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO $X11TESTS_FLAGS; then
4649 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4650 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4652 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4653 echo "PulseAudio support cannot be enabled due to functionality tests!"
4654 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4655 echo " If you believe this message is in error you may use the continue"
4656 echo " switch (-continue) to $0 to continue."
4666 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4667 x11tests="$relpath/config.tests/x11"
4670 # work around broken X11 headers when using GCC 2.95 or later
4672 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4673 if [ $NOTYPE = "yes" ]; then
4674 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4675 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4678 # Check we actually have X11 :-)
4679 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4680 if [ $? != "0" ]; then
4681 echo "Basic XLib functionality test failed!"
4682 echo " You might need to modify the include and library search paths by editing"
4683 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4689 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4690 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4691 if [ "$CFG_GUI" = "no" ]; then
4692 if [ "$CFG_OPENGL" = "auto" ]; then
4695 if [ "$CFG_OPENGL" != "no" ]; then
4696 echo "OpenGL enabled, but GUI disabled."
4697 echo " You might need to either enable the GUI or disable OpenGL"
4701 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4702 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4704 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
4706 if [ "$CFG_EGL" = "no" ]; then
4710 if [ "$CFG_OPENGL" = "yes" ]; then
4711 echo "All the OpenGL functionality tests failed!"
4712 echo " You might need to modify the include and library search paths by editing"
4713 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4714 echo " ${XQMAKESPEC}."
4721 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4722 if [ "$CFG_OPENGL" = "desktop" ]; then
4723 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4724 if [ $? != "0" ]; then
4725 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4732 elif [ "$CFG_OPENGL" = "es2" ]; then
4734 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4735 if [ $? != "0" ]; then
4736 echo "The OpenGL ES 2.0 functionality test failed!"
4737 echo " You might need to modify the include and library search paths by editing"
4738 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4739 echo " ${XQMAKESPEC}."
4742 elif [ "$CFG_OPENGL" = "desktop" ]; then
4743 # Desktop OpenGL support
4744 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4745 if [ $? != "0" ]; then
4746 echo "The OpenGL functionality test failed!"
4747 echo " You might need to modify the include and library search paths by editing"
4748 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4749 echo " ${XQMAKESPEC}."
4754 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4755 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4756 if [ $? != "0" ]; then
4757 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4764 fi # X11/MINGW OpenGL
4767 if [ "$PLATFORM_X11" = "yes" ]; then
4768 # auto-detect Xcursor support
4769 if [ "$CFG_XCURSOR" != "no" ]; then
4770 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xcursor "Xcursor" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4771 if [ "$CFG_XCURSOR" != "runtime" ]; then
4775 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4776 echo "Xcursor support cannot be enabled due to functionality tests!"
4777 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4778 echo " If you believe this message is in error you may use the continue"
4779 echo " switch (-continue) to $0 to continue."
4787 # auto-detect Xfixes support
4788 if [ "$CFG_XFIXES" != "no" ]; then
4789 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4790 if [ "$CFG_XFIXES" != "runtime" ]; then
4794 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4795 echo "Xfixes support cannot be enabled due to functionality tests!"
4796 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4797 echo " If you believe this message is in error you may use the continue"
4798 echo " switch (-continue) to $0 to continue."
4806 # auto-detect Xrandr support (resize and rotate extension)
4807 if [ "$CFG_XRANDR" != "no" ]; then
4808 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrandr "Xrandr" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4809 if [ "$CFG_XRANDR" != "runtime" ]; then
4813 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4814 echo "Xrandr support cannot be enabled due to functionality tests!"
4815 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4816 echo " If you believe this message is in error you may use the continue"
4817 echo " switch (-continue) to $0 to continue."
4825 # auto-detect Xrender support
4826 if [ "$CFG_XRENDER" != "no" ]; then
4827 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4830 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4831 echo "Xrender support cannot be enabled due to functionality tests!"
4832 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4833 echo " If you believe this message is in error you may use the continue"
4834 echo " switch (-continue) to $0 to continue."
4842 # auto-detect MIT-SHM support
4843 if [ "$CFG_MITSHM" != "no" ]; then
4844 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/mitshm "mitshm" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4847 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4848 echo "MITSHM support cannot be enabled due to functionality tests!"
4849 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4850 echo " If you believe this message is in error you may use the continue"
4851 echo " switch (-continue) to $0 to continue."
4859 # auto-detect FontConfig support
4860 if [ "$CFG_FONTCONFIG" != "no" ]; then
4861 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4862 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4863 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4865 QT_CFLAGS_FONTCONFIG=
4866 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4868 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
4870 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4871 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4872 CFG_LIBFREETYPE=system
4874 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4875 echo "FontConfig support cannot be enabled due to functionality tests!"
4876 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4877 echo " If you believe this message is in error you may use the continue"
4878 echo " switch (-continue) to $0 to continue."
4886 # auto-detect Session Management support
4887 if [ "$CFG_SM" = "auto" ]; then
4888 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/sm "Session Management" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4891 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4892 echo "Session Management support cannot be enabled due to functionality tests!"
4893 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4894 echo " If you believe this message is in error you may use the continue"
4895 echo " switch (-continue) to $0 to continue."
4903 # auto-detect SHAPE support
4904 if [ "$CFG_XSHAPE" != "no" ]; then
4905 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xshape "XShape" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4908 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4909 echo "XShape support cannot be enabled due to functionality tests!"
4910 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4911 echo " If you believe this message is in error you may use the continue"
4912 echo " switch (-continue) to $0 to continue."
4920 # auto-detect XVideo support
4921 if [ "$CFG_XVIDEO" != "no" ]; then
4922 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xvideo "XVideo" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4925 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4926 echo "XVideo support cannot be enabled due to functionality tests!"
4927 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4928 echo " If you believe this message is in error you may use the continue"
4929 echo " switch (-continue) to $0 to continue."
4937 # auto-detect XSync support
4938 if [ "$CFG_XSYNC" != "no" ]; then
4939 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4942 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4943 echo "XSync support cannot be enabled due to functionality tests!"
4944 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4945 echo " If you believe this message is in error you may use the continue"
4946 echo " switch (-continue) to $0 to continue."
4954 # auto-detect Xinerama support
4955 if [ "$CFG_XINERAMA" != "no" ]; then
4956 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinerama "Xinerama" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4957 if [ "$CFG_XINERAMA" != "runtime" ]; then
4961 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4962 echo "Xinerama support cannot be enabled due to functionality tests!"
4963 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4964 echo " If you believe this message is in error you may use the continue"
4965 echo " switch (-continue) to $0 to continue."
4973 # auto-detect Xinput support
4974 if [ "$CFG_XINPUT" != "no" ]; then
4975 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput "XInput" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4976 if [ "$CFG_XINPUT" != "runtime" ]; then
4980 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4981 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4982 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4983 echo " If you believe this message is in error you may use the continue"
4984 echo " switch (-continue) to $0 to continue."
4992 # auto-detect XKB support
4993 if [ "$CFG_XKB" != "no" ]; then
4994 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xkb "XKB" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
4997 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4998 echo "XKB support cannot be enabled due to functionality tests!"
4999 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5000 echo " If you believe this message is in error you may use the continue"
5001 echo " switch (-continue) to $0 to continue."
5009 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5010 if [ -n "$PKG_CONFIG" ]; then
5011 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5012 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5014 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5016 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5017 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5019 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5020 echo "Gtk theme support cannot be enabled due to functionality tests!"
5021 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5022 echo " If you believe this message is in error you may use the continue"
5023 echo " switch (-continue) to $0 to continue."
5029 elif [ "$CFG_GLIB" = "no" ]; then
5035 if [ "$BUILD_ON_MAC" = "yes" ]; then
5036 if [ "$CFG_PHONON" != "no" ]; then
5037 # Always enable Phonon (unless it was explicitly disabled)
5041 if [ "$CFG_COREWLAN" = "auto" ]; then
5042 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
5051 if [ "$PLATFORM_QPA" = "yes" ]; then
5052 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5053 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5054 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5056 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
5059 if [ "$CFG_OPENGL" = "yes" ]; then
5060 echo "All the OpenGL functionality tests failed!"
5061 echo " You might need to modify the include and library search paths by editing"
5062 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5063 echo " ${XQMAKESPEC}."
5068 elif [ "$CFG_OPENGL" = "es2" ]; then
5070 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5071 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5072 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5073 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5074 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5075 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5076 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5077 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5080 "$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
5081 if [ $? != "0" ]; then
5082 echo "The OpenGL ES 2.0 functionality test failed!"
5083 echo " You might need to modify the include and library search paths by editing"
5084 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5085 echo " ${XQMAKESPEC}."
5088 elif [ "$CFG_OPENGL" = "desktop" ]; then
5089 # Desktop OpenGL support
5090 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5091 if [ $? != "0" ]; then
5092 echo "The OpenGL functionality test failed!"
5093 echo " You might need to modify the include and library search paths by editing"
5094 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5095 echo " ${XQMAKESPEC}."
5100 # auto-detect FontConfig support
5101 if [ "$CFG_FONTCONFIG" != "no" ]; then
5102 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5103 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5104 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5106 QT_CFLAGS_FONTCONFIG=
5107 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5109 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
5110 QT_CONFIG="$QT_CONFIG fontconfig"
5111 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5112 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5113 CFG_LIBFREETYPE=system
5118 # Save these for a check later
5119 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5120 ORIG_CFG_XCB="$CFG_XCB"
5122 if [ "$CFG_WAYLAND" != "no" ]; then
5123 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5124 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5125 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5126 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --cflags-only-I wayland-client 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5127 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --libs-only-L wayland-client 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5129 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/wayland "Wayland" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_WAYLAND $QMAKE_LIBS_WAYLAND; then
5131 QT_CONFIG="$QT_CONFIG wayland"
5132 elif [ "$CFG_WAYLAND" = "yes" ]; then
5133 echo "The Wayland functionality test failed!"
5137 QMakeVar add DEFINES QT_NO_WAYLAND
5141 if [ "$CFG_LIBUDEV" != "no" ]; then
5142 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5143 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5144 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5145 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5146 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5148 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
5150 QT_CONFIG="$QT_CONFIG libudev"
5151 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5152 echo "The libudev functionality test failed!"
5156 QMakeVar add DEFINES QT_NO_LIBUDEV
5160 if [ "$CFG_EVDEV" != "no" ]; then
5161 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5163 QT_CONFIG="$QT_CONFIG evdev"
5164 elif [ "$CFG_EVDEV" = "yes" ]; then
5165 echo "The evdev functionality test failed!"
5169 QMakeVar add DEFINES QT_NO_EVDEV
5173 # Check we actually have X11 :-)
5174 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5175 QT_CONFIG="$QT_CONFIG xlib"
5178 # auto-detect Xrender support
5179 if [ "$CFG_XRENDER" != "no" ]; then
5180 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5182 QT_CONFIG="$QT_CONFIG xrender"
5184 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5185 echo "Xrender support cannot be enabled due to functionality tests!"
5186 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5187 echo " If you believe this message is in error you may use the continue"
5188 echo " switch (-continue) to $0 to continue."
5196 if [ "$CFG_XCB" != "no" ]; then
5197 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then
5198 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5199 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5201 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
5203 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
5204 QT_CONFIG="$QT_CONFIG xcb-render"
5207 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
5209 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5212 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
5213 QT_CONFIG="$QT_CONFIG xcb-xlib"
5216 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5217 # auto-detect XInput2/Xinput support
5218 if [ "$CFG_XINPUT2" != "no" ]; then
5219 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
5223 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5224 echo "XInput2 support cannot be enabled due to functionality tests!"
5225 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5226 echo " If you believe this message is in error you may use the continue"
5227 echo " switch (-continue) to $0 to continue."
5236 if [ "$CFG_XCB" = "yes" ]; then
5237 echo "The XCB test failed!"
5238 echo " You might need to install dependency packages."
5239 echo " See src/plugins/platforms/xcb/README."
5243 QMakeVar add DEFINES QT_NO_XCB
5247 # Detect libxkbcommon
5248 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5249 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5250 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5251 if [ "$CFG_WAYLAND" = "yes" ]; then
5252 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5253 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5255 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5256 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5258 if [ "$CFG_WAYLAND" = "yes" ]; then
5259 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5261 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5264 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5265 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5266 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5267 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5268 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5269 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5270 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5273 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5274 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5275 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5276 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5279 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
5280 QT_CONFIG="$QT_CONFIG coreservices"
5282 QMakeVar add DEFINES QT_NO_CORESERVICES
5285 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5286 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5287 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5288 echo "No QPA platform plugin enabled!"
5289 echo " If you really want to build without a QPA platform plugin you must pass"
5290 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5291 echo " cannot run GUI applications."
5292 echo " The dependencies needed for xcb to build are listed in"
5293 echo " src/plugins/platforms/xcb/README"
5303 if [ "$PLATFORM_X11" = "yes" ]; then
5304 if [ "$CFG_EGL" != "no" ]; then
5305 # detect EGL support
5306 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
5307 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5312 if [ "$EGL_VARIANT" = "none" ]; then
5313 if [ "$CFG_EGL" = "yes" ]; then
5314 echo "The EGL functionality test failed!"
5315 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5316 echo " You might need to modify the include and library search paths by editing"
5317 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5318 echo " ${XQMAKESPEC}."
5322 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5323 if [ "$CFG_OPENGL" = "es2" ]; then
5330 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5333 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5334 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5335 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
5336 CFG_LIBFREETYPE=system
5343 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5347 if [ "$CFG_STL" != "no" ]; then
5348 if [ "$HAVE_STL" = "yes" ]; then
5351 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5352 echo "STL support cannot be enabled due to functionality tests!"
5353 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5354 echo " If you believe this message is in error you may use the continue"
5355 echo " switch (-continue) to $0 to continue."
5363 # detect POSIX clock_gettime()
5364 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5365 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
5366 CFG_CLOCK_GETTIME=yes
5368 CFG_CLOCK_GETTIME=no
5372 # detect POSIX monotonic clocks
5373 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5374 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
5375 CFG_CLOCK_MONOTONIC=yes
5377 CFG_CLOCK_MONOTONIC=no
5379 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5380 CFG_CLOCK_MONOTONIC=no
5384 if [ "$CFG_MREMAP" = "auto" ]; then
5385 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5392 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5393 if [ "$CFG_GETADDRINFO" != "no" ]; then
5394 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5397 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5398 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5399 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5400 echo " If you believe this message is in error you may use the continue"
5401 echo " switch (-continue) to $0 to continue."
5409 # find if the platform provides inotify
5410 if [ "$CFG_INOTIFY" != "no" ]; then
5411 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5414 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5415 echo "inotify support cannot be enabled due to functionality tests!"
5416 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5417 echo " If you believe this message is in error you may use the continue"
5418 echo " switch (-continue) to $0 to continue."
5426 # find if the platform provides if_nametoindex (ipv6 interface name support)
5427 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5428 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
5431 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5432 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5433 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5434 echo " If you believe this message is in error you may use the continue"
5435 echo " switch (-continue) to $0 to continue."
5443 # find if the platform provides getifaddrs (network interface enumeration)
5444 if [ "$CFG_GETIFADDRS" != "no" ]; then
5445 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5448 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5449 echo "getifaddrs support cannot be enabled due to functionality tests!"
5450 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5451 echo " If you believe this message is in error you may use the continue"
5452 echo " switch (-continue) to $0 to continue."
5461 if [ "$CFG_OPENSSL" != "no" ]; then
5462 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
5463 if [ "$CFG_OPENSSL" = "auto" ]; then
5467 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5468 echo "OpenSSL support cannot be enabled due to functionality tests!"
5469 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5470 echo " If you believe this message is in error you may use the continue"
5471 echo " switch (-continue) to $0 to continue."
5480 if [ "$CFG_PCRE" != "qt" ]; then
5481 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5484 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5485 echo "PCRE support cannot be enabled due to functionality tests!"
5486 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5487 echo " If you believe this message is in error you may use the continue"
5488 echo " switch (-continue) to $0 to continue."
5496 # detect OpenVG support
5497 if [ "$CFG_OPENVG" != "no" ]; then
5498 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
5499 if [ "$CFG_OPENVG" = "auto" ]; then
5502 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
5503 if [ "$CFG_OPENVG" = "auto" ]; then
5506 CFG_OPENVG_ON_OPENGL=yes
5507 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
5508 if [ "$CFG_OPENVG" = "auto" ]; then
5511 CFG_OPENVG_LC_INCLUDES=yes
5512 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
5513 if [ "$CFG_OPENVG" = "auto" ]; then
5516 CFG_OPENVG_LC_INCLUDES=yes
5517 CFG_OPENVG_ON_OPENGL=yes
5519 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5520 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5521 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5522 echo " If you believe this message is in error you may use the continue"
5523 echo " switch (-continue) to $0 to continue."
5529 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
5530 CFG_OPENVG_SHIVA=yes
5534 if [ "$CFG_ALSA" = "auto" ]; then
5535 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5542 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5543 if [ "$CFG_ARCH" = "arm" ]; then
5544 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5545 if [ $? != "0" ]; then
5546 CFG_JAVASCRIPTCORE_JIT=no
5549 case "$XPLATFORM" in
5551 CFG_JAVASCRIPTCORE_JIT=no
5557 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5558 QMakeVar set JAVASCRIPTCORE_JIT yes
5559 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5560 QMakeVar set JAVASCRIPTCORE_JIT no
5563 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5564 CFG_AUDIO_BACKEND=yes
5567 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5568 echo "Warning: largefile support cannot be disabled for win32."
5572 #-------------------------------------------------------------------------------
5573 # ask for all that hasn't been auto-detected or specified in the arguments
5574 #-------------------------------------------------------------------------------
5576 # enable dwarf2 support on Mac
5577 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5578 QT_CONFIG="$QT_CONFIG dwarf2"
5581 # Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
5582 if [ "$BUILD_ON_MAC" = "yes" ]; then
5583 DEFAULT_ARCH="$CFG_MAC_ARCHS"
5584 if [ -z "$DEFAULT_ARCH" ]; then
5585 case `file "${outpath}/bin/qmake"` in
5593 # unsupported/unknown
5597 if [ -n "$DEFAULT_ARCH" ]; then
5598 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5599 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5600 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5601 # Make the application arch follow the Qt arch for single arch builds.
5602 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
5603 [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5608 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5609 QT_CONFIG="$QT_CONFIG phonon-backend"
5612 # disable accessibility
5613 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5614 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5616 QT_CONFIG="$QT_CONFIG accessibility"
5619 # egl stuff does not belong in lighthouse, but rather in plugins
5620 if [ "$PLATFORM_QPA" = "yes" ]; then
5625 if [ "$CFG_EGL" = "no" ]; then
5626 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5628 QT_CONFIG="$QT_CONFIG egl"
5629 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5630 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5635 if [ "$CFG_OPENVG" = "no" ]; then
5636 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5638 QT_CONFIG="$QT_CONFIG openvg"
5639 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5640 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5642 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5643 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5645 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5646 QT_CONFIG="$QT_CONFIG shivavg"
5647 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5652 if [ "$CFG_OPENGL" = "no" ]; then
5653 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5655 QT_CONFIG="$QT_CONFIG opengl"
5658 if [ "$CFG_OPENGL" = "es2" ]; then
5659 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5662 if [ "$CFG_OPENGL" = "es2" ]; then
5663 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5664 QT_CONFIG="$QT_CONFIG opengles2"
5667 # safe execution environment
5668 if [ "$CFG_SXE" != "no" ]; then
5669 QT_CONFIG="$QT_CONFIG sxe"
5672 # build up the variables for output
5673 if [ "$CFG_DEBUG" = "yes" ]; then
5674 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5675 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5676 elif [ "$CFG_DEBUG" = "no" ]; then
5677 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5678 QMAKE_CONFIG="$QMAKE_CONFIG release"
5680 if [ "$CFG_SHARED" = "yes" ]; then
5681 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5682 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5683 elif [ "$CFG_SHARED" = "no" ]; then
5684 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5685 QMAKE_CONFIG="$QMAKE_CONFIG static"
5687 if [ "$PLATFORM_QPA" = "yes" ]; then
5688 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5689 QT_CONFIG="$QT_CONFIG qpa"
5690 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5691 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5694 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5695 # Do not set this here for Windows. Let qmake do it so
5696 # debug and release precompiled headers are kept separate.
5697 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5699 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5700 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5701 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5702 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5703 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5704 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5706 if [ "$CFG_STL" = "no" ]; then
5707 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5709 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5711 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5712 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5714 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5715 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5716 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5717 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5718 QMakeVar add QMAKE_CFLAGS -g
5719 QMakeVar add QMAKE_CXXFLAGS -g
5720 QT_CONFIG="$QT_CONFIG separate_debug_info"
5722 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5723 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5725 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5726 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5727 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5728 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5729 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5730 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5731 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5732 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5733 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5734 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5735 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5736 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5737 QT_CONFIG="$QT_CONFIG clock-gettime"
5739 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5740 QT_CONFIG="$QT_CONFIG clock-monotonic"
5742 if [ "$CFG_MREMAP" = "yes" ]; then
5743 QT_CONFIG="$QT_CONFIG mremap"
5745 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5746 QT_CONFIG="$QT_CONFIG getaddrinfo"
5748 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5749 QT_CONFIG="$QT_CONFIG ipv6ifname"
5751 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5752 QT_CONFIG="$QT_CONFIG getifaddrs"
5754 if [ "$CFG_INOTIFY" = "yes" ]; then
5755 QT_CONFIG="$QT_CONFIG inotify"
5757 if [ "$CFG_LIBJPEG" = "no" ]; then
5759 elif [ "$CFG_LIBJPEG" = "system" ]; then
5760 QT_CONFIG="$QT_CONFIG system-jpeg"
5762 if [ "$CFG_JPEG" = "no" ]; then
5763 QT_CONFIG="$QT_CONFIG no-jpeg"
5764 elif [ "$CFG_JPEG" = "yes" ]; then
5765 QT_CONFIG="$QT_CONFIG jpeg"
5767 if [ "$CFG_LIBPNG" = "no" ]; then
5770 if [ "$CFG_LIBPNG" = "system" ]; then
5771 QT_CONFIG="$QT_CONFIG system-png"
5773 if [ "$CFG_PNG" = "no" ]; then
5774 QT_CONFIG="$QT_CONFIG no-png"
5775 elif [ "$CFG_PNG" = "yes" ]; then
5776 QT_CONFIG="$QT_CONFIG png"
5778 if [ "$CFG_GIF" = "no" ]; then
5779 QT_CONFIG="$QT_CONFIG no-gif"
5780 elif [ "$CFG_GIF" = "yes" ]; then
5781 QT_CONFIG="$QT_CONFIG gif"
5783 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5784 QT_CONFIG="$QT_CONFIG no-freetype"
5785 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5786 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5787 QT_CONFIG="$QT_CONFIG system-freetype"
5789 QT_CONFIG="$QT_CONFIG freetype"
5791 if [ "$CFG_GUI" = "auto" ]; then
5794 if [ "$CFG_GUI" = "no" ]; then
5795 QT_CONFIG="$QT_CONFIG no-gui"
5797 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
5801 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5802 #On Mac we implicitly link against libz, so we
5803 #never use the 3rdparty stuff.
5804 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5806 if [ "$CFG_ZLIB" = "yes" ]; then
5807 QT_CONFIG="$QT_CONFIG zlib"
5808 elif [ "$CFG_ZLIB" = "system" ]; then
5809 QT_CONFIG="$QT_CONFIG system-zlib"
5812 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5813 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5814 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5815 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5816 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5817 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5818 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5819 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5820 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5821 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
5822 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5823 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5824 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5825 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5826 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5828 if [ "$PLATFORM_X11" = "yes" ]; then
5829 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5831 # for some reason, the following libraries are not always built shared,
5832 # so *every* program/lib (including Qt) has to link against them
5833 if [ "$CFG_XSHAPE" = "yes" ]; then
5834 QT_CONFIG="$QT_CONFIG xshape"
5836 if [ "$CFG_XVIDEO" = "yes" ]; then
5837 QT_CONFIG="$QT_CONFIG xvideo"
5839 if [ "$CFG_XSYNC" = "yes" ]; then
5840 QT_CONFIG="$QT_CONFIG xsync"
5842 if [ "$CFG_XINERAMA" = "yes" ]; then
5843 QT_CONFIG="$QT_CONFIG xinerama"
5844 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5846 if [ "$CFG_XCURSOR" = "yes" ]; then
5847 QT_CONFIG="$QT_CONFIG xcursor"
5848 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5850 if [ "$CFG_XFIXES" = "yes" ]; then
5851 QT_CONFIG="$QT_CONFIG xfixes"
5852 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5854 if [ "$CFG_XRANDR" = "yes" ]; then
5855 QT_CONFIG="$QT_CONFIG xrandr"
5856 if [ "$CFG_XRENDER" != "yes" ]; then
5857 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5858 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5860 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5863 if [ "$CFG_XRENDER" = "yes" ]; then
5864 QT_CONFIG="$QT_CONFIG xrender"
5865 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5867 if [ "$CFG_MITSHM" = "yes" ]; then
5868 QT_CONFIG="$QT_CONFIG mitshm"
5870 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5871 QT_CONFIG="$QT_CONFIG fontconfig"
5873 if [ "$CFG_XINPUT" = "yes" ]; then
5874 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5876 if [ "$CFG_XINPUT" = "yes" ]; then
5877 QT_CONFIG="$QT_CONFIG xinput tablet"
5879 if [ "$CFG_XKB" = "yes" ]; then
5880 QT_CONFIG="$QT_CONFIG xkb"
5884 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5885 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5886 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5888 if [ "$PLATFORM_MAC" = "yes" ]; then
5889 if [ "$CFG_RPATH" = "yes" ]; then
5890 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5892 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5893 if [ -n "$RPATH_FLAGS" ]; then
5895 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5899 elif [ "$CFG_RPATH" = "yes" ]; then
5900 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5904 if [ "$CFG_RPATH" = "yes" ]; then
5905 # set the default rpath to the library installation directory
5906 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5908 if [ -n "$RPATH_FLAGS" ]; then
5909 # add the user defined rpaths
5910 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5914 if [ '!' -z "$I_FLAGS" ]; then
5915 # add the user define include paths
5916 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5917 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5920 if [ '!' -z "$W_FLAGS" ]; then
5921 # add the user defined warning flags
5922 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5923 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5924 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5927 # turn off exceptions for the compilers that support it
5928 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5929 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5931 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5934 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5935 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5938 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5939 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5940 # Follow default behavior of configure.exe by overriding with "rtti".
5941 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5944 if [ "$CFG_ALSA" = "yes" ]; then
5945 QT_CONFIG="$QT_CONFIG alsa"
5948 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5949 QT_CONFIG="$QT_CONFIG pulseaudio"
5952 if [ "$CFG_COREWLAN" = "yes" ]; then
5953 QT_CONFIG="$QT_CONFIG corewlan"
5956 if [ "$CFG_ICU" = "yes" ]; then
5957 QT_CONFIG="$QT_CONFIG icu"
5960 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5961 QT_CONFIG="$QT_CONFIG force_asserts"
5964 if [ "$CFG_PCRE" = "qt" ]; then
5965 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5969 # Some Qt modules are too advanced in C++ for some old compilers
5970 # Detect here the platforms where they are known to work.
5972 # See Qt documentation for more information on which features are
5973 # supported and on which compilers.
5975 canBuildQtConcurrent="yes"
5976 canUseV8Snapshot="yes"
5978 case "$XPLATFORM" in
5980 # PA-RISC's assembly is too limited
5981 # gcc 3.4 on that platform can't build QtXmlPatterns
5982 # the assembly it generates cannot be compiled
5984 # Check gcc's version
5985 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5989 canBuildQtXmlPatterns="no"
5993 canBuildQtXmlPatterns="no"
5997 unsupported/vxworks-*-g++*)
6000 unsupported/vxworks-*-dcc*)
6002 canBuildQtXmlPatterns="no"
6005 # Check gcc's version
6006 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6014 canBuildQtXmlPatterns="no"
6019 # Check the compiler version
6020 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6023 canBuildQtXmlPatterns="no"
6024 canBuildQtConcurrent="no"
6028 canBuildQtConcurrent="no"
6034 canBuildQtXmlPatterns="no"
6035 canBuildQtConcurrent="no"
6041 # Get the xlC version
6042 cat > xlcver.c <<EOF
6046 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6051 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6052 xlcver=`./xlcver 2>/dev/null`
6055 if [ "$OPT_VERBOSE" = "yes" ]; then
6056 if [ -n "$xlcver" ]; then
6057 echo Found IBM xlC version: $xlcver.
6059 echo Could not determine IBM xlC version, assuming oldest supported.
6066 canBuildQtXmlPatterns="no"
6067 canBuildQtConcurrent="no"
6071 canBuildQtConcurrent="no"
6077 canBuildQtConcurrent="no"
6081 if [ "$CFG_GUI" = "no" ]; then
6082 # WebKit requires QtGui
6086 if [ "$CFG_SHARED" = "no" ]; then
6088 echo "WARNING: Using static linking will disable the WebKit module."
6093 CFG_CONCURRENT="yes"
6094 if [ "$canBuildQtConcurrent" = "no" ]; then
6095 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6098 QT_CONFIG="$QT_CONFIG concurrent"
6102 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6103 QT_CONFIG="$QT_CONFIG audio-backend"
6107 if [ "$CFG_WEBKIT" = "debug" ]; then
6108 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6112 QT_CONFIG="$QT_CONFIG v8"
6113 # Detect snapshot support
6114 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6115 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6118 *) canUseV8Snapshot="no"
6122 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6123 # QEMU crashes when building inside Scratchbox with an ARM target
6124 canUseV8Snapshot="no"
6127 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6128 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6130 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6131 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6134 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6135 QT_CONFIG="$QT_CONFIG v8snapshot"
6139 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6140 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6143 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6146 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6147 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6148 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6153 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6154 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6155 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6162 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6168 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6170 case "$COMPILER_VERSION" in
6172 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6173 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6174 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6177 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6178 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6179 QT_GCC_PATCH_VERSION=0
6189 #-------------------------------------------------------------------------------
6190 # part of configuration information goes into qconfig.h
6191 #-------------------------------------------------------------------------------
6193 case "$CFG_QCONFIG" in
6195 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6198 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6199 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6200 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6201 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6202 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6203 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6205 echo "#endif" >>"$tmpconfig"
6209 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6213 # define QT_EDITION $QT_EDITION
6217 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6218 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6219 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6220 /* Machine Architecture */
6221 #ifndef QT_BOOTSTRAPPED
6222 # define QT_ARCH_${CFG_ARCH_STR}
6224 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6228 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6229 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6231 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6232 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6235 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6236 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6239 if [ "$BUILD_ON_MAC" = "yes" ]; then
6240 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6241 #if defined(__LP64__)
6242 # define QT_POINTER_SIZE 8
6244 # define QT_POINTER_SIZE 4
6248 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6249 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6252 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6253 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6254 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6258 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6260 if [ "$CFG_DEV" = "yes" ]; then
6261 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6264 if [ "$PLATFORM_QPA" = "yes" ]; then
6265 # Add QPA to config.h
6266 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6269 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6270 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6273 # Add turned on SQL drivers
6274 for DRIVER in $CFG_SQL_AVAILABLE; do
6275 eval "VAL=\$CFG_SQL_$DRIVER"
6278 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6279 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6280 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6283 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6289 QMakeVar set sql-drivers "$SQL_DRIVERS"
6290 QMakeVar set sql-plugins "$SQL_PLUGINS"
6292 # Add other configuration options to the qconfig.h file
6293 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6294 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6295 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6296 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6297 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6298 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6299 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6301 # X11/Unix/Mac only configs
6302 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6303 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6304 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6305 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6306 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6307 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6308 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6309 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6310 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6311 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6312 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6313 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6314 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6315 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6316 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6318 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6319 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6320 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6321 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6322 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6323 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6324 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6325 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6326 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6327 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6328 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6329 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6330 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6332 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6333 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6334 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6335 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6336 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6337 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6338 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6339 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6341 # sort QCONFIG_FLAGS for neatness if we can
6342 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6343 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6345 if [ -n "$QCONFIG_FLAGS" ]; then
6346 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6347 #ifndef QT_BOOTSTRAPPED
6350 for cfg in $QCONFIG_FLAGS; do
6351 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6352 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6353 # figure out define logic, so we can output the correct
6354 # ifdefs to override the global defines in a project
6356 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6357 # QT_NO_option can be forcefully turned on by QT_option
6358 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6359 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6360 # QT_option can be forcefully turned off by QT_NO_option
6361 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6364 if [ -z $cfgdNeg ]; then
6365 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6372 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6373 #if defined($cfgd) && defined($cfgdNeg)
6375 #elif !defined($cfgd) && !defined($cfgdNeg)
6382 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6383 #endif // QT_BOOTSTRAPPED
6388 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6389 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6390 #define QT_VISIBILITY_AVAILABLE
6395 if [ -n "$QT_LIBINFIX" ]; then
6396 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6397 #define QT_LIBINFIX "$QT_LIBINFIX"
6402 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6403 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6404 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6406 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6407 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6408 chmod -w "$outpath/src/corelib/global/qconfig.h"
6409 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6410 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6414 #-------------------------------------------------------------------------------
6415 # save configuration into qconfig.pri
6416 #-------------------------------------------------------------------------------
6417 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6418 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6419 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6420 if [ "$CFG_DEBUG" = "yes" ]; then
6421 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6422 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6423 QT_CONFIG="$QT_CONFIG release"
6425 QT_CONFIG="$QT_CONFIG debug"
6426 elif [ "$CFG_DEBUG" = "no" ]; then
6427 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6428 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6429 QT_CONFIG="$QT_CONFIG debug"
6431 QT_CONFIG="$QT_CONFIG release"
6433 if [ "$CFG_STL" = "yes" ]; then
6434 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6436 if [ "$CFG_FRAMEWORK" = "no" ]; then
6437 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6439 QT_CONFIG="$QT_CONFIG qt_framework"
6440 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6442 if [ "$CFG_DEV" = "yes" ]; then
6443 QT_CONFIG="$QT_CONFIG private_tests"
6446 cat >>"$QTCONFIG.tmp" <<EOF
6448 CONFIG += $QTCONFIG_CONFIG
6450 QT_EDITION = $Edition
6451 QT_CONFIG += $QT_CONFIG
6454 QT_VERSION = $QT_VERSION
6455 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6456 QT_MINOR_VERSION = $QT_MINOR_VERSION
6457 QT_PATCH_VERSION = $QT_PATCH_VERSION
6460 QT_LIBINFIX = $QT_LIBINFIX
6461 QT_NAMESPACE = $QT_NAMESPACE
6464 if [ -n "$CFG_SYSROOT" ]; then
6465 echo "# sysroot" >>"$QTCONFIG.tmp"
6466 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6467 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6468 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6469 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6470 echo "}" >> "$QTCONFIG.tmp"
6471 echo >> "$QTCONFIG.tmp"
6473 if [ "$CFG_RPATH" = "yes" ]; then
6474 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6476 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6477 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6478 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6479 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6482 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6483 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6484 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6487 # replace qconfig.pri if it differs from the newly created temp file
6488 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6489 rm -f "$QTCONFIG.tmp"
6491 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6494 #-------------------------------------------------------------------------------
6495 # save configuration into qmodule.pri
6496 #-------------------------------------------------------------------------------
6497 QTMODULE="$outpath/mkspecs/qmodule.pri"
6499 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6501 # Ensure we can link to uninistalled libraries
6502 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6503 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6505 if [ -n "$QT_CFLAGS_PSQL" ]; then
6506 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6508 if [ -n "$QT_LFLAGS_PSQL" ]; then
6509 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6511 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6512 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6514 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6515 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6517 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6518 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6520 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6521 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6523 if [ -n "$QT_LFLAGS_ODBC" ]; then
6524 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6526 if [ -n "$QT_LFLAGS_TDS" ]; then
6527 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6530 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6531 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6534 #dump in the OPENSSL_LIBS info
6535 if [ '!' -z "$OPENSSL_LIBS" ]; then
6536 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6537 elif [ "$CFG_OPENSSL" = "linked" ]; then
6538 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6541 #dump in the SDK info
6542 if [ '!' -z "$CFG_SDK" ]; then
6543 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6547 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6548 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6550 # replace qmodule.pri if it differs from the newly created temp file
6551 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6552 rm -f "$QTMODULE.tmp"
6554 mv -f "$QTMODULE.tmp" "$QTMODULE"
6557 #-------------------------------------------------------------------------------
6558 # save configuration into .qmake.cache
6559 #-------------------------------------------------------------------------------
6561 CACHEFILE="$outpath/.qmake.cache"
6562 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6563 cat >>"$CACHEFILE.tmp" <<EOF
6565 QT_SOURCE_TREE = \$\$quote($relpath)
6566 QT_BUILD_TREE = \$\$quote($outpath)
6567 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6569 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6570 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6571 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6573 include(\$\$PWD/mkspecs/qmodule.pri)
6574 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6578 #dump the qmake spec
6579 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6580 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6582 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6587 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
6588 if [ "$CFG_INCREMENTAL" = "yes" ]; then
6589 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
6590 # don't need to worry about generated files
6591 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
6592 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
6594 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
6596 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
6597 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
6600 # replace .qmake.cache if it differs from the newly created temp file
6601 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6602 rm -f "$CACHEFILE.tmp"
6604 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6607 #-------------------------------------------------------------------------------
6608 # give feedback on configuration
6609 #-------------------------------------------------------------------------------
6613 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6616 This target is using the GNU C++ compiler ($PLATFORM).
6618 Recent versions of this compiler automatically include code for
6619 exceptions, which increase both the size of the Qt libraries and
6620 the amount of memory taken by your applications.
6622 You may choose to re-run `basename $0` with the -no-exceptions
6623 option to compile Qt without exceptions. This is completely binary
6624 compatible, and existing applications will continue to work.
6632 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6635 This target is using the MIPSpro C++ compiler ($PLATFORM).
6637 You may choose to re-run `basename $0` with the -no-exceptions
6638 option to compile Qt without exceptions. This will make the
6639 size of the Qt library smaller and reduce the amount of memory
6640 taken by your applications.
6652 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6653 echo "Build type: $PLATFORM"
6655 echo "Building on: $PLATFORM"
6656 echo "Building for: $XPLATFORM"
6659 if [ ! -z "$CFG_MAC_ARCHS" ]; then
6660 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
6662 echo "Architecture: $CFG_ARCH"
6665 if [ "$PLATFORM_QPA" = "yes" ]; then
6666 echo "Host architecture: $CFG_HOST_ARCH"
6669 if [ -n "$PLATFORM_NOTES" ]; then
6670 echo "Platform notes:"
6671 echo "$PLATFORM_NOTES"
6676 if [ "$OPT_VERBOSE" = "yes" ]; then
6677 echo $ECHO_N "qmake vars .......... $ECHO_C"
6678 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6679 echo "qmake switches ......... $QMAKE_SWITCHES"
6682 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
6683 echo "Build .................. $CFG_BUILD_PARTS"
6684 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6685 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6686 echo "Debug .................. yes (combined)"
6687 if [ "$CFG_DEBUG" = "yes" ]; then
6688 echo "Default Link ........... debug"
6690 echo "Default Link ........... release"
6693 echo "Debug .................. $CFG_DEBUG"
6695 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6696 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6697 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6698 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6699 echo "QtGui module ........... $CFG_GUI"
6700 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6701 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6703 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6705 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6706 echo "STL support ............ $CFG_STL"
6707 echo "PCH support ............ $CFG_PRECOMPILE"
6708 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6709 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6710 echo "AVX..................... ${CFG_AVX}"
6711 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
6712 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6713 echo "NEON support ........... ${CFG_NEON}"
6715 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6716 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6717 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6718 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6719 echo "NIS support ............ $CFG_NIS"
6720 echo "CUPS support ........... $CFG_CUPS"
6721 echo "Iconv support .......... $CFG_ICONV"
6722 echo "Glib support ........... $CFG_GLIB"
6723 echo "GStreamer support ...... $CFG_GSTREAMER"
6724 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6725 echo "Large File support ..... $CFG_LARGEFILE"
6726 echo "GIF support ............ $CFG_GIF"
6727 if [ "$CFG_JPEG" = "no" ]; then
6728 echo "JPEG support ........... $CFG_JPEG"
6730 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6732 if [ "$CFG_PNG" = "no" ]; then
6733 echo "PNG support ............ $CFG_PNG"
6735 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6737 echo "zlib support ........... $CFG_ZLIB"
6738 echo "Session management ..... $CFG_SM"
6739 echo "libudev support ........ $CFG_LIBUDEV"
6741 if [ "$CFG_OPENGL" = "desktop" ]; then
6742 echo "OpenGL support ......... yes (Desktop OpenGL)"
6743 elif [ "$CFG_OPENGL" = "es2" ]; then
6744 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6746 echo "OpenGL support ......... no"
6748 if [ "$CFG_EGL" != "no" ]; then
6749 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6750 echo "EGL support ............ yes <GLES/egl.h>"
6752 echo "EGL support ............ yes <EGL/egl.h>"
6755 if [ "$CFG_OPENVG" ]; then
6756 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6757 echo "OpenVG support ......... ShivaVG"
6759 echo "OpenVG support ......... $CFG_OPENVG"
6762 if [ "$PLATFORM_X11" = "yes" ]; then
6763 echo "NAS sound support ...... $CFG_NAS"
6764 echo "XShape support ......... $CFG_XSHAPE"
6765 echo "XVideo support ......... $CFG_XVIDEO"
6766 echo "XSync support .......... $CFG_XSYNC"
6767 echo "Xinerama support ....... $CFG_XINERAMA"
6768 echo "Xcursor support ........ $CFG_XCURSOR"
6769 echo "Xfixes support ......... $CFG_XFIXES"
6770 echo "Xrandr support ......... $CFG_XRANDR"
6771 echo "Xi support ............. $CFG_XINPUT"
6772 echo "MIT-SHM support ........ $CFG_MITSHM"
6773 echo "FontConfig support ..... $CFG_FONTCONFIG"
6774 echo "XKB Support ............ $CFG_XKB"
6775 echo "immodule support ....... $CFG_IM"
6776 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6778 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6779 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6780 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6781 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6782 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6783 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6784 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6785 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6786 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6789 if [ "$CFG_OPENSSL" = "yes" ]; then
6790 OPENSSL_LINKAGE="(run-time)"
6791 elif [ "$CFG_OPENSSL" = "linked" ]; then
6792 OPENSSL_LINKAGE="(linked)"
6794 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6795 echo "Alsa support ........... $CFG_ALSA"
6796 if [ "$BUILD_ON_MAC" = "yes" ]; then
6797 echo "CoreWlan support ....... $CFG_COREWLAN"
6799 echo "libICU support ......... $CFG_ICU"
6800 echo "PCRE support ........... $CFG_PCRE"
6801 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6802 echo "Xcb support ............ limited (old version)"
6804 echo "Xcb support ............ $CFG_XCB"
6806 echo "Xrender support ........ $CFG_XRENDER"
6807 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6808 echo "XInput2 support ........ $CFG_XINPUT2"
6812 # complain about not being able to use dynamic plugins if we are using a static build
6813 if [ "$CFG_SHARED" = "no" ]; then
6815 echo "WARNING: Using static linking will disable the use of dynamically"
6816 echo "loaded plugins. Make sure to import all needed static plugins,"
6817 echo "or compile needed modules into the library."
6820 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6822 echo "NOTE: When linking against OpenSSL, you can override the default"
6823 echo "library names through OPENSSL_LIBS."
6825 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6828 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6830 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6831 echo "if you want a pure debug build."
6836 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6841 #-------------------------------------------------------------------------------
6842 # build makefiles based on the configuration
6843 #-------------------------------------------------------------------------------
6845 echo "Finding project files. Please wait..."
6846 if [ "$CFG_NOPROCESS" != "yes" ]; then
6847 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6848 if [ -f "${relpath}/qtbase.pro" ]; then
6849 mkfile="${outpath}/Makefile"
6850 [ -f "$mkfile" ] && chmod +w "$mkfile"
6851 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6855 # .projects -> projects to process
6856 # .projects.1 -> qt and moc
6857 # .projects.2 -> subdirs and libs
6858 # .projects.3 -> the rest
6859 rm -f .projects .projects.1 .projects.2 .projects.3
6861 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6862 if [ -z "$AWK" ]; then
6863 for p in `echo $QMAKE_PROJECTS`; do
6864 echo "$p" >> .projects
6867 cat >projects.awk <<EOF
6873 first = "./.projects.1.tmp"
6874 second = "./.projects.2.tmp"
6875 third = "./.projects.3.tmp"
6880 if ( ! target_file )
6882 print input_file >target_file
6887 input_file = FILENAME
6892 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6895 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6896 target_file = second
6901 matched_target == 0 && /^(TEMPLATE.*=)/ {
6902 if ( \$3 == "subdirs" )
6903 target_file = second
6904 else if ( \$3 == "lib" )
6910 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6911 if ( \$0 ~ /plugin/ )
6914 target_file = second
6919 if ( ! target_file )
6921 print input_file >>target_file
6928 for p in `echo $QMAKE_PROJECTS`; do
6929 echo "$p" >> .projects.all
6932 # if you get errors about the length of the command line to awk, change the -l arg
6934 split -l 100 .projects.all .projects.all.
6935 for p in .projects.all.*; do
6936 "$AWK" -f projects.awk `cat $p`
6937 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6938 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6939 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6940 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6942 rm -f .projects.all* projects.awk
6944 [ -f .projects.1 ] && cat .projects.1 >>.projects
6945 [ -f .projects.2 ] && cat .projects.2 >>.projects
6946 rm -f .projects.1 .projects.2
6947 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6948 cat .projects.3 >>.projects
6952 # don't sort Qt and MOC in with the other project files
6953 # also work around a segfaulting uniq(1)
6954 if [ -f .sorted.projects.2 ]; then
6955 sort .sorted.projects.2 > .sorted.projects.2.new
6956 mv -f .sorted.projects.2.new .sorted.projects.2
6957 cat .sorted.projects.2 >> .sorted.projects.1
6959 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6960 rm -f .sorted.projects.2 .sorted.projects.1
6964 if [ -f .projects ]; then
6965 uniq .projects >.tmp
6966 mv -f .tmp .projects
6967 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6969 if [ -f .projects.3 ]; then
6970 uniq .projects.3 >.tmp
6971 mv -f .tmp .projects.3
6972 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6974 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6978 for part in $CFG_BUILD_PARTS; do
6980 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6981 libs) PART_ROOTS="$PART_ROOTS src" ;;
6982 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6983 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6988 if [ "$CFG_DEV" = "yes" ]; then
6989 PART_ROOTS="$PART_ROOTS tests"
6992 echo "Creating makefiles. Please wait..."
6993 for file in .projects .projects.3; do
6994 [ '!' -f "$file" ] && continue
6995 for a in `cat $file`; do
6997 for r in $PART_ROOTS; do
6998 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7003 [ "$IN_ROOT" = "no" ] && continue
7006 *winmain/winmain.pro)
7007 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7011 */qmake/qmake.pro) continue ;;
7012 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
7013 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7019 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7020 test -d "$dir" || mkdir -p "$dir"
7021 OUTDIR="$outpath/$dir"
7022 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7023 # fast configure - the makefile exists, skip it
7024 # since the makefile exists, it was generated by qmake, which means we
7025 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7027 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7030 QMAKE_SPEC_ARGS="-spec $SPEC"
7031 echo $ECHO_N " for $a$ECHO_C"
7033 QMAKE="$outpath/bin/qmake"
7034 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7035 if [ "$file" = ".projects.3" ]; then
7038 cat >"${OUTDIR}/Makefile" <<EOF
7039 # ${OUTDIR}/Makefile: generated by configure
7041 # WARNING: This makefile will be replaced with a real makefile.
7042 # All changes made to this file will be lost.
7044 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7046 cat >>"${OUTDIR}/Makefile" <<EOF
7048 all clean install qmake first Makefile: FORCE
7049 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7057 if [ "$OPT_VERBOSE" = "yes" ]; then
7058 echo " (`basename $SPEC`)"
7059 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7064 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7065 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7069 rm -f .projects .projects.3
7071 #-------------------------------------------------------------------------------
7072 # check for platforms that we don't yet know about
7073 #-------------------------------------------------------------------------------
7074 if [ "$CFG_ARCH" = "generic" ]; then
7077 NOTICE: Atomic operations are not yet supported for this
7080 Qt will use the 'generic' architecture instead, which uses a
7081 single pthread_mutex_t to protect all atomic operations. This
7082 implementation is the slow (but safe) fallback implementation
7083 for architectures Qt does not yet support.
7087 #-------------------------------------------------------------------------------
7088 # check if the user passed the -no-zlib option, which is no longer supported
7089 #-------------------------------------------------------------------------------
7090 if [ -n "$ZLIB_FORCED" ]; then
7091 which_zlib="supplied"
7092 if [ "$CFG_ZLIB" = "system" ]; then
7098 NOTICE: The -no-zlib option was supplied but is no longer
7101 Qt now requires zlib support in all builds, so the -no-zlib
7102 option was ignored. Qt will be built using the $which_zlib
7107 #-------------------------------------------------------------------------------
7108 # finally save the executed command to another script
7109 #-------------------------------------------------------------------------------
7110 if [ `basename $0` != "config.status" ]; then
7111 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7113 # add the system variables
7114 for varname in $SYSTEM_VARIABLES; do
7116 'if [ -n "\$'${varname}'" ]; then
7117 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7122 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7124 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7125 echo "#!/bin/sh" > "$outpath/config.status"
7126 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7127 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7128 echo "else" >> "$outpath/config.status"
7129 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7130 echo "fi" >> "$outpath/config.status"
7131 chmod +x "$outpath/config.status"
7134 if [ -n "$RPATH_MESSAGE" ]; then
7136 echo "$RPATH_MESSAGE"
7139 MAKE=`basename "$MAKE"`
7141 echo Qt is now configured for building. Just run \'$MAKE\'.
7142 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7143 echo Once everything is built, Qt is installed.
7144 echo You should not run \'$MAKE install\'.
7146 echo Once everything is built, you must run \'$MAKE install\'.
7147 echo Qt will be installed into $QT_INSTALL_PREFIX
7150 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.