2 #############################################################################
4 ## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
5 ## All rights reserved.
6 ## Contact: Nokia Corporation (qt-info@nokia.com)
8 ## This file is the build configuration utility of the Qt Toolkit.
10 ## $QT_BEGIN_LICENSE:LGPL$
11 ## No Commercial Usage
12 ## This file contains pre-release code and may not be distributed.
13 ## You may use this file in accordance with the terms and conditions
14 ## contained in the Technology Preview License Agreement accompanying
17 ## GNU Lesser General Public License Usage
18 ## Alternatively, this file may be used under the terms of the GNU Lesser
19 ## General Public License version 2.1 as published by the Free Software
20 ## Foundation and appearing in the file LICENSE.LGPL included in the
21 ## packaging of this file. Please review the following information to
22 ## ensure the GNU Lesser General Public License version 2.1 requirements
23 ## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ## In addition, as a special exception, Nokia gives you certain additional
26 ## rights. These rights are described in the Nokia Qt LGPL Exception
27 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ## If you have questions regarding the use of this file, please contact
30 ## Nokia at qt-info@nokia.com.
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"
131 # relies on $QMAKESPEC being set correctly. parses include statements in
132 # qmake.conf and prints out the expanded file
139 getQMakeConf1 "$tmpSPEC/qmake.conf"
142 # relies on $TEST_COMPILER being set correctly
143 compilerSupportsFlag()
145 cat >conftest.cpp <<EOF
146 int main() { return 0; }
148 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
150 rm -f conftest.cpp conftest.o
154 # relies on $TEST_COMPILER being set correctly
160 safe_flag=`shellEscape "$flag"`
161 lflags=$lflags,$safe_flag
163 compilerSupportsFlag "$lflags" >/dev/null 2>&1
166 #-------------------------------------------------------------------------------
167 # operating system detection
168 #-------------------------------------------------------------------------------
170 # need that throughout the script
171 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
172 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
173 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
174 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
176 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
177 if echo '\c' | grep '\c' >/dev/null; then
183 #-------------------------------------------------------------------------------
184 # window system detection
185 #-------------------------------------------------------------------------------
191 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
198 #-----------------------------------------------------------------------------
199 # Qt version detection
200 #-----------------------------------------------------------------------------
201 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
205 if [ -n "$QT_VERSION" ]; then
206 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
207 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
208 if [ -n "$MAJOR" ]; then
209 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
210 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
211 QT_MAJOR_VERSION="$MAJOR"
212 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
213 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
216 if [ -z "$QT_MAJOR_VERSION" ]; then
217 echo "Cannot process version from qglobal.h: $QT_VERSION"
218 echo "Cannot proceed."
222 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
223 if [ -z "$QT_PACKAGEDATE" ]; then
224 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
225 echo "Cannot proceed"
229 #-------------------------------------------------------------------------------
231 #-------------------------------------------------------------------------------
237 EditionString=Commercial
241 # parse the arguments, setting things to "yes" or "no"
242 while [ "$#" -gt 0 ]; do
246 #Autoconf style options
248 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
252 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
256 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
257 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
260 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
265 # this option may or may not be followed by an argument
266 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
275 # this option may or may not be followed by an argument
276 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
289 -h|help|--help|-help)
290 if [ "$VAL" = "yes" ]; then
292 COMMERCIAL_USER="no" #doesn't matter we will display the help
295 COMMERCIAL_USER="no" #doesn't matter we will display the help
299 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
303 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
310 if [ "$UNKNOWN_ARG" = "yes" ]; then
327 if [ "$PLATFORM_QPA" != "no" ]; then
328 if [ "$PLATFORM_QPA" = "maybe" ]; then
335 echo "No license exists to enable Qt QPA. Disabling."
340 echo "Using NaCl at $VAL."
357 COMMERCIAL_USER="yes"
371 if [ "$COMMERCIAL_USER" = "ask" ]; then
373 echo "Which edition of Qt do you want to use ?"
375 echo "Type 'c' if you want to use the Commercial Edition."
376 echo "Type 'o' if you want to use the Open Source Edition."
380 if [ "$commercial" = "c" ]; then
381 COMMERCIAL_USER="yes"
383 elif [ "$commercial" = "o" ]; then
390 if [ "$CFG_NOKIA" = "yes" ]; then
392 Edition="NokiaInternalBuild"
393 EditionString="Nokia Internal Build"
394 QT_EDITION="QT_EDITION_OPENSOURCE"
395 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
396 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
397 # Commercial preview release
398 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
401 QT_EDITION="QT_EDITION_DESKTOP"
402 LicenseType="Technology Preview"
403 elif [ $COMMERCIAL_USER = "yes" ]; then
404 # one of commercial editions
405 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
406 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
407 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
409 # read in the license file
410 if [ -f "$LICENSE_FILE" ]; then
411 . "$LICENSE_FILE" >/dev/null 2>&1
412 if [ -z "$LicenseKeyExt" ]; then
414 echo "You are using an old license file."
416 echo "Please install the license file supplied by Nokia,"
417 echo "or install the Qt Open Source Edition if you intend to"
418 echo "develop free software."
421 if [ -z "$Licensee" ]; then
423 echo "Invalid license key. Please check the license key."
427 if [ -z "$LicenseKeyExt" ]; then
429 echo $ECHO_N "Please enter your license key: $ECHO_C"
431 Licensee="Unknown user"
436 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
437 && LicenseValid="yes" \
439 if [ "$LicenseValid" != "yes" ]; then
441 echo "Invalid license key. Please check the license key."
444 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
445 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
446 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
447 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
449 # determine which edition we are licensed to use
450 case "$LicenseTypeCode" in
452 LicenseType="Commercial"
456 QT_EDITION="QT_EDITION_UNIVERSAL"
459 Edition="FullFramework"
460 EditionString="Full Framework"
461 QT_EDITION="QT_EDITION_DESKTOP"
464 Edition="GUIFramework"
465 EditionString="GUI Framework"
466 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
471 LicenseType="Evaluation"
472 QMakeVar add DEFINES QT_EVAL
476 QT_EDITION="QT_EDITION_EVALUATION"
481 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
483 echo "Invalid license key. Please check the license key."
487 # verify that we are licensed to use Qt on this platform
489 case "$PlatformCode" in
492 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
496 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
499 ### EMBEDDED_QPA logic missing ###
500 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
501 X9,* | XC,* | XU,* | XW,* | XM,*)
503 LICENSE_EXTENSION="-ALLOS"
505 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
506 # Qt for Embedded Linux
507 LICENSE_EXTENSION="-EMBEDDED"
509 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
511 LICENSE_EXTENSION="-EMBEDDED"
513 FM,*,no | LM,yes,* | ZM,no,no)
515 LICENSE_EXTENSION="-DESKTOP"
519 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
520 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
522 echo "You are not licensed for the $Platform platform."
524 echo "Please contact qt-info@nokia.com to upgrade your license to"
525 echo "include the $Platform platform, or install the Qt Open Source Edition"
526 echo "if you intend to develop free software."
531 if test -r "$relpath/.LICENSE"; then
532 # Generic, non-final license
534 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
539 *TECHNOLOGY?PREVIEW*)
546 echo >&2 "Invalid license files; cannot continue"
551 EditionString="$Edition"
552 QT_EDITION="QT_EDITION_DESKTOP"
555 case "$LicenseFeatureCode" in
558 case "$LicenseType" in
560 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
563 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
569 case "$LicenseType" in
571 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
574 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
580 echo "Invalid license key. Please check the license key."
584 case "$LicenseFeatureCode" in
592 if [ '!' -f "$outpath/LICENSE" ]; then
593 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
594 echo "this software has disappeared."
596 echo "Sorry, you are not licensed to use this software."
597 echo "Try re-installing."
601 elif [ $COMMERCIAL_USER = "no" ]; then
602 # Open Source edition - may only be used under the terms of the GPL or LGPL.
603 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
604 Licensee="Open Source"
606 EditionString="Open Source"
607 QT_EDITION="QT_EDITION_OPENSOURCE"
610 #-------------------------------------------------------------------------------
611 # initalize variables
612 #-------------------------------------------------------------------------------
614 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
615 for varname in $SYSTEM_VARIABLES; do
616 qmakevarname="${varname}"
617 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
618 if [ "${varname}" = "LDFLAGS" ]; then
619 qmakevarname="LFLAGS"
620 elif [ "${varname}" = "LD" ]; then
624 'if [ -n "\$'${varname}'" ]; then
625 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
629 # Use CC/CXX to run config.tests
630 mkdir -p "$outpath/config.tests"
631 rm -f "$outpath/config.tests/.qmake.cache"
632 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
634 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
635 QMakeVar add decorations "default windows styled"
636 QMakeVar add mouse-drivers "pc"
637 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
638 QMakeVar add gfx-drivers "linuxfb"
639 QMakeVar add mouse-drivers "linuxtp"
641 QMakeVar add kbd-drivers "tty"
643 if [ "$CFG_DEV" = "yes" ]; then
644 QMakeVar add kbd-drivers "um"
647 # QTDIR may be set and point to an old or system-wide Qt installation
650 # the minimum version of libdbus-1 that we require:
651 MIN_DBUS_1_VERSION=0.93
653 # initalize internal variables
654 CFG_CONFIGURE_EXIT_ON_ERROR=yes
656 CFG_EXCEPTIONS=unspecified
657 CFG_GUI=auto # (yes|no|auto)
658 CFG_SCRIPT=auto # (yes|no|auto)
659 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
660 CFG_XMLPATTERNS=auto # (yes|no|auto)
674 CFG_SYMBIAN_DEFFILES=auto
692 CFG_OPENVG_LC_INCLUDES=no
693 CFG_OPENVG_SHIVA=auto
694 CFG_OPENVG_ON_OPENGL=auto
696 CFG_EGL_GLES_INCLUDES=no
699 CFG_QWS_FREETYPE=auto
702 QT_DEFAULT_BUILD_PARTS="libs examples demos"
707 CFG_PHONON_BACKEND=yes
709 CFG_AUDIO_BACKEND=auto
712 CFG_DECLARATIVE_DEBUG=yes
713 CFG_WEBKIT=auto # (yes|no|auto|debug)
714 CFG_JAVASCRIPTCORE_JIT=auto
716 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
717 CFG_GFX_ON="linuxfb multiscreen"
718 CFG_GFX_PLUGIN_AVAILABLE=
721 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
722 CFG_KBD_ON="tty" #default, see QMakeVar above
723 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
724 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
726 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
727 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
728 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
729 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
731 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
732 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
733 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
734 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
739 CFG_KBD_PLUGIN_AVAILABLE=
742 CFG_MOUSE_PLUGIN_AVAILABLE=
747 CFG_DECORATION_AVAILABLE="styled windows default"
748 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
749 CFG_DECORATION_PLUGIN_AVAILABLE=
750 CFG_DECORATION_PLUGIN=
766 CFG_SEPARATE_DEBUG_INFO=no
767 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
768 CFG_REDUCE_EXPORTS=auto
778 CFG_REDUCE_RELOCATIONS=no
783 CFG_ACCESSIBILITY=auto
787 CFG_DOUBLEFORMAT=auto
791 CFG_CLOCK_GETTIME=auto
792 CFG_CLOCK_MONOTONIC=auto
801 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
806 COMMANDLINE_MAC_CARBON=no
808 CFG_PREFIX_INSTALL=yes
816 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce"
817 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
818 XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*)
819 XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2)
822 OPT_CONFIRM_LICENSE=no
828 CFG_GRAPHICS_SYSTEM=default
837 # initalize variables used for installation
846 QT_INSTALL_TRANSLATIONS=
852 #flags for SQL drivers
860 QT_LFLAGS_ODBC="-lodbc"
863 # flags for libdbus-1
867 # flags for Glib (X11 only)
871 # flags for GStreamer (X11 only)
875 #flag for Symbian fpu settings
878 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
879 QT_CFLAGS_CONNSETTINGS=
880 QT_LIBS_CONNSETTINGS=
882 #-------------------------------------------------------------------------------
883 # check SQL drivers, mouse drivers and decorations available in this package
884 #-------------------------------------------------------------------------------
886 # opensource version removes some drivers, so force them to be off
892 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
893 for a in "$relpath/src/plugins/sqldrivers/"*; do
895 base_a=`basename "$a"`
896 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
897 eval "CFG_SQL_${base_a}=auto"
902 CFG_DECORATION_PLUGIN_AVAILABLE=
903 if [ -d "$relpath/src/plugins/decorations" ]; then
904 for a in "$relpath/src/plugins/decorations/"*; do
906 base_a=`basename "$a"`
907 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
912 CFG_KBD_PLUGIN_AVAILABLE=
913 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
914 for a in "$relpath/src/plugins/kbddrivers/"*; do
916 base_a=`basename "$a"`
917 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
922 CFG_MOUSE_PLUGIN_AVAILABLE=
923 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
924 for a in "$relpath/src/plugins/mousedrivers/"*; do
926 base_a=`basename "$a"`
927 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
932 CFG_GFX_PLUGIN_AVAILABLE=
933 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
934 for a in "$relpath/src/plugins/gfxdrivers/"*; do
936 base_a=`basename "$a"`
937 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
940 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
943 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
944 if [ -d "$relpath/src/plugins/imageformats" ]; then
945 for a in "$relpath/src/plugins/imageformats/"*; do
947 base_a=`basename "$a"`
948 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
953 #-------------------------------------------------------------------------------
954 # Set Default NaCl options
955 #-------------------------------------------------------------------------------
956 if [ "$CFG_EMBEDDED" = "nacl" ]; then
957 echo "Setting NaCl options:"
967 if [ `uname` = "Linux" ]; then
968 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
969 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
971 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
972 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
975 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
986 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
987 QT_CONFIG="$QT_CONFIG nacl"
990 #-------------------------------------------------------------------------------
991 # parse command line arguments
992 #-------------------------------------------------------------------------------
994 # parse the arguments, setting things to "yes" or "no"
995 while [ "$#" -gt 0 ]; do
999 #Autoconf style options
1001 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1005 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1009 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1010 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1013 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1017 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1021 -no-*-*|-plugin-*-*|-qt-*-*)
1022 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1023 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1038 #Qt style no options
1040 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1043 #Qt style yes options
1044 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu)
1045 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1048 #Qt style options that pass an argument
1050 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1052 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1056 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1060 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
1061 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1065 #Qt style complex options in one command
1066 -enable-*|-disable-*)
1067 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1068 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1070 #Qt Builtin/System style options
1071 -no-*|-system-*|-qt-*)
1072 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1073 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1075 #Options that cannot be generalized
1082 # this option may or may not be followed by an argument
1083 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1090 -embedded-lite|-qpa)
1092 # this option may or may not be followed by an argument
1093 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1106 # this option may or may not be followed by an argument
1107 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1116 # this option may or may not be followed by an argument
1117 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1125 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1126 # this option may or may not be followed by an argument
1127 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1136 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1140 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1148 VAR="graphicssystem"
1152 -runtimegraphicssystem)
1153 VAR="runtimegraphicssystem"
1164 if [ "$1" = "-D" ]; then
1168 VAL=`echo $1 | sed 's,-D,,'`
1173 # this option may or may not be followed by an argument
1174 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1183 if [ "$1" = "-I" ]; then
1187 VAL=`echo $1 | sed 's,-I,,'`
1192 if [ "$1" = "-L" ]; then
1196 VAL=`echo $1 | sed 's,-L,,'`
1201 if [ "$1" = "-R" ]; then
1205 VAL=`echo $1 | sed 's,-R,,'`
1210 VAL=`echo $1 | sed 's,-l,,'`
1214 if [ "$1" = "-F" ]; then
1218 VAL=`echo $1 | sed 's,-F,,'`
1223 if [ "$1" = "-fw" ]; then
1227 VAL=`echo $1 | sed 's,-fw,,'`
1231 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1238 if [ "$UNKNOWN_ARG" = "yes" ]; then
1239 echo "$1: unknown argument"
1250 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1251 CFG_QT3SUPPORT="$VAL"
1257 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1258 CFG_ACCESSIBILITY="$VAL"
1267 CFG_USE_GNUMAKE="$VAL"
1270 CFG_MYSQL_CONFIG="$VAL"
1273 QT_INSTALL_PREFIX="$VAL"
1276 QT_HOST_PREFIX="$VAL"
1279 QT_FORCE_PKGCONFIG=yes
1282 QT_INSTALL_DOCS="$VAL"
1285 QT_INSTALL_HEADERS="$VAL"
1288 QT_INSTALL_PLUGINS="$VAL"
1291 QT_INSTALL_IMPORTS="$VAL"
1294 QT_INSTALL_DATA="$VAL"
1297 QT_INSTALL_LIBS="$VAL"
1306 QT_INSTALL_TRANSLATIONS="$VAL"
1308 sysconfdir|settingsdir)
1309 QT_INSTALL_SETTINGS="$VAL"
1312 QT_INSTALL_EXAMPLES="$VAL"
1315 QT_INSTALL_DEMOS="$VAL"
1324 QT_INSTALL_BINS="$VAL"
1327 CFG_USER_BUILD_KEY="$VAL"
1349 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1356 if [ "$VAL" = "little" ]; then
1357 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1358 elif [ "$VAL" = "big" ]; then
1359 CFG_ENDIAN="Q_BIG_ENDIAN"
1365 if [ "$VAL" = "little" ]; then
1366 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1367 elif [ "$VAL" = "big" ]; then
1368 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1374 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1381 CFG_QWS_DEPTHS="$VAL"
1384 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1385 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1386 [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1388 if [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1396 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1398 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1406 if [ "$PLATFORM_QWS" = "yes" ]; then
1407 echo "Error: Graphics System plugins are not supported on QWS."
1408 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1409 echo " rather than existing as a separate plugin."
1413 if [ "$VAL" = "opengl" ]; then
1414 CFG_GRAPHICS_SYSTEM="opengl"
1415 elif [ "$VAL" = "openvg" ]; then
1416 CFG_GRAPHICS_SYSTEM="openvg"
1417 elif [ "$VAL" = "raster" ]; then
1418 CFG_GRAPHICS_SYSTEM="raster"
1419 elif [ "$VAL" = "runtime" ]; then
1420 CFG_GRAPHICS_SYSTEM="runtime"
1426 runtimegraphicssystem)
1427 if [ "$VAL" != "runtime" ]; then
1428 CFG_RUNTIME_SYSTEM="$VAL"
1432 qvfb) # left for commandline compatibility, not documented
1433 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1434 if [ "$VAL" = "yes" ]; then
1435 QMakeVar add gfx-drivers qvfb
1436 QMakeVar add kbd-drivers qvfb
1437 QMakeVar add mouse-drivers qvfb
1438 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1439 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1440 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1447 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1450 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1459 if [ "$PLATFORM_MAC" = "yes" ]; then
1466 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1467 CFG_MAC_DWARF2="$VAL"
1473 # if this is a Mac then "windows" probably means
1474 # we are cross-compiling for MinGW
1475 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1476 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1485 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1486 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1492 # do nothing - Cocoa is the default.
1495 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1496 CFG_MAC_CARBON="$VAL"
1497 COMMANDLINE_MAC_CARBON="$VAL"
1504 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1505 CFG_FRAMEWORK="$VAL"
1511 if [ "$VAL" = "yes" ]; then
1513 QMakeVar add QMAKE_CFLAGS -pg
1514 QMakeVar add QMAKE_CXXFLAGS -pg
1515 QMakeVar add QMAKE_LFLAGS -pg
1516 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1521 exceptions|g++-exceptions)
1522 if [ "$VAL" = "no" ]; then
1524 elif [ "$VAL" = "yes" ]; then
1532 # keep compatibility with old platform names
1538 PLATFORM=hpux-acc-o64
1541 PLATFORM=hpux-acc-64
1544 PLATFORM=hpux-acc-64
1556 PLATFORM=reliant-cds-64
1559 PLATFORM=solaris-cc-64
1562 PLATFORM=unixware-cc
1565 PLATFORM=unixware-g++
1568 PLATFORM=unixware-cc
1571 PLATFORM=unixware-g++
1577 i386) NATIVE_64_ARCH="x86_64" ;;
1578 powerpc) NATIVE_64_ARCH="ppc64" ;;
1579 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1581 if [ ! -z "$NATIVE_64_ARCH" ]; then
1582 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1583 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1590 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1591 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
1592 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
1595 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1596 CFG_DEBUG_RELEASE="$VAL"
1602 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1603 CFG_RELEASE_QMAKE="$VAL"
1609 if [ "$VAL" = "yes" ]; then
1611 elif [ "$VAL" = "no" ]; then
1618 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1619 CFG_PREFIX_INSTALL="$VAL"
1627 developer-build|commercial|opensource|nokia-developer)
1628 # These switches have been dealt with already
1631 if [ "$VAL" = "yes" ]; then
1633 elif [ "$VAL" = "no" ]; then
1640 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1641 CFG_INCREMENTAL="$VAL"
1647 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1648 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1654 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1655 if [ "$VAL" = "no" ]; then
1656 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1657 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1658 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1664 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "no" ]; then
1678 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1686 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1693 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1700 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1707 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1714 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1721 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1728 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1735 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1736 CFG_PRECOMPILE="$VAL"
1741 separate-debug-info)
1742 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1743 CFG_SEPARATE_DEBUG_INFO="$VAL"
1744 elif [ "$VAL" = "nocopy" ] ; then
1745 CFG_SEPARATE_DEBUG_INFO="yes"
1746 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1752 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1753 CFG_REDUCE_EXPORTS="$VAL"
1759 if [ "$VAL" = "no" ]; then
1766 if [ "$VAL" = "no" ]; then
1773 if [ "$VAL" = "no" ]; then
1780 if [ "$VAL" = "no" ]; then
1787 if [ "$VAL" = "no" ]; then
1794 if [ "$VAL" = "no" ]; then
1801 if [ "$VAL" = "no" ]; then
1808 if [ "$VAL" = "no" ]; then
1815 if [ "$VAL" = "no" ]; then
1825 if [ "$VAL" = "no" ]; then
1832 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1833 CFG_REDUCE_RELOCATIONS="$VAL"
1839 [ "$VAL" = "qt" ] && VAL=yes
1840 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1841 CFG_QWS_FREETYPE="$VAL"
1847 [ "$VAL" = "qt" ] && VAL=yes
1848 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1853 # No longer supported:
1854 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1857 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1864 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1865 CFG_SYMBIAN_DEFFILES="$VAL"
1871 if [ "$VAL" = "system" ]; then
1878 [ "$VAL" = "yes" ] && VAL=qt
1879 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1886 [ "$VAL" = "yes" ] && VAL=qt
1887 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1894 [ "$VAL" = "yes" ] && VAL=qt
1895 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1902 [ "$VAL" = "yes" ] && VAL=qt
1903 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1910 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1917 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1924 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1931 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1938 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1945 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1952 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1953 CFG_FONTCONFIG="$VAL"
1959 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1966 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1973 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1980 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1987 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1988 CFG_GSTREAMER="$VAL"
1994 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1995 CFG_QGTKSTYLE="$VAL"
2001 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ]; then
2002 CFG_QS60STYLE="$VAL"
2008 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2011 if [ "$VAL" = "no" ]; then
2019 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
2021 elif [ "$VAL" = "runtime" ]; then
2028 if [ "$VAL" = "yes" ]; then
2035 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2042 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2043 CFG_LARGEFILE="$VAL"
2049 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2056 if [ "$VAL" = "yes" ]; then
2057 CFG_OPENSSL="linked"
2063 if [ "$VAL" = "yes" ]; then
2071 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2072 CFG_XMLPATTERNS="yes"
2074 if [ "$VAL" = "no" ]; then
2075 CFG_XMLPATTERNS="no"
2082 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2085 if [ "$VAL" = "no" ]; then
2093 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2094 CFG_SCRIPTTOOLS="yes"
2096 if [ "$VAL" = "no" ]; then
2097 CFG_SCRIPTTOOLS="no"
2104 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2107 if [ "$VAL" = "no" ]; then
2115 if [ "$VAL" = "yes" ]; then
2116 CFG_DECLARATIVE="yes"
2118 if [ "$VAL" = "no" ]; then
2119 CFG_DECLARATIVE="no"
2126 if [ "$VAL" = "yes" ]; then
2127 CFG_DECLARATIVE_DEBUG="yes"
2129 if [ "$VAL" = "no" ]; then
2130 CFG_DECLARATIVE_DEBUG="no"
2137 [ "$VAL" = "auto" ] && VAL="yes"
2141 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2142 CFG_JAVASCRIPTCORE_JIT="$VAL"
2148 if [ "$VAL" = "yes" ]; then
2149 OPT_CONFIRM_LICENSE="$VAL"
2155 if [ "$VAL" = "yes" ]; then
2161 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2162 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2163 # if autoconf style options were used, $VAL can be "yes" or "no"
2164 [ "$VAL" = "yes" ] && VAL=qt
2165 # now $VAL should be "no", "qt", or "plugin"... double-check
2166 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2169 # now $VAL is "no", "qt", or "plugin"
2171 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2172 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2174 # Grab the available values
2177 avail="$CFG_SQL_AVAILABLE"
2180 avail="$CFG_GFX_AVAILABLE"
2181 if [ "$OPT" = "plugin" ]; then
2182 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2186 avail="$CFG_DECORATION_AVAILABLE"
2187 if [ "$OPT" = "plugin" ]; then
2188 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2192 avail="$CFG_KBD_AVAILABLE"
2193 if [ "$OPT" = "plugin" ]; then
2194 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2198 avail="$CFG_MOUSE_AVAILABLE"
2199 if [ "$OPT" = "plugin" ]; then
2200 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2204 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2205 if [ "$OPT" != "plugin" ]; then
2206 # png is always built in
2212 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2216 # Check that that user's value is available.
2219 if [ "$VAL" = "$d" ]; then
2224 [ "$found" = yes ] || ERROR=yes
2226 if [ "$VAR" = "sql" ]; then
2227 # set the CFG_SQL_driver
2228 eval "CFG_SQL_$VAL=\$OPT"
2230 elif [ "$VAR" = "imageformat" ]; then
2231 [ "$OPT" = "qt" ] && OPT=yes
2232 VAL="`echo $VAL |tr a-z A-Z`"
2233 eval "CFG_$VAL=$OPT"
2237 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2238 if [ "$OPT" = "plugin" ]; then
2239 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2240 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2241 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2242 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2243 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2244 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2245 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2246 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2249 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2250 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2251 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2252 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2253 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2257 QMakeVar add "${VAR}s" "${VAL}"
2258 elif [ "$OPT" = "no" ]; then
2259 PLUG_VAR="${VAR}-plugin"
2260 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2261 IN_VAR="${VAR}-driver"
2265 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2266 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2267 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2268 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2269 QMakeVar del "${IN_VAR}s" "$VAL"
2270 QMakeVar del "${PLUG_VAR}s" "$VAL"
2272 if [ "$ERROR" = "yes" ]; then
2273 echo "$CURRENT_OPT: unknown argument"
2278 if [ "$VAL" = "yes" ]; then
2279 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2280 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2284 elif [ "$VAL" = "no" ]; then
2285 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2286 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2295 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2302 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2309 D_FLAGS="$D_FLAGS \"$VAL\""
2312 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2315 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2318 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2321 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2324 if [ "$PLATFORM_MAC" = "yes" ]; then
2325 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2326 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2332 if [ "$PLATFORM_MAC" = "yes" ]; then
2333 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2342 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2349 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2350 CFG_PHONON_BACKEND="$VAL"
2356 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2357 CFG_MULTIMEDIA="$VAL"
2369 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2370 CFG_AUDIO_BACKEND="$VAL"
2376 if [ "$VAL" != "no" ]; then
2381 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2391 if [ "$UNKNOWN_OPT" = "yes" ]; then
2392 echo "${CURRENT_OPT}: invalid command-line switch"
2398 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2399 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2402 if [ "$CFG_GUI" = "no" ]; then
2403 echo "Warning: -no-gui will disable the qt3support library."
2407 #disable Qt3Support for Lighthouse
2408 if [ "$PLATFORM_QPA" = "yes" ]; then
2412 # update QT_CONFIG to show our current predefined configuration
2413 case "$CFG_QCONFIG" in
2414 minimal|small|medium|large|full)
2415 # these are a sequence of increasing functionality
2416 for c in minimal small medium large full; do
2417 QT_CONFIG="$QT_CONFIG $c-config"
2418 [ "$CFG_QCONFIG" = $c ] && break
2422 # not known to be sufficient for anything
2423 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2424 echo >&2 "Error: configuration file not found:"
2425 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2427 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2432 #-------------------------------------------------------------------------------
2433 # build tree initialization
2434 #-------------------------------------------------------------------------------
2436 # where to find which..
2437 unixtests="$relpath/config.tests/unix"
2438 mactests="$relpath/config.tests/mac"
2439 symbiantests="$relpath/config.tests/symbian"
2440 WHICH="$unixtests/which.test"
2442 PERL=`$WHICH perl 2>/dev/null`
2444 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2446 for e in gawk nawk awk; do
2447 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2454 PERL="/usr/bin/perl"
2455 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2459 ### skip this if the user just needs help...
2460 if [ "$OPT_HELP" != "yes" ]; then
2462 # is this a shadow build?
2463 if [ "$OPT_SHADOW" = "maybe" ]; then
2465 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2466 if [ -h "$outpath" ]; then
2467 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2473 if [ "$OPT_SHADOW" = "yes" ]; then
2474 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2475 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2476 echo >&2 "Cannot proceed."
2479 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2482 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2484 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2485 echo "Qt can be built in release mode with separate debug information, so"
2486 echo "-debug-and-release is not necessary anymore"
2490 # detect build style
2491 if [ "$CFG_DEBUG" = "auto" ]; then
2492 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2493 CFG_DEBUG_RELEASE=yes
2495 elif [ "$CFG_DEV" = "yes" ]; then
2496 CFG_DEBUG_RELEASE=no
2499 CFG_DEBUG_RELEASE=no
2503 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2504 QMAKE_CONFIG="$QMAKE_CONFIG build_all"
2507 if [ "$CFG_SILENT" = "yes" ]; then
2508 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2511 # if the source tree is different from the build tree,
2512 # symlink or copy part of the sources
2513 if [ "$OPT_SHADOW" = "yes" ]; then
2514 echo "Preparing build tree..."
2516 if [ -z "$PERL" ]; then
2518 echo "You need perl in your PATH to make a shadow build."
2519 echo "Cannot proceed."
2523 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2525 # symlink the qmake directory
2526 find "$relpath/qmake" | while read a; do
2527 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2528 if [ '!' -f "$my_a" ]; then
2529 if [ -d "$a" ]; then
2530 # directories are created...
2533 a_dir=`dirname "$my_a"`
2534 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2535 # ... and files are symlinked
2536 case `basename "$a"` in
2537 *.o|*.d|GNUmakefile*|qmake)
2548 # make a syncqt script that can be used in the shadow
2549 rm -f "$outpath/bin/syncqt"
2550 if [ -x "$relpath/bin/syncqt" ]; then
2551 mkdir -p "$outpath/bin"
2552 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2553 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2554 chmod 755 "$outpath/bin/syncqt"
2557 for i in elf2e32_qtwrapper createpackage patch_capabilities; do
2558 rm -f "$outpath/bin/$i"
2559 if [ -x "$relpath/bin/$i" ]; then
2560 mkdir -p "$outpath/bin"
2561 echo "#!/bin/sh" >"$outpath/bin/$i"
2562 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2563 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2564 chmod 755 "$outpath/bin/$i"
2568 # symlink the mkspecs directory
2569 mkdir -p "$outpath/mkspecs"
2570 rm -rf "$outpath"/mkspecs/*
2571 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2572 rm -f "$outpath/mkspecs/default"
2576 rm -rf "$outpath/mkspecs/$1"
2577 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2578 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2581 # Special case for mkspecs/features directory.
2582 # To be able to place .prf files into a shadow build directory,
2583 # we're creating links for files only. The directory structure is reproduced.
2584 ShadowMkspecs features
2586 # The modules dir is special, too.
2587 ShadowMkspecs modules
2589 # symlink the doc directory
2590 rm -rf "$outpath/doc"
2591 ln -s "$relpath/doc" "$outpath/doc"
2593 # make sure q3porting.xml can be found
2594 mkdir -p "$outpath/tools/porting/src"
2595 rm -f "$outpath/tools/porting/src/q3porting.xml"
2596 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2599 # symlink fonts to be able to run application from build directory
2600 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2601 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2602 mkdir -p "${outpath}/lib"
2603 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2607 if [ "$OPT_FAST" = "auto" ]; then
2608 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2615 # find a make command
2616 if [ -z "$MAKE" ]; then
2618 for mk in gmake make; do
2619 if "$WHICH" $mk >/dev/null 2>&1; then
2624 if [ -z "$MAKE" ]; then
2625 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2626 echo >&2 "Cannot proceed."
2629 # export MAKE, we need it later in the config.tests
2635 #-------------------------------------------------------------------------------
2636 # auto-detect all that hasn't been specified in the arguments
2637 #-------------------------------------------------------------------------------
2639 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2640 if [ "$CFG_EMBEDDED" != "no" ]; then
2641 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2643 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2644 if [ -z "$XPLATFORM" ]; then
2645 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2646 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2650 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2651 if [ -z "$XPLATFORM" ]; then
2652 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2653 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2657 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2658 if [ -z "$XPLATFORM" ]; then
2659 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2660 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2664 if [ -z "$PLATFORM" ]; then
2665 case "$UNAME_MACHINE" in
2667 PLATFORM=qws/linux-x86-g++
2670 PLATFORM=qws/linux-x86_64-g++
2673 PLATFORM=qws/linux-generic-g++
2677 if [ -z "$XPLATFORM" ]; then
2678 if [ "$CFG_EMBEDDED" = "auto" ]; then
2679 if [ -n "$CFG_ARCH" ]; then
2680 CFG_EMBEDDED=$CFG_ARCH
2682 case "$UNAME_MACHINE" in
2690 CFG_EMBEDDED=generic
2695 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2699 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2700 if [ -z "$XPLATFORM" ]; then
2701 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2702 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2706 if [ -z "$XPLATFORM" ]; then
2711 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2718 if [ -z "$PLATFORM" ]; then
2720 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2722 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2724 # PLATFORM=macx-xcode
2731 #PLATFORM=aix-g++-64
2733 #PLATFORM=aix-xlc-64
2735 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2745 # PLATFORM=dynix-g++
2751 PLATFORM=freebsd-g++
2753 - Also available for FreeBSD: freebsd-icc
2757 PLATFORM=openbsd-g++
2768 #PLATFORM=irix-cc-64
2770 - Also available for IRIX: irix-g++ irix-cc-64
2774 case "$UNAME_MACHINE" in
2776 #PLATFORM=hpuxi-acc-32
2777 PLATFORM=hpuxi-acc-64
2779 - Also available for HP-UXi: hpuxi-acc-32
2785 #PLATFORM=hpux-acc-64
2787 #PLATFORM=hpux-acc-o64
2789 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2798 - Also available for Tru64: tru64-g++
2802 case "$UNAME_MACHINE" in
2804 PLATFORM=linux-g++-64
2811 - Also available for Linux: linux-kcc linux-icc linux-cxx
2815 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2816 PLATFORM="solaris-g++"
2818 #PLATFORM=solaris-g++
2820 #PLATFORM=solaris-cc64
2823 - Also available for Solaris: solaris-g++ solaris-cc-64
2826 ReliantUNIX-*:*|SINIX-*:*)
2827 PLATFORM=reliant-cds
2828 #PLATFORM=reliant-cds-64
2830 - Also available for Reliant UNIX: reliant-cds-64
2840 #PLATFORM=unixware-g++
2841 PLATFORM=unixware-cc
2843 - Also available for OpenUNIX: unixware-g++
2847 #PLATFORM=unixware-g++
2848 PLATFORM=unixware-cc
2850 - Also available for UnixWare: unixware-g++
2857 - Also available for SCO OpenServer: sco-g++
2861 PLATFORM=unixware-g++
2864 PLATFORM=unsupported/qnx-g++
2867 if [ "$OPT_HELP" != "yes" ]; then
2869 for p in $PLATFORMS; do
2870 echo " $relconf $* -platform $p"
2873 echo " The build script does not currently recognize all" >&2
2874 echo " platforms supported by Qt." >&2
2875 echo " Rerun this script with a -platform option listed to" >&2
2876 echo " set the system/compiler combination you use." >&2
2883 if [ "$PLATFORM_QWS" = "yes" ]; then
2885 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2887 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2890 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2892 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2893 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
2894 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
2896 if [ -d "$PLATFORM" ]; then
2897 QMAKESPEC="$PLATFORM"
2899 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2901 if [ -d "$XPLATFORM" ]; then
2902 XQMAKESPEC="$XPLATFORM"
2904 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2906 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2907 QT_CROSS_COMPILE=yes
2908 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2911 if [ "$PLATFORM_MAC" = "yes" ]; then
2912 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2914 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2915 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2916 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2917 echo " built with 'macx-g++'" >&2
2923 # check specified platforms are supported
2924 if [ '!' -d "$QMAKESPEC" ]; then
2926 echo " The specified system/compiler is not supported:"
2930 echo " Please see the README file for a complete list."
2934 if [ '!' -d "$XQMAKESPEC" ]; then
2936 echo " The specified system/compiler is not supported:"
2940 echo " Please see the README file for a complete list."
2944 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2946 echo " The specified system/compiler port is not complete:"
2948 echo " $XQMAKESPEC/qplatformdefs.h"
2950 echo " Please contact qt-bugs@trolltech.com."
2955 # now look at the configs and figure out what platform we are config'd for
2956 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2957 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2959 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2961 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2962 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2963 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2964 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2965 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2969 #-------------------------------------------------------------------------------
2970 # determine the system architecture
2971 #-------------------------------------------------------------------------------
2972 if [ "$OPT_VERBOSE" = "yes" ]; then
2973 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2976 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2977 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2979 echo "You have specified a target architecture with -embedded and -arch."
2980 echo "The two architectures you have specified are different, so we can"
2981 echo "not proceed. Either set both to be the same, or only use -embedded."
2987 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2988 case `basename "$XPLATFORM"` in
2991 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2993 echo "Please contact qt-info@nokia.com to upgrade your license to"
2994 echo "include this platform, or install the Qt Open Source Edition"
2995 echo "if you intend to develop free software."
3001 if [ -z "${CFG_HOST_ARCH}" ]; then
3002 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
3004 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
3005 case "$CFG_HOST_ARCH" in
3010 if [ "$OPT_VERBOSE" = "yes" ]; then
3011 echo " GNU/Hurd ($CFG_HOST_ARCH)"
3015 CFG_HOST_ARCH=`uname -p`
3016 if [ "$OPT_VERBOSE" = "yes" ]; then
3017 echo " SGI ($CFG_HOST_ARCH)"
3021 case "$UNAME_MACHINE" in
3023 if [ "$OPT_VERBOSE" = "yes" ]; then
3024 echo " Sun SPARC (sparc)"
3031 if [ "$OPT_VERBOSE" = "yes" ]; then
3032 echo " 64-bit AMD 80x86 (x86_64)"
3034 CFG_HOST_ARCH=x86_64
3037 if [ "$OPT_VERBOSE" = "yes" ]; then
3038 echo " 32-bit Intel 80x86 (i386)"
3046 case "$UNAME_MACHINE" in
3048 if [ "$OPT_VERBOSE" = "yes" ]; then
3049 echo " 32-bit Apple PowerPC (powerpc)"
3053 if [ "$OPT_VERBOSE" = "yes" ]; then
3054 echo " 32-bit Intel 80x86 (i386)"
3058 CFG_HOST_ARCH=macosx
3061 if [ "$OPT_VERBOSE" = "yes" ]; then
3062 echo " 64-bit IBM PowerPC (powerpc)"
3064 CFG_HOST_ARCH=powerpc
3067 if [ "$OPT_VERBOSE" = "yes" ]; then
3068 echo " HP PA-RISC (parisc)"
3070 CFG_HOST_ARCH=parisc
3073 if [ "$OPT_VERBOSE" = "yes" ]; then
3074 echo " 32-bit Intel 80x86 (i386)"
3078 *:*:x86_64|*:*:amd64)
3079 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3080 if [ "$OPT_VERBOSE" = "yes" ]; then
3081 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3085 if [ "$OPT_VERBOSE" = "yes" ]; then
3086 echo " 64-bit AMD 80x86 (x86_64)"
3088 CFG_HOST_ARCH=x86_64
3092 if [ "$OPT_VERBOSE" = "yes" ]; then
3093 echo " 32-bit PowerPC (powerpc)"
3095 CFG_HOST_ARCH=powerpc
3098 if [ "$OPT_VERBOSE" = "yes" ]; then
3099 echo " 64-bit PowerPC (powerpc)"
3101 CFG_HOST_ARCH=powerpc
3104 if [ "$OPT_VERBOSE" = "yes" ]; then
3105 echo " IBM S/390 (s390)"
3110 if [ "$OPT_VERBOSE" = "yes" ]; then
3116 if [ "$OPT_VERBOSE" = "yes" ]; then
3117 echo " Linux on SPARC"
3122 case "$UNAME_MACHINE" in
3124 if [ "$OPT_VERBOSE" = "yes" ]; then
3125 echo " QNX on Intel 80x86 (i386)"
3132 if [ "$OPT_VERBOSE" = "yes" ]; then
3133 echo " Trying '$UNAME_MACHINE'..."
3135 CFG_HOST_ARCH="$UNAME_MACHINE"
3140 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3141 if [ -n "$CFG_ARCH" ]; then
3142 CFG_EMBEDDED=$CFG_ARCH
3145 case "$CFG_EMBEDDED" in
3168 CFG_ARCH="$CFG_EMBEDDED"
3171 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3172 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3173 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3175 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3176 CFG_ARCH=$CFG_HOST_ARCH
3183 # previously, armv6 was a different arch
3189 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3190 if [ "$OPT_VERBOSE" = "yes" ]; then
3191 echo " '$CFG_ARCH' is supported"
3194 if [ "$OPT_VERBOSE" = "yes" ]; then
3195 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3199 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3200 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3201 if [ "$OPT_VERBOSE" = "yes" ]; then
3202 echo " '$CFG_HOST_ARCH' is supported"
3205 if [ "$OPT_VERBOSE" = "yes" ]; then
3206 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3208 CFG_HOST_ARCH=generic
3212 if [ "$OPT_VERBOSE" = "yes" ]; then
3213 echo "System architecture: '$CFG_ARCH'"
3214 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3215 echo "Host architecture: '$CFG_HOST_ARCH'"
3219 #-------------------------------------------------------------------------------
3220 # tests that don't need qmake (must be run before displaying help)
3221 #-------------------------------------------------------------------------------
3223 if [ -z "$PKG_CONFIG" ]; then
3224 # See if PKG_CONFIG is set in the mkspec:
3225 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3227 if [ -z "$PKG_CONFIG" ]; then
3228 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3231 # Work out if we can use pkg-config
3232 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3233 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3235 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3236 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3237 echo >&2 "environment!"
3239 if [ -z "$PKG_CONFIG_PATH" ]; then
3241 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3242 echo >&2 "the host compiler's .pc files will be used. This is probably"
3243 echo >&2 "not what you want."
3245 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3247 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3248 echo >&2 "been set. This means your toolchain's .pc files must contain"
3249 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3250 echo >&2 "tests are failing, please check these files."
3255 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3256 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3257 echo >&2 "dependencies"
3263 # process CFG_MAC_ARCHS
3264 if [ "$PLATFORM_MAC" = "yes" ]; then
3265 # check -arch arguments for validity.
3266 ALLOWED="x86 ppc x86_64 ppc64 i386"
3267 # Save the list so we can re-write it using only valid values
3268 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3270 for i in $CFG_MAC_ARCHS_IN
3272 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3273 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3276 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3277 # These are synonymous values
3278 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3279 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3280 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3282 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3283 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3288 # pass on $CFG_SDK to the configure tests.
3289 if [ '!' -z "$CFG_SDK" ]; then
3290 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3293 # find the default framework value
3294 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3295 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3296 CFG_FRAMEWORK="$CFG_SHARED"
3297 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3299 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3307 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3308 TEST_COMPILER="$CXX"
3310 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3311 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3312 #for Symbian we don't need this checking
3313 if [ -z "$TEST_COMPILER" ]; then
3314 echo "ERROR: Cannot set the compiler for the configuration tests"
3319 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3320 TEST_COMPILER="nacl-gcc"
3324 if [ -n "$CFG_SYSROOT" ]; then
3325 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3326 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3327 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3329 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3333 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3335 # auto-detect precompiled header support
3336 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3337 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3339 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3344 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3346 echo "WARNING: Using universal binaries disables precompiled headers."
3351 #auto-detect DWARF2 on the mac
3352 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3353 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3360 # auto-detect support for -Xarch on the mac
3361 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3362 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3369 # don't autodetect support for separate debug info on objcopy when
3370 # cross-compiling as lots of toolchains seems to have problems with this
3371 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3372 CFG_SEPARATE_DEBUG_INFO="no"
3375 # auto-detect support for separate debug info in objcopy
3376 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3377 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3378 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3379 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3380 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3381 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3382 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3383 CFG_SEPARATE_DEBUG_INFO=no
3387 # binutils on HP-UX is buggy; default to no.
3388 CFG_SEPARATE_DEBUG_INFO=no
3391 CFG_SEPARATE_DEBUG_INFO=yes
3397 # auto-detect -fvisibility support
3398 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3399 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3400 CFG_REDUCE_EXPORTS=no
3402 CFG_REDUCE_EXPORTS=yes
3406 # detect the availability of the -Bsymbolic-functions linker optimization
3407 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3408 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3409 CFG_REDUCE_RELOCATIONS=no
3411 CFG_REDUCE_RELOCATIONS=yes
3415 # auto-detect GNU make support
3416 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3420 # If -opengl wasn't specified, don't try to auto-detect
3421 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3426 if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
3427 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3432 # find the default framework value
3433 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3434 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3435 CFG_FRAMEWORK="$CFG_SHARED"
3436 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3438 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3446 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3447 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3448 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3449 # get the darwin version. 10.0.0 and up means snow leopard.
3450 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3451 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3453 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3458 # x11 tests are done after qmake is built
3461 #setup the build parts
3462 if [ -z "$CFG_BUILD_PARTS" ]; then
3463 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3465 # don't build tools by default when cross-compiling
3466 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3467 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3470 for nobuild in $CFG_NOBUILD_PARTS; do
3471 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3473 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3475 # echo "WARNING: libs is a required part of the build."
3477 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3480 #-------------------------------------------------------------------------------
3481 # post process QT_INSTALL_* variables
3482 #-------------------------------------------------------------------------------
3485 if [ -z "$QT_INSTALL_PREFIX" ]; then
3486 if [ "$CFG_DEV" = "yes" ]; then
3487 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3488 elif [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3489 if [ "$PLATFORM_QPA" = "yes" ]; then
3490 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtLighthouse-${QT_VERSION}"
3492 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3494 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3495 QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3497 elif [ -d "$EPOCROOT" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3498 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3499 QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
3500 QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
3503 QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3506 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3508 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3509 [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
3510 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
3511 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
3512 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS=
3513 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS=
3514 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="\\\\resource\\\\qt$QT_LIBINFIX\\\\plugins"
3515 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="\\\\resource\\\\qt$QT_LIBINFIX\\\\imports"
3516 [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA=
3517 [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations"
3518 [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS=
3519 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES=
3520 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS=
3523 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3524 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3525 if [ "$PLATFORM_MAC" = "yes" ]; then
3526 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3529 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3532 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3535 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3536 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3537 if [ "$PLATFORM_MAC" = "yes" ]; then
3538 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3543 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3546 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3549 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3550 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3551 if [ "$PLATFORM_MAC" = "yes" ]; then
3552 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3553 QT_INSTALL_LIBS="/Libraries/Frameworks"
3557 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3559 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3562 if [ -z "$QT_INSTALL_BINS" ]; then #default
3563 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3564 if [ "$PLATFORM_MAC" = "yes" ]; then
3565 QT_INSTALL_BINS="/Developer/Applications/Qt"
3568 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3571 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3574 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3575 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3576 if [ "$PLATFORM_MAC" = "yes" ]; then
3577 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3580 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3582 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3585 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3586 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3587 if [ "$PLATFORM_MAC" = "yes" ]; then
3588 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3591 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3593 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3596 if [ -z "$QT_INSTALL_DATA" ]; then #default
3597 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3599 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3602 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3603 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3605 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3608 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3609 if [ "$PLATFORM_MAC" = "yes" ]; then
3610 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3612 QT_INSTALL_SETTINGS=/etc/xdg
3615 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3618 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3619 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3620 if [ "$PLATFORM_MAC" = "yes" ]; then
3621 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3624 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3626 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3629 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3630 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3631 if [ "$PLATFORM_MAC" = "yes" ]; then
3632 QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
3635 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
3637 QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3640 #-------------------------------------------------------------------------------
3641 # help - interactive parts of the script _after_ this section please
3642 #-------------------------------------------------------------------------------
3644 # next, emit a usage message if something failed.
3645 if [ "$OPT_HELP" = "yes" ]; then
3646 [ "x$ERROR" = "xyes" ] && echo
3647 if [ "$CFG_NIS" = "no" ]; then
3654 if [ "$CFG_CUPS" = "no" ]; then
3661 if [ "$CFG_ICONV" = "no" ]; then
3668 if [ "$CFG_LARGEFILE" = "no" ]; then
3675 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3682 if [ "$CFG_IPV6" = "auto" ]; then
3686 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3695 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3696 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3697 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3698 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3699 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3700 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3701 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3702 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3703 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3704 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3705 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3706 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3707 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3708 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3709 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3710 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3711 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3712 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3713 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3714 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3715 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3716 [-no-openssl] [-openssl] [-openssl-linked]
3717 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3718 [-no-javascript-jit] [-javascript-jit]
3719 [-no-script] [-script] [-no-scripttools] [-scripttools]
3720 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3721 [additional platform specific options (see below)]
3724 Installation options:
3726 -qpa ................ This will enable the QPA build.
3727 QPA is a window system agnostic implementation of Qt.
3729 These are optional, but you may specify install directories.
3731 -prefix <dir> ...... This will install everything relative to <dir>
3732 (default $QT_INSTALL_PREFIX)
3734 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3737 -hostprefix [dir] .. Tools and libraries needed when developing
3738 applications are installed in [dir]. If [dir] is
3739 not given, the current build directory will be used.
3744 * -prefix-install .... Force a sandboxed "local" installation of
3745 Qt. This will install into
3746 $QT_INSTALL_PREFIX, if this option is
3747 disabled then some platforms will attempt a
3748 "system" install by placing default values to
3749 be placed in a system location other than
3752 You may use these to separate different parts of the install:
3754 -bindir <dir> ......... Executables will be installed to <dir>
3755 (default PREFIX/bin)
3756 -libdir <dir> ......... Libraries will be installed to <dir>
3757 (default PREFIX/lib)
3758 -docdir <dir> ......... Documentation will be installed to <dir>
3759 (default PREFIX/doc)
3760 -headerdir <dir> ...... Headers will be installed to <dir>
3761 (default PREFIX/include)
3762 -plugindir <dir> ...... Plugins will be installed to <dir>
3763 (default PREFIX/plugins)
3764 -importdir <dir> ...... Imports for QML will be installed to <dir>
3765 (default PREFIX/imports)
3766 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3768 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3769 (default PREFIX/translations)
3770 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3771 (default PREFIX/etc/settings)
3772 -examplesdir <dir> .... Examples will be installed to <dir>
3773 (default PREFIX/examples)
3774 -demosdir <dir> ....... Demos will be installed to <dir>
3775 (default PREFIX/demos)
3777 You may use these options to turn on strict plugin loading.
3779 -buildkey <key> .... Build the Qt library and plugins using the specified
3780 <key>. When the library loads plugins, it will only
3781 load those that have a matching key.
3785 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3786 that needs to be evaluated. If the evaluation succeeds, the feature is
3787 included. Here is a short explanation of each option:
3789 * -release ........... Compile and link Qt with debugging turned off.
3790 -debug ............. Compile and link Qt with debugging turned on.
3791 -debug-and-release . Compile and link two versions of Qt, with and without
3792 debugging turned on (Mac only).
3794 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3796 -opensource ........ Compile and link the Open-Source Edition of Qt.
3797 -commercial ........ Compile and link the Commercial Edition of Qt.
3800 * -shared ............ Create and use shared Qt libraries.
3801 -static ............ Create and use static Qt libraries.
3803 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3805 -fast .............. Configure Qt quickly by generating Makefiles only for
3806 library and subdirectory targets. All other Makefiles
3807 are created as wrappers, which will in turn run qmake.
3809 -no-largefile ...... Disables large file support.
3810 + -largefile ......... Enables Qt to access files larger than 4 GB.
3813 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3820 if [ "$CFG_DBUS" = "no" ]; then
3829 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3830 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3832 -no-accessibility .. Do not compile Accessibility support.
3833 * -accessibility ..... Compile Accessibility support.
3835 $SHN -no-stl ............ Do not compile STL support.
3836 $SHY -stl ............... Compile STL support.
3838 -no-sql-<driver> ... Disable SQL <driver> entirely.
3839 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3841 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3844 Possible values for <driver>:
3845 [ $CFG_SQL_AVAILABLE ]
3847 -system-sqlite ..... Use sqlite from the operating system.
3849 -no-qt3support ..... Disables the Qt 3 support functionality.
3850 * -qt3support ........ Enables the Qt 3 support functionality.
3852 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3853 + -xmlpatterns ....... Build the QtXmlPatterns module.
3854 QtXmlPatterns is built if a decent C++ compiler
3855 is used and exceptions are enabled.
3857 -no-multimedia ..... Do not build the QtMultimedia module.
3858 + -multimedia ........ Build the QtMultimedia module.
3860 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3861 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3863 -no-phonon ......... Do not build the Phonon module.
3864 + -phonon ............ Build the Phonon module.
3865 Phonon is built if a decent C++ compiler is used.
3866 -no-phonon-backend.. Do not build the platform phonon plugin.
3867 + -phonon-backend..... Build the platform phonon plugin.
3869 -no-svg ............ Do not build the SVG module.
3870 + -svg ............... Build the SVG module.
3872 -no-webkit ......... Do not build the WebKit module.
3873 + -webkit ............ Build the WebKit module.
3874 WebKit is built if a decent C++ compiler is used.
3875 -webkit-debug ...... Build the WebKit module with debug symbols.
3877 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3878 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3880 -no-script ......... Do not build the QtScript module.
3881 + -script ............ Build the QtScript module.
3883 -no-scripttools .... Do not build the QtScriptTools module.
3884 + -scripttools ....... Build the QtScriptTools module.
3886 -no-declarative ..... Do not build the declarative module.
3887 + -declarative ....... Build the declarative module.
3889 -no-declarative-debug ..... Do not build the declarative debugging support.
3890 + -declarative-debug ....... Build the declarative debugging support.
3892 -platform target ... The operating system and compiler you are building
3895 See the README file for a list of supported
3896 operating systems and compilers.
3899 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3901 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3902 raster - Software rasterizer
3903 opengl - Rendering via OpenGL, Experimental!
3904 openvg - Rendering via OpenVG, Experimental!
3911 -no-mmx ............ Do not compile with use of MMX instructions.
3912 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3913 -no-sse ............ Do not compile with use of SSE instructions.
3914 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3915 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3916 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3917 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3918 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3919 -no-avx ............ Do not compile with use of AVX instructions.
3920 -no-neon ........... Do not compile with use of NEON instructions.
3922 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3923 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3925 -D <string> ........ Add an explicit define to the preprocessor.
3926 -I <string> ........ Add an explicit include path.
3927 -L <string> ........ Add an explicit library path.
3929 -help, -h .......... Display this information.
3931 Third Party Libraries:
3933 -qt-zlib ........... Use the zlib bundled with Qt.
3934 + -system-zlib ....... Use zlib from the operating system.
3935 See http://www.gzip.org/zlib
3937 -no-gif ............ Do not compile GIF reading support.
3939 -no-libtiff ........ Do not compile TIFF support.
3940 -qt-libtiff ........ Use the libtiff bundled with Qt.
3941 + -system-libtiff .... Use libtiff from the operating system.
3942 See http://www.libtiff.org
3944 -no-libpng ......... Do not compile PNG support.
3945 -qt-libpng ......... Use the libpng bundled with Qt.
3946 + -system-libpng ..... Use libpng from the operating system.
3947 See http://www.libpng.org/pub/png
3949 -no-libmng ......... Do not compile MNG support.
3950 -qt-libmng ......... Use the libmng bundled with Qt.
3951 + -system-libmng ..... Use libmng from the operating system.
3952 See http://www.libmng.com
3954 -no-libjpeg ........ Do not compile JPEG support.
3955 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3956 + -system-libjpeg .... Use libjpeg from the operating system.
3957 See http://www.ijg.org
3959 -no-openssl ........ Do not compile support for OpenSSL.
3960 + -openssl ........... Enable run-time OpenSSL support.
3961 -openssl-linked .... Enabled linked OpenSSL support.
3963 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3968 -make <part> ....... Add part to the list of parts to be built at make time.
3969 ($QT_DEFAULT_BUILD_PARTS)
3970 -nomake <part> ..... Exclude part from the list of parts to be built.
3972 -R <string> ........ Add an explicit runtime library path to the Qt
3974 -l <string> ........ Add an explicit library.
3976 -no-rpath .......... Do not use the library install path as a runtime
3978 + -rpath ............. Link Qt libraries and executables using the library
3979 install path as a runtime library path. Equivalent
3980 to -R install_libpath
3982 -continue .......... Continue as far as possible if an error occurs.
3984 -verbose, -v ....... Print verbose information about each step of the
3987 -silent ............ Reduce the build output so that warnings and errors
3988 can be seen more easily.
3990 * -no-optimized-qmake ... Do not build qmake optimized.
3991 -optimized-qmake ...... Build qmake optimized.
3993 -no-gui ............ Don't build the Qt GUI library
3995 $NSN -no-nis ............ Do not compile NIS support.
3996 $NSY -nis ............... Compile NIS support.
3998 $CUN -no-cups ........... Do not compile CUPS support.
3999 $CUY -cups .............. Compile CUPS support.
4000 Requires cups/cups.h and libcups.so.2.
4002 $CIN -no-iconv .......... Do not compile support for iconv(3).
4003 $CIY -iconv ............. Compile support for iconv(3).
4005 $PHN -no-pch ............ Do not use precompiled header support.
4006 $PHY -pch ............... Use precompiled header support.
4008 $DBN -no-dbus ........... Do not compile the QtDBus module.
4009 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
4010 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
4012 -reduce-relocations ..... Reduce relocations in the libraries through extra
4013 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
4014 experimental; needs GNU ld >= 2.18).
4017 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
4018 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
4025 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4033 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4037 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4038 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4044 if [ "$PLATFORM_X11" = "yes" ]; then
4045 if [ "$CFG_SM" = "no" ]; then
4052 if [ "$CFG_XSHAPE" = "no" ]; then
4059 if [ "$CFG_XVIDEO" = "no" ]; then
4066 if [ "$CFG_XINERAMA" = "no" ]; then
4073 if [ "$CFG_FONTCONFIG" = "no" ]; then
4080 if [ "$CFG_XCURSOR" = "no" ]; then
4087 if [ "$CFG_XFIXES" = "no" ]; then
4094 if [ "$CFG_XRANDR" = "no" ]; then
4101 if [ "$CFG_XRENDER" = "no" ]; then
4108 if [ "$CFG_MITSHM" = "no" ]; then
4115 if [ "$CFG_XINPUT" = "no" ]; then
4122 if [ "$CFG_XKB" = "no" ]; then
4129 if [ "$CFG_IM" = "no" ]; then
4140 -no-gtkstyle ....... Do not build the GTK theme integration.
4141 + -gtkstyle .......... Build the GTK theme integration.
4143 * -no-nas-sound ...... Do not compile in NAS sound support.
4144 -system-nas-sound .. Use NAS libaudio from the operating system.
4145 See http://radscan.com/nas.html
4147 -egl ............... Use EGL instead of GLX to manage contexts.
4148 When building for desktop OpenGL, this option will
4149 make Qt use EGL to manage contexts rather than the
4150 GLX, which is the default. Note: For OpenGL ES, EGL
4153 -no-opengl ......... Do not support OpenGL.
4154 + -opengl <api> ...... Enable OpenGL support.
4155 With no parameter, this will auto-detect the "best"
4156 OpenGL API to use. If desktop OpenGL is available, it
4157 will be used. Use desktop, es1, or es2 for <api>
4158 to force the use of the Desktop (OpenGL 1.x or 2.x),
4159 OpenGL ES 1.x Common profile, or 2.x APIs instead.
4161 -no-openvg ........ Do not support OpenVG.
4162 + -openvg ........... Enable OpenVG support.
4163 Requires EGL support, typically supplied by an OpenGL
4164 or other graphics implementation.
4166 $SMN -no-sm ............. Do not support X Session Management.
4167 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4169 $SHN -no-xshape ......... Do not compile XShape support.
4170 $SHY -xshape ............ Compile XShape support.
4171 Requires X11/extensions/shape.h.
4173 $XVN -no-xvideo ......... Do not compile XVideo support.
4174 $XVY -xvideo ............ Compile XVideo support.
4175 Requires X11/extensions/Xv.h & Xvlib.h.
4177 $SHN -no-xsync .......... Do not compile XSync support.
4178 $SHY -xsync ............. Compile XSync support.
4179 Requires X11/extensions/sync.h.
4181 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4182 $XAY -xinerama .......... Compile Xinerama support.
4183 Requires X11/extensions/Xinerama.h and libXinerama.
4184 By default, Xinerama support will be compiled if
4185 available and the shared libraries are dynamically
4188 $XCN -no-xcursor ........ Do not compile Xcursor support.
4189 $XCY -xcursor ........... Compile Xcursor support.
4190 Requires X11/Xcursor/Xcursor.h and libXcursor.
4191 By default, Xcursor support will be compiled if
4192 available and the shared libraries are dynamically
4195 $XFN -no-xfixes ......... Do not compile Xfixes support.
4196 $XFY -xfixes ............ Compile Xfixes support.
4197 Requires X11/extensions/Xfixes.h and libXfixes.
4198 By default, Xfixes support will be compiled if
4199 available and the shared libraries are dynamically
4202 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4203 $XZY -xrandr ............ Compile Xrandr support.
4204 Requires X11/extensions/Xrandr.h and libXrandr.
4206 $XRN -no-xrender ........ Do not compile Xrender support.
4207 $XRY -xrender ........... Compile Xrender support.
4208 Requires X11/extensions/Xrender.h and libXrender.
4210 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4211 $XMY -mitshm ............ Compile MIT-SHM support.
4212 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4214 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4215 $FCGY -fontconfig ........ Compile FontConfig support.
4216 Requires fontconfig/fontconfig.h, libfontconfig,
4217 freetype.h and libfreetype.
4219 $XIN -no-xinput ......... Do not compile Xinput support.
4220 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4221 which requires IRIX with wacom.h and libXi or
4222 XFree86 with X11/extensions/XInput.h and libXi.
4224 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4225 $XKY -xkb ............... Compile XKB support.
4230 if [ "$PLATFORM_MAC" = "yes" ]; then
4235 -Fstring ........... Add an explicit framework path.
4236 -fw string ......... Add an explicit framework.
4238 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4240 -carbon .............Build the Carbon version of Qt. 64-bit archs
4241 are not supported by carbon and will be built
4244 * -framework ......... Build Qt as a series of frameworks and
4245 link tools against those frameworks.
4246 -no-framework ...... Do not build Qt as a series of frameworks.
4248 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4249 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4251 -universal ......... Equivalent to -arch "ppc x86"
4253 -arch <arch> ....... Build Qt for <arch>
4254 Example values for <arch>: x86 ppc x86_64 ppc64
4255 Multiple -arch arguments can be specified.
4257 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4258 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4263 if [ "$PLATFORM_QWS" = "yes" ]; then
4265 Qt for Embedded Linux:
4267 -embedded <arch> .... This will enable the embedded build, you must have a
4268 proper license for this switch to work.
4269 Example values for <arch>: arm mips x86 generic
4273 if [ "$PLATFORM_QPA" = "yes" ]; then
4279 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4282 -xplatform target ... The target platform when cross-compiling.
4284 -no-feature-<feature> Do not compile in <feature>.
4285 -feature-<feature> .. Compile in <feature>. The available features
4286 are described in src/corelib/global/qfeatures.txt
4288 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4289 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4291 The floating point format is usually autodetected by configure. Use this
4292 to override the detected value.
4294 -little-endian ...... Target platform is little endian (LSB first).
4295 -big-endian ......... Target platform is big endian (MSB first).
4297 -host-little-endian . Host platform is little endian (LSB first).
4298 -host-big-endian .... Host platform is big endian (MSB first).
4300 You only need to specify the endianness when
4301 cross-compiling, otherwise the host
4302 endianness will be used.
4304 -no-freetype ........ Do not compile in Freetype2 support.
4305 -qt-freetype ........ Use the libfreetype bundled with Qt.
4306 * -system-freetype .... Use libfreetype from the operating system.
4307 See http://www.freetype.org/
4309 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4310 default ($CFG_QCONFIG).
4312 -no-opengl .......... Do not support OpenGL.
4313 -opengl <api> ....... Enable OpenGL ES support
4314 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
4315 or 2.x, or regular desktop OpenGL.
4316 Use es1 or es2 for <api> to override auto-detection.
4320 if [ "$PLATFORM_QWS" = "yes" ]; then
4323 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4324 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4326 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4327 by default all available decorations are on.
4328 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4329 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4330 linked to at run time.
4331 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4332 -no-decoration-<style> ....Disable decoration <style> entirely.
4333 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4335 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4336 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4337 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4338 linked to at run time.
4339 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4340 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4341 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4343 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4344 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4346 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4348 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4350 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4351 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4353 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4354 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4355 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4357 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4358 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4359 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4361 -iwmmxt ............ Compile using the iWMMXt instruction set
4362 (available on some XScale CPUs).
4366 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4367 if [ "$CFG_GLIB" = "no" ]; then
4375 $GBN -no-glib ........... Do not compile Glib support.
4376 $GBY -glib .............. Compile Glib support.
4381 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
4384 Qt for Symbian only:
4385 -no-s60 ............ Do not compile in S60 support.
4386 + -s60 ............... Compile with support for the S60 UI Framework.
4387 -no-style-s60....... Disable s60 style
4388 + -qt-style-s60....... Enable s60 style in the Qt Library
4390 -no-usedeffiles .... Disable the usage of DEF files.
4391 * -usedeffiles ....... Enable the usage of DEF files.
4394 [ "x$ERROR" = "xyes" ] && exit 1
4399 # -----------------------------------------------------------------------------
4400 # LICENSING, INTERACTIVE PART
4401 # -----------------------------------------------------------------------------
4403 if [ "$PLATFORM_QWS" = "yes" ]; then
4404 Platform="Qt for Embedded Linux"
4405 elif [ "$PLATFORM_QPA" = "yes" ]; then
4406 Platform="Qt Lighthouse"
4407 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
4408 Platform="Qt for Symbian"
4409 elif [ "$PLATFORM_MAC" = "yes" ]; then
4410 Platform="Qt for Mac OS X"
4411 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4412 Platform="Qt for Windows"
4413 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4415 Platform="Qt for Linux/X11"
4419 echo "This is the $Platform ${EditionString} Edition."
4422 if [ "$Edition" = "NokiaInternalBuild" ]; then
4423 echo "Detected -nokia-developer option"
4424 echo "Nokia employees and agents are allowed to use this software under"
4425 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4426 elif [ "$Edition" = "OpenSource" ]; then
4428 echo "You are licensed to use this software under the terms of"
4429 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4430 if [ -f "$relpath/LICENSE.GPL3" ]; then
4431 echo "You are also licensed to use this software under the terms of"
4432 echo "the GNU General Public License (GPL) versions 3."
4438 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4439 echo "You have already accepted the terms of the $LicenseType license."
4442 if [ -f "$relpath/LICENSE.GPL3" ]; then
4443 echo "Type '3' to view the GNU General Public License version 3."
4445 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4446 echo "Type 'yes' to accept this license offer."
4447 echo "Type 'no' to decline this license offer."
4449 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4453 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4455 elif [ "$acceptance" = "no" ]; then
4456 echo "You are not licensed to use this software."
4459 elif [ "$acceptance" = "3" ]; then
4460 more "$relpath/LICENSE.GPL3"
4461 elif [ "$acceptance" = "L" ]; then
4462 more "$relpath/LICENSE.LGPL"
4465 elif [ "$Edition" = "Preview" ]; then
4466 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4469 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4470 echo "You have already accepted the terms of the $LicenseType license."
4473 echo "You are licensed to use this software under the terms of"
4474 echo "the $TheLicense"
4476 echo "Type '?' to read the Preview License."
4477 echo "Type 'yes' to accept this license offer."
4478 echo "Type 'no' to decline this license offer."
4480 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4484 if [ "$acceptance" = "yes" ]; then
4486 elif [ "$acceptance" = "no" ] ;then
4487 echo "You are not licensed to use this software."
4490 elif [ "$acceptance" = "?" ]; then
4491 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4494 elif [ "$Edition" != "OpenSource" ]; then
4495 if [ -n "$ExpiryDate" ]; then
4496 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4497 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4498 Today=`date +%Y%m%d`
4499 if [ "$Today" -gt "$ExpiryDate" ]; then
4500 case "$LicenseType" in
4501 Commercial|Academic|Educational)
4502 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4504 echo "NOTICE NOTICE NOTICE NOTICE"
4506 echo " Your support and upgrade period has expired."
4508 echo " You are no longer licensed to use this version of Qt."
4509 echo " Please contact qt-info@nokia.com to renew your support"
4510 echo " and upgrades for this license."
4512 echo "NOTICE NOTICE NOTICE NOTICE"
4517 echo "WARNING WARNING WARNING WARNING"
4519 echo " Your support and upgrade period has expired."
4521 echo " You may continue to use your last licensed release"
4522 echo " of Qt under the terms of your existing license"
4523 echo " agreement. But you are not entitled to technical"
4524 echo " support, nor are you entitled to use any more recent"
4525 echo " Qt releases."
4527 echo " Please contact qt-info@nokia.com to renew your"
4528 echo " support and upgrades for this license."
4530 echo "WARNING WARNING WARNING WARNING"
4537 echo "NOTICE NOTICE NOTICE NOTICE"
4539 echo " Your Evaluation license has expired."
4541 echo " You are no longer licensed to use this software. Please"
4542 echo " contact qt-info@nokia.com to purchase license, or install"
4543 echo " the Qt Open Source Edition if you intend to develop free"
4546 echo "NOTICE NOTICE NOTICE NOTICE"
4553 TheLicense=`head -n 1 "$outpath/LICENSE"`
4555 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4556 echo "You have already accepted the terms of the $TheLicense."
4559 echo "You are licensed to use this software under the terms of"
4560 echo "the $TheLicense."
4562 echo "Type '?' to view the $TheLicense."
4563 echo "Type 'yes' to accept this license offer."
4564 echo "Type 'no' to decline this license offer."
4566 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4570 if [ "$acceptance" = "yes" ]; then
4572 elif [ "$acceptance" = "no" ]; then
4573 echo "You are not licensed to use this software."
4576 else [ "$acceptance" = "?" ]
4577 more "$outpath/LICENSE"
4582 # this should be moved somewhere else
4585 AIX_VERSION=`uname -v`
4586 if [ "$AIX_VERSION" -lt "5" ]; then
4587 QMakeVar add QMAKE_LIBS_X11 -lbind
4594 #-------------------------------------------------------------------------------
4595 # generate qconfig.cpp
4596 #-------------------------------------------------------------------------------
4597 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4599 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4600 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4601 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4602 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4603 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4604 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4605 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4606 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4607 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4608 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4609 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4610 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4611 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4612 DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4614 TODAY=`date +%Y-%m-%d`
4615 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4617 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4618 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4620 /* Installation date */
4621 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4625 if [ ! -z "$QT_HOST_PREFIX" ]; then
4626 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4627 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4628 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4629 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4630 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4631 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4632 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4633 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4634 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4635 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4636 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4637 HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4639 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4641 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4642 /* Installation Info */
4643 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4644 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4645 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4646 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4647 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4648 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4649 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4650 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4651 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4652 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4653 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4654 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
4655 #else // QT_BOOTSTRAPPED
4659 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4660 /* Installation Info */
4661 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4662 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4663 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4664 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4665 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4666 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4667 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4668 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4669 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4670 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4671 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4672 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
4675 if [ ! -z "$QT_HOST_PREFIX" ]; then
4676 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4677 #endif // QT_BOOTSTRAPPED
4682 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4683 /* strlen( "qt_lcnsxxxx" ) == 12 */
4684 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4685 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4686 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4687 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4688 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4689 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4690 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4691 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4692 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4693 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4694 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4695 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4696 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4697 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
4700 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4701 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4702 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4704 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4705 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4706 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4709 # -----------------------------------------------------------------------------
4710 if [ "$LicenseType" = "Evaluation" ]; then
4711 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4712 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4713 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4716 if [ -n "$EVALKEY" ]; then
4717 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4718 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4719 /* Evaluation license key */
4720 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4722 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4726 # -----------------------------------------------------------------------------
4728 # -----------------------------------------------------------------------------
4731 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4733 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4734 if [ "$OPT_SHADOW" = "yes" ]; then
4735 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4736 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4737 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4742 # $2: optional transformation
4743 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4744 # is where the resulting variable is written to
4745 # Assumes that the optional transformation produces the same variable name for each hit
4746 setBootstrapVariable()
4748 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4754 valStart = index($0, "=") + 1
4757 if (substr($0, valStart - 2, 1) == "+") {
4761 variable = substr($0, 0, valStart - 2 - append)
4762 value = substr($0, valStart)
4763 gsub("[ \t]+", "", variable)
4764 gsub("^[ \t]+", "", value)
4765 gsub("[ \t]+$", "", value)
4767 if (append == 1 && length(combinedValue) > 0) {
4768 combinedValue = combinedValue " " value
4770 combinedValue = value
4774 if (length(combinedValue) > 0) {
4775 printf "%s = %s\n", variable, combinedValue
4781 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4782 echo "Creating qmake. Please wait..."
4785 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4786 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4787 if [ -f "$QCONFIG_H" ]; then
4788 OLD_QCONFIG_H=$QCONFIG_H
4789 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4792 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4793 # when building qmake, we use #defines for the install paths,
4794 # however they are real functions in the library
4795 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4796 mkdir -p "$outpath/src/corelib/global"
4797 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4798 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4801 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4803 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4804 rm -rf mkspecs/default
4805 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4807 for mkfile in GNUmakefile Makefile; do
4810 in_mkfile="${mkfile}.in"
4811 if [ "$mkfile" = "Makefile" ]; then
4812 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4813 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4815 in_mkfile="${mkfile}.unix"
4817 in_mkfile="$relpath/qmake/$in_mkfile"
4818 mkfile="$outpath/qmake/$mkfile"
4819 if [ -f "$mkfile" ]; then
4820 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4823 [ -f "$in_mkfile" ] || continue
4825 echo "########################################################################" > "$mkfile"
4826 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4827 echo "########################################################################" >> "$mkfile"
4830 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4831 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4832 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4834 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4835 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4838 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4839 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4840 if [ "$CFG_SILENT" = "yes" ]; then
4841 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4842 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4844 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4845 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4847 setBootstrapVariable QMAKE_CFLAGS
4848 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4849 setBootstrapVariable QMAKE_LFLAGS
4851 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4852 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4853 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4855 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4856 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4857 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4858 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4859 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4860 elif [ "$CFG_DEBUG" = "yes" ]; then
4861 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4862 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4863 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4864 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4867 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4868 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4869 for rpath in $RPATH_FLAGS; do
4870 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4873 if [ "$BUILD_ON_MAC" = "yes" ]; then
4874 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4875 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4876 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4877 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4878 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4879 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4880 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4881 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4882 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4883 X86_CFLAGS="-arch i386"
4884 X86_LFLAGS="-arch i386"
4885 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4886 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4887 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4889 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4890 PPC_CFLAGS="-arch ppc"
4891 PPC_LFLAGS="-arch ppc"
4892 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4893 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4894 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4896 if [ '!' -z "$CFG_SDK" ]; then
4897 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4898 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4899 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4900 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4901 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4904 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4905 if [ '!' -z "$D_FLAGS" ]; then
4906 for DEF in $D_FLAGS; do
4907 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4910 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4911 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4912 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4913 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4915 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4916 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4917 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4918 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4919 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4920 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4921 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4922 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4923 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4924 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4926 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4927 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4928 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4929 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4934 QMAKE_BUILD_ERROR=no
4935 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4936 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4937 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4938 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4941 #-------------------------------------------------------------------------------
4942 # tests that need qmake
4943 #-------------------------------------------------------------------------------
4945 # detect availability of float math.h functions
4946 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4947 CFG_USE_FLOATMATH=yes
4949 CFG_USE_FLOATMATH=no
4952 # detect mmx support
4953 if [ "${CFG_MMX}" = "auto" ]; then
4954 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4961 # detect 3dnow support
4962 if [ "${CFG_3DNOW}" = "auto" ]; then
4963 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4970 # detect sse support
4971 if [ "${CFG_SSE}" = "auto" ]; then
4972 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4979 # detect sse2 support
4980 if [ "${CFG_SSE2}" = "auto" ]; then
4981 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4988 # detect sse3 support
4989 if [ "${CFG_SSE3}" = "auto" ]; then
4990 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4997 # detect ssse3 support
4998 if [ "${CFG_SSSE3}" = "auto" ]; then
4999 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
5006 # detect sse4.1 support
5007 if [ "${CFG_SSE4_1}" = "auto" ]; then
5008 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
5015 # detect sse4.2 support
5016 if [ "${CFG_SSE4_2}" = "auto" ]; then
5017 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
5024 # detect avx support
5025 if [ "${CFG_AVX}" = "auto" ]; then
5026 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5033 # check iWMMXt support
5034 if [ "$CFG_IWMMXT" = "yes" ]; then
5035 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5036 if [ $? != "0" ]; then
5037 echo "The iWMMXt functionality test failed!"
5038 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5043 # detect neon support
5044 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5045 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
5052 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5054 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5055 QMakeVar set styles "windows s60" #overwrite previous default
5059 if [ "$CFG_LARGEFILE" = auto ]; then
5062 if [ "$CFG_PHONON" = auto ]; then
5066 if test -z "$EPOCROOT"; then
5067 echo "Please export EPOCROOT. It should point to the sdk install dir"
5070 if test ! -d "$EPOCROOT/epoc32"; then
5071 echo "Could not find the 'epoc32' dir in your EPOCROOT."
5075 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
5076 # Raptor does not support configure tests.
5078 # the main commands needed to compile;
5079 (mkdir -p config.tests/symbian/rcomp
5080 cd config.tests/symbian/rcomp
5081 rm -f rcomp_test.rsg
5082 touch rcomp_test.rpp rcomp_test.rsc rcomp_test.rss
5083 rcomp -u -m045,046,047 -s./rcomp_test.rpp -o./rcomp_test.rsc -h./rcomp_test.rsg -i./rcomp_test.rss 2>&1 > /dev/null
5084 if test ! -f rcomp_test.rsg; then
5085 echo "Finding a working rcomp in your PATH failed."
5086 echo "Fatal error. Make sure you have the epoc tools working and in your PATH";
5091 # compile a simple main that uses printf
5092 if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS
5094 echo "Testing your compiler failed. Could not compile a simple application."
5095 echo "Fatal error; Rerun configure with -verbose to get more details."
5102 if [ "$CFG_ZLIB" = "no" ]; then
5103 # Note: Qt no longer support builds without zlib
5104 # So we force a "no" to be "auto" here.
5105 # If you REALLY really need no zlib support, you can still disable
5106 # it by doing the following:
5107 # add "no-zlib" to mkspecs/qconfig.pri
5108 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5110 # There's no guarantee that Qt will build under those conditions
5115 if [ "$CFG_ZLIB" = "auto" ]; then
5116 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
5123 if [ "$CFG_LARGEFILE" = "auto" ]; then
5124 #Large files should be enabled for all Linux systems
5129 if [ "$CFG_S60" = "auto" ]; then
5130 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5137 if [ "$CFG_QS60STYLE" = "auto" ]; then
5138 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5145 if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then
5146 # elf2e32 crashes when using def files together with gcce.
5147 if [ "$XPLATFORM_SYMBIAN" = "yes" ] && [ "$CFG_DEV" = "no" ] && [ "$XPLATFORM" != "symbian-gcce" ]; then
5148 CFG_SYMBIAN_DEFFILES=yes
5150 CFG_SYMBIAN_DEFFILES=no
5154 # detect how jpeg should be built
5155 if [ "$CFG_JPEG" = "auto" ]; then
5156 if [ "$CFG_SHARED" = "yes" ]; then
5163 if [ "$CFG_LIBJPEG" = "auto" ]; then
5164 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
5171 # detect how gif should be built
5172 if [ "$CFG_GIF" = "auto" ]; then
5173 if [ "$CFG_SHARED" = "yes" ]; then
5180 # detect how tiff should be built
5181 if [ "$CFG_TIFF" = "auto" ]; then
5182 if [ "$CFG_SHARED" = "yes" ]; then
5190 if [ "$CFG_LIBTIFF" = "auto" ]; then
5191 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libtiff "libtiff" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5198 # detect how mng should be built
5199 if [ "$CFG_MNG" = "auto" ]; then
5200 if [ "$CFG_SHARED" = "yes" ]; then
5207 if [ "$CFG_LIBMNG" = "auto" ]; then
5208 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libmng "libmng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5216 if [ "$CFG_LIBPNG" = "auto" ]; then
5217 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
5224 # detect accessibility
5225 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5226 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5227 # accessibility is currently unsupported
5228 CFG_ACCESSIBILITY=no
5230 CFG_ACCESSIBILITY=yes
5234 # auto-detect SQL-modules support
5235 for _SQLDR in $CFG_SQL_AVAILABLE; do
5238 if [ "$CFG_SQL_mysql" != "no" ]; then
5239 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5240 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5241 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5242 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5243 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5244 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5245 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5247 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5248 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5249 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5250 echo " You need MySql 4 or higher."
5251 echo " If you believe this message is in error you may use the continue"
5252 echo " switch (-continue) to $0 to continue."
5257 QT_LFLAGS_MYSQL_R=""
5261 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
5262 QMakeVar add CONFIG use_libmysqlclient_r
5263 if [ "$CFG_SQL_mysql" = "auto" ]; then
5264 CFG_SQL_mysql=plugin
5266 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5267 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
5268 if [ "$CFG_SQL_mysql" = "auto" ]; then
5269 CFG_SQL_mysql=plugin
5272 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5273 echo "MySQL support cannot be enabled due to functionality tests!"
5274 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5275 echo " If you believe this message is in error you may use the continue"
5276 echo " switch (-continue) to $0 to continue."
5281 QT_LFLAGS_MYSQL_R=""
5289 if [ "$CFG_SQL_psql" != "no" ]; then
5290 # Be careful not to use native pg_config when cross building.
5291 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5292 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5293 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5295 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5296 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5297 # But, respect PSQL_LIBS if set
5298 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5299 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
5300 if [ "$CFG_SQL_psql" = "auto" ]; then
5304 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5305 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5306 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5307 echo " If you believe this message is in error you may use the continue"
5308 echo " switch (-continue) to $0 to continue."
5319 if [ "$CFG_SQL_odbc" != "no" ]; then
5320 if ( [ "$PLATFORM_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
5321 if [ "$CFG_SQL_odbc" = "auto" ]; then
5325 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
5326 QT_LFLAGS_ODBC="-liodbc"
5327 if [ "$CFG_SQL_odbc" = "auto" ]; then
5331 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5332 echo "ODBC support cannot be enabled due to functionality tests!"
5333 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5334 echo " If you believe this message is in error you may use the continue"
5335 echo " switch (-continue) to $0 to continue."
5345 if [ "$CFG_SQL_oci" != "no" ]; then
5346 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
5347 if [ "$CFG_SQL_oci" = "auto" ]; then
5351 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5352 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5353 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5354 echo " If you believe this message is in error you may use the continue"
5355 echo " switch (-continue) to $0 to continue."
5364 if [ "$CFG_SQL_tds" != "no" ]; then
5365 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5366 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5367 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
5368 if [ "$CFG_SQL_tds" = "auto" ]; then
5372 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5373 echo "TDS support cannot be enabled due to functionality tests!"
5374 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5375 echo " If you believe this message is in error you may use the continue"
5376 echo " switch (-continue) to $0 to continue."
5385 if [ "$CFG_SQL_db2" != "no" ]; then
5386 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
5387 if [ "$CFG_SQL_db2" = "auto" ]; then
5391 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5392 echo "ODBC support cannot be enabled due to functionality tests!"
5393 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5394 echo " If you believe this message is in error you may use the continue"
5395 echo " switch (-continue) to $0 to continue."
5404 if [ "$CFG_SQL_ibase" != "no" ]; then
5405 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
5406 if [ "$CFG_SQL_ibase" = "auto" ]; then
5407 CFG_SQL_ibase=plugin
5410 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5411 echo "InterBase support cannot be enabled due to functionality tests!"
5412 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5413 echo " If you believe this message is in error you may use the continue"
5414 echo " switch (-continue) to $0 to continue."
5423 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5424 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
5425 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5426 CFG_SQL_sqlite2=plugin
5429 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5430 echo "SQLite2 support cannot be enabled due to functionality tests!"
5431 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5432 echo " If you believe this message is in error you may use the continue"
5433 echo " switch (-continue) to $0 to continue."
5442 if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
5443 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5444 # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file and should be marked as driver.
5445 # Configuration parameters should be set
5447 QT_LFLAGS_SQLITE=-lsqlite3
5448 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5451 if [ "$CFG_SQL_sqlite" != "no" ]; then
5452 SQLITE_AUTODETECT_FAILED="no"
5453 if [ "$CFG_SQLITE" = "system" ]; then
5454 if [ -n "$PKG_CONFIG" ]; then
5455 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5456 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5458 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
5459 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5460 CFG_SQL_sqlite=plugin
5462 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5464 SQLITE_AUTODETECT_FAILED="yes"
5467 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5468 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5469 CFG_SQL_sqlite=plugin
5472 SQLITE_AUTODETECT_FAILED="yes"
5476 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5477 echo "SQLite support cannot be enabled due to functionality tests!"
5478 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5479 echo " If you believe this message is in error you may use the continue"
5480 echo " switch (-continue) to $0 to continue."
5486 if [ "$OPT_VERBOSE" = "yes" ]; then
5487 echo "unknown SQL driver: $_SQLDR"
5493 # auto-detect NIS support
5494 if [ "$CFG_NIS" != "no" ]; then
5495 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
5498 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5499 echo "NIS support cannot be enabled due to functionality tests!"
5500 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5501 echo " If you believe this message is in error you may use the continue"
5502 echo " switch (-continue) to $0 to continue."
5510 # auto-detect CUPS support
5511 if [ "$CFG_CUPS" != "no" ]; then
5512 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
5515 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5516 echo "Cups support cannot be enabled due to functionality tests!"
5517 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5518 echo " If you believe this message is in error you may use the continue"
5519 echo " switch (-continue) to $0 to continue."
5527 # auto-detect iconv(3) support
5528 if [ "$CFG_ICONV" != "no" ]; then
5529 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5531 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
5533 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
5535 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
5538 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5539 echo "Iconv support cannot be enabled due to functionality tests!"
5540 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5541 echo " If you believe this message is in error you may use the continue"
5542 echo " switch (-continue) to $0 to continue."
5550 # auto-detect libdbus-1 support
5551 if [ "$CFG_DBUS" != "no" ]; then
5552 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5553 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5554 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5556 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
5557 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5558 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5559 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5561 if [ "$CFG_DBUS" = "auto" ]; then
5563 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5564 # CFG_DBUS is "yes" or "linked" here
5566 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5567 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5568 echo " If you believe this message is in error you may use the continue"
5569 echo " switch (-continue) to $0 to continue."
5575 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5576 CFG_MULTIMEDIA="$CFG_GUI"
5579 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5580 echo "QtMultimedia requested, but it can't be built without QtGui"
5584 # Generate a CRC of the namespace for using in constants for the Carbon port.
5585 # This should mean that you really *can* load two Qt's and have our custom
5586 # Carbon events work.
5587 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5588 QT_NAMESPACE_MAC_CRC=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS $I_FLAGS $l_FLAGS`
5591 # X11/QWS/Lighthouse
5592 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5594 # auto-detect Glib support
5595 if [ "$CFG_GLIB" != "no" ]; then
5596 if [ -n "$PKG_CONFIG" ]; then
5597 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5598 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5600 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
5602 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5603 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5605 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5606 echo "Glib support cannot be enabled due to functionality tests!"
5607 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5608 echo " If you believe this message is in error you may use the continue"
5609 echo " switch (-continue) to $0 to continue."
5617 if [ "$CFG_GUI" = "no" ]; then
5618 if [ "$CFG_PHONON" = "auto" ]; then
5621 if [ "$CFG_PHONON" != "no" ]; then
5622 echo "Phonon enabled, but GUI disabled."
5623 echo " You might need to either enable the GUI or disable Phonon"
5628 # Auto-detect GStreamer support (needed for Phonon)
5629 if [ "$CFG_PHONON" != "no" ]; then
5630 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5631 if [ -n "$PKG_CONFIG" ]; then
5632 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5633 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5635 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
5637 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5638 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5640 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5641 echo "Gstreamer 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."
5650 elif [ "$CFG_GLIB" = "no" ]; then
5657 if [ "$CFG_PHONON" != "no" ]; then
5658 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5659 if [ "$CFG_GSTREAMER" = "yes" ]; then
5662 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5663 echo "Phonon support cannot be enabled due to functionality tests!"
5664 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5665 echo " If you believe this message is in error you may use the continue"
5666 echo " switch (-continue) to $0 to continue."
5677 # auto-detect icd support
5678 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5679 if [ -n "$PKG_CONFIG" ]; then
5680 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5681 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5683 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icd "ICD" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_CONNSETTINGS $QT_LIBS_CONNSETTINGS; then
5684 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5685 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5686 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5688 if [ "$CFG_ICD" = "auto" ]; then
5690 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5693 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5694 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5695 echo " If you believe this message is in error you may use the continue"
5696 echo " switch (-continue) to $0 to continue."
5700 elif [ "$CFG_GLIB" = "no" ]; then
5704 # auto-detect libicu support
5705 if [ "$CFG_ICU" != "no" ]; then
5706 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5707 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5709 if [ "$CFG_ICU" = "auto" ]; then
5711 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5714 echo "The ICU library support cannot be enabled."
5715 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5716 echo " If you believe this message is in error you may use the continue"
5717 echo " switch (-continue) to $0 to continue."
5723 # Auto-detect PulseAudio support
5724 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5725 if [ -n "$PKG_CONFIG" ]; then
5726 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5727 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5729 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
5731 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5732 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5734 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5735 echo "PulseAudio support cannot be enabled due to functionality tests!"
5736 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5737 echo " If you believe this message is in error you may use the continue"
5738 echo " switch (-continue) to $0 to continue."
5745 fi # X11/QWS/Lighthouse
5748 if [ "$PLATFORM_X11" = "yes" ]; then
5749 x11tests="$relpath/config.tests/x11"
5752 # work around broken X11 headers when using GCC 2.95 or later
5754 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5755 if [ $NOTYPE = "yes" ]; then
5756 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5757 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5760 # Check we actually have X11 :-)
5761 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5762 if [ $? != "0" ]; then
5763 echo "Basic XLib functionality test failed!"
5764 echo " You might need to modify the include and library search paths by editing"
5765 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5770 # X11/MINGW/SYMBIAN OpenGL
5771 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIAN" = "yes" ]; then
5772 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
5773 if [ "$CFG_GUI" = "no" ]; then
5774 if [ "$CFG_OPENGL" = "auto" ]; then
5777 if [ "$CFG_OPENGL" != "no" ]; then
5778 echo "OpenGL enabled, but GUI disabled."
5779 echo " You might need to either enable the GUI or disable OpenGL"
5783 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5784 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
5786 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
5788 if [ "$CFG_EGL" = "no" ]; then
5791 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
5793 if [ "$CFG_EGL" = "no" ]; then
5797 if [ "$CFG_OPENGL" = "yes" ]; then
5798 echo "All the OpenGL functionality tests failed!"
5799 echo " You might need to modify the include and library search paths by editing"
5800 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5801 echo " ${XQMAKESPEC}."
5808 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5809 if [ "$CFG_OPENGL" = "desktop" ]; then
5810 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5811 if [ $? != "0" ]; then
5812 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5819 elif [ "$CFG_OPENGL" = "es1" ]; then
5821 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5822 if [ $? != "0" ]; then
5823 echo "The OpenGL ES 1.x functionality test failed!"
5824 echo " You might need to modify the include and library search paths by editing"
5825 echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
5826 echo " ${XQMAKESPEC}."
5829 elif [ "$CFG_OPENGL" = "es2" ]; then
5831 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5832 if [ $? != "0" ]; then
5833 echo "The OpenGL ES 2.0 functionality test failed!"
5834 echo " You might need to modify the include and library search paths by editing"
5835 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5836 echo " ${XQMAKESPEC}."
5839 elif [ "$CFG_OPENGL" = "desktop" ]; then
5840 # Desktop OpenGL support
5841 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5842 if [ $? != "0" ]; then
5843 echo "The OpenGL functionality test failed!"
5844 echo " You might need to modify the include and library search paths by editing"
5845 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5846 echo " ${XQMAKESPEC}."
5851 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5852 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5853 if [ $? != "0" ]; then
5854 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5862 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5863 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5864 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5865 CFG_GRAPHICS_SYSTEM=default
5867 fi # X11/MINGW OpenGL
5870 if [ "$PLATFORM_X11" = "yes" ]; then
5871 # auto-detect Xcursor support
5872 if [ "$CFG_XCURSOR" != "no" ]; then
5873 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
5874 if [ "$CFG_XCURSOR" != "runtime" ]; then
5878 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5879 echo "Xcursor support cannot be enabled due to functionality tests!"
5880 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5881 echo " If you believe this message is in error you may use the continue"
5882 echo " switch (-continue) to $0 to continue."
5890 # auto-detect Xfixes support
5891 if [ "$CFG_XFIXES" != "no" ]; then
5892 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5893 if [ "$CFG_XFIXES" != "runtime" ]; then
5897 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5898 echo "Xfixes support cannot be enabled due to functionality tests!"
5899 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5900 echo " If you believe this message is in error you may use the continue"
5901 echo " switch (-continue) to $0 to continue."
5909 # auto-detect Xrandr support (resize and rotate extension)
5910 if [ "$CFG_XRANDR" != "no" ]; then
5911 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
5912 if [ "$CFG_XRANDR" != "runtime" ]; then
5916 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5917 echo "Xrandr support cannot be enabled due to functionality tests!"
5918 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5919 echo " If you believe this message is in error you may use the continue"
5920 echo " switch (-continue) to $0 to continue."
5928 # auto-detect Xrender support
5929 if [ "$CFG_XRENDER" != "no" ]; then
5930 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
5933 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5934 echo "Xrender support cannot be enabled due to functionality tests!"
5935 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5936 echo " If you believe this message is in error you may use the continue"
5937 echo " switch (-continue) to $0 to continue."
5945 # Additional check to decide if WebKit support will be included
5946 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5947 echo "Warning: -no-xrender will disable the QtWebkit module."
5951 # auto-detect MIT-SHM support
5952 if [ "$CFG_MITSHM" != "no" ]; then
5953 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
5956 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5957 echo "MITSHM support cannot be enabled due to functionality tests!"
5958 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5959 echo " If you believe this message is in error you may use the continue"
5960 echo " switch (-continue) to $0 to continue."
5968 # auto-detect FontConfig support
5969 if [ "$CFG_FONTCONFIG" != "no" ]; then
5970 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5971 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5972 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5974 QT_CFLAGS_FONTCONFIG=
5975 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5977 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
5979 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5980 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5981 CFG_LIBFREETYPE=system
5983 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5984 echo "FontConfig support cannot be enabled due to functionality tests!"
5985 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5986 echo " If you believe this message is in error you may use the continue"
5987 echo " switch (-continue) to $0 to continue."
5995 # auto-detect Session Management support
5996 if [ "$CFG_SM" = "auto" ]; then
5997 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
6000 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6001 echo "Session Management support cannot be enabled due to functionality tests!"
6002 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6003 echo " If you believe this message is in error you may use the continue"
6004 echo " switch (-continue) to $0 to continue."
6012 # auto-detect SHAPE support
6013 if [ "$CFG_XSHAPE" != "no" ]; then
6014 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
6017 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6018 echo "XShape support cannot be enabled due to functionality tests!"
6019 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6020 echo " If you believe this message is in error you may use the continue"
6021 echo " switch (-continue) to $0 to continue."
6029 # auto-detect XVideo support
6030 if [ "$CFG_XVIDEO" != "no" ]; then
6031 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
6034 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6035 echo "XVideo support cannot be enabled due to functionality tests!"
6036 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6037 echo " If you believe this message is in error you may use the continue"
6038 echo " switch (-continue) to $0 to continue."
6046 # auto-detect XSync support
6047 if [ "$CFG_XSYNC" != "no" ]; then
6048 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
6051 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6052 echo "XSync support cannot be enabled due to functionality tests!"
6053 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6054 echo " If you believe this message is in error you may use the continue"
6055 echo " switch (-continue) to $0 to continue."
6063 # auto-detect Xinerama support
6064 if [ "$CFG_XINERAMA" != "no" ]; then
6065 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
6066 if [ "$CFG_XINERAMA" != "runtime" ]; then
6070 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6071 echo "Xinerama support cannot be enabled due to functionality tests!"
6072 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6073 echo " If you believe this message is in error you may use the continue"
6074 echo " switch (-continue) to $0 to continue."
6082 # auto-detect Xinput support
6083 if [ "$CFG_XINPUT" != "no" ]; then
6084 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
6085 if [ "$CFG_XINPUT" != "runtime" ]; then
6089 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6090 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
6091 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6092 echo " If you believe this message is in error you may use the continue"
6093 echo " switch (-continue) to $0 to continue."
6101 # auto-detect XKB support
6102 if [ "$CFG_XKB" != "no" ]; then
6103 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
6106 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6107 echo "XKB support cannot be enabled due to functionality tests!"
6108 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6109 echo " If you believe this message is in error you may use the continue"
6110 echo " switch (-continue) to $0 to continue."
6118 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
6119 if [ -n "$PKG_CONFIG" ]; then
6120 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
6121 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
6123 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
6125 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
6126 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
6128 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6129 echo "Gtk theme support cannot be enabled due to functionality tests!"
6130 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6131 echo " If you believe this message is in error you may use the continue"
6132 echo " switch (-continue) to $0 to continue."
6138 elif [ "$CFG_GLIB" = "no" ]; then
6144 if [ "$PLATFORM_MAC" = "yes" ]; then
6145 if [ "$CFG_PHONON" != "no" ]; then
6146 # Always enable Phonon (unless it was explicitly disabled)
6150 if [ "$CFG_COREWLAN" = "auto" ]; then
6151 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
6160 if [ "$PLATFORM_QPA" = "yes" ]; then
6161 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
6162 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6163 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
6165 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
6167 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
6170 if [ "$CFG_OPENGL" = "yes" ]; then
6171 echo "All the OpenGL functionality tests failed!"
6172 echo " You might need to modify the include and library search paths by editing"
6173 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6174 echo " ${XQMAKESPEC}."
6179 elif [ "$CFG_OPENGL" = "es1" ]; then
6181 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
6182 if [ $? != "0" ]; then
6183 echo "The OpenGL ES 1.x functionality test failed!"
6184 echo " You might need to modify the include and library search paths by editing"
6185 echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
6186 echo " ${XQMAKESPEC}."
6189 elif [ "$CFG_OPENGL" = "es2" ]; then
6191 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6192 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6193 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6194 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6195 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6196 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6197 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6198 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6201 "$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
6202 if [ $? != "0" ]; then
6203 echo "The OpenGL ES 2.0 functionality test failed!"
6204 echo " You might need to modify the include and library search paths by editing"
6205 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6206 echo " ${XQMAKESPEC}."
6209 elif [ "$CFG_OPENGL" = "desktop" ]; then
6210 # Desktop OpenGL support
6211 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6212 if [ $? != "0" ]; then
6213 echo "The OpenGL functionality test failed!"
6214 echo " You might need to modify the include and library search paths by editing"
6215 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6216 echo " ${XQMAKESPEC}."
6221 # auto-detect FontConfig support
6222 if [ "$CFG_FONTCONFIG" != "no" ]; then
6223 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6224 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6225 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6227 QT_CFLAGS_FONTCONFIG=
6228 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6230 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
6231 QT_CONFIG="$QT_CONFIG fontconfig"
6232 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6233 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6234 CFG_LIBFREETYPE=system
6239 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6240 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6241 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6242 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6243 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6245 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6246 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND `$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6247 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND `$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6249 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6253 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6254 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6255 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6256 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6257 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6258 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6259 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6262 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
6263 QT_CONFIG="$QT_CONFIG wayland"
6266 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
6267 QT_CONFIG="$QT_CONFIG coreservices"
6269 QMakeVar add DEFINES QT_NO_CORESERVICES
6276 if [ "$PLATFORM_QWS" = "yes" ]; then
6278 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
6279 if [ "$CFG_GUI" = "no" ]; then
6280 if [ "$CFG_OPENGL" = "auto" ]; then
6283 if [ "$CFG_OPENGL" != "no" ]; then
6284 echo "OpenGL enabled, but GUI disabled."
6285 echo " You might need to either enable the GUI or disable OpenGL"
6289 if [ "$CFG_OPENGL" = "yes" ]; then
6291 if "$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
6293 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
6296 echo "All the OpenGL ES functionality tests failed!"
6297 echo " You might need to modify the include and library search paths by editing"
6298 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6299 echo " ${XQMAKESPEC}."
6302 elif [ "$CFG_OPENGL" = "es1" ]; then
6304 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
6305 if [ $? != "0" ]; then
6306 echo "The OpenGL ES 1.x functionality test failed!"
6307 echo " You might need to modify the include and library search paths by editing"
6308 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6309 echo " ${XQMAKESPEC}."
6313 elif [ "$CFG_OPENGL" = "es2" ]; then
6315 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6316 if [ $? != "0" ]; then
6317 echo "The OpenGL ES 2.0 functionality test failed!"
6318 echo " You might need to modify the include and library search paths by editing"
6319 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6320 echo " ${XQMAKESPEC}."
6324 elif [ "$CFG_OPENGL" = "desktop" ]; then
6325 # Desktop OpenGL support
6326 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6331 if [ "$PLATFORM_QWS" = "yes" ]; then
6334 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6335 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6336 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6337 if [ $? != "0" ]; then
6338 echo "The Ahi screen driver functionality test failed!"
6339 echo " You might need to modify the include and library search paths by editing"
6340 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6341 echo " ${XQMAKESPEC}."
6346 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6347 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6348 if [ $? != "0" ]; then
6349 echo "The SVGAlib screen driver functionality test failed!"
6350 echo " You might need to modify the include and library search paths by editing"
6351 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6352 echo " ${XQMAKESPEC}."
6357 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6358 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6359 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6360 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6361 elif directfb-config --version >/dev/null 2>&1; then
6362 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6363 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6366 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6367 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6368 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6369 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6371 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6372 QMakeVar set QT_DEFINES_DIRECTFB "QT3_SUPPORT"
6375 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/directfb "DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DIRECTFB $QT_LIBS_DIRECTFB
6376 if [ $? != "0" ]; then
6377 echo "The DirectFB screen driver functionality test failed!"
6378 echo " You might need to modify the include and library search paths by editing"
6379 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6380 echo " ${XQMAKESPEC}."
6388 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6389 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6390 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6391 if [ $? != "0" ]; then
6392 echo "The tslib functionality test failed!"
6393 echo " You might need to modify the include and library search paths by editing"
6394 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6395 echo " ${XQMAKESPEC}."
6404 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6405 if [ $? != "0" ]; then
6406 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6413 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6414 if [ "$CFG_EGL" != "no" ]; then
6415 # detect EGL support
6416 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
6417 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6422 # Prefer this variant for ES1
6423 if [ "$CFG_OPENGL" = "es1" -o "$EGL_VARIANT" = "none" ]; then
6424 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
6425 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
6428 CFG_EGL_GLES_INCLUDES=yes
6432 if [ "$EGL_VARIANT" = "none" ]; then
6433 if [ "$CFG_EGL" = "yes" ]; then
6434 echo "The EGL functionality test failed!"
6435 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6436 echo " You might need to modify the include and library search paths by editing"
6437 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6438 echo " ${XQMAKESPEC}."
6442 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6443 if [ "$CFG_OPENGL" = "es1" -o "$CFG_OPENGL" = "es2" ]; then
6450 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6453 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6454 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6455 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6456 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6457 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
6458 CFG_LIBFREETYPE=system
6464 if [ "$CFG_ENDIAN" = "auto" ]; then
6465 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6466 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6467 elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6468 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6469 elif [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
6472 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6474 if [ "$F" -eq 0 ]; then
6475 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6476 elif [ "$F" -eq 1 ]; then
6477 CFG_ENDIAN="Q_BIG_ENDIAN"
6480 echo "The target system byte order could not be detected!"
6481 echo "Turn on verbose messaging (-v) to see the final report."
6482 echo "You can use the -little-endian or -big-endian switch to"
6483 echo "$0 to continue."
6489 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6490 if [ "$PLATFORM_MAC" = "yes" ]; then
6493 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6495 if [ "$F" -eq 0 ]; then
6496 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6497 elif [ "$F" -eq 1 ]; then
6498 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6501 echo "The host system byte order could not be detected!"
6502 echo "Turn on verbose messaging (-v) to see the final report."
6503 echo "You can use the -host-little-endian or -host-big-endian switch to"
6504 echo "$0 to continue."
6510 if [ "$CFG_ARMFPA" != "auto" ]; then
6511 if [ "$CFG_ARMFPA" = "yes" ]; then
6512 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6513 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6515 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6518 CFG_DOUBLEFORMAT="normal"
6523 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6524 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6525 CFG_DOUBLEFORMAT=normal
6527 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6529 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6530 CFG_DOUBLEFORMAT=normal
6531 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6532 CFG_DOUBLEFORMAT=normal
6533 elif [ "$F" -eq 10 ]; then
6534 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6535 elif [ "$F" -eq 11 ]; then
6536 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6537 elif [ "$F" -eq 12 ]; then
6538 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6540 elif [ "$F" -eq 13 ]; then
6541 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6545 echo "The system floating point format could not be detected."
6546 echo "This may cause data to be generated in a wrong format"
6547 echo "Turn on verbose messaging (-v) to see the final report."
6548 # we do not fail on this since this is a new test, and if it fails,
6549 # the old behavior should be correct in most cases
6550 CFG_DOUBLEFORMAT=normal
6556 if [ "$XPLATFORM_SYMBIAN" = "yes" ] || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6560 if [ "$CFG_STL" != "no" ]; then
6561 if [ "$HAVE_STL" = "yes" ]; then
6564 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6565 echo "STL support cannot be enabled due to functionality tests!"
6566 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6567 echo " If you believe this message is in error you may use the continue"
6568 echo " switch (-continue) to $0 to continue."
6576 # find if the platform supports IPv6
6577 if [ "$CFG_IPV6" != "no" ]; then
6578 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6579 #IPV6 should always be enabled for Symbian release
6581 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
6584 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6585 echo "IPv6 support cannot be enabled due to functionality tests!"
6586 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6587 echo " If you believe this message is in error you may use the continue"
6588 echo " switch (-continue) to $0 to continue."
6596 # detect POSIX clock_gettime()
6597 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6598 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
6599 CFG_CLOCK_GETTIME=yes
6601 CFG_CLOCK_GETTIME=no
6605 # detect POSIX monotonic clocks
6606 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6607 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
6608 CFG_CLOCK_MONOTONIC=yes
6610 CFG_CLOCK_MONOTONIC=no
6612 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6613 CFG_CLOCK_MONOTONIC=no
6617 if [ "$CFG_MREMAP" = "auto" ]; then
6618 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6625 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6626 if [ "$CFG_GETADDRINFO" != "no" ]; then
6627 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6630 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6631 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6632 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6633 echo " If you believe this message is in error you may use the continue"
6634 echo " switch (-continue) to $0 to continue."
6642 # find if the platform provides inotify
6643 if [ "$CFG_INOTIFY" != "no" ]; then
6644 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6647 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6648 echo "inotify support cannot be enabled due to functionality tests!"
6649 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6650 echo " If you believe this message is in error you may use the continue"
6651 echo " switch (-continue) to $0 to continue."
6659 # find if the platform provides if_nametoindex (ipv6 interface name support)
6660 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6661 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
6664 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6665 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6666 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6667 echo " If you believe this message is in error you may use the continue"
6668 echo " switch (-continue) to $0 to continue."
6676 # find if the platform provides getifaddrs (network interface enumeration)
6677 if [ "$CFG_GETIFADDRS" != "no" ]; then
6678 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6681 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6682 echo "getifaddrs support cannot be enabled due to functionality tests!"
6683 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6684 echo " If you believe this message is in error you may use the continue"
6685 echo " switch (-continue) to $0 to continue."
6694 if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6695 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
6696 if [ "$CFG_OPENSSL" = "auto" ]; then
6700 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6701 echo "OpenSSL support cannot be enabled due to functionality tests!"
6702 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6703 echo " If you believe this message is in error you may use the continue"
6704 echo " switch (-continue) to $0 to continue."
6711 if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6712 #OpenSSl should be enabled for Symbian release
6717 # detect OpenVG support
6718 if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6719 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
6720 if [ "$CFG_OPENVG" = "auto" ]; then
6723 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
6724 if [ "$CFG_OPENVG" = "auto" ]; then
6727 CFG_OPENVG_ON_OPENGL=yes
6728 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
6729 if [ "$CFG_OPENVG" = "auto" ]; then
6732 CFG_OPENVG_LC_INCLUDES=yes
6733 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
6734 if [ "$CFG_OPENVG" = "auto" ]; then
6737 CFG_OPENVG_LC_INCLUDES=yes
6738 CFG_OPENVG_ON_OPENGL=yes
6740 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6741 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6742 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6743 echo " If you believe this message is in error you may use the continue"
6744 echo " switch (-continue) to $0 to continue."
6750 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
6751 CFG_OPENVG_SHIVA=yes
6755 # if openvg is disabled and the user specified graphicssystem vg, disable it...
6756 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
6757 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
6758 CFG_GRAPHICS_SYSTEM=default
6761 if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
6762 echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
6766 if [ "$CFG_PTMALLOC" != "no" ]; then
6767 # build ptmalloc, copy .a file to lib/
6768 echo "Building ptmalloc. Please wait..."
6769 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
6770 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
6772 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
6775 if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6776 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6781 elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6782 # Disabled for Symbian release
6786 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6787 if [ "$CFG_ARCH" = "arm" ]; then
6788 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6789 if [ $? != "0" ]; then
6790 CFG_JAVASCRIPTCORE_JIT=no
6793 case "$XPLATFORM" in
6795 CFG_JAVASCRIPTCORE_JIT=no
6798 CFG_JAVASCRIPTCORE_JIT=no
6804 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6805 QMakeVar set JAVASCRIPTCORE_JIT yes
6806 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6807 QMakeVar set JAVASCRIPTCORE_JIT no
6810 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6811 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6812 if "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS ; then
6813 CFG_AUDIO_BACKEND=yes
6816 CFG_AUDIO_BACKEND=yes
6820 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6821 echo "Warning: largefile support cannot be disabled for win32."
6823 elif [ "$CFG_LARGEFILE" != "no" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6824 echo "Warning: largefile support cannot be enabled for symbian."
6828 #-------------------------------------------------------------------------------
6829 # ask for all that hasn't been auto-detected or specified in the arguments
6830 #-------------------------------------------------------------------------------
6832 ### fix this: user input should be validated in a loop
6833 if [ "$PLATFORM_QWS" = "yes" ]; then
6834 PROMPT_FOR_DEPTHS="yes"
6836 PROMPT_FOR_DEPTHS="no"
6838 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6840 echo "Choose pixel-depths to support:"
6842 echo " 1. 1bpp, black/white"
6843 echo " 4. 4bpp, grayscale"
6844 echo " 8. 8bpp, paletted"
6845 echo " 12. 12bpp, rgb 4-4-4"
6846 echo " 15. 15bpp, rgb 5-5-5"
6847 echo " 16. 16bpp, rgb 5-6-5"
6848 echo " 18. 18bpp, rgb 6-6-6"
6849 echo " 24. 24bpp, rgb 8-8-8"
6850 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6851 echo " all. All supported depths"
6853 echo "Your choices (default 8,16,32):"
6855 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6856 CFG_QWS_DEPTHS=8,16,32
6859 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6860 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6861 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6863 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6865 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6866 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6871 # enable dwarf2 support on Mac
6872 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6873 QT_CONFIG="$QT_CONFIG dwarf2"
6876 # Set the default arch if there are no "-arch" arguments on the configure line
6877 # For "-carbon" builds: 32 bit x86/ppc.
6878 # For builds on snow leopard : compiler default (64-bit).
6879 # For builds on leopard : compiler default (32-bit).
6880 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6881 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6883 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6884 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6885 CFG_MAC_ARCHS=" x86"
6886 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6887 CFG_MAC_ARCHS=" ppc"
6889 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6892 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6895 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6898 # enable Cocoa and/or Carbon on Mac
6899 # -carbon on the command line disables Cocoa, except for 64-bit archs
6900 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6901 CFG_MAC_CARBON="YES"
6904 # check which archs are in use, enable cocoa if we find a 64-bit one
6905 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6906 CFG_MAC_COCOA="yes";
6907 CFG_MAC_CARBON="no";
6908 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6909 CFG_MAC_CARBON="yes";
6911 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6912 CFG_MAC_CARBON="yes";
6917 # select Carbon on 10.4 Tiger.
6918 if [ "$PLATFORM_MAC" = "yes" ]; then
6919 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6920 if [ "$VERSION" == 8 ]; then
6922 CFG_MAC_CARBON="yes";
6926 # select Carbon when using the 10.4u SDK
6927 if [ "$PLATFORM_MAC" = "yes" ]; then
6928 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6931 CFG_MAC_CARBON="yes";
6935 # but disable Cocoa if cross-building for mingw and symbian
6936 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6937 [ "$XPLATFORM_SYMBIAN" = "yes" ] && CFG_MAC_COCOA="no"
6939 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
6940 # in some cases, see code further down
6941 case "$PLATFORM,$CFG_MAC_COCOA" in
6944 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
6948 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
6952 # disable Qt 3 support on VxWorks and Symbian
6953 case "$XPLATFORM" in
6954 unsupported/vxworks*|symbian*)
6959 # enable Qt 3 support functionality
6960 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6961 QT_CONFIG="$QT_CONFIG gui-qt3support"
6965 if [ "$CFG_PHONON" = "yes" ]; then
6966 # No longer needed after modularization
6967 #QT_CONFIG="$QT_CONFIG phonon"
6968 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6969 QT_CONFIG="$QT_CONFIG phonon-backend"
6972 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6975 # disable accessibility
6976 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6977 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6979 QT_CONFIG="$QT_CONFIG accessibility"
6982 # egl stuff does not belong in lighthouse, but rather in plugins
6983 if [ "$PLATFORM_QPA" = "yes" ]; then
6988 if [ "$CFG_EGL" = "no" ]; then
6989 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6991 QT_CONFIG="$QT_CONFIG egl"
6992 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6993 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6998 if [ "$CFG_OPENVG" = "no" ]; then
6999 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
7001 QT_CONFIG="$QT_CONFIG openvg"
7002 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
7003 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
7005 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
7006 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
7008 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7009 QT_CONFIG="$QT_CONFIG shivavg"
7010 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
7014 if [ "$CFG_QS60STYLE" = "no" ]; then
7015 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7017 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_STYLE_S60"
7020 # Just check if OpenGL is not set by command argumets for Symbian.
7021 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
7022 if [ "$CFG_OPENGL" = "auto" ]; then
7028 if [ "$CFG_OPENGL" = "no" ]; then
7029 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
7031 QT_CONFIG="$QT_CONFIG opengl"
7034 if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es2" ]; then
7035 if [ "$PLATFORM_QWS" = "yes" ]; then
7036 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
7038 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
7041 if [ "$CFG_OPENGL" = "es1" ]; then
7042 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1"
7043 QT_CONFIG="$QT_CONFIG opengles1"
7046 if [ "$CFG_OPENGL" = "es2" ]; then
7047 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
7048 QT_CONFIG="$QT_CONFIG opengles2"
7051 # safe execution environment
7052 if [ "$CFG_SXE" != "no" ]; then
7053 QT_CONFIG="$QT_CONFIG sxe"
7056 # build up the variables for output
7057 if [ "$CFG_DEBUG" = "yes" ]; then
7058 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
7059 QMAKE_CONFIG="$QMAKE_CONFIG debug"
7060 elif [ "$CFG_DEBUG" = "no" ]; then
7061 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
7062 QMAKE_CONFIG="$QMAKE_CONFIG release"
7064 if [ "$CFG_SHARED" = "yes" ]; then
7065 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
7066 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
7067 elif [ "$CFG_SHARED" = "no" ]; then
7068 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
7069 QMAKE_CONFIG="$QMAKE_CONFIG static"
7071 if [ "$PLATFORM_QWS" = "yes" ]; then
7072 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
7073 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
7074 QT_CONFIG="$QT_CONFIG embedded"
7075 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7077 if [ "$PLATFORM_QPA" = "yes" ]; then
7078 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
7079 QT_CONFIG="$QT_CONFIG qpa"
7080 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
7081 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7084 if [ "$CFG_EMBEDDED" = "nacl" ]; then
7085 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
7086 QT_CONFIG="$QT_CONFIG nacl pepper"
7087 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7090 if [ "$XPLATFORM_MINGW" != "yes" ]; then
7091 # Do not set this here for Windows. Let qmake do it so
7092 # debug and release precompiled headers are kept separate.
7093 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
7095 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
7096 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
7097 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
7098 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
7099 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7100 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
7102 if [ "$CFG_STL" = "no" ]; then
7103 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
7105 QMAKE_CONFIG="$QMAKE_CONFIG stl"
7107 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
7108 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
7110 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
7111 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
7112 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
7113 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
7114 QMakeVar add QMAKE_CFLAGS -g
7115 QMakeVar add QMAKE_CXXFLAGS -g
7116 QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info"
7118 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
7119 QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info_nocopy"
7121 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
7122 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
7123 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
7124 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
7125 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
7126 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
7127 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
7128 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
7129 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
7130 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
7131 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
7132 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
7133 if [ "$CFG_IPV6" = "yes" ]; then
7134 QT_CONFIG="$QT_CONFIG ipv6"
7136 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
7137 QT_CONFIG="$QT_CONFIG clock-gettime"
7139 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
7140 QT_CONFIG="$QT_CONFIG clock-monotonic"
7142 if [ "$CFG_MREMAP" = "yes" ]; then
7143 QT_CONFIG="$QT_CONFIG mremap"
7145 if [ "$CFG_GETADDRINFO" = "yes" ]; then
7146 QT_CONFIG="$QT_CONFIG getaddrinfo"
7148 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
7149 QT_CONFIG="$QT_CONFIG ipv6ifname"
7151 if [ "$CFG_GETIFADDRS" = "yes" ]; then
7152 QT_CONFIG="$QT_CONFIG getifaddrs"
7154 if [ "$CFG_INOTIFY" = "yes" ]; then
7155 QT_CONFIG="$QT_CONFIG inotify"
7157 if [ "$CFG_LIBJPEG" = "no" ]; then
7159 elif [ "$CFG_LIBJPEG" = "system" ]; then
7160 QT_CONFIG="$QT_CONFIG system-jpeg"
7162 if [ "$CFG_JPEG" = "no" ]; then
7163 QT_CONFIG="$QT_CONFIG no-jpeg"
7164 elif [ "$CFG_JPEG" = "yes" ]; then
7165 QT_CONFIG="$QT_CONFIG jpeg"
7167 if [ "$CFG_LIBMNG" = "no" ]; then
7169 elif [ "$CFG_LIBMNG" = "system" ]; then
7170 QT_CONFIG="$QT_CONFIG system-mng"
7172 if [ "$CFG_MNG" = "no" ]; then
7173 QT_CONFIG="$QT_CONFIG no-mng"
7174 elif [ "$CFG_MNG" = "yes" ]; then
7175 QT_CONFIG="$QT_CONFIG mng"
7177 if [ "$CFG_LIBPNG" = "no" ]; then
7180 if [ "$CFG_LIBPNG" = "system" ]; then
7181 QT_CONFIG="$QT_CONFIG system-png"
7183 if [ "$CFG_PNG" = "no" ]; then
7184 QT_CONFIG="$QT_CONFIG no-png"
7185 elif [ "$CFG_PNG" = "yes" ]; then
7186 QT_CONFIG="$QT_CONFIG png"
7188 if [ "$CFG_GIF" = "no" ]; then
7189 QT_CONFIG="$QT_CONFIG no-gif"
7190 elif [ "$CFG_GIF" = "yes" ]; then
7191 QT_CONFIG="$QT_CONFIG gif"
7193 if [ "$CFG_LIBTIFF" = "no" ]; then
7195 elif [ "$CFG_LIBTIFF" = "system" ]; then
7196 QT_CONFIG="$QT_CONFIG system-tiff"
7198 if [ "$CFG_TIFF" = "no" ]; then
7199 QT_CONFIG="$QT_CONFIG no-tiff"
7200 elif [ "$CFG_TIFF" = "yes" ]; then
7201 QT_CONFIG="$QT_CONFIG tiff"
7203 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7204 QT_CONFIG="$QT_CONFIG no-freetype"
7205 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7206 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7207 QT_CONFIG="$QT_CONFIG system-freetype"
7209 QT_CONFIG="$QT_CONFIG freetype"
7211 if [ "$CFG_GUI" = "auto" ]; then
7214 if [ "$CFG_GUI" = "no" ]; then
7215 QT_CONFIG="$QT_CONFIG no-gui"
7217 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7221 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
7222 #On Mac we implicitly link against libz, so we
7223 #never use the 3rdparty stuff.
7224 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7226 if [ "$CFG_ZLIB" = "yes" ]; then
7227 QT_CONFIG="$QT_CONFIG zlib"
7228 elif [ "$CFG_ZLIB" = "system" ]; then
7229 QT_CONFIG="$QT_CONFIG system-zlib"
7232 if [ "$CFG_S60" = "yes" ]; then
7233 QT_CONFIG="$QT_CONFIG s60"
7236 if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then
7237 QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files"
7239 QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files_disabled"
7242 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7243 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7244 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7245 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7246 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7247 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7248 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7249 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7250 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7251 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7252 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7253 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7255 if [ "$PLATFORM_X11" = "yes" ]; then
7256 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7258 # for some reason, the following libraries are not always built shared,
7259 # so *every* program/lib (including Qt) has to link against them
7260 if [ "$CFG_XSHAPE" = "yes" ]; then
7261 QT_CONFIG="$QT_CONFIG xshape"
7263 if [ "$CFG_XVIDEO" = "yes" ]; then
7264 QT_CONFIG="$QT_CONFIG xvideo"
7266 if [ "$CFG_XSYNC" = "yes" ]; then
7267 QT_CONFIG="$QT_CONFIG xsync"
7269 if [ "$CFG_XINERAMA" = "yes" ]; then
7270 QT_CONFIG="$QT_CONFIG xinerama"
7271 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7273 if [ "$CFG_XCURSOR" = "yes" ]; then
7274 QT_CONFIG="$QT_CONFIG xcursor"
7275 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7277 if [ "$CFG_XFIXES" = "yes" ]; then
7278 QT_CONFIG="$QT_CONFIG xfixes"
7279 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7281 if [ "$CFG_XRANDR" = "yes" ]; then
7282 QT_CONFIG="$QT_CONFIG xrandr"
7283 if [ "$CFG_XRENDER" != "yes" ]; then
7284 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7285 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7287 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7290 if [ "$CFG_XRENDER" = "yes" ]; then
7291 QT_CONFIG="$QT_CONFIG xrender"
7292 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7294 if [ "$CFG_MITSHM" = "yes" ]; then
7295 QT_CONFIG="$QT_CONFIG mitshm"
7297 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7298 QT_CONFIG="$QT_CONFIG fontconfig"
7300 if [ "$CFG_XINPUT" = "yes" ]; then
7301 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7303 if [ "$CFG_XINPUT" = "yes" ]; then
7304 QT_CONFIG="$QT_CONFIG xinput tablet"
7306 if [ "$CFG_XKB" = "yes" ]; then
7307 QT_CONFIG="$QT_CONFIG xkb"
7311 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7312 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7313 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7315 if [ "$PLATFORM_MAC" = "yes" ]; then
7316 if [ "$CFG_RPATH" = "yes" ]; then
7317 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7319 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7320 if [ -n "$RPATH_FLAGS" ]; then
7322 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7326 elif [ "$CFG_RPATH" = "yes" ]; then
7327 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7331 if [ "$CFG_RPATH" = "yes" ]; then
7332 # set the default rpath to the library installation directory
7333 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7335 if [ -n "$RPATH_FLAGS" ]; then
7336 # add the user defined rpaths
7337 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7341 if [ '!' -z "$I_FLAGS" ]; then
7342 # add the user define include paths
7343 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7344 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7347 # turn off exceptions for the compilers that support it
7348 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7349 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7350 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7351 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7353 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7355 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7359 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7360 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7363 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7364 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7365 # Follow default behavior of configure.exe by overriding with "rtti".
7366 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7369 if [ "$CFG_ALSA" = "yes" ]; then
7370 QT_CONFIG="$QT_CONFIG alsa"
7373 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7374 QT_CONFIG="$QT_CONFIG pulseaudio"
7377 if [ "$CFG_COREWLAN" = "yes" ]; then
7378 QT_CONFIG="$QT_CONFIG corewlan"
7381 if [ "$CFG_ICD" = "yes" ]; then
7382 QT_CONFIG="$QT_CONFIG icd"
7385 if [ "$CFG_ICU" = "yes" ]; then
7386 QT_CONFIG="$QT_CONFIG icu"
7390 # Some Qt modules are too advanced in C++ for some old compilers
7391 # Detect here the platforms where they are known to work.
7393 # See Qt documentation for more information on which features are
7394 # supported and on which compilers.
7396 canBuildQtXmlPatterns="yes"
7397 canBuildWebKit="$HAVE_STL"
7398 canBuildQtConcurrent="yes"
7400 # WebKit requires stdint.h
7401 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7402 if [ $? != "0" ]; then
7406 case "$XPLATFORM" in
7408 # PA-RISC's assembly is too limited
7409 # gcc 3.4 on that platform can't build QtXmlPatterns
7410 # the assembly it generates cannot be compiled
7412 # Check gcc's version
7413 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7417 canBuildQtXmlPatterns="no"
7421 canBuildQtXmlPatterns="no"
7425 unsupported/vxworks-*-g++*)
7428 unsupported/vxworks-*-dcc*)
7430 canBuildQtXmlPatterns="no"
7433 # Check gcc's version
7434 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7442 canBuildQtXmlPatterns="no"
7447 # Check the compiler version
7448 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7451 canBuildQtXmlPatterns="no"
7452 canBuildQtConcurrent="no"
7456 canBuildQtConcurrent="no"
7462 canBuildQtXmlPatterns="no"
7463 canBuildQtConcurrent="no"
7469 # Get the xlC version
7470 cat > xlcver.c <<EOF
7474 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7479 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7480 xlcver=`./xlcver 2>/dev/null`
7483 if [ "$OPT_VERBOSE" = "yes" ]; then
7484 if [ -n "$xlcver" ]; then
7485 echo Found IBM xlC version: $xlcver.
7487 echo Could not determine IBM xlC version, assuming oldest supported.
7494 canBuildQtXmlPatterns="no"
7495 canBuildQtConcurrent="no"
7499 canBuildQtConcurrent="no"
7505 canBuildQtConcurrent="no"
7508 canBuildQtConcurrent="no"
7511 canBuildQtConcurrent="no"
7515 if [ "$CFG_GUI" = "no" ]; then
7516 # WebKit requires QtGui
7520 if [ "$CFG_SHARED" = "no" ]; then
7522 echo "WARNING: Using static linking will disable the WebKit module."
7527 CFG_CONCURRENT="yes"
7528 if [ "$canBuildQtConcurrent" = "no" ]; then
7529 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7533 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7534 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7537 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7538 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7539 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7540 CFG_XMLPATTERNS="no"
7542 # No longer needed after modularization
7543 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7544 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7546 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7549 # No longer needed after modularization
7550 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7551 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7553 # QT_CONFIG="$QT_CONFIG multimedia"
7556 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7557 QT_CONFIG="$QT_CONFIG audio-backend"
7560 if [ "$CFG_SVG" = "auto" ]; then
7564 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7565 echo "QtSvg requested, but it can't be built without QtGui"
7569 if [ "$CFG_SVG" = "yes" ]; then
7570 QT_CONFIG="$QT_CONFIG svg"
7572 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7575 if [ "$CFG_WEBKIT" != "no" ]; then
7576 CFG_WEBKIT="$canBuildWebKit"
7579 if [ "$CFG_WEBKIT" != "no" ]; then
7580 # No longer needed after modularization
7581 #QT_CONFIG="$QT_CONFIG webkit"
7582 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7583 if [ "$CFG_WEBKIT" = "debug" ]; then
7584 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7588 if [ "$CFG_SCRIPT" = "auto" ]; then
7592 # No longer needed after modularization
7593 #if [ "$CFG_SCRIPT" = "yes" ]; then
7594 # QT_CONFIG="$QT_CONFIG script"
7596 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7599 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7600 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7603 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7604 case "$XPLATFORM" in
7606 CFG_SCRIPTTOOLS="no"
7609 CFG_SCRIPTTOOLS="yes"
7612 elif [ "$CFG_SCRIPT" = "no" ]; then
7613 CFG_SCRIPTTOOLS="no"
7616 # No longer needed after modularization
7617 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7618 # QT_CONFIG="$QT_CONFIG scripttools"
7620 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7624 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7625 if [ "$CFG_SCRIPT" = "no" -o "$CFG_GUI" = "no" ]; then
7626 echo "Error: QtDeclarative was requested, but it can't be built due to QtScript or QtGui being disabled."
7630 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7631 if [ "$CFG_SCRIPT" = "no" -o "$CFG_GUI" = "no" ]; then
7638 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7639 # No longer needed after modularization
7640 #QT_CONFIG="$QT_CONFIG declarative"
7641 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7642 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7645 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7648 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7651 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7652 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7653 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7658 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7659 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7660 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7667 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7670 # On Mac, set the minimum deployment target for the different architechtures
7671 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
7672 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
7674 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7675 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7676 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7677 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7678 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7679 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7681 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7682 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7683 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7684 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7685 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7687 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7688 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7689 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7690 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7691 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7693 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7694 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7695 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7696 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7697 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7701 #-------------------------------------------------------------------------------
7702 # generate QT_BUILD_KEY
7703 #-------------------------------------------------------------------------------
7705 # some compilers generate binary incompatible code between different versions,
7706 # so we need to generate a build key that is different between these compilers
7711 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7713 case "$COMPILER_VERSION" in
7715 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7716 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7717 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7720 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7721 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7722 QT_GCC_PATCH_VERSION=0
7726 case "$COMPILER_VERSION" in
7728 COMPILER_VERSION="2.95.*"
7731 COMPILER_VERSION="3.*"
7734 COMPILER_VERSION="4"
7739 [ '!' -z "$COMPILER_VERSION" ] && COMPILER="g++-${COMPILER_VERSION}"
7742 # The Intel CC compiler on Unix systems matches the ABI of the g++
7743 # that is found on PATH
7744 COMPAT_COMPILER="icc"
7746 case "`g++ -dumpversion` 2>/dev/null" in
7748 COMPILER="g++-2.95.*"
7751 a COMPILER="g++-3.*"
7762 # QT_CONFIG can contain the following:
7764 # Things that affect the Qt API/ABI:
7767 # minimal-config small-config medium-config large-config full-config
7769 # Different edition modules:
7770 # gui network canvas table xml opengl sql
7772 # Things that do not affect the Qt API/ABI:
7774 # system-jpeg no-jpeg jpeg
7775 # system-mng no-mng mng
7776 # system-png no-png png
7777 # system-zlib no-zlib zlib
7778 # system-libtiff no-libtiff
7791 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
7792 # Embedded: embedded qpa freetype
7798 # determine the build options
7799 for config_option in $QMAKE_CONFIG $QT_CONFIG; do
7801 case "$config_option" in
7803 # take the last *-config setting. this is the highest config being used,
7804 # and is the one that we will use for tagging plugins
7805 BUILD_CONFIG="$config_option"
7808 *) # skip all other options since they don't affect the Qt API/ABI.
7812 if [ "$SKIP" = "no" ]; then
7813 BUILD_OPTIONS="$BUILD_OPTIONS $config_option"
7817 # put the options that we are missing into .options
7819 for opt in `echo $ALL_OPTIONS`; do
7821 if echo $BUILD_OPTIONS | grep $opt >/dev/null 2>&1; then
7824 if [ "$SKIP" = "no" ]; then
7825 echo "$opt" >> .options
7829 # reconstruct BUILD_OPTIONS with a sorted negative feature list
7830 # (ie. only things that are missing are will be put into the build key)
7832 if [ -f .options ]; then
7833 for opt in `sort -f .options | uniq`; do
7834 BUILD_OPTIONS="$BUILD_OPTIONS no-$opt"
7839 # QT_NO* defines affect the Qt API (and binary compatibility). they need
7840 # to be included in the build key
7841 for build_option in $D_FLAGS; do
7842 build_option=`echo $build_option | cut -d \" -f 2 -`
7843 case "$build_option" in
7845 echo "$build_option" >> .options
7848 # skip all other compiler defines
7853 # sort the compile time defines (helps ensure that changes in this configure
7854 # script don't affect the QT_BUILD_KEY generation)
7855 if [ -f .options ]; then
7856 for opt in `sort -f .options | uniq`; do
7857 BUILD_OPTIONS="$BUILD_OPTIONS $opt"
7862 BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS"
7863 # extract the operating system from the XPLATFORM
7864 TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
7865 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
7866 QT_BUILD_KEY_SYSTEM_PART="Symbian"
7868 QT_BUILD_KEY_SYSTEM_PART="$CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER"
7871 # when cross-compiling, don't include build-host information (build key is target specific)
7872 QT_BUILD_KEY="$CFG_USER_BUILD_KEY $QT_BUILD_KEY_SYSTEM_PART $BUILD_OPTIONS"
7873 if [ -n "$QT_NAMESPACE" ]; then
7874 QT_BUILD_KEY="$QT_BUILD_KEY $QT_NAMESPACE"
7876 MAC_NEED_TWO_BUILD_KEYS="no"
7877 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7878 QT_BUILD_KEY_CARBON=$QT_BUILD_KEY
7879 TARGET_OPERATING_SYSTEM="$TARGET_OPERATING_SYSTEM-cocoa"
7880 QT_BUILD_KEY_COCOA="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
7881 if [ "$CFG_MAC_CARBON" = "no" ]; then
7882 QT_BUILD_KEY=$QT_BUILD_KEY_COCOA
7884 MAC_NEED_TWO_BUILD_KEYS="yes"
7887 # don't break loading plugins build with an older version of Qt
7888 QT_BUILD_KEY_COMPAT=
7889 if [ "$QT_CROSS_COMPILE" = "no" ]; then
7890 # previous versions of Qt used a build key built from the uname
7891 QT_BUILD_KEY_COMPAT="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
7892 if [ -n "$QT_NAMESPACE" ]; then
7893 QT_BUILD_KEY_COMPAT="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
7897 # is this compiler compatible with some other "standard" build key
7898 QT_BUILD_KEY_COMPAT_COMPILER=
7899 if [ ! -z "$COMPAT_COMPILER" ]; then
7900 QT_BUILD_KEY_COMPAT_COMPILER="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPAT_COMPILER $BUILD_OPTIONS"
7901 if [ -n "$QT_NAMESPACE" ]; then
7902 QT_BUILD_KEY_COMPAT_COMPILER="$QT_BUILD_KEY_COMPAT_COMPILER $QT_NAMESPACE"
7906 # is this arch compatible with some other "standard" build key
7907 QT_BUILD_KEY_COMPAT_ARCH=
7908 if [ ! -z "$COMPAT_ARCH" ]; then
7909 QT_BUILD_KEY_COMPAT_ARCH="$CFG_USER_BUILD_KEY $COMPAT_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
7910 if [ -n "$QT_NAMESPACE" ]; then
7911 QT_BUILD_KEY_COMPAT_COMPILER="$QT_BUILD_KEY_COMPAT_ARCH $QT_NAMESPACE"
7915 # strip out leading/trailing/extra whitespace
7916 QT_BUILD_KEY=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
7917 QT_BUILD_KEY_COMPAT=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
7918 QT_BUILD_KEY_COMPAT_COMPILER=`echo $QT_BUILD_KEY_COMPAT_COMPILER | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
7919 QT_BUILD_KEY_COMPAT_ARCH=`echo $QT_BUILD_KEY_COMPAT_ARCH | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
7921 #-------------------------------------------------------------------------------
7922 # part of configuration information goes into qconfig.h
7923 #-------------------------------------------------------------------------------
7925 case "$CFG_QCONFIG" in
7927 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7930 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7931 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7932 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7933 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7934 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7935 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7937 echo "#endif" >>"$tmpconfig"
7941 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7945 # define QT_EDITION $QT_EDITION
7948 /* Machine byte-order */
7949 #define Q_BIG_ENDIAN 4321
7950 #define Q_LITTLE_ENDIAN 1234
7953 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
7954 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
7955 >> "$outpath/src/corelib/global/qconfig.h.new"
7957 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7959 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
7960 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
7964 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
7965 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
7966 >> "$outpath/src/corelib/global/qconfig.h.new"
7968 if [ -n "$QT_BUILD_KEY_COMPAT_COMPILER" ]; then
7969 echo "#define QT_BUILD_KEY_COMPAT2 \"$QT_BUILD_KEY_COMPAT_COMPILER\"" \
7970 >> "$outpath/src/corelib/global/qconfig.h.new"
7972 if [ -n "$QT_BUILD_KEY_COMPAT_ARCH" ]; then
7973 echo "#define QT_BUILD_KEY_COMPAT3 \"$QT_BUILD_KEY_COMPAT_ARCH\"" \
7974 >> "$outpath/src/corelib/global/qconfig.h.new"
7977 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7979 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7980 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7981 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7982 #if defined(__BIG_ENDIAN__)
7983 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7984 #elif defined(__LITTLE_ENDIAN__)
7985 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7987 # error "Unable to determine byte order!"
7991 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7993 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7994 if [ "$CFG_ENDIAN" = "auto" ]; then
7995 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7996 #if defined(__BIG_ENDIAN__)
7997 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7998 #elif defined(__LITTLE_ENDIAN__)
7999 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
8001 # error "Unable to determine byte order!"
8005 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
8007 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
8009 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
8010 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
8011 /* Non-IEEE double format */
8012 #define Q_DOUBLE_LITTLE "01234567"
8013 #define Q_DOUBLE_BIG "76543210"
8014 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
8015 #define Q_DOUBLE_BIG_SWAPPED "32107654"
8016 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
8019 if [ "$CFG_ARMFPA" = "yes" ]; then
8020 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
8021 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
8022 #ifndef QT_BOOTSTRAPPED
8027 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
8031 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8032 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8033 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
8034 /* Machine Architecture */
8035 #ifndef QT_BOOTSTRAPPED
8036 # define QT_ARCH_${CFG_ARCH_STR}
8038 # define QT_ARCH_${CFG_HOST_ARCH_STR}
8042 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
8043 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
8045 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
8046 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
8049 # if both carbon and cocoa are specified, enable the autodetection code.
8050 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
8051 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
8052 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
8053 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
8056 if [ "$CFG_FRAMEWORK" = "yes" ]; then
8057 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
8060 if [ "$PLATFORM_MAC" = "yes" ]; then
8061 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
8062 #if defined(__LP64__)
8063 # define QT_POINTER_SIZE 8
8065 # define QT_POINTER_SIZE 4
8069 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
8070 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
8074 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
8076 if [ "$CFG_DEV" = "yes" ]; then
8077 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
8080 # Embedded compile time options
8081 if [ "$PLATFORM_QWS" = "yes" ]; then
8082 # Add QWS to config.h
8083 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
8085 # Add excluded decorations to $QCONFIG_FLAGS
8086 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
8087 for decor in $decors; do
8088 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8089 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
8092 # Figure which embedded drivers which are turned off
8093 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
8094 for ADRIVER in $CFG_GFX_ON; do
8095 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
8098 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
8099 # the um driver is currently not in the available list for external builds
8100 if [ "$CFG_DEV" = "no" ]; then
8101 CFG_KBD_OFF="$CFG_KBD_OFF um"
8103 for ADRIVER in $CFG_KBD_ON; do
8104 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
8107 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
8108 for ADRIVER in $CFG_MOUSE_ON; do
8109 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
8112 for DRIVER in $CFG_GFX_OFF; do
8113 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8114 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
8117 for DRIVER in $CFG_KBD_OFF; do
8118 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8119 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
8122 for DRIVER in $CFG_MOUSE_OFF; do
8123 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8124 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
8128 if [ "$PLATFORM_QPA" = "yes" ]; then
8129 # Add QPA to config.h
8130 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
8133 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
8134 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
8137 # Add turned on SQL drivers
8138 for DRIVER in $CFG_SQL_AVAILABLE; do
8139 eval "VAL=\$CFG_SQL_$DRIVER"
8142 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8143 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
8144 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
8147 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
8153 QMakeVar set sql-drivers "$SQL_DRIVERS"
8154 QMakeVar set sql-plugins "$SQL_PLUGINS"
8156 # Add other configuration options to the qconfig.h file
8157 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
8158 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
8159 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
8160 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
8161 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
8162 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
8163 [ "$CFG_S60" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_S60"
8164 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
8165 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6"
8166 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
8167 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
8169 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
8170 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
8171 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
8172 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
8173 [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
8176 # X11/Unix/Mac only configs
8177 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
8178 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
8179 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
8180 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
8181 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
8182 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
8183 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
8184 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
8185 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
8186 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
8187 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
8188 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
8189 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
8190 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
8191 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
8193 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
8194 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
8195 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
8196 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
8197 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
8198 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
8199 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
8200 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
8201 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
8202 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
8203 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
8204 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
8205 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
8207 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
8208 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
8209 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
8210 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
8211 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
8212 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
8213 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
8214 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
8215 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
8217 # sort QCONFIG_FLAGS for neatness if we can
8218 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
8219 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
8221 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
8222 # Enable Symbian DLLs and export rules.
8223 # We cannot use Linux's default export rules since they export everything.
8224 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL"
8225 # Disable non-working features.
8226 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT QT_NO_QFUTURE QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_SYSTEMTRAYICON"
8229 if [ -n "$QCONFIG_FLAGS" ]; then
8230 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8231 #ifndef QT_BOOTSTRAPPED
8234 for cfg in $QCONFIG_FLAGS; do
8235 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
8236 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
8237 # figure out define logic, so we can output the correct
8238 # ifdefs to override the global defines in a project
8240 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
8241 # QT_NO_option can be forcefully turned on by QT_option
8242 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
8243 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
8244 # QT_option can be forcefully turned off by QT_NO_option
8245 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
8248 if [ -z $cfgdNeg ]; then
8249 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8256 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8257 #if defined($cfgd) && defined($cfgdNeg)
8259 #elif !defined($cfgd) && !defined($cfgdNeg)
8266 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8267 #endif // QT_BOOTSTRAPPED
8272 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
8273 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8274 #define QT_VISIBILITY_AVAILABLE
8279 if [ -n "$QT_LIBINFIX" ]; then
8280 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8281 #define QT_LIBINFIX "$QT_LIBINFIX"
8286 if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
8287 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8288 #define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
8293 # avoid unecessary rebuilds by copying only if qconfig.h has changed
8294 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
8295 rm -f "$outpath/src/corelib/global/qconfig.h.new"
8297 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
8298 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
8299 chmod -w "$outpath/src/corelib/global/qconfig.h"
8300 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
8301 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
8305 #-------------------------------------------------------------------------------
8306 # save configuration into qconfig.pri
8307 #-------------------------------------------------------------------------------
8308 QTCONFIG="$outpath/mkspecs/qconfig.pri"
8309 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
8310 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
8311 if [ "$CFG_DEBUG" = "yes" ]; then
8312 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
8313 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8314 QT_CONFIG="$QT_CONFIG release"
8316 QT_CONFIG="$QT_CONFIG debug"
8317 elif [ "$CFG_DEBUG" = "no" ]; then
8318 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
8319 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8320 QT_CONFIG="$QT_CONFIG debug"
8322 QT_CONFIG="$QT_CONFIG release"
8324 if [ "$CFG_STL" = "yes" ]; then
8325 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
8327 if [ "$CFG_FRAMEWORK" = "no" ]; then
8328 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
8330 QT_CONFIG="$QT_CONFIG qt_framework"
8331 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
8333 if [ "$PLATFORM_MAC" = "yes" ]; then
8334 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
8336 if [ "$CFG_DEV" = "yes" ]; then
8337 QT_CONFIG="$QT_CONFIG private_tests"
8340 if [ -z "$QT_CFLAGS_FPU" ]; then
8341 if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1; then
8342 QT_CFLAGS_FPU=softvfp
8346 # Make the application arch follow the Qt arch for single arch builds.
8347 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
8348 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
8349 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
8352 cat >>"$QTCONFIG.tmp" <<EOF
8354 CONFIG += $QTCONFIG_CONFIG
8356 QT_EDITION = $Edition
8357 QT_CONFIG += $QT_CONFIG
8360 QT_VERSION = $QT_VERSION
8361 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
8362 QT_MINOR_VERSION = $QT_MINOR_VERSION
8363 QT_PATCH_VERSION = $QT_PATCH_VERSION
8366 QT_LIBINFIX = $QT_LIBINFIX
8367 QT_NAMESPACE = $QT_NAMESPACE
8368 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
8371 if [ -n "$CFG_SYSROOT" ]; then
8372 echo "# sysroot" >>"$QTCONFIG.tmp"
8373 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
8374 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
8375 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8376 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8377 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8378 echo "}" >> "$QTCONFIG.tmp"
8379 echo >> "$QTCONFIG.tmp"
8381 if [ "$CFG_RPATH" = "yes" ]; then
8382 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8384 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8385 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8386 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8387 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8389 if [ -n "$QT_CFLAGS_FPU" ]; then
8390 echo "#Qt for symbian FPU settings" >> "$QTCONFIG.tmp"
8391 echo "MMP_RULES += \"ARMFPU $QT_CFLAGS_FPU\"" >> "$QTCONFIG.tmp"
8394 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8395 echo "\n#Qt opengl include path" >> "$QTCONFIG.tmp"
8396 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8399 # replace qconfig.pri if it differs from the newly created temp file
8400 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8401 rm -f "$QTCONFIG.tmp"
8403 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8406 #-------------------------------------------------------------------------------
8407 # save configuration into qmodule.pri
8408 #-------------------------------------------------------------------------------
8409 QTMODULE="$outpath/mkspecs/qmodule.pri"
8411 cat >>"$QTMODULE.tmp" <<EOF
8413 QT_SOURCE_TREE = \$\$quote($relpath)
8414 QT_BUILD_TREE = \$\$quote($outpath)
8415 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8417 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8418 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8419 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8420 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8421 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8422 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8423 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8427 # Ensure we can link to uninistalled libraries
8428 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8429 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8431 if [ -n "$QT_CFLAGS_PSQL" ]; then
8432 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8434 if [ -n "$QT_LFLAGS_PSQL" ]; then
8435 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8437 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8438 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8440 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8441 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8443 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8444 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8446 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8447 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8449 if [ -n "$QT_LFLAGS_ODBC" ]; then
8450 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8452 if [ -n "$QT_LFLAGS_TDS" ]; then
8453 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8456 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8457 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8460 #dump in the OPENSSL_LIBS info
8461 if [ '!' -z "$OPENSSL_LIBS" ]; then
8462 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8463 elif [ "$CFG_OPENSSL" = "linked" ]; then
8464 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8467 #dump in the SDK info
8468 if [ '!' -z "$CFG_SDK" ]; then
8469 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8472 # mac gcc -Xarch support
8473 if [ "$CFG_MAC_XARCH" = "no" ]; then
8474 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8477 #dump the qmake spec
8478 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8479 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$QTMODULE.tmp"
8481 echo "QMAKESPEC = $XPLATFORM" >> "$QTMODULE.tmp"
8485 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8486 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8488 # replace qmodule.pri if it differs from the newly created temp file
8489 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8490 rm -f "$QTMODULE.tmp"
8492 mv -f "$QTMODULE.tmp" "$QTMODULE"
8495 #-------------------------------------------------------------------------------
8496 # save configuration into .qmake.cache
8497 #-------------------------------------------------------------------------------
8499 CACHEFILE="$outpath/.qmake.cache"
8500 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8501 cat >>"$CACHEFILE.tmp" <<EOF
8502 include(\$\$PWD/mkspecs/qmodule.pri)
8503 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
8504 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8505 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8511 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8512 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8513 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8514 # don't need to worry about generated files
8515 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8516 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8518 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8520 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8521 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8524 # replace .qmake.cache if it differs from the newly created temp file
8525 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8526 rm -f "$CACHEFILE.tmp"
8528 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8531 #-------------------------------------------------------------------------------
8532 # give feedback on configuration
8533 #-------------------------------------------------------------------------------
8537 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8540 This target is using the GNU C++ compiler ($PLATFORM).
8542 Recent versions of this compiler automatically include code for
8543 exceptions, which increase both the size of the Qt libraries and
8544 the amount of memory taken by your applications.
8546 You may choose to re-run `basename $0` with the -no-exceptions
8547 option to compile Qt without exceptions. This is completely binary
8548 compatible, and existing applications will continue to work.
8556 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8559 This target is using the MIPSpro C++ compiler ($PLATFORM).
8561 You may choose to re-run `basename $0` with the -no-exceptions
8562 option to compile Qt without exceptions. This will make the
8563 size of the Qt library smaller and reduce the amount of memory
8564 taken by your applications.
8575 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8577 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8578 in debug mode will run out of memory on systems with 2GB or less.
8579 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8580 -no-webkit or -release to skip webkit debug.
8585 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8586 echo "Build type: $PLATFORM"
8588 echo "Building on: $PLATFORM"
8589 echo "Building for: $XPLATFORM"
8592 if [ "$PLATFORM_MAC" = "yes" ]; then
8593 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8595 echo "Architecture: $CFG_ARCH"
8598 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8599 echo "Host architecture: $CFG_HOST_ARCH"
8602 if [ "$PLATFORM_MAC" = "yes" ]; then
8603 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8604 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8605 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8607 echo "Using framework: Cocoa"
8610 echo "Using framework: Carbon"
8614 if [ -n "$PLATFORM_NOTES" ]; then
8615 echo "Platform notes:"
8616 echo "$PLATFORM_NOTES"
8621 if [ "$OPT_VERBOSE" = "yes" ]; then
8622 echo $ECHO_N "qmake vars .......... $ECHO_C"
8623 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8624 echo "qmake switches ......... $QMAKE_SWITCHES"
8627 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8628 echo "Build .................. $CFG_BUILD_PARTS"
8629 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8630 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8631 echo "Debug .................. yes (combined)"
8632 if [ "$CFG_DEBUG" = "yes" ]; then
8633 echo "Default Link ........... debug"
8635 echo "Default Link ........... release"
8638 echo "Debug .................. $CFG_DEBUG"
8640 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8641 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8642 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8643 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8644 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8645 echo "QtGui module ........... $CFG_GUI"
8646 echo "QtScript module ........ $CFG_SCRIPT"
8647 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8648 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8649 echo "Phonon module .......... $CFG_PHONON"
8650 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8651 echo "SVG module ............. $CFG_SVG"
8652 case "$CFG_WEBKIT" in
8653 yes) echo "WebKit module .......... yes" ;;
8654 debug) echo "WebKit module .......... yes (debug)" ;;
8655 no) echo "WebKit module .......... no" ;;
8657 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8658 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8659 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8661 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8664 echo "Declarative module ..... $CFG_DECLARATIVE"
8665 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8666 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8668 echo "Support for S60 ........ $CFG_S60"
8669 echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES"
8670 echo "STL support ............ $CFG_STL"
8671 echo "PCH support ............ $CFG_PRECOMPILE"
8672 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8673 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8674 echo "AVX..................... ${CFG_AVX}"
8675 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8676 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8677 echo "NEON support ........... ${CFG_NEON}"
8679 [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
8680 echo "IPv6 support ........... $CFG_IPV6"
8681 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8682 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8683 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8684 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8685 echo "NIS support ............ $CFG_NIS"
8686 echo "CUPS support ........... $CFG_CUPS"
8687 echo "Iconv support .......... $CFG_ICONV"
8688 echo "Glib support ........... $CFG_GLIB"
8689 echo "GStreamer support ...... $CFG_GSTREAMER"
8690 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8691 echo "Large File support ..... $CFG_LARGEFILE"
8692 echo "GIF support ............ $CFG_GIF"
8693 if [ "$CFG_TIFF" = "no" ]; then
8694 echo "TIFF support ........... $CFG_TIFF"
8696 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8698 if [ "$CFG_JPEG" = "no" ]; then
8699 echo "JPEG support ........... $CFG_JPEG"
8701 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8703 if [ "$CFG_PNG" = "no" ]; then
8704 echo "PNG support ............ $CFG_PNG"
8706 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8708 if [ "$CFG_MNG" = "no" ]; then
8709 echo "MNG support ............ $CFG_MNG"
8711 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8713 echo "zlib support ........... $CFG_ZLIB"
8714 echo "Session management ..... $CFG_SM"
8715 if [ "$PLATFORM_QWS" = "yes" ]; then
8716 echo "Embedded support ....... $CFG_EMBEDDED"
8717 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8718 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8720 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8722 # Normalize the decoration output first
8723 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8724 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8725 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8726 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8727 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8728 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8729 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8730 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8731 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8732 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8733 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8734 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8735 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8736 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8737 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8738 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8740 if [ "$CFG_OPENGL" = "desktop" ]; then
8741 echo "OpenGL support ......... yes (Desktop OpenGL)"
8742 elif [ "$CFG_OPENGL" = "es1" ]; then
8743 echo "OpenGL support ......... yes (OpenGL ES 1.x Common profile)"
8744 elif [ "$CFG_OPENGL" = "es2" ]; then
8745 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8747 echo "OpenGL support ......... no"
8749 if [ "$CFG_EGL" != "no" ]; then
8750 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8751 echo "EGL support ............ yes <GLES/egl.h>"
8753 echo "EGL support ............ yes <EGL/egl.h>"
8756 if [ "$CFG_OPENVG" ]; then
8757 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8758 echo "OpenVG support ......... ShivaVG"
8760 echo "OpenVG support ......... $CFG_OPENVG"
8763 if [ "$PLATFORM_X11" = "yes" ]; then
8764 echo "NAS sound support ...... $CFG_NAS"
8765 echo "XShape support ......... $CFG_XSHAPE"
8766 echo "XVideo support ......... $CFG_XVIDEO"
8767 echo "XSync support .......... $CFG_XSYNC"
8768 echo "Xinerama support ....... $CFG_XINERAMA"
8769 echo "Xcursor support ........ $CFG_XCURSOR"
8770 echo "Xfixes support ......... $CFG_XFIXES"
8771 echo "Xrandr support ......... $CFG_XRANDR"
8772 echo "Xrender support ........ $CFG_XRENDER"
8773 echo "Xi support ............. $CFG_XINPUT"
8774 echo "MIT-SHM support ........ $CFG_MITSHM"
8775 echo "FontConfig support ..... $CFG_FONTCONFIG"
8776 echo "XKB Support ............ $CFG_XKB"
8777 echo "immodule support ....... $CFG_IM"
8778 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8780 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8781 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8782 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8783 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8784 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8785 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8786 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8787 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8788 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8791 if [ "$CFG_OPENSSL" = "yes" ]; then
8792 OPENSSL_LINKAGE="(run-time)"
8793 elif [ "$CFG_OPENSSL" = "linked" ]; then
8794 OPENSSL_LINKAGE="(linked)"
8796 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8797 echo "Alsa support ........... $CFG_ALSA"
8798 if [ "$PLATFORM_MAC" = "yes" ]; then
8799 echo "CoreWlan support ....... $CFG_COREWLAN"
8801 echo "ICD support ............ $CFG_ICD"
8802 echo "libICU support ......... $CFG_ICU"
8805 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC"
8807 # complain about not being able to use dynamic plugins if we are using a static build
8808 if [ "$CFG_SHARED" = "no" ]; then
8810 echo "WARNING: Using static linking will disable the use of dynamically"
8811 echo "loaded plugins. Make sure to import all needed static plugins,"
8812 echo "or compile needed modules into the library."
8815 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8817 echo "NOTE: When linking against OpenSSL, you can override the default"
8818 echo "library names through OPENSSL_LIBS."
8820 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8823 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8825 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8826 echo "if you want a pure debug build."
8831 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8836 #-------------------------------------------------------------------------------
8837 # build makefiles based on the configuration
8838 #-------------------------------------------------------------------------------
8840 echo "Finding project files. Please wait..."
8841 if [ "$CFG_NOPROCESS" != "yes" ]; then
8842 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8843 if [ -f "${relpath}/qtbase.pro" ]; then
8844 mkfile="${outpath}/Makefile"
8845 [ -f "$mkfile" ] && chmod +w "$mkfile"
8846 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8850 # .projects -> projects to process
8851 # .projects.1 -> qt and moc
8852 # .projects.2 -> subdirs and libs
8853 # .projects.3 -> the rest
8854 rm -f .projects .projects.1 .projects.2 .projects.3
8856 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8857 if [ -z "$AWK" ]; then
8858 for p in `echo $QMAKE_PROJECTS`; do
8859 echo "$p" >> .projects
8862 cat >projects.awk <<EOF
8868 first = "./.projects.1.tmp"
8869 second = "./.projects.2.tmp"
8870 third = "./.projects.3.tmp"
8875 if ( ! target_file )
8877 print input_file >target_file
8882 input_file = FILENAME
8887 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8890 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8891 target_file = second
8896 matched_target == 0 && /^(TEMPLATE.*=)/ {
8897 if ( \$3 == "subdirs" )
8898 target_file = second
8899 else if ( \$3 == "lib" )
8905 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8906 if ( \$0 ~ /plugin/ )
8909 target_file = second
8914 if ( ! target_file )
8916 print input_file >>target_file
8923 for p in `echo $QMAKE_PROJECTS`; do
8924 echo "$p" >> .projects.all
8927 # if you get errors about the length of the command line to awk, change the -l arg
8929 split -l 100 .projects.all .projects.all.
8930 for p in .projects.all.*; do
8931 "$AWK" -f projects.awk `cat $p`
8932 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8933 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8934 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8935 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8937 rm -f .projects.all* projects.awk
8939 [ -f .projects.1 ] && cat .projects.1 >>.projects
8940 [ -f .projects.2 ] && cat .projects.2 >>.projects
8941 rm -f .projects.1 .projects.2
8942 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8943 cat .projects.3 >>.projects
8947 # don't sort Qt and MOC in with the other project files
8948 # also work around a segfaulting uniq(1)
8949 if [ -f .sorted.projects.2 ]; then
8950 sort .sorted.projects.2 > .sorted.projects.2.new
8951 mv -f .sorted.projects.2.new .sorted.projects.2
8952 cat .sorted.projects.2 >> .sorted.projects.1
8954 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8955 rm -f .sorted.projects.2 .sorted.projects.1
8959 if [ -f .projects ]; then
8960 uniq .projects >.tmp
8961 mv -f .tmp .projects
8962 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8964 if [ -f .projects.3 ]; then
8965 uniq .projects.3 >.tmp
8966 mv -f .tmp .projects.3
8967 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8969 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8973 for part in $CFG_BUILD_PARTS; do
8975 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8976 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8977 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8978 examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
8983 if [ "$CFG_DEV" = "yes" ]; then
8984 PART_ROOTS="$PART_ROOTS tests"
8987 echo "Creating makefiles. Please wait..."
8988 for file in .projects .projects.3; do
8989 [ '!' -f "$file" ] && continue
8990 for a in `cat $file`; do
8992 for r in $PART_ROOTS; do
8993 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8998 [ "$IN_ROOT" = "no" ] && continue
9001 *winmain/winmain.pro)
9002 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
9006 *s60main/s60main.pro)
9007 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
9010 *examples/activeqt/*) continue ;;
9011 */qmake/qmake.pro) continue ;;
9012 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
9013 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
9019 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
9020 test -d "$dir" || mkdir -p "$dir"
9021 OUTDIR="$outpath/$dir"
9022 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
9023 # fast configure - the makefile exists, skip it
9024 # since the makefile exists, it was generated by qmake, which means we
9025 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
9027 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
9030 QMAKE_SPEC_ARGS="-spec $SPEC"
9031 echo $ECHO_N " for $a$ECHO_C"
9033 QMAKE="$outpath/bin/qmake"
9034 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
9035 if [ "$file" = ".projects.3" ]; then
9038 cat >"${OUTDIR}/Makefile" <<EOF
9039 # ${OUTDIR}/Makefile: generated by configure
9041 # WARNING: This makefile will be replaced with a real makefile.
9042 # All changes made to this file will be lost.
9044 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
9046 cat >>"${OUTDIR}/Makefile" <<EOF
9048 all clean install qmake first Makefile: FORCE
9049 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
9057 if [ "$OPT_VERBOSE" = "yes" ]; then
9058 echo " (`basename $SPEC`)"
9059 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
9064 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
9065 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
9069 rm -f .projects .projects.3
9071 #-------------------------------------------------------------------------------
9072 # check for platforms that we don't yet know about
9073 #-------------------------------------------------------------------------------
9074 if [ "$CFG_ARCH" = "generic" ]; then
9077 NOTICE: Atomic operations are not yet supported for this
9080 Qt will use the 'generic' architecture instead, which uses a
9081 single pthread_mutex_t to protect all atomic operations. This
9082 implementation is the slow (but safe) fallback implementation
9083 for architectures Qt does not yet support.
9087 #-------------------------------------------------------------------------------
9088 # check if the user passed the -no-zlib option, which is no longer supported
9089 #-------------------------------------------------------------------------------
9090 if [ -n "$ZLIB_FORCED" ]; then
9091 which_zlib="supplied"
9092 if [ "$CFG_ZLIB" = "system" ]; then
9098 NOTICE: The -no-zlib option was supplied but is no longer
9101 Qt now requires zlib support in all builds, so the -no-zlib
9102 option was ignored. Qt will be built using the $which_zlib
9107 #-------------------------------------------------------------------------------
9108 # finally save the executed command to another script
9109 #-------------------------------------------------------------------------------
9110 if [ `basename $0` != "config.status" ]; then
9111 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
9113 # add the system variables
9114 for varname in $SYSTEM_VARIABLES; do
9116 'if [ -n "\$'${varname}'" ]; then
9117 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
9122 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
9124 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
9125 echo "#!/bin/sh" > "$outpath/config.status"
9126 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
9127 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
9128 echo "else" >> "$outpath/config.status"
9129 echo " $CONFIG_STATUS" >> "$outpath/config.status"
9130 echo "fi" >> "$outpath/config.status"
9131 chmod +x "$outpath/config.status"
9134 if [ -n "$RPATH_MESSAGE" ]; then
9136 echo "$RPATH_MESSAGE"
9139 MAKE=`basename "$MAKE"`
9141 echo Qt is now configured for building. Just run \'$MAKE\'.
9142 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
9143 echo Once everything is built, Qt is installed.
9144 echo You should not run \'$MAKE install\'.
9146 echo Once everything is built, you must run \'$MAKE install\'.
9147 echo Qt will be installed into $QT_INSTALL_PREFIX
9150 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.