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 ## GNU Lesser General Public License Usage
12 ## This file may be used under the terms of the GNU Lesser General Public
13 ## License version 2.1 as published by the Free Software Foundation and
14 ## appearing in the file LICENSE.LGPL included in the packaging of this
15 ## file. Please review the following information to ensure the GNU Lesser
16 ## General Public License version 2.1 requirements will be met:
17 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ## In addition, as a special exception, Nokia gives you certain additional
20 ## rights. These rights are described in the Nokia Qt LGPL Exception
21 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
23 ## GNU General Public License Usage
24 ## Alternatively, this file may be used under the terms of the GNU General
25 ## Public License version 3.0 as published by the Free Software Foundation
26 ## and appearing in the file LICENSE.GPL included in the packaging of this
27 ## file. Please review the following information to ensure the GNU General
28 ## Public License version 3.0 requirements will be met:
29 ## http://www.gnu.org/copyleft/gpl.html.
32 ## Alternatively, this file may be used in accordance with the terms and
33 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
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 tests"
707 CFG_PHONON_BACKEND=yes
709 CFG_AUDIO_BACKEND=auto
713 CFG_DECLARATIVE_DEBUG=yes
714 CFG_WEBKIT=auto # (yes|no|auto|debug)
715 CFG_JAVASCRIPTCORE_JIT=auto
718 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
719 CFG_GFX_ON="linuxfb multiscreen"
720 CFG_GFX_PLUGIN_AVAILABLE=
723 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
724 CFG_KBD_ON="tty" #default, see QMakeVar above
725 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
726 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
728 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
729 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
730 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
731 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
733 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
734 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
735 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
736 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
741 CFG_KBD_PLUGIN_AVAILABLE=
744 CFG_MOUSE_PLUGIN_AVAILABLE=
749 CFG_DECORATION_AVAILABLE="styled windows default"
750 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
751 CFG_DECORATION_PLUGIN_AVAILABLE=
752 CFG_DECORATION_PLUGIN=
769 CFG_SEPARATE_DEBUG_INFO=no
770 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
771 CFG_REDUCE_EXPORTS=auto
781 CFG_REDUCE_RELOCATIONS=no
784 CFG_ACCESSIBILITY=auto
788 CFG_DOUBLEFORMAT=auto
792 CFG_CLOCK_GETTIME=auto
793 CFG_CLOCK_MONOTONIC=auto
802 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
807 COMMANDLINE_MAC_CARBON=no
810 CFG_PREFIX_INSTALL=yes
818 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce"
819 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
820 XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*)
821 XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2)
824 OPT_CONFIRM_LICENSE=no
830 CFG_GRAPHICS_SYSTEM=default
839 # initalize variables used for installation
848 QT_INSTALL_TRANSLATIONS=
853 #flags for SQL drivers
861 QT_LFLAGS_ODBC="-lodbc"
864 # flags for libdbus-1
868 # flags for Glib (X11 only)
872 # flags for GStreamer (X11 only)
876 #flag for Symbian fpu settings
879 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
880 QT_CFLAGS_CONNSETTINGS=
881 QT_LIBS_CONNSETTINGS=
883 #-------------------------------------------------------------------------------
884 # check SQL drivers, mouse drivers and decorations available in this package
885 #-------------------------------------------------------------------------------
887 # opensource version removes some drivers, so force them to be off
893 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
894 for a in "$relpath/src/plugins/sqldrivers/"*; do
896 base_a=`basename "$a"`
897 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
898 eval "CFG_SQL_${base_a}=auto"
903 CFG_DECORATION_PLUGIN_AVAILABLE=
904 if [ -d "$relpath/src/plugins/decorations" ]; then
905 for a in "$relpath/src/plugins/decorations/"*; do
907 base_a=`basename "$a"`
908 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
913 CFG_KBD_PLUGIN_AVAILABLE=
914 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
915 for a in "$relpath/src/plugins/kbddrivers/"*; do
917 base_a=`basename "$a"`
918 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
923 CFG_MOUSE_PLUGIN_AVAILABLE=
924 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
925 for a in "$relpath/src/plugins/mousedrivers/"*; do
927 base_a=`basename "$a"`
928 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
933 CFG_GFX_PLUGIN_AVAILABLE=
934 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
935 for a in "$relpath/src/plugins/gfxdrivers/"*; do
937 base_a=`basename "$a"`
938 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
941 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
944 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
945 if [ -d "$relpath/src/plugins/imageformats" ]; then
946 for a in "$relpath/src/plugins/imageformats/"*; do
948 base_a=`basename "$a"`
949 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
954 #-------------------------------------------------------------------------------
955 # Set Default NaCl options
956 #-------------------------------------------------------------------------------
957 if [ "$CFG_EMBEDDED" = "nacl" ]; then
958 echo "Setting NaCl options:"
968 if [ `uname` = "Linux" ]; then
969 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
970 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
972 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
973 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
976 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
987 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
988 QT_CONFIG="$QT_CONFIG nacl"
991 #-------------------------------------------------------------------------------
992 # parse command line arguments
993 #-------------------------------------------------------------------------------
995 # parse the arguments, setting things to "yes" or "no"
996 while [ "$#" -gt 0 ]; do
1000 #Autoconf style options
1002 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1006 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1010 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1011 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1014 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1018 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1022 -no-*-*|-plugin-*-*|-qt-*-*)
1023 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1024 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1039 #Qt style no options
1041 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1044 #Qt style yes options
1045 -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|-xcb|-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|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu)
1046 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1049 #Qt style options that pass an argument
1051 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1053 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1057 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1061 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config)
1062 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1066 #Qt style complex options in one command
1067 -enable-*|-disable-*)
1068 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1069 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1071 #Qt Builtin/System style options
1072 -no-*|-system-*|-qt-*)
1073 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1074 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1076 #Options that cannot be generalized
1083 # this option may or may not be followed by an argument
1084 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1091 -embedded-lite|-qpa)
1093 # this option may or may not be followed by an argument
1094 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1107 # this option may or may not be followed by an argument
1108 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1117 # this option may or may not be followed by an argument
1118 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1126 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1127 # this option may or may not be followed by an argument
1128 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1137 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1141 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1149 VAR="graphicssystem"
1153 -runtimegraphicssystem)
1154 VAR="runtimegraphicssystem"
1165 if [ "$1" = "-D" ]; then
1169 VAL=`echo $1 | sed 's,-D,,'`
1174 # this option may or may not be followed by an argument
1175 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1184 if [ "$1" = "-I" ]; then
1188 VAL=`echo $1 | sed 's,-I,,'`
1193 if [ "$1" = "-L" ]; then
1197 VAL=`echo $1 | sed 's,-L,,'`
1202 if [ "$1" = "-R" ]; then
1206 VAL=`echo $1 | sed 's,-R,,'`
1211 VAL=`echo $1 | sed 's,-l,,'`
1215 if [ "$1" = "-F" ]; then
1219 VAL=`echo $1 | sed 's,-F,,'`
1224 if [ "$1" = "-fw" ]; then
1228 VAL=`echo $1 | sed 's,-fw,,'`
1232 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1239 if [ "$UNKNOWN_ARG" = "yes" ]; then
1240 echo "$1: unknown argument"
1251 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1252 CFG_QT3SUPPORT="$VAL"
1258 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1259 CFG_ACCESSIBILITY="$VAL"
1268 CFG_USE_GNUMAKE="$VAL"
1271 CFG_MYSQL_CONFIG="$VAL"
1274 QT_INSTALL_PREFIX="$VAL"
1277 QT_HOST_PREFIX="$VAL"
1280 QT_FORCE_PKGCONFIG=yes
1283 QT_INSTALL_DOCS="$VAL"
1286 QT_INSTALL_HEADERS="$VAL"
1289 QT_INSTALL_PLUGINS="$VAL"
1292 QT_INSTALL_IMPORTS="$VAL"
1295 QT_INSTALL_DATA="$VAL"
1298 QT_INSTALL_LIBS="$VAL"
1307 QT_INSTALL_TRANSLATIONS="$VAL"
1309 sysconfdir|settingsdir)
1310 QT_INSTALL_SETTINGS="$VAL"
1313 QT_INSTALL_EXAMPLES="$VAL"
1322 QT_INSTALL_BINS="$VAL"
1344 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1351 if [ "$VAL" = "little" ]; then
1352 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1353 elif [ "$VAL" = "big" ]; then
1354 CFG_ENDIAN="Q_BIG_ENDIAN"
1360 if [ "$VAL" = "little" ]; then
1361 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1362 elif [ "$VAL" = "big" ]; then
1363 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1369 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1376 CFG_QWS_DEPTHS="$VAL"
1379 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1380 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1381 [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1383 if [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
1391 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1393 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1401 if [ "$PLATFORM_QWS" = "yes" ]; then
1402 echo "Error: Graphics System plugins are not supported on QWS."
1403 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1404 echo " rather than existing as a separate plugin."
1408 if [ "$VAL" = "opengl" ]; then
1409 CFG_GRAPHICS_SYSTEM="opengl"
1410 elif [ "$VAL" = "openvg" ]; then
1411 CFG_GRAPHICS_SYSTEM="openvg"
1412 elif [ "$VAL" = "raster" ]; then
1413 CFG_GRAPHICS_SYSTEM="raster"
1414 elif [ "$VAL" = "runtime" ]; then
1415 CFG_GRAPHICS_SYSTEM="runtime"
1421 runtimegraphicssystem)
1422 if [ "$VAL" != "runtime" ]; then
1423 CFG_RUNTIME_SYSTEM="$VAL"
1427 qvfb) # left for commandline compatibility, not documented
1428 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1429 if [ "$VAL" = "yes" ]; then
1430 QMakeVar add gfx-drivers qvfb
1431 QMakeVar add kbd-drivers qvfb
1432 QMakeVar add mouse-drivers qvfb
1433 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1434 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1435 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1442 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1445 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1454 if [ "$PLATFORM_MAC" = "yes" ]; then
1461 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1462 CFG_MAC_DWARF2="$VAL"
1468 # if this is a Mac then "windows" probably means
1469 # we are cross-compiling for MinGW
1470 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1471 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1480 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1481 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1487 # do nothing - Cocoa is the default.
1490 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1491 CFG_MAC_CARBON="$VAL"
1492 COMMANDLINE_MAC_CARBON="$VAL"
1498 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1499 CFG_MAC_HARFBUZZ="$VAL"
1506 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1507 CFG_FRAMEWORK="$VAL"
1513 if [ "$VAL" = "yes" ]; then
1515 QMakeVar add QMAKE_CFLAGS -pg
1516 QMakeVar add QMAKE_CXXFLAGS -pg
1517 QMakeVar add QMAKE_LFLAGS -pg
1518 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1523 exceptions|g++-exceptions)
1524 if [ "$VAL" = "no" ]; then
1526 elif [ "$VAL" = "yes" ]; then
1534 # keep compatibility with old platform names
1540 PLATFORM=hpux-acc-o64
1543 PLATFORM=hpux-acc-64
1546 PLATFORM=hpux-acc-64
1558 PLATFORM=reliant-cds-64
1561 PLATFORM=solaris-cc-64
1564 PLATFORM=unixware-cc
1567 PLATFORM=unixware-g++
1570 PLATFORM=unixware-cc
1573 PLATFORM=unixware-g++
1579 i386) NATIVE_64_ARCH="x86_64" ;;
1580 powerpc) NATIVE_64_ARCH="ppc64" ;;
1581 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1583 if [ ! -z "$NATIVE_64_ARCH" ]; then
1584 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1585 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1592 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1593 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
1594 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
1597 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1598 CFG_DEBUG_RELEASE="$VAL"
1604 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1605 CFG_RELEASE_QMAKE="$VAL"
1611 if [ "$VAL" = "yes" ]; then
1613 elif [ "$VAL" = "no" ]; then
1620 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1621 CFG_PREFIX_INSTALL="$VAL"
1629 developer-build|commercial|opensource|nokia-developer)
1630 # These switches have been dealt with already
1633 if [ "$VAL" = "yes" ]; then
1635 elif [ "$VAL" = "no" ]; then
1642 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1643 CFG_INCREMENTAL="$VAL"
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1650 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1656 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1657 if [ "$VAL" = "no" ]; then
1658 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1659 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1660 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1666 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1673 if [ "$VAL" = "no" ]; then
1680 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1688 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1695 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1702 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1709 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1716 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1723 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1730 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1737 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1738 CFG_PRECOMPILE="$VAL"
1743 separate-debug-info)
1744 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1745 CFG_SEPARATE_DEBUG_INFO="$VAL"
1746 elif [ "$VAL" = "nocopy" ] ; then
1747 CFG_SEPARATE_DEBUG_INFO="yes"
1748 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1754 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1755 CFG_REDUCE_EXPORTS="$VAL"
1761 if [ "$VAL" = "no" ]; then
1768 if [ "$VAL" = "no" ]; then
1775 if [ "$VAL" = "no" ]; then
1782 if [ "$VAL" = "no" ]; then
1789 if [ "$VAL" = "no" ]; then
1796 if [ "$VAL" = "no" ]; then
1803 if [ "$VAL" = "no" ]; then
1810 if [ "$VAL" = "no" ]; then
1817 if [ "$VAL" = "no" ]; then
1827 if [ "$VAL" = "no" ]; then
1834 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1835 CFG_REDUCE_RELOCATIONS="$VAL"
1841 [ "$VAL" = "qt" ] && VAL=yes
1842 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1843 CFG_QWS_FREETYPE="$VAL"
1849 [ "$VAL" = "qt" ] && VAL=yes
1850 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1855 # No longer supported:
1856 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1859 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1866 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1867 CFG_SYMBIAN_DEFFILES="$VAL"
1873 if [ "$VAL" = "system" ]; then
1880 [ "$VAL" = "yes" ] && VAL=qt
1881 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1888 [ "$VAL" = "yes" ] && VAL=qt
1889 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1896 [ "$VAL" = "yes" ] && VAL=qt
1897 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1904 [ "$VAL" = "yes" ] && VAL=qt
1905 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1912 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1919 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1926 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1933 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1940 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1947 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1954 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1955 CFG_FONTCONFIG="$VAL"
1961 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1968 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1975 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1982 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1989 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1996 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1997 CFG_GSTREAMER="$VAL"
2003 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2004 CFG_QGTKSTYLE="$VAL"
2010 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ]; then
2011 CFG_QS60STYLE="$VAL"
2017 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2020 if [ "$VAL" = "no" ]; then
2028 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
2030 elif [ "$VAL" = "runtime" ]; then
2037 if [ "$VAL" = "yes" ]; then
2044 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2051 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2052 CFG_LARGEFILE="$VAL"
2058 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2065 if [ "$VAL" = "yes" ]; then
2066 CFG_OPENSSL="linked"
2072 if [ "$VAL" = "yes" ]; then
2080 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2081 CFG_XMLPATTERNS="yes"
2083 if [ "$VAL" = "no" ]; then
2084 CFG_XMLPATTERNS="no"
2091 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2094 if [ "$VAL" = "no" ]; then
2102 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2103 CFG_SCRIPTTOOLS="yes"
2105 if [ "$VAL" = "no" ]; then
2106 CFG_SCRIPTTOOLS="no"
2113 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2116 if [ "$VAL" = "no" ]; then
2124 if [ "$VAL" = "yes" ]; then
2127 if [ "$VAL" = "no" ]; then
2135 if [ "$VAL" = "yes" ]; then
2136 CFG_DECLARATIVE="yes"
2138 if [ "$VAL" = "no" ]; then
2139 CFG_DECLARATIVE="no"
2146 if [ "$VAL" = "yes" ]; then
2147 CFG_DECLARATIVE_DEBUG="yes"
2149 if [ "$VAL" = "no" ]; then
2150 CFG_DECLARATIVE_DEBUG="no"
2157 [ "$VAL" = "auto" ] && VAL="yes"
2161 if [ "$VAL" = "yes" ]; then
2164 if [ "$VAL" = "no" ]; then
2172 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2173 CFG_JAVASCRIPTCORE_JIT="$VAL"
2179 if [ "$VAL" = "yes" ]; then
2180 OPT_CONFIRM_LICENSE="$VAL"
2186 if [ "$VAL" = "yes" ]; then
2192 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2193 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2194 # if autoconf style options were used, $VAL can be "yes" or "no"
2195 [ "$VAL" = "yes" ] && VAL=qt
2196 # now $VAL should be "no", "qt", or "plugin"... double-check
2197 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2200 # now $VAL is "no", "qt", or "plugin"
2202 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2203 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2205 # Grab the available values
2208 avail="$CFG_SQL_AVAILABLE"
2211 avail="$CFG_GFX_AVAILABLE"
2212 if [ "$OPT" = "plugin" ]; then
2213 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2217 avail="$CFG_DECORATION_AVAILABLE"
2218 if [ "$OPT" = "plugin" ]; then
2219 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2223 avail="$CFG_KBD_AVAILABLE"
2224 if [ "$OPT" = "plugin" ]; then
2225 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2229 avail="$CFG_MOUSE_AVAILABLE"
2230 if [ "$OPT" = "plugin" ]; then
2231 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2235 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2236 if [ "$OPT" != "plugin" ]; then
2237 # png is always built in
2243 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2247 # Check that that user's value is available.
2250 if [ "$VAL" = "$d" ]; then
2255 [ "$found" = yes ] || ERROR=yes
2257 if [ "$VAR" = "sql" ]; then
2258 # set the CFG_SQL_driver
2259 eval "CFG_SQL_$VAL=\$OPT"
2261 elif [ "$VAR" = "imageformat" ]; then
2262 [ "$OPT" = "qt" ] && OPT=yes
2263 VAL="`echo $VAL |tr a-z A-Z`"
2264 eval "CFG_$VAL=$OPT"
2268 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2269 if [ "$OPT" = "plugin" ]; then
2270 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2271 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2272 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2273 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2274 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2275 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2276 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2277 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2280 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2281 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2282 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2283 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2284 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2288 QMakeVar add "${VAR}s" "${VAL}"
2289 elif [ "$OPT" = "no" ]; then
2290 PLUG_VAR="${VAR}-plugin"
2291 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2292 IN_VAR="${VAR}-driver"
2296 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2297 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2298 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2299 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2300 QMakeVar del "${IN_VAR}s" "$VAL"
2301 QMakeVar del "${PLUG_VAR}s" "$VAL"
2303 if [ "$ERROR" = "yes" ]; then
2304 echo "$CURRENT_OPT: unknown argument"
2309 if [ "$VAL" = "yes" ]; then
2310 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2311 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2315 elif [ "$VAL" = "no" ]; then
2316 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2317 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2326 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2333 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2340 D_FLAGS="$D_FLAGS \"$VAL\""
2343 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2346 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2349 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2352 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2355 if [ "$PLATFORM_MAC" = "yes" ]; then
2356 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2357 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2363 if [ "$PLATFORM_MAC" = "yes" ]; then
2364 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2373 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2380 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2381 CFG_PHONON_BACKEND="$VAL"
2387 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2388 CFG_MULTIMEDIA="$VAL"
2400 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2401 CFG_AUDIO_BACKEND="$VAL"
2407 if [ "$VAL" != "no" ]; then
2412 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2422 if [ "$UNKNOWN_OPT" = "yes" ]; then
2423 echo "${CURRENT_OPT}: invalid command-line switch"
2429 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2430 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2433 if [ "$CFG_GUI" = "no" ]; then
2434 echo "Warning: -no-gui will disable the qt3support library."
2438 #disable Qt3Support for Lighthouse
2439 if [ "$PLATFORM_QPA" = "yes" ]; then
2443 # update QT_CONFIG to show our current predefined configuration
2444 case "$CFG_QCONFIG" in
2445 minimal|small|medium|large|full)
2446 # these are a sequence of increasing functionality
2447 for c in minimal small medium large full; do
2448 QT_CONFIG="$QT_CONFIG $c-config"
2449 [ "$CFG_QCONFIG" = $c ] && break
2453 # not known to be sufficient for anything
2454 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2455 echo >&2 "Error: configuration file not found:"
2456 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2458 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2463 #-------------------------------------------------------------------------------
2464 # build tree initialization
2465 #-------------------------------------------------------------------------------
2467 # where to find which..
2468 unixtests="$relpath/config.tests/unix"
2469 mactests="$relpath/config.tests/mac"
2470 symbiantests="$relpath/config.tests/symbian"
2471 WHICH="$unixtests/which.test"
2473 PERL=`$WHICH perl 2>/dev/null`
2475 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2477 for e in gawk nawk awk; do
2478 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2485 PERL="/usr/bin/perl"
2486 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2490 ### skip this if the user just needs help...
2491 if [ "$OPT_HELP" != "yes" ]; then
2493 # is this a shadow build?
2494 if [ "$OPT_SHADOW" = "maybe" ]; then
2496 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2497 if [ -h "$outpath" ]; then
2498 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2504 if [ "$OPT_SHADOW" = "yes" ]; then
2505 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2506 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2507 echo >&2 "Cannot proceed."
2510 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2513 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2515 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2516 echo "Qt can be built in release mode with separate debug information, so"
2517 echo "-debug-and-release is not necessary anymore"
2521 if [ "$CFG_SILENT" = "yes" ]; then
2522 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2525 # if the source tree is different from the build tree,
2526 # symlink or copy part of the sources
2527 if [ "$OPT_SHADOW" = "yes" ]; then
2528 echo "Preparing build tree..."
2530 if [ -z "$PERL" ]; then
2532 echo "You need perl in your PATH to make a shadow build."
2533 echo "Cannot proceed."
2537 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2539 # symlink the qmake directory
2540 find "$relpath/qmake" | while read a; do
2541 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2542 if [ '!' -f "$my_a" ]; then
2543 if [ -d "$a" ]; then
2544 # directories are created...
2547 a_dir=`dirname "$my_a"`
2548 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2549 # ... and files are symlinked
2550 case `basename "$a"` in
2551 *.o|*.d|GNUmakefile*|qmake)
2562 # make a syncqt script that can be used in the shadow
2563 rm -f "$outpath/bin/syncqt"
2564 if [ -x "$relpath/bin/syncqt" ]; then
2565 mkdir -p "$outpath/bin"
2566 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2567 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2568 chmod 755 "$outpath/bin/syncqt"
2571 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2572 rm -f "$outpath/bin/$i"
2573 if [ -x "$relpath/bin/$i" ]; then
2574 mkdir -p "$outpath/bin"
2575 echo "#!/bin/sh" >"$outpath/bin/$i"
2576 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2577 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2578 chmod 755 "$outpath/bin/$i"
2582 # symlink the mkspecs directory
2583 mkdir -p "$outpath/mkspecs"
2584 rm -rf "$outpath"/mkspecs/*
2585 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2586 rm -f "$outpath/mkspecs/default"
2590 rm -rf "$outpath/mkspecs/$1"
2591 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2592 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2595 # Special case for mkspecs/features directory.
2596 # To be able to place .prf files into a shadow build directory,
2597 # we're creating links for files only. The directory structure is reproduced.
2598 ShadowMkspecs features
2600 # The modules dir is special, too.
2601 ShadowMkspecs modules
2603 # symlink the doc directory
2604 rm -rf "$outpath/doc"
2605 ln -s "$relpath/doc" "$outpath/doc"
2607 # make sure q3porting.xml can be found
2608 mkdir -p "$outpath/tools/porting/src"
2609 rm -f "$outpath/tools/porting/src/q3porting.xml"
2610 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2613 # symlink fonts to be able to run application from build directory
2614 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2615 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2616 mkdir -p "${outpath}/lib"
2617 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2621 if [ "$OPT_FAST" = "auto" ]; then
2622 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2629 # find a make command
2630 if [ -z "$MAKE" ]; then
2632 for mk in gmake make; do
2633 if "$WHICH" $mk >/dev/null 2>&1; then
2638 if [ -z "$MAKE" ]; then
2639 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2640 echo >&2 "Cannot proceed."
2643 # export MAKE, we need it later in the config.tests
2649 #-------------------------------------------------------------------------------
2650 # auto-detect all that hasn't been specified in the arguments
2651 #-------------------------------------------------------------------------------
2653 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2654 if [ "$CFG_EMBEDDED" != "no" ]; then
2655 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2657 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2658 if [ -z "$XPLATFORM" ]; then
2659 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2660 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2664 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2665 if [ -z "$XPLATFORM" ]; then
2666 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2667 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2671 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2672 if [ -z "$XPLATFORM" ]; then
2673 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2674 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2678 if [ -z "$PLATFORM" ]; then
2679 case "$UNAME_MACHINE" in
2681 PLATFORM=qws/linux-x86-g++
2684 PLATFORM=qws/linux-x86_64-g++
2687 PLATFORM=qws/linux-generic-g++
2691 if [ -z "$XPLATFORM" ]; then
2692 if [ "$CFG_EMBEDDED" = "auto" ]; then
2693 if [ -n "$CFG_ARCH" ]; then
2694 CFG_EMBEDDED=$CFG_ARCH
2696 case "$UNAME_MACHINE" in
2704 CFG_EMBEDDED=generic
2709 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2713 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2714 if [ -z "$XPLATFORM" ]; then
2715 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2716 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2720 if [ -z "$XPLATFORM" ]; then
2725 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2732 if [ -z "$PLATFORM" ]; then
2734 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2736 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2738 # PLATFORM=macx-xcode
2745 #PLATFORM=aix-g++-64
2747 #PLATFORM=aix-xlc-64
2749 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2759 # PLATFORM=dynix-g++
2765 PLATFORM=freebsd-g++
2767 - Also available for FreeBSD: freebsd-icc
2771 PLATFORM=openbsd-g++
2782 #PLATFORM=irix-cc-64
2784 - Also available for IRIX: irix-g++ irix-cc-64
2788 case "$UNAME_MACHINE" in
2790 #PLATFORM=hpuxi-acc-32
2791 PLATFORM=hpuxi-acc-64
2793 - Also available for HP-UXi: hpuxi-acc-32
2799 #PLATFORM=hpux-acc-64
2801 #PLATFORM=hpux-acc-o64
2803 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2812 - Also available for Tru64: tru64-g++
2816 case "$UNAME_MACHINE" in
2818 PLATFORM=linux-g++-64
2825 - Also available for Linux: linux-kcc linux-icc linux-cxx
2829 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2830 PLATFORM="solaris-g++"
2832 #PLATFORM=solaris-g++
2834 #PLATFORM=solaris-cc64
2837 - Also available for Solaris: solaris-g++ solaris-cc-64
2840 ReliantUNIX-*:*|SINIX-*:*)
2841 PLATFORM=reliant-cds
2842 #PLATFORM=reliant-cds-64
2844 - Also available for Reliant UNIX: reliant-cds-64
2854 #PLATFORM=unixware-g++
2855 PLATFORM=unixware-cc
2857 - Also available for OpenUNIX: unixware-g++
2861 #PLATFORM=unixware-g++
2862 PLATFORM=unixware-cc
2864 - Also available for UnixWare: unixware-g++
2871 - Also available for SCO OpenServer: sco-g++
2875 PLATFORM=unixware-g++
2878 PLATFORM=unsupported/qnx-g++
2881 if [ "$OPT_HELP" != "yes" ]; then
2883 for p in $PLATFORMS; do
2884 echo " $relconf $* -platform $p"
2887 echo " The build script does not currently recognize all" >&2
2888 echo " platforms supported by Qt." >&2
2889 echo " Rerun this script with a -platform option listed to" >&2
2890 echo " set the system/compiler combination you use." >&2
2897 if [ "$PLATFORM_QWS" = "yes" ]; then
2899 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2901 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2904 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2906 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2907 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
2908 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
2910 if [ -d "$PLATFORM" ]; then
2911 QMAKESPEC="$PLATFORM"
2913 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2915 if [ -d "$XPLATFORM" ]; then
2916 XQMAKESPEC="$XPLATFORM"
2918 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2920 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2921 QT_CROSS_COMPILE=yes
2922 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2925 if [ "$PLATFORM_MAC" = "yes" ]; then
2926 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2928 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2929 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2930 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2931 echo " built with 'macx-g++'" >&2
2937 # check specified platforms are supported
2938 if [ '!' -d "$QMAKESPEC" ]; then
2940 echo " The specified system/compiler is not supported:"
2944 echo " Please see the README file for a complete list."
2948 if [ '!' -d "$XQMAKESPEC" ]; then
2950 echo " The specified system/compiler is not supported:"
2954 echo " Please see the README file for a complete list."
2958 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2960 echo " The specified system/compiler port is not complete:"
2962 echo " $XQMAKESPEC/qplatformdefs.h"
2964 echo " Please contact qt-info@nokia.com."
2969 # now look at the configs and figure out what platform we are config'd for
2970 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2971 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2973 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2975 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2976 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2977 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2978 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2979 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2983 #-------------------------------------------------------------------------------
2984 # determine the system architecture
2985 #-------------------------------------------------------------------------------
2986 if [ "$OPT_VERBOSE" = "yes" ]; then
2987 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2990 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2991 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2993 echo "You have specified a target architecture with -embedded and -arch."
2994 echo "The two architectures you have specified are different, so we can"
2995 echo "not proceed. Either set both to be the same, or only use -embedded."
3001 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
3002 case `basename "$XPLATFORM"` in
3005 echo "You are not licensed for Qt for `basename $XPLATFORM`."
3007 echo "Please contact qt-info@nokia.com to upgrade your license to"
3008 echo "include this platform, or install the Qt Open Source Edition"
3009 echo "if you intend to develop free software."
3015 if [ -z "${CFG_HOST_ARCH}" ]; then
3016 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
3018 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
3019 case "$CFG_HOST_ARCH" in
3024 if [ "$OPT_VERBOSE" = "yes" ]; then
3025 echo " GNU/Hurd ($CFG_HOST_ARCH)"
3029 CFG_HOST_ARCH=`uname -p`
3030 if [ "$OPT_VERBOSE" = "yes" ]; then
3031 echo " SGI ($CFG_HOST_ARCH)"
3035 case "$UNAME_MACHINE" in
3037 if [ "$OPT_VERBOSE" = "yes" ]; then
3038 echo " Sun SPARC (sparc)"
3045 if [ "$OPT_VERBOSE" = "yes" ]; then
3046 echo " 64-bit AMD 80x86 (x86_64)"
3048 CFG_HOST_ARCH=x86_64
3051 if [ "$OPT_VERBOSE" = "yes" ]; then
3052 echo " 32-bit Intel 80x86 (i386)"
3060 case "$UNAME_MACHINE" in
3062 if [ "$OPT_VERBOSE" = "yes" ]; then
3063 echo " 32-bit Apple PowerPC (powerpc)"
3067 if [ "$OPT_VERBOSE" = "yes" ]; then
3068 echo " 32-bit Intel 80x86 (i386)"
3072 CFG_HOST_ARCH=macosx
3075 if [ "$OPT_VERBOSE" = "yes" ]; then
3076 echo " 64-bit IBM PowerPC (powerpc)"
3078 CFG_HOST_ARCH=powerpc
3081 if [ "$OPT_VERBOSE" = "yes" ]; then
3082 echo " HP PA-RISC (parisc)"
3084 CFG_HOST_ARCH=parisc
3087 if [ "$OPT_VERBOSE" = "yes" ]; then
3088 echo " 32-bit Intel 80x86 (i386)"
3092 *:*:x86_64|*:*:amd64)
3093 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3094 if [ "$OPT_VERBOSE" = "yes" ]; then
3095 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3099 if [ "$OPT_VERBOSE" = "yes" ]; then
3100 echo " 64-bit AMD 80x86 (x86_64)"
3102 CFG_HOST_ARCH=x86_64
3106 if [ "$OPT_VERBOSE" = "yes" ]; then
3107 echo " 32-bit PowerPC (powerpc)"
3109 CFG_HOST_ARCH=powerpc
3112 if [ "$OPT_VERBOSE" = "yes" ]; then
3113 echo " 64-bit PowerPC (powerpc)"
3115 CFG_HOST_ARCH=powerpc
3118 if [ "$OPT_VERBOSE" = "yes" ]; then
3119 echo " IBM S/390 (s390)"
3124 if [ "$OPT_VERBOSE" = "yes" ]; then
3130 if [ "$OPT_VERBOSE" = "yes" ]; then
3131 echo " Linux on SPARC"
3136 case "$UNAME_MACHINE" in
3138 if [ "$OPT_VERBOSE" = "yes" ]; then
3139 echo " QNX on Intel 80x86 (i386)"
3146 if [ "$OPT_VERBOSE" = "yes" ]; then
3147 echo " Trying '$UNAME_MACHINE'..."
3149 CFG_HOST_ARCH="$UNAME_MACHINE"
3154 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3155 if [ -n "$CFG_ARCH" ]; then
3156 CFG_EMBEDDED=$CFG_ARCH
3159 case "$CFG_EMBEDDED" in
3182 CFG_ARCH="$CFG_EMBEDDED"
3185 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3186 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3187 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3189 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3190 CFG_ARCH=$CFG_HOST_ARCH
3197 # previously, armv6 was a different arch
3203 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3204 if [ "$OPT_VERBOSE" = "yes" ]; then
3205 echo " '$CFG_ARCH' is supported"
3208 if [ "$OPT_VERBOSE" = "yes" ]; then
3209 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3213 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3214 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3215 if [ "$OPT_VERBOSE" = "yes" ]; then
3216 echo " '$CFG_HOST_ARCH' is supported"
3219 if [ "$OPT_VERBOSE" = "yes" ]; then
3220 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3222 CFG_HOST_ARCH=generic
3226 if [ "$OPT_VERBOSE" = "yes" ]; then
3227 echo "System architecture: '$CFG_ARCH'"
3228 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3229 echo "Host architecture: '$CFG_HOST_ARCH'"
3233 #-------------------------------------------------------------------------------
3234 # tests that don't need qmake (must be run before displaying help)
3235 #-------------------------------------------------------------------------------
3237 # detect build style
3238 if [ "$CFG_DEBUG" = "auto" ]; then
3239 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3240 CFG_DEBUG_RELEASE=yes
3242 elif [ "$CFG_DEV" = "yes" ]; then
3243 CFG_DEBUG_RELEASE=no
3246 CFG_DEBUG_RELEASE=no
3250 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3251 QMAKE_CONFIG="$QMAKE_CONFIG build_all"
3254 if [ -z "$PKG_CONFIG" ]; then
3255 # See if PKG_CONFIG is set in the mkspec:
3256 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3258 if [ -z "$PKG_CONFIG" ]; then
3259 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3262 # Work out if we can use pkg-config
3263 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3264 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3266 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3267 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3268 echo >&2 "environment!"
3270 if [ -z "$PKG_CONFIG_PATH" ]; then
3272 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3273 echo >&2 "the host compiler's .pc files will be used. This is probably"
3274 echo >&2 "not what you want."
3276 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3278 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3279 echo >&2 "been set. This means your toolchain's .pc files must contain"
3280 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3281 echo >&2 "tests are failing, please check these files."
3286 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3287 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3288 echo >&2 "dependencies"
3294 # process CFG_MAC_ARCHS
3295 if [ "$PLATFORM_MAC" = "yes" ]; then
3296 # check -arch arguments for validity.
3297 ALLOWED="x86 ppc x86_64 ppc64 i386"
3298 # Save the list so we can re-write it using only valid values
3299 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3301 for i in $CFG_MAC_ARCHS_IN
3303 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3304 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3307 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3308 # These are synonymous values
3309 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3310 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3311 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3313 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3314 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3319 # pass on $CFG_SDK to the configure tests.
3320 if [ '!' -z "$CFG_SDK" ]; then
3321 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3324 # find the default framework value
3325 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3326 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3327 CFG_FRAMEWORK="$CFG_SHARED"
3328 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3330 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3338 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3339 TEST_COMPILER="$CXX"
3341 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3342 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3343 #for Symbian we don't need this checking
3344 if [ -z "$TEST_COMPILER" ]; then
3345 echo "ERROR: Cannot set the compiler for the configuration tests"
3350 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3351 TEST_COMPILER="nacl-gcc"
3355 if [ -n "$CFG_SYSROOT" ]; then
3356 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3357 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3358 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3360 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3364 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3366 # auto-detect precompiled header support
3367 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3368 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3370 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3375 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3377 echo "WARNING: Using universal binaries disables precompiled headers."
3382 #auto-detect DWARF2 on the mac
3383 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3384 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3391 # auto-detect support for -Xarch on the mac
3392 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3393 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3400 # don't autodetect support for separate debug info on objcopy when
3401 # cross-compiling as lots of toolchains seems to have problems with this
3402 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3403 CFG_SEPARATE_DEBUG_INFO="no"
3406 # auto-detect support for separate debug info in objcopy
3407 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3408 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3409 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3410 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3411 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3412 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3413 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3414 CFG_SEPARATE_DEBUG_INFO=no
3418 # binutils on HP-UX is buggy; default to no.
3419 CFG_SEPARATE_DEBUG_INFO=no
3422 CFG_SEPARATE_DEBUG_INFO=yes
3428 # auto-detect -fvisibility support
3429 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3430 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3431 CFG_REDUCE_EXPORTS=no
3433 CFG_REDUCE_EXPORTS=yes
3437 # detect the availability of the -Bsymbolic-functions linker optimization
3438 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3439 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3440 CFG_REDUCE_RELOCATIONS=no
3442 CFG_REDUCE_RELOCATIONS=yes
3446 # auto-detect GNU make support
3447 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3451 # If -opengl wasn't specified, don't try to auto-detect
3452 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3457 if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
3458 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3463 # find the default framework value
3464 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3465 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3466 CFG_FRAMEWORK="$CFG_SHARED"
3467 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3469 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3477 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3478 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3479 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3480 # get the darwin version. 10.0.0 and up means snow leopard.
3481 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3482 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3484 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3489 # x11 tests are done after qmake is built
3492 #setup the build parts
3493 if [ -z "$CFG_BUILD_PARTS" ]; then
3494 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3496 # don't build tools by default when cross-compiling
3497 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3498 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3501 for nobuild in $CFG_NOBUILD_PARTS; do
3502 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3504 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3506 # echo "WARNING: libs is a required part of the build."
3508 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3511 #-------------------------------------------------------------------------------
3512 # post process QT_INSTALL_* variables
3513 #-------------------------------------------------------------------------------
3516 if [ -z "$QT_INSTALL_PREFIX" ]; then
3517 if [ "$CFG_DEV" = "yes" ]; then
3518 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3519 elif [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3520 if [ "$PLATFORM_QPA" = "yes" ]; then
3521 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtLighthouse-${QT_VERSION}"
3523 QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3525 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3526 QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3528 elif [ -d "$EPOCROOT" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3529 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3530 QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
3531 QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
3534 QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3537 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3539 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3540 [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
3541 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
3542 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
3543 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS=
3544 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS=
3545 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="\\\\resource\\\\qt$QT_LIBINFIX\\\\plugins"
3546 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="\\\\resource\\\\qt$QT_LIBINFIX\\\\imports"
3547 [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA=
3548 [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations"
3549 [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS=
3550 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES=
3553 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3554 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3555 if [ "$PLATFORM_MAC" = "yes" ]; then
3556 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3559 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3562 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3565 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3566 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3567 if [ "$PLATFORM_MAC" = "yes" ]; then
3568 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3573 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3576 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3579 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3580 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3581 if [ "$PLATFORM_MAC" = "yes" ]; then
3582 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3583 QT_INSTALL_LIBS="/Libraries/Frameworks"
3587 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3589 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3592 if [ -z "$QT_INSTALL_BINS" ]; then #default
3593 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3594 if [ "$PLATFORM_MAC" = "yes" ]; then
3595 QT_INSTALL_BINS="/Developer/Applications/Qt"
3598 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3601 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3604 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3605 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3606 if [ "$PLATFORM_MAC" = "yes" ]; then
3607 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3610 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3612 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3615 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3616 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3617 if [ "$PLATFORM_MAC" = "yes" ]; then
3618 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3621 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3623 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3626 if [ -z "$QT_INSTALL_DATA" ]; then #default
3627 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3629 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3632 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3633 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3635 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3638 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3639 if [ "$PLATFORM_MAC" = "yes" ]; then
3640 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3642 QT_INSTALL_SETTINGS=/etc/xdg
3645 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3648 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3649 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3650 if [ "$PLATFORM_MAC" = "yes" ]; then
3651 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3654 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3656 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3659 #-------------------------------------------------------------------------------
3660 # help - interactive parts of the script _after_ this section please
3661 #-------------------------------------------------------------------------------
3663 # next, emit a usage message if something failed.
3664 if [ "$OPT_HELP" = "yes" ]; then
3665 [ "x$ERROR" = "xyes" ] && echo
3666 if [ "$CFG_NIS" = "no" ]; then
3673 if [ "$CFG_CUPS" = "no" ]; then
3680 if [ "$CFG_ICONV" = "no" ]; then
3687 if [ "$CFG_LARGEFILE" = "no" ]; then
3694 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3701 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3709 if [ "$CFG_XCB" = "no" ]; then
3718 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3719 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3720 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3721 [-release] [-debug] [-debug-and-release]
3722 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3723 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3724 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3725 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3726 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3727 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3728 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3729 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3730 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3731 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3732 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3733 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3734 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3735 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3736 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3737 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3738 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3739 [-no-openssl] [-openssl] [-openssl-linked]
3740 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3741 [-no-javascript-jit] [-javascript-jit]
3742 [-no-script] [-script] [-no-scripttools] [-scripttools]
3743 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3744 [-no-location] [-location]
3745 [additional platform specific options (see below)]
3748 Installation options:
3750 -qpa ................ This will enable the QPA build.
3751 QPA is a window system agnostic implementation of Qt.
3753 These are optional, but you may specify install directories.
3755 -prefix <dir> ...... This will install everything relative to <dir>
3756 (default $QT_INSTALL_PREFIX)
3758 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3761 -hostprefix [dir] .. Tools and libraries needed when developing
3762 applications are installed in [dir]. If [dir] is
3763 not given, the current build directory will be used.
3768 * -prefix-install .... Force a sandboxed "local" installation of
3769 Qt. This will install into
3770 $QT_INSTALL_PREFIX, if this option is
3771 disabled then some platforms will attempt a
3772 "system" install by placing default values to
3773 be placed in a system location other than
3776 You may use these to separate different parts of the install:
3778 -bindir <dir> ......... Executables will be installed to <dir>
3779 (default PREFIX/bin)
3780 -libdir <dir> ......... Libraries will be installed to <dir>
3781 (default PREFIX/lib)
3782 -docdir <dir> ......... Documentation will be installed to <dir>
3783 (default PREFIX/doc)
3784 -headerdir <dir> ...... Headers will be installed to <dir>
3785 (default PREFIX/include)
3786 -plugindir <dir> ...... Plugins will be installed to <dir>
3787 (default PREFIX/plugins)
3788 -importdir <dir> ...... Imports for QML will be installed to <dir>
3789 (default PREFIX/imports)
3790 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3792 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3793 (default PREFIX/translations)
3794 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3795 (default PREFIX/etc/settings)
3796 -examplesdir <dir> .... Examples will be installed to <dir>
3797 (default PREFIX/examples)
3801 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3802 that needs to be evaluated. If the evaluation succeeds, the feature is
3803 included. Here is a short explanation of each option:
3805 * -release ........... Compile and link Qt with debugging turned off.
3806 -debug ............. Compile and link Qt with debugging turned on.
3807 -debug-and-release . Compile and link two versions of Qt, with and without
3808 debugging turned on (Mac only).
3810 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3812 -opensource ........ Compile and link the Open-Source Edition of Qt.
3813 -commercial ........ Compile and link the Commercial Edition of Qt.
3816 * -shared ............ Create and use shared Qt libraries.
3817 -static ............ Create and use static Qt libraries.
3819 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3821 -fast .............. Configure Qt quickly by generating Makefiles only for
3822 library and subdirectory targets. All other Makefiles
3823 are created as wrappers, which will in turn run qmake.
3825 -no-largefile ...... Disables large file support.
3826 + -largefile ......... Enables Qt to access files larger than 4 GB.
3829 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3836 if [ "$CFG_DBUS" = "no" ]; then
3845 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3846 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3848 -no-accessibility .. Do not compile Accessibility support.
3849 * -accessibility ..... Compile Accessibility support.
3851 $SHN -no-stl ............ Do not compile STL support.
3852 $SHY -stl ............... Compile STL support.
3854 -no-sql-<driver> ... Disable SQL <driver> entirely.
3855 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3857 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3860 Possible values for <driver>:
3861 [ $CFG_SQL_AVAILABLE ]
3863 -system-sqlite ..... Use sqlite from the operating system.
3865 -no-qt3support ..... Disables the Qt 3 support functionality.
3866 * -qt3support ........ Enables the Qt 3 support functionality.
3868 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3869 + -xmlpatterns ....... Build the QtXmlPatterns module.
3870 QtXmlPatterns is built if a decent C++ compiler
3871 is used and exceptions are enabled.
3873 -no-multimedia ..... Do not build the QtMultimedia module.
3874 + -multimedia ........ Build the QtMultimedia module.
3876 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3877 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3879 -no-phonon ......... Do not build the Phonon module.
3880 + -phonon ............ Build the Phonon module.
3881 Phonon is built if a decent C++ compiler is used.
3882 -no-phonon-backend.. Do not build the platform phonon plugin.
3883 + -phonon-backend..... Build the platform phonon plugin.
3885 -no-svg ............ Do not build the SVG module.
3886 + -svg ............... Build the SVG module.
3888 -no-webkit ......... Do not build the WebKit module.
3889 + -webkit ............ Build the WebKit module.
3890 WebKit is built if a decent C++ compiler is used.
3891 -webkit-debug ...... Build the WebKit module with debug symbols.
3893 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3894 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3896 -no-script ......... Do not build the QtScript module.
3897 + -script ............ Build the QtScript module.
3899 -no-scripttools .... Do not build the QtScriptTools module.
3900 + -scripttools ....... Build the QtScriptTools module.
3902 -no-v8 ............. Do not build the V8 module.
3903 + -v8 ................ Build the V8 module.
3905 -no-declarative ..... Do not build the declarative module.
3906 + -declarative ....... Build the declarative module.
3908 -no-declarative-debug ..... Do not build the declarative debugging support.
3909 + -declarative-debug ....... Build the declarative debugging support.
3911 -no-location ....... Do not build the QtLocation module.
3912 + -location .......... Build the QtLocation module.
3914 -platform target ... The operating system and compiler you are building
3917 See the README file for a list of supported
3918 operating systems and compilers.
3921 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3923 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3924 raster - Software rasterizer
3925 opengl - Rendering via OpenGL, Experimental!
3926 openvg - Rendering via OpenVG, Experimental!
3933 -no-mmx ............ Do not compile with use of MMX instructions.
3934 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3935 -no-sse ............ Do not compile with use of SSE instructions.
3936 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3937 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3938 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3939 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3940 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3941 -no-avx ............ Do not compile with use of AVX instructions.
3942 -no-neon ........... Do not compile with use of NEON instructions.
3944 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3945 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3947 -D <string> ........ Add an explicit define to the preprocessor.
3948 -I <string> ........ Add an explicit include path.
3949 -L <string> ........ Add an explicit library path.
3951 -help, -h .......... Display this information.
3953 Third Party Libraries:
3955 -qt-zlib ........... Use the zlib bundled with Qt.
3956 + -system-zlib ....... Use zlib from the operating system.
3957 See http://www.gzip.org/zlib
3959 -no-gif ............ Do not compile GIF reading support.
3961 -no-libtiff ........ Do not compile TIFF support.
3962 -qt-libtiff ........ Use the libtiff bundled with Qt.
3963 + -system-libtiff .... Use libtiff from the operating system.
3964 See http://www.libtiff.org
3966 -no-libpng ......... Do not compile PNG support.
3967 -qt-libpng ......... Use the libpng bundled with Qt.
3968 + -system-libpng ..... Use libpng from the operating system.
3969 See http://www.libpng.org/pub/png
3971 -no-libmng ......... Do not compile MNG support.
3972 -qt-libmng ......... Use the libmng bundled with Qt.
3973 + -system-libmng ..... Use libmng from the operating system.
3974 See http://www.libmng.com
3976 -no-libjpeg ........ Do not compile JPEG support.
3977 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3978 + -system-libjpeg .... Use libjpeg from the operating system.
3979 See http://www.ijg.org
3981 -no-openssl ........ Do not compile support for OpenSSL.
3982 + -openssl ........... Enable run-time OpenSSL support.
3983 -openssl-linked .... Enabled linked OpenSSL support.
3985 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3990 -make <part> ....... Add part to the list of parts to be built at make time.
3991 ($QT_DEFAULT_BUILD_PARTS)
3992 -nomake <part> ..... Exclude part from the list of parts to be built.
3994 -R <string> ........ Add an explicit runtime library path to the Qt
3996 -l <string> ........ Add an explicit library.
3998 -no-rpath .......... Do not use the library install path as a runtime
4000 + -rpath ............. Link Qt libraries and executables using the library
4001 install path as a runtime library path. Equivalent
4002 to -R install_libpath
4004 -continue .......... Continue as far as possible if an error occurs.
4006 -verbose, -v ....... Print verbose information about each step of the
4009 -silent ............ Reduce the build output so that warnings and errors
4010 can be seen more easily.
4012 * -no-optimized-qmake ... Do not build qmake optimized.
4013 -optimized-qmake ...... Build qmake optimized.
4015 -no-gui ............ Don't build the Qt GUI library
4017 $NSN -no-nis ............ Do not compile NIS support.
4018 $NSY -nis ............... Compile NIS support.
4020 $CUN -no-cups ........... Do not compile CUPS support.
4021 $CUY -cups .............. Compile CUPS support.
4022 Requires cups/cups.h and libcups.so.2.
4024 $CIN -no-iconv .......... Do not compile support for iconv(3).
4025 $CIY -iconv ............. Compile support for iconv(3).
4027 $PHN -no-pch ............ Do not use precompiled header support.
4028 $PHY -pch ............... Use precompiled header support.
4030 $DBN -no-dbus ........... Do not compile the QtDBus module.
4031 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
4032 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
4034 -reduce-relocations ..... Reduce relocations in the libraries through extra
4035 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
4036 experimental; needs GNU ld >= 2.18).
4039 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
4040 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
4047 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4055 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4059 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4060 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4062 $XKN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
4063 $XKY -xcb ............... Compile Xcb support.
4069 if [ "$PLATFORM_X11" = "yes" ]; then
4070 if [ "$CFG_SM" = "no" ]; then
4077 if [ "$CFG_XSHAPE" = "no" ]; then
4084 if [ "$CFG_XVIDEO" = "no" ]; then
4091 if [ "$CFG_XINERAMA" = "no" ]; then
4098 if [ "$CFG_FONTCONFIG" = "no" ]; then
4105 if [ "$CFG_XCURSOR" = "no" ]; then
4112 if [ "$CFG_XFIXES" = "no" ]; then
4119 if [ "$CFG_XRANDR" = "no" ]; then
4126 if [ "$CFG_XRENDER" = "no" ]; then
4133 if [ "$CFG_MITSHM" = "no" ]; then
4140 if [ "$CFG_XINPUT" = "no" ]; then
4147 if [ "$CFG_XKB" = "no" ]; then
4154 if [ "$CFG_IM" = "no" ]; then
4165 -no-gtkstyle ....... Do not build the GTK theme integration.
4166 + -gtkstyle .......... Build the GTK theme integration.
4168 * -no-nas-sound ...... Do not compile in NAS sound support.
4169 -system-nas-sound .. Use NAS libaudio from the operating system.
4170 See http://radscan.com/nas.html
4172 -egl ............... Use EGL instead of GLX to manage contexts.
4173 When building for desktop OpenGL, this option will
4174 make Qt use EGL to manage contexts rather than the
4175 GLX, which is the default. Note: For OpenGL ES, EGL
4178 -no-opengl ......... Do not support OpenGL.
4179 + -opengl <api> ...... Enable OpenGL support.
4180 With no parameter, this will auto-detect the "best"
4181 OpenGL API to use. If desktop OpenGL is available, it
4182 will be used. Use desktop, es1, or es2 for <api>
4183 to force the use of the Desktop (OpenGL 1.x or 2.x),
4184 OpenGL ES 1.x Common profile, or 2.x APIs instead.
4186 -no-openvg ........ Do not support OpenVG.
4187 + -openvg ........... Enable OpenVG support.
4188 Requires EGL support, typically supplied by an OpenGL
4189 or other graphics implementation.
4191 $SMN -no-sm ............. Do not support X Session Management.
4192 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4194 $SHN -no-xshape ......... Do not compile XShape support.
4195 $SHY -xshape ............ Compile XShape support.
4196 Requires X11/extensions/shape.h.
4198 $XVN -no-xvideo ......... Do not compile XVideo support.
4199 $XVY -xvideo ............ Compile XVideo support.
4200 Requires X11/extensions/Xv.h & Xvlib.h.
4202 $SHN -no-xsync .......... Do not compile XSync support.
4203 $SHY -xsync ............. Compile XSync support.
4204 Requires X11/extensions/sync.h.
4206 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4207 $XAY -xinerama .......... Compile Xinerama support.
4208 Requires X11/extensions/Xinerama.h and libXinerama.
4209 By default, Xinerama support will be compiled if
4210 available and the shared libraries are dynamically
4213 $XCN -no-xcursor ........ Do not compile Xcursor support.
4214 $XCY -xcursor ........... Compile Xcursor support.
4215 Requires X11/Xcursor/Xcursor.h and libXcursor.
4216 By default, Xcursor support will be compiled if
4217 available and the shared libraries are dynamically
4220 $XFN -no-xfixes ......... Do not compile Xfixes support.
4221 $XFY -xfixes ............ Compile Xfixes support.
4222 Requires X11/extensions/Xfixes.h and libXfixes.
4223 By default, Xfixes support will be compiled if
4224 available and the shared libraries are dynamically
4227 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4228 $XZY -xrandr ............ Compile Xrandr support.
4229 Requires X11/extensions/Xrandr.h and libXrandr.
4231 $XRN -no-xrender ........ Do not compile Xrender support.
4232 $XRY -xrender ........... Compile Xrender support.
4233 Requires X11/extensions/Xrender.h and libXrender.
4235 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4236 $XMY -mitshm ............ Compile MIT-SHM support.
4237 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4239 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4240 $FCGY -fontconfig ........ Compile FontConfig support.
4241 Requires fontconfig/fontconfig.h, libfontconfig,
4242 freetype.h and libfreetype.
4244 $XIN -no-xinput ......... Do not compile Xinput support.
4245 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4246 which requires IRIX with wacom.h and libXi or
4247 XFree86 with X11/extensions/XInput.h and libXi.
4249 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4250 $XKY -xkb ............... Compile XKB support.
4255 if [ "$PLATFORM_MAC" = "yes" ]; then
4260 -Fstring ........... Add an explicit framework path.
4261 -fw string ......... Add an explicit framework.
4263 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4265 -carbon .............Build the Carbon version of Qt. 64-bit archs
4266 are not supported by carbon and will be built
4269 * -framework ......... Build Qt as a series of frameworks and
4270 link tools against those frameworks.
4271 -no-framework ...... Do not build Qt as a series of frameworks.
4273 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4274 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4276 -universal ......... Equivalent to -arch "ppc x86"
4278 -arch <arch> ....... Build Qt for <arch>
4279 Example values for <arch>: x86 ppc x86_64 ppc64
4280 Multiple -arch arguments can be specified.
4282 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4283 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4285 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4286 It is only available to Cocoa builds.
4287 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4288 QT_ENABLE_HARFBUZZ environment variable.
4293 if [ "$PLATFORM_QWS" = "yes" ]; then
4295 Qt for Embedded Linux:
4297 -embedded <arch> .... This will enable the embedded build, you must have a
4298 proper license for this switch to work.
4299 Example values for <arch>: arm mips x86 generic
4303 if [ "$PLATFORM_QPA" = "yes" ]; then
4309 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4312 -xplatform target ... The target platform when cross-compiling.
4314 -no-feature-<feature> Do not compile in <feature>.
4315 -feature-<feature> .. Compile in <feature>. The available features
4316 are described in src/corelib/global/qfeatures.txt
4318 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4319 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4321 The floating point format is usually autodetected by configure. Use this
4322 to override the detected value.
4324 -little-endian ...... Target platform is little endian (LSB first).
4325 -big-endian ......... Target platform is big endian (MSB first).
4327 -host-little-endian . Host platform is little endian (LSB first).
4328 -host-big-endian .... Host platform is big endian (MSB first).
4330 You only need to specify the endianness when
4331 cross-compiling, otherwise the host
4332 endianness will be used.
4334 -no-freetype ........ Do not compile in Freetype2 support.
4335 -qt-freetype ........ Use the libfreetype bundled with Qt.
4336 * -system-freetype .... Use libfreetype from the operating system.
4337 See http://www.freetype.org/
4339 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4340 default ($CFG_QCONFIG).
4342 -no-opengl .......... Do not support OpenGL.
4343 -opengl <api> ....... Enable OpenGL ES support
4344 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
4345 or 2.x, or regular desktop OpenGL.
4346 Use es1 or es2 for <api> to override auto-detection.
4350 if [ "$PLATFORM_QWS" = "yes" ]; then
4353 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4354 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4356 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4357 by default all available decorations are on.
4358 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4359 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4360 linked to at run time.
4361 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4362 -no-decoration-<style> ....Disable decoration <style> entirely.
4363 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4365 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4366 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4367 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4368 linked to at run time.
4369 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4370 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4371 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4373 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4374 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4376 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4378 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4380 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4381 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4383 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4384 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4385 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4387 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4388 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4389 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4391 -iwmmxt ............ Compile using the iWMMXt instruction set
4392 (available on some XScale CPUs).
4396 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4397 if [ "$CFG_GLIB" = "no" ]; then
4405 $GBN -no-glib ........... Do not compile Glib support.
4406 $GBY -glib .............. Compile Glib support.
4411 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
4414 Qt for Symbian only:
4415 -no-s60 ............ Do not compile in S60 support.
4416 + -s60 ............... Compile with support for the S60 UI Framework.
4417 -no-style-s60....... Disable s60 style
4418 + -qt-style-s60....... Enable s60 style in the Qt Library
4420 -no-usedeffiles .... Disable the usage of DEF files.
4421 * -usedeffiles ....... Enable the usage of DEF files.
4424 [ "x$ERROR" = "xyes" ] && exit 1
4429 # -----------------------------------------------------------------------------
4430 # LICENSING, INTERACTIVE PART
4431 # -----------------------------------------------------------------------------
4433 if [ "$PLATFORM_QWS" = "yes" ]; then
4434 Platform="Qt for Embedded Linux"
4435 elif [ "$PLATFORM_QPA" = "yes" ]; then
4436 Platform="Qt Lighthouse"
4437 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
4438 Platform="Qt for Symbian"
4439 elif [ "$PLATFORM_MAC" = "yes" ]; then
4440 Platform="Qt for Mac OS X"
4441 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4442 Platform="Qt for Windows"
4443 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4445 Platform="Qt for Linux/X11"
4449 echo "This is the $Platform ${EditionString} Edition."
4452 if [ "$Edition" = "NokiaInternalBuild" ]; then
4453 echo "Detected -nokia-developer option"
4454 echo "Nokia employees and agents are allowed to use this software under"
4455 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4456 elif [ "$Edition" = "OpenSource" ]; then
4458 echo "You are licensed to use this software under the terms of"
4459 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4460 if [ -f "$relpath/LICENSE.GPL3" ]; then
4461 echo "You are also licensed to use this software under the terms of"
4462 echo "the GNU General Public License (GPL) versions 3."
4468 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4469 echo "You have already accepted the terms of the $LicenseType license."
4472 if [ -f "$relpath/LICENSE.GPL3" ]; then
4473 echo "Type '3' to view the GNU General Public License version 3."
4475 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4476 echo "Type 'yes' to accept this license offer."
4477 echo "Type 'no' to decline this license offer."
4479 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4483 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4485 elif [ "$acceptance" = "no" ]; then
4486 echo "You are not licensed to use this software."
4489 elif [ "$acceptance" = "3" ]; then
4490 more "$relpath/LICENSE.GPL3"
4491 elif [ "$acceptance" = "L" ]; then
4492 more "$relpath/LICENSE.LGPL"
4495 elif [ "$Edition" = "Preview" ]; then
4496 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4499 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4500 echo "You have already accepted the terms of the $LicenseType license."
4503 echo "You are licensed to use this software under the terms of"
4504 echo "the $TheLicense"
4506 echo "Type '?' to read the Preview License."
4507 echo "Type 'yes' to accept this license offer."
4508 echo "Type 'no' to decline this license offer."
4510 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4514 if [ "$acceptance" = "yes" ]; then
4516 elif [ "$acceptance" = "no" ] ;then
4517 echo "You are not licensed to use this software."
4520 elif [ "$acceptance" = "?" ]; then
4521 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4524 elif [ "$Edition" != "OpenSource" ]; then
4525 if [ -n "$ExpiryDate" ]; then
4526 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4527 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4528 Today=`date +%Y%m%d`
4529 if [ "$Today" -gt "$ExpiryDate" ]; then
4530 case "$LicenseType" in
4531 Commercial|Academic|Educational)
4532 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4534 echo "NOTICE NOTICE NOTICE NOTICE"
4536 echo " Your support and upgrade period has expired."
4538 echo " You are no longer licensed to use this version of Qt."
4539 echo " Please contact qt-info@nokia.com to renew your support"
4540 echo " and upgrades for this license."
4542 echo "NOTICE NOTICE NOTICE NOTICE"
4547 echo "WARNING WARNING WARNING WARNING"
4549 echo " Your support and upgrade period has expired."
4551 echo " You may continue to use your last licensed release"
4552 echo " of Qt under the terms of your existing license"
4553 echo " agreement. But you are not entitled to technical"
4554 echo " support, nor are you entitled to use any more recent"
4555 echo " Qt releases."
4557 echo " Please contact qt-info@nokia.com to renew your"
4558 echo " support and upgrades for this license."
4560 echo "WARNING WARNING WARNING WARNING"
4567 echo "NOTICE NOTICE NOTICE NOTICE"
4569 echo " Your Evaluation license has expired."
4571 echo " You are no longer licensed to use this software. Please"
4572 echo " contact qt-info@nokia.com to purchase license, or install"
4573 echo " the Qt Open Source Edition if you intend to develop free"
4576 echo "NOTICE NOTICE NOTICE NOTICE"
4583 TheLicense=`head -n 1 "$outpath/LICENSE"`
4585 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4586 echo "You have already accepted the terms of the $TheLicense."
4589 echo "You are licensed to use this software under the terms of"
4590 echo "the $TheLicense."
4592 echo "Type '?' to view the $TheLicense."
4593 echo "Type 'yes' to accept this license offer."
4594 echo "Type 'no' to decline this license offer."
4596 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4600 if [ "$acceptance" = "yes" ]; then
4602 elif [ "$acceptance" = "no" ]; then
4603 echo "You are not licensed to use this software."
4606 else [ "$acceptance" = "?" ]
4607 more "$outpath/LICENSE"
4612 # this should be moved somewhere else
4615 AIX_VERSION=`uname -v`
4616 if [ "$AIX_VERSION" -lt "5" ]; then
4617 QMakeVar add QMAKE_LIBS_X11 -lbind
4624 #-------------------------------------------------------------------------------
4625 # generate qconfig.cpp
4626 #-------------------------------------------------------------------------------
4627 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4629 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4630 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4631 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4632 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4633 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4634 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4635 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4636 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4637 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4638 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4639 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4640 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4641 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4643 TODAY=`date +%Y-%m-%d`
4644 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4646 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4647 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4649 /* Installation date */
4650 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4654 if [ ! -z "$QT_HOST_PREFIX" ]; then
4655 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4656 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4657 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4658 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4659 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4660 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4661 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4662 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4663 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4664 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4665 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4667 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4669 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4670 /* Installation Info */
4671 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4672 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4673 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4674 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4675 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4676 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4677 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4678 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4679 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4680 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4681 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4682 #else // QT_BOOTSTRAPPED
4686 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4687 /* Installation Info */
4688 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4689 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4690 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4691 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4692 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4693 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4694 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4695 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4696 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4697 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4698 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4701 if [ ! -z "$QT_HOST_PREFIX" ]; then
4702 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4703 #endif // QT_BOOTSTRAPPED
4708 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4709 /* strlen( "qt_lcnsxxxx" ) == 12 */
4710 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4711 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4712 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4713 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4714 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4715 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4716 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4717 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4718 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4719 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4720 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4721 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4722 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4725 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4726 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4727 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4729 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4730 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4731 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4734 # -----------------------------------------------------------------------------
4735 if [ "$LicenseType" = "Evaluation" ]; then
4736 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4737 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4738 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4741 if [ -n "$EVALKEY" ]; then
4742 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4743 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4744 /* Evaluation license key */
4745 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4747 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4751 # -----------------------------------------------------------------------------
4753 # -----------------------------------------------------------------------------
4756 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4758 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4759 if [ "$OPT_SHADOW" = "yes" ]; then
4760 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4761 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4762 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4767 # $2: optional transformation
4768 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4769 # is where the resulting variable is written to
4770 # Assumes that the optional transformation produces the same variable name for each hit
4771 setBootstrapVariable()
4773 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4779 valStart = index($0, "=") + 1
4782 if (substr($0, valStart - 2, 1) == "+") {
4786 variable = substr($0, 0, valStart - 2 - append)
4787 value = substr($0, valStart)
4788 gsub("[ \t]+", "", variable)
4789 gsub("^[ \t]+", "", value)
4790 gsub("[ \t]+$", "", value)
4792 if (append == 1 && length(combinedValue) > 0) {
4793 combinedValue = combinedValue " " value
4795 combinedValue = value
4799 if (length(combinedValue) > 0) {
4800 printf "%s = %s\n", variable, combinedValue
4806 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4807 echo "Creating qmake. Please wait..."
4810 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4811 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4812 if [ -f "$QCONFIG_H" ]; then
4813 OLD_QCONFIG_H=$QCONFIG_H
4814 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4817 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4818 # when building qmake, we use #defines for the install paths,
4819 # however they are real functions in the library
4820 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4821 mkdir -p "$outpath/src/corelib/global"
4822 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4823 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4826 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4828 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4829 rm -rf mkspecs/default
4830 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4832 for mkfile in GNUmakefile Makefile; do
4835 in_mkfile="${mkfile}.in"
4836 if [ "$mkfile" = "Makefile" ]; then
4837 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4838 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4840 in_mkfile="${mkfile}.unix"
4842 in_mkfile="$relpath/qmake/$in_mkfile"
4843 mkfile="$outpath/qmake/$mkfile"
4844 if [ -f "$mkfile" ]; then
4845 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4848 [ -f "$in_mkfile" ] || continue
4850 echo "########################################################################" > "$mkfile"
4851 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4852 echo "########################################################################" >> "$mkfile"
4855 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4856 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4857 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4859 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4860 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4863 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4864 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4865 if [ "$CFG_SILENT" = "yes" ]; then
4866 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4867 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4869 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4870 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4872 setBootstrapVariable QMAKE_CFLAGS
4873 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4874 setBootstrapVariable QMAKE_LFLAGS
4876 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4877 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4878 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4880 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4881 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4882 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4883 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4884 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4885 elif [ "$CFG_DEBUG" = "yes" ]; then
4886 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4887 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4888 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4889 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4892 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4893 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4894 for rpath in $RPATH_FLAGS; do
4895 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4898 if [ "$BUILD_ON_MAC" = "yes" ]; then
4899 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4900 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4901 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4902 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4903 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4904 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4905 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4906 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4907 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4908 X86_CFLAGS="-arch i386"
4909 X86_LFLAGS="-arch i386"
4910 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4911 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4912 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4914 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4915 PPC_CFLAGS="-arch ppc"
4916 PPC_LFLAGS="-arch ppc"
4917 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4918 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4919 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4921 if [ '!' -z "$CFG_SDK" ]; then
4922 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4923 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4924 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4925 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4926 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4929 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4930 if [ '!' -z "$D_FLAGS" ]; then
4931 for DEF in $D_FLAGS; do
4932 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4935 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4936 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4937 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4938 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4940 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4941 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4942 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4943 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4944 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4945 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4946 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4947 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4948 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4949 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4951 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4952 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4953 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4954 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4959 QMAKE_BUILD_ERROR=no
4960 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4961 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4962 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4963 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4966 #-------------------------------------------------------------------------------
4967 # tests that need qmake
4968 #-------------------------------------------------------------------------------
4970 # detect availability of float math.h functions
4971 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4972 CFG_USE_FLOATMATH=yes
4974 CFG_USE_FLOATMATH=no
4977 # detect mmx support
4978 if [ "${CFG_MMX}" = "auto" ]; then
4979 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4986 # detect 3dnow support
4987 if [ "${CFG_3DNOW}" = "auto" ]; then
4988 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4995 # detect sse support
4996 if [ "${CFG_SSE}" = "auto" ]; then
4997 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
5004 # detect sse2 support
5005 if [ "${CFG_SSE2}" = "auto" ]; then
5006 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
5013 # detect sse3 support
5014 if [ "${CFG_SSE3}" = "auto" ]; then
5015 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
5022 # detect ssse3 support
5023 if [ "${CFG_SSSE3}" = "auto" ]; then
5024 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
5031 # detect sse4.1 support
5032 if [ "${CFG_SSE4_1}" = "auto" ]; then
5033 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
5040 # detect sse4.2 support
5041 if [ "${CFG_SSE4_2}" = "auto" ]; then
5042 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
5049 # detect avx support
5050 if [ "${CFG_AVX}" = "auto" ]; then
5051 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5058 # check iWMMXt support
5059 if [ "$CFG_IWMMXT" = "yes" ]; then
5060 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5061 if [ $? != "0" ]; then
5062 echo "The iWMMXt functionality test failed!"
5063 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5068 # detect neon support
5069 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5070 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
5077 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5079 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5080 QMakeVar set styles "windows s60" #overwrite previous default
5084 if [ "$CFG_LARGEFILE" = auto ]; then
5087 if [ "$CFG_PHONON" = auto ]; then
5091 if test -z "$EPOCROOT"; then
5092 echo "Please export EPOCROOT. It should point to the sdk install dir"
5095 if test ! -d "$EPOCROOT/epoc32"; then
5096 echo "Could not find the 'epoc32' dir in your EPOCROOT."
5100 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
5101 # Raptor does not support configure tests.
5103 # the main commands needed to compile;
5104 (mkdir -p config.tests/symbian/rcomp
5105 cd config.tests/symbian/rcomp
5106 rm -f rcomp_test.rsg
5107 touch rcomp_test.rpp rcomp_test.rsc rcomp_test.rss
5108 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
5109 if test ! -f rcomp_test.rsg; then
5110 echo "Finding a working rcomp in your PATH failed."
5111 echo "Fatal error. Make sure you have the epoc tools working and in your PATH";
5116 # compile a simple main that uses printf
5117 if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS
5119 echo "Testing your compiler failed. Could not compile a simple application."
5120 echo "Fatal error; Rerun configure with -verbose to get more details."
5127 if [ "$CFG_ZLIB" = "no" ]; then
5128 # Note: Qt no longer support builds without zlib
5129 # So we force a "no" to be "auto" here.
5130 # If you REALLY really need no zlib support, you can still disable
5131 # it by doing the following:
5132 # add "no-zlib" to mkspecs/qconfig.pri
5133 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5135 # There's no guarantee that Qt will build under those conditions
5140 if [ "$CFG_ZLIB" = "auto" ]; then
5141 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
5148 if [ "$CFG_LARGEFILE" = "auto" ]; then
5149 #Large files should be enabled for all Linux systems
5154 if [ "$CFG_S60" = "auto" ]; then
5155 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5162 if [ "$CFG_QS60STYLE" = "auto" ]; then
5163 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5170 if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then
5171 # elf2e32 crashes when using def files together with gcce.
5172 if [ "$XPLATFORM_SYMBIAN" = "yes" ] && [ "$CFG_DEV" = "no" ] && [ "$XPLATFORM" != "symbian-gcce" ]; then
5173 CFG_SYMBIAN_DEFFILES=yes
5175 CFG_SYMBIAN_DEFFILES=no
5179 # detect how jpeg should be built
5180 if [ "$CFG_JPEG" = "auto" ]; then
5181 if [ "$CFG_SHARED" = "yes" ]; then
5188 if [ "$CFG_LIBJPEG" = "auto" ]; then
5189 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
5196 # detect how gif should be built
5197 if [ "$CFG_GIF" = "auto" ]; then
5198 if [ "$CFG_SHARED" = "yes" ]; then
5205 # detect how tiff should be built
5206 if [ "$CFG_TIFF" = "auto" ]; then
5207 if [ "$CFG_SHARED" = "yes" ]; then
5215 if [ "$CFG_LIBTIFF" = "auto" ]; then
5216 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
5223 # detect how mng should be built
5224 if [ "$CFG_MNG" = "auto" ]; then
5225 if [ "$CFG_SHARED" = "yes" ]; then
5232 if [ "$CFG_LIBMNG" = "auto" ]; then
5233 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
5241 if [ "$CFG_LIBPNG" = "auto" ]; then
5242 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
5249 # detect accessibility
5250 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5251 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5252 # accessibility is currently unsupported
5253 CFG_ACCESSIBILITY=no
5255 CFG_ACCESSIBILITY=yes
5259 # auto-detect SQL-modules support
5260 for _SQLDR in $CFG_SQL_AVAILABLE; do
5263 if [ "$CFG_SQL_mysql" != "no" ]; then
5264 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5265 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5266 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5267 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5268 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5269 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5270 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5272 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5273 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5274 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5275 echo " You need MySql 4 or higher."
5276 echo " If you believe this message is in error you may use the continue"
5277 echo " switch (-continue) to $0 to continue."
5282 QT_LFLAGS_MYSQL_R=""
5286 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
5287 QMakeVar add CONFIG use_libmysqlclient_r
5288 if [ "$CFG_SQL_mysql" = "auto" ]; then
5289 CFG_SQL_mysql=plugin
5291 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5292 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
5293 if [ "$CFG_SQL_mysql" = "auto" ]; then
5294 CFG_SQL_mysql=plugin
5297 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5298 echo "MySQL support cannot be enabled due to functionality tests!"
5299 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5300 echo " If you believe this message is in error you may use the continue"
5301 echo " switch (-continue) to $0 to continue."
5306 QT_LFLAGS_MYSQL_R=""
5314 if [ "$CFG_SQL_psql" != "no" ]; then
5315 # Be careful not to use native pg_config when cross building.
5316 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5317 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5318 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5320 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5321 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5322 # But, respect PSQL_LIBS if set
5323 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5324 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
5325 if [ "$CFG_SQL_psql" = "auto" ]; then
5329 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5330 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5331 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5332 echo " If you believe this message is in error you may use the continue"
5333 echo " switch (-continue) to $0 to continue."
5344 if [ "$CFG_SQL_odbc" != "no" ]; then
5345 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
5346 if [ "$CFG_SQL_odbc" = "auto" ]; then
5350 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
5351 QT_LFLAGS_ODBC="-liodbc"
5352 if [ "$CFG_SQL_odbc" = "auto" ]; then
5356 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5357 echo "ODBC support cannot be enabled due to functionality tests!"
5358 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5359 echo " If you believe this message is in error you may use the continue"
5360 echo " switch (-continue) to $0 to continue."
5370 if [ "$CFG_SQL_oci" != "no" ]; then
5371 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
5372 if [ "$CFG_SQL_oci" = "auto" ]; then
5376 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5377 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5378 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5379 echo " If you believe this message is in error you may use the continue"
5380 echo " switch (-continue) to $0 to continue."
5389 if [ "$CFG_SQL_tds" != "no" ]; then
5390 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5391 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5392 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
5393 if [ "$CFG_SQL_tds" = "auto" ]; then
5397 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5398 echo "TDS support cannot be enabled due to functionality tests!"
5399 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5400 echo " If you believe this message is in error you may use the continue"
5401 echo " switch (-continue) to $0 to continue."
5410 if [ "$CFG_SQL_db2" != "no" ]; then
5411 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
5412 if [ "$CFG_SQL_db2" = "auto" ]; then
5416 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5417 echo "ODBC support cannot be enabled due to functionality tests!"
5418 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5419 echo " If you believe this message is in error you may use the continue"
5420 echo " switch (-continue) to $0 to continue."
5429 if [ "$CFG_SQL_ibase" != "no" ]; then
5430 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
5431 if [ "$CFG_SQL_ibase" = "auto" ]; then
5432 CFG_SQL_ibase=plugin
5435 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5436 echo "InterBase support cannot be enabled due to functionality tests!"
5437 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5438 echo " If you believe this message is in error you may use the continue"
5439 echo " switch (-continue) to $0 to continue."
5448 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5449 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
5450 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5451 CFG_SQL_sqlite2=plugin
5454 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5455 echo "SQLite2 support cannot be enabled due to functionality tests!"
5456 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5457 echo " If you believe this message is in error you may use the continue"
5458 echo " switch (-continue) to $0 to continue."
5467 if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
5468 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5469 # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file and should be marked as driver.
5470 # Configuration parameters should be set
5472 QT_LFLAGS_SQLITE=-lsqlite3
5473 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5476 if [ "$CFG_SQL_sqlite" != "no" ]; then
5477 SQLITE_AUTODETECT_FAILED="no"
5478 if [ "$CFG_SQLITE" = "system" ]; then
5479 if [ -n "$PKG_CONFIG" ]; then
5480 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5481 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5483 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
5484 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5485 CFG_SQL_sqlite=plugin
5487 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5489 SQLITE_AUTODETECT_FAILED="yes"
5492 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5493 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5494 CFG_SQL_sqlite=plugin
5497 SQLITE_AUTODETECT_FAILED="yes"
5501 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5502 echo "SQLite support cannot be enabled due to functionality tests!"
5503 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5504 echo " If you believe this message is in error you may use the continue"
5505 echo " switch (-continue) to $0 to continue."
5511 if [ "$OPT_VERBOSE" = "yes" ]; then
5512 echo "unknown SQL driver: $_SQLDR"
5518 # auto-detect NIS support
5519 if [ "$CFG_NIS" != "no" ]; then
5520 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
5523 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5524 echo "NIS support cannot be enabled due to functionality tests!"
5525 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5526 echo " If you believe this message is in error you may use the continue"
5527 echo " switch (-continue) to $0 to continue."
5535 # auto-detect CUPS support
5536 if [ "$CFG_CUPS" != "no" ]; then
5537 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
5540 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5541 echo "Cups support cannot be enabled due to functionality tests!"
5542 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5543 echo " If you believe this message is in error you may use the continue"
5544 echo " switch (-continue) to $0 to continue."
5552 # auto-detect iconv(3) support
5553 if [ "$CFG_ICONV" != "no" ]; then
5554 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5556 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
5558 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
5560 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
5563 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5564 echo "Iconv support cannot be enabled due to functionality tests!"
5565 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5566 echo " If you believe this message is in error you may use the continue"
5567 echo " switch (-continue) to $0 to continue."
5575 # auto-detect libdbus-1 support
5576 if [ "$CFG_DBUS" != "no" ]; then
5577 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5578 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5579 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5581 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
5582 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5583 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5584 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5586 if [ "$CFG_DBUS" = "auto" ]; then
5588 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5589 # CFG_DBUS is "yes" or "linked" here
5591 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5592 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5593 echo " If you believe this message is in error you may use the continue"
5594 echo " switch (-continue) to $0 to continue."
5600 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5601 CFG_MULTIMEDIA="$CFG_GUI"
5604 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5605 echo "QtMultimedia requested, but it can't be built without QtGui"
5609 # Generate a CRC of the namespace for using in constants for the Carbon port.
5610 # This should mean that you really *can* load two Qt's and have our custom
5611 # Carbon events work.
5612 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5613 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`
5616 # X11/QWS/Lighthouse
5617 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5619 # auto-detect Glib support
5620 if [ "$CFG_GLIB" != "no" ]; then
5621 if [ -n "$PKG_CONFIG" ]; then
5622 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5623 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5625 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
5627 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5628 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5630 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5631 echo "Glib support cannot be enabled due to functionality tests!"
5632 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5633 echo " If you believe this message is in error you may use the continue"
5634 echo " switch (-continue) to $0 to continue."
5642 if [ "$CFG_GUI" = "no" ]; then
5643 if [ "$CFG_PHONON" = "auto" ]; then
5646 if [ "$CFG_PHONON" != "no" ]; then
5647 echo "Phonon enabled, but GUI disabled."
5648 echo " You might need to either enable the GUI or disable Phonon"
5653 # Auto-detect GStreamer support (needed for Phonon)
5654 if [ "$CFG_PHONON" != "no" ]; then
5655 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5656 if [ -n "$PKG_CONFIG" ]; then
5657 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5658 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5660 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
5662 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5663 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5665 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5666 echo "Gstreamer support cannot be enabled due to functionality tests!"
5667 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5668 echo " If you believe this message is in error you may use the continue"
5669 echo " switch (-continue) to $0 to continue."
5675 elif [ "$CFG_GLIB" = "no" ]; then
5682 if [ "$CFG_PHONON" != "no" ]; then
5683 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5684 if [ "$CFG_GSTREAMER" = "yes" ]; then
5687 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5688 echo "Phonon support cannot be enabled due to functionality tests!"
5689 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5690 echo " If you believe this message is in error you may use the continue"
5691 echo " switch (-continue) to $0 to continue."
5702 # auto-detect icd support
5703 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5704 if [ -n "$PKG_CONFIG" ]; then
5705 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5706 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5708 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
5709 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5710 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5711 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5713 if [ "$CFG_ICD" = "auto" ]; then
5715 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5718 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5719 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5720 echo " If you believe this message is in error you may use the continue"
5721 echo " switch (-continue) to $0 to continue."
5725 elif [ "$CFG_GLIB" = "no" ]; then
5729 # auto-detect libicu support
5730 if [ "$CFG_ICU" != "no" ]; then
5731 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5732 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5734 if [ "$CFG_ICU" = "auto" ]; then
5736 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5739 echo "The ICU library support cannot be enabled."
5740 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5741 echo " If you believe this message is in error you may use the continue"
5742 echo " switch (-continue) to $0 to continue."
5748 # Auto-detect PulseAudio support
5749 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5750 if [ -n "$PKG_CONFIG" ]; then
5751 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5752 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5754 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
5756 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5757 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5759 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5760 echo "PulseAudio support cannot be enabled due to functionality tests!"
5761 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5762 echo " If you believe this message is in error you may use the continue"
5763 echo " switch (-continue) to $0 to continue."
5770 fi # X11/QWS/Lighthouse
5773 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5774 x11tests="$relpath/config.tests/x11"
5777 # work around broken X11 headers when using GCC 2.95 or later
5779 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5780 if [ $NOTYPE = "yes" ]; then
5781 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5782 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5785 # Check we actually have X11 :-)
5786 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5787 if [ $? != "0" ]; then
5788 echo "Basic XLib functionality test failed!"
5789 echo " You might need to modify the include and library search paths by editing"
5790 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5795 # X11/MINGW/SYMBIAN OpenGL
5796 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIAN" = "yes" ]; then
5797 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
5798 if [ "$CFG_GUI" = "no" ]; then
5799 if [ "$CFG_OPENGL" = "auto" ]; then
5802 if [ "$CFG_OPENGL" != "no" ]; then
5803 echo "OpenGL enabled, but GUI disabled."
5804 echo " You might need to either enable the GUI or disable OpenGL"
5808 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5809 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
5811 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
5813 if [ "$CFG_EGL" = "no" ]; then
5816 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
5818 if [ "$CFG_EGL" = "no" ]; then
5822 if [ "$CFG_OPENGL" = "yes" ]; then
5823 echo "All the OpenGL functionality tests failed!"
5824 echo " You might need to modify the include and library search paths by editing"
5825 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5826 echo " ${XQMAKESPEC}."
5833 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5834 if [ "$CFG_OPENGL" = "desktop" ]; then
5835 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5836 if [ $? != "0" ]; then
5837 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5844 elif [ "$CFG_OPENGL" = "es1" ]; then
5846 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5847 if [ $? != "0" ]; then
5848 echo "The OpenGL ES 1.x functionality test failed!"
5849 echo " You might need to modify the include and library search paths by editing"
5850 echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
5851 echo " ${XQMAKESPEC}."
5854 elif [ "$CFG_OPENGL" = "es2" ]; then
5856 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5857 if [ $? != "0" ]; then
5858 echo "The OpenGL ES 2.0 functionality test failed!"
5859 echo " You might need to modify the include and library search paths by editing"
5860 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5861 echo " ${XQMAKESPEC}."
5864 elif [ "$CFG_OPENGL" = "desktop" ]; then
5865 # Desktop OpenGL support
5866 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5867 if [ $? != "0" ]; then
5868 echo "The OpenGL functionality test failed!"
5869 echo " You might need to modify the include and library search paths by editing"
5870 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5871 echo " ${XQMAKESPEC}."
5876 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5877 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5878 if [ $? != "0" ]; then
5879 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5887 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5888 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5889 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5890 CFG_GRAPHICS_SYSTEM=default
5892 fi # X11/MINGW OpenGL
5895 if [ "$PLATFORM_X11" = "yes" ]; then
5896 # auto-detect Xcursor support
5897 if [ "$CFG_XCURSOR" != "no" ]; then
5898 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
5899 if [ "$CFG_XCURSOR" != "runtime" ]; then
5903 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5904 echo "Xcursor support cannot be enabled due to functionality tests!"
5905 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5906 echo " If you believe this message is in error you may use the continue"
5907 echo " switch (-continue) to $0 to continue."
5915 # auto-detect Xfixes support
5916 if [ "$CFG_XFIXES" != "no" ]; then
5917 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5918 if [ "$CFG_XFIXES" != "runtime" ]; then
5922 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5923 echo "Xfixes support cannot be enabled due to functionality tests!"
5924 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5925 echo " If you believe this message is in error you may use the continue"
5926 echo " switch (-continue) to $0 to continue."
5934 # auto-detect Xrandr support (resize and rotate extension)
5935 if [ "$CFG_XRANDR" != "no" ]; then
5936 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
5937 if [ "$CFG_XRANDR" != "runtime" ]; then
5941 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5942 echo "Xrandr support cannot be enabled due to functionality tests!"
5943 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5944 echo " If you believe this message is in error you may use the continue"
5945 echo " switch (-continue) to $0 to continue."
5953 # auto-detect Xrender support
5954 if [ "$CFG_XRENDER" != "no" ]; then
5955 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
5958 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5959 echo "Xrender support cannot be enabled due to functionality tests!"
5960 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5961 echo " If you believe this message is in error you may use the continue"
5962 echo " switch (-continue) to $0 to continue."
5970 # Additional check to decide if WebKit support will be included
5971 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5972 echo "Warning: -no-xrender will disable the QtWebkit module."
5976 # auto-detect MIT-SHM support
5977 if [ "$CFG_MITSHM" != "no" ]; then
5978 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
5981 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5982 echo "MITSHM support cannot be enabled due to functionality tests!"
5983 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5984 echo " If you believe this message is in error you may use the continue"
5985 echo " switch (-continue) to $0 to continue."
5993 # auto-detect FontConfig support
5994 if [ "$CFG_FONTCONFIG" != "no" ]; then
5995 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5996 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5997 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5999 QT_CFLAGS_FONTCONFIG=
6000 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6002 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
6004 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
6005 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
6006 CFG_LIBFREETYPE=system
6008 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6009 echo "FontConfig support cannot be enabled due to functionality tests!"
6010 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6011 echo " If you believe this message is in error you may use the continue"
6012 echo " switch (-continue) to $0 to continue."
6020 # auto-detect Session Management support
6021 if [ "$CFG_SM" = "auto" ]; then
6022 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
6025 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6026 echo "Session Management support cannot be enabled due to functionality tests!"
6027 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6028 echo " If you believe this message is in error you may use the continue"
6029 echo " switch (-continue) to $0 to continue."
6037 # auto-detect SHAPE support
6038 if [ "$CFG_XSHAPE" != "no" ]; then
6039 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
6042 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6043 echo "XShape support cannot be enabled due to functionality tests!"
6044 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6045 echo " If you believe this message is in error you may use the continue"
6046 echo " switch (-continue) to $0 to continue."
6054 # auto-detect XVideo support
6055 if [ "$CFG_XVIDEO" != "no" ]; then
6056 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
6059 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6060 echo "XVideo support cannot be enabled due to functionality tests!"
6061 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6062 echo " If you believe this message is in error you may use the continue"
6063 echo " switch (-continue) to $0 to continue."
6071 # auto-detect XSync support
6072 if [ "$CFG_XSYNC" != "no" ]; then
6073 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
6076 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6077 echo "XSync support cannot be enabled due to functionality tests!"
6078 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6079 echo " If you believe this message is in error you may use the continue"
6080 echo " switch (-continue) to $0 to continue."
6088 # auto-detect Xinerama support
6089 if [ "$CFG_XINERAMA" != "no" ]; then
6090 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
6091 if [ "$CFG_XINERAMA" != "runtime" ]; then
6095 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6096 echo "Xinerama support cannot be enabled due to functionality tests!"
6097 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6098 echo " If you believe this message is in error you may use the continue"
6099 echo " switch (-continue) to $0 to continue."
6107 # auto-detect Xinput support
6108 if [ "$CFG_XINPUT" != "no" ]; then
6109 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
6110 if [ "$CFG_XINPUT" != "runtime" ]; then
6114 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6115 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
6116 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6117 echo " If you believe this message is in error you may use the continue"
6118 echo " switch (-continue) to $0 to continue."
6126 # auto-detect XKB support
6127 if [ "$CFG_XKB" != "no" ]; then
6128 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
6131 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6132 echo "XKB support cannot be enabled due to functionality tests!"
6133 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6134 echo " If you believe this message is in error you may use the continue"
6135 echo " switch (-continue) to $0 to continue."
6143 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
6144 if [ -n "$PKG_CONFIG" ]; then
6145 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
6146 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
6148 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
6150 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
6151 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
6153 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6154 echo "Gtk theme support cannot be enabled due to functionality tests!"
6155 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6156 echo " If you believe this message is in error you may use the continue"
6157 echo " switch (-continue) to $0 to continue."
6163 elif [ "$CFG_GLIB" = "no" ]; then
6169 if [ "$PLATFORM_MAC" = "yes" ]; then
6170 if [ "$CFG_PHONON" != "no" ]; then
6171 # Always enable Phonon (unless it was explicitly disabled)
6175 if [ "$CFG_COREWLAN" = "auto" ]; then
6176 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
6185 if [ "$PLATFORM_QPA" = "yes" ]; then
6186 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
6187 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6188 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
6190 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
6192 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
6195 if [ "$CFG_OPENGL" = "yes" ]; then
6196 echo "All the OpenGL functionality tests failed!"
6197 echo " You might need to modify the include and library search paths by editing"
6198 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6199 echo " ${XQMAKESPEC}."
6204 elif [ "$CFG_OPENGL" = "es1" ]; then
6206 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
6207 if [ $? != "0" ]; then
6208 echo "The OpenGL ES 1.x functionality test failed!"
6209 echo " You might need to modify the include and library search paths by editing"
6210 echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
6211 echo " ${XQMAKESPEC}."
6214 elif [ "$CFG_OPENGL" = "es2" ]; then
6216 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6217 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6218 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6219 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6220 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6221 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6222 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6223 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6226 "$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
6227 if [ $? != "0" ]; then
6228 echo "The OpenGL ES 2.0 functionality test failed!"
6229 echo " You might need to modify the include and library search paths by editing"
6230 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6231 echo " ${XQMAKESPEC}."
6234 elif [ "$CFG_OPENGL" = "desktop" ]; then
6235 # Desktop OpenGL support
6236 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6237 if [ $? != "0" ]; then
6238 echo "The OpenGL functionality test failed!"
6239 echo " You might need to modify the include and library search paths by editing"
6240 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6241 echo " ${XQMAKESPEC}."
6246 # auto-detect FontConfig support
6247 if [ "$CFG_FONTCONFIG" != "no" ]; then
6248 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6249 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6250 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6252 QT_CFLAGS_FONTCONFIG=
6253 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6255 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
6256 QT_CONFIG="$QT_CONFIG fontconfig"
6257 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6258 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6259 CFG_LIBFREETYPE=system
6264 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6265 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6266 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6267 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6268 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6270 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6271 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND `$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6272 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND `$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6274 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6278 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6279 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6280 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6281 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6282 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6283 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6284 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6287 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
6288 QT_CONFIG="$QT_CONFIG wayland"
6291 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
6292 QT_CONFIG="$QT_CONFIG coreservices"
6294 QMakeVar add DEFINES QT_NO_CORESERVICES
6301 if [ "$PLATFORM_QWS" = "yes" ]; then
6303 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
6304 if [ "$CFG_GUI" = "no" ]; then
6305 if [ "$CFG_OPENGL" = "auto" ]; then
6308 if [ "$CFG_OPENGL" != "no" ]; then
6309 echo "OpenGL enabled, but GUI disabled."
6310 echo " You might need to either enable the GUI or disable OpenGL"
6314 if [ "$CFG_OPENGL" = "yes" ]; then
6316 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
6318 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
6321 echo "All the OpenGL ES functionality tests failed!"
6322 echo " You might need to modify the include and library search paths by editing"
6323 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6324 echo " ${XQMAKESPEC}."
6327 elif [ "$CFG_OPENGL" = "es1" ]; then
6329 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
6330 if [ $? != "0" ]; then
6331 echo "The OpenGL ES 1.x functionality test failed!"
6332 echo " You might need to modify the include and library search paths by editing"
6333 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6334 echo " ${XQMAKESPEC}."
6338 elif [ "$CFG_OPENGL" = "es2" ]; then
6340 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6341 if [ $? != "0" ]; then
6342 echo "The OpenGL ES 2.0 functionality test failed!"
6343 echo " You might need to modify the include and library search paths by editing"
6344 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6345 echo " ${XQMAKESPEC}."
6349 elif [ "$CFG_OPENGL" = "desktop" ]; then
6350 # Desktop OpenGL support
6351 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6356 if [ "$PLATFORM_QWS" = "yes" ]; then
6359 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6360 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6361 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6362 if [ $? != "0" ]; then
6363 echo "The Ahi screen driver functionality test failed!"
6364 echo " You might need to modify the include and library search paths by editing"
6365 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6366 echo " ${XQMAKESPEC}."
6371 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6372 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6373 if [ $? != "0" ]; then
6374 echo "The SVGAlib screen driver functionality test failed!"
6375 echo " You might need to modify the include and library search paths by editing"
6376 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6377 echo " ${XQMAKESPEC}."
6382 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6383 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6384 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6385 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6386 elif directfb-config --version >/dev/null 2>&1; then
6387 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6388 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6391 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6392 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6393 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6394 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6396 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6397 QMakeVar set QT_DEFINES_DIRECTFB "QT3_SUPPORT"
6400 "$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
6401 if [ $? != "0" ]; then
6402 echo "The DirectFB screen driver functionality test failed!"
6403 echo " You might need to modify the include and library search paths by editing"
6404 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6405 echo " ${XQMAKESPEC}."
6413 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6414 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6415 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6416 if [ $? != "0" ]; then
6417 echo "The tslib functionality test failed!"
6418 echo " You might need to modify the include and library search paths by editing"
6419 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6420 echo " ${XQMAKESPEC}."
6429 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6430 if [ $? != "0" ]; then
6431 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6438 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6439 if [ "$CFG_EGL" != "no" ]; then
6440 # detect EGL support
6441 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
6442 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6447 # Prefer this variant for ES1
6448 if [ "$CFG_OPENGL" = "es1" -o "$EGL_VARIANT" = "none" ]; then
6449 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
6450 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
6453 CFG_EGL_GLES_INCLUDES=yes
6457 if [ "$EGL_VARIANT" = "none" ]; then
6458 if [ "$CFG_EGL" = "yes" ]; then
6459 echo "The EGL functionality test failed!"
6460 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6461 echo " You might need to modify the include and library search paths by editing"
6462 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6463 echo " ${XQMAKESPEC}."
6467 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6468 if [ "$CFG_OPENGL" = "es1" -o "$CFG_OPENGL" = "es2" ]; then
6475 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6478 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6479 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6480 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6481 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6482 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
6483 CFG_LIBFREETYPE=system
6489 if [ "$CFG_ENDIAN" = "auto" ]; then
6490 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6491 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6492 elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6493 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6494 elif [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
6497 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6499 if [ "$F" -eq 0 ]; then
6500 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6501 elif [ "$F" -eq 1 ]; then
6502 CFG_ENDIAN="Q_BIG_ENDIAN"
6505 echo "The target system byte order could not be detected!"
6506 echo "Turn on verbose messaging (-v) to see the final report."
6507 echo "You can use the -little-endian or -big-endian switch to"
6508 echo "$0 to continue."
6514 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6515 if [ "$PLATFORM_MAC" = "yes" ]; then
6518 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6520 if [ "$F" -eq 0 ]; then
6521 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6522 elif [ "$F" -eq 1 ]; then
6523 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6526 echo "The host system byte order could not be detected!"
6527 echo "Turn on verbose messaging (-v) to see the final report."
6528 echo "You can use the -host-little-endian or -host-big-endian switch to"
6529 echo "$0 to continue."
6535 if [ "$CFG_ARMFPA" != "auto" ]; then
6536 if [ "$CFG_ARMFPA" = "yes" ]; then
6537 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6538 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6540 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6543 CFG_DOUBLEFORMAT="normal"
6548 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6549 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6550 CFG_DOUBLEFORMAT=normal
6552 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6554 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6555 CFG_DOUBLEFORMAT=normal
6556 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6557 CFG_DOUBLEFORMAT=normal
6558 elif [ "$F" -eq 10 ]; then
6559 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6560 elif [ "$F" -eq 11 ]; then
6561 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6562 elif [ "$F" -eq 12 ]; then
6563 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6565 elif [ "$F" -eq 13 ]; then
6566 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6570 echo "The system floating point format could not be detected."
6571 echo "This may cause data to be generated in a wrong format"
6572 echo "Turn on verbose messaging (-v) to see the final report."
6573 # we do not fail on this since this is a new test, and if it fails,
6574 # the old behavior should be correct in most cases
6575 CFG_DOUBLEFORMAT=normal
6581 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
6585 if [ "$CFG_STL" != "no" ]; then
6586 if [ "$HAVE_STL" = "yes" ]; then
6589 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6590 echo "STL support cannot be enabled due to functionality tests!"
6591 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6592 echo " If you believe this message is in error you may use the continue"
6593 echo " switch (-continue) to $0 to continue."
6601 # detect POSIX clock_gettime()
6602 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6603 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
6604 CFG_CLOCK_GETTIME=yes
6606 CFG_CLOCK_GETTIME=no
6610 # detect POSIX monotonic clocks
6611 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6612 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
6613 CFG_CLOCK_MONOTONIC=yes
6615 CFG_CLOCK_MONOTONIC=no
6617 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6618 CFG_CLOCK_MONOTONIC=no
6622 if [ "$CFG_MREMAP" = "auto" ]; then
6623 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6630 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6631 if [ "$CFG_GETADDRINFO" != "no" ]; then
6632 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6635 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6636 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6637 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6638 echo " If you believe this message is in error you may use the continue"
6639 echo " switch (-continue) to $0 to continue."
6647 # find if the platform provides inotify
6648 if [ "$CFG_INOTIFY" != "no" ]; then
6649 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6652 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6653 echo "inotify support cannot be enabled due to functionality tests!"
6654 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6655 echo " If you believe this message is in error you may use the continue"
6656 echo " switch (-continue) to $0 to continue."
6664 # find if the platform provides if_nametoindex (ipv6 interface name support)
6665 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6666 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
6669 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6670 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6671 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6672 echo " If you believe this message is in error you may use the continue"
6673 echo " switch (-continue) to $0 to continue."
6681 # find if the platform provides getifaddrs (network interface enumeration)
6682 if [ "$CFG_GETIFADDRS" != "no" ]; then
6683 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6686 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6687 echo "getifaddrs support cannot be enabled due to functionality tests!"
6688 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6689 echo " If you believe this message is in error you may use the continue"
6690 echo " switch (-continue) to $0 to continue."
6699 if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6700 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
6701 if [ "$CFG_OPENSSL" = "auto" ]; then
6705 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6706 echo "OpenSSL support cannot be enabled due to functionality tests!"
6707 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6708 echo " If you believe this message is in error you may use the continue"
6709 echo " switch (-continue) to $0 to continue."
6716 if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6717 #OpenSSl should be enabled for Symbian release
6722 # detect OpenVG support
6723 if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6724 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
6725 if [ "$CFG_OPENVG" = "auto" ]; then
6728 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
6729 if [ "$CFG_OPENVG" = "auto" ]; then
6732 CFG_OPENVG_ON_OPENGL=yes
6733 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
6734 if [ "$CFG_OPENVG" = "auto" ]; then
6737 CFG_OPENVG_LC_INCLUDES=yes
6738 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
6739 if [ "$CFG_OPENVG" = "auto" ]; then
6742 CFG_OPENVG_LC_INCLUDES=yes
6743 CFG_OPENVG_ON_OPENGL=yes
6745 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6746 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6747 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6748 echo " If you believe this message is in error you may use the continue"
6749 echo " switch (-continue) to $0 to continue."
6755 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
6756 CFG_OPENVG_SHIVA=yes
6760 # if openvg is disabled and the user specified graphicssystem vg, disable it...
6761 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
6762 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
6763 CFG_GRAPHICS_SYSTEM=default
6766 if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
6767 echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
6771 if [ "$CFG_PTMALLOC" != "no" ]; then
6772 # build ptmalloc, copy .a file to lib/
6773 echo "Building ptmalloc. Please wait..."
6774 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
6775 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
6777 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
6780 if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6781 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6786 elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6787 # Disabled for Symbian release
6791 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6792 if [ "$CFG_ARCH" = "arm" ]; then
6793 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6794 if [ $? != "0" ]; then
6795 CFG_JAVASCRIPTCORE_JIT=no
6798 case "$XPLATFORM" in
6800 CFG_JAVASCRIPTCORE_JIT=no
6803 CFG_JAVASCRIPTCORE_JIT=no
6809 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6810 QMakeVar set JAVASCRIPTCORE_JIT yes
6811 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6812 QMakeVar set JAVASCRIPTCORE_JIT no
6815 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6816 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6817 if "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS ; then
6818 CFG_AUDIO_BACKEND=yes
6821 CFG_AUDIO_BACKEND=yes
6825 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6826 echo "Warning: largefile support cannot be disabled for win32."
6828 elif [ "$CFG_LARGEFILE" != "no" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6829 echo "Warning: largefile support cannot be enabled for symbian."
6833 #-------------------------------------------------------------------------------
6834 # ask for all that hasn't been auto-detected or specified in the arguments
6835 #-------------------------------------------------------------------------------
6837 ### fix this: user input should be validated in a loop
6838 if [ "$PLATFORM_QWS" = "yes" ]; then
6839 PROMPT_FOR_DEPTHS="yes"
6841 PROMPT_FOR_DEPTHS="no"
6843 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6845 echo "Choose pixel-depths to support:"
6847 echo " 1. 1bpp, black/white"
6848 echo " 4. 4bpp, grayscale"
6849 echo " 8. 8bpp, paletted"
6850 echo " 12. 12bpp, rgb 4-4-4"
6851 echo " 15. 15bpp, rgb 5-5-5"
6852 echo " 16. 16bpp, rgb 5-6-5"
6853 echo " 18. 18bpp, rgb 6-6-6"
6854 echo " 24. 24bpp, rgb 8-8-8"
6855 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6856 echo " all. All supported depths"
6858 echo "Your choices (default 8,16,32):"
6860 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6861 CFG_QWS_DEPTHS=8,16,32
6864 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6865 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6866 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6868 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6870 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6871 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6876 # enable dwarf2 support on Mac
6877 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6878 QT_CONFIG="$QT_CONFIG dwarf2"
6881 # Set the default arch if there are no "-arch" arguments on the configure line
6882 # For "-carbon" builds: 32 bit x86/ppc.
6883 # For builds on snow leopard : compiler default (64-bit).
6884 # For builds on leopard : compiler default (32-bit).
6885 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6886 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6888 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6889 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6890 CFG_MAC_ARCHS=" x86"
6891 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6892 CFG_MAC_ARCHS=" ppc"
6894 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6897 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6900 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6903 # enable Cocoa and/or Carbon on Mac
6904 # -carbon on the command line disables Cocoa, except for 64-bit archs
6905 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6906 CFG_MAC_CARBON="YES"
6909 # check which archs are in use, enable cocoa if we find a 64-bit one
6910 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6911 CFG_MAC_COCOA="yes";
6912 CFG_MAC_CARBON="no";
6913 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6914 CFG_MAC_CARBON="yes";
6916 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6917 CFG_MAC_CARBON="yes";
6922 # select Carbon on 10.4 Tiger.
6923 if [ "$PLATFORM_MAC" = "yes" ]; then
6924 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6925 if [ "$VERSION" == 8 ]; then
6927 CFG_MAC_CARBON="yes";
6931 # select Carbon when using the 10.4u SDK
6932 if [ "$PLATFORM_MAC" = "yes" ]; then
6933 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6936 CFG_MAC_CARBON="yes";
6940 # but disable Cocoa if cross-building for mingw and symbian
6941 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6942 [ "$XPLATFORM_SYMBIAN" = "yes" ] && CFG_MAC_COCOA="no"
6944 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
6945 # in some cases, see code further down
6946 case "$PLATFORM,$CFG_MAC_COCOA" in
6949 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
6953 QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
6957 # disable Qt 3 support on VxWorks and Symbian
6958 case "$XPLATFORM" in
6959 unsupported/vxworks*|symbian*)
6964 # enable Qt 3 support functionality
6965 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6966 QT_CONFIG="$QT_CONFIG gui-qt3support"
6970 if [ "$CFG_PHONON" = "yes" ]; then
6971 # No longer needed after modularization
6972 #QT_CONFIG="$QT_CONFIG phonon"
6973 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6974 QT_CONFIG="$QT_CONFIG phonon-backend"
6977 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6980 # disable accessibility
6981 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6982 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6984 QT_CONFIG="$QT_CONFIG accessibility"
6987 # egl stuff does not belong in lighthouse, but rather in plugins
6988 if [ "$PLATFORM_QPA" = "yes" ]; then
6993 if [ "$CFG_EGL" = "no" ]; then
6994 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6996 QT_CONFIG="$QT_CONFIG egl"
6997 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6998 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
7003 if [ "$CFG_OPENVG" = "no" ]; then
7004 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
7006 QT_CONFIG="$QT_CONFIG openvg"
7007 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
7008 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
7010 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
7011 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
7013 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7014 QT_CONFIG="$QT_CONFIG shivavg"
7015 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
7019 if [ "$CFG_QS60STYLE" = "no" ]; then
7020 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7022 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_STYLE_S60"
7025 # Just check if OpenGL is not set by command argumets for Symbian.
7026 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
7027 if [ "$CFG_OPENGL" = "auto" ]; then
7033 if [ "$CFG_OPENGL" = "no" ]; then
7034 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
7036 QT_CONFIG="$QT_CONFIG opengl"
7039 if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es2" ]; then
7040 if [ "$PLATFORM_QWS" = "yes" ]; then
7041 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
7043 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
7046 if [ "$CFG_OPENGL" = "es1" ]; then
7047 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1"
7048 QT_CONFIG="$QT_CONFIG opengles1"
7051 if [ "$CFG_OPENGL" = "es2" ]; then
7052 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
7053 QT_CONFIG="$QT_CONFIG opengles2"
7056 # safe execution environment
7057 if [ "$CFG_SXE" != "no" ]; then
7058 QT_CONFIG="$QT_CONFIG sxe"
7061 # build up the variables for output
7062 if [ "$CFG_DEBUG" = "yes" ]; then
7063 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
7064 QMAKE_CONFIG="$QMAKE_CONFIG debug"
7065 elif [ "$CFG_DEBUG" = "no" ]; then
7066 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
7067 QMAKE_CONFIG="$QMAKE_CONFIG release"
7069 if [ "$CFG_SHARED" = "yes" ]; then
7070 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
7071 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
7072 elif [ "$CFG_SHARED" = "no" ]; then
7073 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
7074 QMAKE_CONFIG="$QMAKE_CONFIG static"
7076 if [ "$PLATFORM_QWS" = "yes" ]; then
7077 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
7078 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
7079 QT_CONFIG="$QT_CONFIG embedded"
7080 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7082 if [ "$PLATFORM_QPA" = "yes" ]; then
7083 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
7084 QT_CONFIG="$QT_CONFIG qpa"
7085 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
7086 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7089 if [ "$CFG_EMBEDDED" = "nacl" ]; then
7090 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
7091 QT_CONFIG="$QT_CONFIG nacl pepper"
7092 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7095 if [ "$XPLATFORM_MINGW" != "yes" ]; then
7096 # Do not set this here for Windows. Let qmake do it so
7097 # debug and release precompiled headers are kept separate.
7098 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
7100 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
7101 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
7102 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
7103 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
7104 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7105 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
7107 if [ "$CFG_STL" = "no" ]; then
7108 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
7110 QMAKE_CONFIG="$QMAKE_CONFIG stl"
7112 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
7113 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
7115 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
7116 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
7117 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
7118 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
7119 QMakeVar add QMAKE_CFLAGS -g
7120 QMakeVar add QMAKE_CXXFLAGS -g
7121 QT_CONFIG="$QT_CONFIG separate_debug_info"
7123 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
7124 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
7126 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
7127 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
7128 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
7129 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
7130 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
7131 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
7132 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
7133 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
7134 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
7135 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
7136 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
7137 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
7138 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
7139 QT_CONFIG="$QT_CONFIG clock-gettime"
7141 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
7142 QT_CONFIG="$QT_CONFIG clock-monotonic"
7144 if [ "$CFG_MREMAP" = "yes" ]; then
7145 QT_CONFIG="$QT_CONFIG mremap"
7147 if [ "$CFG_GETADDRINFO" = "yes" ]; then
7148 QT_CONFIG="$QT_CONFIG getaddrinfo"
7150 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
7151 QT_CONFIG="$QT_CONFIG ipv6ifname"
7153 if [ "$CFG_GETIFADDRS" = "yes" ]; then
7154 QT_CONFIG="$QT_CONFIG getifaddrs"
7156 if [ "$CFG_INOTIFY" = "yes" ]; then
7157 QT_CONFIG="$QT_CONFIG inotify"
7159 if [ "$CFG_LIBJPEG" = "no" ]; then
7161 elif [ "$CFG_LIBJPEG" = "system" ]; then
7162 QT_CONFIG="$QT_CONFIG system-jpeg"
7164 if [ "$CFG_JPEG" = "no" ]; then
7165 QT_CONFIG="$QT_CONFIG no-jpeg"
7166 elif [ "$CFG_JPEG" = "yes" ]; then
7167 QT_CONFIG="$QT_CONFIG jpeg"
7169 if [ "$CFG_LIBMNG" = "no" ]; then
7171 elif [ "$CFG_LIBMNG" = "system" ]; then
7172 QT_CONFIG="$QT_CONFIG system-mng"
7174 if [ "$CFG_MNG" = "no" ]; then
7175 QT_CONFIG="$QT_CONFIG no-mng"
7176 elif [ "$CFG_MNG" = "yes" ]; then
7177 QT_CONFIG="$QT_CONFIG mng"
7179 if [ "$CFG_LIBPNG" = "no" ]; then
7182 if [ "$CFG_LIBPNG" = "system" ]; then
7183 QT_CONFIG="$QT_CONFIG system-png"
7185 if [ "$CFG_PNG" = "no" ]; then
7186 QT_CONFIG="$QT_CONFIG no-png"
7187 elif [ "$CFG_PNG" = "yes" ]; then
7188 QT_CONFIG="$QT_CONFIG png"
7190 if [ "$CFG_GIF" = "no" ]; then
7191 QT_CONFIG="$QT_CONFIG no-gif"
7192 elif [ "$CFG_GIF" = "yes" ]; then
7193 QT_CONFIG="$QT_CONFIG gif"
7195 if [ "$CFG_LIBTIFF" = "no" ]; then
7197 elif [ "$CFG_LIBTIFF" = "system" ]; then
7198 QT_CONFIG="$QT_CONFIG system-tiff"
7200 if [ "$CFG_TIFF" = "no" ]; then
7201 QT_CONFIG="$QT_CONFIG no-tiff"
7202 elif [ "$CFG_TIFF" = "yes" ]; then
7203 QT_CONFIG="$QT_CONFIG tiff"
7205 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7206 QT_CONFIG="$QT_CONFIG no-freetype"
7207 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7208 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7209 QT_CONFIG="$QT_CONFIG system-freetype"
7211 QT_CONFIG="$QT_CONFIG freetype"
7213 if [ "$CFG_GUI" = "auto" ]; then
7216 if [ "$CFG_GUI" = "no" ]; then
7217 QT_CONFIG="$QT_CONFIG no-gui"
7219 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7223 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
7224 #On Mac we implicitly link against libz, so we
7225 #never use the 3rdparty stuff.
7226 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7228 if [ "$CFG_ZLIB" = "yes" ]; then
7229 QT_CONFIG="$QT_CONFIG zlib"
7230 elif [ "$CFG_ZLIB" = "system" ]; then
7231 QT_CONFIG="$QT_CONFIG system-zlib"
7234 if [ "$CFG_S60" = "yes" ]; then
7235 QT_CONFIG="$QT_CONFIG s60"
7238 if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then
7239 QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files"
7241 QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files_disabled"
7244 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7245 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7246 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7247 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7248 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7249 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7250 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7251 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7252 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7253 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7254 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7255 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7256 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7257 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7259 if [ "$PLATFORM_X11" = "yes" ]; then
7260 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7262 # for some reason, the following libraries are not always built shared,
7263 # so *every* program/lib (including Qt) has to link against them
7264 if [ "$CFG_XSHAPE" = "yes" ]; then
7265 QT_CONFIG="$QT_CONFIG xshape"
7267 if [ "$CFG_XVIDEO" = "yes" ]; then
7268 QT_CONFIG="$QT_CONFIG xvideo"
7270 if [ "$CFG_XSYNC" = "yes" ]; then
7271 QT_CONFIG="$QT_CONFIG xsync"
7273 if [ "$CFG_XINERAMA" = "yes" ]; then
7274 QT_CONFIG="$QT_CONFIG xinerama"
7275 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7277 if [ "$CFG_XCURSOR" = "yes" ]; then
7278 QT_CONFIG="$QT_CONFIG xcursor"
7279 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7281 if [ "$CFG_XFIXES" = "yes" ]; then
7282 QT_CONFIG="$QT_CONFIG xfixes"
7283 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7285 if [ "$CFG_XRANDR" = "yes" ]; then
7286 QT_CONFIG="$QT_CONFIG xrandr"
7287 if [ "$CFG_XRENDER" != "yes" ]; then
7288 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7289 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7291 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7294 if [ "$CFG_XRENDER" = "yes" ]; then
7295 QT_CONFIG="$QT_CONFIG xrender"
7296 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7298 if [ "$CFG_MITSHM" = "yes" ]; then
7299 QT_CONFIG="$QT_CONFIG mitshm"
7301 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7302 QT_CONFIG="$QT_CONFIG fontconfig"
7304 if [ "$CFG_XINPUT" = "yes" ]; then
7305 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7307 if [ "$CFG_XINPUT" = "yes" ]; then
7308 QT_CONFIG="$QT_CONFIG xinput tablet"
7310 if [ "$CFG_XKB" = "yes" ]; then
7311 QT_CONFIG="$QT_CONFIG xkb"
7315 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7316 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7317 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7319 if [ "$CFG_ARCH" = "macosx" ]; then
7320 if [ "$CFG_RPATH" = "yes" ]; then
7321 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7323 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7324 if [ -n "$RPATH_FLAGS" ]; then
7326 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7330 elif [ "$CFG_RPATH" = "yes" ]; then
7331 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7335 if [ "$CFG_RPATH" = "yes" ]; then
7336 # set the default rpath to the library installation directory
7337 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7339 if [ -n "$RPATH_FLAGS" ]; then
7340 # add the user defined rpaths
7341 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7345 if [ '!' -z "$I_FLAGS" ]; then
7346 # add the user define include paths
7347 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7348 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7351 # turn off exceptions for the compilers that support it
7352 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7353 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7354 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7355 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7357 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7359 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7363 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7364 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7367 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7368 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7369 # Follow default behavior of configure.exe by overriding with "rtti".
7370 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7373 if [ "$CFG_ALSA" = "yes" ]; then
7374 QT_CONFIG="$QT_CONFIG alsa"
7377 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7378 QT_CONFIG="$QT_CONFIG pulseaudio"
7381 if [ "$CFG_COREWLAN" = "yes" ]; then
7382 QT_CONFIG="$QT_CONFIG corewlan"
7385 if [ "$CFG_ICD" = "yes" ]; then
7386 QT_CONFIG="$QT_CONFIG icd"
7389 if [ "$CFG_ICU" = "yes" ]; then
7390 QT_CONFIG="$QT_CONFIG icu"
7394 # Some Qt modules are too advanced in C++ for some old compilers
7395 # Detect here the platforms where they are known to work.
7397 # See Qt documentation for more information on which features are
7398 # supported and on which compilers.
7400 canBuildQtXmlPatterns="yes"
7401 canBuildWebKit="$HAVE_STL"
7402 canBuildQtConcurrent="yes"
7405 # WebKit requires stdint.h
7406 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7407 if [ $? != "0" ]; then
7411 case "$XPLATFORM" in
7413 # PA-RISC's assembly is too limited
7414 # gcc 3.4 on that platform can't build QtXmlPatterns
7415 # the assembly it generates cannot be compiled
7417 # Check gcc's version
7418 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7422 canBuildQtXmlPatterns="no"
7426 canBuildQtXmlPatterns="no"
7430 unsupported/vxworks-*-g++*)
7433 unsupported/vxworks-*-dcc*)
7435 canBuildQtXmlPatterns="no"
7438 # Check gcc's version
7439 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7447 canBuildQtXmlPatterns="no"
7452 # Check the compiler version
7453 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7456 canBuildQtXmlPatterns="no"
7457 canBuildQtConcurrent="no"
7461 canBuildQtConcurrent="no"
7467 canBuildQtXmlPatterns="no"
7468 canBuildQtConcurrent="no"
7474 # Get the xlC version
7475 cat > xlcver.c <<EOF
7479 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7484 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7485 xlcver=`./xlcver 2>/dev/null`
7488 if [ "$OPT_VERBOSE" = "yes" ]; then
7489 if [ -n "$xlcver" ]; then
7490 echo Found IBM xlC version: $xlcver.
7492 echo Could not determine IBM xlC version, assuming oldest supported.
7499 canBuildQtXmlPatterns="no"
7500 canBuildQtConcurrent="no"
7504 canBuildQtConcurrent="no"
7510 canBuildQtConcurrent="no"
7518 if [ "$CFG_GUI" = "no" ]; then
7519 # WebKit requires QtGui
7523 if [ "$CFG_SHARED" = "no" ]; then
7525 echo "WARNING: Using static linking will disable the WebKit module."
7530 CFG_CONCURRENT="yes"
7531 if [ "$canBuildQtConcurrent" = "no" ]; then
7532 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7536 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7537 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7540 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7541 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7542 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7543 CFG_XMLPATTERNS="no"
7545 # No longer needed after modularization
7546 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7547 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7549 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7552 # No longer needed after modularization
7553 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7554 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7556 # QT_CONFIG="$QT_CONFIG multimedia"
7559 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7560 QT_CONFIG="$QT_CONFIG audio-backend"
7563 if [ "$CFG_SVG" = "auto" ]; then
7567 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7568 echo "QtSvg requested, but it can't be built without QtGui"
7572 if [ "$CFG_SVG" = "yes" ]; then
7573 QT_CONFIG="$QT_CONFIG svg"
7575 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7578 if [ "$CFG_WEBKIT" != "no" ]; then
7579 CFG_WEBKIT="$canBuildWebKit"
7582 if [ "$CFG_WEBKIT" != "no" ]; then
7583 # No longer needed after modularization
7584 #QT_CONFIG="$QT_CONFIG webkit"
7585 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7586 if [ "$CFG_WEBKIT" = "debug" ]; then
7587 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7591 if [ "$CFG_SCRIPT" = "auto" ]; then
7595 # No longer needed after modularization
7596 #if [ "$CFG_SCRIPT" = "yes" ]; then
7597 # QT_CONFIG="$QT_CONFIG script"
7599 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7602 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7603 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7606 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7607 case "$XPLATFORM" in
7609 CFG_SCRIPTTOOLS="no"
7612 CFG_SCRIPTTOOLS="yes"
7615 elif [ "$CFG_SCRIPT" = "no" ]; then
7616 CFG_SCRIPTTOOLS="no"
7619 # No longer needed after modularization
7620 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7621 # QT_CONFIG="$QT_CONFIG scripttools"
7623 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7628 i386|x86_64|arm|macosx) ;;
7629 *) canBuildV8="no";;
7632 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7633 echo "Error: V8 was requested, but is not supported on this platform."
7637 if [ "$CFG_V8" = "auto" ]; then
7638 CFG_V8="$canBuildV8"
7641 if [ "$CFG_V8" = "no" ]; then
7642 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7644 QT_CONFIG="$QT_CONFIG v8"
7647 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7648 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7649 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7653 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7654 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7661 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7662 # No longer needed after modularization
7663 #QT_CONFIG="$QT_CONFIG declarative"
7664 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7665 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7668 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7671 if [ "$CFG_LOCATION" = "auto" ]; then
7672 CFG_LOCATION="$CFG_GUI"
7675 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7676 echo "QtLocation requested, but it can't be built without QtGui"
7680 #Disable QtLocation until ready
7683 if [ "$CFG_LOCATION" = "no" ]; then
7684 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7687 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7690 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7691 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7692 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7697 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7698 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7699 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7706 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7709 # On Mac, set the minimum deployment target for the different architechtures
7710 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
7711 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
7713 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7714 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7715 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7716 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7717 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7718 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7720 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7721 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7722 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7723 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7724 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7726 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7727 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7728 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7729 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7730 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7732 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7733 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7734 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7735 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7736 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7740 #-------------------------------------------------------------------------------
7741 # part of configuration information goes into qconfig.h
7742 #-------------------------------------------------------------------------------
7744 case "$CFG_QCONFIG" in
7746 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7749 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7750 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7751 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7752 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7753 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7754 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7756 echo "#endif" >>"$tmpconfig"
7760 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7764 # define QT_EDITION $QT_EDITION
7767 /* Machine byte-order */
7768 #define Q_BIG_ENDIAN 4321
7769 #define Q_LITTLE_ENDIAN 1234
7772 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7773 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7774 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7775 #if defined(__BIG_ENDIAN__)
7776 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7777 #elif defined(__LITTLE_ENDIAN__)
7778 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7780 # error "Unable to determine byte order!"
7784 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7786 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7787 if [ "$CFG_ENDIAN" = "auto" ]; then
7788 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7789 #if defined(__BIG_ENDIAN__)
7790 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7791 #elif defined(__LITTLE_ENDIAN__)
7792 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7794 # error "Unable to determine byte order!"
7798 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7800 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7802 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7803 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7804 /* Non-IEEE double format */
7805 #define Q_DOUBLE_LITTLE "01234567"
7806 #define Q_DOUBLE_BIG "76543210"
7807 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7808 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7809 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7812 if [ "$CFG_ARMFPA" = "yes" ]; then
7813 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7814 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7815 #ifndef QT_BOOTSTRAPPED
7820 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7824 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7825 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7826 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7827 /* Machine Architecture */
7828 #ifndef QT_BOOTSTRAPPED
7829 # define QT_ARCH_${CFG_ARCH_STR}
7831 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7835 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7836 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7838 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7839 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7842 # if both carbon and cocoa are specified, enable the autodetection code.
7843 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7844 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7845 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7846 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7849 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7850 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7853 if [ "$PLATFORM_MAC" = "yes" ]; then
7854 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7855 #if defined(__LP64__)
7856 # define QT_POINTER_SIZE 8
7858 # define QT_POINTER_SIZE 4
7862 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7863 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7867 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7869 if [ "$CFG_DEV" = "yes" ]; then
7870 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7873 # Embedded compile time options
7874 if [ "$PLATFORM_QWS" = "yes" ]; then
7875 # Add QWS to config.h
7876 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7878 # Add excluded decorations to $QCONFIG_FLAGS
7879 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7880 for decor in $decors; do
7881 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7882 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7885 # Figure which embedded drivers which are turned off
7886 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7887 for ADRIVER in $CFG_GFX_ON; do
7888 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7891 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7892 # the um driver is currently not in the available list for external builds
7893 if [ "$CFG_DEV" = "no" ]; then
7894 CFG_KBD_OFF="$CFG_KBD_OFF um"
7896 for ADRIVER in $CFG_KBD_ON; do
7897 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7900 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7901 for ADRIVER in $CFG_MOUSE_ON; do
7902 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7905 for DRIVER in $CFG_GFX_OFF; do
7906 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7907 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7910 for DRIVER in $CFG_KBD_OFF; do
7911 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7912 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7915 for DRIVER in $CFG_MOUSE_OFF; do
7916 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7917 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7921 if [ "$PLATFORM_QPA" = "yes" ]; then
7922 # Add QPA to config.h
7923 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7926 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7927 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7930 # Add turned on SQL drivers
7931 for DRIVER in $CFG_SQL_AVAILABLE; do
7932 eval "VAL=\$CFG_SQL_$DRIVER"
7935 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7936 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7937 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7940 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7946 QMakeVar set sql-drivers "$SQL_DRIVERS"
7947 QMakeVar set sql-plugins "$SQL_PLUGINS"
7949 # Add other configuration options to the qconfig.h file
7950 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7951 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7952 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7953 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7954 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7955 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7956 [ "$CFG_S60" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_S60"
7957 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7958 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7959 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7961 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
7962 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7963 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7964 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7965 [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
7968 # X11/Unix/Mac only configs
7969 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7970 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7971 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7972 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7973 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7974 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7975 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7976 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7977 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7978 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7979 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7980 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7981 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7982 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7983 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7985 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7986 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7987 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7988 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7989 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7990 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7991 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7992 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7993 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7994 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7995 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7996 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7997 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7999 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
8000 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
8001 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
8002 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
8003 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
8004 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
8005 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
8006 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
8007 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
8009 # sort QCONFIG_FLAGS for neatness if we can
8010 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
8011 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
8013 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
8014 # Enable Symbian DLLs and export rules.
8015 # We cannot use Linux's default export rules since they export everything.
8016 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL"
8017 # Disable non-working features.
8018 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_SYSTEMTRAYICON"
8021 if [ -n "$QCONFIG_FLAGS" ]; then
8022 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8023 #ifndef QT_BOOTSTRAPPED
8026 for cfg in $QCONFIG_FLAGS; do
8027 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
8028 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
8029 # figure out define logic, so we can output the correct
8030 # ifdefs to override the global defines in a project
8032 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
8033 # QT_NO_option can be forcefully turned on by QT_option
8034 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
8035 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
8036 # QT_option can be forcefully turned off by QT_NO_option
8037 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
8040 if [ -z $cfgdNeg ]; then
8041 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8048 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8049 #if defined($cfgd) && defined($cfgdNeg)
8051 #elif !defined($cfgd) && !defined($cfgdNeg)
8058 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8059 #endif // QT_BOOTSTRAPPED
8064 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
8065 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8066 #define QT_VISIBILITY_AVAILABLE
8071 if [ -n "$QT_LIBINFIX" ]; then
8072 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8073 #define QT_LIBINFIX "$QT_LIBINFIX"
8078 if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
8079 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8080 #define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
8085 # avoid unecessary rebuilds by copying only if qconfig.h has changed
8086 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
8087 rm -f "$outpath/src/corelib/global/qconfig.h.new"
8089 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
8090 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
8091 chmod -w "$outpath/src/corelib/global/qconfig.h"
8092 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
8093 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
8097 #-------------------------------------------------------------------------------
8098 # save configuration into qconfig.pri
8099 #-------------------------------------------------------------------------------
8100 QTCONFIG="$outpath/mkspecs/qconfig.pri"
8101 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
8102 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
8103 if [ "$CFG_DEBUG" = "yes" ]; then
8104 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
8105 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8106 QT_CONFIG="$QT_CONFIG release"
8108 QT_CONFIG="$QT_CONFIG debug"
8109 elif [ "$CFG_DEBUG" = "no" ]; then
8110 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
8111 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8112 QT_CONFIG="$QT_CONFIG debug"
8114 QT_CONFIG="$QT_CONFIG release"
8116 if [ "$CFG_STL" = "yes" ]; then
8117 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
8119 if [ "$CFG_FRAMEWORK" = "no" ]; then
8120 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
8122 QT_CONFIG="$QT_CONFIG qt_framework"
8123 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
8125 if [ "$PLATFORM_MAC" = "yes" ]; then
8126 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
8128 if [ "$CFG_DEV" = "yes" ]; then
8129 QT_CONFIG="$QT_CONFIG private_tests"
8132 if [ -z "$QT_CFLAGS_FPU" ]; then
8133 if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1; then
8134 QT_CFLAGS_FPU=softvfp
8138 # Make the application arch follow the Qt arch for single arch builds.
8139 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
8140 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
8141 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
8144 cat >>"$QTCONFIG.tmp" <<EOF
8146 CONFIG += $QTCONFIG_CONFIG
8148 QT_EDITION = $Edition
8149 QT_CONFIG += $QT_CONFIG
8152 QT_VERSION = $QT_VERSION
8153 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
8154 QT_MINOR_VERSION = $QT_MINOR_VERSION
8155 QT_PATCH_VERSION = $QT_PATCH_VERSION
8158 QT_LIBINFIX = $QT_LIBINFIX
8159 QT_NAMESPACE = $QT_NAMESPACE
8160 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
8163 if [ -n "$CFG_SYSROOT" ]; then
8164 echo "# sysroot" >>"$QTCONFIG.tmp"
8165 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
8166 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
8167 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8168 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8169 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8170 echo "}" >> "$QTCONFIG.tmp"
8171 echo >> "$QTCONFIG.tmp"
8173 if [ "$CFG_RPATH" = "yes" ]; then
8174 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8176 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8177 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8178 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8179 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8181 if [ -n "$QT_CFLAGS_FPU" ]; then
8182 echo "#Qt for symbian FPU settings" >> "$QTCONFIG.tmp"
8183 echo "MMP_RULES += \"ARMFPU $QT_CFLAGS_FPU\"" >> "$QTCONFIG.tmp"
8186 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8187 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
8188 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8191 # replace qconfig.pri if it differs from the newly created temp file
8192 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8193 rm -f "$QTCONFIG.tmp"
8195 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8198 #-------------------------------------------------------------------------------
8199 # save configuration into qmodule.pri
8200 #-------------------------------------------------------------------------------
8201 QTMODULE="$outpath/mkspecs/qmodule.pri"
8203 # Ensure we can link to uninistalled libraries
8204 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8205 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8207 if [ -n "$QT_CFLAGS_PSQL" ]; then
8208 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8210 if [ -n "$QT_LFLAGS_PSQL" ]; then
8211 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8213 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8214 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8216 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8217 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8219 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8220 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8222 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8223 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8225 if [ -n "$QT_LFLAGS_ODBC" ]; then
8226 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8228 if [ -n "$QT_LFLAGS_TDS" ]; then
8229 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8232 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8233 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8236 #dump in the OPENSSL_LIBS info
8237 if [ '!' -z "$OPENSSL_LIBS" ]; then
8238 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8239 elif [ "$CFG_OPENSSL" = "linked" ]; then
8240 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8243 #dump in the SDK info
8244 if [ '!' -z "$CFG_SDK" ]; then
8245 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8248 # mac gcc -Xarch support
8249 if [ "$CFG_MAC_XARCH" = "no" ]; then
8250 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8254 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8255 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8257 # replace qmodule.pri if it differs from the newly created temp file
8258 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8259 rm -f "$QTMODULE.tmp"
8261 mv -f "$QTMODULE.tmp" "$QTMODULE"
8264 #-------------------------------------------------------------------------------
8265 # save configuration into .qmake.cache
8266 #-------------------------------------------------------------------------------
8268 CACHEFILE="$outpath/.qmake.cache"
8269 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8270 cat >>"$CACHEFILE.tmp" <<EOF
8272 QT_SOURCE_TREE = \$\$quote($relpath)
8273 QT_BUILD_TREE = \$\$quote($outpath)
8274 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8276 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8277 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8278 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8279 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8280 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8281 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8282 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8284 include(\$\$PWD/mkspecs/qmodule.pri)
8285 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8286 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8287 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8291 #dump the qmake spec
8292 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8293 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8295 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8300 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8301 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8302 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8303 # don't need to worry about generated files
8304 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8305 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8307 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8309 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8310 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8313 # replace .qmake.cache if it differs from the newly created temp file
8314 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8315 rm -f "$CACHEFILE.tmp"
8317 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8320 #-------------------------------------------------------------------------------
8321 # give feedback on configuration
8322 #-------------------------------------------------------------------------------
8326 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8329 This target is using the GNU C++ compiler ($PLATFORM).
8331 Recent versions of this compiler automatically include code for
8332 exceptions, which increase both the size of the Qt libraries and
8333 the amount of memory taken by your applications.
8335 You may choose to re-run `basename $0` with the -no-exceptions
8336 option to compile Qt without exceptions. This is completely binary
8337 compatible, and existing applications will continue to work.
8345 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8348 This target is using the MIPSpro C++ compiler ($PLATFORM).
8350 You may choose to re-run `basename $0` with the -no-exceptions
8351 option to compile Qt without exceptions. This will make the
8352 size of the Qt library smaller and reduce the amount of memory
8353 taken by your applications.
8364 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8366 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8367 in debug mode will run out of memory on systems with 2GB or less.
8368 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8369 -no-webkit or -release to skip webkit debug.
8374 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8375 echo "Build type: $PLATFORM"
8377 echo "Building on: $PLATFORM"
8378 echo "Building for: $XPLATFORM"
8381 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8382 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8384 echo "Architecture: $CFG_ARCH"
8387 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8388 echo "Host architecture: $CFG_HOST_ARCH"
8391 if [ "$PLATFORM_MAC" = "yes" ]; then
8392 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8393 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8394 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8396 echo "Using framework: Cocoa"
8399 echo "Using framework: Carbon"
8403 if [ -n "$PLATFORM_NOTES" ]; then
8404 echo "Platform notes:"
8405 echo "$PLATFORM_NOTES"
8410 if [ "$OPT_VERBOSE" = "yes" ]; then
8411 echo $ECHO_N "qmake vars .......... $ECHO_C"
8412 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8413 echo "qmake switches ......... $QMAKE_SWITCHES"
8416 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8417 echo "Build .................. $CFG_BUILD_PARTS"
8418 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8419 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8420 echo "Debug .................. yes (combined)"
8421 if [ "$CFG_DEBUG" = "yes" ]; then
8422 echo "Default Link ........... debug"
8424 echo "Default Link ........... release"
8427 echo "Debug .................. $CFG_DEBUG"
8429 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8430 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8431 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8432 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8433 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8434 echo "QtGui module ........... $CFG_GUI"
8435 echo "QtScript module ........ $CFG_SCRIPT"
8436 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8437 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8438 echo "Phonon module .......... $CFG_PHONON"
8439 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8440 echo "SVG module ............. $CFG_SVG"
8441 case "$CFG_WEBKIT" in
8442 yes) echo "WebKit module .......... yes" ;;
8443 debug) echo "WebKit module .......... yes (debug)" ;;
8444 no) echo "WebKit module .......... no" ;;
8446 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8447 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8448 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8450 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8453 echo "V8 module .............. $CFG_V8"
8454 echo "Declarative module ..... $CFG_DECLARATIVE"
8455 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8456 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8458 echo "Location module ........ $CFG_LOCATION"
8459 echo "Support for S60 ........ $CFG_S60"
8460 echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES"
8461 echo "STL support ............ $CFG_STL"
8462 echo "PCH support ............ $CFG_PRECOMPILE"
8463 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8464 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8465 echo "AVX..................... ${CFG_AVX}"
8466 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8467 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8468 echo "NEON support ........... ${CFG_NEON}"
8470 [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
8471 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8472 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8473 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8474 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8475 echo "NIS support ............ $CFG_NIS"
8476 echo "CUPS support ........... $CFG_CUPS"
8477 echo "Iconv support .......... $CFG_ICONV"
8478 echo "Glib support ........... $CFG_GLIB"
8479 echo "GStreamer support ...... $CFG_GSTREAMER"
8480 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8481 echo "Large File support ..... $CFG_LARGEFILE"
8482 echo "GIF support ............ $CFG_GIF"
8483 if [ "$CFG_TIFF" = "no" ]; then
8484 echo "TIFF support ........... $CFG_TIFF"
8486 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8488 if [ "$CFG_JPEG" = "no" ]; then
8489 echo "JPEG support ........... $CFG_JPEG"
8491 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8493 if [ "$CFG_PNG" = "no" ]; then
8494 echo "PNG support ............ $CFG_PNG"
8496 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8498 if [ "$CFG_MNG" = "no" ]; then
8499 echo "MNG support ............ $CFG_MNG"
8501 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8503 echo "zlib support ........... $CFG_ZLIB"
8504 echo "Session management ..... $CFG_SM"
8505 if [ "$PLATFORM_QWS" = "yes" ]; then
8506 echo "Embedded support ....... $CFG_EMBEDDED"
8507 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8508 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8510 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8512 # Normalize the decoration output first
8513 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8514 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8515 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8516 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8517 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8518 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8519 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8520 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8521 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8522 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8523 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8524 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8525 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8526 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8527 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8528 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8530 if [ "$CFG_OPENGL" = "desktop" ]; then
8531 echo "OpenGL support ......... yes (Desktop OpenGL)"
8532 elif [ "$CFG_OPENGL" = "es1" ]; then
8533 echo "OpenGL support ......... yes (OpenGL ES 1.x Common profile)"
8534 elif [ "$CFG_OPENGL" = "es2" ]; then
8535 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8537 echo "OpenGL support ......... no"
8539 if [ "$CFG_EGL" != "no" ]; then
8540 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8541 echo "EGL support ............ yes <GLES/egl.h>"
8543 echo "EGL support ............ yes <EGL/egl.h>"
8546 if [ "$CFG_OPENVG" ]; then
8547 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8548 echo "OpenVG support ......... ShivaVG"
8550 echo "OpenVG support ......... $CFG_OPENVG"
8553 if [ "$PLATFORM_X11" = "yes" ]; then
8554 echo "NAS sound support ...... $CFG_NAS"
8555 echo "XShape support ......... $CFG_XSHAPE"
8556 echo "XVideo support ......... $CFG_XVIDEO"
8557 echo "XSync support .......... $CFG_XSYNC"
8558 echo "Xinerama support ....... $CFG_XINERAMA"
8559 echo "Xcursor support ........ $CFG_XCURSOR"
8560 echo "Xfixes support ......... $CFG_XFIXES"
8561 echo "Xrandr support ......... $CFG_XRANDR"
8562 echo "Xrender support ........ $CFG_XRENDER"
8563 echo "Xi support ............. $CFG_XINPUT"
8564 echo "MIT-SHM support ........ $CFG_MITSHM"
8565 echo "FontConfig support ..... $CFG_FONTCONFIG"
8566 echo "XKB Support ............ $CFG_XKB"
8567 echo "immodule support ....... $CFG_IM"
8568 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8570 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8571 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8572 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8573 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8574 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8575 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8576 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8577 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8578 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8581 if [ "$CFG_OPENSSL" = "yes" ]; then
8582 OPENSSL_LINKAGE="(run-time)"
8583 elif [ "$CFG_OPENSSL" = "linked" ]; then
8584 OPENSSL_LINKAGE="(linked)"
8586 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8587 echo "Alsa support ........... $CFG_ALSA"
8588 if [ "$PLATFORM_MAC" = "yes" ]; then
8589 echo "CoreWlan support ....... $CFG_COREWLAN"
8591 echo "ICD support ............ $CFG_ICD"
8592 echo "libICU support ......... $CFG_ICU"
8593 echo "Xcb support ............ $CFG_XCB"
8596 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC"
8598 # complain about not being able to use dynamic plugins if we are using a static build
8599 if [ "$CFG_SHARED" = "no" ]; then
8601 echo "WARNING: Using static linking will disable the use of dynamically"
8602 echo "loaded plugins. Make sure to import all needed static plugins,"
8603 echo "or compile needed modules into the library."
8606 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8608 echo "NOTE: When linking against OpenSSL, you can override the default"
8609 echo "library names through OPENSSL_LIBS."
8611 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8614 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8616 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8617 echo "if you want a pure debug build."
8622 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8627 #-------------------------------------------------------------------------------
8628 # build makefiles based on the configuration
8629 #-------------------------------------------------------------------------------
8631 echo "Finding project files. Please wait..."
8632 if [ "$CFG_NOPROCESS" != "yes" ]; then
8633 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8634 if [ -f "${relpath}/qtbase.pro" ]; then
8635 mkfile="${outpath}/Makefile"
8636 [ -f "$mkfile" ] && chmod +w "$mkfile"
8637 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8641 # .projects -> projects to process
8642 # .projects.1 -> qt and moc
8643 # .projects.2 -> subdirs and libs
8644 # .projects.3 -> the rest
8645 rm -f .projects .projects.1 .projects.2 .projects.3
8647 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8648 if [ -z "$AWK" ]; then
8649 for p in `echo $QMAKE_PROJECTS`; do
8650 echo "$p" >> .projects
8653 cat >projects.awk <<EOF
8659 first = "./.projects.1.tmp"
8660 second = "./.projects.2.tmp"
8661 third = "./.projects.3.tmp"
8666 if ( ! target_file )
8668 print input_file >target_file
8673 input_file = FILENAME
8678 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8681 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8682 target_file = second
8687 matched_target == 0 && /^(TEMPLATE.*=)/ {
8688 if ( \$3 == "subdirs" )
8689 target_file = second
8690 else if ( \$3 == "lib" )
8696 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8697 if ( \$0 ~ /plugin/ )
8700 target_file = second
8705 if ( ! target_file )
8707 print input_file >>target_file
8714 for p in `echo $QMAKE_PROJECTS`; do
8715 echo "$p" >> .projects.all
8718 # if you get errors about the length of the command line to awk, change the -l arg
8720 split -l 100 .projects.all .projects.all.
8721 for p in .projects.all.*; do
8722 "$AWK" -f projects.awk `cat $p`
8723 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8724 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8725 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8726 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8728 rm -f .projects.all* projects.awk
8730 [ -f .projects.1 ] && cat .projects.1 >>.projects
8731 [ -f .projects.2 ] && cat .projects.2 >>.projects
8732 rm -f .projects.1 .projects.2
8733 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8734 cat .projects.3 >>.projects
8738 # don't sort Qt and MOC in with the other project files
8739 # also work around a segfaulting uniq(1)
8740 if [ -f .sorted.projects.2 ]; then
8741 sort .sorted.projects.2 > .sorted.projects.2.new
8742 mv -f .sorted.projects.2.new .sorted.projects.2
8743 cat .sorted.projects.2 >> .sorted.projects.1
8745 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8746 rm -f .sorted.projects.2 .sorted.projects.1
8750 if [ -f .projects ]; then
8751 uniq .projects >.tmp
8752 mv -f .tmp .projects
8753 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8755 if [ -f .projects.3 ]; then
8756 uniq .projects.3 >.tmp
8757 mv -f .tmp .projects.3
8758 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8760 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8764 for part in $CFG_BUILD_PARTS; do
8766 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8767 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8768 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8769 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8774 if [ "$CFG_DEV" = "yes" ]; then
8775 PART_ROOTS="$PART_ROOTS tests"
8778 echo "Creating makefiles. Please wait..."
8779 for file in .projects .projects.3; do
8780 [ '!' -f "$file" ] && continue
8781 for a in `cat $file`; do
8783 for r in $PART_ROOTS; do
8784 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8789 [ "$IN_ROOT" = "no" ] && continue
8792 *winmain/winmain.pro)
8793 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8797 *s60main/s60main.pro)
8798 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
8801 *examples/activeqt/*) continue ;;
8802 */qmake/qmake.pro) continue ;;
8803 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8804 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8810 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8811 test -d "$dir" || mkdir -p "$dir"
8812 OUTDIR="$outpath/$dir"
8813 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8814 # fast configure - the makefile exists, skip it
8815 # since the makefile exists, it was generated by qmake, which means we
8816 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8818 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8821 QMAKE_SPEC_ARGS="-spec $SPEC"
8822 echo $ECHO_N " for $a$ECHO_C"
8824 QMAKE="$outpath/bin/qmake"
8825 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8826 if [ "$file" = ".projects.3" ]; then
8829 cat >"${OUTDIR}/Makefile" <<EOF
8830 # ${OUTDIR}/Makefile: generated by configure
8832 # WARNING: This makefile will be replaced with a real makefile.
8833 # All changes made to this file will be lost.
8835 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8837 cat >>"${OUTDIR}/Makefile" <<EOF
8839 all clean install qmake first Makefile: FORCE
8840 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8848 if [ "$OPT_VERBOSE" = "yes" ]; then
8849 echo " (`basename $SPEC`)"
8850 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8855 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8856 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8860 rm -f .projects .projects.3
8862 #-------------------------------------------------------------------------------
8863 # check for platforms that we don't yet know about
8864 #-------------------------------------------------------------------------------
8865 if [ "$CFG_ARCH" = "generic" ]; then
8868 NOTICE: Atomic operations are not yet supported for this
8871 Qt will use the 'generic' architecture instead, which uses a
8872 single pthread_mutex_t to protect all atomic operations. This
8873 implementation is the slow (but safe) fallback implementation
8874 for architectures Qt does not yet support.
8878 #-------------------------------------------------------------------------------
8879 # check if the user passed the -no-zlib option, which is no longer supported
8880 #-------------------------------------------------------------------------------
8881 if [ -n "$ZLIB_FORCED" ]; then
8882 which_zlib="supplied"
8883 if [ "$CFG_ZLIB" = "system" ]; then
8889 NOTICE: The -no-zlib option was supplied but is no longer
8892 Qt now requires zlib support in all builds, so the -no-zlib
8893 option was ignored. Qt will be built using the $which_zlib
8898 #-------------------------------------------------------------------------------
8899 # finally save the executed command to another script
8900 #-------------------------------------------------------------------------------
8901 if [ `basename $0` != "config.status" ]; then
8902 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8904 # add the system variables
8905 for varname in $SYSTEM_VARIABLES; do
8907 'if [ -n "\$'${varname}'" ]; then
8908 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8913 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8915 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8916 echo "#!/bin/sh" > "$outpath/config.status"
8917 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8918 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8919 echo "else" >> "$outpath/config.status"
8920 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8921 echo "fi" >> "$outpath/config.status"
8922 chmod +x "$outpath/config.status"
8925 if [ -n "$RPATH_MESSAGE" ]; then
8927 echo "$RPATH_MESSAGE"
8930 MAKE=`basename "$MAKE"`
8932 echo Qt is now configured for building. Just run \'$MAKE\'.
8933 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8934 echo Once everything is built, Qt is installed.
8935 echo You should not run \'$MAKE install\'.
8937 echo Once everything is built, you must run \'$MAKE install\'.
8938 echo Qt will be installed into $QT_INSTALL_PREFIX
8941 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.