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)
678 CFG_OPENVG_LC_INCLUDES=no
679 CFG_OPENVG_SHIVA=auto
680 CFG_OPENVG_ON_OPENGL=auto
682 CFG_EGL_GLES_INCLUDES=no
687 QT_DEFAULT_BUILD_PARTS="libs examples tests"
691 CFG_AUDIO_BACKEND=auto
693 CFG_DECLARATIVE_DEBUG=yes
694 CFG_JAVASCRIPTCORE_JIT=auto
719 CFG_SEPARATE_DEBUG_INFO=no
720 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
721 CFG_REDUCE_EXPORTS=auto
731 CFG_REDUCE_RELOCATIONS=auto
733 CFG_ACCESSIBILITY=auto
736 CFG_CLOCK_GETTIME=auto
737 CFG_CLOCK_MONOTONIC=auto
746 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
750 CFG_PREFIX_INSTALL=yes
759 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
760 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
764 OPT_CONFIRM_LICENSE=no
778 # initalize variables used for installation
787 QT_INSTALL_TRANSLATIONS=
796 #flags for SQL drivers
804 QT_LFLAGS_ODBC="-lodbc"
807 # flags for libdbus-1
811 # flags for Glib (X11 only)
815 # flags for GStreamer (X11 only)
819 #-------------------------------------------------------------------------------
820 # check SQL drivers available in this package
821 #-------------------------------------------------------------------------------
823 # opensource version removes some drivers, so force them to be off
829 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
830 for a in "$relpath/src/plugins/sqldrivers/"*; do
832 base_a=`basename "$a"`
833 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
834 eval "CFG_SQL_${base_a}=auto"
839 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
840 if [ -d "$relpath/src/plugins/imageformats" ]; then
841 for a in "$relpath/src/plugins/imageformats/"*; do
843 base_a=`basename "$a"`
844 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
849 #-------------------------------------------------------------------------------
850 # parse command line arguments
851 #-------------------------------------------------------------------------------
853 # parse the arguments, setting things to "yes" or "no"
854 while [ "$#" -gt 0 ]; do
858 #Autoconf style options
860 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
864 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
868 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
869 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
872 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
876 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
880 -no-*-*|-plugin-*-*|-qt-*-*)
881 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
882 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
886 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
889 #Qt style yes options
890 -profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-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)
891 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
894 #Qt style options that pass an argument
896 if [ "$PLATFORM_QPA" != "yes" ]; then
898 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
902 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
906 -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)
907 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
911 #Qt style complex options in one command
912 -enable-*|-disable-*)
913 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
914 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
916 #Qt Builtin/System style options
917 -no-*|-system-*|-qt-*)
918 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
919 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
921 #Options that cannot be generalized
928 # this option may or may not be followed by an argument
929 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
938 # this option may or may not be followed by an argument
939 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
948 # this option may or may not be followed by an argument
949 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
957 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
958 # this option may or may not be followed by an argument
959 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
978 if [ "$1" = "-D" ]; then
982 VAL=`echo $1 | sed 's,-D,,'`
987 # this option may or may not be followed by an argument
988 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
997 if [ "$1" = "-I" ]; then
1001 VAL=`echo $1 | sed 's,-I,,'`
1006 if [ "$1" = "-L" ]; then
1010 VAL=`echo $1 | sed 's,-L,,'`
1015 if [ "$1" = "-R" ]; then
1019 VAL=`echo $1 | sed 's,-R,,'`
1024 VAL=`echo $1 | sed 's,-l,,'`
1028 if [ "$1" = "-F" ]; then
1032 VAL=`echo $1 | sed 's,-F,,'`
1037 if [ "$1" = "-fw" ]; then
1041 VAL=`echo $1 | sed 's,-fw,,'`
1049 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1056 if [ "$UNKNOWN_ARG" = "yes" ]; then
1057 echo "$1: unknown argument"
1068 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1069 CFG_ACCESSIBILITY="$VAL"
1078 CFG_USE_GNUMAKE="$VAL"
1081 CFG_MYSQL_CONFIG="$VAL"
1084 QT_INSTALL_PREFIX="$VAL"
1087 QT_HOST_PREFIX="$VAL"
1096 QT_FORCE_PKGCONFIG=yes
1099 QT_INSTALL_DOCS="$VAL"
1102 QT_INSTALL_HEADERS="$VAL"
1105 QT_INSTALL_PLUGINS="$VAL"
1108 QT_INSTALL_IMPORTS="$VAL"
1111 QT_INSTALL_DATA="$VAL"
1114 QT_INSTALL_LIBS="$VAL"
1123 QT_INSTALL_TRANSLATIONS="$VAL"
1125 sysconfdir|settingsdir)
1126 QT_INSTALL_SETTINGS="$VAL"
1129 QT_INSTALL_EXAMPLES="$VAL"
1132 QT_INSTALL_TESTS="$VAL"
1141 QT_INSTALL_BINS="$VAL"
1151 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1158 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1159 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1160 [ "$VAL" = "es2" ]; then
1162 if [ "$VAL" = "es2" ]; then
1170 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1172 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1180 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1183 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1191 if [ "$BUILD_ON_MAC" = "yes" ]; then
1198 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1199 CFG_MAC_DWARF2="$VAL"
1205 # if this is a Mac then "windows" probably means
1206 # we are cross-compiling for MinGW
1207 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1208 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1217 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1218 CFG_MAC_HARFBUZZ="$VAL"
1225 if [ "$BUILD_ON_MAC" = "yes" ]; then
1226 CFG_FRAMEWORK="$VAL"
1232 if [ "$VAL" = "yes" ]; then
1234 QMakeVar add QMAKE_CFLAGS -pg
1235 QMakeVar add QMAKE_CXXFLAGS -pg
1236 QMakeVar add QMAKE_LFLAGS -pg
1237 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1243 if [ "$VAL" = "yes" ]; then
1244 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1247 exceptions|g++-exceptions)
1248 if [ "$VAL" = "no" ]; then
1250 elif [ "$VAL" = "yes" ]; then
1258 # keep compatibility with old platform names
1264 PLATFORM=hpux-acc-o64
1267 PLATFORM=hpux-acc-64
1270 PLATFORM=hpux-acc-64
1282 PLATFORM=reliant-cds-64
1285 PLATFORM=solaris-cc-64
1288 PLATFORM=unixware-cc
1291 PLATFORM=unixware-g++
1294 PLATFORM=unixware-cc
1297 PLATFORM=unixware-g++
1303 i386) NATIVE_64_ARCH="x86_64" ;;
1304 powerpc) NATIVE_64_ARCH="ppc64" ;;
1305 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1307 if [ ! -z "$NATIVE_64_ARCH" ]; then
1308 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1315 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1318 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1319 CFG_DEBUG_RELEASE="$VAL"
1325 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1326 CFG_RELEASE_QMAKE="$VAL"
1332 if [ "$VAL" = "yes" ]; then
1334 elif [ "$VAL" = "no" ]; then
1341 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1342 CFG_PREFIX_INSTALL="$VAL"
1350 developer-build|commercial|opensource)
1351 # These switches have been dealt with already
1354 if [ "$VAL" = "yes" ]; then
1356 elif [ "$VAL" = "no" ]; then
1363 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1364 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1370 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1371 if [ "$VAL" = "no" ]; then
1372 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1373 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1374 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1380 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1387 if [ "$VAL" = "no" ]; then
1394 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1402 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1409 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1416 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1423 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1430 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1437 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1444 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1451 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1458 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1459 CFG_PRECOMPILE="$VAL"
1464 separate-debug-info)
1465 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1466 CFG_SEPARATE_DEBUG_INFO="$VAL"
1467 elif [ "$VAL" = "nocopy" ] ; then
1468 CFG_SEPARATE_DEBUG_INFO="yes"
1469 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1475 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1476 CFG_REDUCE_EXPORTS="$VAL"
1482 if [ "$VAL" = "no" ]; then
1489 if [ "$VAL" = "no" ]; then
1496 if [ "$VAL" = "no" ]; then
1503 if [ "$VAL" = "no" ]; then
1510 if [ "$VAL" = "no" ]; then
1517 if [ "$VAL" = "no" ]; then
1524 if [ "$VAL" = "no" ]; then
1531 if [ "$VAL" = "no" ]; then
1538 if [ "$VAL" = "no" ]; then
1548 if [ "$VAL" = "no" ]; then
1555 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1556 CFG_REDUCE_RELOCATIONS="$VAL"
1562 [ "$VAL" = "qt" ] && VAL=yes
1563 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1568 # No longer supported:
1569 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1572 if [ "$VAL" = "system" ]; then
1579 [ "$VAL" = "yes" ] && VAL=qt
1580 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1587 [ "$VAL" = "yes" ] && VAL=qt
1588 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1595 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1602 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1609 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1616 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1623 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1630 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1637 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1638 CFG_FONTCONFIG="$VAL"
1644 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1651 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1658 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1665 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1672 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1679 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1686 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1693 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1700 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1701 CFG_GSTREAMER="$VAL"
1707 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1708 CFG_QGTKSTYLE="$VAL"
1714 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1717 if [ "$VAL" = "no" ]; then
1725 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1727 elif [ "$VAL" = "runtime" ]; then
1734 if [ "$VAL" = "yes" ]; then
1741 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1748 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1749 CFG_LARGEFILE="$VAL"
1755 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1762 if [ "$VAL" = "yes" ]; then
1763 CFG_OPENSSL="linked"
1769 if [ "$VAL" = "yes" ]; then
1770 CFG_DECLARATIVE_DEBUG="yes"
1772 if [ "$VAL" = "no" ]; then
1773 CFG_DECLARATIVE_DEBUG="no"
1780 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1781 CFG_JAVASCRIPTCORE_JIT="$VAL"
1787 if [ "$VAL" = "yes" ]; then
1788 OPT_CONFIRM_LICENSE="$VAL"
1794 if [ "$VAL" = "yes" ]; then
1800 sql-*|imageformat-*)
1801 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1802 # if autoconf style options were used, $VAL can be "yes" or "no"
1803 [ "$VAL" = "yes" ] && VAL=qt
1804 # now $VAL should be "no", "qt", or "plugin"... double-check
1805 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1808 # now $VAL is "no", "qt", or "plugin"
1810 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1811 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1813 # Grab the available values
1816 avail="$CFG_SQL_AVAILABLE"
1819 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1820 if [ "$OPT" != "plugin" ]; then
1821 # png is always built in
1827 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1831 # Check that that user's value is available.
1834 if [ "$VAL" = "$d" ]; then
1839 [ "$found" = yes ] || ERROR=yes
1841 if [ "$VAR" = "sql" ]; then
1842 # set the CFG_SQL_driver
1843 eval "CFG_SQL_$VAL=\$OPT"
1845 elif [ "$VAR" = "imageformat" ]; then
1846 [ "$OPT" = "qt" ] && OPT=yes
1847 VAL="`echo $VAL |tr a-z A-Z`"
1848 eval "CFG_$VAL=$OPT"
1852 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1853 if [ "$OPT" = "plugin" ]; then
1856 QMakeVar add "${VAR}s" "${VAL}"
1857 elif [ "$OPT" = "no" ]; then
1858 PLUG_VAR="${VAR}-plugin"
1860 QMakeVar del "${IN_VAR}s" "$VAL"
1861 QMakeVar del "${PLUG_VAR}s" "$VAL"
1863 if [ "$ERROR" = "yes" ]; then
1864 echo "$CURRENT_OPT: unknown argument"
1869 if [ "$VAL" = "yes" ]; then
1870 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
1871 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
1875 elif [ "$VAL" = "no" ]; then
1876 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
1877 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
1886 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1893 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1900 D_FLAGS="$D_FLAGS \"$VAL\""
1903 I_FLAGS="$I_FLAGS -I\"${VAL}\""
1906 L_FLAGS="$L_FLAGS -L\"${VAL}\""
1909 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
1912 l_FLAGS="$l_FLAGS -l\"${VAL}\""
1915 if [ "$BUILD_ON_MAC" = "yes" ]; then
1916 L_FLAGS="$L_FLAGS -F\"${VAL}\""
1917 I_FLAGS="$I_FLAGS -F\"${VAL}\""
1923 if [ "$BUILD_ON_MAC" = "yes" ]; then
1924 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
1930 W_FLAGS="$W_FLAGS \"${VAL}\""
1936 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1937 CFG_PHONON_BACKEND="$VAL"
1949 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1950 CFG_AUDIO_BACKEND="$VAL"
1956 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1963 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1964 CFG_FORCE_ASSERTS="$VAL"
1970 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
1980 if [ "$UNKNOWN_OPT" = "yes" ]; then
1981 echo "${CURRENT_OPT}: invalid command-line switch"
1987 # update QT_CONFIG to show our current predefined configuration
1988 case "$CFG_QCONFIG" in
1989 minimal|small|medium|large|full)
1990 # these are a sequence of increasing functionality
1991 for c in minimal small medium large full; do
1992 QT_CONFIG="$QT_CONFIG $c-config"
1993 [ "$CFG_QCONFIG" = $c ] && break
1997 # not known to be sufficient for anything
1998 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
1999 echo >&2 "Error: configuration file not found:"
2000 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2002 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2007 #-------------------------------------------------------------------------------
2008 # build tree initialization
2009 #-------------------------------------------------------------------------------
2011 # where to find which..
2012 unixtests="$relpath/config.tests/unix"
2013 mactests="$relpath/config.tests/mac"
2014 WHICH="$unixtests/which.test"
2016 PERL=`$WHICH perl 2>/dev/null`
2018 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2020 for e in gawk nawk awk; do
2021 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2028 PERL="/usr/bin/perl"
2029 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2033 ### skip this if the user just needs help...
2034 if [ "$OPT_HELP" != "yes" ]; then
2036 # is this a shadow build?
2037 if [ "$OPT_SHADOW" = "maybe" ]; then
2039 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2040 if [ -h "$outpath" ]; then
2041 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2047 if [ "$OPT_SHADOW" = "yes" ]; then
2048 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2049 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2050 echo >&2 "Cannot proceed."
2053 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2056 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2058 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2059 echo "Qt can be built in release mode with separate debug information, so"
2060 echo "-debug-and-release is not necessary anymore"
2064 if [ "$CFG_SILENT" = "yes" ]; then
2065 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2068 # if the source tree is different from the build tree,
2069 # symlink or copy part of the sources
2070 if [ "$OPT_SHADOW" = "yes" ]; then
2071 echo "Preparing build tree..."
2073 if [ -z "$PERL" ]; then
2075 echo "You need perl in your PATH to make a shadow build."
2076 echo "Cannot proceed."
2080 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2082 # make a syncqt script that can be used in the shadow
2083 rm -f "$outpath/bin/syncqt"
2084 if [ -x "$relpath/bin/syncqt" ]; then
2085 mkdir -p "$outpath/bin"
2086 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2087 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2088 chmod 755 "$outpath/bin/syncqt"
2091 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2092 rm -f "$outpath/bin/$i"
2093 if [ -x "$relpath/bin/$i" ]; then
2094 mkdir -p "$outpath/bin"
2095 echo "#!/bin/sh" >"$outpath/bin/$i"
2096 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2097 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2098 chmod 755 "$outpath/bin/$i"
2102 # symlink the mkspecs directory
2103 mkdir -p "$outpath/mkspecs"
2104 rm -rf "$outpath"/mkspecs/*
2105 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2106 rm -f "$outpath/mkspecs/default"
2110 rm -rf "$outpath/mkspecs/$1"
2111 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2112 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2115 # Special case for mkspecs/features directory.
2116 # To be able to place .prf files into a shadow build directory,
2117 # we're creating links for files only. The directory structure is reproduced.
2118 ShadowMkspecs features
2120 # The modules dir is special, too.
2121 ShadowMkspecs modules
2123 # symlink the doc directory
2124 rm -rf "$outpath/doc"
2125 ln -s "$relpath/doc" "$outpath/doc"
2128 # symlink fonts to be able to run application from build directory
2129 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2130 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2131 mkdir -p "${outpath}/lib"
2132 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2136 if [ "$OPT_FAST" = "auto" ]; then
2137 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2144 # find a make command
2145 if [ -z "$MAKE" ]; then
2147 for mk in gmake make; do
2148 if "$WHICH" $mk >/dev/null 2>&1; then
2153 if [ -z "$MAKE" ]; then
2154 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2155 echo >&2 "Cannot proceed."
2158 # export MAKE, we need it later in the config.tests
2164 #-------------------------------------------------------------------------------
2165 # auto-detect all that hasn't been specified in the arguments
2166 #-------------------------------------------------------------------------------
2168 if [ -z "$PLATFORM" ]; then
2170 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2172 if [ "$PLATFORM_QPA" = "yes" ]; then
2173 OSX_VERSION=`uname -r | cut -d. -f1`
2174 if [ "$OSX_VERSION" -ge 11 ]; then
2175 # We're on Lion or above. Check if we have a supported Clang version
2176 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2179 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2194 #PLATFORM=aix-g++-64
2196 #PLATFORM=aix-xlc-64
2198 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2208 # PLATFORM=dynix-g++
2214 PLATFORM=freebsd-g++
2216 - Also available for FreeBSD: freebsd-icc
2220 PLATFORM=openbsd-g++
2231 #PLATFORM=irix-cc-64
2233 - Also available for IRIX: irix-g++ irix-cc-64
2237 case "$UNAME_MACHINE" in
2239 #PLATFORM=hpuxi-acc-32
2240 PLATFORM=hpuxi-acc-64
2242 - Also available for HP-UXi: hpuxi-acc-32
2248 #PLATFORM=hpux-acc-64
2250 #PLATFORM=hpux-acc-o64
2252 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2261 - Also available for Tru64: tru64-g++
2265 case "$UNAME_MACHINE" in
2267 PLATFORM=linux-g++-64
2274 - Also available for Linux: linux-kcc linux-icc linux-cxx
2278 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2279 PLATFORM="solaris-g++"
2281 #PLATFORM=solaris-g++
2283 #PLATFORM=solaris-cc64
2286 - Also available for Solaris: solaris-g++ solaris-cc-64
2289 ReliantUNIX-*:*|SINIX-*:*)
2290 PLATFORM=reliant-cds
2291 #PLATFORM=reliant-cds-64
2293 - Also available for Reliant UNIX: reliant-cds-64
2303 #PLATFORM=unixware-g++
2304 PLATFORM=unixware-cc
2306 - Also available for OpenUNIX: unixware-g++
2310 #PLATFORM=unixware-g++
2311 PLATFORM=unixware-cc
2313 - Also available for UnixWare: unixware-g++
2320 - Also available for SCO OpenServer: sco-g++
2324 PLATFORM=unixware-g++
2327 PLATFORM=unsupported/qnx-g++
2330 if [ "$OPT_HELP" != "yes" ]; then
2332 for p in $PLATFORMS; do
2333 echo " $relconf $* -platform $p"
2336 echo " The build script does not currently recognize all" >&2
2337 echo " platforms supported by Qt." >&2
2338 echo " Rerun this script with a -platform option listed to" >&2
2339 echo " set the system/compiler combination you use." >&2
2346 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2348 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2350 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2351 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2353 if [ -d "$PLATFORM" ]; then
2354 QMAKESPEC="$PLATFORM"
2356 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2358 if [ -d "$XPLATFORM" ]; then
2359 XQMAKESPEC="$XPLATFORM"
2361 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2363 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2364 QT_CROSS_COMPILE=yes
2365 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2366 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2369 if [ "$BUILD_ON_MAC" = "yes" ]; then
2370 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2372 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2373 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2374 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2375 echo " built with 'macx-g++'" >&2
2381 # check specified platforms are supported
2382 if [ '!' -d "$QMAKESPEC" ]; then
2384 echo " The specified system/compiler is not supported:"
2388 echo " Please see the README file for a complete list."
2392 if [ '!' -d "$XQMAKESPEC" ]; then
2394 echo " The specified system/compiler is not supported:"
2398 echo " Please see the README file for a complete list."
2402 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2404 echo " The specified system/compiler port is not complete:"
2406 echo " $XQMAKESPEC/qplatformdefs.h"
2408 echo " Please contact qt-info@nokia.com."
2413 # now look at the configs and figure out what platform we are config'd for
2414 [ "$PLATFORM_QPA" != "yes" ] \
2415 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2417 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2419 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2420 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2421 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2422 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2423 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2427 #-------------------------------------------------------------------------------
2428 # determine the system architecture
2429 #-------------------------------------------------------------------------------
2430 if [ "$OPT_VERBOSE" = "yes" ]; then
2431 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2434 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2435 case `basename "$XPLATFORM"` in
2438 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2440 echo "Please contact qt-info@nokia.com to upgrade your license to"
2441 echo "include this platform, or install the Qt Open Source Edition"
2442 echo "if you intend to develop free software."
2448 if [ -z "${CFG_HOST_ARCH}" ]; then
2449 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2451 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2452 case "$CFG_HOST_ARCH" in
2457 if [ "$OPT_VERBOSE" = "yes" ]; then
2458 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2462 CFG_HOST_ARCH=`uname -p`
2463 if [ "$OPT_VERBOSE" = "yes" ]; then
2464 echo " SGI ($CFG_HOST_ARCH)"
2468 case "$UNAME_MACHINE" in
2470 if [ "$OPT_VERBOSE" = "yes" ]; then
2471 echo " Sun SPARC (sparc)"
2478 if [ "$OPT_VERBOSE" = "yes" ]; then
2479 echo " 64-bit AMD 80x86 (x86_64)"
2481 CFG_HOST_ARCH=x86_64
2484 if [ "$OPT_VERBOSE" = "yes" ]; then
2485 echo " 32-bit Intel 80x86 (i386)"
2493 if [ "$OPT_VERBOSE" = "yes" ]; then
2494 echo " 64-bit IBM PowerPC (powerpc)"
2496 CFG_HOST_ARCH=powerpc
2499 if [ "$OPT_VERBOSE" = "yes" ]; then
2500 echo " HP PA-RISC (parisc)"
2502 CFG_HOST_ARCH=parisc
2505 if [ "$OPT_VERBOSE" = "yes" ]; then
2506 echo " 32-bit Intel 80x86 (i386)"
2510 *:*:x86_64|*:*:amd64)
2511 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2512 if [ "$OPT_VERBOSE" = "yes" ]; then
2513 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2517 if [ "$OPT_VERBOSE" = "yes" ]; then
2518 echo " 64-bit AMD 80x86 (x86_64)"
2520 CFG_HOST_ARCH=x86_64
2524 if [ "$OPT_VERBOSE" = "yes" ]; then
2525 echo " 32-bit PowerPC (powerpc)"
2527 CFG_HOST_ARCH=powerpc
2530 if [ "$OPT_VERBOSE" = "yes" ]; then
2531 echo " 64-bit PowerPC (powerpc)"
2533 CFG_HOST_ARCH=powerpc
2536 if [ "$OPT_VERBOSE" = "yes" ]; then
2537 echo " IBM S/390 (s390)"
2542 if [ "$OPT_VERBOSE" = "yes" ]; then
2548 if [ "$OPT_VERBOSE" = "yes" ]; then
2549 echo " Linux on SPARC"
2554 case "$UNAME_MACHINE" in
2556 if [ "$OPT_VERBOSE" = "yes" ]; then
2557 echo " QNX on Intel 80x86 (i386)"
2564 if [ "$OPT_VERBOSE" = "yes" ]; then
2565 echo " Trying '$UNAME_MACHINE'..."
2567 CFG_HOST_ARCH="$UNAME_MACHINE"
2572 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2573 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2574 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2575 CFG_ARCH=$CFG_HOST_ARCH
2582 # previously, armv6 was a different arch
2588 if [ "$OPT_VERBOSE" = "yes" ]; then
2589 echo "System architecture: '$CFG_ARCH'"
2590 if [ "$PLATFORM_QPA" = "yes" ]; then
2591 echo "Host architecture: '$CFG_HOST_ARCH'"
2595 #-------------------------------------------------------------------------------
2596 # tests that don't need qmake (must be run before displaying help)
2597 #-------------------------------------------------------------------------------
2599 # detect build style
2600 if [ "$CFG_DEBUG" = "auto" ]; then
2601 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2602 CFG_DEBUG_RELEASE=yes
2604 elif [ "$CFG_DEV" = "yes" ]; then
2605 CFG_DEBUG_RELEASE=no
2608 CFG_DEBUG_RELEASE=no
2612 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2613 QT_CONFIG="$QT_CONFIG build_all"
2616 if [ -z "$PKG_CONFIG" ]; then
2617 # See if PKG_CONFIG is set in the mkspec:
2618 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2620 if [ -z "$PKG_CONFIG" ]; then
2621 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2624 # Work out if we can use pkg-config
2625 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2626 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2628 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2629 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2630 echo >&2 "environment!"
2632 if [ -z "$PKG_CONFIG_PATH" ]; then
2634 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2635 echo >&2 "the host compiler's .pc files will be used. This is probably"
2636 echo >&2 "not what you want."
2638 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2640 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2641 echo >&2 "been set. This means your toolchain's .pc files must contain"
2642 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2643 echo >&2 "tests are failing, please check these files."
2648 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2649 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2650 echo >&2 "dependencies"
2656 if [ ! -n "$PKG_CONFIG" ]; then
2657 QT_CONFIG="$QT_CONFIG no-pkg-config"
2660 # pass on $CFG_SDK to the configure tests.
2661 if [ '!' -z "$CFG_SDK" ]; then
2662 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2665 # find the default framework value
2666 if [ "$BUILD_ON_MAC" = "yes" ]; then
2667 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2668 CFG_FRAMEWORK="$CFG_SHARED"
2669 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2671 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2679 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2681 TEST_COMPILER=$QMAKE_CONF_COMPILER
2682 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2683 if [ -z "$TEST_COMPILER" ]; then
2684 echo "ERROR: Cannot set the compiler for the configuration tests"
2690 if [ -n "$CFG_SYSROOT" ]; then
2691 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2692 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2693 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2695 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2699 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2701 # auto-detect precompiled header support
2702 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2703 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2710 #auto-detect DWARF2 on the mac
2711 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2712 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2719 # don't autodetect support for separate debug info on objcopy when
2720 # cross-compiling as lots of toolchains seems to have problems with this
2721 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2722 CFG_SEPARATE_DEBUG_INFO="no"
2725 # auto-detect support for separate debug info in objcopy
2726 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2727 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2728 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2729 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2730 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2731 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2732 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2733 CFG_SEPARATE_DEBUG_INFO=no
2737 # binutils on HP-UX is buggy; default to no.
2738 CFG_SEPARATE_DEBUG_INFO=no
2741 CFG_SEPARATE_DEBUG_INFO=yes
2747 # auto-detect -fvisibility support
2748 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2749 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2750 CFG_REDUCE_EXPORTS=no
2752 CFG_REDUCE_EXPORTS=yes
2756 # detect the availability of the -Bsymbolic-functions linker optimization
2757 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2758 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2759 CFG_REDUCE_RELOCATIONS=no
2761 CFG_REDUCE_RELOCATIONS=yes
2765 # auto-detect GNU make support
2766 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2770 # find the default framework value
2771 if [ "$BUILD_ON_MAC" = "yes" ]; then
2772 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2773 CFG_FRAMEWORK="$CFG_SHARED"
2774 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2776 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2784 # x11 tests are done after qmake is built
2787 #setup the build parts
2788 if [ -z "$CFG_BUILD_PARTS" ]; then
2789 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2791 # don't build tools by default when cross-compiling
2792 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2793 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2796 for nobuild in $CFG_NOBUILD_PARTS; do
2797 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2799 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2801 # echo "WARNING: libs is a required part of the build."
2803 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2806 #-------------------------------------------------------------------------------
2807 # post process QT_INSTALL_* variables
2808 #-------------------------------------------------------------------------------
2810 if [ -z "$QT_INSTALL_PREFIX" ]; then
2811 if [ "$CFG_DEV" = "yes" ]; then
2812 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2814 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2817 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2819 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2820 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2821 if [ "$BUILD_ON_MAC" = "yes" ]; then
2822 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2825 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2828 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2830 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2831 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2832 if [ "$BUILD_ON_MAC" = "yes" ]; then
2833 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2838 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
2841 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
2843 if [ -z "$QT_INSTALL_LIBS" ]; then #default
2844 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2845 if [ "$BUILD_ON_MAC" = "yes" ]; then
2846 if [ "$CFG_FRAMEWORK" = "yes" ]; then
2847 QT_INSTALL_LIBS="/Libraries/Frameworks"
2851 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
2853 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
2855 if [ -z "$QT_INSTALL_BINS" ]; then #default
2856 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2857 if [ "$BUILD_ON_MAC" = "yes" ]; then
2858 QT_INSTALL_BINS="/Developer/Applications/Qt"
2861 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
2863 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
2865 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
2866 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2867 if [ "$BUILD_ON_MAC" = "yes" ]; then
2868 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
2871 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
2873 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
2875 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
2876 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2877 if [ "$BUILD_ON_MAC" = "yes" ]; then
2878 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
2881 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
2883 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
2885 if [ -z "$QT_INSTALL_DATA" ]; then #default
2886 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
2888 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
2890 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
2891 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
2893 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
2895 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
2896 if [ "$BUILD_ON_MAC" = "yes" ]; then
2897 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
2899 QT_INSTALL_SETTINGS=/etc/xdg
2902 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
2904 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
2905 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2906 if [ "$BUILD_ON_MAC" = "yes" ]; then
2907 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
2910 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
2912 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
2915 if [ -z "$QT_INSTALL_TESTS" ]; then #default
2916 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2917 if [ "$BUILD_ON_MAC" = "yes" ]; then
2918 QT_INSTALL_TESTS="/Developer/Tests/Qt"
2921 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
2923 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
2925 #------- host paths --------
2927 if [ -z "$QT_HOST_PREFIX" ]; then
2928 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
2931 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
2935 if [ -z "$QT_HOST_BINS" ]; then #default
2937 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2938 if [ "$BUILD_ON_MAC" = "yes" ]; then
2939 QT_HOST_BINS="/Developer/Applications/Qt"
2942 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
2944 QT_HOST_BINS="$QT_INSTALL_BINS"
2947 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
2949 if [ -z "$QT_HOST_DATA" ]; then #default
2951 QT_HOST_DATA="$QT_HOST_PREFIX"
2953 QT_HOST_DATA="$QT_INSTALL_DATA"
2956 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
2959 #-------------------------------------------------------------------------------
2960 # help - interactive parts of the script _after_ this section please
2961 #-------------------------------------------------------------------------------
2963 # next, emit a usage message if something failed.
2964 if [ "$OPT_HELP" = "yes" ]; then
2965 [ "x$ERROR" = "xyes" ] && echo
2966 if [ "$CFG_NIS" = "no" ]; then
2973 if [ "$CFG_CUPS" = "no" ]; then
2980 if [ "$CFG_ICONV" = "no" ]; then
2987 if [ "$CFG_LARGEFILE" = "no" ]; then
2994 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3001 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3009 if [ "$CFG_XCB" = "no" ]; then
3017 if [ "$CFG_WAYLAND" = "no" ]; then
3024 if [ "$CFG_XINPUT2" = "no" ]; then
3033 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3034 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3035 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3036 [-release] [-debug] [-debug-and-release]
3037 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3038 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3039 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3040 [-plugin-sql-<driver>] [-system-sqlite]
3041 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3042 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3043 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3044 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3045 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3046 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3047 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3048 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3049 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
3050 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3051 [-no-audio-backend] [-audio-backend]
3052 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3053 [-no-optimized-qmake] [-optimized-qmake]
3054 [-no-openssl] [-openssl] [-openssl-linked]
3055 [-no-gtkstyle] [-gtkstyle]
3056 [-qt-pcre] [-system-pcre]
3057 [additional platform specific options (see below)]
3060 Installation options:
3062 -qpa ................ This will enable the QPA build.
3063 QPA is a window system agnostic implementation of Qt.
3065 These are optional, but you may specify install directories.
3067 -prefix <dir> ...... This will install everything relative to <dir>
3068 (default $QT_INSTALL_PREFIX)
3070 if [ "$PLATFORM_QPA" = "yes" ]; then
3073 -hostprefix [dir] .. Tools and libraries needed when developing
3074 applications are installed in [dir]. If [dir] is
3075 not given, the current build directory will be used.
3081 * -prefix-install .... Force a sandboxed "local" installation of
3082 Qt. This will install into
3083 $QT_INSTALL_PREFIX, if this option is
3084 disabled then some platforms will attempt a
3085 "system" install by placing default values to
3086 be placed in a system location other than
3089 You may use these to separate different parts of the install:
3091 -bindir <dir> ......... Executables will be installed to <dir>
3092 (default PREFIX/bin)
3093 -libdir <dir> ......... Libraries will be installed to <dir>
3094 (default PREFIX/lib)
3095 -docdir <dir> ......... Documentation will be installed to <dir>
3096 (default PREFIX/doc)
3097 -headerdir <dir> ...... Headers will be installed to <dir>
3098 (default PREFIX/include)
3099 -plugindir <dir> ...... Plugins will be installed to <dir>
3100 (default PREFIX/plugins)
3101 -importdir <dir> ...... Imports for QML will be installed to <dir>
3102 (default PREFIX/imports)
3103 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3105 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3106 (default PREFIX/translations)
3107 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3108 (default PREFIX/etc/settings)
3109 -examplesdir <dir> .... Examples will be installed to <dir>
3110 (default PREFIX/examples)
3111 -testsdir <dir> ....... Tests will be installed to <dir>
3112 (default PREFIX/tests)
3114 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3117 -hostbindir <dir> .. Host executables will be installed to <dir>
3118 (default HOSTPREFIX/bin)
3119 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
3120 (default HOSTPREFIX)
3127 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3128 that needs to be evaluated. If the evaluation succeeds, the feature is
3129 included. Here is a short explanation of each option:
3131 * -release ........... Compile and link Qt with debugging turned off.
3132 -debug ............. Compile and link Qt with debugging turned on.
3133 -debug-and-release . Compile and link two versions of Qt, with and without
3134 debugging turned on (Mac only).
3136 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3138 -opensource ........ Compile and link the Open-Source Edition of Qt.
3139 -commercial ........ Compile and link the Commercial Edition of Qt.
3142 * -shared ............ Create and use shared Qt libraries.
3143 -static ............ Create and use static Qt libraries.
3145 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3147 -fast .............. Configure Qt quickly by generating Makefiles only for
3148 library and subdirectory targets. All other Makefiles
3149 are created as wrappers, which will in turn run qmake.
3151 -no-largefile ...... Disables large file support.
3152 + -largefile ......... Enables Qt to access files larger than 4 GB.
3155 if [ "$PLATFORM_QPA" = "yes" ]; then
3162 if [ "$CFG_DBUS" = "no" ]; then
3171 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3172 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3174 -no-accessibility .. Do not compile Accessibility support.
3175 * -accessibility ..... Compile Accessibility support.
3177 $SHN -no-stl ............ Do not compile STL support.
3178 $SHY -stl ............... Compile STL support.
3180 -no-sql-<driver> ... Disable SQL <driver> entirely.
3181 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3183 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3186 Possible values for <driver>:
3187 [ $CFG_SQL_AVAILABLE ]
3189 -system-sqlite ..... Use sqlite from the operating system.
3191 -no-phonon-backend.. Do not build the platform phonon plugin.
3192 + -phonon-backend..... Build the platform phonon plugin.
3194 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3195 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3197 -no-declarative-debug ..... Do not build the declarative debugging support.
3198 + -declarative-debug ....... Build the declarative debugging support.
3200 -platform target ... The operating system and compiler you are building
3203 See the README file for a list of supported
3204 operating systems and compilers.
3207 if [ "${PLATFORM_QPA}" != "yes" ]; then
3209 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3210 raster - Software rasterizer
3211 opengl - Rendering via OpenGL, Experimental!
3212 openvg - Rendering via OpenVG, Experimental!
3219 -no-mmx ............ Do not compile with use of MMX instructions.
3220 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3221 -no-sse ............ Do not compile with use of SSE instructions.
3222 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3223 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3224 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3225 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3226 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3227 -no-avx ............ Do not compile with use of AVX instructions.
3228 -no-neon ........... Do not compile with use of NEON instructions.
3230 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3231 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3233 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3235 -D <string> ........ Add an explicit define to the preprocessor.
3236 -I <string> ........ Add an explicit include path.
3237 -L <string> ........ Add an explicit library path.
3239 -help, -h .......... Display this information.
3241 Third Party Libraries:
3243 -qt-zlib ........... Use the zlib bundled with Qt.
3244 + -system-zlib ....... Use zlib from the operating system.
3245 See http://www.gzip.org/zlib
3247 -no-gif ............ Do not compile GIF reading support.
3249 -no-libpng ......... Do not compile PNG support.
3250 -qt-libpng ......... Use the libpng bundled with Qt.
3251 + -system-libpng ..... Use libpng from the operating system.
3252 See http://www.libpng.org/pub/png
3254 -no-libjpeg ........ Do not compile JPEG support.
3255 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3256 + -system-libjpeg .... Use libjpeg from the operating system.
3257 See http://www.ijg.org
3259 -no-openssl ........ Do not compile support for OpenSSL.
3260 + -openssl ........... Enable run-time OpenSSL support.
3261 -openssl-linked .... Enabled linked OpenSSL support.
3263 -qt-pcre ........... Use the PCRE library bundled with Qt.
3264 + -system-pcre ....... Use the PCRE library from the operating system.
3268 -make <part> ....... Add part to the list of parts to be built at make time.
3269 ($QT_DEFAULT_BUILD_PARTS)
3270 -nomake <part> ..... Exclude part from the list of parts to be built.
3272 -R <string> ........ Add an explicit runtime library path to the Qt
3274 -l <string> ........ Add an explicit library.
3276 -no-rpath .......... Do not use the library install path as a runtime
3278 + -rpath ............. Link Qt libraries and executables using the library
3279 install path as a runtime library path. Equivalent
3280 to -R install_libpath
3282 -continue .......... Continue as far as possible if an error occurs.
3284 -verbose, -v ....... Print verbose information about each step of the
3287 -silent ............ Reduce the build output so that warnings and errors
3288 can be seen more easily.
3290 * -no-optimized-qmake ... Do not build qmake optimized.
3291 -optimized-qmake ...... Build qmake optimized.
3293 -no-gui ............ Don't build the Qt GUI library
3295 $NSN -no-nis ............ Do not compile NIS support.
3296 $NSY -nis ............... Compile NIS support.
3298 $CUN -no-cups ........... Do not compile CUPS support.
3299 $CUY -cups .............. Compile CUPS support.
3300 Requires cups/cups.h and libcups.so.2.
3302 $CIN -no-iconv .......... Do not compile support for iconv(3).
3303 $CIY -iconv ............. Compile support for iconv(3).
3305 $PHN -no-pch ............ Do not use precompiled header support.
3306 $PHY -pch ............... Use precompiled header support.
3308 $DBN -no-dbus ........... Do not compile the QtDBus module.
3309 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3310 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3312 -reduce-relocations ..... Reduce relocations in the libraries through extra
3313 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3314 experimental; needs GNU ld >= 2.18).
3316 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3320 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3321 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3328 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3336 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3340 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3341 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3343 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3344 $XCBY -xcb ............... Compile Xcb support.
3346 $XWN -no-wayland......... Do not compile Wayland support.
3347 $XWY -wayland .......... Compile Wayland support.
3353 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3357 $X2N -no-xinput2......... Do not compile XInput2 support.
3358 $X2Y -xinput2............ Compile XInput2 support.
3364 if [ "$PLATFORM_X11" = "yes" ]; then
3365 if [ "$CFG_SM" = "no" ]; then
3372 if [ "$CFG_XSHAPE" = "no" ]; then
3379 if [ "$CFG_XVIDEO" = "no" ]; then
3386 if [ "$CFG_XINERAMA" = "no" ]; then
3393 if [ "$CFG_FONTCONFIG" = "no" ]; then
3400 if [ "$CFG_XCURSOR" = "no" ]; then
3407 if [ "$CFG_XFIXES" = "no" ]; then
3414 if [ "$CFG_XRANDR" = "no" ]; then
3421 if [ "$CFG_XRENDER" = "no" ]; then
3428 if [ "$CFG_MITSHM" = "no" ]; then
3435 if [ "$CFG_XINPUT" = "no" ]; then
3442 if [ "$CFG_XKB" = "no" ]; then
3449 if [ "$CFG_IM" = "no" ]; then
3460 -no-gtkstyle ....... Do not build the GTK theme integration.
3461 + -gtkstyle .......... Build the GTK theme integration.
3463 * -no-nas-sound ...... Do not compile in NAS sound support.
3464 -system-nas-sound .. Use NAS libaudio from the operating system.
3465 See http://radscan.com/nas.html
3467 -egl ............... Use EGL instead of GLX to manage contexts.
3468 When building for desktop OpenGL, this option will
3469 make Qt use EGL to manage contexts rather than the
3470 GLX, which is the default. Note: For OpenGL ES, EGL
3473 -no-opengl ......... Do not support OpenGL.
3474 + -opengl <api> ...... Enable OpenGL support.
3475 With no parameter, this will auto-detect the "best"
3476 OpenGL API to use. If desktop OpenGL is available, it
3477 will be used. Use desktop or es2 for <api>
3478 to force the use of the Desktop OpenGL or
3479 OpenGL ES 2 APIs instead.
3481 -no-openvg ........ Do not support OpenVG.
3482 + -openvg ........... Enable OpenVG support.
3483 Requires EGL support, typically supplied by an OpenGL
3484 or other graphics implementation.
3486 $SMN -no-sm ............. Do not support X Session Management.
3487 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3489 $SHN -no-xshape ......... Do not compile XShape support.
3490 $SHY -xshape ............ Compile XShape support.
3491 Requires X11/extensions/shape.h.
3493 $XVN -no-xvideo ......... Do not compile XVideo support.
3494 $XVY -xvideo ............ Compile XVideo support.
3495 Requires X11/extensions/Xv.h & Xvlib.h.
3497 $SHN -no-xsync .......... Do not compile XSync support.
3498 $SHY -xsync ............. Compile XSync support.
3499 Requires X11/extensions/sync.h.
3501 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3502 $XAY -xinerama .......... Compile Xinerama support.
3503 Requires X11/extensions/Xinerama.h and libXinerama.
3504 By default, Xinerama support will be compiled if
3505 available and the shared libraries are dynamically
3508 $XCN -no-xcursor ........ Do not compile Xcursor support.
3509 $XCY -xcursor ........... Compile Xcursor support.
3510 Requires X11/Xcursor/Xcursor.h and libXcursor.
3511 By default, Xcursor support will be compiled if
3512 available and the shared libraries are dynamically
3515 $XFN -no-xfixes ......... Do not compile Xfixes support.
3516 $XFY -xfixes ............ Compile Xfixes support.
3517 Requires X11/extensions/Xfixes.h and libXfixes.
3518 By default, Xfixes support will be compiled if
3519 available and the shared libraries are dynamically
3522 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3523 $XZY -xrandr ............ Compile Xrandr support.
3524 Requires X11/extensions/Xrandr.h and libXrandr.
3526 $XRN -no-xrender ........ Do not compile Xrender support.
3527 $XRY -xrender ........... Compile Xrender support.
3528 Requires X11/extensions/Xrender.h and libXrender.
3530 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3531 $XMY -mitshm ............ Compile MIT-SHM support.
3532 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3534 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3535 $FCGY -fontconfig ........ Compile FontConfig support.
3536 Requires fontconfig/fontconfig.h, libfontconfig,
3537 freetype.h and libfreetype.
3539 $XIN -no-xinput ......... Do not compile Xinput support.
3540 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3541 which requires IRIX with wacom.h and libXi or
3542 XFree86 with X11/extensions/XInput.h and libXi.
3544 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3545 $XKY -xkb ............... Compile XKB support.
3550 if [ "$BUILD_ON_MAC" = "yes" ]; then
3555 -Fstring ........... Add an explicit framework path.
3556 -fw string ......... Add an explicit framework.
3558 * -framework ......... Build Qt as a series of frameworks and
3559 link tools against those frameworks.
3560 -no-framework ...... Do not build Qt as a series of frameworks.
3562 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3563 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3565 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3566 Only one arch value can be specified.
3568 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3569 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3571 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3572 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3573 QT_ENABLE_HARFBUZZ environment variable.
3578 if [ "$PLATFORM_QPA" = "yes" ]; then
3584 if [ "$PLATFORM_QPA" = "yes" ]; then
3587 -xplatform target ... The target platform when cross-compiling.
3589 -no-feature-<feature> Do not compile in <feature>.
3590 -feature-<feature> .. Compile in <feature>. The available features
3591 are described in src/corelib/global/qfeatures.txt
3593 -no-freetype ........ Do not compile in Freetype2 support.
3594 -qt-freetype ........ Use the libfreetype bundled with Qt.
3595 * -system-freetype .... Use libfreetype from the operating system.
3596 See http://www.freetype.org/
3598 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3599 default ($CFG_QCONFIG).
3601 -no-opengl .......... Do not support OpenGL.
3602 -opengl <api> ....... Enable OpenGL ES support
3603 With no parameter, this will attempt to auto-detect
3604 OpenGL ES 2, or regular desktop OpenGL.
3605 Use es2 for <api> to override auto-detection.
3609 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3610 if [ "$CFG_GLIB" = "no" ]; then
3618 $GBN -no-glib ........... Do not compile Glib support.
3619 $GBY -glib .............. Compile Glib support.
3624 [ "x$ERROR" = "xyes" ] && exit 1
3629 # -----------------------------------------------------------------------------
3630 # LICENSING, INTERACTIVE PART
3631 # -----------------------------------------------------------------------------
3633 if [ "$PLATFORM_QPA" = "yes" ]; then
3634 Platform="Qt Lighthouse"
3635 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3636 Platform="Qt for Windows"
3637 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3639 Platform="Qt for Linux/X11"
3643 echo "This is the $Platform ${EditionString} Edition."
3646 if [ "$Edition" = "OpenSource" ]; then
3648 echo "You are licensed to use this software under the terms of"
3649 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3650 if [ -f "$relpath/LICENSE.GPL3" ]; then
3651 echo "You are also licensed to use this software under the terms of"
3652 echo "the GNU General Public License (GPL) versions 3."
3658 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3659 echo "You have already accepted the terms of the $LicenseType license."
3662 if [ -f "$relpath/LICENSE.GPL3" ]; then
3663 echo "Type '3' to view the GNU General Public License version 3."
3665 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3666 echo "Type 'yes' to accept this license offer."
3667 echo "Type 'no' to decline this license offer."
3669 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3673 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3675 elif [ "$acceptance" = "no" ]; then
3676 echo "You are not licensed to use this software."
3679 elif [ "$acceptance" = "3" ]; then
3680 more "$relpath/LICENSE.GPL3"
3681 elif [ "$acceptance" = "L" ]; then
3682 more "$relpath/LICENSE.LGPL"
3685 elif [ "$Edition" = "Preview" ]; then
3686 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3689 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3690 echo "You have already accepted the terms of the $LicenseType license."
3693 echo "You are licensed to use this software under the terms of"
3694 echo "the $TheLicense"
3696 echo "Type '?' to read the Preview License."
3697 echo "Type 'yes' to accept this license offer."
3698 echo "Type 'no' to decline this license offer."
3700 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3704 if [ "$acceptance" = "yes" ]; then
3706 elif [ "$acceptance" = "no" ] ;then
3707 echo "You are not licensed to use this software."
3710 elif [ "$acceptance" = "?" ]; then
3711 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3714 elif [ "$Edition" != "OpenSource" ]; then
3715 if [ -n "$ExpiryDate" ]; then
3716 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3717 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3718 Today=`date +%Y%m%d`
3719 if [ "$Today" -gt "$ExpiryDate" ]; then
3720 case "$LicenseType" in
3721 Commercial|Academic|Educational)
3722 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3724 echo "NOTICE NOTICE NOTICE NOTICE"
3726 echo " Your support and upgrade period has expired."
3728 echo " You are no longer licensed to use this version of Qt."
3729 echo " Please contact qt-info@nokia.com to renew your support"
3730 echo " and upgrades for this license."
3732 echo "NOTICE NOTICE NOTICE NOTICE"
3737 echo "WARNING WARNING WARNING WARNING"
3739 echo " Your support and upgrade period has expired."
3741 echo " You may continue to use your last licensed release"
3742 echo " of Qt under the terms of your existing license"
3743 echo " agreement. But you are not entitled to technical"
3744 echo " support, nor are you entitled to use any more recent"
3745 echo " Qt releases."
3747 echo " Please contact qt-info@nokia.com to renew your"
3748 echo " support and upgrades for this license."
3750 echo "WARNING WARNING WARNING WARNING"
3757 echo "NOTICE NOTICE NOTICE NOTICE"
3759 echo " Your Evaluation license has expired."
3761 echo " You are no longer licensed to use this software. Please"
3762 echo " contact qt-info@nokia.com to purchase license, or install"
3763 echo " the Qt Open Source Edition if you intend to develop free"
3766 echo "NOTICE NOTICE NOTICE NOTICE"
3773 TheLicense=`head -n 1 "$outpath/LICENSE"`
3775 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3776 echo "You have already accepted the terms of the $TheLicense."
3779 echo "You are licensed to use this software under the terms of"
3780 echo "the $TheLicense."
3782 echo "Type '?' to view the $TheLicense."
3783 echo "Type 'yes' to accept this license offer."
3784 echo "Type 'no' to decline this license offer."
3786 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3790 if [ "$acceptance" = "yes" ]; then
3792 elif [ "$acceptance" = "no" ]; then
3793 echo "You are not licensed to use this software."
3796 else [ "$acceptance" = "?" ]
3797 more "$outpath/LICENSE"
3802 # this should be moved somewhere else
3805 AIX_VERSION=`uname -v`
3806 if [ "$AIX_VERSION" -lt "5" ]; then
3807 QMakeVar add QMAKE_LIBS_X11 -lbind
3814 #-------------------------------------------------------------------------------
3815 # generate qconfig.cpp
3816 #-------------------------------------------------------------------------------
3817 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3819 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3821 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3822 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3824 /* Installation date */
3825 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3827 /* Installation Info */
3828 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3829 "qt_prfxpath=$QT_INSTALL_PREFIX",
3830 "qt_docspath=$QT_INSTALL_DOCS",
3831 "qt_hdrspath=$QT_INSTALL_HEADERS",
3832 "qt_libspath=$QT_INSTALL_LIBS",
3833 "qt_binspath=$QT_INSTALL_BINS",
3834 "qt_plugpath=$QT_INSTALL_PLUGINS",
3835 "qt_impspath=$QT_INSTALL_IMPORTS",
3836 "qt_datapath=$QT_INSTALL_DATA",
3837 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
3838 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
3839 "qt_tstspath=$QT_INSTALL_TESTS",
3840 #ifdef QT_BUILD_QMAKE
3841 "qt_ssrtpath=$CFG_SYSROOT",
3842 "qt_hpfxpath=$QT_HOST_PREFIX",
3843 "qt_hbinpath=$QT_HOST_BINS",
3844 "qt_hdatpath=$QT_HOST_DATA",
3847 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
3850 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3852 /* strlen( "qt_lcnsxxxx" ) == 12 */
3853 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
3854 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
3856 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
3859 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
3860 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
3861 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
3863 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
3864 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
3865 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
3868 # -----------------------------------------------------------------------------
3869 if [ "$LicenseType" = "Evaluation" ]; then
3870 EVALKEY=qt_qevalkey=$LicenseKeyExt
3871 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
3872 EVALKEY=qt_qevalkey=
3875 if [ -n "$EVALKEY" ]; then
3876 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
3877 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
3878 /* Evaluation license key */
3879 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
3881 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
3885 # -----------------------------------------------------------------------------
3887 # -----------------------------------------------------------------------------
3890 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
3892 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
3893 if [ "$OPT_SHADOW" = "yes" ]; then
3894 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
3895 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
3896 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
3900 # $1: input variable name (awk regexp)
3901 # $2: optional output variable name
3902 # $3: optional value transformation (sed command)
3903 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
3904 # is where the resulting variable is written to
3905 setBootstrapVariable()
3907 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
3911 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
3912 echo "Creating qmake. Please wait..."
3915 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
3916 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
3917 if [ -f "$QCONFIG_H" ]; then
3918 OLD_QCONFIG_H=$QCONFIG_H
3919 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
3922 # create temporary qconfig.h for compiling qmake, if it doesn't exist
3923 # when building qmake, we use #defines for the install paths,
3924 # however they are real functions in the library
3925 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
3926 mkdir -p "$outpath/src/corelib/global"
3927 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
3928 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
3931 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
3933 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
3934 rm -rf mkspecs/default
3935 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
3936 mkdir -p "$outpath/qmake" || exit
3938 for mkfile in GNUmakefile Makefile; do
3941 in_mkfile="${mkfile}.in"
3942 if [ "$mkfile" = "Makefile" ]; then
3943 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
3944 # (cd qmake && qmake) >/dev/null 2>&1 && continue
3946 in_mkfile="${mkfile}.unix"
3948 in_mkfile="$relpath/qmake/$in_mkfile"
3949 mkfile="$outpath/qmake/$mkfile"
3950 if [ -f "$mkfile" ]; then
3951 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
3954 [ -f "$in_mkfile" ] || continue
3956 echo "########################################################################" > "$mkfile"
3957 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
3958 echo "########################################################################" >> "$mkfile"
3961 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
3962 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
3963 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
3965 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
3966 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
3969 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
3970 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
3971 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
3972 setBootstrapVariable QMAKE_CFLAGS
3973 setBootstrapVariable QMAKE_CXXFLAGS
3974 setBootstrapVariable QMAKE_LFLAGS
3976 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
3977 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
3978 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
3980 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
3981 setBootstrapVariable QMAKE_CFLAGS_RELEASE
3982 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
3983 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
3984 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
3985 elif [ "$CFG_DEBUG" = "yes" ]; then
3986 setBootstrapVariable QMAKE_CFLAGS_DEBUG
3987 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
3988 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
3989 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
3992 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
3993 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
3994 for rpath in $RPATH_FLAGS; do
3995 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
3998 if [ "$BUILD_ON_MAC" = "yes" ]; then
3999 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4000 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4001 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4002 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4003 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4004 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4005 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4006 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4007 if [ '!' -z "$CFG_SDK" ]; then
4008 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4009 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4010 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4011 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4012 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4015 if [ '!' -z "$D_FLAGS" ]; then
4016 for DEF in $D_FLAGS; do
4017 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4020 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4021 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4022 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4023 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4025 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4026 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4027 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4028 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4029 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4030 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4031 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4032 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4033 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4034 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4036 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4037 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4038 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4039 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4044 QMAKE_BUILD_ERROR=no
4045 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4046 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4047 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4048 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4051 #-------------------------------------------------------------------------------
4052 # tests that need qmake
4053 #-------------------------------------------------------------------------------
4055 # detect availability of float math.h functions
4056 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4057 CFG_USE_FLOATMATH=yes
4059 CFG_USE_FLOATMATH=no
4062 # detect mmx support
4063 if [ "${CFG_MMX}" = "auto" ]; then
4064 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4071 # detect 3dnow support
4072 if [ "${CFG_3DNOW}" = "auto" ]; then
4073 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4080 # detect sse support
4081 if [ "${CFG_SSE}" = "auto" ]; then
4082 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4089 # detect sse2 support
4090 if [ "${CFG_SSE2}" = "auto" ]; then
4091 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4098 # detect sse3 support
4099 if [ "${CFG_SSE3}" = "auto" ]; then
4100 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4107 # detect ssse3 support
4108 if [ "${CFG_SSSE3}" = "auto" ]; then
4109 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4116 # detect sse4.1 support
4117 if [ "${CFG_SSE4_1}" = "auto" ]; then
4118 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
4125 # detect sse4.2 support
4126 if [ "${CFG_SSE4_2}" = "auto" ]; then
4127 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
4134 # detect avx support
4135 if [ "${CFG_AVX}" = "auto" ]; then
4136 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4143 # check iWMMXt support
4144 if [ "$CFG_IWMMXT" = "yes" ]; then
4145 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4146 if [ $? != "0" ]; then
4147 echo "The iWMMXt functionality test failed!"
4148 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4153 # detect neon support
4154 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4155 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
4162 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4165 if [ "$CFG_ZLIB" = "no" ]; then
4166 # Note: Qt no longer support builds without zlib
4167 # So we force a "no" to be "auto" here.
4168 # If you REALLY really need no zlib support, you can still disable
4169 # it by doing the following:
4170 # add "no-zlib" to mkspecs/qconfig.pri
4171 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4173 # There's no guarantee that Qt will build under those conditions
4178 if [ "$CFG_ZLIB" = "auto" ]; then
4179 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
4186 if [ "$CFG_LARGEFILE" = "auto" ]; then
4187 #Large files should be enabled for all Linux systems
4191 # detect how jpeg should be built
4192 if [ "$CFG_JPEG" = "auto" ]; then
4193 if [ "$CFG_SHARED" = "yes" ]; then
4200 if [ "$CFG_LIBJPEG" = "auto" ]; then
4201 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
4208 # detect how gif should be built
4209 if [ "$CFG_GIF" = "auto" ]; then
4210 if [ "$CFG_SHARED" = "yes" ]; then
4218 if [ "$CFG_LIBPNG" = "auto" ]; then
4219 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
4226 # detect accessibility
4227 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4228 CFG_ACCESSIBILITY=yes
4231 # auto-detect SQL-modules support
4232 for _SQLDR in $CFG_SQL_AVAILABLE; do
4235 if [ "$CFG_SQL_mysql" != "no" ]; then
4236 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4237 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4238 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4239 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4240 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4241 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4242 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4244 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4245 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4246 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4247 echo " You need MySql 4 or higher."
4248 echo " If you believe this message is in error you may use the continue"
4249 echo " switch (-continue) to $0 to continue."
4254 QT_LFLAGS_MYSQL_R=""
4258 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
4259 QMakeVar add CONFIG use_libmysqlclient_r
4260 if [ "$CFG_SQL_mysql" = "auto" ]; then
4261 CFG_SQL_mysql=plugin
4263 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4264 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
4265 if [ "$CFG_SQL_mysql" = "auto" ]; then
4266 CFG_SQL_mysql=plugin
4269 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4270 echo "MySQL support cannot be enabled due to functionality tests!"
4271 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4272 echo " If you believe this message is in error you may use the continue"
4273 echo " switch (-continue) to $0 to continue."
4278 QT_LFLAGS_MYSQL_R=""
4286 if [ "$CFG_SQL_psql" != "no" ]; then
4287 # Be careful not to use native pg_config when cross building.
4288 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4289 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4290 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4292 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4293 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4294 # But, respect PSQL_LIBS if set
4295 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4296 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
4297 if [ "$CFG_SQL_psql" = "auto" ]; then
4301 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4302 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4303 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4304 echo " If you believe this message is in error you may use the continue"
4305 echo " switch (-continue) to $0 to continue."
4316 if [ "$CFG_SQL_odbc" != "no" ]; then
4317 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
4318 if [ "$CFG_SQL_odbc" = "auto" ]; then
4322 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
4323 QT_LFLAGS_ODBC="-liodbc"
4324 if [ "$CFG_SQL_odbc" = "auto" ]; then
4328 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4329 echo "ODBC support cannot be enabled due to functionality tests!"
4330 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4331 echo " If you believe this message is in error you may use the continue"
4332 echo " switch (-continue) to $0 to continue."
4342 if [ "$CFG_SQL_oci" != "no" ]; then
4343 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
4344 if [ "$CFG_SQL_oci" = "auto" ]; then
4348 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4349 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4350 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4351 echo " If you believe this message is in error you may use the continue"
4352 echo " switch (-continue) to $0 to continue."
4361 if [ "$CFG_SQL_tds" != "no" ]; then
4362 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4363 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4364 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
4365 if [ "$CFG_SQL_tds" = "auto" ]; then
4369 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4370 echo "TDS support cannot be enabled due to functionality tests!"
4371 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4372 echo " If you believe this message is in error you may use the continue"
4373 echo " switch (-continue) to $0 to continue."
4382 if [ "$CFG_SQL_db2" != "no" ]; then
4383 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
4384 if [ "$CFG_SQL_db2" = "auto" ]; then
4388 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4389 echo "ODBC support cannot be enabled due to functionality tests!"
4390 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4391 echo " If you believe this message is in error you may use the continue"
4392 echo " switch (-continue) to $0 to continue."
4401 if [ "$CFG_SQL_ibase" != "no" ]; then
4402 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
4403 if [ "$CFG_SQL_ibase" = "auto" ]; then
4404 CFG_SQL_ibase=plugin
4407 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4408 echo "InterBase support cannot be enabled due to functionality tests!"
4409 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4410 echo " If you believe this message is in error you may use the continue"
4411 echo " switch (-continue) to $0 to continue."
4420 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4421 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
4422 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4423 CFG_SQL_sqlite2=plugin
4426 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4427 echo "SQLite2 support cannot be enabled due to functionality tests!"
4428 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4429 echo " If you believe this message is in error you may use the continue"
4430 echo " switch (-continue) to $0 to continue."
4439 if [ "$CFG_SQL_sqlite" != "no" ]; then
4440 SQLITE_AUTODETECT_FAILED="no"
4441 if [ "$CFG_SQLITE" = "system" ]; then
4442 if [ -n "$PKG_CONFIG" ]; then
4443 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4444 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4446 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
4447 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4448 CFG_SQL_sqlite=plugin
4450 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4452 SQLITE_AUTODETECT_FAILED="yes"
4455 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4456 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4457 CFG_SQL_sqlite=plugin
4460 SQLITE_AUTODETECT_FAILED="yes"
4464 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4465 echo "SQLite support cannot be enabled due to functionality tests!"
4466 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4467 echo " If you believe this message is in error you may use the continue"
4468 echo " switch (-continue) to $0 to continue."
4474 if [ "$OPT_VERBOSE" = "yes" ]; then
4475 echo "unknown SQL driver: $_SQLDR"
4481 # auto-detect NIS support
4482 if [ "$CFG_NIS" != "no" ]; then
4483 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
4486 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4487 echo "NIS support cannot be enabled due to functionality tests!"
4488 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4489 echo " If you believe this message is in error you may use the continue"
4490 echo " switch (-continue) to $0 to continue."
4498 # auto-detect CUPS support
4499 if [ "$CFG_CUPS" != "no" ]; then
4500 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
4503 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4504 echo "Cups support cannot be enabled due to functionality tests!"
4505 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4506 echo " If you believe this message is in error you may use the continue"
4507 echo " switch (-continue) to $0 to continue."
4515 # auto-detect iconv(3) support
4516 if [ "$CFG_ICONV" != "no" ]; then
4517 if [ "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
4519 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
4521 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
4523 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
4526 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4527 echo "Iconv support cannot be enabled due to functionality tests!"
4528 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4529 echo " If you believe this message is in error you may use the continue"
4530 echo " switch (-continue) to $0 to continue."
4538 # auto-detect libdbus-1 support
4539 if [ "$CFG_DBUS" != "no" ]; then
4540 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4541 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4542 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4544 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
4545 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4546 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4547 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4549 if [ "$CFG_DBUS" = "auto" ]; then
4551 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4552 # CFG_DBUS is "yes" or "linked" here
4554 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4555 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4556 echo " If you believe this message is in error you may use the continue"
4557 echo " switch (-continue) to $0 to continue."
4564 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4566 # auto-detect Glib support
4567 if [ "$CFG_GLIB" != "no" ]; then
4568 if [ -n "$PKG_CONFIG" ]; then
4569 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4570 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4572 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
4574 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4575 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4577 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4578 echo "Glib support cannot be enabled due to functionality tests!"
4579 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4580 echo " If you believe this message is in error you may use the continue"
4581 echo " switch (-continue) to $0 to continue."
4590 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4591 if [ -n "$PKG_CONFIG" ]; then
4592 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4593 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4595 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
4597 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4598 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4600 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4601 echo "Gstreamer support cannot be enabled due to functionality tests!"
4602 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4603 echo " If you believe this message is in error you may use the continue"
4604 echo " switch (-continue) to $0 to continue."
4610 elif [ "$CFG_GLIB" = "no" ]; then
4614 # auto-detect libicu support
4615 if [ "$CFG_ICU" != "no" ]; then
4616 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4617 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4619 if [ "$CFG_ICU" = "auto" ]; then
4621 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4624 echo "The ICU library support cannot be enabled."
4625 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4626 echo " If you believe this message is in error you may use the continue"
4627 echo " switch (-continue) to $0 to continue."
4633 # Auto-detect PulseAudio support
4634 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4635 if [ -n "$PKG_CONFIG" ]; then
4636 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4637 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4639 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
4641 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4642 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4644 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4645 echo "PulseAudio support cannot be enabled due to functionality tests!"
4646 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4647 echo " If you believe this message is in error you may use the continue"
4648 echo " switch (-continue) to $0 to continue."
4658 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4659 x11tests="$relpath/config.tests/x11"
4662 # work around broken X11 headers when using GCC 2.95 or later
4664 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4665 if [ $NOTYPE = "yes" ]; then
4666 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4667 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4670 # Check we actually have X11 :-)
4671 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4672 if [ $? != "0" ]; then
4673 echo "Basic XLib functionality test failed!"
4674 echo " You might need to modify the include and library search paths by editing"
4675 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4681 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4682 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4683 if [ "$CFG_GUI" = "no" ]; then
4684 if [ "$CFG_OPENGL" = "auto" ]; then
4687 if [ "$CFG_OPENGL" != "no" ]; then
4688 echo "OpenGL enabled, but GUI disabled."
4689 echo " You might need to either enable the GUI or disable OpenGL"
4693 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4694 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
4696 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
4698 if [ "$CFG_EGL" = "no" ]; then
4702 if [ "$CFG_OPENGL" = "yes" ]; then
4703 echo "All the OpenGL functionality tests failed!"
4704 echo " You might need to modify the include and library search paths by editing"
4705 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4706 echo " ${XQMAKESPEC}."
4713 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4714 if [ "$CFG_OPENGL" = "desktop" ]; then
4715 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4716 if [ $? != "0" ]; then
4717 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4724 elif [ "$CFG_OPENGL" = "es2" ]; then
4726 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4727 if [ $? != "0" ]; then
4728 echo "The OpenGL ES 2.0 functionality test failed!"
4729 echo " You might need to modify the include and library search paths by editing"
4730 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4731 echo " ${XQMAKESPEC}."
4734 elif [ "$CFG_OPENGL" = "desktop" ]; then
4735 # Desktop OpenGL support
4736 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4737 if [ $? != "0" ]; then
4738 echo "The OpenGL functionality test failed!"
4739 echo " You might need to modify the include and library search paths by editing"
4740 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4741 echo " ${XQMAKESPEC}."
4746 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4747 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4748 if [ $? != "0" ]; then
4749 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4756 fi # X11/MINGW OpenGL
4759 if [ "$PLATFORM_X11" = "yes" ]; then
4760 # auto-detect Xcursor support
4761 if [ "$CFG_XCURSOR" != "no" ]; then
4762 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
4763 if [ "$CFG_XCURSOR" != "runtime" ]; then
4767 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4768 echo "Xcursor support cannot be enabled due to functionality tests!"
4769 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4770 echo " If you believe this message is in error you may use the continue"
4771 echo " switch (-continue) to $0 to continue."
4779 # auto-detect Xfixes support
4780 if [ "$CFG_XFIXES" != "no" ]; then
4781 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4782 if [ "$CFG_XFIXES" != "runtime" ]; then
4786 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4787 echo "Xfixes support cannot be enabled due to functionality tests!"
4788 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4789 echo " If you believe this message is in error you may use the continue"
4790 echo " switch (-continue) to $0 to continue."
4798 # auto-detect Xrandr support (resize and rotate extension)
4799 if [ "$CFG_XRANDR" != "no" ]; then
4800 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
4801 if [ "$CFG_XRANDR" != "runtime" ]; then
4805 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4806 echo "Xrandr support cannot be enabled due to functionality tests!"
4807 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4808 echo " If you believe this message is in error you may use the continue"
4809 echo " switch (-continue) to $0 to continue."
4817 # auto-detect Xrender support
4818 if [ "$CFG_XRENDER" != "no" ]; then
4819 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
4822 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4823 echo "Xrender support cannot be enabled due to functionality tests!"
4824 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4825 echo " If you believe this message is in error you may use the continue"
4826 echo " switch (-continue) to $0 to continue."
4834 # auto-detect MIT-SHM support
4835 if [ "$CFG_MITSHM" != "no" ]; then
4836 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
4839 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4840 echo "MITSHM support cannot be enabled due to functionality tests!"
4841 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4842 echo " If you believe this message is in error you may use the continue"
4843 echo " switch (-continue) to $0 to continue."
4851 # auto-detect FontConfig support
4852 if [ "$CFG_FONTCONFIG" != "no" ]; then
4853 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
4854 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
4855 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
4857 QT_CFLAGS_FONTCONFIG=
4858 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
4860 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
4862 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
4863 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
4864 CFG_LIBFREETYPE=system
4866 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4867 echo "FontConfig support cannot be enabled due to functionality tests!"
4868 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4869 echo " If you believe this message is in error you may use the continue"
4870 echo " switch (-continue) to $0 to continue."
4878 # auto-detect Session Management support
4879 if [ "$CFG_SM" = "auto" ]; then
4880 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
4883 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4884 echo "Session Management support cannot be enabled due to functionality tests!"
4885 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4886 echo " If you believe this message is in error you may use the continue"
4887 echo " switch (-continue) to $0 to continue."
4895 # auto-detect SHAPE support
4896 if [ "$CFG_XSHAPE" != "no" ]; then
4897 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
4900 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4901 echo "XShape support cannot be enabled due to functionality tests!"
4902 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4903 echo " If you believe this message is in error you may use the continue"
4904 echo " switch (-continue) to $0 to continue."
4912 # auto-detect XVideo support
4913 if [ "$CFG_XVIDEO" != "no" ]; then
4914 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
4917 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4918 echo "XVideo support cannot be enabled due to functionality tests!"
4919 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4920 echo " If you believe this message is in error you may use the continue"
4921 echo " switch (-continue) to $0 to continue."
4929 # auto-detect XSync support
4930 if [ "$CFG_XSYNC" != "no" ]; then
4931 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
4934 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4935 echo "XSync support cannot be enabled due to functionality tests!"
4936 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4937 echo " If you believe this message is in error you may use the continue"
4938 echo " switch (-continue) to $0 to continue."
4946 # auto-detect Xinerama support
4947 if [ "$CFG_XINERAMA" != "no" ]; then
4948 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
4949 if [ "$CFG_XINERAMA" != "runtime" ]; then
4953 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4954 echo "Xinerama support cannot be enabled due to functionality tests!"
4955 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4956 echo " If you believe this message is in error you may use the continue"
4957 echo " switch (-continue) to $0 to continue."
4965 # auto-detect Xinput support
4966 if [ "$CFG_XINPUT" != "no" ]; then
4967 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
4968 if [ "$CFG_XINPUT" != "runtime" ]; then
4972 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4973 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
4974 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4975 echo " If you believe this message is in error you may use the continue"
4976 echo " switch (-continue) to $0 to continue."
4984 # auto-detect XKB support
4985 if [ "$CFG_XKB" != "no" ]; then
4986 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
4989 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4990 echo "XKB support cannot be enabled due to functionality tests!"
4991 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4992 echo " If you believe this message is in error you may use the continue"
4993 echo " switch (-continue) to $0 to continue."
5001 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5002 if [ -n "$PKG_CONFIG" ]; then
5003 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5004 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5006 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5008 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5009 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5011 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5012 echo "Gtk theme support cannot be enabled due to functionality tests!"
5013 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5014 echo " If you believe this message is in error you may use the continue"
5015 echo " switch (-continue) to $0 to continue."
5021 elif [ "$CFG_GLIB" = "no" ]; then
5027 if [ "$BUILD_ON_MAC" = "yes" ]; then
5028 if [ "$CFG_PHONON" != "no" ]; then
5029 # Always enable Phonon (unless it was explicitly disabled)
5033 if [ "$CFG_COREWLAN" = "auto" ]; then
5034 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
5043 if [ "$PLATFORM_QPA" = "yes" ]; then
5044 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5045 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5046 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
5048 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
5051 if [ "$CFG_OPENGL" = "yes" ]; then
5052 echo "All the OpenGL functionality tests failed!"
5053 echo " You might need to modify the include and library search paths by editing"
5054 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5055 echo " ${XQMAKESPEC}."
5060 elif [ "$CFG_OPENGL" = "es2" ]; then
5062 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5063 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5064 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5065 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5066 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5067 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5068 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5069 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5072 "$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
5073 if [ $? != "0" ]; then
5074 echo "The OpenGL ES 2.0 functionality test failed!"
5075 echo " You might need to modify the include and library search paths by editing"
5076 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5077 echo " ${XQMAKESPEC}."
5080 elif [ "$CFG_OPENGL" = "desktop" ]; then
5081 # Desktop OpenGL support
5082 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5083 if [ $? != "0" ]; then
5084 echo "The OpenGL functionality test failed!"
5085 echo " You might need to modify the include and library search paths by editing"
5086 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5087 echo " ${XQMAKESPEC}."
5092 # auto-detect FontConfig support
5093 if [ "$CFG_FONTCONFIG" != "no" ]; then
5094 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5095 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5096 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5098 QT_CFLAGS_FONTCONFIG=
5099 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5101 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
5102 QT_CONFIG="$QT_CONFIG fontconfig"
5103 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5104 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5105 CFG_LIBFREETYPE=system
5110 # Save these for a check later
5111 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5112 ORIG_CFG_XCB="$CFG_XCB"
5114 if [ "$CFG_WAYLAND" != "no" ]; then
5115 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5116 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5117 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5118 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --cflags-only-I wayland-client 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5119 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --libs-only-L wayland-client 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5121 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
5123 QT_CONFIG="$QT_CONFIG wayland"
5124 elif [ "$CFG_WAYLAND" = "yes" ]; then
5125 echo "The Wayland functionality test failed!"
5129 QMakeVar add DEFINES QT_NO_WAYLAND
5133 if [ "$CFG_LIBUDEV" != "no" ]; then
5134 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5135 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5136 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5137 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5138 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5140 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
5142 QT_CONFIG="$QT_CONFIG libudev"
5143 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5144 echo "The libudev functionality test failed!"
5148 QMakeVar add DEFINES QT_NO_LIBUDEV
5152 if [ "$CFG_EVDEV" != "no" ]; then
5153 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5155 QT_CONFIG="$QT_CONFIG evdev"
5156 elif [ "$CFG_EVDEV" = "yes" ]; then
5157 echo "The evdev functionality test failed!"
5161 QMakeVar add DEFINES QT_NO_EVDEV
5165 # Check we actually have X11 :-)
5166 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
5167 QT_CONFIG="$QT_CONFIG xlib"
5170 # auto-detect Xrender support
5171 if [ "$CFG_XRENDER" != "no" ]; then
5172 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
5174 QT_CONFIG="$QT_CONFIG xrender"
5176 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5177 echo "Xrender support cannot be enabled due to functionality tests!"
5178 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5179 echo " If you believe this message is in error you may use the continue"
5180 echo " switch (-continue) to $0 to continue."
5188 if [ "$CFG_XCB" != "no" ]; then
5189 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then
5190 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5191 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5193 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
5195 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
5196 QT_CONFIG="$QT_CONFIG xcb-render"
5199 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
5201 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5204 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
5205 QT_CONFIG="$QT_CONFIG xcb-xlib"
5208 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5209 # auto-detect XInput2/Xinput support
5210 if [ "$CFG_XINPUT2" != "no" ]; then
5211 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
5215 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5216 echo "XInput2 support cannot be enabled due to functionality tests!"
5217 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5218 echo " If you believe this message is in error you may use the continue"
5219 echo " switch (-continue) to $0 to continue."
5228 if [ "$CFG_XCB" = "yes" ]; then
5229 echo "The XCB test failed!"
5230 echo " You might need to install dependency packages."
5231 echo " See src/plugins/platforms/xcb/README."
5235 QMakeVar add DEFINES QT_NO_XCB
5239 # Detect libxkbcommon
5240 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5241 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5242 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5243 if [ "$CFG_WAYLAND" = "yes" ]; then
5244 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5245 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5247 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5248 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5250 if [ "$CFG_WAYLAND" = "yes" ]; then
5251 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5253 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5256 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5257 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5258 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5259 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5260 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5261 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5262 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5265 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5266 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5267 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5268 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5271 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
5272 QT_CONFIG="$QT_CONFIG coreservices"
5274 QMakeVar add DEFINES QT_NO_CORESERVICES
5277 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5278 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5279 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5280 echo "No QPA platform plugin enabled!"
5281 echo " If you really want to build without a QPA platform plugin you must pass"
5282 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5283 echo " cannot run GUI applications."
5284 echo " The dependencies needed for xcb to build are listed in"
5285 echo " src/plugins/platforms/xcb/README"
5295 if [ "$PLATFORM_X11" = "yes" ]; then
5296 if [ "$CFG_EGL" != "no" ]; then
5297 # detect EGL support
5298 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
5299 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5304 if [ "$EGL_VARIANT" = "none" ]; then
5305 if [ "$CFG_EGL" = "yes" ]; then
5306 echo "The EGL functionality test failed!"
5307 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5308 echo " You might need to modify the include and library search paths by editing"
5309 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5310 echo " ${XQMAKESPEC}."
5314 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5315 if [ "$CFG_OPENGL" = "es2" ]; then
5322 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5325 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5326 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5327 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
5328 CFG_LIBFREETYPE=system
5335 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5339 if [ "$CFG_STL" != "no" ]; then
5340 if [ "$HAVE_STL" = "yes" ]; then
5343 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5344 echo "STL support cannot be enabled due to functionality tests!"
5345 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5346 echo " If you believe this message is in error you may use the continue"
5347 echo " switch (-continue) to $0 to continue."
5355 # detect POSIX clock_gettime()
5356 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5357 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
5358 CFG_CLOCK_GETTIME=yes
5360 CFG_CLOCK_GETTIME=no
5364 # detect POSIX monotonic clocks
5365 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5366 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
5367 CFG_CLOCK_MONOTONIC=yes
5369 CFG_CLOCK_MONOTONIC=no
5371 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5372 CFG_CLOCK_MONOTONIC=no
5376 if [ "$CFG_MREMAP" = "auto" ]; then
5377 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5384 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5385 if [ "$CFG_GETADDRINFO" != "no" ]; then
5386 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5389 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5390 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5391 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5392 echo " If you believe this message is in error you may use the continue"
5393 echo " switch (-continue) to $0 to continue."
5401 # find if the platform provides inotify
5402 if [ "$CFG_INOTIFY" != "no" ]; then
5403 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5406 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5407 echo "inotify support cannot be enabled due to functionality tests!"
5408 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5409 echo " If you believe this message is in error you may use the continue"
5410 echo " switch (-continue) to $0 to continue."
5418 # find if the platform provides if_nametoindex (ipv6 interface name support)
5419 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5420 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
5423 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5424 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5425 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5426 echo " If you believe this message is in error you may use the continue"
5427 echo " switch (-continue) to $0 to continue."
5435 # find if the platform provides getifaddrs (network interface enumeration)
5436 if [ "$CFG_GETIFADDRS" != "no" ]; then
5437 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5440 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5441 echo "getifaddrs support cannot be enabled due to functionality tests!"
5442 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5443 echo " If you believe this message is in error you may use the continue"
5444 echo " switch (-continue) to $0 to continue."
5453 if [ "$CFG_OPENSSL" != "no" ]; then
5454 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
5455 if [ "$CFG_OPENSSL" = "auto" ]; then
5459 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5460 echo "OpenSSL support cannot be enabled due to functionality tests!"
5461 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5462 echo " If you believe this message is in error you may use the continue"
5463 echo " switch (-continue) to $0 to continue."
5472 if [ "$CFG_PCRE" != "qt" ]; then
5473 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5476 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5477 echo "PCRE support cannot be enabled due to functionality tests!"
5478 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5479 echo " If you believe this message is in error you may use the continue"
5480 echo " switch (-continue) to $0 to continue."
5488 # detect OpenVG support
5489 if [ "$CFG_OPENVG" != "no" ]; then
5490 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
5491 if [ "$CFG_OPENVG" = "auto" ]; then
5494 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
5495 if [ "$CFG_OPENVG" = "auto" ]; then
5498 CFG_OPENVG_ON_OPENGL=yes
5499 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
5500 if [ "$CFG_OPENVG" = "auto" ]; then
5503 CFG_OPENVG_LC_INCLUDES=yes
5504 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
5505 if [ "$CFG_OPENVG" = "auto" ]; then
5508 CFG_OPENVG_LC_INCLUDES=yes
5509 CFG_OPENVG_ON_OPENGL=yes
5511 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5512 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5513 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5514 echo " If you believe this message is in error you may use the continue"
5515 echo " switch (-continue) to $0 to continue."
5521 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
5522 CFG_OPENVG_SHIVA=yes
5526 if [ "$CFG_ALSA" = "auto" ]; then
5527 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5534 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5535 if [ "$CFG_ARCH" = "arm" ]; then
5536 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5537 if [ $? != "0" ]; then
5538 CFG_JAVASCRIPTCORE_JIT=no
5541 case "$XPLATFORM" in
5543 CFG_JAVASCRIPTCORE_JIT=no
5549 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5550 QMakeVar set JAVASCRIPTCORE_JIT yes
5551 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5552 QMakeVar set JAVASCRIPTCORE_JIT no
5555 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5556 CFG_AUDIO_BACKEND=yes
5559 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5560 echo "Warning: largefile support cannot be disabled for win32."
5564 #-------------------------------------------------------------------------------
5565 # ask for all that hasn't been auto-detected or specified in the arguments
5566 #-------------------------------------------------------------------------------
5568 # enable dwarf2 support on Mac
5569 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5570 QT_CONFIG="$QT_CONFIG dwarf2"
5573 # Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
5574 if [ "$BUILD_ON_MAC" = "yes" ]; then
5575 DEFAULT_ARCH="$CFG_MAC_ARCHS"
5576 if [ -z "$DEFAULT_ARCH" ]; then
5577 case `file "${outpath}/bin/qmake"` in
5585 # unsupported/unknown
5589 if [ -n "$DEFAULT_ARCH" ]; then
5590 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5591 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5592 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5593 # Make the application arch follow the Qt arch for single arch builds.
5594 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
5595 [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5600 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5601 QT_CONFIG="$QT_CONFIG phonon-backend"
5604 # disable accessibility
5605 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5606 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5608 QT_CONFIG="$QT_CONFIG accessibility"
5611 # egl stuff does not belong in lighthouse, but rather in plugins
5612 if [ "$PLATFORM_QPA" = "yes" ]; then
5617 if [ "$CFG_EGL" = "no" ]; then
5618 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5620 QT_CONFIG="$QT_CONFIG egl"
5621 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5622 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5627 if [ "$CFG_OPENVG" = "no" ]; then
5628 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5630 QT_CONFIG="$QT_CONFIG openvg"
5631 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5632 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5634 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5635 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5637 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5638 QT_CONFIG="$QT_CONFIG shivavg"
5639 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5644 if [ "$CFG_OPENGL" = "no" ]; then
5645 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5647 QT_CONFIG="$QT_CONFIG opengl"
5650 if [ "$CFG_OPENGL" = "es2" ]; then
5651 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5654 if [ "$CFG_OPENGL" = "es2" ]; then
5655 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5656 QT_CONFIG="$QT_CONFIG opengles2"
5659 # safe execution environment
5660 if [ "$CFG_SXE" != "no" ]; then
5661 QT_CONFIG="$QT_CONFIG sxe"
5664 # build up the variables for output
5665 if [ "$CFG_DEBUG" = "yes" ]; then
5666 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5667 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5668 elif [ "$CFG_DEBUG" = "no" ]; then
5669 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5670 QMAKE_CONFIG="$QMAKE_CONFIG release"
5672 if [ "$CFG_SHARED" = "yes" ]; then
5673 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5674 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5675 elif [ "$CFG_SHARED" = "no" ]; then
5676 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5677 QMAKE_CONFIG="$QMAKE_CONFIG static"
5679 if [ "$PLATFORM_QPA" = "yes" ]; then
5680 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5681 QT_CONFIG="$QT_CONFIG qpa"
5682 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5683 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5686 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5687 # Do not set this here for Windows. Let qmake do it so
5688 # debug and release precompiled headers are kept separate.
5689 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5691 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5692 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5693 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5694 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5695 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5696 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5698 if [ "$CFG_STL" = "no" ]; then
5699 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5701 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5703 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5704 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5706 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5707 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5708 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5709 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5710 QMakeVar add QMAKE_CFLAGS -g
5711 QMakeVar add QMAKE_CXXFLAGS -g
5712 QT_CONFIG="$QT_CONFIG separate_debug_info"
5714 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5715 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5717 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5718 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5719 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5720 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5721 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5722 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5723 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5724 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5725 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5726 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5727 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5728 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5729 QT_CONFIG="$QT_CONFIG clock-gettime"
5731 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5732 QT_CONFIG="$QT_CONFIG clock-monotonic"
5734 if [ "$CFG_MREMAP" = "yes" ]; then
5735 QT_CONFIG="$QT_CONFIG mremap"
5737 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5738 QT_CONFIG="$QT_CONFIG getaddrinfo"
5740 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5741 QT_CONFIG="$QT_CONFIG ipv6ifname"
5743 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5744 QT_CONFIG="$QT_CONFIG getifaddrs"
5746 if [ "$CFG_INOTIFY" = "yes" ]; then
5747 QT_CONFIG="$QT_CONFIG inotify"
5749 if [ "$CFG_LIBJPEG" = "no" ]; then
5751 elif [ "$CFG_LIBJPEG" = "system" ]; then
5752 QT_CONFIG="$QT_CONFIG system-jpeg"
5754 if [ "$CFG_JPEG" = "no" ]; then
5755 QT_CONFIG="$QT_CONFIG no-jpeg"
5756 elif [ "$CFG_JPEG" = "yes" ]; then
5757 QT_CONFIG="$QT_CONFIG jpeg"
5759 if [ "$CFG_LIBPNG" = "no" ]; then
5762 if [ "$CFG_LIBPNG" = "system" ]; then
5763 QT_CONFIG="$QT_CONFIG system-png"
5765 if [ "$CFG_PNG" = "no" ]; then
5766 QT_CONFIG="$QT_CONFIG no-png"
5767 elif [ "$CFG_PNG" = "yes" ]; then
5768 QT_CONFIG="$QT_CONFIG png"
5770 if [ "$CFG_GIF" = "no" ]; then
5771 QT_CONFIG="$QT_CONFIG no-gif"
5772 elif [ "$CFG_GIF" = "yes" ]; then
5773 QT_CONFIG="$QT_CONFIG gif"
5775 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5776 QT_CONFIG="$QT_CONFIG no-freetype"
5777 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5778 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5779 QT_CONFIG="$QT_CONFIG system-freetype"
5781 QT_CONFIG="$QT_CONFIG freetype"
5783 if [ "$CFG_GUI" = "auto" ]; then
5786 if [ "$CFG_GUI" = "no" ]; then
5787 QT_CONFIG="$QT_CONFIG no-gui"
5791 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5792 #On Mac we implicitly link against libz, so we
5793 #never use the 3rdparty stuff.
5794 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5796 if [ "$CFG_ZLIB" = "yes" ]; then
5797 QT_CONFIG="$QT_CONFIG zlib"
5798 elif [ "$CFG_ZLIB" = "system" ]; then
5799 QT_CONFIG="$QT_CONFIG system-zlib"
5802 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5803 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5804 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5805 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5806 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5807 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5808 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5809 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5810 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5811 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
5812 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5813 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5814 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5815 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5816 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5818 if [ "$PLATFORM_X11" = "yes" ]; then
5819 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5821 # for some reason, the following libraries are not always built shared,
5822 # so *every* program/lib (including Qt) has to link against them
5823 if [ "$CFG_XSHAPE" = "yes" ]; then
5824 QT_CONFIG="$QT_CONFIG xshape"
5826 if [ "$CFG_XVIDEO" = "yes" ]; then
5827 QT_CONFIG="$QT_CONFIG xvideo"
5829 if [ "$CFG_XSYNC" = "yes" ]; then
5830 QT_CONFIG="$QT_CONFIG xsync"
5832 if [ "$CFG_XINERAMA" = "yes" ]; then
5833 QT_CONFIG="$QT_CONFIG xinerama"
5834 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
5836 if [ "$CFG_XCURSOR" = "yes" ]; then
5837 QT_CONFIG="$QT_CONFIG xcursor"
5838 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
5840 if [ "$CFG_XFIXES" = "yes" ]; then
5841 QT_CONFIG="$QT_CONFIG xfixes"
5842 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
5844 if [ "$CFG_XRANDR" = "yes" ]; then
5845 QT_CONFIG="$QT_CONFIG xrandr"
5846 if [ "$CFG_XRENDER" != "yes" ]; then
5847 # libXrandr uses 1 function from libXrender, so we always have to have it :/
5848 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
5850 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
5853 if [ "$CFG_XRENDER" = "yes" ]; then
5854 QT_CONFIG="$QT_CONFIG xrender"
5855 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
5857 if [ "$CFG_MITSHM" = "yes" ]; then
5858 QT_CONFIG="$QT_CONFIG mitshm"
5860 if [ "$CFG_FONTCONFIG" = "yes" ]; then
5861 QT_CONFIG="$QT_CONFIG fontconfig"
5863 if [ "$CFG_XINPUT" = "yes" ]; then
5864 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
5866 if [ "$CFG_XINPUT" = "yes" ]; then
5867 QT_CONFIG="$QT_CONFIG xinput tablet"
5869 if [ "$CFG_XKB" = "yes" ]; then
5870 QT_CONFIG="$QT_CONFIG xkb"
5874 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
5875 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
5876 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
5878 if [ "$PLATFORM_MAC" = "yes" ]; then
5879 if [ "$CFG_RPATH" = "yes" ]; then
5880 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
5882 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
5883 if [ -n "$RPATH_FLAGS" ]; then
5885 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
5889 elif [ "$CFG_RPATH" = "yes" ]; then
5890 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
5894 if [ "$CFG_RPATH" = "yes" ]; then
5895 # set the default rpath to the library installation directory
5896 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
5898 if [ -n "$RPATH_FLAGS" ]; then
5899 # add the user defined rpaths
5900 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
5904 if [ '!' -z "$I_FLAGS" ]; then
5905 # add the user define include paths
5906 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
5907 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
5910 if [ '!' -z "$W_FLAGS" ]; then
5911 # add the user defined warning flags
5912 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
5913 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
5914 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
5917 # turn off exceptions for the compilers that support it
5918 if [ "$XPLATFORM" != "$PLATFORM" ]; then
5919 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
5921 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
5924 if [ "$CFG_EXCEPTIONS" != "no" ]; then
5925 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
5928 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5929 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
5930 # Follow default behavior of configure.exe by overriding with "rtti".
5931 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
5934 if [ "$CFG_ALSA" = "yes" ]; then
5935 QT_CONFIG="$QT_CONFIG alsa"
5938 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
5939 QT_CONFIG="$QT_CONFIG pulseaudio"
5942 if [ "$CFG_COREWLAN" = "yes" ]; then
5943 QT_CONFIG="$QT_CONFIG corewlan"
5946 if [ "$CFG_ICU" = "yes" ]; then
5947 QT_CONFIG="$QT_CONFIG icu"
5950 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
5951 QT_CONFIG="$QT_CONFIG force_asserts"
5954 if [ "$CFG_PCRE" = "qt" ]; then
5955 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
5959 # Some Qt modules are too advanced in C++ for some old compilers
5960 # Detect here the platforms where they are known to work.
5962 # See Qt documentation for more information on which features are
5963 # supported and on which compilers.
5965 canBuildQtConcurrent="yes"
5966 canUseV8Snapshot="yes"
5968 case "$XPLATFORM" in
5970 # PA-RISC's assembly is too limited
5971 # gcc 3.4 on that platform can't build QtXmlPatterns
5972 # the assembly it generates cannot be compiled
5974 # Check gcc's version
5975 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
5979 canBuildQtXmlPatterns="no"
5983 canBuildQtXmlPatterns="no"
5987 unsupported/vxworks-*-g++*)
5990 unsupported/vxworks-*-dcc*)
5992 canBuildQtXmlPatterns="no"
5995 # Check gcc's version
5996 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6004 canBuildQtXmlPatterns="no"
6009 # Check the compiler version
6010 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6013 canBuildQtXmlPatterns="no"
6014 canBuildQtConcurrent="no"
6018 canBuildQtConcurrent="no"
6024 canBuildQtXmlPatterns="no"
6025 canBuildQtConcurrent="no"
6031 # Get the xlC version
6032 cat > xlcver.c <<EOF
6036 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6041 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6042 xlcver=`./xlcver 2>/dev/null`
6045 if [ "$OPT_VERBOSE" = "yes" ]; then
6046 if [ -n "$xlcver" ]; then
6047 echo Found IBM xlC version: $xlcver.
6049 echo Could not determine IBM xlC version, assuming oldest supported.
6056 canBuildQtXmlPatterns="no"
6057 canBuildQtConcurrent="no"
6061 canBuildQtConcurrent="no"
6067 canBuildQtConcurrent="no"
6071 if [ "$CFG_GUI" = "no" ]; then
6072 # WebKit requires QtGui
6076 if [ "$CFG_SHARED" = "no" ]; then
6078 echo "WARNING: Using static linking will disable the WebKit module."
6083 CFG_CONCURRENT="yes"
6084 if [ "$canBuildQtConcurrent" = "no" ]; then
6085 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6088 QT_CONFIG="$QT_CONFIG concurrent"
6092 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6093 QT_CONFIG="$QT_CONFIG audio-backend"
6097 if [ "$CFG_WEBKIT" = "debug" ]; then
6098 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6102 QT_CONFIG="$QT_CONFIG v8"
6103 # Detect snapshot support
6104 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6105 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6108 *) canUseV8Snapshot="no"
6112 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6113 # QEMU crashes when building inside Scratchbox with an ARM target
6114 canUseV8Snapshot="no"
6117 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6118 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6120 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6121 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6124 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6125 QT_CONFIG="$QT_CONFIG v8snapshot"
6129 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6130 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6133 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6136 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6137 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6138 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6143 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6144 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6145 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6152 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6158 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6160 case "$COMPILER_VERSION" in
6162 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6163 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6164 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6167 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6168 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6169 QT_GCC_PATCH_VERSION=0
6179 #-------------------------------------------------------------------------------
6180 # part of configuration information goes into qconfig.h
6181 #-------------------------------------------------------------------------------
6183 case "$CFG_QCONFIG" in
6185 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6188 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6189 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6190 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6191 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6192 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6193 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6195 echo "#endif" >>"$tmpconfig"
6199 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6203 # define QT_EDITION $QT_EDITION
6207 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6208 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6209 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6210 /* Machine Architecture */
6211 #ifndef QT_BOOTSTRAPPED
6212 # define QT_ARCH_${CFG_ARCH_STR}
6214 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6218 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6219 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6221 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6222 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6225 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6226 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6229 if [ "$BUILD_ON_MAC" = "yes" ]; then
6230 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6231 #if defined(__LP64__)
6232 # define QT_POINTER_SIZE 8
6234 # define QT_POINTER_SIZE 4
6238 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6239 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6242 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6243 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6244 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6248 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6250 if [ "$CFG_DEV" = "yes" ]; then
6251 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6254 if [ "$PLATFORM_QPA" = "yes" ]; then
6255 # Add QPA to config.h
6256 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6259 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6260 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6263 # Add turned on SQL drivers
6264 for DRIVER in $CFG_SQL_AVAILABLE; do
6265 eval "VAL=\$CFG_SQL_$DRIVER"
6268 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6269 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6270 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6273 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6279 QMakeVar set sql-drivers "$SQL_DRIVERS"
6280 QMakeVar set sql-plugins "$SQL_PLUGINS"
6282 # Add other configuration options to the qconfig.h file
6283 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6284 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6285 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6286 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6287 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6288 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6289 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6291 # X11/Unix/Mac only configs
6292 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6293 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6294 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6295 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6296 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6297 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6298 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6299 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6300 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6301 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6302 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6303 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6304 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6305 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6306 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6308 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6309 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6310 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6311 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6312 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6313 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6314 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6315 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6316 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6317 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6318 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6319 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6320 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6322 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6323 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6324 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6325 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6326 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6327 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6328 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6329 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6331 # sort QCONFIG_FLAGS for neatness if we can
6332 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6333 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6335 if [ -n "$QCONFIG_FLAGS" ]; then
6336 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6337 #ifndef QT_BOOTSTRAPPED
6340 for cfg in $QCONFIG_FLAGS; do
6341 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6342 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6343 # figure out define logic, so we can output the correct
6344 # ifdefs to override the global defines in a project
6346 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6347 # QT_NO_option can be forcefully turned on by QT_option
6348 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6349 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6350 # QT_option can be forcefully turned off by QT_NO_option
6351 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6354 if [ -z $cfgdNeg ]; then
6355 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6362 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6363 #if defined($cfgd) && defined($cfgdNeg)
6365 #elif !defined($cfgd) && !defined($cfgdNeg)
6372 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6373 #endif // QT_BOOTSTRAPPED
6378 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6379 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6380 #define QT_VISIBILITY_AVAILABLE
6385 if [ -n "$QT_LIBINFIX" ]; then
6386 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6387 #define QT_LIBINFIX "$QT_LIBINFIX"
6392 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6393 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6394 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6396 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6397 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6398 chmod -w "$outpath/src/corelib/global/qconfig.h"
6399 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6400 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6404 #-------------------------------------------------------------------------------
6405 # save configuration into qconfig.pri
6406 #-------------------------------------------------------------------------------
6407 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6408 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6409 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6410 if [ "$CFG_DEBUG" = "yes" ]; then
6411 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6412 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6413 QT_CONFIG="$QT_CONFIG release"
6415 QT_CONFIG="$QT_CONFIG debug"
6416 elif [ "$CFG_DEBUG" = "no" ]; then
6417 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6418 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6419 QT_CONFIG="$QT_CONFIG debug"
6421 QT_CONFIG="$QT_CONFIG release"
6423 if [ "$CFG_STL" = "yes" ]; then
6424 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6426 if [ "$CFG_FRAMEWORK" = "no" ]; then
6427 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6429 QT_CONFIG="$QT_CONFIG qt_framework"
6430 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6432 if [ "$CFG_DEV" = "yes" ]; then
6433 QT_CONFIG="$QT_CONFIG private_tests"
6436 cat >>"$QTCONFIG.tmp" <<EOF
6438 CONFIG += $QTCONFIG_CONFIG
6440 QT_EDITION = $Edition
6441 QT_CONFIG += $QT_CONFIG
6444 QT_VERSION = $QT_VERSION
6445 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6446 QT_MINOR_VERSION = $QT_MINOR_VERSION
6447 QT_PATCH_VERSION = $QT_PATCH_VERSION
6450 QT_LIBINFIX = $QT_LIBINFIX
6451 QT_NAMESPACE = $QT_NAMESPACE
6454 if [ -n "$CFG_SYSROOT" ]; then
6455 echo "# sysroot" >>"$QTCONFIG.tmp"
6456 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6457 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6458 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6459 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6460 echo "}" >> "$QTCONFIG.tmp"
6461 echo >> "$QTCONFIG.tmp"
6463 if [ "$CFG_RPATH" = "yes" ]; then
6464 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6466 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6467 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6468 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6469 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6472 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6473 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6474 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6477 # replace qconfig.pri if it differs from the newly created temp file
6478 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6479 rm -f "$QTCONFIG.tmp"
6481 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6484 #-------------------------------------------------------------------------------
6485 # save configuration into qmodule.pri
6486 #-------------------------------------------------------------------------------
6487 QTMODULE="$outpath/mkspecs/qmodule.pri"
6489 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6491 # Ensure we can link to uninistalled libraries
6492 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6493 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6495 if [ -n "$QT_CFLAGS_PSQL" ]; then
6496 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6498 if [ -n "$QT_LFLAGS_PSQL" ]; then
6499 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6501 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6502 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6504 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6505 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6507 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6508 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6510 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6511 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6513 if [ -n "$QT_LFLAGS_ODBC" ]; then
6514 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6516 if [ -n "$QT_LFLAGS_TDS" ]; then
6517 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6520 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6521 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6524 #dump in the OPENSSL_LIBS info
6525 if [ '!' -z "$OPENSSL_LIBS" ]; then
6526 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6527 elif [ "$CFG_OPENSSL" = "linked" ]; then
6528 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6531 #dump in the SDK info
6532 if [ '!' -z "$CFG_SDK" ]; then
6533 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6537 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6538 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6540 # replace qmodule.pri if it differs from the newly created temp file
6541 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6542 rm -f "$QTMODULE.tmp"
6544 mv -f "$QTMODULE.tmp" "$QTMODULE"
6547 #-------------------------------------------------------------------------------
6548 # save configuration into .qmake.cache
6549 #-------------------------------------------------------------------------------
6551 CACHEFILE="$outpath/.qmake.cache"
6552 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6553 cat >>"$CACHEFILE.tmp" <<EOF
6555 QT_SOURCE_TREE = \$\$quote($relpath)
6556 QT_BUILD_TREE = \$\$quote($outpath)
6557 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6559 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6560 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6561 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6563 include(\$\$PWD/mkspecs/qmodule.pri)
6564 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6568 #dump the qmake spec
6569 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6570 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6572 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6575 # replace .qmake.cache if it differs from the newly created temp file
6576 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6577 rm -f "$CACHEFILE.tmp"
6579 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6582 #-------------------------------------------------------------------------------
6583 # give feedback on configuration
6584 #-------------------------------------------------------------------------------
6588 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6591 This target is using the GNU C++ compiler ($PLATFORM).
6593 Recent versions of this compiler automatically include code for
6594 exceptions, which increase both the size of the Qt libraries and
6595 the amount of memory taken by your applications.
6597 You may choose to re-run `basename $0` with the -no-exceptions
6598 option to compile Qt without exceptions. This is completely binary
6599 compatible, and existing applications will continue to work.
6607 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6610 This target is using the MIPSpro C++ compiler ($PLATFORM).
6612 You may choose to re-run `basename $0` with the -no-exceptions
6613 option to compile Qt without exceptions. This will make the
6614 size of the Qt library smaller and reduce the amount of memory
6615 taken by your applications.
6627 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6628 echo "Build type: $PLATFORM"
6630 echo "Building on: $PLATFORM"
6631 echo "Building for: $XPLATFORM"
6634 if [ ! -z "$CFG_MAC_ARCHS" ]; then
6635 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
6637 echo "Architecture: $CFG_ARCH"
6640 if [ "$PLATFORM_QPA" = "yes" ]; then
6641 echo "Host architecture: $CFG_HOST_ARCH"
6644 if [ -n "$PLATFORM_NOTES" ]; then
6645 echo "Platform notes:"
6646 echo "$PLATFORM_NOTES"
6651 if [ "$OPT_VERBOSE" = "yes" ]; then
6652 echo $ECHO_N "qmake vars .......... $ECHO_C"
6653 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6654 echo "qmake switches ......... $QMAKE_SWITCHES"
6657 echo "Build .................. $CFG_BUILD_PARTS"
6658 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6659 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6660 echo "Debug .................. yes (combined)"
6661 if [ "$CFG_DEBUG" = "yes" ]; then
6662 echo "Default Link ........... debug"
6664 echo "Default Link ........... release"
6667 echo "Debug .................. $CFG_DEBUG"
6669 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6670 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6671 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6672 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6673 echo "QtGui module ........... $CFG_GUI"
6674 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6675 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6677 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6679 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6680 echo "STL support ............ $CFG_STL"
6681 echo "PCH support ............ $CFG_PRECOMPILE"
6682 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6683 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6684 echo "AVX..................... ${CFG_AVX}"
6685 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
6686 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6687 echo "NEON support ........... ${CFG_NEON}"
6689 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6690 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6691 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6692 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6693 echo "NIS support ............ $CFG_NIS"
6694 echo "CUPS support ........... $CFG_CUPS"
6695 echo "Iconv support .......... $CFG_ICONV"
6696 echo "Glib support ........... $CFG_GLIB"
6697 echo "GStreamer support ...... $CFG_GSTREAMER"
6698 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6699 echo "Large File support ..... $CFG_LARGEFILE"
6700 echo "GIF support ............ $CFG_GIF"
6701 if [ "$CFG_JPEG" = "no" ]; then
6702 echo "JPEG support ........... $CFG_JPEG"
6704 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6706 if [ "$CFG_PNG" = "no" ]; then
6707 echo "PNG support ............ $CFG_PNG"
6709 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6711 echo "zlib support ........... $CFG_ZLIB"
6712 echo "Session management ..... $CFG_SM"
6713 echo "libudev support ........ $CFG_LIBUDEV"
6715 if [ "$CFG_OPENGL" = "desktop" ]; then
6716 echo "OpenGL support ......... yes (Desktop OpenGL)"
6717 elif [ "$CFG_OPENGL" = "es2" ]; then
6718 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6720 echo "OpenGL support ......... no"
6722 if [ "$CFG_EGL" != "no" ]; then
6723 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6724 echo "EGL support ............ yes <GLES/egl.h>"
6726 echo "EGL support ............ yes <EGL/egl.h>"
6729 if [ "$CFG_OPENVG" ]; then
6730 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6731 echo "OpenVG support ......... ShivaVG"
6733 echo "OpenVG support ......... $CFG_OPENVG"
6736 if [ "$PLATFORM_X11" = "yes" ]; then
6737 echo "NAS sound support ...... $CFG_NAS"
6738 echo "XShape support ......... $CFG_XSHAPE"
6739 echo "XVideo support ......... $CFG_XVIDEO"
6740 echo "XSync support .......... $CFG_XSYNC"
6741 echo "Xinerama support ....... $CFG_XINERAMA"
6742 echo "Xcursor support ........ $CFG_XCURSOR"
6743 echo "Xfixes support ......... $CFG_XFIXES"
6744 echo "Xrandr support ......... $CFG_XRANDR"
6745 echo "Xi support ............. $CFG_XINPUT"
6746 echo "MIT-SHM support ........ $CFG_MITSHM"
6747 echo "FontConfig support ..... $CFG_FONTCONFIG"
6748 echo "XKB Support ............ $CFG_XKB"
6749 echo "immodule support ....... $CFG_IM"
6750 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6752 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6753 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6754 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6755 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6756 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6757 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6758 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6759 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6760 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6763 if [ "$CFG_OPENSSL" = "yes" ]; then
6764 OPENSSL_LINKAGE="(run-time)"
6765 elif [ "$CFG_OPENSSL" = "linked" ]; then
6766 OPENSSL_LINKAGE="(linked)"
6768 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6769 echo "Alsa support ........... $CFG_ALSA"
6770 if [ "$BUILD_ON_MAC" = "yes" ]; then
6771 echo "CoreWlan support ....... $CFG_COREWLAN"
6773 echo "libICU support ......... $CFG_ICU"
6774 echo "PCRE support ........... $CFG_PCRE"
6775 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6776 echo "Xcb support ............ limited (old version)"
6778 echo "Xcb support ............ $CFG_XCB"
6780 echo "Xrender support ........ $CFG_XRENDER"
6781 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6782 echo "XInput2 support ........ $CFG_XINPUT2"
6786 # complain about not being able to use dynamic plugins if we are using a static build
6787 if [ "$CFG_SHARED" = "no" ]; then
6789 echo "WARNING: Using static linking will disable the use of dynamically"
6790 echo "loaded plugins. Make sure to import all needed static plugins,"
6791 echo "or compile needed modules into the library."
6794 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6796 echo "NOTE: When linking against OpenSSL, you can override the default"
6797 echo "library names through OPENSSL_LIBS."
6799 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6802 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6804 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6805 echo "if you want a pure debug build."
6810 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6815 #-------------------------------------------------------------------------------
6816 # build makefiles based on the configuration
6817 #-------------------------------------------------------------------------------
6819 echo "Finding project files. Please wait..."
6820 if [ "$CFG_NOPROCESS" != "yes" ]; then
6821 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
6822 if [ -f "${relpath}/qtbase.pro" ]; then
6823 mkfile="${outpath}/Makefile"
6824 [ -f "$mkfile" ] && chmod +w "$mkfile"
6825 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
6829 # .projects -> projects to process
6830 # .projects.1 -> qt and moc
6831 # .projects.2 -> subdirs and libs
6832 # .projects.3 -> the rest
6833 rm -f .projects .projects.1 .projects.2 .projects.3
6835 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
6836 if [ -z "$AWK" ]; then
6837 for p in `echo $QMAKE_PROJECTS`; do
6838 echo "$p" >> .projects
6841 cat >projects.awk <<EOF
6847 first = "./.projects.1.tmp"
6848 second = "./.projects.2.tmp"
6849 third = "./.projects.3.tmp"
6854 if ( ! target_file )
6856 print input_file >target_file
6861 input_file = FILENAME
6866 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
6869 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
6870 target_file = second
6875 matched_target == 0 && /^(TEMPLATE.*=)/ {
6876 if ( \$3 == "subdirs" )
6877 target_file = second
6878 else if ( \$3 == "lib" )
6884 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
6885 if ( \$0 ~ /plugin/ )
6888 target_file = second
6893 if ( ! target_file )
6895 print input_file >>target_file
6902 for p in `echo $QMAKE_PROJECTS`; do
6903 echo "$p" >> .projects.all
6906 # if you get errors about the length of the command line to awk, change the -l arg
6908 split -l 100 .projects.all .projects.all.
6909 for p in .projects.all.*; do
6910 "$AWK" -f projects.awk `cat $p`
6911 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
6912 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
6913 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
6914 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
6916 rm -f .projects.all* projects.awk
6918 [ -f .projects.1 ] && cat .projects.1 >>.projects
6919 [ -f .projects.2 ] && cat .projects.2 >>.projects
6920 rm -f .projects.1 .projects.2
6921 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
6922 cat .projects.3 >>.projects
6926 # don't sort Qt and MOC in with the other project files
6927 # also work around a segfaulting uniq(1)
6928 if [ -f .sorted.projects.2 ]; then
6929 sort .sorted.projects.2 > .sorted.projects.2.new
6930 mv -f .sorted.projects.2.new .sorted.projects.2
6931 cat .sorted.projects.2 >> .sorted.projects.1
6933 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
6934 rm -f .sorted.projects.2 .sorted.projects.1
6938 if [ -f .projects ]; then
6939 uniq .projects >.tmp
6940 mv -f .tmp .projects
6941 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
6943 if [ -f .projects.3 ]; then
6944 uniq .projects.3 >.tmp
6945 mv -f .tmp .projects.3
6946 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
6948 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
6952 for part in $CFG_BUILD_PARTS; do
6954 tools) PART_ROOTS="$PART_ROOTS tools" ;;
6955 libs) PART_ROOTS="$PART_ROOTS src" ;;
6956 translations) PART_ROOTS="$PART_ROOTS translations" ;;
6957 examples) PART_ROOTS="$PART_ROOTS examples" ;;
6962 if [ "$CFG_DEV" = "yes" ]; then
6963 PART_ROOTS="$PART_ROOTS tests"
6966 echo "Creating makefiles. Please wait..."
6967 for file in .projects .projects.3; do
6968 [ '!' -f "$file" ] && continue
6969 for a in `cat $file`; do
6971 for r in $PART_ROOTS; do
6972 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
6977 [ "$IN_ROOT" = "no" ] && continue
6980 *winmain/winmain.pro)
6981 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
6985 */qmake/qmake.pro) continue ;;
6986 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
6987 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
6993 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
6994 test -d "$dir" || mkdir -p "$dir"
6995 OUTDIR="$outpath/$dir"
6996 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
6997 # fast configure - the makefile exists, skip it
6998 # since the makefile exists, it was generated by qmake, which means we
6999 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7001 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7004 QMAKE_SPEC_ARGS="-spec $SPEC"
7005 echo $ECHO_N " for $a$ECHO_C"
7007 QMAKE="$outpath/bin/qmake"
7008 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7009 if [ "$file" = ".projects.3" ]; then
7012 cat >"${OUTDIR}/Makefile" <<EOF
7013 # ${OUTDIR}/Makefile: generated by configure
7015 # WARNING: This makefile will be replaced with a real makefile.
7016 # All changes made to this file will be lost.
7018 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7020 cat >>"${OUTDIR}/Makefile" <<EOF
7022 all clean install qmake first Makefile: FORCE
7023 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7031 if [ "$OPT_VERBOSE" = "yes" ]; then
7032 echo " (`basename $SPEC`)"
7033 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7038 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7039 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7043 rm -f .projects .projects.3
7045 #-------------------------------------------------------------------------------
7046 # check for platforms that we don't yet know about
7047 #-------------------------------------------------------------------------------
7048 if [ "$CFG_ARCH" = "generic" ]; then
7051 NOTICE: Atomic operations are not yet supported for this
7054 Qt will use the 'generic' architecture instead, which uses a
7055 single pthread_mutex_t to protect all atomic operations. This
7056 implementation is the slow (but safe) fallback implementation
7057 for architectures Qt does not yet support.
7061 #-------------------------------------------------------------------------------
7062 # check if the user passed the -no-zlib option, which is no longer supported
7063 #-------------------------------------------------------------------------------
7064 if [ -n "$ZLIB_FORCED" ]; then
7065 which_zlib="supplied"
7066 if [ "$CFG_ZLIB" = "system" ]; then
7072 NOTICE: The -no-zlib option was supplied but is no longer
7075 Qt now requires zlib support in all builds, so the -no-zlib
7076 option was ignored. Qt will be built using the $which_zlib
7081 #-------------------------------------------------------------------------------
7082 # finally save the executed command to another script
7083 #-------------------------------------------------------------------------------
7084 if [ `basename $0` != "config.status" ]; then
7085 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7087 # add the system variables
7088 for varname in $SYSTEM_VARIABLES; do
7090 'if [ -n "\$'${varname}'" ]; then
7091 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7096 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7098 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7099 echo "#!/bin/sh" > "$outpath/config.status"
7100 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7101 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7102 echo "else" >> "$outpath/config.status"
7103 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7104 echo "fi" >> "$outpath/config.status"
7105 chmod +x "$outpath/config.status"
7108 if [ -n "$RPATH_MESSAGE" ]; then
7110 echo "$RPATH_MESSAGE"
7113 MAKE=`basename "$MAKE"`
7115 echo Qt is now configured for building. Just run \'$MAKE\'.
7116 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7117 echo Once everything is built, Qt is installed.
7118 echo You should not run \'$MAKE install\'.
7120 echo Once everything is built, you must run \'$MAKE install\'.
7121 echo Qt will be installed into $QT_INSTALL_PREFIX
7124 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.