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
366 echo "No license exists to enable Qt QPA. Disabling."
373 COMMERCIAL_USER="yes"
387 if [ "$COMMERCIAL_USER" = "ask" ]; then
389 echo "Which edition of Qt do you want to use ?"
391 echo "Type 'c' if you want to use the Commercial Edition."
392 echo "Type 'o' if you want to use the Open Source Edition."
396 if [ "$commercial" = "c" ]; then
397 COMMERCIAL_USER="yes"
399 elif [ "$commercial" = "o" ]; then
406 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
407 # Commercial preview release
408 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
411 QT_EDITION="QT_EDITION_DESKTOP"
412 LicenseType="Technology Preview"
413 elif [ $COMMERCIAL_USER = "yes" ]; then
414 # one of commercial editions
415 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
416 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
418 # read in the license file
419 if [ -f "$LICENSE_FILE" ]; then
420 . "$LICENSE_FILE" >/dev/null 2>&1
421 if [ -z "$LicenseKeyExt" ]; then
423 echo "You are using an old license file."
425 echo "Please install the license file supplied by Nokia,"
426 echo "or install the Qt Open Source Edition if you intend to"
427 echo "develop free software."
430 if [ -z "$Licensee" ]; then
432 echo "Invalid license key. Please check the license key."
436 if [ -z "$LicenseKeyExt" ]; then
438 echo $ECHO_N "Please enter your license key: $ECHO_C"
440 Licensee="Unknown user"
445 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
446 && LicenseValid="yes" \
448 if [ "$LicenseValid" != "yes" ]; then
450 echo "Invalid license key. Please check the license key."
453 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
454 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
455 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
456 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
458 # determine which edition we are licensed to use
459 case "$LicenseTypeCode" in
461 LicenseType="Commercial"
465 QT_EDITION="QT_EDITION_UNIVERSAL"
468 Edition="FullFramework"
469 EditionString="Full Framework"
470 QT_EDITION="QT_EDITION_DESKTOP"
473 Edition="GUIFramework"
474 EditionString="GUI Framework"
475 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
480 LicenseType="Evaluation"
481 QMakeVar add DEFINES QT_EVAL
485 QT_EDITION="QT_EDITION_EVALUATION"
490 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
492 echo "Invalid license key. Please check the license key."
496 # verify that we are licensed to use Qt on this platform
498 case "$PlatformCode" in
501 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
505 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
508 ### EMBEDDED_QPA logic missing ###
509 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
510 X9,* | XC,* | XU,* | XW,* | XM,*)
512 LICENSE_EXTENSION="-ALLOS"
514 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
515 # Qt for Embedded Linux
516 LICENSE_EXTENSION="-EMBEDDED"
518 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
520 LICENSE_EXTENSION="-EMBEDDED"
522 FM,*,no | LM,yes,* | ZM,no,no)
524 LICENSE_EXTENSION="-DESKTOP"
528 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
530 echo "You are not licensed for the $Platform platform."
532 echo "Please contact qt-info@nokia.com to upgrade your license to"
533 echo "include the $Platform platform, or install the Qt Open Source Edition"
534 echo "if you intend to develop free software."
539 if test -r "$relpath/.LICENSE"; then
540 # Generic, non-final license
542 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
547 *TECHNOLOGY?PREVIEW*)
554 echo >&2 "Invalid license files; cannot continue"
559 EditionString="$Edition"
560 QT_EDITION="QT_EDITION_DESKTOP"
563 case "$LicenseFeatureCode" in
566 case "$LicenseType" in
568 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
571 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
577 case "$LicenseType" in
579 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
582 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
588 echo "Invalid license key. Please check the license key."
592 case "$LicenseFeatureCode" in
600 if [ '!' -f "$outpath/LICENSE" ]; then
601 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
602 echo "this software has disappeared."
604 echo "Sorry, you are not licensed to use this software."
605 echo "Try re-installing."
609 elif [ $COMMERCIAL_USER = "no" ]; then
610 # Open Source edition - may only be used under the terms of the GPL or LGPL.
611 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
612 Licensee="Open Source"
614 EditionString="Open Source"
615 QT_EDITION="QT_EDITION_OPENSOURCE"
618 #-------------------------------------------------------------------------------
619 # initalize variables
620 #-------------------------------------------------------------------------------
622 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
623 for varname in $SYSTEM_VARIABLES; do
624 qmakevarname="${varname}"
625 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
626 if [ "${varname}" = "LDFLAGS" ]; then
627 qmakevarname="LFLAGS"
628 elif [ "${varname}" = "LD" ]; then
632 'if [ -n "\$'${varname}'" ]; then
633 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
637 # Use CC/CXX to run config.tests
638 mkdir -p "$outpath/config.tests"
639 rm -f "$outpath/config.tests/.qmake.cache"
640 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
642 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
643 QMakeVar add decorations "default windows styled"
644 QMakeVar add mouse-drivers "pc"
645 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
646 QMakeVar add gfx-drivers "linuxfb"
647 QMakeVar add mouse-drivers "linuxtp"
649 QMakeVar add kbd-drivers "tty"
651 if [ "$CFG_DEV" = "yes" ]; then
652 QMakeVar add kbd-drivers "um"
655 # QTDIR may be set and point to an old or system-wide Qt installation
658 # the minimum version of libdbus-1 that we require:
659 MIN_DBUS_1_VERSION=0.93
661 # initalize internal variables
662 CFG_CONFIGURE_EXIT_ON_ERROR=yes
664 CFG_EXCEPTIONS=unspecified
665 CFG_GUI=auto # (yes|no|auto)
691 CFG_OPENVG_LC_INCLUDES=no
692 CFG_OPENVG_SHIVA=auto
693 CFG_OPENVG_ON_OPENGL=auto
695 CFG_EGL_GLES_INCLUDES=no
700 QT_DEFAULT_BUILD_PARTS="libs examples tests"
704 CFG_AUDIO_BACKEND=auto
706 CFG_DECLARATIVE_DEBUG=yes
707 CFG_JAVASCRIPTCORE_JIT=auto
709 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
710 CFG_GFX_ON="linuxfb multiscreen"
711 CFG_GFX_PLUGIN_AVAILABLE=
714 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
715 CFG_KBD_ON="tty" #default, see QMakeVar above
716 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
717 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
721 CFG_KBD_PLUGIN_AVAILABLE=
724 CFG_MOUSE_PLUGIN_AVAILABLE=
729 CFG_DECORATION_AVAILABLE="styled windows default"
730 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
731 CFG_DECORATION_PLUGIN_AVAILABLE=
732 CFG_DECORATION_PLUGIN=
752 CFG_SEPARATE_DEBUG_INFO=no
753 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
754 CFG_REDUCE_EXPORTS=auto
764 CFG_REDUCE_RELOCATIONS=auto
766 CFG_ACCESSIBILITY=auto
769 CFG_DOUBLEFORMAT=auto
773 CFG_CLOCK_GETTIME=auto
774 CFG_CLOCK_MONOTONIC=auto
783 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
787 CFG_PREFIX_INSTALL=yes
796 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
797 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
801 OPT_CONFIRM_LICENSE=no
815 # initalize variables used for installation
824 QT_INSTALL_TRANSLATIONS=
833 #flags for SQL drivers
841 QT_LFLAGS_ODBC="-lodbc"
844 # flags for libdbus-1
848 # flags for Glib (X11 only)
852 # flags for GStreamer (X11 only)
856 #-------------------------------------------------------------------------------
857 # check SQL drivers, mouse drivers and decorations available in this package
858 #-------------------------------------------------------------------------------
860 # opensource version removes some drivers, so force them to be off
866 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
867 for a in "$relpath/src/plugins/sqldrivers/"*; do
869 base_a=`basename "$a"`
870 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
871 eval "CFG_SQL_${base_a}=auto"
876 CFG_DECORATION_PLUGIN_AVAILABLE=
877 if [ -d "$relpath/src/plugins/decorations" ]; then
878 for a in "$relpath/src/plugins/decorations/"*; do
880 base_a=`basename "$a"`
881 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
886 CFG_KBD_PLUGIN_AVAILABLE=
887 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
888 for a in "$relpath/src/plugins/kbddrivers/"*; do
890 base_a=`basename "$a"`
891 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
896 CFG_MOUSE_PLUGIN_AVAILABLE=
897 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
898 for a in "$relpath/src/plugins/mousedrivers/"*; do
900 base_a=`basename "$a"`
901 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
906 CFG_GFX_PLUGIN_AVAILABLE=
907 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
908 for a in "$relpath/src/plugins/gfxdrivers/"*; do
910 base_a=`basename "$a"`
911 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
914 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
917 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
918 if [ -d "$relpath/src/plugins/imageformats" ]; then
919 for a in "$relpath/src/plugins/imageformats/"*; do
921 base_a=`basename "$a"`
922 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
927 #-------------------------------------------------------------------------------
928 # parse command line arguments
929 #-------------------------------------------------------------------------------
931 # parse the arguments, setting things to "yes" or "no"
932 while [ "$#" -gt 0 ]; do
936 #Autoconf style options
938 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
942 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
946 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
947 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
950 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
954 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
958 -no-*-*|-plugin-*-*|-qt-*-*)
959 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
960 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
964 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
967 #Qt style yes options
968 -incremental|-qvfb|-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|-armfpa|-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)
969 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
972 #Qt style options that pass an argument
974 if [ "$PLATFORM_QPA" != "yes" ]; then
976 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
980 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
984 -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)
985 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
989 #Qt style complex options in one command
990 -enable-*|-disable-*)
991 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
992 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
994 #Qt Builtin/System style options
995 -no-*|-system-*|-qt-*)
996 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
997 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
999 #Options that cannot be generalized
1004 -embedded-lite|-qpa)
1006 # this option may or may not be followed by an argument
1007 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1016 # this option may or may not be followed by an argument
1017 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1026 # this option may or may not be followed by an argument
1027 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1035 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1036 # this option may or may not be followed by an argument
1037 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1046 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1050 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1064 if [ "$1" = "-D" ]; then
1068 VAL=`echo $1 | sed 's,-D,,'`
1073 # this option may or may not be followed by an argument
1074 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1083 if [ "$1" = "-I" ]; then
1087 VAL=`echo $1 | sed 's,-I,,'`
1092 if [ "$1" = "-L" ]; then
1096 VAL=`echo $1 | sed 's,-L,,'`
1101 if [ "$1" = "-R" ]; then
1105 VAL=`echo $1 | sed 's,-R,,'`
1110 VAL=`echo $1 | sed 's,-l,,'`
1114 if [ "$1" = "-F" ]; then
1118 VAL=`echo $1 | sed 's,-F,,'`
1123 if [ "$1" = "-fw" ]; then
1127 VAL=`echo $1 | sed 's,-fw,,'`
1135 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1142 if [ "$UNKNOWN_ARG" = "yes" ]; then
1143 echo "$1: unknown argument"
1154 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1155 CFG_ACCESSIBILITY="$VAL"
1164 CFG_USE_GNUMAKE="$VAL"
1167 CFG_MYSQL_CONFIG="$VAL"
1170 QT_INSTALL_PREFIX="$VAL"
1173 QT_HOST_PREFIX="$VAL"
1182 QT_FORCE_PKGCONFIG=yes
1185 QT_INSTALL_DOCS="$VAL"
1188 QT_INSTALL_HEADERS="$VAL"
1191 QT_INSTALL_PLUGINS="$VAL"
1194 QT_INSTALL_IMPORTS="$VAL"
1197 QT_INSTALL_DATA="$VAL"
1200 QT_INSTALL_LIBS="$VAL"
1209 QT_INSTALL_TRANSLATIONS="$VAL"
1211 sysconfdir|settingsdir)
1212 QT_INSTALL_SETTINGS="$VAL"
1215 QT_INSTALL_EXAMPLES="$VAL"
1218 QT_INSTALL_TESTS="$VAL"
1227 QT_INSTALL_BINS="$VAL"
1238 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1245 if [ "$VAL" = "little" ]; then
1246 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1247 elif [ "$VAL" = "big" ]; then
1248 CFG_ENDIAN="Q_BIG_ENDIAN"
1254 if [ "$VAL" = "little" ]; then
1255 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1256 elif [ "$VAL" = "big" ]; then
1257 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1263 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1270 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1271 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1272 [ "$VAL" = "es2" ]; then
1274 if [ "$VAL" = "es2" ]; then
1282 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1284 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1291 qvfb) # left for commandline compatibility, not documented
1292 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1293 if [ "$VAL" = "yes" ]; then
1294 QMakeVar add gfx-drivers qvfb
1295 QMakeVar add kbd-drivers qvfb
1296 QMakeVar add mouse-drivers qvfb
1297 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1298 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1299 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1306 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1309 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1317 if [ "$BUILD_ON_MAC" = "yes" ]; then
1324 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1325 CFG_MAC_DWARF2="$VAL"
1331 # if this is a Mac then "windows" probably means
1332 # we are cross-compiling for MinGW
1333 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1334 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1343 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1344 CFG_MAC_HARFBUZZ="$VAL"
1351 if [ "$BUILD_ON_MAC" = "yes" ]; then
1352 CFG_FRAMEWORK="$VAL"
1358 if [ "$VAL" = "yes" ]; then
1360 QMakeVar add QMAKE_CFLAGS -pg
1361 QMakeVar add QMAKE_CXXFLAGS -pg
1362 QMakeVar add QMAKE_LFLAGS -pg
1363 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1369 if [ "$VAL" = "yes" ]; then
1370 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1373 exceptions|g++-exceptions)
1374 if [ "$VAL" = "no" ]; then
1376 elif [ "$VAL" = "yes" ]; then
1384 # keep compatibility with old platform names
1390 PLATFORM=hpux-acc-o64
1393 PLATFORM=hpux-acc-64
1396 PLATFORM=hpux-acc-64
1408 PLATFORM=reliant-cds-64
1411 PLATFORM=solaris-cc-64
1414 PLATFORM=unixware-cc
1417 PLATFORM=unixware-g++
1420 PLATFORM=unixware-cc
1423 PLATFORM=unixware-g++
1429 i386) NATIVE_64_ARCH="x86_64" ;;
1430 powerpc) NATIVE_64_ARCH="ppc64" ;;
1431 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1433 if [ ! -z "$NATIVE_64_ARCH" ]; then
1434 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1441 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1444 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1445 CFG_DEBUG_RELEASE="$VAL"
1451 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1452 CFG_RELEASE_QMAKE="$VAL"
1458 if [ "$VAL" = "yes" ]; then
1460 elif [ "$VAL" = "no" ]; then
1467 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1468 CFG_PREFIX_INSTALL="$VAL"
1476 developer-build|commercial|opensource)
1477 # These switches have been dealt with already
1480 if [ "$VAL" = "yes" ]; then
1482 elif [ "$VAL" = "no" ]; then
1489 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1490 CFG_INCREMENTAL="$VAL"
1496 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1497 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1503 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1504 if [ "$VAL" = "no" ]; then
1505 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1506 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1507 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1513 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1520 if [ "$VAL" = "no" ]; then
1527 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1535 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1542 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1549 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1556 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1563 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1570 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1577 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1584 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1591 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1592 CFG_PRECOMPILE="$VAL"
1597 separate-debug-info)
1598 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1599 CFG_SEPARATE_DEBUG_INFO="$VAL"
1600 elif [ "$VAL" = "nocopy" ] ; then
1601 CFG_SEPARATE_DEBUG_INFO="yes"
1602 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1608 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1609 CFG_REDUCE_EXPORTS="$VAL"
1615 if [ "$VAL" = "no" ]; then
1622 if [ "$VAL" = "no" ]; then
1629 if [ "$VAL" = "no" ]; then
1636 if [ "$VAL" = "no" ]; then
1643 if [ "$VAL" = "no" ]; then
1650 if [ "$VAL" = "no" ]; then
1657 if [ "$VAL" = "no" ]; then
1664 if [ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "no" ]; then
1681 if [ "$VAL" = "no" ]; then
1688 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1689 CFG_REDUCE_RELOCATIONS="$VAL"
1695 [ "$VAL" = "qt" ] && VAL=yes
1696 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1701 # No longer supported:
1702 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1705 if [ "$VAL" = "system" ]; then
1712 [ "$VAL" = "yes" ] && VAL=qt
1713 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1720 [ "$VAL" = "yes" ] && VAL=qt
1721 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1728 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1735 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1742 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1749 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1756 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1763 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1770 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1771 CFG_FONTCONFIG="$VAL"
1777 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1784 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1791 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1798 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1805 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1812 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1819 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1826 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1833 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1834 CFG_GSTREAMER="$VAL"
1840 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1841 CFG_QGTKSTYLE="$VAL"
1847 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1850 if [ "$VAL" = "no" ]; then
1858 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1860 elif [ "$VAL" = "runtime" ]; then
1867 if [ "$VAL" = "yes" ]; then
1874 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1881 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1882 CFG_LARGEFILE="$VAL"
1888 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1895 if [ "$VAL" = "yes" ]; then
1896 CFG_OPENSSL="linked"
1902 if [ "$VAL" = "yes" ]; then
1903 CFG_DECLARATIVE_DEBUG="yes"
1905 if [ "$VAL" = "no" ]; then
1906 CFG_DECLARATIVE_DEBUG="no"
1913 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1914 CFG_JAVASCRIPTCORE_JIT="$VAL"
1920 if [ "$VAL" = "yes" ]; then
1921 OPT_CONFIRM_LICENSE="$VAL"
1927 if [ "$VAL" = "yes" ]; then
1933 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
1934 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1935 # if autoconf style options were used, $VAL can be "yes" or "no"
1936 [ "$VAL" = "yes" ] && VAL=qt
1937 # now $VAL should be "no", "qt", or "plugin"... double-check
1938 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1941 # now $VAL is "no", "qt", or "plugin"
1943 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1944 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1946 # Grab the available values
1949 avail="$CFG_SQL_AVAILABLE"
1952 avail="$CFG_GFX_AVAILABLE"
1953 if [ "$OPT" = "plugin" ]; then
1954 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1958 avail="$CFG_DECORATION_AVAILABLE"
1959 if [ "$OPT" = "plugin" ]; then
1960 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1964 avail="$CFG_KBD_AVAILABLE"
1965 if [ "$OPT" = "plugin" ]; then
1966 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1970 avail="$CFG_MOUSE_AVAILABLE"
1971 if [ "$OPT" = "plugin" ]; then
1972 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1976 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1977 if [ "$OPT" != "plugin" ]; then
1978 # png is always built in
1984 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1988 # Check that that user's value is available.
1991 if [ "$VAL" = "$d" ]; then
1996 [ "$found" = yes ] || ERROR=yes
1998 if [ "$VAR" = "sql" ]; then
1999 # set the CFG_SQL_driver
2000 eval "CFG_SQL_$VAL=\$OPT"
2002 elif [ "$VAR" = "imageformat" ]; then
2003 [ "$OPT" = "qt" ] && OPT=yes
2004 VAL="`echo $VAL |tr a-z A-Z`"
2005 eval "CFG_$VAL=$OPT"
2009 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2010 if [ "$OPT" = "plugin" ]; then
2011 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2012 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2013 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2014 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2015 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2016 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2017 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2018 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2021 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2022 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2023 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2024 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2025 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2029 QMakeVar add "${VAR}s" "${VAL}"
2030 elif [ "$OPT" = "no" ]; then
2031 PLUG_VAR="${VAR}-plugin"
2032 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2033 IN_VAR="${VAR}-driver"
2037 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2038 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2039 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2040 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2041 QMakeVar del "${IN_VAR}s" "$VAL"
2042 QMakeVar del "${PLUG_VAR}s" "$VAL"
2044 if [ "$ERROR" = "yes" ]; then
2045 echo "$CURRENT_OPT: unknown argument"
2050 if [ "$VAL" = "yes" ]; then
2051 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2052 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2056 elif [ "$VAL" = "no" ]; then
2057 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2058 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2067 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2074 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2081 D_FLAGS="$D_FLAGS \"$VAL\""
2084 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2087 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2090 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2093 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2096 if [ "$BUILD_ON_MAC" = "yes" ]; then
2097 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2098 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2104 if [ "$BUILD_ON_MAC" = "yes" ]; then
2105 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2111 W_FLAGS="$W_FLAGS \"${VAL}\""
2117 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2118 CFG_PHONON_BACKEND="$VAL"
2130 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2131 CFG_AUDIO_BACKEND="$VAL"
2137 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2144 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2145 CFG_FORCE_ASSERTS="$VAL"
2151 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2161 if [ "$UNKNOWN_OPT" = "yes" ]; then
2162 echo "${CURRENT_OPT}: invalid command-line switch"
2168 # update QT_CONFIG to show our current predefined configuration
2169 case "$CFG_QCONFIG" in
2170 minimal|small|medium|large|full)
2171 # these are a sequence of increasing functionality
2172 for c in minimal small medium large full; do
2173 QT_CONFIG="$QT_CONFIG $c-config"
2174 [ "$CFG_QCONFIG" = $c ] && break
2178 # not known to be sufficient for anything
2179 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2180 echo >&2 "Error: configuration file not found:"
2181 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2183 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2188 #-------------------------------------------------------------------------------
2189 # build tree initialization
2190 #-------------------------------------------------------------------------------
2192 # where to find which..
2193 unixtests="$relpath/config.tests/unix"
2194 mactests="$relpath/config.tests/mac"
2195 WHICH="$unixtests/which.test"
2197 PERL=`$WHICH perl 2>/dev/null`
2199 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2201 for e in gawk nawk awk; do
2202 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2209 PERL="/usr/bin/perl"
2210 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2214 ### skip this if the user just needs help...
2215 if [ "$OPT_HELP" != "yes" ]; then
2217 # is this a shadow build?
2218 if [ "$OPT_SHADOW" = "maybe" ]; then
2220 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2221 if [ -h "$outpath" ]; then
2222 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2228 if [ "$OPT_SHADOW" = "yes" ]; then
2229 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2230 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2231 echo >&2 "Cannot proceed."
2234 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2237 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2239 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2240 echo "Qt can be built in release mode with separate debug information, so"
2241 echo "-debug-and-release is not necessary anymore"
2245 if [ "$CFG_SILENT" = "yes" ]; then
2246 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2249 # if the source tree is different from the build tree,
2250 # symlink or copy part of the sources
2251 if [ "$OPT_SHADOW" = "yes" ]; then
2252 echo "Preparing build tree..."
2254 if [ -z "$PERL" ]; then
2256 echo "You need perl in your PATH to make a shadow build."
2257 echo "Cannot proceed."
2261 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2263 # symlink the qmake directory
2264 find "$relpath/qmake" | while read a; do
2265 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2266 if [ '!' -f "$my_a" ]; then
2267 if [ -d "$a" ]; then
2268 # directories are created...
2271 a_dir=`dirname "$my_a"`
2272 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2273 # ... and files are symlinked
2274 case `basename "$a"` in
2275 *.o|*.d|GNUmakefile*|qmake)
2286 # make a syncqt script that can be used in the shadow
2287 rm -f "$outpath/bin/syncqt"
2288 if [ -x "$relpath/bin/syncqt" ]; then
2289 mkdir -p "$outpath/bin"
2290 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2291 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2292 chmod 755 "$outpath/bin/syncqt"
2295 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2296 rm -f "$outpath/bin/$i"
2297 if [ -x "$relpath/bin/$i" ]; then
2298 mkdir -p "$outpath/bin"
2299 echo "#!/bin/sh" >"$outpath/bin/$i"
2300 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2301 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2302 chmod 755 "$outpath/bin/$i"
2306 # symlink the mkspecs directory
2307 mkdir -p "$outpath/mkspecs"
2308 rm -rf "$outpath"/mkspecs/*
2309 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2310 rm -f "$outpath/mkspecs/default"
2314 rm -rf "$outpath/mkspecs/$1"
2315 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2316 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2319 # Special case for mkspecs/features directory.
2320 # To be able to place .prf files into a shadow build directory,
2321 # we're creating links for files only. The directory structure is reproduced.
2322 ShadowMkspecs features
2324 # The modules dir is special, too.
2325 ShadowMkspecs modules
2327 # symlink the doc directory
2328 rm -rf "$outpath/doc"
2329 ln -s "$relpath/doc" "$outpath/doc"
2332 # symlink fonts to be able to run application from build directory
2333 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2334 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2335 mkdir -p "${outpath}/lib"
2336 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2340 if [ "$OPT_FAST" = "auto" ]; then
2341 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2348 # find a make command
2349 if [ -z "$MAKE" ]; then
2351 for mk in gmake make; do
2352 if "$WHICH" $mk >/dev/null 2>&1; then
2357 if [ -z "$MAKE" ]; then
2358 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2359 echo >&2 "Cannot proceed."
2362 # export MAKE, we need it later in the config.tests
2368 #-------------------------------------------------------------------------------
2369 # auto-detect all that hasn't been specified in the arguments
2370 #-------------------------------------------------------------------------------
2372 if [ -z "$PLATFORM" ]; then
2374 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2376 if [ "$PLATFORM_QPA" = "yes" ]; then
2377 OSX_VERSION=`uname -r | cut -d. -f1`
2378 if [ "$OSX_VERSION" -ge 11 ]; then
2379 # We're on Lion or above. Check if we have a supported Clang version
2380 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2383 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2398 #PLATFORM=aix-g++-64
2400 #PLATFORM=aix-xlc-64
2402 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2412 # PLATFORM=dynix-g++
2418 PLATFORM=freebsd-g++
2420 - Also available for FreeBSD: freebsd-icc
2424 PLATFORM=openbsd-g++
2435 #PLATFORM=irix-cc-64
2437 - Also available for IRIX: irix-g++ irix-cc-64
2441 case "$UNAME_MACHINE" in
2443 #PLATFORM=hpuxi-acc-32
2444 PLATFORM=hpuxi-acc-64
2446 - Also available for HP-UXi: hpuxi-acc-32
2452 #PLATFORM=hpux-acc-64
2454 #PLATFORM=hpux-acc-o64
2456 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2465 - Also available for Tru64: tru64-g++
2469 case "$UNAME_MACHINE" in
2471 PLATFORM=linux-g++-64
2478 - Also available for Linux: linux-kcc linux-icc linux-cxx
2482 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2483 PLATFORM="solaris-g++"
2485 #PLATFORM=solaris-g++
2487 #PLATFORM=solaris-cc64
2490 - Also available for Solaris: solaris-g++ solaris-cc-64
2493 ReliantUNIX-*:*|SINIX-*:*)
2494 PLATFORM=reliant-cds
2495 #PLATFORM=reliant-cds-64
2497 - Also available for Reliant UNIX: reliant-cds-64
2507 #PLATFORM=unixware-g++
2508 PLATFORM=unixware-cc
2510 - Also available for OpenUNIX: unixware-g++
2514 #PLATFORM=unixware-g++
2515 PLATFORM=unixware-cc
2517 - Also available for UnixWare: unixware-g++
2524 - Also available for SCO OpenServer: sco-g++
2528 PLATFORM=unixware-g++
2531 PLATFORM=unsupported/qnx-g++
2534 if [ "$OPT_HELP" != "yes" ]; then
2536 for p in $PLATFORMS; do
2537 echo " $relconf $* -platform $p"
2540 echo " The build script does not currently recognize all" >&2
2541 echo " platforms supported by Qt." >&2
2542 echo " Rerun this script with a -platform option listed to" >&2
2543 echo " set the system/compiler combination you use." >&2
2550 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2552 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2554 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2555 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2557 if [ -d "$PLATFORM" ]; then
2558 QMAKESPEC="$PLATFORM"
2560 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2562 if [ -d "$XPLATFORM" ]; then
2563 XQMAKESPEC="$XPLATFORM"
2565 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2567 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2568 QT_CROSS_COMPILE=yes
2569 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2572 if [ "$BUILD_ON_MAC" = "yes" ]; then
2573 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2575 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2576 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2577 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2578 echo " built with 'macx-g++'" >&2
2584 # check specified platforms are supported
2585 if [ '!' -d "$QMAKESPEC" ]; then
2587 echo " The specified system/compiler is not supported:"
2591 echo " Please see the README file for a complete list."
2595 if [ '!' -d "$XQMAKESPEC" ]; then
2597 echo " The specified system/compiler is not supported:"
2601 echo " Please see the README file for a complete list."
2605 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2607 echo " The specified system/compiler port is not complete:"
2609 echo " $XQMAKESPEC/qplatformdefs.h"
2611 echo " Please contact qt-info@nokia.com."
2616 # now look at the configs and figure out what platform we are config'd for
2617 [ "$PLATFORM_QPA" != "yes" ] \
2618 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2620 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2622 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2623 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2624 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2625 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2626 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2630 #-------------------------------------------------------------------------------
2631 # determine the system architecture
2632 #-------------------------------------------------------------------------------
2633 if [ "$OPT_VERBOSE" = "yes" ]; then
2634 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2637 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2638 case `basename "$XPLATFORM"` in
2641 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2643 echo "Please contact qt-info@nokia.com to upgrade your license to"
2644 echo "include this platform, or install the Qt Open Source Edition"
2645 echo "if you intend to develop free software."
2651 if [ -z "${CFG_HOST_ARCH}" ]; then
2652 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2654 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2655 case "$CFG_HOST_ARCH" in
2660 if [ "$OPT_VERBOSE" = "yes" ]; then
2661 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2665 CFG_HOST_ARCH=`uname -p`
2666 if [ "$OPT_VERBOSE" = "yes" ]; then
2667 echo " SGI ($CFG_HOST_ARCH)"
2671 case "$UNAME_MACHINE" in
2673 if [ "$OPT_VERBOSE" = "yes" ]; then
2674 echo " Sun SPARC (sparc)"
2681 if [ "$OPT_VERBOSE" = "yes" ]; then
2682 echo " 64-bit AMD 80x86 (x86_64)"
2684 CFG_HOST_ARCH=x86_64
2687 if [ "$OPT_VERBOSE" = "yes" ]; then
2688 echo " 32-bit Intel 80x86 (i386)"
2696 if [ "$OPT_VERBOSE" = "yes" ]; then
2697 echo " 64-bit IBM PowerPC (powerpc)"
2699 CFG_HOST_ARCH=powerpc
2702 if [ "$OPT_VERBOSE" = "yes" ]; then
2703 echo " HP PA-RISC (parisc)"
2705 CFG_HOST_ARCH=parisc
2708 if [ "$OPT_VERBOSE" = "yes" ]; then
2709 echo " 32-bit Intel 80x86 (i386)"
2713 *:*:x86_64|*:*:amd64)
2714 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2715 if [ "$OPT_VERBOSE" = "yes" ]; then
2716 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2720 if [ "$OPT_VERBOSE" = "yes" ]; then
2721 echo " 64-bit AMD 80x86 (x86_64)"
2723 CFG_HOST_ARCH=x86_64
2727 if [ "$OPT_VERBOSE" = "yes" ]; then
2728 echo " 32-bit PowerPC (powerpc)"
2730 CFG_HOST_ARCH=powerpc
2733 if [ "$OPT_VERBOSE" = "yes" ]; then
2734 echo " 64-bit PowerPC (powerpc)"
2736 CFG_HOST_ARCH=powerpc
2739 if [ "$OPT_VERBOSE" = "yes" ]; then
2740 echo " IBM S/390 (s390)"
2745 if [ "$OPT_VERBOSE" = "yes" ]; then
2751 if [ "$OPT_VERBOSE" = "yes" ]; then
2752 echo " Linux on SPARC"
2757 case "$UNAME_MACHINE" in
2759 if [ "$OPT_VERBOSE" = "yes" ]; then
2760 echo " QNX on Intel 80x86 (i386)"
2767 if [ "$OPT_VERBOSE" = "yes" ]; then
2768 echo " Trying '$UNAME_MACHINE'..."
2770 CFG_HOST_ARCH="$UNAME_MACHINE"
2775 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2776 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2777 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2778 CFG_ARCH=$CFG_HOST_ARCH
2785 # previously, armv6 was a different arch
2791 if [ "$OPT_VERBOSE" = "yes" ]; then
2792 echo "System architecture: '$CFG_ARCH'"
2793 if [ "$PLATFORM_QPA" = "yes" ]; then
2794 echo "Host architecture: '$CFG_HOST_ARCH'"
2798 #-------------------------------------------------------------------------------
2799 # tests that don't need qmake (must be run before displaying help)
2800 #-------------------------------------------------------------------------------
2802 # detect build style
2803 if [ "$CFG_DEBUG" = "auto" ]; then
2804 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2805 CFG_DEBUG_RELEASE=yes
2807 elif [ "$CFG_DEV" = "yes" ]; then
2808 CFG_DEBUG_RELEASE=no
2811 CFG_DEBUG_RELEASE=no
2815 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2816 QT_CONFIG="$QT_CONFIG build_all"
2819 if [ -z "$PKG_CONFIG" ]; then
2820 # See if PKG_CONFIG is set in the mkspec:
2821 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2823 if [ -z "$PKG_CONFIG" ]; then
2824 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2827 # Work out if we can use pkg-config
2828 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2829 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2831 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2832 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2833 echo >&2 "environment!"
2835 if [ -z "$PKG_CONFIG_PATH" ]; then
2837 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2838 echo >&2 "the host compiler's .pc files will be used. This is probably"
2839 echo >&2 "not what you want."
2841 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2843 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2844 echo >&2 "been set. This means your toolchain's .pc files must contain"
2845 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2846 echo >&2 "tests are failing, please check these files."
2851 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2852 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2853 echo >&2 "dependencies"
2859 if [ ! -n "$PKG_CONFIG" ]; then
2860 QT_CONFIG="$QT_CONFIG no-pkg-config"
2863 # pass on $CFG_SDK to the configure tests.
2864 if [ '!' -z "$CFG_SDK" ]; then
2865 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2868 # find the default framework value
2869 if [ "$BUILD_ON_MAC" = "yes" ]; then
2870 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2871 CFG_FRAMEWORK="$CFG_SHARED"
2872 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2874 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2882 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2884 TEST_COMPILER=$QMAKE_CONF_COMPILER
2885 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2886 if [ -z "$TEST_COMPILER" ]; then
2887 echo "ERROR: Cannot set the compiler for the configuration tests"
2893 if [ -n "$CFG_SYSROOT" ]; then
2894 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2895 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2896 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2898 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2902 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2904 # auto-detect precompiled header support
2905 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2906 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2913 #auto-detect DWARF2 on the mac
2914 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2915 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2922 # don't autodetect support for separate debug info on objcopy when
2923 # cross-compiling as lots of toolchains seems to have problems with this
2924 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2925 CFG_SEPARATE_DEBUG_INFO="no"
2928 # auto-detect support for separate debug info in objcopy
2929 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2930 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2931 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2932 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2933 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2934 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2935 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2936 CFG_SEPARATE_DEBUG_INFO=no
2940 # binutils on HP-UX is buggy; default to no.
2941 CFG_SEPARATE_DEBUG_INFO=no
2944 CFG_SEPARATE_DEBUG_INFO=yes
2950 # auto-detect -fvisibility support
2951 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2952 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2953 CFG_REDUCE_EXPORTS=no
2955 CFG_REDUCE_EXPORTS=yes
2959 # detect the availability of the -Bsymbolic-functions linker optimization
2960 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2961 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2962 CFG_REDUCE_RELOCATIONS=no
2964 CFG_REDUCE_RELOCATIONS=yes
2968 # auto-detect GNU make support
2969 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2973 # find the default framework value
2974 if [ "$BUILD_ON_MAC" = "yes" ]; then
2975 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2976 CFG_FRAMEWORK="$CFG_SHARED"
2977 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2979 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2987 # x11 tests are done after qmake is built
2990 #setup the build parts
2991 if [ -z "$CFG_BUILD_PARTS" ]; then
2992 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2994 # don't build tools by default when cross-compiling
2995 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2996 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2999 for nobuild in $CFG_NOBUILD_PARTS; do
3000 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3002 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3004 # echo "WARNING: libs is a required part of the build."
3006 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3009 #-------------------------------------------------------------------------------
3010 # post process QT_INSTALL_* variables
3011 #-------------------------------------------------------------------------------
3013 if [ -z "$QT_INSTALL_PREFIX" ]; then
3014 if [ "$CFG_DEV" = "yes" ]; then
3015 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3017 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3020 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3022 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3023 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3024 if [ "$BUILD_ON_MAC" = "yes" ]; then
3025 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3028 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3031 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3033 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3034 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3035 if [ "$BUILD_ON_MAC" = "yes" ]; then
3036 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3041 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3044 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3046 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3047 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3048 if [ "$BUILD_ON_MAC" = "yes" ]; then
3049 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3050 QT_INSTALL_LIBS="/Libraries/Frameworks"
3054 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3056 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3058 if [ -z "$QT_INSTALL_BINS" ]; then #default
3059 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3060 if [ "$BUILD_ON_MAC" = "yes" ]; then
3061 QT_INSTALL_BINS="/Developer/Applications/Qt"
3064 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3066 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3068 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3069 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3070 if [ "$BUILD_ON_MAC" = "yes" ]; then
3071 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3074 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3076 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3078 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3079 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3080 if [ "$BUILD_ON_MAC" = "yes" ]; then
3081 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3084 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3086 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3088 if [ -z "$QT_INSTALL_DATA" ]; then #default
3089 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3091 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3093 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3094 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3096 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3098 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3099 if [ "$BUILD_ON_MAC" = "yes" ]; then
3100 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3102 QT_INSTALL_SETTINGS=/etc/xdg
3105 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3107 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3108 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3109 if [ "$BUILD_ON_MAC" = "yes" ]; then
3110 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3113 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3115 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3118 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3119 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3120 if [ "$BUILD_ON_MAC" = "yes" ]; then
3121 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3124 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3126 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3128 #------- host paths --------
3130 if [ -z "$QT_HOST_PREFIX" ]; then
3131 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
3134 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
3138 if [ -z "$QT_HOST_BINS" ]; then #default
3140 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3141 if [ "$BUILD_ON_MAC" = "yes" ]; then
3142 QT_HOST_BINS="/Developer/Applications/Qt"
3145 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
3147 QT_HOST_BINS="$QT_INSTALL_BINS"
3150 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
3152 if [ -z "$QT_HOST_DATA" ]; then #default
3154 QT_HOST_DATA="$QT_HOST_PREFIX"
3156 QT_HOST_DATA="$QT_INSTALL_DATA"
3159 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
3162 #-------------------------------------------------------------------------------
3163 # help - interactive parts of the script _after_ this section please
3164 #-------------------------------------------------------------------------------
3166 # next, emit a usage message if something failed.
3167 if [ "$OPT_HELP" = "yes" ]; then
3168 [ "x$ERROR" = "xyes" ] && echo
3169 if [ "$CFG_NIS" = "no" ]; then
3176 if [ "$CFG_CUPS" = "no" ]; then
3183 if [ "$CFG_ICONV" = "no" ]; then
3190 if [ "$CFG_LARGEFILE" = "no" ]; then
3197 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3204 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3212 if [ "$CFG_XCB" = "no" ]; then
3220 if [ "$CFG_WAYLAND" = "no" ]; then
3227 if [ "$CFG_XINPUT2" = "no" ]; then
3236 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3237 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3238 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3239 [-release] [-debug] [-debug-and-release]
3240 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3241 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3242 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3243 [-plugin-sql-<driver>] [-system-sqlite]
3244 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3245 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3246 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3247 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3248 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3249 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3250 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3251 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3252 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3253 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3254 [-no-audio-backend] [-audio-backend]
3255 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3256 [-no-optimized-qmake] [-optimized-qmake]
3257 [-no-openssl] [-openssl] [-openssl-linked]
3258 [-no-gtkstyle] [-gtkstyle]
3259 [-qt-pcre] [-system-pcre]
3260 [additional platform specific options (see below)]
3263 Installation options:
3265 -qpa ................ This will enable the QPA build.
3266 QPA is a window system agnostic implementation of Qt.
3268 These are optional, but you may specify install directories.
3270 -prefix <dir> ...... This will install everything relative to <dir>
3271 (default $QT_INSTALL_PREFIX)
3273 if [ "$PLATFORM_QPA" = "yes" ]; then
3276 -hostprefix [dir] .. Tools and libraries needed when developing
3277 applications are installed in [dir]. If [dir] is
3278 not given, the current build directory will be used.
3284 * -prefix-install .... Force a sandboxed "local" installation of
3285 Qt. This will install into
3286 $QT_INSTALL_PREFIX, if this option is
3287 disabled then some platforms will attempt a
3288 "system" install by placing default values to
3289 be placed in a system location other than
3292 You may use these to separate different parts of the install:
3294 -bindir <dir> ......... Executables will be installed to <dir>
3295 (default PREFIX/bin)
3296 -libdir <dir> ......... Libraries will be installed to <dir>
3297 (default PREFIX/lib)
3298 -docdir <dir> ......... Documentation will be installed to <dir>
3299 (default PREFIX/doc)
3300 -headerdir <dir> ...... Headers will be installed to <dir>
3301 (default PREFIX/include)
3302 -plugindir <dir> ...... Plugins will be installed to <dir>
3303 (default PREFIX/plugins)
3304 -importdir <dir> ...... Imports for QML will be installed to <dir>
3305 (default PREFIX/imports)
3306 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3308 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3309 (default PREFIX/translations)
3310 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3311 (default PREFIX/etc/settings)
3312 -examplesdir <dir> .... Examples will be installed to <dir>
3313 (default PREFIX/examples)
3314 -testsdir <dir> ....... Tests will be installed to <dir>
3315 (default PREFIX/tests)
3317 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3320 -hostbindir <dir> .. Host executables will be installed to <dir>
3321 (default HOSTPREFIX/bin)
3322 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
3323 (default HOSTPREFIX)
3330 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3331 that needs to be evaluated. If the evaluation succeeds, the feature is
3332 included. Here is a short explanation of each option:
3334 * -release ........... Compile and link Qt with debugging turned off.
3335 -debug ............. Compile and link Qt with debugging turned on.
3336 -debug-and-release . Compile and link two versions of Qt, with and without
3337 debugging turned on (Mac only).
3339 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3341 -opensource ........ Compile and link the Open-Source Edition of Qt.
3342 -commercial ........ Compile and link the Commercial Edition of Qt.
3345 * -shared ............ Create and use shared Qt libraries.
3346 -static ............ Create and use static Qt libraries.
3348 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3350 -fast .............. Configure Qt quickly by generating Makefiles only for
3351 library and subdirectory targets. All other Makefiles
3352 are created as wrappers, which will in turn run qmake.
3354 -no-largefile ...... Disables large file support.
3355 + -largefile ......... Enables Qt to access files larger than 4 GB.
3358 if [ "$PLATFORM_QPA" = "yes" ]; then
3365 if [ "$CFG_DBUS" = "no" ]; then
3374 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3375 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3377 -no-accessibility .. Do not compile Accessibility support.
3378 * -accessibility ..... Compile Accessibility support.
3380 $SHN -no-stl ............ Do not compile STL support.
3381 $SHY -stl ............... Compile STL support.
3383 -no-sql-<driver> ... Disable SQL <driver> entirely.
3384 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3386 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3389 Possible values for <driver>:
3390 [ $CFG_SQL_AVAILABLE ]
3392 -system-sqlite ..... Use sqlite from the operating system.
3394 -no-phonon-backend.. Do not build the platform phonon plugin.
3395 + -phonon-backend..... Build the platform phonon plugin.
3397 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3398 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3400 -no-declarative-debug ..... Do not build the declarative debugging support.
3401 + -declarative-debug ....... Build the declarative debugging support.
3403 -platform target ... The operating system and compiler you are building
3406 See the README file for a list of supported
3407 operating systems and compilers.
3410 if [ "${PLATFORM_QPA}" != "yes" ]; then
3412 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3413 raster - Software rasterizer
3414 opengl - Rendering via OpenGL, Experimental!
3415 openvg - Rendering via OpenVG, Experimental!
3422 -no-mmx ............ Do not compile with use of MMX instructions.
3423 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3424 -no-sse ............ Do not compile with use of SSE instructions.
3425 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3426 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3427 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3428 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3429 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3430 -no-avx ............ Do not compile with use of AVX instructions.
3431 -no-neon ........... Do not compile with use of NEON instructions.
3433 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3434 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3436 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3438 -D <string> ........ Add an explicit define to the preprocessor.
3439 -I <string> ........ Add an explicit include path.
3440 -L <string> ........ Add an explicit library path.
3442 -help, -h .......... Display this information.
3444 Third Party Libraries:
3446 -qt-zlib ........... Use the zlib bundled with Qt.
3447 + -system-zlib ....... Use zlib from the operating system.
3448 See http://www.gzip.org/zlib
3450 -no-gif ............ Do not compile GIF reading support.
3452 -no-libpng ......... Do not compile PNG support.
3453 -qt-libpng ......... Use the libpng bundled with Qt.
3454 + -system-libpng ..... Use libpng from the operating system.
3455 See http://www.libpng.org/pub/png
3457 -no-libjpeg ........ Do not compile JPEG support.
3458 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3459 + -system-libjpeg .... Use libjpeg from the operating system.
3460 See http://www.ijg.org
3462 -no-openssl ........ Do not compile support for OpenSSL.
3463 + -openssl ........... Enable run-time OpenSSL support.
3464 -openssl-linked .... Enabled linked OpenSSL support.
3466 -qt-pcre ........... Use the PCRE library bundled with Qt.
3467 + -system-pcre ....... Use the PCRE library from the operating system.
3471 -make <part> ....... Add part to the list of parts to be built at make time.
3472 ($QT_DEFAULT_BUILD_PARTS)
3473 -nomake <part> ..... Exclude part from the list of parts to be built.
3475 -R <string> ........ Add an explicit runtime library path to the Qt
3477 -l <string> ........ Add an explicit library.
3479 -no-rpath .......... Do not use the library install path as a runtime
3481 + -rpath ............. Link Qt libraries and executables using the library
3482 install path as a runtime library path. Equivalent
3483 to -R install_libpath
3485 -continue .......... Continue as far as possible if an error occurs.
3487 -verbose, -v ....... Print verbose information about each step of the
3490 -silent ............ Reduce the build output so that warnings and errors
3491 can be seen more easily.
3493 * -no-optimized-qmake ... Do not build qmake optimized.
3494 -optimized-qmake ...... Build qmake optimized.
3496 -no-gui ............ Don't build the Qt GUI library
3498 $NSN -no-nis ............ Do not compile NIS support.
3499 $NSY -nis ............... Compile NIS support.
3501 $CUN -no-cups ........... Do not compile CUPS support.
3502 $CUY -cups .............. Compile CUPS support.
3503 Requires cups/cups.h and libcups.so.2.
3505 $CIN -no-iconv .......... Do not compile support for iconv(3).
3506 $CIY -iconv ............. Compile support for iconv(3).
3508 $PHN -no-pch ............ Do not use precompiled header support.
3509 $PHY -pch ............... Use precompiled header support.
3511 $DBN -no-dbus ........... Do not compile the QtDBus module.
3512 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3513 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3515 -reduce-relocations ..... Reduce relocations in the libraries through extra
3516 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3517 experimental; needs GNU ld >= 2.18).
3519 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3523 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3524 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3531 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3539 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3543 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3544 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3546 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3547 $XCBY -xcb ............... Compile Xcb support.
3549 $XWN -no-wayland......... Do not compile Wayland support.
3550 $XWY -wayland .......... Compile Wayland support.
3556 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3560 $X2N -no-xinput2......... Do not compile XInput2 support.
3561 $X2Y -xinput2............ Compile XInput2 support.
3567 if [ "$PLATFORM_X11" = "yes" ]; then
3568 if [ "$CFG_SM" = "no" ]; then
3575 if [ "$CFG_XSHAPE" = "no" ]; then
3582 if [ "$CFG_XVIDEO" = "no" ]; then
3589 if [ "$CFG_XINERAMA" = "no" ]; then
3596 if [ "$CFG_FONTCONFIG" = "no" ]; then
3603 if [ "$CFG_XCURSOR" = "no" ]; then
3610 if [ "$CFG_XFIXES" = "no" ]; then
3617 if [ "$CFG_XRANDR" = "no" ]; then
3624 if [ "$CFG_XRENDER" = "no" ]; then
3631 if [ "$CFG_MITSHM" = "no" ]; then
3638 if [ "$CFG_XINPUT" = "no" ]; then
3645 if [ "$CFG_XKB" = "no" ]; then
3652 if [ "$CFG_IM" = "no" ]; then
3663 -no-gtkstyle ....... Do not build the GTK theme integration.
3664 + -gtkstyle .......... Build the GTK theme integration.
3666 * -no-nas-sound ...... Do not compile in NAS sound support.
3667 -system-nas-sound .. Use NAS libaudio from the operating system.
3668 See http://radscan.com/nas.html
3670 -egl ............... Use EGL instead of GLX to manage contexts.
3671 When building for desktop OpenGL, this option will
3672 make Qt use EGL to manage contexts rather than the
3673 GLX, which is the default. Note: For OpenGL ES, EGL
3676 -no-opengl ......... Do not support OpenGL.
3677 + -opengl <api> ...... Enable OpenGL support.
3678 With no parameter, this will auto-detect the "best"
3679 OpenGL API to use. If desktop OpenGL is available, it
3680 will be used. Use desktop or es2 for <api>
3681 to force the use of the Desktop OpenGL or
3682 OpenGL ES 2 APIs instead.
3684 -no-openvg ........ Do not support OpenVG.
3685 + -openvg ........... Enable OpenVG support.
3686 Requires EGL support, typically supplied by an OpenGL
3687 or other graphics implementation.
3689 $SMN -no-sm ............. Do not support X Session Management.
3690 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3692 $SHN -no-xshape ......... Do not compile XShape support.
3693 $SHY -xshape ............ Compile XShape support.
3694 Requires X11/extensions/shape.h.
3696 $XVN -no-xvideo ......... Do not compile XVideo support.
3697 $XVY -xvideo ............ Compile XVideo support.
3698 Requires X11/extensions/Xv.h & Xvlib.h.
3700 $SHN -no-xsync .......... Do not compile XSync support.
3701 $SHY -xsync ............. Compile XSync support.
3702 Requires X11/extensions/sync.h.
3704 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3705 $XAY -xinerama .......... Compile Xinerama support.
3706 Requires X11/extensions/Xinerama.h and libXinerama.
3707 By default, Xinerama support will be compiled if
3708 available and the shared libraries are dynamically
3711 $XCN -no-xcursor ........ Do not compile Xcursor support.
3712 $XCY -xcursor ........... Compile Xcursor support.
3713 Requires X11/Xcursor/Xcursor.h and libXcursor.
3714 By default, Xcursor support will be compiled if
3715 available and the shared libraries are dynamically
3718 $XFN -no-xfixes ......... Do not compile Xfixes support.
3719 $XFY -xfixes ............ Compile Xfixes support.
3720 Requires X11/extensions/Xfixes.h and libXfixes.
3721 By default, Xfixes support will be compiled if
3722 available and the shared libraries are dynamically
3725 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3726 $XZY -xrandr ............ Compile Xrandr support.
3727 Requires X11/extensions/Xrandr.h and libXrandr.
3729 $XRN -no-xrender ........ Do not compile Xrender support.
3730 $XRY -xrender ........... Compile Xrender support.
3731 Requires X11/extensions/Xrender.h and libXrender.
3733 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3734 $XMY -mitshm ............ Compile MIT-SHM support.
3735 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3737 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3738 $FCGY -fontconfig ........ Compile FontConfig support.
3739 Requires fontconfig/fontconfig.h, libfontconfig,
3740 freetype.h and libfreetype.
3742 $XIN -no-xinput ......... Do not compile Xinput support.
3743 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3744 which requires IRIX with wacom.h and libXi or
3745 XFree86 with X11/extensions/XInput.h and libXi.
3747 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3748 $XKY -xkb ............... Compile XKB support.
3753 if [ "$BUILD_ON_MAC" = "yes" ]; then
3758 -Fstring ........... Add an explicit framework path.
3759 -fw string ......... Add an explicit framework.
3761 * -framework ......... Build Qt as a series of frameworks and
3762 link tools against those frameworks.
3763 -no-framework ...... Do not build Qt as a series of frameworks.
3765 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3766 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3768 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3769 Only one arch value can be specified.
3771 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3772 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3774 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3775 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3776 QT_ENABLE_HARFBUZZ environment variable.
3781 if [ "$PLATFORM_QPA" = "yes" ]; then
3787 if [ "$PLATFORM_QPA" = "yes" ]; then
3790 -xplatform target ... The target platform when cross-compiling.
3792 -no-feature-<feature> Do not compile in <feature>.
3793 -feature-<feature> .. Compile in <feature>. The available features
3794 are described in src/corelib/global/qfeatures.txt
3796 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3797 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3799 The floating point format is usually autodetected by configure. Use this
3800 to override the detected value.
3802 -little-endian ...... Target platform is little endian (LSB first).
3803 -big-endian ......... Target platform is big endian (MSB first).
3805 -host-little-endian . Host platform is little endian (LSB first).
3806 -host-big-endian .... Host platform is big endian (MSB first).
3808 You only need to specify the endianness when
3809 cross-compiling, otherwise the host
3810 endianness will be used.
3812 -no-freetype ........ Do not compile in Freetype2 support.
3813 -qt-freetype ........ Use the libfreetype bundled with Qt.
3814 * -system-freetype .... Use libfreetype from the operating system.
3815 See http://www.freetype.org/
3817 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3818 default ($CFG_QCONFIG).
3820 -no-opengl .......... Do not support OpenGL.
3821 -opengl <api> ....... Enable OpenGL ES support
3822 With no parameter, this will attempt to auto-detect
3823 OpenGL ES 2, or regular desktop OpenGL.
3824 Use es2 for <api> to override auto-detection.
3828 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3829 if [ "$CFG_GLIB" = "no" ]; then
3837 $GBN -no-glib ........... Do not compile Glib support.
3838 $GBY -glib .............. Compile Glib support.
3843 [ "x$ERROR" = "xyes" ] && exit 1
3848 # -----------------------------------------------------------------------------
3849 # LICENSING, INTERACTIVE PART
3850 # -----------------------------------------------------------------------------
3852 if [ "$PLATFORM_QPA" = "yes" ]; then
3853 Platform="Qt Lighthouse"
3854 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3855 Platform="Qt for Windows"
3856 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3858 Platform="Qt for Linux/X11"
3862 echo "This is the $Platform ${EditionString} Edition."
3865 if [ "$Edition" = "OpenSource" ]; then
3867 echo "You are licensed to use this software under the terms of"
3868 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3869 if [ -f "$relpath/LICENSE.GPL3" ]; then
3870 echo "You are also licensed to use this software under the terms of"
3871 echo "the GNU General Public License (GPL) versions 3."
3877 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3878 echo "You have already accepted the terms of the $LicenseType license."
3881 if [ -f "$relpath/LICENSE.GPL3" ]; then
3882 echo "Type '3' to view the GNU General Public License version 3."
3884 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3885 echo "Type 'yes' to accept this license offer."
3886 echo "Type 'no' to decline this license offer."
3888 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3892 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3894 elif [ "$acceptance" = "no" ]; then
3895 echo "You are not licensed to use this software."
3898 elif [ "$acceptance" = "3" ]; then
3899 more "$relpath/LICENSE.GPL3"
3900 elif [ "$acceptance" = "L" ]; then
3901 more "$relpath/LICENSE.LGPL"
3904 elif [ "$Edition" = "Preview" ]; then
3905 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3908 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3909 echo "You have already accepted the terms of the $LicenseType license."
3912 echo "You are licensed to use this software under the terms of"
3913 echo "the $TheLicense"
3915 echo "Type '?' to read the Preview License."
3916 echo "Type 'yes' to accept this license offer."
3917 echo "Type 'no' to decline this license offer."
3919 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3923 if [ "$acceptance" = "yes" ]; then
3925 elif [ "$acceptance" = "no" ] ;then
3926 echo "You are not licensed to use this software."
3929 elif [ "$acceptance" = "?" ]; then
3930 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3933 elif [ "$Edition" != "OpenSource" ]; then
3934 if [ -n "$ExpiryDate" ]; then
3935 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3936 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3937 Today=`date +%Y%m%d`
3938 if [ "$Today" -gt "$ExpiryDate" ]; then
3939 case "$LicenseType" in
3940 Commercial|Academic|Educational)
3941 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3943 echo "NOTICE NOTICE NOTICE NOTICE"
3945 echo " Your support and upgrade period has expired."
3947 echo " You are no longer licensed to use this version of Qt."
3948 echo " Please contact qt-info@nokia.com to renew your support"
3949 echo " and upgrades for this license."
3951 echo "NOTICE NOTICE NOTICE NOTICE"
3956 echo "WARNING WARNING WARNING WARNING"
3958 echo " Your support and upgrade period has expired."
3960 echo " You may continue to use your last licensed release"
3961 echo " of Qt under the terms of your existing license"
3962 echo " agreement. But you are not entitled to technical"
3963 echo " support, nor are you entitled to use any more recent"
3964 echo " Qt releases."
3966 echo " Please contact qt-info@nokia.com to renew your"
3967 echo " support and upgrades for this license."
3969 echo "WARNING WARNING WARNING WARNING"
3976 echo "NOTICE NOTICE NOTICE NOTICE"
3978 echo " Your Evaluation license has expired."
3980 echo " You are no longer licensed to use this software. Please"
3981 echo " contact qt-info@nokia.com to purchase license, or install"
3982 echo " the Qt Open Source Edition if you intend to develop free"
3985 echo "NOTICE NOTICE NOTICE NOTICE"
3992 TheLicense=`head -n 1 "$outpath/LICENSE"`
3994 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3995 echo "You have already accepted the terms of the $TheLicense."
3998 echo "You are licensed to use this software under the terms of"
3999 echo "the $TheLicense."
4001 echo "Type '?' to view the $TheLicense."
4002 echo "Type 'yes' to accept this license offer."
4003 echo "Type 'no' to decline this license offer."
4005 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4009 if [ "$acceptance" = "yes" ]; then
4011 elif [ "$acceptance" = "no" ]; then
4012 echo "You are not licensed to use this software."
4015 else [ "$acceptance" = "?" ]
4016 more "$outpath/LICENSE"
4021 # this should be moved somewhere else
4024 AIX_VERSION=`uname -v`
4025 if [ "$AIX_VERSION" -lt "5" ]; then
4026 QMakeVar add QMAKE_LIBS_X11 -lbind
4033 #-------------------------------------------------------------------------------
4034 # generate qconfig.cpp
4035 #-------------------------------------------------------------------------------
4036 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4038 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4040 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
4041 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
4043 /* Installation date */
4044 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
4046 /* Installation Info */
4047 static const char qt_configure_prefix_path_strs[][256 + 12] = {
4048 "qt_prfxpath=$QT_INSTALL_PREFIX",
4049 "qt_docspath=$QT_INSTALL_DOCS",
4050 "qt_hdrspath=$QT_INSTALL_HEADERS",
4051 "qt_libspath=$QT_INSTALL_LIBS",
4052 "qt_binspath=$QT_INSTALL_BINS",
4053 "qt_plugpath=$QT_INSTALL_PLUGINS",
4054 "qt_impspath=$QT_INSTALL_IMPORTS",
4055 "qt_datapath=$QT_INSTALL_DATA",
4056 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
4057 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
4058 "qt_tstspath=$QT_INSTALL_TESTS",
4059 #ifdef QT_BUILD_QMAKE
4060 "qt_ssrtpath=$CFG_SYSROOT",
4061 "qt_hpfxpath=$QT_HOST_PREFIX",
4062 "qt_hbinpath=$QT_HOST_BINS",
4063 "qt_hdatpath=$QT_HOST_DATA",
4066 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
4069 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4071 /* strlen( "qt_lcnsxxxx" ) == 12 */
4072 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4073 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4075 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4078 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4079 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4080 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4082 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4083 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4084 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4087 # -----------------------------------------------------------------------------
4088 if [ "$LicenseType" = "Evaluation" ]; then
4089 EVALKEY=qt_qevalkey=$LicenseKeyExt
4090 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4091 EVALKEY=qt_qevalkey=
4094 if [ -n "$EVALKEY" ]; then
4095 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4096 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4097 /* Evaluation license key */
4098 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4100 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4104 # -----------------------------------------------------------------------------
4106 # -----------------------------------------------------------------------------
4109 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4111 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4112 if [ "$OPT_SHADOW" = "yes" ]; then
4113 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4114 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4115 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4119 # $1: input variable name (awk regexp)
4120 # $2: optional output variable name
4121 # $3: optional value transformation (sed command)
4122 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4123 # is where the resulting variable is written to
4124 setBootstrapVariable()
4126 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
4130 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4131 echo "Creating qmake. Please wait..."
4134 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4135 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4136 if [ -f "$QCONFIG_H" ]; then
4137 OLD_QCONFIG_H=$QCONFIG_H
4138 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4141 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4142 # when building qmake, we use #defines for the install paths,
4143 # however they are real functions in the library
4144 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4145 mkdir -p "$outpath/src/corelib/global"
4146 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4147 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4150 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4152 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4153 rm -rf mkspecs/default
4154 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4156 for mkfile in GNUmakefile Makefile; do
4159 in_mkfile="${mkfile}.in"
4160 if [ "$mkfile" = "Makefile" ]; then
4161 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4162 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4164 in_mkfile="${mkfile}.unix"
4166 in_mkfile="$relpath/qmake/$in_mkfile"
4167 mkfile="$outpath/qmake/$mkfile"
4168 if [ -f "$mkfile" ]; then
4169 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4172 [ -f "$in_mkfile" ] || continue
4174 echo "########################################################################" > "$mkfile"
4175 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4176 echo "########################################################################" >> "$mkfile"
4179 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4180 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4181 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4183 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4184 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4187 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
4188 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
4189 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
4190 setBootstrapVariable QMAKE_CFLAGS
4191 setBootstrapVariable QMAKE_CXXFLAGS
4192 setBootstrapVariable QMAKE_LFLAGS
4194 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4195 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4196 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4198 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4199 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4200 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
4201 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4202 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4203 elif [ "$CFG_DEBUG" = "yes" ]; then
4204 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4205 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
4206 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4207 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4210 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
4211 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
4212 for rpath in $RPATH_FLAGS; do
4213 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4216 if [ "$BUILD_ON_MAC" = "yes" ]; then
4217 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4218 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4219 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4220 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4221 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4222 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4223 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4224 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4225 if [ '!' -z "$CFG_SDK" ]; then
4226 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4227 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4228 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4229 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4230 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4233 if [ '!' -z "$D_FLAGS" ]; then
4234 for DEF in $D_FLAGS; do
4235 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4238 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4239 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4240 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4241 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4243 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4244 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4245 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4246 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4247 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4248 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4249 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4250 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4251 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4252 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4254 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4255 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4256 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4257 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4262 QMAKE_BUILD_ERROR=no
4263 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4264 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4265 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4266 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4269 #-------------------------------------------------------------------------------
4270 # tests that need qmake
4271 #-------------------------------------------------------------------------------
4273 # detect availability of float math.h functions
4274 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4275 CFG_USE_FLOATMATH=yes
4277 CFG_USE_FLOATMATH=no
4280 # detect mmx support
4281 if [ "${CFG_MMX}" = "auto" ]; then
4282 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4289 # detect 3dnow support
4290 if [ "${CFG_3DNOW}" = "auto" ]; then
4291 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4298 # detect sse support
4299 if [ "${CFG_SSE}" = "auto" ]; then
4300 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4307 # detect sse2 support
4308 if [ "${CFG_SSE2}" = "auto" ]; then
4309 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4316 # detect sse3 support
4317 if [ "${CFG_SSE3}" = "auto" ]; then
4318 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4325 # detect ssse3 support
4326 if [ "${CFG_SSSE3}" = "auto" ]; then
4327 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4334 # detect sse4.1 support
4335 if [ "${CFG_SSE4_1}" = "auto" ]; then
4336 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
4343 # detect sse4.2 support
4344 if [ "${CFG_SSE4_2}" = "auto" ]; then
4345 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
4352 # detect avx support
4353 if [ "${CFG_AVX}" = "auto" ]; then
4354 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4361 # check iWMMXt support
4362 if [ "$CFG_IWMMXT" = "yes" ]; then
4363 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4364 if [ $? != "0" ]; then
4365 echo "The iWMMXt functionality test failed!"
4366 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4371 # detect neon support
4372 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4373 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
4380 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4383 if [ "$CFG_ZLIB" = "no" ]; then
4384 # Note: Qt no longer support builds without zlib
4385 # So we force a "no" to be "auto" here.
4386 # If you REALLY really need no zlib support, you can still disable
4387 # it by doing the following:
4388 # add "no-zlib" to mkspecs/qconfig.pri
4389 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4391 # There's no guarantee that Qt will build under those conditions
4396 if [ "$CFG_ZLIB" = "auto" ]; then
4397 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
4404 if [ "$CFG_LARGEFILE" = "auto" ]; then
4405 #Large files should be enabled for all Linux systems
4409 # detect how jpeg should be built
4410 if [ "$CFG_JPEG" = "auto" ]; then
4411 if [ "$CFG_SHARED" = "yes" ]; then
4418 if [ "$CFG_LIBJPEG" = "auto" ]; then
4419 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
4426 # detect how gif should be built
4427 if [ "$CFG_GIF" = "auto" ]; then
4428 if [ "$CFG_SHARED" = "yes" ]; then
4436 if [ "$CFG_LIBPNG" = "auto" ]; then
4437 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
4444 # detect accessibility
4445 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4446 CFG_ACCESSIBILITY=yes
4449 # auto-detect SQL-modules support
4450 for _SQLDR in $CFG_SQL_AVAILABLE; do
4453 if [ "$CFG_SQL_mysql" != "no" ]; then
4454 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4455 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4456 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4457 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4458 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4459 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4460 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4462 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4463 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4464 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4465 echo " You need MySql 4 or higher."
4466 echo " If you believe this message is in error you may use the continue"
4467 echo " switch (-continue) to $0 to continue."
4472 QT_LFLAGS_MYSQL_R=""
4476 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
4477 QMakeVar add CONFIG use_libmysqlclient_r
4478 if [ "$CFG_SQL_mysql" = "auto" ]; then
4479 CFG_SQL_mysql=plugin
4481 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4482 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
4483 if [ "$CFG_SQL_mysql" = "auto" ]; then
4484 CFG_SQL_mysql=plugin
4487 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4488 echo "MySQL support cannot be enabled due to functionality tests!"
4489 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4490 echo " If you believe this message is in error you may use the continue"
4491 echo " switch (-continue) to $0 to continue."
4496 QT_LFLAGS_MYSQL_R=""
4504 if [ "$CFG_SQL_psql" != "no" ]; then
4505 # Be careful not to use native pg_config when cross building.
4506 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4507 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4508 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4510 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4511 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4512 # But, respect PSQL_LIBS if set
4513 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4514 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
4515 if [ "$CFG_SQL_psql" = "auto" ]; then
4519 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4520 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4521 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4522 echo " If you believe this message is in error you may use the continue"
4523 echo " switch (-continue) to $0 to continue."
4534 if [ "$CFG_SQL_odbc" != "no" ]; then
4535 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
4536 if [ "$CFG_SQL_odbc" = "auto" ]; then
4540 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
4541 QT_LFLAGS_ODBC="-liodbc"
4542 if [ "$CFG_SQL_odbc" = "auto" ]; then
4546 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4547 echo "ODBC support cannot be enabled due to functionality tests!"
4548 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4549 echo " If you believe this message is in error you may use the continue"
4550 echo " switch (-continue) to $0 to continue."
4560 if [ "$CFG_SQL_oci" != "no" ]; then
4561 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
4562 if [ "$CFG_SQL_oci" = "auto" ]; then
4566 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4567 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4568 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4569 echo " If you believe this message is in error you may use the continue"
4570 echo " switch (-continue) to $0 to continue."
4579 if [ "$CFG_SQL_tds" != "no" ]; then
4580 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4581 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4582 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
4583 if [ "$CFG_SQL_tds" = "auto" ]; then
4587 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4588 echo "TDS support cannot be enabled due to functionality tests!"
4589 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4590 echo " If you believe this message is in error you may use the continue"
4591 echo " switch (-continue) to $0 to continue."
4600 if [ "$CFG_SQL_db2" != "no" ]; then
4601 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
4602 if [ "$CFG_SQL_db2" = "auto" ]; then
4606 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4607 echo "ODBC support cannot be enabled due to functionality tests!"
4608 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4609 echo " If you believe this message is in error you may use the continue"
4610 echo " switch (-continue) to $0 to continue."
4619 if [ "$CFG_SQL_ibase" != "no" ]; then
4620 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
4621 if [ "$CFG_SQL_ibase" = "auto" ]; then
4622 CFG_SQL_ibase=plugin
4625 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4626 echo "InterBase support cannot be enabled due to functionality tests!"
4627 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4628 echo " If you believe this message is in error you may use the continue"
4629 echo " switch (-continue) to $0 to continue."
4638 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4639 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
4640 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4641 CFG_SQL_sqlite2=plugin
4644 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4645 echo "SQLite2 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."
4657 if [ "$CFG_SQL_sqlite" != "no" ]; then
4658 SQLITE_AUTODETECT_FAILED="no"
4659 if [ "$CFG_SQLITE" = "system" ]; then
4660 if [ -n "$PKG_CONFIG" ]; then
4661 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4662 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4664 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
4665 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4666 CFG_SQL_sqlite=plugin
4668 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4670 SQLITE_AUTODETECT_FAILED="yes"
4673 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4674 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4675 CFG_SQL_sqlite=plugin
4678 SQLITE_AUTODETECT_FAILED="yes"
4682 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4683 echo "SQLite support cannot be enabled due to functionality tests!"
4684 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4685 echo " If you believe this message is in error you may use the continue"
4686 echo " switch (-continue) to $0 to continue."
4692 if [ "$OPT_VERBOSE" = "yes" ]; then
4693 echo "unknown SQL driver: $_SQLDR"
4699 # auto-detect NIS support
4700 if [ "$CFG_NIS" != "no" ]; then
4701 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
4704 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4705 echo "NIS support cannot be enabled due to functionality tests!"
4706 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4707 echo " If you believe this message is in error you may use the continue"
4708 echo " switch (-continue) to $0 to continue."
4716 # auto-detect CUPS support
4717 if [ "$CFG_CUPS" != "no" ]; then
4718 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
4721 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4722 echo "Cups support cannot be enabled due to functionality tests!"
4723 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4724 echo " If you believe this message is in error you may use the continue"
4725 echo " switch (-continue) to $0 to continue."
4733 # auto-detect iconv(3) support
4734 if [ "$CFG_ICONV" != "no" ]; then
4735 if [ "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
4737 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
4739 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
4741 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
4744 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4745 echo "Iconv support cannot be enabled due to functionality tests!"
4746 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4747 echo " If you believe this message is in error you may use the continue"
4748 echo " switch (-continue) to $0 to continue."
4756 # auto-detect libdbus-1 support
4757 if [ "$CFG_DBUS" != "no" ]; then
4758 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4759 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4760 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4762 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
4763 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4764 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4765 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4767 if [ "$CFG_DBUS" = "auto" ]; then
4769 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4770 # CFG_DBUS is "yes" or "linked" here
4772 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4773 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4774 echo " If you believe this message is in error you may use the continue"
4775 echo " switch (-continue) to $0 to continue."
4782 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4784 # auto-detect Glib support
4785 if [ "$CFG_GLIB" != "no" ]; then
4786 if [ -n "$PKG_CONFIG" ]; then
4787 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4788 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4790 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
4792 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4793 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4795 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4796 echo "Glib support cannot be enabled due to functionality tests!"
4797 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4798 echo " If you believe this message is in error you may use the continue"
4799 echo " switch (-continue) to $0 to continue."
4808 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4809 if [ -n "$PKG_CONFIG" ]; then
4810 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4811 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4813 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
4815 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4816 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4818 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4819 echo "Gstreamer support cannot be enabled due to functionality tests!"
4820 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4821 echo " If you believe this message is in error you may use the continue"
4822 echo " switch (-continue) to $0 to continue."
4828 elif [ "$CFG_GLIB" = "no" ]; then
4832 # auto-detect libicu support
4833 if [ "$CFG_ICU" != "no" ]; then
4834 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4835 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4837 if [ "$CFG_ICU" = "auto" ]; then
4839 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4842 echo "The ICU library support cannot be enabled."
4843 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4844 echo " If you believe this message is in error you may use the continue"
4845 echo " switch (-continue) to $0 to continue."
4851 # Auto-detect PulseAudio support
4852 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4853 if [ -n "$PKG_CONFIG" ]; then
4854 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4855 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4857 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
4859 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4860 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4862 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4863 echo "PulseAudio support cannot be enabled due to functionality tests!"
4864 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4865 echo " If you believe this message is in error you may use the continue"
4866 echo " switch (-continue) to $0 to continue."
4876 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4877 x11tests="$relpath/config.tests/x11"
4880 # work around broken X11 headers when using GCC 2.95 or later
4882 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4883 if [ $NOTYPE = "yes" ]; then
4884 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4885 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4888 # Check we actually have X11 :-)
4889 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4890 if [ $? != "0" ]; then
4891 echo "Basic XLib functionality test failed!"
4892 echo " You might need to modify the include and library search paths by editing"
4893 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4899 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4900 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4901 if [ "$CFG_GUI" = "no" ]; then
4902 if [ "$CFG_OPENGL" = "auto" ]; then
4905 if [ "$CFG_OPENGL" != "no" ]; then
4906 echo "OpenGL enabled, but GUI disabled."
4907 echo " You might need to either enable the GUI or disable OpenGL"
4911 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4912 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
4914 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
4916 if [ "$CFG_EGL" = "no" ]; then
4920 if [ "$CFG_OPENGL" = "yes" ]; then
4921 echo "All the OpenGL functionality tests failed!"
4922 echo " You might need to modify the include and library search paths by editing"
4923 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4924 echo " ${XQMAKESPEC}."
4931 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4932 if [ "$CFG_OPENGL" = "desktop" ]; then
4933 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4934 if [ $? != "0" ]; then
4935 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4942 elif [ "$CFG_OPENGL" = "es2" ]; then
4944 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4945 if [ $? != "0" ]; then
4946 echo "The OpenGL ES 2.0 functionality test failed!"
4947 echo " You might need to modify the include and library search paths by editing"
4948 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4949 echo " ${XQMAKESPEC}."
4952 elif [ "$CFG_OPENGL" = "desktop" ]; then
4953 # Desktop OpenGL support
4954 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4955 if [ $? != "0" ]; then
4956 echo "The OpenGL functionality test failed!"
4957 echo " You might need to modify the include and library search paths by editing"
4958 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4959 echo " ${XQMAKESPEC}."
4964 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4965 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4966 if [ $? != "0" ]; then
4967 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4974 fi # X11/MINGW OpenGL
4977 if [ "$PLATFORM_X11" = "yes" ]; then
4978 # auto-detect Xcursor support
4979 if [ "$CFG_XCURSOR" != "no" ]; then
4980 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
4981 if [ "$CFG_XCURSOR" != "runtime" ]; then
4985 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4986 echo "Xcursor support cannot be enabled due to functionality tests!"
4987 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4988 echo " If you believe this message is in error you may use the continue"
4989 echo " switch (-continue) to $0 to continue."
4997 # auto-detect Xfixes support
4998 if [ "$CFG_XFIXES" != "no" ]; then
4999 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5000 if [ "$CFG_XFIXES" != "runtime" ]; then
5004 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5005 echo "Xfixes support cannot be enabled due to functionality tests!"
5006 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5007 echo " If you believe this message is in error you may use the continue"
5008 echo " switch (-continue) to $0 to continue."
5016 # auto-detect Xrandr support (resize and rotate extension)
5017 if [ "$CFG_XRANDR" != "no" ]; then
5018 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
5019 if [ "$CFG_XRANDR" != "runtime" ]; then
5023 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5024 echo "Xrandr support cannot be enabled due to functionality tests!"
5025 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5026 echo " If you believe this message is in error you may use the continue"
5027 echo " switch (-continue) to $0 to continue."
5035 # auto-detect Xrender support
5036 if [ "$CFG_XRENDER" != "no" ]; then
5037 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
5040 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5041 echo "Xrender support cannot be enabled due to functionality tests!"
5042 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5043 echo " If you believe this message is in error you may use the continue"
5044 echo " switch (-continue) to $0 to continue."
5052 # auto-detect MIT-SHM support
5053 if [ "$CFG_MITSHM" != "no" ]; then
5054 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
5057 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5058 echo "MITSHM support cannot be enabled due to functionality tests!"
5059 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5060 echo " If you believe this message is in error you may use the continue"
5061 echo " switch (-continue) to $0 to continue."
5069 # auto-detect FontConfig support
5070 if [ "$CFG_FONTCONFIG" != "no" ]; then
5071 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5072 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5073 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5075 QT_CFLAGS_FONTCONFIG=
5076 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5078 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
5080 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5081 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5082 CFG_LIBFREETYPE=system
5084 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5085 echo "FontConfig support cannot be enabled due to functionality tests!"
5086 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5087 echo " If you believe this message is in error you may use the continue"
5088 echo " switch (-continue) to $0 to continue."
5096 # auto-detect Session Management support
5097 if [ "$CFG_SM" = "auto" ]; then
5098 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
5101 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5102 echo "Session Management support cannot be enabled due to functionality tests!"
5103 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5104 echo " If you believe this message is in error you may use the continue"
5105 echo " switch (-continue) to $0 to continue."
5113 # auto-detect SHAPE support
5114 if [ "$CFG_XSHAPE" != "no" ]; then
5115 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
5118 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5119 echo "XShape support cannot be enabled due to functionality tests!"
5120 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5121 echo " If you believe this message is in error you may use the continue"
5122 echo " switch (-continue) to $0 to continue."
5130 # auto-detect XVideo support
5131 if [ "$CFG_XVIDEO" != "no" ]; then
5132 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
5135 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5136 echo "XVideo support cannot be enabled due to functionality tests!"
5137 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5138 echo " If you believe this message is in error you may use the continue"
5139 echo " switch (-continue) to $0 to continue."
5147 # auto-detect XSync support
5148 if [ "$CFG_XSYNC" != "no" ]; then
5149 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
5152 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5153 echo "XSync support cannot be enabled due to functionality tests!"
5154 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5155 echo " If you believe this message is in error you may use the continue"
5156 echo " switch (-continue) to $0 to continue."
5164 # auto-detect Xinerama support
5165 if [ "$CFG_XINERAMA" != "no" ]; then
5166 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
5167 if [ "$CFG_XINERAMA" != "runtime" ]; then
5171 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5172 echo "Xinerama support cannot be enabled due to functionality tests!"
5173 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5174 echo " If you believe this message is in error you may use the continue"
5175 echo " switch (-continue) to $0 to continue."
5183 # auto-detect Xinput support
5184 if [ "$CFG_XINPUT" != "no" ]; then
5185 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
5186 if [ "$CFG_XINPUT" != "runtime" ]; then
5190 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5191 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5192 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5193 echo " If you believe this message is in error you may use the continue"
5194 echo " switch (-continue) to $0 to continue."
5202 # auto-detect XKB support
5203 if [ "$CFG_XKB" != "no" ]; then
5204 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
5207 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5208 echo "XKB support cannot be enabled due to functionality tests!"
5209 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5210 echo " If you believe this message is in error you may use the continue"
5211 echo " switch (-continue) to $0 to continue."
5219 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5220 if [ -n "$PKG_CONFIG" ]; then
5221 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5222 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5224 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5226 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5227 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5229 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5230 echo "Gtk theme support cannot be enabled due to functionality tests!"
5231 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5232 echo " If you believe this message is in error you may use the continue"
5233 echo " switch (-continue) to $0 to continue."
5239 elif [ "$CFG_GLIB" = "no" ]; then
5245 if [ "$BUILD_ON_MAC" = "yes" ]; then
5246 if [ "$CFG_PHONON" != "no" ]; then
5247 # Always enable Phonon (unless it was explicitly disabled)
5251 if [ "$CFG_COREWLAN" = "auto" ]; then
5252 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
5261 if [ "$PLATFORM_QPA" = "yes" ]; then
5262 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5263 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5264 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
5266 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
5269 if [ "$CFG_OPENGL" = "yes" ]; then
5270 echo "All the OpenGL functionality tests failed!"
5271 echo " You might need to modify the include and library search paths by editing"
5272 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5273 echo " ${XQMAKESPEC}."
5278 elif [ "$CFG_OPENGL" = "es2" ]; then
5280 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5281 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5282 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5283 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5284 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5285 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5286 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5287 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5290 "$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
5291 if [ $? != "0" ]; then
5292 echo "The OpenGL ES 2.0 functionality test failed!"
5293 echo " You might need to modify the include and library search paths by editing"
5294 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5295 echo " ${XQMAKESPEC}."
5298 elif [ "$CFG_OPENGL" = "desktop" ]; then
5299 # Desktop OpenGL support
5300 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5301 if [ $? != "0" ]; then
5302 echo "The OpenGL functionality test failed!"
5303 echo " You might need to modify the include and library search paths by editing"
5304 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5305 echo " ${XQMAKESPEC}."
5310 # auto-detect FontConfig support
5311 if [ "$CFG_FONTCONFIG" != "no" ]; then
5312 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5313 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5314 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5316 QT_CFLAGS_FONTCONFIG=
5317 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5319 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
5320 QT_CONFIG="$QT_CONFIG fontconfig"
5321 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5322 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5323 CFG_LIBFREETYPE=system
5328 # Save these for a check later
5329 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5330 ORIG_CFG_XCB="$CFG_XCB"
5332 if [ "$CFG_WAYLAND" != "no" ]; then
5333 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5334 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5335 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5336 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --cflags-only-I wayland-client 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5337 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --libs-only-L wayland-client 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5339 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
5341 QT_CONFIG="$QT_CONFIG wayland"
5342 elif [ "$CFG_WAYLAND" = "yes" ]; then
5343 echo "The Wayland functionality test failed!"
5347 QMakeVar add DEFINES QT_NO_WAYLAND
5351 if [ "$CFG_LIBUDEV" != "no" ]; then
5352 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5354 QT_CONFIG="$QT_CONFIG libudev"
5355 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5356 echo "The libudev functionality test failed!"
5360 QMakeVar add DEFINES QT_NO_LIBUDEV
5364 if [ "$CFG_EVDEV" != "no" ]; then
5365 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5367 QT_CONFIG="$QT_CONFIG evdev"
5368 elif [ "$CFG_EVDEV" = "yes" ]; then
5369 echo "The evdev functionality test failed!"
5373 QMakeVar add DEFINES QT_NO_EVDEV
5377 # Check we actually have X11 :-)
5378 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
5379 QT_CONFIG="$QT_CONFIG xlib"
5382 # auto-detect Xrender support
5383 if [ "$CFG_XRENDER" != "no" ]; then
5384 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
5386 QT_CONFIG="$QT_CONFIG xrender"
5388 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5389 echo "Xrender support cannot be enabled due to functionality tests!"
5390 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5391 echo " If you believe this message is in error you may use the continue"
5392 echo " switch (-continue) to $0 to continue."
5400 if [ "$CFG_XCB" != "no" ]; then
5401 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then
5402 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5403 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5405 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
5407 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
5408 QT_CONFIG="$QT_CONFIG xcb-render"
5411 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
5413 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5416 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
5417 QT_CONFIG="$QT_CONFIG xcb-xlib"
5420 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5421 # auto-detect XInput2/Xinput support
5422 if [ "$CFG_XINPUT2" != "no" ]; then
5423 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
5427 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5428 echo "XInput2 support cannot be enabled due to functionality tests!"
5429 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5430 echo " If you believe this message is in error you may use the continue"
5431 echo " switch (-continue) to $0 to continue."
5440 if [ "$CFG_XCB" = "yes" ]; then
5441 echo "The XCB test failed!"
5442 echo " You might need to install dependency packages."
5443 echo " See src/plugins/platforms/xcb/README."
5447 QMakeVar add DEFINES QT_NO_XCB
5451 # Detect libxkbcommon
5452 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5453 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5454 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5455 if [ "$CFG_WAYLAND" = "yes" ]; then
5456 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5457 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5459 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5460 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5462 if [ "$CFG_WAYLAND" = "yes" ]; then
5463 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5465 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5468 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5469 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5470 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5471 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5472 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5473 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5474 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5477 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5478 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5479 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5480 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5483 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
5484 QT_CONFIG="$QT_CONFIG coreservices"
5486 QMakeVar add DEFINES QT_NO_CORESERVICES
5489 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5490 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5491 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5492 echo "No QPA platform plugin enabled!"
5493 echo " If you really want to build without a QPA platform plugin you must pass"
5494 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5495 echo " cannot run GUI applications."
5505 if [ "$PLATFORM_X11" = "yes" ]; then
5506 if [ "$CFG_EGL" != "no" ]; then
5507 # detect EGL support
5508 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
5509 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5514 if [ "$EGL_VARIANT" = "none" ]; then
5515 if [ "$CFG_EGL" = "yes" ]; then
5516 echo "The EGL functionality test failed!"
5517 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5518 echo " You might need to modify the include and library search paths by editing"
5519 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5520 echo " ${XQMAKESPEC}."
5524 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5525 if [ "$CFG_OPENGL" = "es2" ]; then
5532 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5535 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5536 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5537 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
5538 CFG_LIBFREETYPE=system
5544 if [ "$CFG_ENDIAN" = "auto" ]; then
5545 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5546 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5548 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
5550 if [ "$F" -eq 0 ]; then
5551 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5552 elif [ "$F" -eq 1 ]; then
5553 CFG_ENDIAN="Q_BIG_ENDIAN"
5556 echo "The target system byte order could not be detected!"
5557 echo "Turn on verbose messaging (-v) to see the final report."
5558 echo "You can use the -little-endian or -big-endian switch to"
5559 echo "$0 to continue."
5565 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5566 if [ "$BUILD_ON_MAC" = "yes" ]; then
5569 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5571 if [ "$F" -eq 0 ]; then
5572 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5573 elif [ "$F" -eq 1 ]; then
5574 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5577 echo "The host system byte order could not be detected!"
5578 echo "Turn on verbose messaging (-v) to see the final report."
5579 echo "You can use the -host-little-endian or -host-big-endian switch to"
5580 echo "$0 to continue."
5586 if [ "$CFG_ARMFPA" != "auto" ]; then
5587 if [ "$CFG_ARMFPA" = "yes" ]; then
5588 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5589 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5591 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5594 CFG_DOUBLEFORMAT="normal"
5599 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5600 if [ "$PLATFORM_QPA" = "yes" ]; then
5601 CFG_DOUBLEFORMAT=normal
5603 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5605 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5606 CFG_DOUBLEFORMAT=normal
5607 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5608 CFG_DOUBLEFORMAT=normal
5609 elif [ "$F" -eq 10 ]; then
5610 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
5611 elif [ "$F" -eq 11 ]; then
5612 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
5613 elif [ "$F" -eq 12 ]; then
5614 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5616 elif [ "$F" -eq 13 ]; then
5617 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5621 echo "The system floating point format could not be detected."
5622 echo "This may cause data to be generated in a wrong format"
5623 echo "Turn on verbose messaging (-v) to see the final report."
5624 # we do not fail on this since this is a new test, and if it fails,
5625 # the old behavior should be correct in most cases
5626 CFG_DOUBLEFORMAT=normal
5632 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5636 if [ "$CFG_STL" != "no" ]; then
5637 if [ "$HAVE_STL" = "yes" ]; then
5640 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5641 echo "STL support cannot be enabled due to functionality tests!"
5642 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5643 echo " If you believe this message is in error you may use the continue"
5644 echo " switch (-continue) to $0 to continue."
5652 # detect POSIX clock_gettime()
5653 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5654 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
5655 CFG_CLOCK_GETTIME=yes
5657 CFG_CLOCK_GETTIME=no
5661 # detect POSIX monotonic clocks
5662 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5663 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
5664 CFG_CLOCK_MONOTONIC=yes
5666 CFG_CLOCK_MONOTONIC=no
5668 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5669 CFG_CLOCK_MONOTONIC=no
5673 if [ "$CFG_MREMAP" = "auto" ]; then
5674 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5681 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5682 if [ "$CFG_GETADDRINFO" != "no" ]; then
5683 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5686 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5687 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5688 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5689 echo " If you believe this message is in error you may use the continue"
5690 echo " switch (-continue) to $0 to continue."
5698 # find if the platform provides inotify
5699 if [ "$CFG_INOTIFY" != "no" ]; then
5700 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5703 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5704 echo "inotify support cannot be enabled due to functionality tests!"
5705 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5706 echo " If you believe this message is in error you may use the continue"
5707 echo " switch (-continue) to $0 to continue."
5715 # find if the platform provides if_nametoindex (ipv6 interface name support)
5716 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5717 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
5720 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5721 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5722 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5723 echo " If you believe this message is in error you may use the continue"
5724 echo " switch (-continue) to $0 to continue."
5732 # find if the platform provides getifaddrs (network interface enumeration)
5733 if [ "$CFG_GETIFADDRS" != "no" ]; then
5734 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5737 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5738 echo "getifaddrs support cannot be enabled due to functionality tests!"
5739 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5740 echo " If you believe this message is in error you may use the continue"
5741 echo " switch (-continue) to $0 to continue."
5750 if [ "$CFG_OPENSSL" != "no" ]; then
5751 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
5752 if [ "$CFG_OPENSSL" = "auto" ]; then
5756 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5757 echo "OpenSSL support cannot be enabled due to functionality tests!"
5758 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5759 echo " If you believe this message is in error you may use the continue"
5760 echo " switch (-continue) to $0 to continue."
5769 if [ "$CFG_PCRE" != "qt" ]; then
5770 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5773 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5774 echo "PCRE support cannot be enabled due to functionality tests!"
5775 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5776 echo " If you believe this message is in error you may use the continue"
5777 echo " switch (-continue) to $0 to continue."
5785 # detect OpenVG support
5786 if [ "$CFG_OPENVG" != "no" ]; then
5787 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
5788 if [ "$CFG_OPENVG" = "auto" ]; then
5791 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
5792 if [ "$CFG_OPENVG" = "auto" ]; then
5795 CFG_OPENVG_ON_OPENGL=yes
5796 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
5797 if [ "$CFG_OPENVG" = "auto" ]; then
5800 CFG_OPENVG_LC_INCLUDES=yes
5801 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
5802 if [ "$CFG_OPENVG" = "auto" ]; then
5805 CFG_OPENVG_LC_INCLUDES=yes
5806 CFG_OPENVG_ON_OPENGL=yes
5808 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5809 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5810 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5811 echo " If you believe this message is in error you may use the continue"
5812 echo " switch (-continue) to $0 to continue."
5818 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
5819 CFG_OPENVG_SHIVA=yes
5823 if [ "$CFG_ALSA" = "auto" ]; then
5824 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5831 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5832 if [ "$CFG_ARCH" = "arm" ]; then
5833 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5834 if [ $? != "0" ]; then
5835 CFG_JAVASCRIPTCORE_JIT=no
5838 case "$XPLATFORM" in
5840 CFG_JAVASCRIPTCORE_JIT=no
5846 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5847 QMakeVar set JAVASCRIPTCORE_JIT yes
5848 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5849 QMakeVar set JAVASCRIPTCORE_JIT no
5852 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5853 CFG_AUDIO_BACKEND=yes
5856 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5857 echo "Warning: largefile support cannot be disabled for win32."
5861 #-------------------------------------------------------------------------------
5862 # ask for all that hasn't been auto-detected or specified in the arguments
5863 #-------------------------------------------------------------------------------
5865 # enable dwarf2 support on Mac
5866 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5867 QT_CONFIG="$QT_CONFIG dwarf2"
5870 # Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
5871 if [ "$BUILD_ON_MAC" = "yes" ]; then
5872 DEFAULT_ARCH="$CFG_MAC_ARCHS"
5873 if [ -z "$DEFAULT_ARCH" ]; then
5874 case `file "${outpath}/bin/qmake"` in
5882 # unsupported/unknown
5886 if [ -n "$DEFAULT_ARCH" ]; then
5887 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5888 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5889 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5890 # Make the application arch follow the Qt arch for single arch builds.
5891 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
5892 [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5897 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5898 QT_CONFIG="$QT_CONFIG phonon-backend"
5901 # disable accessibility
5902 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5903 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5905 QT_CONFIG="$QT_CONFIG accessibility"
5908 # egl stuff does not belong in lighthouse, but rather in plugins
5909 if [ "$PLATFORM_QPA" = "yes" ]; then
5914 if [ "$CFG_EGL" = "no" ]; then
5915 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5917 QT_CONFIG="$QT_CONFIG egl"
5918 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5919 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5924 if [ "$CFG_OPENVG" = "no" ]; then
5925 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5927 QT_CONFIG="$QT_CONFIG openvg"
5928 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5929 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5931 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5932 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5934 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5935 QT_CONFIG="$QT_CONFIG shivavg"
5936 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5941 if [ "$CFG_OPENGL" = "no" ]; then
5942 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5944 QT_CONFIG="$QT_CONFIG opengl"
5947 if [ "$CFG_OPENGL" = "es2" ]; then
5948 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5951 if [ "$CFG_OPENGL" = "es2" ]; then
5952 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5953 QT_CONFIG="$QT_CONFIG opengles2"
5956 # safe execution environment
5957 if [ "$CFG_SXE" != "no" ]; then
5958 QT_CONFIG="$QT_CONFIG sxe"
5961 # build up the variables for output
5962 if [ "$CFG_DEBUG" = "yes" ]; then
5963 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5964 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5965 elif [ "$CFG_DEBUG" = "no" ]; then
5966 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5967 QMAKE_CONFIG="$QMAKE_CONFIG release"
5969 if [ "$CFG_SHARED" = "yes" ]; then
5970 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5971 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5972 elif [ "$CFG_SHARED" = "no" ]; then
5973 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5974 QMAKE_CONFIG="$QMAKE_CONFIG static"
5976 if [ "$PLATFORM_QPA" = "yes" ]; then
5977 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5978 QT_CONFIG="$QT_CONFIG qpa"
5979 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5980 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5983 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5984 # Do not set this here for Windows. Let qmake do it so
5985 # debug and release precompiled headers are kept separate.
5986 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5988 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5989 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5990 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5991 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5992 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5993 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5995 if [ "$CFG_STL" = "no" ]; then
5996 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5998 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6000 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6001 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6003 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6004 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6005 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6006 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6007 QMakeVar add QMAKE_CFLAGS -g
6008 QMakeVar add QMAKE_CXXFLAGS -g
6009 QT_CONFIG="$QT_CONFIG separate_debug_info"
6011 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6012 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6014 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6015 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6016 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6017 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6018 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6019 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6020 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6021 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6022 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6023 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6024 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6025 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6026 QT_CONFIG="$QT_CONFIG clock-gettime"
6028 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6029 QT_CONFIG="$QT_CONFIG clock-monotonic"
6031 if [ "$CFG_MREMAP" = "yes" ]; then
6032 QT_CONFIG="$QT_CONFIG mremap"
6034 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6035 QT_CONFIG="$QT_CONFIG getaddrinfo"
6037 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6038 QT_CONFIG="$QT_CONFIG ipv6ifname"
6040 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6041 QT_CONFIG="$QT_CONFIG getifaddrs"
6043 if [ "$CFG_INOTIFY" = "yes" ]; then
6044 QT_CONFIG="$QT_CONFIG inotify"
6046 if [ "$CFG_LIBJPEG" = "no" ]; then
6048 elif [ "$CFG_LIBJPEG" = "system" ]; then
6049 QT_CONFIG="$QT_CONFIG system-jpeg"
6051 if [ "$CFG_JPEG" = "no" ]; then
6052 QT_CONFIG="$QT_CONFIG no-jpeg"
6053 elif [ "$CFG_JPEG" = "yes" ]; then
6054 QT_CONFIG="$QT_CONFIG jpeg"
6056 if [ "$CFG_LIBPNG" = "no" ]; then
6059 if [ "$CFG_LIBPNG" = "system" ]; then
6060 QT_CONFIG="$QT_CONFIG system-png"
6062 if [ "$CFG_PNG" = "no" ]; then
6063 QT_CONFIG="$QT_CONFIG no-png"
6064 elif [ "$CFG_PNG" = "yes" ]; then
6065 QT_CONFIG="$QT_CONFIG png"
6067 if [ "$CFG_GIF" = "no" ]; then
6068 QT_CONFIG="$QT_CONFIG no-gif"
6069 elif [ "$CFG_GIF" = "yes" ]; then
6070 QT_CONFIG="$QT_CONFIG gif"
6072 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6073 QT_CONFIG="$QT_CONFIG no-freetype"
6074 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6075 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6076 QT_CONFIG="$QT_CONFIG system-freetype"
6078 QT_CONFIG="$QT_CONFIG freetype"
6080 if [ "$CFG_GUI" = "auto" ]; then
6083 if [ "$CFG_GUI" = "no" ]; then
6084 QT_CONFIG="$QT_CONFIG no-gui"
6086 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6090 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6091 #On Mac we implicitly link against libz, so we
6092 #never use the 3rdparty stuff.
6093 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6095 if [ "$CFG_ZLIB" = "yes" ]; then
6096 QT_CONFIG="$QT_CONFIG zlib"
6097 elif [ "$CFG_ZLIB" = "system" ]; then
6098 QT_CONFIG="$QT_CONFIG system-zlib"
6101 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6102 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6103 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6104 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6105 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6106 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6107 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6108 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6109 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6110 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6111 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6112 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6113 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6114 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6115 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6117 if [ "$PLATFORM_X11" = "yes" ]; then
6118 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6120 # for some reason, the following libraries are not always built shared,
6121 # so *every* program/lib (including Qt) has to link against them
6122 if [ "$CFG_XSHAPE" = "yes" ]; then
6123 QT_CONFIG="$QT_CONFIG xshape"
6125 if [ "$CFG_XVIDEO" = "yes" ]; then
6126 QT_CONFIG="$QT_CONFIG xvideo"
6128 if [ "$CFG_XSYNC" = "yes" ]; then
6129 QT_CONFIG="$QT_CONFIG xsync"
6131 if [ "$CFG_XINERAMA" = "yes" ]; then
6132 QT_CONFIG="$QT_CONFIG xinerama"
6133 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6135 if [ "$CFG_XCURSOR" = "yes" ]; then
6136 QT_CONFIG="$QT_CONFIG xcursor"
6137 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6139 if [ "$CFG_XFIXES" = "yes" ]; then
6140 QT_CONFIG="$QT_CONFIG xfixes"
6141 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6143 if [ "$CFG_XRANDR" = "yes" ]; then
6144 QT_CONFIG="$QT_CONFIG xrandr"
6145 if [ "$CFG_XRENDER" != "yes" ]; then
6146 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6147 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6149 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6152 if [ "$CFG_XRENDER" = "yes" ]; then
6153 QT_CONFIG="$QT_CONFIG xrender"
6154 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6156 if [ "$CFG_MITSHM" = "yes" ]; then
6157 QT_CONFIG="$QT_CONFIG mitshm"
6159 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6160 QT_CONFIG="$QT_CONFIG fontconfig"
6162 if [ "$CFG_XINPUT" = "yes" ]; then
6163 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6165 if [ "$CFG_XINPUT" = "yes" ]; then
6166 QT_CONFIG="$QT_CONFIG xinput tablet"
6168 if [ "$CFG_XKB" = "yes" ]; then
6169 QT_CONFIG="$QT_CONFIG xkb"
6173 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6174 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6175 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6177 if [ "$PLATFORM_MAC" = "yes" ]; then
6178 if [ "$CFG_RPATH" = "yes" ]; then
6179 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6181 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
6182 if [ -n "$RPATH_FLAGS" ]; then
6184 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6188 elif [ "$CFG_RPATH" = "yes" ]; then
6189 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6193 if [ "$CFG_RPATH" = "yes" ]; then
6194 # set the default rpath to the library installation directory
6195 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6197 if [ -n "$RPATH_FLAGS" ]; then
6198 # add the user defined rpaths
6199 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6203 if [ '!' -z "$I_FLAGS" ]; then
6204 # add the user define include paths
6205 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6206 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6209 if [ '!' -z "$W_FLAGS" ]; then
6210 # add the user defined warning flags
6211 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6212 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6213 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6216 # turn off exceptions for the compilers that support it
6217 if [ "$XPLATFORM" != "$PLATFORM" ]; then
6218 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6220 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6223 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6224 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6227 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6228 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6229 # Follow default behavior of configure.exe by overriding with "rtti".
6230 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6233 if [ "$CFG_ALSA" = "yes" ]; then
6234 QT_CONFIG="$QT_CONFIG alsa"
6237 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6238 QT_CONFIG="$QT_CONFIG pulseaudio"
6241 if [ "$CFG_COREWLAN" = "yes" ]; then
6242 QT_CONFIG="$QT_CONFIG corewlan"
6245 if [ "$CFG_ICU" = "yes" ]; then
6246 QT_CONFIG="$QT_CONFIG icu"
6249 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6250 QT_CONFIG="$QT_CONFIG force_asserts"
6253 if [ "$CFG_PCRE" = "qt" ]; then
6254 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6258 # Some Qt modules are too advanced in C++ for some old compilers
6259 # Detect here the platforms where they are known to work.
6261 # See Qt documentation for more information on which features are
6262 # supported and on which compilers.
6264 canBuildQtConcurrent="yes"
6265 canUseV8Snapshot="yes"
6267 case "$XPLATFORM" in
6269 # PA-RISC's assembly is too limited
6270 # gcc 3.4 on that platform can't build QtXmlPatterns
6271 # the assembly it generates cannot be compiled
6273 # Check gcc's version
6274 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6278 canBuildQtXmlPatterns="no"
6282 canBuildQtXmlPatterns="no"
6286 unsupported/vxworks-*-g++*)
6289 unsupported/vxworks-*-dcc*)
6291 canBuildQtXmlPatterns="no"
6294 # Check gcc's version
6295 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6303 canBuildQtXmlPatterns="no"
6308 # Check the compiler version
6309 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6312 canBuildQtXmlPatterns="no"
6313 canBuildQtConcurrent="no"
6317 canBuildQtConcurrent="no"
6323 canBuildQtXmlPatterns="no"
6324 canBuildQtConcurrent="no"
6330 # Get the xlC version
6331 cat > xlcver.c <<EOF
6335 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6340 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6341 xlcver=`./xlcver 2>/dev/null`
6344 if [ "$OPT_VERBOSE" = "yes" ]; then
6345 if [ -n "$xlcver" ]; then
6346 echo Found IBM xlC version: $xlcver.
6348 echo Could not determine IBM xlC version, assuming oldest supported.
6355 canBuildQtXmlPatterns="no"
6356 canBuildQtConcurrent="no"
6360 canBuildQtConcurrent="no"
6366 canBuildQtConcurrent="no"
6370 if [ "$CFG_GUI" = "no" ]; then
6371 # WebKit requires QtGui
6375 if [ "$CFG_SHARED" = "no" ]; then
6377 echo "WARNING: Using static linking will disable the WebKit module."
6382 CFG_CONCURRENT="yes"
6383 if [ "$canBuildQtConcurrent" = "no" ]; then
6384 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6387 QT_CONFIG="$QT_CONFIG concurrent"
6391 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6392 QT_CONFIG="$QT_CONFIG audio-backend"
6396 if [ "$CFG_WEBKIT" = "debug" ]; then
6397 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6401 QT_CONFIG="$QT_CONFIG v8"
6402 # Detect snapshot support
6403 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6404 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6407 *) canUseV8Snapshot="no"
6411 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6412 # QEMU crashes when building inside Scratchbox with an ARM target
6413 canUseV8Snapshot="no"
6416 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6417 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6419 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6420 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6423 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6424 QT_CONFIG="$QT_CONFIG v8snapshot"
6428 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6429 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6432 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6435 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6436 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6437 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6442 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6443 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6444 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6451 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6457 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6459 case "$COMPILER_VERSION" in
6461 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6462 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6463 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6466 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6467 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6468 QT_GCC_PATCH_VERSION=0
6478 #-------------------------------------------------------------------------------
6479 # part of configuration information goes into qconfig.h
6480 #-------------------------------------------------------------------------------
6482 case "$CFG_QCONFIG" in
6484 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6487 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6488 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6489 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6490 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6491 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6492 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6494 echo "#endif" >>"$tmpconfig"
6498 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6502 # define QT_EDITION $QT_EDITION
6505 /* Machine byte-order */
6506 #define Q_BIG_ENDIAN 4321
6507 #define Q_LITTLE_ENDIAN 1234
6510 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6511 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6512 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6513 #if defined(__BIG_ENDIAN__)
6514 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6515 #elif defined(__LITTLE_ENDIAN__)
6516 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6518 # error "Unable to determine byte order!"
6522 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6524 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6525 if [ "$CFG_ENDIAN" = "auto" ]; then
6526 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6527 #if defined(__BIG_ENDIAN__)
6528 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6529 #elif defined(__LITTLE_ENDIAN__)
6530 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6532 # error "Unable to determine byte order!"
6536 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6538 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6540 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6541 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6542 /* Non-IEEE double format */
6543 #define Q_DOUBLE_LITTLE "01234567"
6544 #define Q_DOUBLE_BIG "76543210"
6545 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6546 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6547 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6550 if [ "$CFG_ARMFPA" = "yes" ]; then
6551 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6552 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6553 #ifndef QT_BOOTSTRAPPED
6558 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6562 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6563 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6564 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6565 /* Machine Architecture */
6566 #ifndef QT_BOOTSTRAPPED
6567 # define QT_ARCH_${CFG_ARCH_STR}
6569 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6573 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6574 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6576 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6577 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6580 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6581 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6584 if [ "$BUILD_ON_MAC" = "yes" ]; then
6585 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6586 #if defined(__LP64__)
6587 # define QT_POINTER_SIZE 8
6589 # define QT_POINTER_SIZE 4
6593 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6594 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6597 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6598 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6599 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6603 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6605 if [ "$CFG_DEV" = "yes" ]; then
6606 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6609 if [ "$PLATFORM_QPA" = "yes" ]; then
6610 # Add QPA to config.h
6611 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6614 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6615 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6618 # Add turned on SQL drivers
6619 for DRIVER in $CFG_SQL_AVAILABLE; do
6620 eval "VAL=\$CFG_SQL_$DRIVER"
6623 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6624 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6625 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6628 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6634 QMakeVar set sql-drivers "$SQL_DRIVERS"
6635 QMakeVar set sql-plugins "$SQL_PLUGINS"
6637 # Add other configuration options to the qconfig.h file
6638 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6639 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6640 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6641 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6642 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6643 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6644 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6646 # X11/Unix/Mac only configs
6647 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6648 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6649 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6650 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6651 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6652 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6653 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6654 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6655 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6656 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6657 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6658 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6659 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6660 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6661 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6663 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6664 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6665 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6666 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6667 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6668 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6669 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6670 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6671 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6672 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6673 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6674 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6675 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6677 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6678 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6679 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6680 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6681 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6682 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6683 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6684 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6686 # sort QCONFIG_FLAGS for neatness if we can
6687 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6688 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6690 if [ -n "$QCONFIG_FLAGS" ]; then
6691 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6692 #ifndef QT_BOOTSTRAPPED
6695 for cfg in $QCONFIG_FLAGS; do
6696 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6697 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6698 # figure out define logic, so we can output the correct
6699 # ifdefs to override the global defines in a project
6701 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6702 # QT_NO_option can be forcefully turned on by QT_option
6703 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6704 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6705 # QT_option can be forcefully turned off by QT_NO_option
6706 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6709 if [ -z $cfgdNeg ]; then
6710 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6717 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6718 #if defined($cfgd) && defined($cfgdNeg)
6720 #elif !defined($cfgd) && !defined($cfgdNeg)
6727 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6728 #endif // QT_BOOTSTRAPPED
6733 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6734 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6735 #define QT_VISIBILITY_AVAILABLE
6740 if [ -n "$QT_LIBINFIX" ]; then
6741 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6742 #define QT_LIBINFIX "$QT_LIBINFIX"
6747 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6748 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6749 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6751 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6752 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6753 chmod -w "$outpath/src/corelib/global/qconfig.h"
6754 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6755 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6759 #-------------------------------------------------------------------------------
6760 # save configuration into qconfig.pri
6761 #-------------------------------------------------------------------------------
6762 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6763 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6764 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6765 if [ "$CFG_DEBUG" = "yes" ]; then
6766 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6767 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6768 QT_CONFIG="$QT_CONFIG release"
6770 QT_CONFIG="$QT_CONFIG debug"
6771 elif [ "$CFG_DEBUG" = "no" ]; then
6772 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6773 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6774 QT_CONFIG="$QT_CONFIG debug"
6776 QT_CONFIG="$QT_CONFIG release"
6778 if [ "$CFG_STL" = "yes" ]; then
6779 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6781 if [ "$CFG_FRAMEWORK" = "no" ]; then
6782 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6784 QT_CONFIG="$QT_CONFIG qt_framework"
6785 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6787 if [ "$CFG_DEV" = "yes" ]; then
6788 QT_CONFIG="$QT_CONFIG private_tests"
6791 cat >>"$QTCONFIG.tmp" <<EOF
6793 CONFIG += $QTCONFIG_CONFIG
6795 QT_EDITION = $Edition
6796 QT_CONFIG += $QT_CONFIG
6799 QT_VERSION = $QT_VERSION
6800 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6801 QT_MINOR_VERSION = $QT_MINOR_VERSION
6802 QT_PATCH_VERSION = $QT_PATCH_VERSION
6805 QT_LIBINFIX = $QT_LIBINFIX
6806 QT_NAMESPACE = $QT_NAMESPACE
6809 if [ -n "$CFG_SYSROOT" ]; then
6810 echo "# sysroot" >>"$QTCONFIG.tmp"
6811 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6812 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6813 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6814 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6815 echo "}" >> "$QTCONFIG.tmp"
6816 echo >> "$QTCONFIG.tmp"
6818 if [ "$CFG_RPATH" = "yes" ]; then
6819 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6821 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6822 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6823 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6824 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6827 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6828 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6829 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6832 # replace qconfig.pri if it differs from the newly created temp file
6833 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6834 rm -f "$QTCONFIG.tmp"
6836 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6839 #-------------------------------------------------------------------------------
6840 # save configuration into qmodule.pri
6841 #-------------------------------------------------------------------------------
6842 QTMODULE="$outpath/mkspecs/qmodule.pri"
6844 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6846 # Ensure we can link to uninistalled libraries
6847 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6848 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6850 if [ -n "$QT_CFLAGS_PSQL" ]; then
6851 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6853 if [ -n "$QT_LFLAGS_PSQL" ]; then
6854 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6856 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6857 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6859 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6860 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6862 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6863 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6865 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6866 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6868 if [ -n "$QT_LFLAGS_ODBC" ]; then
6869 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6871 if [ -n "$QT_LFLAGS_TDS" ]; then
6872 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6875 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6876 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6879 #dump in the OPENSSL_LIBS info
6880 if [ '!' -z "$OPENSSL_LIBS" ]; then
6881 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6882 elif [ "$CFG_OPENSSL" = "linked" ]; then
6883 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6886 #dump in the SDK info
6887 if [ '!' -z "$CFG_SDK" ]; then
6888 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6892 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6893 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6895 # replace qmodule.pri if it differs from the newly created temp file
6896 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6897 rm -f "$QTMODULE.tmp"
6899 mv -f "$QTMODULE.tmp" "$QTMODULE"
6902 #-------------------------------------------------------------------------------
6903 # save configuration into .qmake.cache
6904 #-------------------------------------------------------------------------------
6906 CACHEFILE="$outpath/.qmake.cache"
6907 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6908 cat >>"$CACHEFILE.tmp" <<EOF
6910 QT_SOURCE_TREE = \$\$quote($relpath)
6911 QT_BUILD_TREE = \$\$quote($outpath)
6912 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6914 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6915 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
6916 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
6917 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
6918 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6919 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6921 include(\$\$PWD/mkspecs/qmodule.pri)
6922 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6923 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
6924 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
6928 #dump the qmake spec
6929 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6930 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6932 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6937 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
6938 if [ "$CFG_INCREMENTAL" = "yes" ]; then
6939 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
6940 # don't need to worry about generated files
6941 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
6942 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
6944 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
6946 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
6947 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
6950 # replace .qmake.cache if it differs from the newly created temp file
6951 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6952 rm -f "$CACHEFILE.tmp"
6954 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6957 #-------------------------------------------------------------------------------
6958 # give feedback on configuration
6959 #-------------------------------------------------------------------------------
6963 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6966 This target is using the GNU C++ compiler ($PLATFORM).
6968 Recent versions of this compiler automatically include code for
6969 exceptions, which increase both the size of the Qt libraries and
6970 the amount of memory taken by your applications.
6972 You may choose to re-run `basename $0` with the -no-exceptions
6973 option to compile Qt without exceptions. This is completely binary
6974 compatible, and existing applications will continue to work.
6982 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6985 This target is using the MIPSpro C++ compiler ($PLATFORM).
6987 You may choose to re-run `basename $0` with the -no-exceptions
6988 option to compile Qt without exceptions. This will make the
6989 size of the Qt library smaller and reduce the amount of memory
6990 taken by your applications.
7002 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7003 echo "Build type: $PLATFORM"
7005 echo "Building on: $PLATFORM"
7006 echo "Building for: $XPLATFORM"
7009 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7010 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7012 echo "Architecture: $CFG_ARCH"
7015 if [ "$PLATFORM_QPA" = "yes" ]; then
7016 echo "Host architecture: $CFG_HOST_ARCH"
7019 if [ -n "$PLATFORM_NOTES" ]; then
7020 echo "Platform notes:"
7021 echo "$PLATFORM_NOTES"
7026 if [ "$OPT_VERBOSE" = "yes" ]; then
7027 echo $ECHO_N "qmake vars .......... $ECHO_C"
7028 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7029 echo "qmake switches ......... $QMAKE_SWITCHES"
7032 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7033 echo "Build .................. $CFG_BUILD_PARTS"
7034 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7035 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7036 echo "Debug .................. yes (combined)"
7037 if [ "$CFG_DEBUG" = "yes" ]; then
7038 echo "Default Link ........... debug"
7040 echo "Default Link ........... release"
7043 echo "Debug .................. $CFG_DEBUG"
7045 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7046 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7047 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7048 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7049 echo "QtGui module ........... $CFG_GUI"
7050 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7051 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7053 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7055 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7056 echo "STL support ............ $CFG_STL"
7057 echo "PCH support ............ $CFG_PRECOMPILE"
7058 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7059 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7060 echo "AVX..................... ${CFG_AVX}"
7061 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7062 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7063 echo "NEON support ........... ${CFG_NEON}"
7065 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
7066 echo "getaddrinfo support .... $CFG_GETADDRINFO"
7067 echo "getifaddrs support ..... $CFG_GETIFADDRS"
7068 echo "Accessibility .......... $CFG_ACCESSIBILITY"
7069 echo "NIS support ............ $CFG_NIS"
7070 echo "CUPS support ........... $CFG_CUPS"
7071 echo "Iconv support .......... $CFG_ICONV"
7072 echo "Glib support ........... $CFG_GLIB"
7073 echo "GStreamer support ...... $CFG_GSTREAMER"
7074 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7075 echo "Large File support ..... $CFG_LARGEFILE"
7076 echo "GIF support ............ $CFG_GIF"
7077 if [ "$CFG_JPEG" = "no" ]; then
7078 echo "JPEG support ........... $CFG_JPEG"
7080 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
7082 if [ "$CFG_PNG" = "no" ]; then
7083 echo "PNG support ............ $CFG_PNG"
7085 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
7087 echo "zlib support ........... $CFG_ZLIB"
7088 echo "Session management ..... $CFG_SM"
7090 if [ "$CFG_OPENGL" = "desktop" ]; then
7091 echo "OpenGL support ......... yes (Desktop OpenGL)"
7092 elif [ "$CFG_OPENGL" = "es2" ]; then
7093 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
7095 echo "OpenGL support ......... no"
7097 if [ "$CFG_EGL" != "no" ]; then
7098 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7099 echo "EGL support ............ yes <GLES/egl.h>"
7101 echo "EGL support ............ yes <EGL/egl.h>"
7104 if [ "$CFG_OPENVG" ]; then
7105 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7106 echo "OpenVG support ......... ShivaVG"
7108 echo "OpenVG support ......... $CFG_OPENVG"
7111 if [ "$PLATFORM_X11" = "yes" ]; then
7112 echo "NAS sound support ...... $CFG_NAS"
7113 echo "XShape support ......... $CFG_XSHAPE"
7114 echo "XVideo support ......... $CFG_XVIDEO"
7115 echo "XSync support .......... $CFG_XSYNC"
7116 echo "Xinerama support ....... $CFG_XINERAMA"
7117 echo "Xcursor support ........ $CFG_XCURSOR"
7118 echo "Xfixes support ......... $CFG_XFIXES"
7119 echo "Xrandr support ......... $CFG_XRANDR"
7120 echo "Xi support ............. $CFG_XINPUT"
7121 echo "MIT-SHM support ........ $CFG_MITSHM"
7122 echo "FontConfig support ..... $CFG_FONTCONFIG"
7123 echo "XKB Support ............ $CFG_XKB"
7124 echo "immodule support ....... $CFG_IM"
7125 echo "GTK theme support ...... $CFG_QGTKSTYLE"
7127 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
7128 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
7129 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
7130 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
7131 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
7132 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
7133 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
7134 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
7135 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
7138 if [ "$CFG_OPENSSL" = "yes" ]; then
7139 OPENSSL_LINKAGE="(run-time)"
7140 elif [ "$CFG_OPENSSL" = "linked" ]; then
7141 OPENSSL_LINKAGE="(linked)"
7143 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
7144 echo "Alsa support ........... $CFG_ALSA"
7145 if [ "$BUILD_ON_MAC" = "yes" ]; then
7146 echo "CoreWlan support ....... $CFG_COREWLAN"
7148 echo "libICU support ......... $CFG_ICU"
7149 echo "PCRE support ........... $CFG_PCRE"
7150 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7151 echo "Xcb support ............ limited (old version)"
7153 echo "Xcb support ............ $CFG_XCB"
7155 echo "Xrender support ........ $CFG_XRENDER"
7156 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7157 echo "XInput2 support ........ $CFG_XINPUT2"
7161 # complain about not being able to use dynamic plugins if we are using a static build
7162 if [ "$CFG_SHARED" = "no" ]; then
7164 echo "WARNING: Using static linking will disable the use of dynamically"
7165 echo "loaded plugins. Make sure to import all needed static plugins,"
7166 echo "or compile needed modules into the library."
7169 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7171 echo "NOTE: When linking against OpenSSL, you can override the default"
7172 echo "library names through OPENSSL_LIBS."
7174 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
7177 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7179 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
7180 echo "if you want a pure debug build."
7185 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7190 #-------------------------------------------------------------------------------
7191 # build makefiles based on the configuration
7192 #-------------------------------------------------------------------------------
7194 echo "Finding project files. Please wait..."
7195 if [ "$CFG_NOPROCESS" != "yes" ]; then
7196 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7197 if [ -f "${relpath}/qtbase.pro" ]; then
7198 mkfile="${outpath}/Makefile"
7199 [ -f "$mkfile" ] && chmod +w "$mkfile"
7200 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7204 # .projects -> projects to process
7205 # .projects.1 -> qt and moc
7206 # .projects.2 -> subdirs and libs
7207 # .projects.3 -> the rest
7208 rm -f .projects .projects.1 .projects.2 .projects.3
7210 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7211 if [ -z "$AWK" ]; then
7212 for p in `echo $QMAKE_PROJECTS`; do
7213 echo "$p" >> .projects
7216 cat >projects.awk <<EOF
7222 first = "./.projects.1.tmp"
7223 second = "./.projects.2.tmp"
7224 third = "./.projects.3.tmp"
7229 if ( ! target_file )
7231 print input_file >target_file
7236 input_file = FILENAME
7241 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7244 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7245 target_file = second
7250 matched_target == 0 && /^(TEMPLATE.*=)/ {
7251 if ( \$3 == "subdirs" )
7252 target_file = second
7253 else if ( \$3 == "lib" )
7259 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7260 if ( \$0 ~ /plugin/ )
7263 target_file = second
7268 if ( ! target_file )
7270 print input_file >>target_file
7277 for p in `echo $QMAKE_PROJECTS`; do
7278 echo "$p" >> .projects.all
7281 # if you get errors about the length of the command line to awk, change the -l arg
7283 split -l 100 .projects.all .projects.all.
7284 for p in .projects.all.*; do
7285 "$AWK" -f projects.awk `cat $p`
7286 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7287 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7288 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7289 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7291 rm -f .projects.all* projects.awk
7293 [ -f .projects.1 ] && cat .projects.1 >>.projects
7294 [ -f .projects.2 ] && cat .projects.2 >>.projects
7295 rm -f .projects.1 .projects.2
7296 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7297 cat .projects.3 >>.projects
7301 # don't sort Qt and MOC in with the other project files
7302 # also work around a segfaulting uniq(1)
7303 if [ -f .sorted.projects.2 ]; then
7304 sort .sorted.projects.2 > .sorted.projects.2.new
7305 mv -f .sorted.projects.2.new .sorted.projects.2
7306 cat .sorted.projects.2 >> .sorted.projects.1
7308 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7309 rm -f .sorted.projects.2 .sorted.projects.1
7313 if [ -f .projects ]; then
7314 uniq .projects >.tmp
7315 mv -f .tmp .projects
7316 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7318 if [ -f .projects.3 ]; then
7319 uniq .projects.3 >.tmp
7320 mv -f .tmp .projects.3
7321 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7323 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7327 for part in $CFG_BUILD_PARTS; do
7329 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7330 libs) PART_ROOTS="$PART_ROOTS src" ;;
7331 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7332 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7337 if [ "$CFG_DEV" = "yes" ]; then
7338 PART_ROOTS="$PART_ROOTS tests"
7341 echo "Creating makefiles. Please wait..."
7342 for file in .projects .projects.3; do
7343 [ '!' -f "$file" ] && continue
7344 for a in `cat $file`; do
7346 for r in $PART_ROOTS; do
7347 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7352 [ "$IN_ROOT" = "no" ] && continue
7355 *winmain/winmain.pro)
7356 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7360 */qmake/qmake.pro) continue ;;
7361 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7362 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7368 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7369 test -d "$dir" || mkdir -p "$dir"
7370 OUTDIR="$outpath/$dir"
7371 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7372 # fast configure - the makefile exists, skip it
7373 # since the makefile exists, it was generated by qmake, which means we
7374 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7376 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7379 QMAKE_SPEC_ARGS="-spec $SPEC"
7380 echo $ECHO_N " for $a$ECHO_C"
7382 QMAKE="$outpath/bin/qmake"
7383 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7384 if [ "$file" = ".projects.3" ]; then
7387 cat >"${OUTDIR}/Makefile" <<EOF
7388 # ${OUTDIR}/Makefile: generated by configure
7390 # WARNING: This makefile will be replaced with a real makefile.
7391 # All changes made to this file will be lost.
7393 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7395 cat >>"${OUTDIR}/Makefile" <<EOF
7397 all clean install qmake first Makefile: FORCE
7398 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7406 if [ "$OPT_VERBOSE" = "yes" ]; then
7407 echo " (`basename $SPEC`)"
7408 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7413 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7414 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7418 rm -f .projects .projects.3
7420 #-------------------------------------------------------------------------------
7421 # check for platforms that we don't yet know about
7422 #-------------------------------------------------------------------------------
7423 if [ "$CFG_ARCH" = "generic" ]; then
7426 NOTICE: Atomic operations are not yet supported for this
7429 Qt will use the 'generic' architecture instead, which uses a
7430 single pthread_mutex_t to protect all atomic operations. This
7431 implementation is the slow (but safe) fallback implementation
7432 for architectures Qt does not yet support.
7436 #-------------------------------------------------------------------------------
7437 # check if the user passed the -no-zlib option, which is no longer supported
7438 #-------------------------------------------------------------------------------
7439 if [ -n "$ZLIB_FORCED" ]; then
7440 which_zlib="supplied"
7441 if [ "$CFG_ZLIB" = "system" ]; then
7447 NOTICE: The -no-zlib option was supplied but is no longer
7450 Qt now requires zlib support in all builds, so the -no-zlib
7451 option was ignored. Qt will be built using the $which_zlib
7456 #-------------------------------------------------------------------------------
7457 # finally save the executed command to another script
7458 #-------------------------------------------------------------------------------
7459 if [ `basename $0` != "config.status" ]; then
7460 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7462 # add the system variables
7463 for varname in $SYSTEM_VARIABLES; do
7465 'if [ -n "\$'${varname}'" ]; then
7466 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7471 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7473 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7474 echo "#!/bin/sh" > "$outpath/config.status"
7475 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7476 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7477 echo "else" >> "$outpath/config.status"
7478 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7479 echo "fi" >> "$outpath/config.status"
7480 chmod +x "$outpath/config.status"
7483 if [ -n "$RPATH_MESSAGE" ]; then
7485 echo "$RPATH_MESSAGE"
7488 MAKE=`basename "$MAKE"`
7490 echo Qt is now configured for building. Just run \'$MAKE\'.
7491 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7492 echo Once everything is built, Qt is installed.
7493 echo You should not run \'$MAKE install\'.
7495 echo Once everything is built, you must run \'$MAKE install\'.
7496 echo Qt will be installed into $QT_INSTALL_PREFIX
7499 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.