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 #-------------------------------------------------------------------------------
192 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
196 #-----------------------------------------------------------------------------
197 # Qt version detection
198 #-----------------------------------------------------------------------------
199 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
203 if [ -n "$QT_VERSION" ]; then
204 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
205 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
206 if [ -n "$MAJOR" ]; then
207 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
208 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
209 QT_MAJOR_VERSION="$MAJOR"
210 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
211 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
214 if [ -z "$QT_MAJOR_VERSION" ]; then
215 echo "Cannot process version from qglobal.h: $QT_VERSION"
216 echo "Cannot proceed."
220 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
221 if [ -z "$QT_PACKAGEDATE" ]; then
222 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
223 echo "Cannot proceed"
227 #-------------------------------------------------------------------------------
229 #-------------------------------------------------------------------------------
235 EditionString=Commercial
239 # parse the arguments, setting things to "yes" or "no"
240 while [ "$#" -gt 0 ]; do
244 #Autoconf style options
246 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
250 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
254 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
255 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
258 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
263 # this option may or may not be followed by an argument
264 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
273 # this option may or may not be followed by an argument
274 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
287 -h|help|--help|-help)
288 if [ "$VAL" = "yes" ]; then
290 COMMERCIAL_USER="no" #doesn't matter we will display the help
293 COMMERCIAL_USER="no" #doesn't matter we will display the help
297 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
301 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
308 if [ "$UNKNOWN_ARG" = "yes" ]; then
325 if [ "$PLATFORM_QPA" != "no" ]; then
326 if [ "$PLATFORM_QPA" = "maybe" ]; then
333 echo "No license exists to enable Qt QPA. Disabling."
338 echo "Using NaCl at $VAL."
355 COMMERCIAL_USER="yes"
369 if [ "$COMMERCIAL_USER" = "ask" ]; then
371 echo "Which edition of Qt do you want to use ?"
373 echo "Type 'c' if you want to use the Commercial Edition."
374 echo "Type 'o' if you want to use the Open Source Edition."
378 if [ "$commercial" = "c" ]; then
379 COMMERCIAL_USER="yes"
381 elif [ "$commercial" = "o" ]; then
388 if [ "$CFG_NOKIA" = "yes" ]; then
390 Edition="NokiaInternalBuild"
391 EditionString="Nokia Internal Build"
392 QT_EDITION="QT_EDITION_OPENSOURCE"
393 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
394 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
395 # Commercial preview release
396 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
399 QT_EDITION="QT_EDITION_DESKTOP"
400 LicenseType="Technology Preview"
401 elif [ $COMMERCIAL_USER = "yes" ]; then
402 # one of commercial editions
403 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
404 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
405 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
407 # read in the license file
408 if [ -f "$LICENSE_FILE" ]; then
409 . "$LICENSE_FILE" >/dev/null 2>&1
410 if [ -z "$LicenseKeyExt" ]; then
412 echo "You are using an old license file."
414 echo "Please install the license file supplied by Nokia,"
415 echo "or install the Qt Open Source Edition if you intend to"
416 echo "develop free software."
419 if [ -z "$Licensee" ]; then
421 echo "Invalid license key. Please check the license key."
425 if [ -z "$LicenseKeyExt" ]; then
427 echo $ECHO_N "Please enter your license key: $ECHO_C"
429 Licensee="Unknown user"
434 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
435 && LicenseValid="yes" \
437 if [ "$LicenseValid" != "yes" ]; then
439 echo "Invalid license key. Please check the license key."
442 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
443 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
444 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
445 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
447 # determine which edition we are licensed to use
448 case "$LicenseTypeCode" in
450 LicenseType="Commercial"
454 QT_EDITION="QT_EDITION_UNIVERSAL"
457 Edition="FullFramework"
458 EditionString="Full Framework"
459 QT_EDITION="QT_EDITION_DESKTOP"
462 Edition="GUIFramework"
463 EditionString="GUI Framework"
464 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
469 LicenseType="Evaluation"
470 QMakeVar add DEFINES QT_EVAL
474 QT_EDITION="QT_EDITION_EVALUATION"
479 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
481 echo "Invalid license key. Please check the license key."
485 # verify that we are licensed to use Qt on this platform
487 case "$PlatformCode" in
490 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
494 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
497 ### EMBEDDED_QPA logic missing ###
498 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
499 X9,* | XC,* | XU,* | XW,* | XM,*)
501 LICENSE_EXTENSION="-ALLOS"
503 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
504 # Qt for Embedded Linux
505 LICENSE_EXTENSION="-EMBEDDED"
507 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
509 LICENSE_EXTENSION="-EMBEDDED"
511 FM,*,no | LM,yes,* | ZM,no,no)
513 LICENSE_EXTENSION="-DESKTOP"
517 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
518 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
520 echo "You are not licensed for the $Platform platform."
522 echo "Please contact qt-info@nokia.com to upgrade your license to"
523 echo "include the $Platform platform, or install the Qt Open Source Edition"
524 echo "if you intend to develop free software."
529 if test -r "$relpath/.LICENSE"; then
530 # Generic, non-final license
532 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
537 *TECHNOLOGY?PREVIEW*)
544 echo >&2 "Invalid license files; cannot continue"
549 EditionString="$Edition"
550 QT_EDITION="QT_EDITION_DESKTOP"
553 case "$LicenseFeatureCode" in
556 case "$LicenseType" in
558 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
561 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
567 case "$LicenseType" in
569 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
572 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
578 echo "Invalid license key. Please check the license key."
582 case "$LicenseFeatureCode" in
590 if [ '!' -f "$outpath/LICENSE" ]; then
591 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
592 echo "this software has disappeared."
594 echo "Sorry, you are not licensed to use this software."
595 echo "Try re-installing."
599 elif [ $COMMERCIAL_USER = "no" ]; then
600 # Open Source edition - may only be used under the terms of the GPL or LGPL.
601 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
602 Licensee="Open Source"
604 EditionString="Open Source"
605 QT_EDITION="QT_EDITION_OPENSOURCE"
608 #-------------------------------------------------------------------------------
609 # initalize variables
610 #-------------------------------------------------------------------------------
612 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
613 for varname in $SYSTEM_VARIABLES; do
614 qmakevarname="${varname}"
615 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
616 if [ "${varname}" = "LDFLAGS" ]; then
617 qmakevarname="LFLAGS"
618 elif [ "${varname}" = "LD" ]; then
622 'if [ -n "\$'${varname}'" ]; then
623 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
627 # Use CC/CXX to run config.tests
628 mkdir -p "$outpath/config.tests"
629 rm -f "$outpath/config.tests/.qmake.cache"
630 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
632 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
633 QMakeVar add decorations "default windows styled"
634 QMakeVar add mouse-drivers "pc"
635 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
636 QMakeVar add gfx-drivers "linuxfb"
637 QMakeVar add mouse-drivers "linuxtp"
639 QMakeVar add kbd-drivers "tty"
641 if [ "$CFG_DEV" = "yes" ]; then
642 QMakeVar add kbd-drivers "um"
645 # QTDIR may be set and point to an old or system-wide Qt installation
648 # the minimum version of libdbus-1 that we require:
649 MIN_DBUS_1_VERSION=0.93
651 # initalize internal variables
652 CFG_CONFIGURE_EXIT_ON_ERROR=yes
654 CFG_EXCEPTIONS=unspecified
655 CFG_GUI=auto # (yes|no|auto)
656 CFG_SCRIPT=auto # (yes|no|auto)
657 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
658 CFG_XMLPATTERNS=auto # (yes|no|auto)
672 CFG_SYMBIAN_DEFFILES=auto
690 CFG_OPENVG_LC_INCLUDES=no
691 CFG_OPENVG_SHIVA=auto
692 CFG_OPENVG_ON_OPENGL=auto
694 CFG_EGL_GLES_INCLUDES=no
697 CFG_QWS_FREETYPE=auto
700 QT_DEFAULT_BUILD_PARTS="libs examples tests"
705 CFG_PHONON_BACKEND=yes
707 CFG_AUDIO_BACKEND=auto
711 CFG_DECLARATIVE_DEBUG=yes
712 CFG_WEBKIT=auto # (yes|no|auto|debug)
713 CFG_JAVASCRIPTCORE_JIT=auto
716 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
717 CFG_GFX_ON="linuxfb multiscreen"
718 CFG_GFX_PLUGIN_AVAILABLE=
721 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
722 CFG_KBD_ON="tty" #default, see QMakeVar above
723 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
724 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
726 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
727 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
728 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
729 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
731 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
732 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
733 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
734 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
739 CFG_KBD_PLUGIN_AVAILABLE=
742 CFG_MOUSE_PLUGIN_AVAILABLE=
747 CFG_DECORATION_AVAILABLE="styled windows default"
748 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
749 CFG_DECORATION_PLUGIN_AVAILABLE=
750 CFG_DECORATION_PLUGIN=
770 CFG_SEPARATE_DEBUG_INFO=no
771 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
772 CFG_REDUCE_EXPORTS=auto
782 CFG_REDUCE_RELOCATIONS=no
785 CFG_ACCESSIBILITY=auto
789 CFG_DOUBLEFORMAT=auto
793 CFG_CLOCK_GETTIME=auto
794 CFG_CLOCK_MONOTONIC=auto
803 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
808 COMMANDLINE_MAC_CARBON=no
811 CFG_PREFIX_INSTALL=yes
820 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce"
821 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
822 XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*)
823 XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2)
827 OPT_CONFIRM_LICENSE=no
833 CFG_GRAPHICS_SYSTEM=default
842 # initalize variables used for installation
851 QT_INSTALL_TRANSLATIONS=
856 #flags for SQL drivers
864 QT_LFLAGS_ODBC="-lodbc"
867 # flags for libdbus-1
871 # flags for Glib (X11 only)
875 # flags for GStreamer (X11 only)
879 #flag for Symbian fpu settings
882 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
883 QT_CFLAGS_CONNSETTINGS=
884 QT_LIBS_CONNSETTINGS=
886 #-------------------------------------------------------------------------------
887 # check SQL drivers, mouse drivers and decorations available in this package
888 #-------------------------------------------------------------------------------
890 # opensource version removes some drivers, so force them to be off
896 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
897 for a in "$relpath/src/plugins/sqldrivers/"*; do
899 base_a=`basename "$a"`
900 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
901 eval "CFG_SQL_${base_a}=auto"
906 CFG_DECORATION_PLUGIN_AVAILABLE=
907 if [ -d "$relpath/src/plugins/decorations" ]; then
908 for a in "$relpath/src/plugins/decorations/"*; do
910 base_a=`basename "$a"`
911 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
916 CFG_KBD_PLUGIN_AVAILABLE=
917 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
918 for a in "$relpath/src/plugins/kbddrivers/"*; do
920 base_a=`basename "$a"`
921 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
926 CFG_MOUSE_PLUGIN_AVAILABLE=
927 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
928 for a in "$relpath/src/plugins/mousedrivers/"*; do
930 base_a=`basename "$a"`
931 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
936 CFG_GFX_PLUGIN_AVAILABLE=
937 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
938 for a in "$relpath/src/plugins/gfxdrivers/"*; do
940 base_a=`basename "$a"`
941 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
944 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
947 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
948 if [ -d "$relpath/src/plugins/imageformats" ]; then
949 for a in "$relpath/src/plugins/imageformats/"*; do
951 base_a=`basename "$a"`
952 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
957 #-------------------------------------------------------------------------------
958 # Set Default NaCl options
959 #-------------------------------------------------------------------------------
960 if [ "$CFG_EMBEDDED" = "nacl" ]; then
961 echo "Setting NaCl options:"
971 if [ `uname` = "Linux" ]; then
972 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
973 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
975 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
976 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
979 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
990 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
991 QT_CONFIG="$QT_CONFIG nacl"
994 #-------------------------------------------------------------------------------
995 # parse command line arguments
996 #-------------------------------------------------------------------------------
998 # parse the arguments, setting things to "yes" or "no"
999 while [ "$#" -gt 0 ]; do
1003 #Autoconf style options
1005 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1009 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1013 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1014 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1017 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1021 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1025 -no-*-*|-plugin-*-*|-qt-*-*)
1026 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1027 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1042 #Qt style no options
1044 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1047 #Qt style yes options
1048 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-wayland|-nis|-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)
1049 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1052 #Qt style options that pass an argument
1054 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1056 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1060 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1064 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config)
1065 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1069 #Qt style complex options in one command
1070 -enable-*|-disable-*)
1071 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1072 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1074 #Qt Builtin/System style options
1075 -no-*|-system-*|-qt-*)
1076 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1077 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1079 #Options that cannot be generalized
1086 # this option may or may not be followed by an argument
1087 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1094 -embedded-lite|-qpa)
1096 # this option may or may not be followed by an argument
1097 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1110 # this option may or may not be followed by an argument
1111 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1120 # this option may or may not be followed by an argument
1121 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1129 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1130 # this option may or may not be followed by an argument
1131 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1140 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1144 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1152 VAR="graphicssystem"
1156 -runtimegraphicssystem)
1157 VAR="runtimegraphicssystem"
1168 if [ "$1" = "-D" ]; then
1172 VAL=`echo $1 | sed 's,-D,,'`
1177 # this option may or may not be followed by an argument
1178 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1187 if [ "$1" = "-I" ]; then
1191 VAL=`echo $1 | sed 's,-I,,'`
1196 if [ "$1" = "-L" ]; then
1200 VAL=`echo $1 | sed 's,-L,,'`
1205 if [ "$1" = "-R" ]; then
1209 VAL=`echo $1 | sed 's,-R,,'`
1214 VAL=`echo $1 | sed 's,-l,,'`
1218 if [ "$1" = "-F" ]; then
1222 VAL=`echo $1 | sed 's,-F,,'`
1227 if [ "$1" = "-fw" ]; then
1231 VAL=`echo $1 | sed 's,-fw,,'`
1239 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1246 if [ "$UNKNOWN_ARG" = "yes" ]; then
1247 echo "$1: unknown argument"
1258 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1259 CFG_QT3SUPPORT="$VAL"
1265 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1266 CFG_ACCESSIBILITY="$VAL"
1275 CFG_USE_GNUMAKE="$VAL"
1278 CFG_MYSQL_CONFIG="$VAL"
1281 QT_INSTALL_PREFIX="$VAL"
1284 QT_HOST_PREFIX="$VAL"
1287 QT_FORCE_PKGCONFIG=yes
1290 QT_INSTALL_DOCS="$VAL"
1293 QT_INSTALL_HEADERS="$VAL"
1296 QT_INSTALL_PLUGINS="$VAL"
1299 QT_INSTALL_IMPORTS="$VAL"
1302 QT_INSTALL_DATA="$VAL"
1305 QT_INSTALL_LIBS="$VAL"
1314 QT_INSTALL_TRANSLATIONS="$VAL"
1316 sysconfdir|settingsdir)
1317 QT_INSTALL_SETTINGS="$VAL"
1320 QT_INSTALL_EXAMPLES="$VAL"
1329 QT_INSTALL_BINS="$VAL"
1351 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1358 if [ "$VAL" = "little" ]; then
1359 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1360 elif [ "$VAL" = "big" ]; then
1361 CFG_ENDIAN="Q_BIG_ENDIAN"
1367 if [ "$VAL" = "little" ]; then
1368 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1369 elif [ "$VAL" = "big" ]; then
1370 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1376 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1383 CFG_QWS_DEPTHS="$VAL"
1386 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1387 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1388 [ "$VAL" = "es2" ]; then
1390 if [ "$VAL" = "es2" ]; then
1398 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1400 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1408 if [ "$PLATFORM_QWS" = "yes" ]; then
1409 echo "Error: Graphics System plugins are not supported on QWS."
1410 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1411 echo " rather than existing as a separate plugin."
1415 if [ "$VAL" = "opengl" ]; then
1416 CFG_GRAPHICS_SYSTEM="opengl"
1417 elif [ "$VAL" = "openvg" ]; then
1418 CFG_GRAPHICS_SYSTEM="openvg"
1419 elif [ "$VAL" = "raster" ]; then
1420 CFG_GRAPHICS_SYSTEM="raster"
1421 elif [ "$VAL" = "runtime" ]; then
1422 CFG_GRAPHICS_SYSTEM="runtime"
1428 runtimegraphicssystem)
1429 if [ "$VAL" != "runtime" ]; then
1430 CFG_RUNTIME_SYSTEM="$VAL"
1434 qvfb) # left for commandline compatibility, not documented
1435 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1436 if [ "$VAL" = "yes" ]; then
1437 QMakeVar add gfx-drivers qvfb
1438 QMakeVar add kbd-drivers qvfb
1439 QMakeVar add mouse-drivers qvfb
1440 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1441 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1442 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1449 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1452 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1461 if [ "$PLATFORM_MAC" = "yes" ]; then
1468 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1469 CFG_MAC_DWARF2="$VAL"
1475 # if this is a Mac then "windows" probably means
1476 # we are cross-compiling for MinGW
1477 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1478 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1487 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1488 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1494 # do nothing - Cocoa is the default.
1497 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1498 CFG_MAC_CARBON="$VAL"
1499 COMMANDLINE_MAC_CARBON="$VAL"
1505 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1506 CFG_MAC_HARFBUZZ="$VAL"
1513 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1514 CFG_FRAMEWORK="$VAL"
1520 if [ "$VAL" = "yes" ]; then
1522 QMakeVar add QMAKE_CFLAGS -pg
1523 QMakeVar add QMAKE_CXXFLAGS -pg
1524 QMakeVar add QMAKE_LFLAGS -pg
1525 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1530 exceptions|g++-exceptions)
1531 if [ "$VAL" = "no" ]; then
1533 elif [ "$VAL" = "yes" ]; then
1541 # keep compatibility with old platform names
1547 PLATFORM=hpux-acc-o64
1550 PLATFORM=hpux-acc-64
1553 PLATFORM=hpux-acc-64
1565 PLATFORM=reliant-cds-64
1568 PLATFORM=solaris-cc-64
1571 PLATFORM=unixware-cc
1574 PLATFORM=unixware-g++
1577 PLATFORM=unixware-cc
1580 PLATFORM=unixware-g++
1586 i386) NATIVE_64_ARCH="x86_64" ;;
1587 powerpc) NATIVE_64_ARCH="ppc64" ;;
1588 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1590 if [ ! -z "$NATIVE_64_ARCH" ]; then
1591 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1592 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1599 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1600 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
1601 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
1602 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
1605 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1606 CFG_DEBUG_RELEASE="$VAL"
1612 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1613 CFG_RELEASE_QMAKE="$VAL"
1619 if [ "$VAL" = "yes" ]; then
1621 elif [ "$VAL" = "no" ]; then
1628 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1629 CFG_PREFIX_INSTALL="$VAL"
1637 developer-build|commercial|opensource|nokia-developer)
1638 # These switches have been dealt with already
1641 if [ "$VAL" = "yes" ]; then
1643 elif [ "$VAL" = "no" ]; then
1650 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1651 CFG_INCREMENTAL="$VAL"
1657 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1658 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1664 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1665 if [ "$VAL" = "no" ]; then
1666 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1667 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1668 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1674 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1681 if [ "$VAL" = "no" ]; then
1688 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1703 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1710 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1717 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1724 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1731 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1738 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1745 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1752 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1753 CFG_PRECOMPILE="$VAL"
1758 separate-debug-info)
1759 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1760 CFG_SEPARATE_DEBUG_INFO="$VAL"
1761 elif [ "$VAL" = "nocopy" ] ; then
1762 CFG_SEPARATE_DEBUG_INFO="yes"
1763 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1769 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1770 CFG_REDUCE_EXPORTS="$VAL"
1776 if [ "$VAL" = "no" ]; then
1783 if [ "$VAL" = "no" ]; then
1790 if [ "$VAL" = "no" ]; then
1797 if [ "$VAL" = "no" ]; then
1804 if [ "$VAL" = "no" ]; then
1811 if [ "$VAL" = "no" ]; then
1818 if [ "$VAL" = "no" ]; then
1825 if [ "$VAL" = "no" ]; then
1832 if [ "$VAL" = "no" ]; then
1842 if [ "$VAL" = "no" ]; then
1849 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1850 CFG_REDUCE_RELOCATIONS="$VAL"
1856 [ "$VAL" = "qt" ] && VAL=yes
1857 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1858 CFG_QWS_FREETYPE="$VAL"
1864 [ "$VAL" = "qt" ] && VAL=yes
1865 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1870 # No longer supported:
1871 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1874 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1881 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1882 CFG_SYMBIAN_DEFFILES="$VAL"
1888 if [ "$VAL" = "system" ]; then
1895 [ "$VAL" = "yes" ] && VAL=qt
1896 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1903 [ "$VAL" = "yes" ] && VAL=qt
1904 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1911 [ "$VAL" = "yes" ] && VAL=qt
1912 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1919 [ "$VAL" = "yes" ] && VAL=qt
1920 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1927 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1934 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1941 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1948 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1955 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1962 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1969 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1970 CFG_FONTCONFIG="$VAL"
1976 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1983 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1990 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1997 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2004 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2011 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2018 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2019 CFG_GSTREAMER="$VAL"
2025 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2026 CFG_QGTKSTYLE="$VAL"
2032 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ]; then
2033 CFG_QS60STYLE="$VAL"
2039 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2042 if [ "$VAL" = "no" ]; then
2050 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
2052 elif [ "$VAL" = "runtime" ]; then
2059 if [ "$VAL" = "yes" ]; then
2066 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2073 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2074 CFG_LARGEFILE="$VAL"
2080 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2087 if [ "$VAL" = "yes" ]; then
2088 CFG_OPENSSL="linked"
2094 if [ "$VAL" = "yes" ]; then
2102 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2103 CFG_XMLPATTERNS="yes"
2105 if [ "$VAL" = "no" ]; then
2106 CFG_XMLPATTERNS="no"
2113 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2116 if [ "$VAL" = "no" ]; then
2124 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2125 CFG_SCRIPTTOOLS="yes"
2127 if [ "$VAL" = "no" ]; then
2128 CFG_SCRIPTTOOLS="no"
2135 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2138 if [ "$VAL" = "no" ]; then
2146 if [ "$VAL" = "yes" ]; then
2149 if [ "$VAL" = "no" ]; then
2157 if [ "$VAL" = "yes" ]; then
2158 CFG_DECLARATIVE="yes"
2160 if [ "$VAL" = "no" ]; then
2161 CFG_DECLARATIVE="no"
2168 if [ "$VAL" = "yes" ]; then
2169 CFG_DECLARATIVE_DEBUG="yes"
2171 if [ "$VAL" = "no" ]; then
2172 CFG_DECLARATIVE_DEBUG="no"
2179 [ "$VAL" = "auto" ] && VAL="yes"
2183 if [ "$VAL" = "yes" ]; then
2186 if [ "$VAL" = "no" ]; then
2194 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2195 CFG_JAVASCRIPTCORE_JIT="$VAL"
2201 if [ "$VAL" = "yes" ]; then
2202 OPT_CONFIRM_LICENSE="$VAL"
2208 if [ "$VAL" = "yes" ]; then
2214 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2215 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2216 # if autoconf style options were used, $VAL can be "yes" or "no"
2217 [ "$VAL" = "yes" ] && VAL=qt
2218 # now $VAL should be "no", "qt", or "plugin"... double-check
2219 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2222 # now $VAL is "no", "qt", or "plugin"
2224 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2225 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2227 # Grab the available values
2230 avail="$CFG_SQL_AVAILABLE"
2233 avail="$CFG_GFX_AVAILABLE"
2234 if [ "$OPT" = "plugin" ]; then
2235 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2239 avail="$CFG_DECORATION_AVAILABLE"
2240 if [ "$OPT" = "plugin" ]; then
2241 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2245 avail="$CFG_KBD_AVAILABLE"
2246 if [ "$OPT" = "plugin" ]; then
2247 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2251 avail="$CFG_MOUSE_AVAILABLE"
2252 if [ "$OPT" = "plugin" ]; then
2253 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2257 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2258 if [ "$OPT" != "plugin" ]; then
2259 # png is always built in
2265 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2269 # Check that that user's value is available.
2272 if [ "$VAL" = "$d" ]; then
2277 [ "$found" = yes ] || ERROR=yes
2279 if [ "$VAR" = "sql" ]; then
2280 # set the CFG_SQL_driver
2281 eval "CFG_SQL_$VAL=\$OPT"
2283 elif [ "$VAR" = "imageformat" ]; then
2284 [ "$OPT" = "qt" ] && OPT=yes
2285 VAL="`echo $VAL |tr a-z A-Z`"
2286 eval "CFG_$VAL=$OPT"
2290 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2291 if [ "$OPT" = "plugin" ]; then
2292 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2293 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2294 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2295 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2296 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2297 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2298 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2299 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2302 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2303 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2304 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2305 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2306 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2310 QMakeVar add "${VAR}s" "${VAL}"
2311 elif [ "$OPT" = "no" ]; then
2312 PLUG_VAR="${VAR}-plugin"
2313 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2314 IN_VAR="${VAR}-driver"
2318 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2319 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2320 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2321 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2322 QMakeVar del "${IN_VAR}s" "$VAL"
2323 QMakeVar del "${PLUG_VAR}s" "$VAL"
2325 if [ "$ERROR" = "yes" ]; then
2326 echo "$CURRENT_OPT: unknown argument"
2331 if [ "$VAL" = "yes" ]; then
2332 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2333 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2337 elif [ "$VAL" = "no" ]; then
2338 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2339 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2348 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2355 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2362 D_FLAGS="$D_FLAGS \"$VAL\""
2365 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2368 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2371 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2374 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2377 if [ "$PLATFORM_MAC" = "yes" ]; then
2378 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2379 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2385 if [ "$PLATFORM_MAC" = "yes" ]; then
2386 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2392 W_FLAGS="$W_FLAGS \"${VAL}\""
2398 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2405 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2406 CFG_PHONON_BACKEND="$VAL"
2412 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2413 CFG_MULTIMEDIA="$VAL"
2425 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2426 CFG_AUDIO_BACKEND="$VAL"
2432 if [ "$VAL" != "no" ]; then
2437 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2447 if [ "$UNKNOWN_OPT" = "yes" ]; then
2448 echo "${CURRENT_OPT}: invalid command-line switch"
2454 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2455 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2458 if [ "$CFG_GUI" = "no" ]; then
2459 echo "Warning: -no-gui will disable the qt3support library."
2463 #disable Qt3Support for Lighthouse
2464 if [ "$PLATFORM_QPA" = "yes" ]; then
2468 # update QT_CONFIG to show our current predefined configuration
2469 case "$CFG_QCONFIG" in
2470 minimal|small|medium|large|full)
2471 # these are a sequence of increasing functionality
2472 for c in minimal small medium large full; do
2473 QT_CONFIG="$QT_CONFIG $c-config"
2474 [ "$CFG_QCONFIG" = $c ] && break
2478 # not known to be sufficient for anything
2479 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2480 echo >&2 "Error: configuration file not found:"
2481 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2483 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2488 #-------------------------------------------------------------------------------
2489 # build tree initialization
2490 #-------------------------------------------------------------------------------
2492 # where to find which..
2493 unixtests="$relpath/config.tests/unix"
2494 mactests="$relpath/config.tests/mac"
2495 symbiantests="$relpath/config.tests/symbian"
2496 WHICH="$unixtests/which.test"
2498 PERL=`$WHICH perl 2>/dev/null`
2500 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2502 for e in gawk nawk awk; do
2503 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2510 PERL="/usr/bin/perl"
2511 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2515 ### skip this if the user just needs help...
2516 if [ "$OPT_HELP" != "yes" ]; then
2518 # is this a shadow build?
2519 if [ "$OPT_SHADOW" = "maybe" ]; then
2521 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2522 if [ -h "$outpath" ]; then
2523 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2529 if [ "$OPT_SHADOW" = "yes" ]; then
2530 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2531 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2532 echo >&2 "Cannot proceed."
2535 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2538 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2540 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2541 echo "Qt can be built in release mode with separate debug information, so"
2542 echo "-debug-and-release is not necessary anymore"
2546 if [ "$CFG_SILENT" = "yes" ]; then
2547 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2550 # if the source tree is different from the build tree,
2551 # symlink or copy part of the sources
2552 if [ "$OPT_SHADOW" = "yes" ]; then
2553 echo "Preparing build tree..."
2555 if [ -z "$PERL" ]; then
2557 echo "You need perl in your PATH to make a shadow build."
2558 echo "Cannot proceed."
2562 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2564 # symlink the qmake directory
2565 find "$relpath/qmake" | while read a; do
2566 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2567 if [ '!' -f "$my_a" ]; then
2568 if [ -d "$a" ]; then
2569 # directories are created...
2572 a_dir=`dirname "$my_a"`
2573 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2574 # ... and files are symlinked
2575 case `basename "$a"` in
2576 *.o|*.d|GNUmakefile*|qmake)
2587 # make a syncqt script that can be used in the shadow
2588 rm -f "$outpath/bin/syncqt"
2589 if [ -x "$relpath/bin/syncqt" ]; then
2590 mkdir -p "$outpath/bin"
2591 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2592 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2593 chmod 755 "$outpath/bin/syncqt"
2596 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2597 rm -f "$outpath/bin/$i"
2598 if [ -x "$relpath/bin/$i" ]; then
2599 mkdir -p "$outpath/bin"
2600 echo "#!/bin/sh" >"$outpath/bin/$i"
2601 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2602 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2603 chmod 755 "$outpath/bin/$i"
2607 # symlink the mkspecs directory
2608 mkdir -p "$outpath/mkspecs"
2609 rm -rf "$outpath"/mkspecs/*
2610 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2611 rm -f "$outpath/mkspecs/default"
2615 rm -rf "$outpath/mkspecs/$1"
2616 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2617 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2620 # Special case for mkspecs/features directory.
2621 # To be able to place .prf files into a shadow build directory,
2622 # we're creating links for files only. The directory structure is reproduced.
2623 ShadowMkspecs features
2625 # The modules dir is special, too.
2626 ShadowMkspecs modules
2628 # symlink the doc directory
2629 rm -rf "$outpath/doc"
2630 ln -s "$relpath/doc" "$outpath/doc"
2632 # make sure q3porting.xml can be found
2633 mkdir -p "$outpath/tools/porting/src"
2634 rm -f "$outpath/tools/porting/src/q3porting.xml"
2635 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2638 # symlink fonts to be able to run application from build directory
2639 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2640 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2641 mkdir -p "${outpath}/lib"
2642 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2646 if [ "$OPT_FAST" = "auto" ]; then
2647 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2654 # find a make command
2655 if [ -z "$MAKE" ]; then
2657 for mk in gmake make; do
2658 if "$WHICH" $mk >/dev/null 2>&1; then
2663 if [ -z "$MAKE" ]; then
2664 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2665 echo >&2 "Cannot proceed."
2668 # export MAKE, we need it later in the config.tests
2674 #-------------------------------------------------------------------------------
2675 # auto-detect all that hasn't been specified in the arguments
2676 #-------------------------------------------------------------------------------
2678 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2679 if [ "$CFG_EMBEDDED" != "no" ]; then
2680 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2682 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2683 if [ -z "$XPLATFORM" ]; then
2684 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2685 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2689 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2690 if [ -z "$XPLATFORM" ]; then
2691 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2692 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2696 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2697 if [ -z "$XPLATFORM" ]; then
2698 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2699 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2703 if [ -z "$PLATFORM" ]; then
2704 case "$UNAME_MACHINE" in
2706 PLATFORM=qws/linux-x86-g++
2709 PLATFORM=qws/linux-x86_64-g++
2712 PLATFORM=qws/linux-generic-g++
2716 if [ -z "$XPLATFORM" ]; then
2717 if [ "$CFG_EMBEDDED" = "auto" ]; then
2718 if [ -n "$CFG_ARCH" ]; then
2719 CFG_EMBEDDED=$CFG_ARCH
2721 case "$UNAME_MACHINE" in
2729 CFG_EMBEDDED=generic
2734 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2738 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2739 if [ -z "$XPLATFORM" ]; then
2740 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2741 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2745 if [ -z "$XPLATFORM" ]; then
2750 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2757 if [ -z "$PLATFORM" ]; then
2759 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2761 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2763 # PLATFORM=macx-xcode
2770 #PLATFORM=aix-g++-64
2772 #PLATFORM=aix-xlc-64
2774 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2784 # PLATFORM=dynix-g++
2790 PLATFORM=freebsd-g++
2792 - Also available for FreeBSD: freebsd-icc
2796 PLATFORM=openbsd-g++
2807 #PLATFORM=irix-cc-64
2809 - Also available for IRIX: irix-g++ irix-cc-64
2813 case "$UNAME_MACHINE" in
2815 #PLATFORM=hpuxi-acc-32
2816 PLATFORM=hpuxi-acc-64
2818 - Also available for HP-UXi: hpuxi-acc-32
2824 #PLATFORM=hpux-acc-64
2826 #PLATFORM=hpux-acc-o64
2828 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2837 - Also available for Tru64: tru64-g++
2841 case "$UNAME_MACHINE" in
2843 PLATFORM=linux-g++-64
2850 - Also available for Linux: linux-kcc linux-icc linux-cxx
2854 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2855 PLATFORM="solaris-g++"
2857 #PLATFORM=solaris-g++
2859 #PLATFORM=solaris-cc64
2862 - Also available for Solaris: solaris-g++ solaris-cc-64
2865 ReliantUNIX-*:*|SINIX-*:*)
2866 PLATFORM=reliant-cds
2867 #PLATFORM=reliant-cds-64
2869 - Also available for Reliant UNIX: reliant-cds-64
2879 #PLATFORM=unixware-g++
2880 PLATFORM=unixware-cc
2882 - Also available for OpenUNIX: unixware-g++
2886 #PLATFORM=unixware-g++
2887 PLATFORM=unixware-cc
2889 - Also available for UnixWare: unixware-g++
2896 - Also available for SCO OpenServer: sco-g++
2900 PLATFORM=unixware-g++
2903 PLATFORM=unsupported/qnx-g++
2906 if [ "$OPT_HELP" != "yes" ]; then
2908 for p in $PLATFORMS; do
2909 echo " $relconf $* -platform $p"
2912 echo " The build script does not currently recognize all" >&2
2913 echo " platforms supported by Qt." >&2
2914 echo " Rerun this script with a -platform option listed to" >&2
2915 echo " set the system/compiler combination you use." >&2
2922 if [ "$PLATFORM_QWS" = "yes" ]; then
2924 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2926 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2929 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2931 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2932 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
2933 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
2934 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2936 if [ -d "$PLATFORM" ]; then
2937 QMAKESPEC="$PLATFORM"
2939 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2941 if [ -d "$XPLATFORM" ]; then
2942 XQMAKESPEC="$XPLATFORM"
2944 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2946 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2947 QT_CROSS_COMPILE=yes
2948 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2951 if [ "$PLATFORM_MAC" = "yes" ]; then
2952 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2954 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2955 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2956 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2957 echo " built with 'macx-g++'" >&2
2963 # check specified platforms are supported
2964 if [ '!' -d "$QMAKESPEC" ]; then
2966 echo " The specified system/compiler is not supported:"
2970 echo " Please see the README file for a complete list."
2974 if [ '!' -d "$XQMAKESPEC" ]; then
2976 echo " The specified system/compiler is not supported:"
2980 echo " Please see the README file for a complete list."
2984 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2986 echo " The specified system/compiler port is not complete:"
2988 echo " $XQMAKESPEC/qplatformdefs.h"
2990 echo " Please contact qt-info@nokia.com."
2995 # now look at the configs and figure out what platform we are config'd for
2996 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2997 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2999 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
3001 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
3002 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
3003 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
3004 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
3005 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
3009 #-------------------------------------------------------------------------------
3010 # determine the system architecture
3011 #-------------------------------------------------------------------------------
3012 if [ "$OPT_VERBOSE" = "yes" ]; then
3013 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
3016 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
3017 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
3019 echo "You have specified a target architecture with -embedded and -arch."
3020 echo "The two architectures you have specified are different, so we can"
3021 echo "not proceed. Either set both to be the same, or only use -embedded."
3027 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
3028 case `basename "$XPLATFORM"` in
3031 echo "You are not licensed for Qt for `basename $XPLATFORM`."
3033 echo "Please contact qt-info@nokia.com to upgrade your license to"
3034 echo "include this platform, or install the Qt Open Source Edition"
3035 echo "if you intend to develop free software."
3041 if [ -z "${CFG_HOST_ARCH}" ]; then
3042 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
3044 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
3045 case "$CFG_HOST_ARCH" in
3050 if [ "$OPT_VERBOSE" = "yes" ]; then
3051 echo " GNU/Hurd ($CFG_HOST_ARCH)"
3055 CFG_HOST_ARCH=`uname -p`
3056 if [ "$OPT_VERBOSE" = "yes" ]; then
3057 echo " SGI ($CFG_HOST_ARCH)"
3061 case "$UNAME_MACHINE" in
3063 if [ "$OPT_VERBOSE" = "yes" ]; then
3064 echo " Sun SPARC (sparc)"
3071 if [ "$OPT_VERBOSE" = "yes" ]; then
3072 echo " 64-bit AMD 80x86 (x86_64)"
3074 CFG_HOST_ARCH=x86_64
3077 if [ "$OPT_VERBOSE" = "yes" ]; then
3078 echo " 32-bit Intel 80x86 (i386)"
3086 case "$UNAME_MACHINE" in
3088 if [ "$OPT_VERBOSE" = "yes" ]; then
3089 echo " 32-bit Apple PowerPC (powerpc)"
3093 if [ "$OPT_VERBOSE" = "yes" ]; then
3094 echo " 32-bit Intel 80x86 (i386)"
3098 CFG_HOST_ARCH=macosx
3101 if [ "$OPT_VERBOSE" = "yes" ]; then
3102 echo " 64-bit IBM PowerPC (powerpc)"
3104 CFG_HOST_ARCH=powerpc
3107 if [ "$OPT_VERBOSE" = "yes" ]; then
3108 echo " HP PA-RISC (parisc)"
3110 CFG_HOST_ARCH=parisc
3113 if [ "$OPT_VERBOSE" = "yes" ]; then
3114 echo " 32-bit Intel 80x86 (i386)"
3118 *:*:x86_64|*:*:amd64)
3119 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3120 if [ "$OPT_VERBOSE" = "yes" ]; then
3121 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3125 if [ "$OPT_VERBOSE" = "yes" ]; then
3126 echo " 64-bit AMD 80x86 (x86_64)"
3128 CFG_HOST_ARCH=x86_64
3132 if [ "$OPT_VERBOSE" = "yes" ]; then
3133 echo " 32-bit PowerPC (powerpc)"
3135 CFG_HOST_ARCH=powerpc
3138 if [ "$OPT_VERBOSE" = "yes" ]; then
3139 echo " 64-bit PowerPC (powerpc)"
3141 CFG_HOST_ARCH=powerpc
3144 if [ "$OPT_VERBOSE" = "yes" ]; then
3145 echo " IBM S/390 (s390)"
3150 if [ "$OPT_VERBOSE" = "yes" ]; then
3156 if [ "$OPT_VERBOSE" = "yes" ]; then
3157 echo " Linux on SPARC"
3162 case "$UNAME_MACHINE" in
3164 if [ "$OPT_VERBOSE" = "yes" ]; then
3165 echo " QNX on Intel 80x86 (i386)"
3172 if [ "$OPT_VERBOSE" = "yes" ]; then
3173 echo " Trying '$UNAME_MACHINE'..."
3175 CFG_HOST_ARCH="$UNAME_MACHINE"
3180 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3181 if [ -n "$CFG_ARCH" ]; then
3182 CFG_EMBEDDED=$CFG_ARCH
3185 case "$CFG_EMBEDDED" in
3208 CFG_ARCH="$CFG_EMBEDDED"
3211 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3212 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3213 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3215 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3216 CFG_ARCH=$CFG_HOST_ARCH
3223 # previously, armv6 was a different arch
3229 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3230 if [ "$OPT_VERBOSE" = "yes" ]; then
3231 echo " '$CFG_ARCH' is supported"
3234 if [ "$OPT_VERBOSE" = "yes" ]; then
3235 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3239 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3240 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3241 if [ "$OPT_VERBOSE" = "yes" ]; then
3242 echo " '$CFG_HOST_ARCH' is supported"
3245 if [ "$OPT_VERBOSE" = "yes" ]; then
3246 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3248 CFG_HOST_ARCH=generic
3252 if [ "$OPT_VERBOSE" = "yes" ]; then
3253 echo "System architecture: '$CFG_ARCH'"
3254 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3255 echo "Host architecture: '$CFG_HOST_ARCH'"
3259 #-------------------------------------------------------------------------------
3260 # tests that don't need qmake (must be run before displaying help)
3261 #-------------------------------------------------------------------------------
3263 # detect build style
3264 if [ "$CFG_DEBUG" = "auto" ]; then
3265 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3266 CFG_DEBUG_RELEASE=yes
3268 elif [ "$CFG_DEV" = "yes" ]; then
3269 CFG_DEBUG_RELEASE=no
3272 CFG_DEBUG_RELEASE=no
3276 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3277 QT_CONFIG="$QT_CONFIG build_all"
3280 if [ -z "$PKG_CONFIG" ]; then
3281 # See if PKG_CONFIG is set in the mkspec:
3282 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3284 if [ -z "$PKG_CONFIG" ]; then
3285 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3288 # Work out if we can use pkg-config
3289 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3290 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3292 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3293 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3294 echo >&2 "environment!"
3296 if [ -z "$PKG_CONFIG_PATH" ]; then
3298 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3299 echo >&2 "the host compiler's .pc files will be used. This is probably"
3300 echo >&2 "not what you want."
3302 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3304 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3305 echo >&2 "been set. This means your toolchain's .pc files must contain"
3306 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3307 echo >&2 "tests are failing, please check these files."
3312 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3313 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3314 echo >&2 "dependencies"
3320 if [ ! -n "$PKG_CONFIG" ]; then
3321 QT_CONFIG="$QT_CONFIG no-pkg-config"
3324 # process CFG_MAC_ARCHS
3325 if [ "$PLATFORM_MAC" = "yes" ]; then
3326 # check -arch arguments for validity.
3327 ALLOWED="x86 ppc x86_64 ppc64 i386"
3328 # Save the list so we can re-write it using only valid values
3329 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3331 for i in $CFG_MAC_ARCHS_IN
3333 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3334 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3337 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3338 # These are synonymous values
3339 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3340 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3341 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3343 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3344 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3349 # pass on $CFG_SDK to the configure tests.
3350 if [ '!' -z "$CFG_SDK" ]; then
3351 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3354 # find the default framework value
3355 if [ "$CFG_ARCH" = "macosx" ]; then
3356 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3357 CFG_FRAMEWORK="$CFG_SHARED"
3358 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3360 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3368 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3369 TEST_COMPILER="$CXX"
3371 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3372 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3373 #for Symbian we don't need this checking
3374 if [ -z "$TEST_COMPILER" ]; then
3375 echo "ERROR: Cannot set the compiler for the configuration tests"
3380 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3381 TEST_COMPILER="nacl-gcc"
3385 if [ -n "$CFG_SYSROOT" ]; then
3386 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3387 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3388 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3390 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3394 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3396 # auto-detect precompiled header support
3397 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3398 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3400 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3405 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3407 echo "WARNING: Using universal binaries disables precompiled headers."
3412 #auto-detect DWARF2 on the mac
3413 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3414 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3421 # auto-detect support for -Xarch on the mac
3422 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3423 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3430 # don't autodetect support for separate debug info on objcopy when
3431 # cross-compiling as lots of toolchains seems to have problems with this
3432 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3433 CFG_SEPARATE_DEBUG_INFO="no"
3436 # auto-detect support for separate debug info in objcopy
3437 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3438 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3439 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3440 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3441 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3442 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3443 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3444 CFG_SEPARATE_DEBUG_INFO=no
3448 # binutils on HP-UX is buggy; default to no.
3449 CFG_SEPARATE_DEBUG_INFO=no
3452 CFG_SEPARATE_DEBUG_INFO=yes
3458 # auto-detect -fvisibility support
3459 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3460 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3461 CFG_REDUCE_EXPORTS=no
3463 CFG_REDUCE_EXPORTS=yes
3467 # detect the availability of the -Bsymbolic-functions linker optimization
3468 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3469 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3470 CFG_REDUCE_RELOCATIONS=no
3472 CFG_REDUCE_RELOCATIONS=yes
3476 # auto-detect GNU make support
3477 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3481 # If -opengl wasn't specified, don't try to auto-detect
3482 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3487 if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
3488 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3493 # find the default framework value
3494 if [ "$CFG_ARCH" = "macosx" ]; then
3495 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3496 CFG_FRAMEWORK="$CFG_SHARED"
3497 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3499 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3507 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3508 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3509 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3510 # get the darwin version. 10.0.0 and up means snow leopard.
3511 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3512 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3514 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3519 # x11 tests are done after qmake is built
3522 #setup the build parts
3523 if [ -z "$CFG_BUILD_PARTS" ]; then
3524 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3526 # don't build tools by default when cross-compiling
3527 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3528 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3531 for nobuild in $CFG_NOBUILD_PARTS; do
3532 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3534 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3536 # echo "WARNING: libs is a required part of the build."
3538 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3541 #-------------------------------------------------------------------------------
3542 # post process QT_INSTALL_* variables
3543 #-------------------------------------------------------------------------------
3546 if [ -z "$QT_INSTALL_PREFIX" ]; then
3547 if [ "$CFG_DEV" = "yes" ]; then
3548 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3550 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3553 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3555 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3556 [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
3557 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
3558 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
3559 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS=
3560 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS=
3561 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="\\\\resource\\\\qt$QT_LIBINFIX\\\\plugins"
3562 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="\\\\resource\\\\qt$QT_LIBINFIX\\\\imports"
3563 [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA=
3564 [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations"
3565 [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS=
3566 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES=
3569 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3570 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3571 if [ "$PLATFORM_MAC" = "yes" ]; then
3572 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3575 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3578 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3581 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3582 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3583 if [ "$PLATFORM_MAC" = "yes" ]; then
3584 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3589 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3592 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3595 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3596 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3597 if [ "$PLATFORM_MAC" = "yes" ]; then
3598 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3599 QT_INSTALL_LIBS="/Libraries/Frameworks"
3603 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3605 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3608 if [ -z "$QT_INSTALL_BINS" ]; then #default
3609 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3610 if [ "$PLATFORM_MAC" = "yes" ]; then
3611 QT_INSTALL_BINS="/Developer/Applications/Qt"
3614 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3617 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3620 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3621 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3622 if [ "$PLATFORM_MAC" = "yes" ]; then
3623 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3626 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3628 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3631 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3632 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3633 if [ "$PLATFORM_MAC" = "yes" ]; then
3634 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3637 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3639 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3642 if [ -z "$QT_INSTALL_DATA" ]; then #default
3643 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3645 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3648 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3649 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3651 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3654 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3655 if [ "$PLATFORM_MAC" = "yes" ]; then
3656 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3658 QT_INSTALL_SETTINGS=/etc/xdg
3661 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3664 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3665 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3666 if [ "$PLATFORM_MAC" = "yes" ]; then
3667 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3670 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3672 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3675 #-------------------------------------------------------------------------------
3676 # help - interactive parts of the script _after_ this section please
3677 #-------------------------------------------------------------------------------
3679 # next, emit a usage message if something failed.
3680 if [ "$OPT_HELP" = "yes" ]; then
3681 [ "x$ERROR" = "xyes" ] && echo
3682 if [ "$CFG_NIS" = "no" ]; then
3689 if [ "$CFG_CUPS" = "no" ]; then
3696 if [ "$CFG_ICONV" = "no" ]; then
3703 if [ "$CFG_LARGEFILE" = "no" ]; then
3710 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3717 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3725 if [ "$CFG_XCB" = "no" ]; then
3733 if [ "$CFG_WAYLAND" = "no" ]; then
3740 if [ "$CFG_XINPUT2" = "no" ]; then
3749 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3750 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3751 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3752 [-release] [-debug] [-debug-and-release]
3753 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3754 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3755 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3756 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3757 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3758 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3759 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3760 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3761 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3762 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3763 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3764 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3765 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3766 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3767 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3768 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3769 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3770 [-no-openssl] [-openssl] [-openssl-linked]
3771 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3772 [-no-javascript-jit] [-javascript-jit]
3773 [-no-script] [-script] [-no-scripttools] [-scripttools]
3774 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3775 [-no-location] [-location]
3776 [additional platform specific options (see below)]
3779 Installation options:
3781 -qpa ................ This will enable the QPA build.
3782 QPA is a window system agnostic implementation of Qt.
3784 These are optional, but you may specify install directories.
3786 -prefix <dir> ...... This will install everything relative to <dir>
3787 (default $QT_INSTALL_PREFIX)
3789 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3792 -hostprefix [dir] .. Tools and libraries needed when developing
3793 applications are installed in [dir]. If [dir] is
3794 not given, the current build directory will be used.
3799 * -prefix-install .... Force a sandboxed "local" installation of
3800 Qt. This will install into
3801 $QT_INSTALL_PREFIX, if this option is
3802 disabled then some platforms will attempt a
3803 "system" install by placing default values to
3804 be placed in a system location other than
3807 You may use these to separate different parts of the install:
3809 -bindir <dir> ......... Executables will be installed to <dir>
3810 (default PREFIX/bin)
3811 -libdir <dir> ......... Libraries will be installed to <dir>
3812 (default PREFIX/lib)
3813 -docdir <dir> ......... Documentation will be installed to <dir>
3814 (default PREFIX/doc)
3815 -headerdir <dir> ...... Headers will be installed to <dir>
3816 (default PREFIX/include)
3817 -plugindir <dir> ...... Plugins will be installed to <dir>
3818 (default PREFIX/plugins)
3819 -importdir <dir> ...... Imports for QML will be installed to <dir>
3820 (default PREFIX/imports)
3821 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3823 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3824 (default PREFIX/translations)
3825 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3826 (default PREFIX/etc/settings)
3827 -examplesdir <dir> .... Examples will be installed to <dir>
3828 (default PREFIX/examples)
3832 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3833 that needs to be evaluated. If the evaluation succeeds, the feature is
3834 included. Here is a short explanation of each option:
3836 * -release ........... Compile and link Qt with debugging turned off.
3837 -debug ............. Compile and link Qt with debugging turned on.
3838 -debug-and-release . Compile and link two versions of Qt, with and without
3839 debugging turned on (Mac only).
3841 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3843 -opensource ........ Compile and link the Open-Source Edition of Qt.
3844 -commercial ........ Compile and link the Commercial Edition of Qt.
3847 * -shared ............ Create and use shared Qt libraries.
3848 -static ............ Create and use static Qt libraries.
3850 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3852 -fast .............. Configure Qt quickly by generating Makefiles only for
3853 library and subdirectory targets. All other Makefiles
3854 are created as wrappers, which will in turn run qmake.
3856 -no-largefile ...... Disables large file support.
3857 + -largefile ......... Enables Qt to access files larger than 4 GB.
3860 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3867 if [ "$CFG_DBUS" = "no" ]; then
3876 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3877 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3879 -no-accessibility .. Do not compile Accessibility support.
3880 * -accessibility ..... Compile Accessibility support.
3882 $SHN -no-stl ............ Do not compile STL support.
3883 $SHY -stl ............... Compile STL support.
3885 -no-sql-<driver> ... Disable SQL <driver> entirely.
3886 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3888 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3891 Possible values for <driver>:
3892 [ $CFG_SQL_AVAILABLE ]
3894 -system-sqlite ..... Use sqlite from the operating system.
3896 -no-qt3support ..... Disables the Qt 3 support functionality.
3897 * -qt3support ........ Enables the Qt 3 support functionality.
3899 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3900 + -xmlpatterns ....... Build the QtXmlPatterns module.
3901 QtXmlPatterns is built if a decent C++ compiler
3902 is used and exceptions are enabled.
3904 -no-multimedia ..... Do not build the QtMultimedia module.
3905 + -multimedia ........ Build the QtMultimedia module.
3907 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3908 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3910 -no-phonon ......... Do not build the Phonon module.
3911 + -phonon ............ Build the Phonon module.
3912 Phonon is built if a decent C++ compiler is used.
3913 -no-phonon-backend.. Do not build the platform phonon plugin.
3914 + -phonon-backend..... Build the platform phonon plugin.
3916 -no-svg ............ Do not build the SVG module.
3917 + -svg ............... Build the SVG module.
3919 -no-webkit ......... Do not build the WebKit module.
3920 + -webkit ............ Build the WebKit module.
3921 WebKit is built if a decent C++ compiler is used.
3922 -webkit-debug ...... Build the WebKit module with debug symbols.
3924 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3925 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3927 -no-script ......... Do not build the QtScript module.
3928 + -script ............ Build the QtScript module.
3930 -no-scripttools .... Do not build the QtScriptTools module.
3931 + -scripttools ....... Build the QtScriptTools module.
3933 -no-v8 ............. Do not build the V8 module.
3934 + -v8 ................ Build the V8 module.
3936 -no-declarative ..... Do not build the declarative module.
3937 + -declarative ....... Build the declarative module.
3939 -no-declarative-debug ..... Do not build the declarative debugging support.
3940 + -declarative-debug ....... Build the declarative debugging support.
3942 -no-location ....... Do not build the QtLocation module.
3943 + -location .......... Build the QtLocation module.
3945 -platform target ... The operating system and compiler you are building
3948 See the README file for a list of supported
3949 operating systems and compilers.
3952 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3954 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3955 raster - Software rasterizer
3956 opengl - Rendering via OpenGL, Experimental!
3957 openvg - Rendering via OpenVG, Experimental!
3964 -no-mmx ............ Do not compile with use of MMX instructions.
3965 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3966 -no-sse ............ Do not compile with use of SSE instructions.
3967 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3968 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3969 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3970 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3971 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3972 -no-avx ............ Do not compile with use of AVX instructions.
3973 -no-neon ........... Do not compile with use of NEON instructions.
3975 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3976 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3978 -D <string> ........ Add an explicit define to the preprocessor.
3979 -I <string> ........ Add an explicit include path.
3980 -L <string> ........ Add an explicit library path.
3982 -help, -h .......... Display this information.
3984 Third Party Libraries:
3986 -qt-zlib ........... Use the zlib bundled with Qt.
3987 + -system-zlib ....... Use zlib from the operating system.
3988 See http://www.gzip.org/zlib
3990 -no-gif ............ Do not compile GIF reading support.
3992 -no-libtiff ........ Do not compile TIFF support.
3993 -qt-libtiff ........ Use the libtiff bundled with Qt.
3994 + -system-libtiff .... Use libtiff from the operating system.
3995 See http://www.libtiff.org
3997 -no-libpng ......... Do not compile PNG support.
3998 -qt-libpng ......... Use the libpng bundled with Qt.
3999 + -system-libpng ..... Use libpng from the operating system.
4000 See http://www.libpng.org/pub/png
4002 -no-libmng ......... Do not compile MNG support.
4003 -qt-libmng ......... Use the libmng bundled with Qt.
4004 + -system-libmng ..... Use libmng from the operating system.
4005 See http://www.libmng.com
4007 -no-libjpeg ........ Do not compile JPEG support.
4008 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
4009 + -system-libjpeg .... Use libjpeg from the operating system.
4010 See http://www.ijg.org
4012 -no-openssl ........ Do not compile support for OpenSSL.
4013 + -openssl ........... Enable run-time OpenSSL support.
4014 -openssl-linked .... Enabled linked OpenSSL support.
4016 -ptmalloc .......... Override the system memory allocator with ptmalloc.
4021 -make <part> ....... Add part to the list of parts to be built at make time.
4022 ($QT_DEFAULT_BUILD_PARTS)
4023 -nomake <part> ..... Exclude part from the list of parts to be built.
4025 -R <string> ........ Add an explicit runtime library path to the Qt
4027 -l <string> ........ Add an explicit library.
4029 -no-rpath .......... Do not use the library install path as a runtime
4031 + -rpath ............. Link Qt libraries and executables using the library
4032 install path as a runtime library path. Equivalent
4033 to -R install_libpath
4035 -continue .......... Continue as far as possible if an error occurs.
4037 -verbose, -v ....... Print verbose information about each step of the
4040 -silent ............ Reduce the build output so that warnings and errors
4041 can be seen more easily.
4043 * -no-optimized-qmake ... Do not build qmake optimized.
4044 -optimized-qmake ...... Build qmake optimized.
4046 -no-gui ............ Don't build the Qt GUI library
4048 $NSN -no-nis ............ Do not compile NIS support.
4049 $NSY -nis ............... Compile NIS support.
4051 $CUN -no-cups ........... Do not compile CUPS support.
4052 $CUY -cups .............. Compile CUPS support.
4053 Requires cups/cups.h and libcups.so.2.
4055 $CIN -no-iconv .......... Do not compile support for iconv(3).
4056 $CIY -iconv ............. Compile support for iconv(3).
4058 $PHN -no-pch ............ Do not use precompiled header support.
4059 $PHY -pch ............... Use precompiled header support.
4061 $DBN -no-dbus ........... Do not compile the QtDBus module.
4062 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
4063 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
4065 -reduce-relocations ..... Reduce relocations in the libraries through extra
4066 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
4067 experimental; needs GNU ld >= 2.18).
4070 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
4071 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
4078 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4086 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4090 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4091 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4093 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
4094 $XCBY -xcb ............... Compile Xcb support.
4096 $XWN -no-wayland......... Do not compile Wayland support.
4097 $XWY -wayland .......... Compile Wayland support.
4103 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4107 $X2N -no-xinput2......... Do not compile XInput2 support.
4108 $X2Y -xinput2............ Compile XInput2 support.
4114 if [ "$PLATFORM_X11" = "yes" ]; then
4115 if [ "$CFG_SM" = "no" ]; then
4122 if [ "$CFG_XSHAPE" = "no" ]; then
4129 if [ "$CFG_XVIDEO" = "no" ]; then
4136 if [ "$CFG_XINERAMA" = "no" ]; then
4143 if [ "$CFG_FONTCONFIG" = "no" ]; then
4150 if [ "$CFG_XCURSOR" = "no" ]; then
4157 if [ "$CFG_XFIXES" = "no" ]; then
4164 if [ "$CFG_XRANDR" = "no" ]; then
4171 if [ "$CFG_XRENDER" = "no" ]; then
4178 if [ "$CFG_MITSHM" = "no" ]; then
4185 if [ "$CFG_XINPUT" = "no" ]; then
4192 if [ "$CFG_XKB" = "no" ]; then
4199 if [ "$CFG_IM" = "no" ]; then
4210 -no-gtkstyle ....... Do not build the GTK theme integration.
4211 + -gtkstyle .......... Build the GTK theme integration.
4213 * -no-nas-sound ...... Do not compile in NAS sound support.
4214 -system-nas-sound .. Use NAS libaudio from the operating system.
4215 See http://radscan.com/nas.html
4217 -egl ............... Use EGL instead of GLX to manage contexts.
4218 When building for desktop OpenGL, this option will
4219 make Qt use EGL to manage contexts rather than the
4220 GLX, which is the default. Note: For OpenGL ES, EGL
4223 -no-opengl ......... Do not support OpenGL.
4224 + -opengl <api> ...... Enable OpenGL support.
4225 With no parameter, this will auto-detect the "best"
4226 OpenGL API to use. If desktop OpenGL is available, it
4227 will be used. Use desktop or es2 for <api>
4228 to force the use of the Desktop OpenGL or
4229 OpenGL ES 2 APIs instead.
4231 -no-openvg ........ Do not support OpenVG.
4232 + -openvg ........... Enable OpenVG support.
4233 Requires EGL support, typically supplied by an OpenGL
4234 or other graphics implementation.
4236 $SMN -no-sm ............. Do not support X Session Management.
4237 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4239 $SHN -no-xshape ......... Do not compile XShape support.
4240 $SHY -xshape ............ Compile XShape support.
4241 Requires X11/extensions/shape.h.
4243 $XVN -no-xvideo ......... Do not compile XVideo support.
4244 $XVY -xvideo ............ Compile XVideo support.
4245 Requires X11/extensions/Xv.h & Xvlib.h.
4247 $SHN -no-xsync .......... Do not compile XSync support.
4248 $SHY -xsync ............. Compile XSync support.
4249 Requires X11/extensions/sync.h.
4251 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4252 $XAY -xinerama .......... Compile Xinerama support.
4253 Requires X11/extensions/Xinerama.h and libXinerama.
4254 By default, Xinerama support will be compiled if
4255 available and the shared libraries are dynamically
4258 $XCN -no-xcursor ........ Do not compile Xcursor support.
4259 $XCY -xcursor ........... Compile Xcursor support.
4260 Requires X11/Xcursor/Xcursor.h and libXcursor.
4261 By default, Xcursor support will be compiled if
4262 available and the shared libraries are dynamically
4265 $XFN -no-xfixes ......... Do not compile Xfixes support.
4266 $XFY -xfixes ............ Compile Xfixes support.
4267 Requires X11/extensions/Xfixes.h and libXfixes.
4268 By default, Xfixes support will be compiled if
4269 available and the shared libraries are dynamically
4272 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4273 $XZY -xrandr ............ Compile Xrandr support.
4274 Requires X11/extensions/Xrandr.h and libXrandr.
4276 $XRN -no-xrender ........ Do not compile Xrender support.
4277 $XRY -xrender ........... Compile Xrender support.
4278 Requires X11/extensions/Xrender.h and libXrender.
4280 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4281 $XMY -mitshm ............ Compile MIT-SHM support.
4282 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4284 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4285 $FCGY -fontconfig ........ Compile FontConfig support.
4286 Requires fontconfig/fontconfig.h, libfontconfig,
4287 freetype.h and libfreetype.
4289 $XIN -no-xinput ......... Do not compile Xinput support.
4290 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4291 which requires IRIX with wacom.h and libXi or
4292 XFree86 with X11/extensions/XInput.h and libXi.
4294 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4295 $XKY -xkb ............... Compile XKB support.
4300 if [ "$PLATFORM_MAC" = "yes" ]; then
4305 -Fstring ........... Add an explicit framework path.
4306 -fw string ......... Add an explicit framework.
4308 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4310 -carbon .............Build the Carbon version of Qt. 64-bit archs
4311 are not supported by carbon and will be built
4314 * -framework ......... Build Qt as a series of frameworks and
4315 link tools against those frameworks.
4316 -no-framework ...... Do not build Qt as a series of frameworks.
4318 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4319 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4321 -universal ......... Equivalent to -arch "ppc x86"
4323 -arch <arch> ....... Build Qt for <arch>
4324 Example values for <arch>: x86 ppc x86_64 ppc64
4325 Multiple -arch arguments can be specified.
4327 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4328 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4330 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4331 It is only available to Cocoa builds.
4332 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4333 QT_ENABLE_HARFBUZZ environment variable.
4338 if [ "$PLATFORM_QWS" = "yes" ]; then
4340 Qt for Embedded Linux:
4342 -embedded <arch> .... This will enable the embedded build, you must have a
4343 proper license for this switch to work.
4344 Example values for <arch>: arm mips x86 generic
4348 if [ "$PLATFORM_QPA" = "yes" ]; then
4354 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4357 -xplatform target ... The target platform when cross-compiling.
4359 -no-feature-<feature> Do not compile in <feature>.
4360 -feature-<feature> .. Compile in <feature>. The available features
4361 are described in src/corelib/global/qfeatures.txt
4363 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4364 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4366 The floating point format is usually autodetected by configure. Use this
4367 to override the detected value.
4369 -little-endian ...... Target platform is little endian (LSB first).
4370 -big-endian ......... Target platform is big endian (MSB first).
4372 -host-little-endian . Host platform is little endian (LSB first).
4373 -host-big-endian .... Host platform is big endian (MSB first).
4375 You only need to specify the endianness when
4376 cross-compiling, otherwise the host
4377 endianness will be used.
4379 -no-freetype ........ Do not compile in Freetype2 support.
4380 -qt-freetype ........ Use the libfreetype bundled with Qt.
4381 * -system-freetype .... Use libfreetype from the operating system.
4382 See http://www.freetype.org/
4384 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4385 default ($CFG_QCONFIG).
4387 -no-opengl .......... Do not support OpenGL.
4388 -opengl <api> ....... Enable OpenGL ES support
4389 With no parameter, this will attempt to auto-detect
4390 OpenGL ES 2, or regular desktop OpenGL.
4391 Use es2 for <api> to override auto-detection.
4395 if [ "$PLATFORM_QWS" = "yes" ]; then
4398 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4399 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4401 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4402 by default all available decorations are on.
4403 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4404 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4405 linked to at run time.
4406 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4407 -no-decoration-<style> ....Disable decoration <style> entirely.
4408 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4410 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4411 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4412 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4413 linked to at run time.
4414 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4415 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4416 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4418 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4419 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4421 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4423 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4425 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4426 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4428 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4429 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4430 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4432 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4433 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4434 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4436 -iwmmxt ............ Compile using the iWMMXt instruction set
4437 (available on some XScale CPUs).
4441 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4442 if [ "$CFG_GLIB" = "no" ]; then
4450 $GBN -no-glib ........... Do not compile Glib support.
4451 $GBY -glib .............. Compile Glib support.
4456 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
4459 Qt for Symbian only:
4460 -no-s60 ............ Do not compile in S60 support.
4461 + -s60 ............... Compile with support for the S60 UI Framework.
4462 -no-style-s60....... Disable s60 style
4463 + -qt-style-s60....... Enable s60 style in the Qt Library
4465 -no-usedeffiles .... Disable the usage of DEF files.
4466 * -usedeffiles ....... Enable the usage of DEF files.
4469 [ "x$ERROR" = "xyes" ] && exit 1
4474 # -----------------------------------------------------------------------------
4475 # LICENSING, INTERACTIVE PART
4476 # -----------------------------------------------------------------------------
4478 if [ "$PLATFORM_QWS" = "yes" ]; then
4479 Platform="Qt for Embedded Linux"
4480 elif [ "$PLATFORM_QPA" = "yes" ]; then
4481 Platform="Qt Lighthouse"
4482 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
4483 Platform="Qt for Symbian"
4484 elif [ "$PLATFORM_MAC" = "yes" ]; then
4485 Platform="Qt for Mac OS X"
4486 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4487 Platform="Qt for Windows"
4488 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4490 Platform="Qt for Linux/X11"
4494 echo "This is the $Platform ${EditionString} Edition."
4497 if [ "$Edition" = "NokiaInternalBuild" ]; then
4498 echo "Detected -nokia-developer option"
4499 echo "Nokia employees and agents are allowed to use this software under"
4500 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4501 elif [ "$Edition" = "OpenSource" ]; then
4503 echo "You are licensed to use this software under the terms of"
4504 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4505 if [ -f "$relpath/LICENSE.GPL3" ]; then
4506 echo "You are also licensed to use this software under the terms of"
4507 echo "the GNU General Public License (GPL) versions 3."
4513 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4514 echo "You have already accepted the terms of the $LicenseType license."
4517 if [ -f "$relpath/LICENSE.GPL3" ]; then
4518 echo "Type '3' to view the GNU General Public License version 3."
4520 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4521 echo "Type 'yes' to accept this license offer."
4522 echo "Type 'no' to decline this license offer."
4524 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4528 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4530 elif [ "$acceptance" = "no" ]; then
4531 echo "You are not licensed to use this software."
4534 elif [ "$acceptance" = "3" ]; then
4535 more "$relpath/LICENSE.GPL3"
4536 elif [ "$acceptance" = "L" ]; then
4537 more "$relpath/LICENSE.LGPL"
4540 elif [ "$Edition" = "Preview" ]; then
4541 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4544 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4545 echo "You have already accepted the terms of the $LicenseType license."
4548 echo "You are licensed to use this software under the terms of"
4549 echo "the $TheLicense"
4551 echo "Type '?' to read the Preview License."
4552 echo "Type 'yes' to accept this license offer."
4553 echo "Type 'no' to decline this license offer."
4555 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4559 if [ "$acceptance" = "yes" ]; then
4561 elif [ "$acceptance" = "no" ] ;then
4562 echo "You are not licensed to use this software."
4565 elif [ "$acceptance" = "?" ]; then
4566 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4569 elif [ "$Edition" != "OpenSource" ]; then
4570 if [ -n "$ExpiryDate" ]; then
4571 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4572 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4573 Today=`date +%Y%m%d`
4574 if [ "$Today" -gt "$ExpiryDate" ]; then
4575 case "$LicenseType" in
4576 Commercial|Academic|Educational)
4577 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4579 echo "NOTICE NOTICE NOTICE NOTICE"
4581 echo " Your support and upgrade period has expired."
4583 echo " You are no longer licensed to use this version of Qt."
4584 echo " Please contact qt-info@nokia.com to renew your support"
4585 echo " and upgrades for this license."
4587 echo "NOTICE NOTICE NOTICE NOTICE"
4592 echo "WARNING WARNING WARNING WARNING"
4594 echo " Your support and upgrade period has expired."
4596 echo " You may continue to use your last licensed release"
4597 echo " of Qt under the terms of your existing license"
4598 echo " agreement. But you are not entitled to technical"
4599 echo " support, nor are you entitled to use any more recent"
4600 echo " Qt releases."
4602 echo " Please contact qt-info@nokia.com to renew your"
4603 echo " support and upgrades for this license."
4605 echo "WARNING WARNING WARNING WARNING"
4612 echo "NOTICE NOTICE NOTICE NOTICE"
4614 echo " Your Evaluation license has expired."
4616 echo " You are no longer licensed to use this software. Please"
4617 echo " contact qt-info@nokia.com to purchase license, or install"
4618 echo " the Qt Open Source Edition if you intend to develop free"
4621 echo "NOTICE NOTICE NOTICE NOTICE"
4628 TheLicense=`head -n 1 "$outpath/LICENSE"`
4630 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4631 echo "You have already accepted the terms of the $TheLicense."
4634 echo "You are licensed to use this software under the terms of"
4635 echo "the $TheLicense."
4637 echo "Type '?' to view the $TheLicense."
4638 echo "Type 'yes' to accept this license offer."
4639 echo "Type 'no' to decline this license offer."
4641 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4645 if [ "$acceptance" = "yes" ]; then
4647 elif [ "$acceptance" = "no" ]; then
4648 echo "You are not licensed to use this software."
4651 else [ "$acceptance" = "?" ]
4652 more "$outpath/LICENSE"
4657 # this should be moved somewhere else
4660 AIX_VERSION=`uname -v`
4661 if [ "$AIX_VERSION" -lt "5" ]; then
4662 QMakeVar add QMAKE_LIBS_X11 -lbind
4669 #-------------------------------------------------------------------------------
4670 # generate qconfig.cpp
4671 #-------------------------------------------------------------------------------
4672 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4674 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4675 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4676 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4677 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4678 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4679 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4680 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4681 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4682 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4683 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4684 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4685 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4686 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4688 TODAY=`date +%Y-%m-%d`
4689 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4691 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4692 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4694 /* Installation date */
4695 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4699 if [ ! -z "$QT_HOST_PREFIX" ]; then
4700 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4701 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4702 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4703 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4704 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4705 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4706 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4707 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4708 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4709 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4710 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4712 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4714 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4715 /* Installation Info */
4716 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4717 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4718 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4719 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4720 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4721 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4722 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4723 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4724 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4725 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4726 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4727 #else // QT_BOOTSTRAPPED
4731 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4732 /* Installation Info */
4733 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4734 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4735 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4736 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4737 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4738 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4739 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4740 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4741 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4742 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4743 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4746 if [ ! -z "$QT_HOST_PREFIX" ]; then
4747 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4748 #endif // QT_BOOTSTRAPPED
4753 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4754 /* strlen( "qt_lcnsxxxx" ) == 12 */
4755 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4756 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4757 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4758 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4759 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4760 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4761 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4762 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4763 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4764 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4765 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4766 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4767 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4770 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4771 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4772 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4774 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4775 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4776 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4779 # -----------------------------------------------------------------------------
4780 if [ "$LicenseType" = "Evaluation" ]; then
4781 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4782 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4783 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4786 if [ -n "$EVALKEY" ]; then
4787 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4788 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4789 /* Evaluation license key */
4790 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4792 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4796 # -----------------------------------------------------------------------------
4798 # -----------------------------------------------------------------------------
4801 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4803 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4804 if [ "$OPT_SHADOW" = "yes" ]; then
4805 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4806 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4807 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4812 # $2: optional transformation
4813 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4814 # is where the resulting variable is written to
4815 # Assumes that the optional transformation produces the same variable name for each hit
4816 setBootstrapVariable()
4818 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4824 valStart = index($0, "=") + 1
4827 if (substr($0, valStart - 2, 1) == "+") {
4831 variable = substr($0, 0, valStart - 2 - append)
4832 value = substr($0, valStart)
4833 gsub("[ \t]+", "", variable)
4834 gsub("^[ \t]+", "", value)
4835 gsub("[ \t]+$", "", value)
4837 if (append == 1 && length(combinedValue) > 0) {
4838 combinedValue = combinedValue " " value
4840 combinedValue = value
4844 if (length(combinedValue) > 0) {
4845 printf "%s = %s\n", variable, combinedValue
4851 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4852 echo "Creating qmake. Please wait..."
4855 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4856 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4857 if [ -f "$QCONFIG_H" ]; then
4858 OLD_QCONFIG_H=$QCONFIG_H
4859 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4862 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4863 # when building qmake, we use #defines for the install paths,
4864 # however they are real functions in the library
4865 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4866 mkdir -p "$outpath/src/corelib/global"
4867 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4868 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4871 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4873 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4874 rm -rf mkspecs/default
4875 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4877 for mkfile in GNUmakefile Makefile; do
4880 in_mkfile="${mkfile}.in"
4881 if [ "$mkfile" = "Makefile" ]; then
4882 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4883 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4885 in_mkfile="${mkfile}.unix"
4887 in_mkfile="$relpath/qmake/$in_mkfile"
4888 mkfile="$outpath/qmake/$mkfile"
4889 if [ -f "$mkfile" ]; then
4890 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4893 [ -f "$in_mkfile" ] || continue
4895 echo "########################################################################" > "$mkfile"
4896 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4897 echo "########################################################################" >> "$mkfile"
4900 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4901 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4902 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4904 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4905 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4908 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4909 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4910 if [ "$CFG_SILENT" = "yes" ]; then
4911 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4912 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4914 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4915 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4917 setBootstrapVariable QMAKE_CFLAGS
4918 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4919 setBootstrapVariable QMAKE_LFLAGS
4921 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4922 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4923 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4925 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4926 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4927 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4928 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4929 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4930 elif [ "$CFG_DEBUG" = "yes" ]; then
4931 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4932 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4933 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4934 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4937 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4938 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4939 for rpath in $RPATH_FLAGS; do
4940 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4943 if [ "$BUILD_ON_MAC" = "yes" ]; then
4944 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4945 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4946 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4947 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4948 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4949 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4950 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4951 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4952 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4953 X86_CFLAGS="-arch i386"
4954 X86_LFLAGS="-arch i386"
4955 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4956 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4957 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4959 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4960 PPC_CFLAGS="-arch ppc"
4961 PPC_LFLAGS="-arch ppc"
4962 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4963 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4964 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4966 if [ '!' -z "$CFG_SDK" ]; then
4967 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4968 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4969 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4970 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4971 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4974 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4975 if [ '!' -z "$D_FLAGS" ]; then
4976 for DEF in $D_FLAGS; do
4977 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4980 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4981 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4982 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4983 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4985 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4986 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4987 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4988 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4989 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4990 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4991 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4992 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4993 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4994 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4996 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4997 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4998 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4999 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
5004 QMAKE_BUILD_ERROR=no
5005 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
5006 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
5007 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
5008 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
5011 #-------------------------------------------------------------------------------
5012 # tests that need qmake
5013 #-------------------------------------------------------------------------------
5015 # detect availability of float math.h functions
5016 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
5017 CFG_USE_FLOATMATH=yes
5019 CFG_USE_FLOATMATH=no
5022 # detect mmx support
5023 if [ "${CFG_MMX}" = "auto" ]; then
5024 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
5031 # detect 3dnow support
5032 if [ "${CFG_3DNOW}" = "auto" ]; then
5033 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
5040 # detect sse support
5041 if [ "${CFG_SSE}" = "auto" ]; then
5042 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
5049 # detect sse2 support
5050 if [ "${CFG_SSE2}" = "auto" ]; then
5051 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
5058 # detect sse3 support
5059 if [ "${CFG_SSE3}" = "auto" ]; then
5060 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
5067 # detect ssse3 support
5068 if [ "${CFG_SSSE3}" = "auto" ]; then
5069 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
5076 # detect sse4.1 support
5077 if [ "${CFG_SSE4_1}" = "auto" ]; then
5078 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
5085 # detect sse4.2 support
5086 if [ "${CFG_SSE4_2}" = "auto" ]; then
5087 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
5094 # detect avx support
5095 if [ "${CFG_AVX}" = "auto" ]; then
5096 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5103 # check iWMMXt support
5104 if [ "$CFG_IWMMXT" = "yes" ]; then
5105 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5106 if [ $? != "0" ]; then
5107 echo "The iWMMXt functionality test failed!"
5108 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5113 # detect neon support
5114 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5115 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
5122 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5124 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5125 QMakeVar set styles "windows s60" #overwrite previous default
5129 if [ "$CFG_LARGEFILE" = auto ]; then
5132 if [ "$CFG_PHONON" = auto ]; then
5136 if test -z "$EPOCROOT"; then
5137 echo "Please export EPOCROOT. It should point to the sdk install dir"
5140 if test ! -d "$EPOCROOT/epoc32"; then
5141 echo "Could not find the 'epoc32' dir in your EPOCROOT."
5145 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
5146 # Raptor does not support configure tests.
5148 # the main commands needed to compile;
5149 (mkdir -p config.tests/symbian/rcomp
5150 cd config.tests/symbian/rcomp
5151 rm -f rcomp_test.rsg
5152 touch rcomp_test.rpp rcomp_test.rsc rcomp_test.rss
5153 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
5154 if test ! -f rcomp_test.rsg; then
5155 echo "Finding a working rcomp in your PATH failed."
5156 echo "Fatal error. Make sure you have the epoc tools working and in your PATH";
5161 # compile a simple main that uses printf
5162 if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS
5164 echo "Testing your compiler failed. Could not compile a simple application."
5165 echo "Fatal error; Rerun configure with -verbose to get more details."
5172 if [ "$CFG_ZLIB" = "no" ]; then
5173 # Note: Qt no longer support builds without zlib
5174 # So we force a "no" to be "auto" here.
5175 # If you REALLY really need no zlib support, you can still disable
5176 # it by doing the following:
5177 # add "no-zlib" to mkspecs/qconfig.pri
5178 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5180 # There's no guarantee that Qt will build under those conditions
5185 if [ "$CFG_ZLIB" = "auto" ]; then
5186 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
5193 if [ "$CFG_LARGEFILE" = "auto" ]; then
5194 #Large files should be enabled for all Linux systems
5199 if [ "$CFG_S60" = "auto" ]; then
5200 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5207 if [ "$CFG_QS60STYLE" = "auto" ]; then
5208 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5215 if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then
5216 # elf2e32 crashes when using def files together with gcce.
5217 if [ "$XPLATFORM_SYMBIAN" = "yes" ] && [ "$CFG_DEV" = "no" ] && [ "$XPLATFORM" != "symbian-gcce" ]; then
5218 CFG_SYMBIAN_DEFFILES=yes
5220 CFG_SYMBIAN_DEFFILES=no
5224 # detect how jpeg should be built
5225 if [ "$CFG_JPEG" = "auto" ]; then
5226 if [ "$CFG_SHARED" = "yes" ]; then
5233 if [ "$CFG_LIBJPEG" = "auto" ]; then
5234 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
5241 # detect how gif should be built
5242 if [ "$CFG_GIF" = "auto" ]; then
5243 if [ "$CFG_SHARED" = "yes" ]; then
5250 # detect how tiff should be built
5251 if [ "$CFG_TIFF" = "auto" ]; then
5252 if [ "$CFG_SHARED" = "yes" ]; then
5260 if [ "$CFG_LIBTIFF" = "auto" ]; then
5261 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
5268 # detect how mng should be built
5269 if [ "$CFG_MNG" = "auto" ]; then
5270 if [ "$CFG_SHARED" = "yes" ]; then
5277 if [ "$CFG_LIBMNG" = "auto" ]; then
5278 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
5286 if [ "$CFG_LIBPNG" = "auto" ]; then
5287 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
5294 # detect accessibility
5295 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5296 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5297 # accessibility is currently unsupported
5298 CFG_ACCESSIBILITY=no
5300 CFG_ACCESSIBILITY=yes
5304 # auto-detect SQL-modules support
5305 for _SQLDR in $CFG_SQL_AVAILABLE; do
5308 if [ "$CFG_SQL_mysql" != "no" ]; then
5309 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5310 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5311 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5312 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5313 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5314 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5315 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5317 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5318 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5319 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5320 echo " You need MySql 4 or higher."
5321 echo " If you believe this message is in error you may use the continue"
5322 echo " switch (-continue) to $0 to continue."
5327 QT_LFLAGS_MYSQL_R=""
5331 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
5332 QMakeVar add CONFIG use_libmysqlclient_r
5333 if [ "$CFG_SQL_mysql" = "auto" ]; then
5334 CFG_SQL_mysql=plugin
5336 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5337 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
5338 if [ "$CFG_SQL_mysql" = "auto" ]; then
5339 CFG_SQL_mysql=plugin
5342 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5343 echo "MySQL support cannot be enabled due to functionality tests!"
5344 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5345 echo " If you believe this message is in error you may use the continue"
5346 echo " switch (-continue) to $0 to continue."
5351 QT_LFLAGS_MYSQL_R=""
5359 if [ "$CFG_SQL_psql" != "no" ]; then
5360 # Be careful not to use native pg_config when cross building.
5361 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5362 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5363 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5365 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5366 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5367 # But, respect PSQL_LIBS if set
5368 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5369 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
5370 if [ "$CFG_SQL_psql" = "auto" ]; then
5374 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5375 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5376 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5377 echo " If you believe this message is in error you may use the continue"
5378 echo " switch (-continue) to $0 to continue."
5389 if [ "$CFG_SQL_odbc" != "no" ]; then
5390 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
5391 if [ "$CFG_SQL_odbc" = "auto" ]; then
5395 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
5396 QT_LFLAGS_ODBC="-liodbc"
5397 if [ "$CFG_SQL_odbc" = "auto" ]; then
5401 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5402 echo "ODBC support cannot be enabled due to functionality tests!"
5403 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5404 echo " If you believe this message is in error you may use the continue"
5405 echo " switch (-continue) to $0 to continue."
5415 if [ "$CFG_SQL_oci" != "no" ]; then
5416 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
5417 if [ "$CFG_SQL_oci" = "auto" ]; then
5421 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5422 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5423 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5424 echo " If you believe this message is in error you may use the continue"
5425 echo " switch (-continue) to $0 to continue."
5434 if [ "$CFG_SQL_tds" != "no" ]; then
5435 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5436 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5437 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
5438 if [ "$CFG_SQL_tds" = "auto" ]; then
5442 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5443 echo "TDS support cannot be enabled due to functionality tests!"
5444 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5445 echo " If you believe this message is in error you may use the continue"
5446 echo " switch (-continue) to $0 to continue."
5455 if [ "$CFG_SQL_db2" != "no" ]; then
5456 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
5457 if [ "$CFG_SQL_db2" = "auto" ]; then
5461 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5462 echo "ODBC support cannot be enabled due to functionality tests!"
5463 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5464 echo " If you believe this message is in error you may use the continue"
5465 echo " switch (-continue) to $0 to continue."
5474 if [ "$CFG_SQL_ibase" != "no" ]; then
5475 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
5476 if [ "$CFG_SQL_ibase" = "auto" ]; then
5477 CFG_SQL_ibase=plugin
5480 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5481 echo "InterBase support cannot be enabled due to functionality tests!"
5482 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5483 echo " If you believe this message is in error you may use the continue"
5484 echo " switch (-continue) to $0 to continue."
5493 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5494 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
5495 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5496 CFG_SQL_sqlite2=plugin
5499 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5500 echo "SQLite2 support cannot be enabled due to functionality tests!"
5501 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5502 echo " If you believe this message is in error you may use the continue"
5503 echo " switch (-continue) to $0 to continue."
5512 if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
5513 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5514 # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file and should be marked as driver.
5515 # Configuration parameters should be set
5517 QT_LFLAGS_SQLITE=-lsqlite3
5518 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5521 if [ "$CFG_SQL_sqlite" != "no" ]; then
5522 SQLITE_AUTODETECT_FAILED="no"
5523 if [ "$CFG_SQLITE" = "system" ]; then
5524 if [ -n "$PKG_CONFIG" ]; then
5525 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5526 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5528 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
5529 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5530 CFG_SQL_sqlite=plugin
5532 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5534 SQLITE_AUTODETECT_FAILED="yes"
5537 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5538 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5539 CFG_SQL_sqlite=plugin
5542 SQLITE_AUTODETECT_FAILED="yes"
5546 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5547 echo "SQLite support cannot be enabled due to functionality tests!"
5548 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5549 echo " If you believe this message is in error you may use the continue"
5550 echo " switch (-continue) to $0 to continue."
5556 if [ "$OPT_VERBOSE" = "yes" ]; then
5557 echo "unknown SQL driver: $_SQLDR"
5563 # auto-detect NIS support
5564 if [ "$CFG_NIS" != "no" ]; then
5565 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
5568 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5569 echo "NIS support cannot be enabled due to functionality tests!"
5570 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5571 echo " If you believe this message is in error you may use the continue"
5572 echo " switch (-continue) to $0 to continue."
5580 # auto-detect CUPS support
5581 if [ "$CFG_CUPS" != "no" ]; then
5582 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
5585 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5586 echo "Cups support cannot be enabled due to functionality tests!"
5587 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5588 echo " If you believe this message is in error you may use the continue"
5589 echo " switch (-continue) to $0 to continue."
5597 # auto-detect iconv(3) support
5598 if [ "$CFG_ICONV" != "no" ]; then
5599 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5601 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
5603 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
5605 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
5608 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5609 echo "Iconv support cannot be enabled due to functionality tests!"
5610 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5611 echo " If you believe this message is in error you may use the continue"
5612 echo " switch (-continue) to $0 to continue."
5620 # auto-detect libdbus-1 support
5621 if [ "$CFG_DBUS" != "no" ]; then
5622 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5623 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5624 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5626 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
5627 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5628 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5629 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5631 if [ "$CFG_DBUS" = "auto" ]; then
5633 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5634 # CFG_DBUS is "yes" or "linked" here
5636 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5637 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5638 echo " If you believe this message is in error you may use the continue"
5639 echo " switch (-continue) to $0 to continue."
5645 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5646 CFG_MULTIMEDIA="$CFG_GUI"
5649 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5650 echo "QtMultimedia requested, but it can't be built without QtGui"
5654 # Generate a CRC of the namespace for using in constants for the Carbon port.
5655 # This should mean that you really *can* load two Qt's and have our custom
5656 # Carbon events work.
5657 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5658 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`
5661 # X11/QWS/Lighthouse
5662 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5664 # auto-detect Glib support
5665 if [ "$CFG_GLIB" != "no" ]; then
5666 if [ -n "$PKG_CONFIG" ]; then
5667 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5668 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5670 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
5672 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5673 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5675 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5676 echo "Glib support cannot be enabled due to functionality tests!"
5677 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5678 echo " If you believe this message is in error you may use the continue"
5679 echo " switch (-continue) to $0 to continue."
5687 if [ "$CFG_GUI" = "no" ]; then
5688 if [ "$CFG_PHONON" = "auto" ]; then
5691 if [ "$CFG_PHONON" != "no" ]; then
5692 echo "Phonon enabled, but GUI disabled."
5693 echo " You might need to either enable the GUI or disable Phonon"
5698 # Auto-detect GStreamer support (needed for Phonon)
5699 if [ "$CFG_PHONON" != "no" ]; then
5700 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5701 if [ -n "$PKG_CONFIG" ]; then
5702 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5703 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5705 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
5707 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5708 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5710 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5711 echo "Gstreamer support cannot be enabled due to functionality tests!"
5712 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5713 echo " If you believe this message is in error you may use the continue"
5714 echo " switch (-continue) to $0 to continue."
5720 elif [ "$CFG_GLIB" = "no" ]; then
5727 if [ "$CFG_PHONON" != "no" ]; then
5728 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5729 if [ "$CFG_GSTREAMER" = "yes" ]; then
5732 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5733 echo "Phonon support cannot be enabled due to functionality tests!"
5734 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5735 echo " If you believe this message is in error you may use the continue"
5736 echo " switch (-continue) to $0 to continue."
5747 # auto-detect icd support
5748 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5749 if [ -n "$PKG_CONFIG" ]; then
5750 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5751 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5753 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
5754 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5755 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5756 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5758 if [ "$CFG_ICD" = "auto" ]; then
5760 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5763 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5764 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5765 echo " If you believe this message is in error you may use the continue"
5766 echo " switch (-continue) to $0 to continue."
5770 elif [ "$CFG_GLIB" = "no" ]; then
5774 # auto-detect libicu support
5775 if [ "$CFG_ICU" != "no" ]; then
5776 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5777 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5779 if [ "$CFG_ICU" = "auto" ]; then
5781 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5784 echo "The ICU library support cannot be enabled."
5785 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5786 echo " If you believe this message is in error you may use the continue"
5787 echo " switch (-continue) to $0 to continue."
5793 # Auto-detect PulseAudio support
5794 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5795 if [ -n "$PKG_CONFIG" ]; then
5796 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5797 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5799 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
5801 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5802 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5804 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5805 echo "PulseAudio support cannot be enabled due to functionality tests!"
5806 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5807 echo " If you believe this message is in error you may use the continue"
5808 echo " switch (-continue) to $0 to continue."
5815 fi # X11/QWS/Lighthouse
5818 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5819 x11tests="$relpath/config.tests/x11"
5822 # work around broken X11 headers when using GCC 2.95 or later
5824 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5825 if [ $NOTYPE = "yes" ]; then
5826 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5827 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5830 # Check we actually have X11 :-)
5831 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5832 if [ $? != "0" ]; then
5833 echo "Basic XLib functionality test failed!"
5834 echo " You might need to modify the include and library search paths by editing"
5835 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5840 # X11/MINGW/SYMBIAN OpenGL
5841 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIAN" = "yes" ]; then
5842 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5843 if [ "$CFG_GUI" = "no" ]; then
5844 if [ "$CFG_OPENGL" = "auto" ]; then
5847 if [ "$CFG_OPENGL" != "no" ]; then
5848 echo "OpenGL enabled, but GUI disabled."
5849 echo " You might need to either enable the GUI or disable OpenGL"
5853 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5854 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
5856 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
5858 if [ "$CFG_EGL" = "no" ]; then
5862 if [ "$CFG_OPENGL" = "yes" ]; then
5863 echo "All the OpenGL functionality tests failed!"
5864 echo " You might need to modify the include and library search paths by editing"
5865 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5866 echo " ${XQMAKESPEC}."
5873 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5874 if [ "$CFG_OPENGL" = "desktop" ]; then
5875 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5876 if [ $? != "0" ]; then
5877 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5884 elif [ "$CFG_OPENGL" = "es2" ]; then
5886 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5887 if [ $? != "0" ]; then
5888 echo "The OpenGL ES 2.0 functionality test failed!"
5889 echo " You might need to modify the include and library search paths by editing"
5890 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5891 echo " ${XQMAKESPEC}."
5894 elif [ "$CFG_OPENGL" = "desktop" ]; then
5895 # Desktop OpenGL support
5896 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5897 if [ $? != "0" ]; then
5898 echo "The OpenGL functionality test failed!"
5899 echo " You might need to modify the include and library search paths by editing"
5900 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5901 echo " ${XQMAKESPEC}."
5906 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5907 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5908 if [ $? != "0" ]; then
5909 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5917 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5918 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5919 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5920 CFG_GRAPHICS_SYSTEM=default
5922 fi # X11/MINGW OpenGL
5925 if [ "$PLATFORM_X11" = "yes" ]; then
5926 # auto-detect Xcursor support
5927 if [ "$CFG_XCURSOR" != "no" ]; then
5928 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
5929 if [ "$CFG_XCURSOR" != "runtime" ]; then
5933 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5934 echo "Xcursor support cannot be enabled due to functionality tests!"
5935 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5936 echo " If you believe this message is in error you may use the continue"
5937 echo " switch (-continue) to $0 to continue."
5945 # auto-detect Xfixes support
5946 if [ "$CFG_XFIXES" != "no" ]; then
5947 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5948 if [ "$CFG_XFIXES" != "runtime" ]; then
5952 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5953 echo "Xfixes support cannot be enabled due to functionality tests!"
5954 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5955 echo " If you believe this message is in error you may use the continue"
5956 echo " switch (-continue) to $0 to continue."
5964 # auto-detect Xrandr support (resize and rotate extension)
5965 if [ "$CFG_XRANDR" != "no" ]; then
5966 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
5967 if [ "$CFG_XRANDR" != "runtime" ]; then
5971 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5972 echo "Xrandr support cannot be enabled due to functionality tests!"
5973 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5974 echo " If you believe this message is in error you may use the continue"
5975 echo " switch (-continue) to $0 to continue."
5983 # auto-detect Xrender support
5984 if [ "$CFG_XRENDER" != "no" ]; then
5985 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
5988 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5989 echo "Xrender support cannot be enabled due to functionality tests!"
5990 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5991 echo " If you believe this message is in error you may use the continue"
5992 echo " switch (-continue) to $0 to continue."
6000 # Additional check to decide if WebKit support will be included
6001 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
6002 echo "Warning: -no-xrender will disable the QtWebkit module."
6006 # auto-detect MIT-SHM support
6007 if [ "$CFG_MITSHM" != "no" ]; then
6008 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
6011 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6012 echo "MITSHM support cannot be enabled due to functionality tests!"
6013 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6014 echo " If you believe this message is in error you may use the continue"
6015 echo " switch (-continue) to $0 to continue."
6023 # auto-detect FontConfig support
6024 if [ "$CFG_FONTCONFIG" != "no" ]; then
6025 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6026 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6027 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6029 QT_CFLAGS_FONTCONFIG=
6030 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6032 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
6034 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
6035 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
6036 CFG_LIBFREETYPE=system
6038 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6039 echo "FontConfig support cannot be enabled due to functionality tests!"
6040 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6041 echo " If you believe this message is in error you may use the continue"
6042 echo " switch (-continue) to $0 to continue."
6050 # auto-detect Session Management support
6051 if [ "$CFG_SM" = "auto" ]; then
6052 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
6055 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6056 echo "Session Management support cannot be enabled due to functionality tests!"
6057 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6058 echo " If you believe this message is in error you may use the continue"
6059 echo " switch (-continue) to $0 to continue."
6067 # auto-detect SHAPE support
6068 if [ "$CFG_XSHAPE" != "no" ]; then
6069 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
6072 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6073 echo "XShape support cannot be enabled due to functionality tests!"
6074 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6075 echo " If you believe this message is in error you may use the continue"
6076 echo " switch (-continue) to $0 to continue."
6084 # auto-detect XVideo support
6085 if [ "$CFG_XVIDEO" != "no" ]; then
6086 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
6089 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6090 echo "XVideo support cannot be enabled due to functionality tests!"
6091 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6092 echo " If you believe this message is in error you may use the continue"
6093 echo " switch (-continue) to $0 to continue."
6101 # auto-detect XSync support
6102 if [ "$CFG_XSYNC" != "no" ]; then
6103 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
6106 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6107 echo "XSync support cannot be enabled due to functionality tests!"
6108 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6109 echo " If you believe this message is in error you may use the continue"
6110 echo " switch (-continue) to $0 to continue."
6118 # auto-detect Xinerama support
6119 if [ "$CFG_XINERAMA" != "no" ]; then
6120 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
6121 if [ "$CFG_XINERAMA" != "runtime" ]; then
6125 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6126 echo "Xinerama support cannot be enabled due to functionality tests!"
6127 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6128 echo " If you believe this message is in error you may use the continue"
6129 echo " switch (-continue) to $0 to continue."
6137 # auto-detect Xinput support
6138 if [ "$CFG_XINPUT" != "no" ]; then
6139 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
6140 if [ "$CFG_XINPUT" != "runtime" ]; then
6144 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6145 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
6146 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6147 echo " If you believe this message is in error you may use the continue"
6148 echo " switch (-continue) to $0 to continue."
6156 # auto-detect XKB support
6157 if [ "$CFG_XKB" != "no" ]; then
6158 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
6161 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6162 echo "XKB support cannot be enabled due to functionality tests!"
6163 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6164 echo " If you believe this message is in error you may use the continue"
6165 echo " switch (-continue) to $0 to continue."
6173 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
6174 if [ -n "$PKG_CONFIG" ]; then
6175 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
6176 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
6178 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
6180 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
6181 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
6183 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6184 echo "Gtk theme support cannot be enabled due to functionality tests!"
6185 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6186 echo " If you believe this message is in error you may use the continue"
6187 echo " switch (-continue) to $0 to continue."
6193 elif [ "$CFG_GLIB" = "no" ]; then
6199 if [ "$PLATFORM_MAC" = "yes" ]; then
6200 if [ "$CFG_PHONON" != "no" ]; then
6201 # Always enable Phonon (unless it was explicitly disabled)
6205 if [ "$CFG_COREWLAN" = "auto" ]; then
6206 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
6215 if [ "$PLATFORM_QPA" = "yes" ]; then
6216 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6217 if [ "$CFG_ARCH" = "macosx" ]; then
6219 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6220 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
6222 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
6225 if [ "$CFG_OPENGL" = "yes" ]; then
6226 echo "All the OpenGL functionality tests failed!"
6227 echo " You might need to modify the include and library search paths by editing"
6228 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6229 echo " ${XQMAKESPEC}."
6234 elif [ "$CFG_OPENGL" = "es2" ]; then
6236 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6237 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6238 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6239 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6240 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6241 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6242 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6243 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6246 "$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
6247 if [ $? != "0" ]; then
6248 echo "The OpenGL ES 2.0 functionality test failed!"
6249 echo " You might need to modify the include and library search paths by editing"
6250 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6251 echo " ${XQMAKESPEC}."
6254 elif [ "$CFG_OPENGL" = "desktop" ]; then
6255 # Desktop OpenGL support
6256 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6257 if [ $? != "0" ]; then
6258 echo "The OpenGL functionality test failed!"
6259 echo " You might need to modify the include and library search paths by editing"
6260 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6261 echo " ${XQMAKESPEC}."
6266 # auto-detect FontConfig support
6267 if [ "$CFG_FONTCONFIG" != "no" ]; then
6268 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6269 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6270 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6272 QT_CFLAGS_FONTCONFIG=
6273 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6275 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
6276 QT_CONFIG="$QT_CONFIG fontconfig"
6277 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6278 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6279 CFG_LIBFREETYPE=system
6284 # Save these for a check later
6285 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6286 ORIG_CFG_XCB="$CFG_XCB"
6288 if [ "$CFG_WAYLAND" != "no" ]; then
6289 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6290 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6291 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6292 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6293 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6295 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
6297 QT_CONFIG="$QT_CONFIG wayland"
6298 elif [ "$CFG_WAYLAND" = "yes" ]; then
6299 echo "The Wayland functionality test failed!"
6303 QMakeVar add DEFINES QT_NO_WAYLAND
6307 # Check we actually have X11 :-)
6308 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
6309 QT_CONFIG="$QT_CONFIG xlib"
6312 if [ "$CFG_XCB" != "no" ]; then
6313 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6315 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS; then
6316 QT_CONFIG="$QT_CONFIG xcb-render"
6319 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS; then
6321 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6324 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
6325 QT_CONFIG="$QT_CONFIG xcb-xlib"
6328 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6329 # auto-detect XInput2/Xinput support
6330 if [ "$CFG_XINPUT2" != "no" ]; then
6331 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
6335 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6336 echo "XInput2 support cannot be enabled due to functionality tests!"
6337 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6338 echo " If you believe this message is in error you may use the continue"
6339 echo " switch (-continue) to $0 to continue."
6348 if [ "$CFG_XCB" = "yes" ]; then
6349 echo "The XCB test failed!"
6350 echo " You might need to install dependency packages."
6351 echo " See src/plugins/platforms/xcb/README."
6355 QMakeVar add DEFINES QT_NO_XCB
6359 # Detect libxkbcommon
6360 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6361 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6362 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6363 if [ "$CFG_WAYLAND" = "yes" ]; then
6364 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6365 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6367 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6368 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6370 if [ "$CFG_WAYLAND" = "yes" ]; then
6371 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6373 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6376 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6377 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6378 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6379 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6380 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6381 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6382 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6385 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6386 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6387 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6388 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6391 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
6392 QT_CONFIG="$QT_CONFIG coreservices"
6394 QMakeVar add DEFINES QT_NO_CORESERVICES
6397 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6398 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6399 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6400 echo "No QPA platform plugin enabled!"
6401 echo " If you really want to build without a QPA platform plugin you must pass"
6402 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6403 echo " cannot run GUI applications."
6413 if [ "$PLATFORM_QWS" = "yes" ]; then
6415 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6416 if [ "$CFG_GUI" = "no" ]; then
6417 if [ "$CFG_OPENGL" = "auto" ]; then
6420 if [ "$CFG_OPENGL" != "no" ]; then
6421 echo "OpenGL enabled, but GUI disabled."
6422 echo " You might need to either enable the GUI or disable OpenGL"
6426 if [ "$CFG_OPENGL" = "yes" ]; then
6428 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
6431 elif [ "$CFG_OPENGL" = "es2" ]; then
6433 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6434 if [ $? != "0" ]; then
6435 echo "The OpenGL ES 2.0 functionality test failed!"
6436 echo " You might need to modify the include and library search paths by editing"
6437 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6438 echo " ${XQMAKESPEC}."
6442 elif [ "$CFG_OPENGL" = "desktop" ]; then
6443 # Desktop OpenGL support
6444 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6449 if [ "$PLATFORM_QWS" = "yes" ]; then
6452 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6453 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6454 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6455 if [ $? != "0" ]; then
6456 echo "The Ahi screen driver functionality test failed!"
6457 echo " You might need to modify the include and library search paths by editing"
6458 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6459 echo " ${XQMAKESPEC}."
6464 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6465 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6466 if [ $? != "0" ]; then
6467 echo "The SVGAlib screen driver functionality test failed!"
6468 echo " You might need to modify the include and library search paths by editing"
6469 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6470 echo " ${XQMAKESPEC}."
6475 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6476 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6477 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6478 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6479 elif directfb-config --version >/dev/null 2>&1; then
6480 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6481 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6484 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6485 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6486 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6487 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6490 "$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
6491 if [ $? != "0" ]; then
6492 echo "The DirectFB screen driver functionality test failed!"
6493 echo " You might need to modify the include and library search paths by editing"
6494 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6495 echo " ${XQMAKESPEC}."
6503 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6504 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6505 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6506 if [ $? != "0" ]; then
6507 echo "The tslib functionality test failed!"
6508 echo " You might need to modify the include and library search paths by editing"
6509 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6510 echo " ${XQMAKESPEC}."
6519 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6520 if [ $? != "0" ]; then
6521 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6528 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6529 if [ "$CFG_EGL" != "no" ]; then
6530 # detect EGL support
6531 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
6532 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6537 if [ "$EGL_VARIANT" = "none" ]; then
6538 if [ "$CFG_EGL" = "yes" ]; then
6539 echo "The EGL functionality test failed!"
6540 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6541 echo " You might need to modify the include and library search paths by editing"
6542 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6543 echo " ${XQMAKESPEC}."
6547 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6548 if [ "$CFG_OPENGL" = "es2" ]; then
6555 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6558 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6559 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6560 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6561 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6562 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
6563 CFG_LIBFREETYPE=system
6569 if [ "$CFG_ENDIAN" = "auto" ]; then
6570 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6571 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6572 elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6573 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6574 elif [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
6577 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6579 if [ "$F" -eq 0 ]; then
6580 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6581 elif [ "$F" -eq 1 ]; then
6582 CFG_ENDIAN="Q_BIG_ENDIAN"
6585 echo "The target system byte order could not be detected!"
6586 echo "Turn on verbose messaging (-v) to see the final report."
6587 echo "You can use the -little-endian or -big-endian switch to"
6588 echo "$0 to continue."
6594 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6595 if [ "$PLATFORM_MAC" = "yes" ]; then
6598 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6600 if [ "$F" -eq 0 ]; then
6601 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6602 elif [ "$F" -eq 1 ]; then
6603 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6606 echo "The host system byte order could not be detected!"
6607 echo "Turn on verbose messaging (-v) to see the final report."
6608 echo "You can use the -host-little-endian or -host-big-endian switch to"
6609 echo "$0 to continue."
6615 if [ "$CFG_ARMFPA" != "auto" ]; then
6616 if [ "$CFG_ARMFPA" = "yes" ]; then
6617 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6618 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6620 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6623 CFG_DOUBLEFORMAT="normal"
6628 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6629 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6630 CFG_DOUBLEFORMAT=normal
6632 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6634 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6635 CFG_DOUBLEFORMAT=normal
6636 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6637 CFG_DOUBLEFORMAT=normal
6638 elif [ "$F" -eq 10 ]; then
6639 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6640 elif [ "$F" -eq 11 ]; then
6641 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6642 elif [ "$F" -eq 12 ]; then
6643 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6645 elif [ "$F" -eq 13 ]; then
6646 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6650 echo "The system floating point format could not be detected."
6651 echo "This may cause data to be generated in a wrong format"
6652 echo "Turn on verbose messaging (-v) to see the final report."
6653 # we do not fail on this since this is a new test, and if it fails,
6654 # the old behavior should be correct in most cases
6655 CFG_DOUBLEFORMAT=normal
6661 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
6665 if [ "$CFG_STL" != "no" ]; then
6666 if [ "$HAVE_STL" = "yes" ]; then
6669 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6670 echo "STL 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 # detect POSIX clock_gettime()
6682 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6683 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
6684 CFG_CLOCK_GETTIME=yes
6686 CFG_CLOCK_GETTIME=no
6690 # detect POSIX monotonic clocks
6691 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6692 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
6693 CFG_CLOCK_MONOTONIC=yes
6695 CFG_CLOCK_MONOTONIC=no
6697 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6698 CFG_CLOCK_MONOTONIC=no
6702 if [ "$CFG_MREMAP" = "auto" ]; then
6703 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6710 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6711 if [ "$CFG_GETADDRINFO" != "no" ]; then
6712 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6715 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6716 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6717 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6718 echo " If you believe this message is in error you may use the continue"
6719 echo " switch (-continue) to $0 to continue."
6727 # find if the platform provides inotify
6728 if [ "$CFG_INOTIFY" != "no" ]; then
6729 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6732 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6733 echo "inotify support cannot be enabled due to functionality tests!"
6734 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6735 echo " If you believe this message is in error you may use the continue"
6736 echo " switch (-continue) to $0 to continue."
6744 # find if the platform provides if_nametoindex (ipv6 interface name support)
6745 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6746 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
6749 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6750 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6751 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6752 echo " If you believe this message is in error you may use the continue"
6753 echo " switch (-continue) to $0 to continue."
6761 # find if the platform provides getifaddrs (network interface enumeration)
6762 if [ "$CFG_GETIFADDRS" != "no" ]; then
6763 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6766 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6767 echo "getifaddrs support cannot be enabled due to functionality tests!"
6768 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6769 echo " If you believe this message is in error you may use the continue"
6770 echo " switch (-continue) to $0 to continue."
6779 if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6780 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
6781 if [ "$CFG_OPENSSL" = "auto" ]; then
6785 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6786 echo "OpenSSL support cannot be enabled due to functionality tests!"
6787 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6788 echo " If you believe this message is in error you may use the continue"
6789 echo " switch (-continue) to $0 to continue."
6796 if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6797 #OpenSSl should be enabled for Symbian release
6802 # detect OpenVG support
6803 if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6804 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
6805 if [ "$CFG_OPENVG" = "auto" ]; then
6808 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
6809 if [ "$CFG_OPENVG" = "auto" ]; then
6812 CFG_OPENVG_ON_OPENGL=yes
6813 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
6814 if [ "$CFG_OPENVG" = "auto" ]; then
6817 CFG_OPENVG_LC_INCLUDES=yes
6818 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
6819 if [ "$CFG_OPENVG" = "auto" ]; then
6822 CFG_OPENVG_LC_INCLUDES=yes
6823 CFG_OPENVG_ON_OPENGL=yes
6825 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6826 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6827 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6828 echo " If you believe this message is in error you may use the continue"
6829 echo " switch (-continue) to $0 to continue."
6835 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
6836 CFG_OPENVG_SHIVA=yes
6840 # if openvg is disabled and the user specified graphicssystem vg, disable it...
6841 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
6842 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
6843 CFG_GRAPHICS_SYSTEM=default
6846 if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
6847 echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
6851 if [ "$CFG_PTMALLOC" != "no" ]; then
6852 # build ptmalloc, copy .a file to lib/
6853 echo "Building ptmalloc. Please wait..."
6854 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
6855 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
6857 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
6860 if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6861 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6866 elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6867 # Disabled for Symbian release
6871 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6872 if [ "$CFG_ARCH" = "arm" ]; then
6873 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6874 if [ $? != "0" ]; then
6875 CFG_JAVASCRIPTCORE_JIT=no
6878 case "$XPLATFORM" in
6880 CFG_JAVASCRIPTCORE_JIT=no
6883 CFG_JAVASCRIPTCORE_JIT=no
6889 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6890 QMakeVar set JAVASCRIPTCORE_JIT yes
6891 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6892 QMakeVar set JAVASCRIPTCORE_JIT no
6895 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6896 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6897 if "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS ; then
6898 CFG_AUDIO_BACKEND=yes
6901 CFG_AUDIO_BACKEND=yes
6905 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6906 echo "Warning: largefile support cannot be disabled for win32."
6908 elif [ "$CFG_LARGEFILE" != "no" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6909 echo "Warning: largefile support cannot be enabled for symbian."
6913 #-------------------------------------------------------------------------------
6914 # ask for all that hasn't been auto-detected or specified in the arguments
6915 #-------------------------------------------------------------------------------
6917 ### fix this: user input should be validated in a loop
6918 if [ "$PLATFORM_QWS" = "yes" ]; then
6919 PROMPT_FOR_DEPTHS="yes"
6921 PROMPT_FOR_DEPTHS="no"
6923 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6925 echo "Choose pixel-depths to support:"
6927 echo " 1. 1bpp, black/white"
6928 echo " 4. 4bpp, grayscale"
6929 echo " 8. 8bpp, paletted"
6930 echo " 12. 12bpp, rgb 4-4-4"
6931 echo " 15. 15bpp, rgb 5-5-5"
6932 echo " 16. 16bpp, rgb 5-6-5"
6933 echo " 18. 18bpp, rgb 6-6-6"
6934 echo " 24. 24bpp, rgb 8-8-8"
6935 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6936 echo " all. All supported depths"
6938 echo "Your choices (default 8,16,32):"
6940 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6941 CFG_QWS_DEPTHS=8,16,32
6944 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6945 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6946 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6948 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6950 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6951 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6956 # enable dwarf2 support on Mac
6957 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6958 QT_CONFIG="$QT_CONFIG dwarf2"
6961 # Set the default arch if there are no "-arch" arguments on the configure line
6962 # For "-carbon" builds: 32 bit x86/ppc.
6963 # For builds on snow leopard : compiler default (64-bit).
6964 # For builds on leopard : compiler default (32-bit).
6965 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6966 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6968 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6969 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6970 CFG_MAC_ARCHS=" x86"
6971 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6972 CFG_MAC_ARCHS=" ppc"
6974 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6977 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6980 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6983 # enable Cocoa and/or Carbon on Mac
6984 # -carbon on the command line disables Cocoa, except for 64-bit archs
6985 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6986 CFG_MAC_CARBON="YES"
6989 # check which archs are in use, enable cocoa if we find a 64-bit one
6990 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6991 CFG_MAC_COCOA="yes";
6992 CFG_MAC_CARBON="no";
6993 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6994 CFG_MAC_CARBON="yes";
6996 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6997 CFG_MAC_CARBON="yes";
7002 # select Carbon on 10.4 Tiger.
7003 if [ "$PLATFORM_MAC" = "yes" ]; then
7004 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
7005 if [ "$VERSION" == 8 ]; then
7007 CFG_MAC_CARBON="yes";
7011 # select Carbon when using the 10.4u SDK
7012 if [ "$PLATFORM_MAC" = "yes" ]; then
7013 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
7016 CFG_MAC_CARBON="yes";
7020 # but disable Cocoa if cross-building for mingw and symbian
7021 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
7022 [ "$XPLATFORM_SYMBIAN" = "yes" ] && CFG_MAC_COCOA="no"
7024 # disable Qt 3 support on VxWorks and Symbian
7025 case "$XPLATFORM" in
7026 unsupported/vxworks*|symbian*)
7031 # enable Qt 3 support functionality
7032 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
7033 QT_CONFIG="$QT_CONFIG gui-qt3support"
7037 if [ "$CFG_PHONON" = "yes" ]; then
7038 # No longer needed after modularization
7039 #QT_CONFIG="$QT_CONFIG phonon"
7040 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
7041 QT_CONFIG="$QT_CONFIG phonon-backend"
7044 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
7047 # disable accessibility
7048 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
7049 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
7051 QT_CONFIG="$QT_CONFIG accessibility"
7054 # egl stuff does not belong in lighthouse, but rather in plugins
7055 if [ "$PLATFORM_QPA" = "yes" ]; then
7060 if [ "$CFG_EGL" = "no" ]; then
7061 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
7063 QT_CONFIG="$QT_CONFIG egl"
7064 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7065 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
7070 if [ "$CFG_OPENVG" = "no" ]; then
7071 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
7073 QT_CONFIG="$QT_CONFIG openvg"
7074 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
7075 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
7077 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
7078 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
7080 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7081 QT_CONFIG="$QT_CONFIG shivavg"
7082 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
7086 if [ "$CFG_QS60STYLE" = "no" ]; then
7087 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7089 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_STYLE_S60"
7092 # Just check if OpenGL is not set by command argumets for Symbian.
7093 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
7094 if [ "$CFG_OPENGL" = "auto" ]; then
7100 if [ "$CFG_OPENGL" = "no" ]; then
7101 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
7103 QT_CONFIG="$QT_CONFIG opengl"
7106 if [ "$CFG_OPENGL" = "es2" ]; then
7107 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
7110 if [ "$CFG_OPENGL" = "es2" ]; then
7111 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
7112 QT_CONFIG="$QT_CONFIG opengles2"
7115 # safe execution environment
7116 if [ "$CFG_SXE" != "no" ]; then
7117 QT_CONFIG="$QT_CONFIG sxe"
7120 # build up the variables for output
7121 if [ "$CFG_DEBUG" = "yes" ]; then
7122 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
7123 QMAKE_CONFIG="$QMAKE_CONFIG debug"
7124 elif [ "$CFG_DEBUG" = "no" ]; then
7125 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
7126 QMAKE_CONFIG="$QMAKE_CONFIG release"
7128 if [ "$CFG_SHARED" = "yes" ]; then
7129 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
7130 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
7131 elif [ "$CFG_SHARED" = "no" ]; then
7132 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
7133 QMAKE_CONFIG="$QMAKE_CONFIG static"
7135 if [ "$PLATFORM_QWS" = "yes" ]; then
7136 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
7137 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
7138 QT_CONFIG="$QT_CONFIG embedded"
7139 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7141 if [ "$PLATFORM_QPA" = "yes" ]; then
7142 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
7143 QT_CONFIG="$QT_CONFIG qpa"
7144 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
7145 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7148 if [ "$CFG_EMBEDDED" = "nacl" ]; then
7149 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
7150 QT_CONFIG="$QT_CONFIG nacl pepper"
7151 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7154 if [ "$XPLATFORM_MINGW" != "yes" ]; then
7155 # Do not set this here for Windows. Let qmake do it so
7156 # debug and release precompiled headers are kept separate.
7157 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
7159 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
7160 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
7161 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
7162 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
7163 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7164 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
7166 if [ "$CFG_STL" = "no" ]; then
7167 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
7169 QMAKE_CONFIG="$QMAKE_CONFIG stl"
7171 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
7172 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
7174 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
7175 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
7176 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
7177 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
7178 QMakeVar add QMAKE_CFLAGS -g
7179 QMakeVar add QMAKE_CXXFLAGS -g
7180 QT_CONFIG="$QT_CONFIG separate_debug_info"
7182 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
7183 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
7185 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
7186 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
7187 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
7188 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
7189 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
7190 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
7191 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
7192 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
7193 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
7194 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
7195 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
7196 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
7197 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
7198 QT_CONFIG="$QT_CONFIG clock-gettime"
7200 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
7201 QT_CONFIG="$QT_CONFIG clock-monotonic"
7203 if [ "$CFG_MREMAP" = "yes" ]; then
7204 QT_CONFIG="$QT_CONFIG mremap"
7206 if [ "$CFG_GETADDRINFO" = "yes" ]; then
7207 QT_CONFIG="$QT_CONFIG getaddrinfo"
7209 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
7210 QT_CONFIG="$QT_CONFIG ipv6ifname"
7212 if [ "$CFG_GETIFADDRS" = "yes" ]; then
7213 QT_CONFIG="$QT_CONFIG getifaddrs"
7215 if [ "$CFG_INOTIFY" = "yes" ]; then
7216 QT_CONFIG="$QT_CONFIG inotify"
7218 if [ "$CFG_LIBJPEG" = "no" ]; then
7220 elif [ "$CFG_LIBJPEG" = "system" ]; then
7221 QT_CONFIG="$QT_CONFIG system-jpeg"
7223 if [ "$CFG_JPEG" = "no" ]; then
7224 QT_CONFIG="$QT_CONFIG no-jpeg"
7225 elif [ "$CFG_JPEG" = "yes" ]; then
7226 QT_CONFIG="$QT_CONFIG jpeg"
7228 if [ "$CFG_LIBMNG" = "no" ]; then
7230 elif [ "$CFG_LIBMNG" = "system" ]; then
7231 QT_CONFIG="$QT_CONFIG system-mng"
7233 if [ "$CFG_MNG" = "no" ]; then
7234 QT_CONFIG="$QT_CONFIG no-mng"
7235 elif [ "$CFG_MNG" = "yes" ]; then
7236 QT_CONFIG="$QT_CONFIG mng"
7238 if [ "$CFG_LIBPNG" = "no" ]; then
7241 if [ "$CFG_LIBPNG" = "system" ]; then
7242 QT_CONFIG="$QT_CONFIG system-png"
7244 if [ "$CFG_PNG" = "no" ]; then
7245 QT_CONFIG="$QT_CONFIG no-png"
7246 elif [ "$CFG_PNG" = "yes" ]; then
7247 QT_CONFIG="$QT_CONFIG png"
7249 if [ "$CFG_GIF" = "no" ]; then
7250 QT_CONFIG="$QT_CONFIG no-gif"
7251 elif [ "$CFG_GIF" = "yes" ]; then
7252 QT_CONFIG="$QT_CONFIG gif"
7254 if [ "$CFG_LIBTIFF" = "no" ]; then
7256 elif [ "$CFG_LIBTIFF" = "system" ]; then
7257 QT_CONFIG="$QT_CONFIG system-tiff"
7259 if [ "$CFG_TIFF" = "no" ]; then
7260 QT_CONFIG="$QT_CONFIG no-tiff"
7261 elif [ "$CFG_TIFF" = "yes" ]; then
7262 QT_CONFIG="$QT_CONFIG tiff"
7264 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7265 QT_CONFIG="$QT_CONFIG no-freetype"
7266 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7267 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7268 QT_CONFIG="$QT_CONFIG system-freetype"
7270 QT_CONFIG="$QT_CONFIG freetype"
7272 if [ "$CFG_GUI" = "auto" ]; then
7275 if [ "$CFG_GUI" = "no" ]; then
7276 QT_CONFIG="$QT_CONFIG no-gui"
7278 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7282 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
7283 #On Mac we implicitly link against libz, so we
7284 #never use the 3rdparty stuff.
7285 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7287 if [ "$CFG_ZLIB" = "yes" ]; then
7288 QT_CONFIG="$QT_CONFIG zlib"
7289 elif [ "$CFG_ZLIB" = "system" ]; then
7290 QT_CONFIG="$QT_CONFIG system-zlib"
7293 if [ "$CFG_S60" = "yes" ]; then
7294 QT_CONFIG="$QT_CONFIG s60"
7297 if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then
7298 QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files"
7300 QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files_disabled"
7303 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7304 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7305 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7306 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7307 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7308 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7309 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7310 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7311 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7312 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7313 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7314 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7315 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7316 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7317 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7319 if [ "$PLATFORM_X11" = "yes" ]; then
7320 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7322 # for some reason, the following libraries are not always built shared,
7323 # so *every* program/lib (including Qt) has to link against them
7324 if [ "$CFG_XSHAPE" = "yes" ]; then
7325 QT_CONFIG="$QT_CONFIG xshape"
7327 if [ "$CFG_XVIDEO" = "yes" ]; then
7328 QT_CONFIG="$QT_CONFIG xvideo"
7330 if [ "$CFG_XSYNC" = "yes" ]; then
7331 QT_CONFIG="$QT_CONFIG xsync"
7333 if [ "$CFG_XINERAMA" = "yes" ]; then
7334 QT_CONFIG="$QT_CONFIG xinerama"
7335 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7337 if [ "$CFG_XCURSOR" = "yes" ]; then
7338 QT_CONFIG="$QT_CONFIG xcursor"
7339 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7341 if [ "$CFG_XFIXES" = "yes" ]; then
7342 QT_CONFIG="$QT_CONFIG xfixes"
7343 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7345 if [ "$CFG_XRANDR" = "yes" ]; then
7346 QT_CONFIG="$QT_CONFIG xrandr"
7347 if [ "$CFG_XRENDER" != "yes" ]; then
7348 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7349 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7351 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7354 if [ "$CFG_XRENDER" = "yes" ]; then
7355 QT_CONFIG="$QT_CONFIG xrender"
7356 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7358 if [ "$CFG_MITSHM" = "yes" ]; then
7359 QT_CONFIG="$QT_CONFIG mitshm"
7361 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7362 QT_CONFIG="$QT_CONFIG fontconfig"
7364 if [ "$CFG_XINPUT" = "yes" ]; then
7365 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7367 if [ "$CFG_XINPUT" = "yes" ]; then
7368 QT_CONFIG="$QT_CONFIG xinput tablet"
7370 if [ "$CFG_XKB" = "yes" ]; then
7371 QT_CONFIG="$QT_CONFIG xkb"
7375 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7376 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7377 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7379 if [ "$CFG_ARCH" = "macosx" ]; then
7380 if [ "$CFG_RPATH" = "yes" ]; then
7381 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7383 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7384 if [ -n "$RPATH_FLAGS" ]; then
7386 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7390 elif [ "$CFG_RPATH" = "yes" ]; then
7391 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7395 if [ "$CFG_RPATH" = "yes" ]; then
7396 # set the default rpath to the library installation directory
7397 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7399 if [ -n "$RPATH_FLAGS" ]; then
7400 # add the user defined rpaths
7401 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7405 if [ '!' -z "$I_FLAGS" ]; then
7406 # add the user define include paths
7407 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7408 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7411 if [ '!' -z "$W_FLAGS" ]; then
7412 # add the user defined warning flags
7413 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7414 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7415 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7418 # turn off exceptions for the compilers that support it
7419 if [ "$PLATFORM_QWS" = "yes" ]; then
7420 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7421 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7422 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7424 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7426 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7430 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7431 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7434 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7435 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7436 # Follow default behavior of configure.exe by overriding with "rtti".
7437 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7440 if [ "$CFG_ALSA" = "yes" ]; then
7441 QT_CONFIG="$QT_CONFIG alsa"
7444 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7445 QT_CONFIG="$QT_CONFIG pulseaudio"
7448 if [ "$CFG_COREWLAN" = "yes" ]; then
7449 QT_CONFIG="$QT_CONFIG corewlan"
7452 if [ "$CFG_ICD" = "yes" ]; then
7453 QT_CONFIG="$QT_CONFIG icd"
7456 if [ "$CFG_ICU" = "yes" ]; then
7457 QT_CONFIG="$QT_CONFIG icu"
7461 # Some Qt modules are too advanced in C++ for some old compilers
7462 # Detect here the platforms where they are known to work.
7464 # See Qt documentation for more information on which features are
7465 # supported and on which compilers.
7467 canBuildQtXmlPatterns="yes"
7468 canBuildWebKit="$HAVE_STL"
7469 canBuildQtConcurrent="yes"
7472 # WebKit requires stdint.h
7473 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7474 if [ $? != "0" ]; then
7478 case "$XPLATFORM" in
7480 # PA-RISC's assembly is too limited
7481 # gcc 3.4 on that platform can't build QtXmlPatterns
7482 # the assembly it generates cannot be compiled
7484 # Check gcc's version
7485 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7489 canBuildQtXmlPatterns="no"
7493 canBuildQtXmlPatterns="no"
7497 unsupported/vxworks-*-g++*)
7500 unsupported/vxworks-*-dcc*)
7502 canBuildQtXmlPatterns="no"
7505 # Check gcc's version
7506 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7514 canBuildQtXmlPatterns="no"
7519 # Check the compiler version
7520 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7523 canBuildQtXmlPatterns="no"
7524 canBuildQtConcurrent="no"
7528 canBuildQtConcurrent="no"
7534 canBuildQtXmlPatterns="no"
7535 canBuildQtConcurrent="no"
7541 # Get the xlC version
7542 cat > xlcver.c <<EOF
7546 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7551 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7552 xlcver=`./xlcver 2>/dev/null`
7555 if [ "$OPT_VERBOSE" = "yes" ]; then
7556 if [ -n "$xlcver" ]; then
7557 echo Found IBM xlC version: $xlcver.
7559 echo Could not determine IBM xlC version, assuming oldest supported.
7566 canBuildQtXmlPatterns="no"
7567 canBuildQtConcurrent="no"
7571 canBuildQtConcurrent="no"
7577 canBuildQtConcurrent="no"
7585 if [ "$CFG_GUI" = "no" ]; then
7586 # WebKit requires QtGui
7590 if [ "$CFG_SHARED" = "no" ]; then
7592 echo "WARNING: Using static linking will disable the WebKit module."
7597 CFG_CONCURRENT="yes"
7598 if [ "$canBuildQtConcurrent" = "no" ]; then
7599 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7602 QT_CONFIG="$QT_CONFIG concurrent"
7605 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7606 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7609 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7610 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7611 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7612 CFG_XMLPATTERNS="no"
7614 # No longer needed after modularization
7615 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7616 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7618 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7621 # No longer needed after modularization
7622 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7623 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7625 # QT_CONFIG="$QT_CONFIG multimedia"
7628 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7629 QT_CONFIG="$QT_CONFIG audio-backend"
7632 if [ "$CFG_SVG" = "auto" ]; then
7636 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7637 echo "QtSvg requested, but it can't be built without QtGui"
7641 if [ "$CFG_SVG" = "yes" ]; then
7642 QT_CONFIG="$QT_CONFIG svg"
7644 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7647 if [ "$CFG_WEBKIT" != "no" ]; then
7648 CFG_WEBKIT="$canBuildWebKit"
7651 if [ "$CFG_WEBKIT" != "no" ]; then
7652 # No longer needed after modularization
7653 #QT_CONFIG="$QT_CONFIG webkit"
7654 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7655 if [ "$CFG_WEBKIT" = "debug" ]; then
7656 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7660 if [ "$CFG_SCRIPT" = "auto" ]; then
7664 # No longer needed after modularization
7665 #if [ "$CFG_SCRIPT" = "yes" ]; then
7666 # QT_CONFIG="$QT_CONFIG script"
7668 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7671 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7672 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7675 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7676 case "$XPLATFORM" in
7678 CFG_SCRIPTTOOLS="no"
7681 CFG_SCRIPTTOOLS="yes"
7684 elif [ "$CFG_SCRIPT" = "no" ]; then
7685 CFG_SCRIPTTOOLS="no"
7688 # No longer needed after modularization
7689 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7690 # QT_CONFIG="$QT_CONFIG scripttools"
7692 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7697 i386|x86_64|arm|macosx) ;;
7698 *) canBuildV8="no";;
7701 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7702 echo "Error: V8 was requested, but is not supported on this platform."
7706 if [ "$CFG_V8" = "auto" ]; then
7707 CFG_V8="$canBuildV8"
7710 if [ "$CFG_V8" = "no" ]; then
7711 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7713 QT_CONFIG="$QT_CONFIG v8"
7716 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7717 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7718 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7722 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7723 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7730 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7731 # No longer needed after modularization
7732 #QT_CONFIG="$QT_CONFIG declarative"
7733 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7734 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7737 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7740 if [ "$CFG_LOCATION" = "auto" ]; then
7741 CFG_LOCATION="$CFG_GUI"
7744 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7745 echo "QtLocation requested, but it can't be built without QtGui"
7749 #Disable QtLocation until ready
7752 if [ "$CFG_LOCATION" = "no" ]; then
7753 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7756 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7759 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7760 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7761 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7766 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7767 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7768 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7775 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7778 # On Mac, set the minimum deployment target for the different architechtures
7779 # using the Xarch compiler option when supported (10.5 and up).
7780 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7781 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7782 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7783 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7784 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7785 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7787 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7788 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7789 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7790 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7791 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7793 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7794 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7795 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7796 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7797 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7799 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7800 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7801 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7802 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7803 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7810 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7812 case "$COMPILER_VERSION" in
7814 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7815 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7816 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7819 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7820 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7821 QT_GCC_PATCH_VERSION=0
7831 #-------------------------------------------------------------------------------
7832 # part of configuration information goes into qconfig.h
7833 #-------------------------------------------------------------------------------
7835 case "$CFG_QCONFIG" in
7837 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7840 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7841 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7842 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7843 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7844 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7845 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7847 echo "#endif" >>"$tmpconfig"
7851 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7855 # define QT_EDITION $QT_EDITION
7858 /* Machine byte-order */
7859 #define Q_BIG_ENDIAN 4321
7860 #define Q_LITTLE_ENDIAN 1234
7863 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7864 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7865 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7866 #if defined(__BIG_ENDIAN__)
7867 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7868 #elif defined(__LITTLE_ENDIAN__)
7869 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7871 # error "Unable to determine byte order!"
7875 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7877 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7878 if [ "$CFG_ENDIAN" = "auto" ]; then
7879 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7880 #if defined(__BIG_ENDIAN__)
7881 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7882 #elif defined(__LITTLE_ENDIAN__)
7883 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7885 # error "Unable to determine byte order!"
7889 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7891 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7893 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7894 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7895 /* Non-IEEE double format */
7896 #define Q_DOUBLE_LITTLE "01234567"
7897 #define Q_DOUBLE_BIG "76543210"
7898 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7899 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7900 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7903 if [ "$CFG_ARMFPA" = "yes" ]; then
7904 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7905 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7906 #ifndef QT_BOOTSTRAPPED
7911 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7915 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7916 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7917 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7918 /* Machine Architecture */
7919 #ifndef QT_BOOTSTRAPPED
7920 # define QT_ARCH_${CFG_ARCH_STR}
7922 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7926 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7927 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7929 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7930 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7933 # if both carbon and cocoa are specified, enable the autodetection code.
7934 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7935 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7936 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7937 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7940 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7941 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7944 if [ "$PLATFORM_MAC" = "yes" ]; then
7945 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7946 #if defined(__LP64__)
7947 # define QT_POINTER_SIZE 8
7949 # define QT_POINTER_SIZE 4
7953 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7954 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7958 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7960 if [ "$CFG_DEV" = "yes" ]; then
7961 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7964 # Embedded compile time options
7965 if [ "$PLATFORM_QWS" = "yes" ]; then
7966 # Add QWS to config.h
7967 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7969 # Add excluded decorations to $QCONFIG_FLAGS
7970 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7971 for decor in $decors; do
7972 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7973 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7976 # Figure which embedded drivers which are turned off
7977 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7978 for ADRIVER in $CFG_GFX_ON; do
7979 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7982 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7983 # the um driver is currently not in the available list for external builds
7984 if [ "$CFG_DEV" = "no" ]; then
7985 CFG_KBD_OFF="$CFG_KBD_OFF um"
7987 for ADRIVER in $CFG_KBD_ON; do
7988 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7991 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7992 for ADRIVER in $CFG_MOUSE_ON; do
7993 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7996 for DRIVER in $CFG_GFX_OFF; do
7997 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7998 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
8001 for DRIVER in $CFG_KBD_OFF; do
8002 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8003 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
8006 for DRIVER in $CFG_MOUSE_OFF; do
8007 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8008 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
8012 if [ "$PLATFORM_QPA" = "yes" ]; then
8013 # Add QPA to config.h
8014 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
8017 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
8018 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
8021 # Add turned on SQL drivers
8022 for DRIVER in $CFG_SQL_AVAILABLE; do
8023 eval "VAL=\$CFG_SQL_$DRIVER"
8026 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8027 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
8028 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
8031 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
8037 QMakeVar set sql-drivers "$SQL_DRIVERS"
8038 QMakeVar set sql-plugins "$SQL_PLUGINS"
8040 # Add other configuration options to the qconfig.h file
8041 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
8042 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
8043 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
8044 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
8045 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
8046 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
8047 [ "$CFG_S60" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_S60"
8048 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
8049 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
8050 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
8052 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
8053 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
8054 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
8055 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
8056 [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
8059 # X11/Unix/Mac only configs
8060 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
8061 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
8062 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
8063 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
8064 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
8065 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
8066 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
8067 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
8068 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
8069 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
8070 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
8071 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
8072 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
8073 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
8074 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
8076 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
8077 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
8078 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
8079 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
8080 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
8081 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
8082 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
8083 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
8084 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
8085 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
8086 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
8087 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
8088 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
8090 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
8091 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
8092 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
8093 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
8094 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
8095 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
8096 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
8097 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
8098 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
8100 # sort QCONFIG_FLAGS for neatness if we can
8101 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
8102 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
8104 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
8105 # Enable Symbian DLLs and export rules.
8106 # We cannot use Linux's default export rules since they export everything.
8107 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL"
8108 # Disable non-working features.
8109 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_SYSTEMTRAYICON"
8112 if [ -n "$QCONFIG_FLAGS" ]; then
8113 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8114 #ifndef QT_BOOTSTRAPPED
8117 for cfg in $QCONFIG_FLAGS; do
8118 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
8119 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
8120 # figure out define logic, so we can output the correct
8121 # ifdefs to override the global defines in a project
8123 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
8124 # QT_NO_option can be forcefully turned on by QT_option
8125 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
8126 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
8127 # QT_option can be forcefully turned off by QT_NO_option
8128 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
8131 if [ -z $cfgdNeg ]; then
8132 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8139 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8140 #if defined($cfgd) && defined($cfgdNeg)
8142 #elif !defined($cfgd) && !defined($cfgdNeg)
8149 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8150 #endif // QT_BOOTSTRAPPED
8155 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
8156 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8157 #define QT_VISIBILITY_AVAILABLE
8162 if [ -n "$QT_LIBINFIX" ]; then
8163 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8164 #define QT_LIBINFIX "$QT_LIBINFIX"
8169 if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
8170 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8171 #define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
8176 # avoid unecessary rebuilds by copying only if qconfig.h has changed
8177 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
8178 rm -f "$outpath/src/corelib/global/qconfig.h.new"
8180 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
8181 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
8182 chmod -w "$outpath/src/corelib/global/qconfig.h"
8183 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
8184 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
8188 #-------------------------------------------------------------------------------
8189 # save configuration into qconfig.pri
8190 #-------------------------------------------------------------------------------
8191 QTCONFIG="$outpath/mkspecs/qconfig.pri"
8192 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
8193 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
8194 if [ "$CFG_DEBUG" = "yes" ]; then
8195 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
8196 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8197 QT_CONFIG="$QT_CONFIG release"
8199 QT_CONFIG="$QT_CONFIG debug"
8200 elif [ "$CFG_DEBUG" = "no" ]; then
8201 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
8202 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8203 QT_CONFIG="$QT_CONFIG debug"
8205 QT_CONFIG="$QT_CONFIG release"
8207 if [ "$CFG_STL" = "yes" ]; then
8208 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
8210 if [ "$CFG_FRAMEWORK" = "no" ]; then
8211 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
8213 QT_CONFIG="$QT_CONFIG qt_framework"
8214 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
8216 if [ "$PLATFORM_MAC" = "yes" ]; then
8217 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
8219 if [ "$CFG_DEV" = "yes" ]; then
8220 QT_CONFIG="$QT_CONFIG private_tests"
8223 if [ -z "$QT_CFLAGS_FPU" ]; then
8224 if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1; then
8225 QT_CFLAGS_FPU=softvfp
8229 # Make the application arch follow the Qt arch for single arch builds.
8230 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
8231 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
8232 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
8235 cat >>"$QTCONFIG.tmp" <<EOF
8237 CONFIG += $QTCONFIG_CONFIG
8239 QT_EDITION = $Edition
8240 QT_CONFIG += $QT_CONFIG
8243 QT_VERSION = $QT_VERSION
8244 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
8245 QT_MINOR_VERSION = $QT_MINOR_VERSION
8246 QT_PATCH_VERSION = $QT_PATCH_VERSION
8249 QT_LIBINFIX = $QT_LIBINFIX
8250 QT_NAMESPACE = $QT_NAMESPACE
8251 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
8254 if [ -n "$CFG_SYSROOT" ]; then
8255 echo "# sysroot" >>"$QTCONFIG.tmp"
8256 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
8257 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
8258 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8259 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8260 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8261 echo "}" >> "$QTCONFIG.tmp"
8262 echo >> "$QTCONFIG.tmp"
8264 if [ "$CFG_RPATH" = "yes" ]; then
8265 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8267 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8268 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8269 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8270 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8272 if [ -n "$QT_CFLAGS_FPU" ]; then
8273 echo "#Qt for symbian FPU settings" >> "$QTCONFIG.tmp"
8274 echo "MMP_RULES += \"ARMFPU $QT_CFLAGS_FPU\"" >> "$QTCONFIG.tmp"
8277 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8278 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
8279 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8282 # replace qconfig.pri if it differs from the newly created temp file
8283 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8284 rm -f "$QTCONFIG.tmp"
8286 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8289 #-------------------------------------------------------------------------------
8290 # save configuration into qmodule.pri
8291 #-------------------------------------------------------------------------------
8292 QTMODULE="$outpath/mkspecs/qmodule.pri"
8294 # Ensure we can link to uninistalled libraries
8295 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8296 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8298 if [ -n "$QT_CFLAGS_PSQL" ]; then
8299 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8301 if [ -n "$QT_LFLAGS_PSQL" ]; then
8302 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8304 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8305 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8307 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8308 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8310 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8311 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8313 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8314 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8316 if [ -n "$QT_LFLAGS_ODBC" ]; then
8317 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8319 if [ -n "$QT_LFLAGS_TDS" ]; then
8320 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8323 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8324 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8327 #dump in the OPENSSL_LIBS info
8328 if [ '!' -z "$OPENSSL_LIBS" ]; then
8329 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8330 elif [ "$CFG_OPENSSL" = "linked" ]; then
8331 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8334 #dump in the SDK info
8335 if [ '!' -z "$CFG_SDK" ]; then
8336 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8339 # mac gcc -Xarch support
8340 if [ "$CFG_MAC_XARCH" = "no" ]; then
8341 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8345 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8346 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8348 # replace qmodule.pri if it differs from the newly created temp file
8349 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8350 rm -f "$QTMODULE.tmp"
8352 mv -f "$QTMODULE.tmp" "$QTMODULE"
8355 #-------------------------------------------------------------------------------
8356 # save configuration into .qmake.cache
8357 #-------------------------------------------------------------------------------
8359 CACHEFILE="$outpath/.qmake.cache"
8360 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8361 cat >>"$CACHEFILE.tmp" <<EOF
8363 QT_SOURCE_TREE = \$\$quote($relpath)
8364 QT_BUILD_TREE = \$\$quote($outpath)
8365 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8367 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8368 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8369 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8370 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8371 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8372 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8373 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8375 include(\$\$PWD/mkspecs/qmodule.pri)
8376 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8377 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8378 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8382 #dump the qmake spec
8383 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8384 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8386 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8391 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8392 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8393 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8394 # don't need to worry about generated files
8395 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8396 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8398 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8400 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8401 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8404 # replace .qmake.cache if it differs from the newly created temp file
8405 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8406 rm -f "$CACHEFILE.tmp"
8408 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8411 #-------------------------------------------------------------------------------
8412 # give feedback on configuration
8413 #-------------------------------------------------------------------------------
8417 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8420 This target is using the GNU C++ compiler ($PLATFORM).
8422 Recent versions of this compiler automatically include code for
8423 exceptions, which increase both the size of the Qt libraries and
8424 the amount of memory taken by your applications.
8426 You may choose to re-run `basename $0` with the -no-exceptions
8427 option to compile Qt without exceptions. This is completely binary
8428 compatible, and existing applications will continue to work.
8436 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8439 This target is using the MIPSpro C++ compiler ($PLATFORM).
8441 You may choose to re-run `basename $0` with the -no-exceptions
8442 option to compile Qt without exceptions. This will make the
8443 size of the Qt library smaller and reduce the amount of memory
8444 taken by your applications.
8455 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8457 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8458 in debug mode will run out of memory on systems with 2GB or less.
8459 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8460 -no-webkit or -release to skip webkit debug.
8465 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8466 echo "Build type: $PLATFORM"
8468 echo "Building on: $PLATFORM"
8469 echo "Building for: $XPLATFORM"
8472 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8473 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8475 echo "Architecture: $CFG_ARCH"
8478 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8479 echo "Host architecture: $CFG_HOST_ARCH"
8482 if [ "$PLATFORM_MAC" = "yes" ]; then
8483 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8484 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8485 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8487 echo "Using framework: Cocoa"
8490 echo "Using framework: Carbon"
8494 if [ -n "$PLATFORM_NOTES" ]; then
8495 echo "Platform notes:"
8496 echo "$PLATFORM_NOTES"
8501 if [ "$OPT_VERBOSE" = "yes" ]; then
8502 echo $ECHO_N "qmake vars .......... $ECHO_C"
8503 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8504 echo "qmake switches ......... $QMAKE_SWITCHES"
8507 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8508 echo "Build .................. $CFG_BUILD_PARTS"
8509 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8510 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8511 echo "Debug .................. yes (combined)"
8512 if [ "$CFG_DEBUG" = "yes" ]; then
8513 echo "Default Link ........... debug"
8515 echo "Default Link ........... release"
8518 echo "Debug .................. $CFG_DEBUG"
8520 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8521 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8522 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8523 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8524 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8525 echo "QtGui module ........... $CFG_GUI"
8526 echo "QtScript module ........ $CFG_SCRIPT"
8527 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8528 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8529 echo "Phonon module .......... $CFG_PHONON"
8530 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8531 echo "SVG module ............. $CFG_SVG"
8532 case "$CFG_WEBKIT" in
8533 yes) echo "WebKit module .......... yes" ;;
8534 debug) echo "WebKit module .......... yes (debug)" ;;
8535 no) echo "WebKit module .......... no" ;;
8537 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8538 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8539 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8541 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8544 echo "V8 module .............. $CFG_V8"
8545 echo "Declarative module ..... $CFG_DECLARATIVE"
8546 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8547 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8549 echo "Location module ........ $CFG_LOCATION"
8550 echo "Support for S60 ........ $CFG_S60"
8551 echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES"
8552 echo "STL support ............ $CFG_STL"
8553 echo "PCH support ............ $CFG_PRECOMPILE"
8554 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8555 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8556 echo "AVX..................... ${CFG_AVX}"
8557 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8558 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8559 echo "NEON support ........... ${CFG_NEON}"
8561 [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
8562 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8563 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8564 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8565 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8566 echo "NIS support ............ $CFG_NIS"
8567 echo "CUPS support ........... $CFG_CUPS"
8568 echo "Iconv support .......... $CFG_ICONV"
8569 echo "Glib support ........... $CFG_GLIB"
8570 echo "GStreamer support ...... $CFG_GSTREAMER"
8571 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8572 echo "Large File support ..... $CFG_LARGEFILE"
8573 echo "GIF support ............ $CFG_GIF"
8574 if [ "$CFG_TIFF" = "no" ]; then
8575 echo "TIFF support ........... $CFG_TIFF"
8577 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8579 if [ "$CFG_JPEG" = "no" ]; then
8580 echo "JPEG support ........... $CFG_JPEG"
8582 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8584 if [ "$CFG_PNG" = "no" ]; then
8585 echo "PNG support ............ $CFG_PNG"
8587 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8589 if [ "$CFG_MNG" = "no" ]; then
8590 echo "MNG support ............ $CFG_MNG"
8592 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8594 echo "zlib support ........... $CFG_ZLIB"
8595 echo "Session management ..... $CFG_SM"
8596 if [ "$PLATFORM_QWS" = "yes" ]; then
8597 echo "Embedded support ....... $CFG_EMBEDDED"
8598 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8599 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8601 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8603 # Normalize the decoration output first
8604 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8605 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8606 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8607 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8608 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8609 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8610 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8611 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8612 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8613 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8614 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8615 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8616 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8617 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8618 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8619 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8621 if [ "$CFG_OPENGL" = "desktop" ]; then
8622 echo "OpenGL support ......... yes (Desktop OpenGL)"
8623 elif [ "$CFG_OPENGL" = "es2" ]; then
8624 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8626 echo "OpenGL support ......... no"
8628 if [ "$CFG_EGL" != "no" ]; then
8629 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8630 echo "EGL support ............ yes <GLES/egl.h>"
8632 echo "EGL support ............ yes <EGL/egl.h>"
8635 if [ "$CFG_OPENVG" ]; then
8636 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8637 echo "OpenVG support ......... ShivaVG"
8639 echo "OpenVG support ......... $CFG_OPENVG"
8642 if [ "$PLATFORM_X11" = "yes" ]; then
8643 echo "NAS sound support ...... $CFG_NAS"
8644 echo "XShape support ......... $CFG_XSHAPE"
8645 echo "XVideo support ......... $CFG_XVIDEO"
8646 echo "XSync support .......... $CFG_XSYNC"
8647 echo "Xinerama support ....... $CFG_XINERAMA"
8648 echo "Xcursor support ........ $CFG_XCURSOR"
8649 echo "Xfixes support ......... $CFG_XFIXES"
8650 echo "Xrandr support ......... $CFG_XRANDR"
8651 echo "Xrender support ........ $CFG_XRENDER"
8652 echo "Xi support ............. $CFG_XINPUT"
8653 echo "MIT-SHM support ........ $CFG_MITSHM"
8654 echo "FontConfig support ..... $CFG_FONTCONFIG"
8655 echo "XKB Support ............ $CFG_XKB"
8656 echo "immodule support ....... $CFG_IM"
8657 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8659 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8660 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8661 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8662 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8663 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8664 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8665 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8666 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8667 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8670 if [ "$CFG_OPENSSL" = "yes" ]; then
8671 OPENSSL_LINKAGE="(run-time)"
8672 elif [ "$CFG_OPENSSL" = "linked" ]; then
8673 OPENSSL_LINKAGE="(linked)"
8675 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8676 echo "Alsa support ........... $CFG_ALSA"
8677 if [ "$PLATFORM_MAC" = "yes" ]; then
8678 echo "CoreWlan support ....... $CFG_COREWLAN"
8680 echo "ICD support ............ $CFG_ICD"
8681 echo "libICU support ......... $CFG_ICU"
8682 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8683 echo "Xcb support ............ limited (old version)"
8685 echo "Xcb support ............ $CFG_XCB"
8687 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8688 echo "XInput2 support ........ $CFG_XINPUT2"
8692 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC"
8694 # complain about not being able to use dynamic plugins if we are using a static build
8695 if [ "$CFG_SHARED" = "no" ]; then
8697 echo "WARNING: Using static linking will disable the use of dynamically"
8698 echo "loaded plugins. Make sure to import all needed static plugins,"
8699 echo "or compile needed modules into the library."
8702 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8704 echo "NOTE: When linking against OpenSSL, you can override the default"
8705 echo "library names through OPENSSL_LIBS."
8707 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8710 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8712 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8713 echo "if you want a pure debug build."
8718 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8723 #-------------------------------------------------------------------------------
8724 # build makefiles based on the configuration
8725 #-------------------------------------------------------------------------------
8727 echo "Finding project files. Please wait..."
8728 if [ "$CFG_NOPROCESS" != "yes" ]; then
8729 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8730 if [ -f "${relpath}/qtbase.pro" ]; then
8731 mkfile="${outpath}/Makefile"
8732 [ -f "$mkfile" ] && chmod +w "$mkfile"
8733 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8737 # .projects -> projects to process
8738 # .projects.1 -> qt and moc
8739 # .projects.2 -> subdirs and libs
8740 # .projects.3 -> the rest
8741 rm -f .projects .projects.1 .projects.2 .projects.3
8743 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8744 if [ -z "$AWK" ]; then
8745 for p in `echo $QMAKE_PROJECTS`; do
8746 echo "$p" >> .projects
8749 cat >projects.awk <<EOF
8755 first = "./.projects.1.tmp"
8756 second = "./.projects.2.tmp"
8757 third = "./.projects.3.tmp"
8762 if ( ! target_file )
8764 print input_file >target_file
8769 input_file = FILENAME
8774 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8777 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8778 target_file = second
8783 matched_target == 0 && /^(TEMPLATE.*=)/ {
8784 if ( \$3 == "subdirs" )
8785 target_file = second
8786 else if ( \$3 == "lib" )
8792 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8793 if ( \$0 ~ /plugin/ )
8796 target_file = second
8801 if ( ! target_file )
8803 print input_file >>target_file
8810 for p in `echo $QMAKE_PROJECTS`; do
8811 echo "$p" >> .projects.all
8814 # if you get errors about the length of the command line to awk, change the -l arg
8816 split -l 100 .projects.all .projects.all.
8817 for p in .projects.all.*; do
8818 "$AWK" -f projects.awk `cat $p`
8819 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8820 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8821 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8822 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8824 rm -f .projects.all* projects.awk
8826 [ -f .projects.1 ] && cat .projects.1 >>.projects
8827 [ -f .projects.2 ] && cat .projects.2 >>.projects
8828 rm -f .projects.1 .projects.2
8829 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8830 cat .projects.3 >>.projects
8834 # don't sort Qt and MOC in with the other project files
8835 # also work around a segfaulting uniq(1)
8836 if [ -f .sorted.projects.2 ]; then
8837 sort .sorted.projects.2 > .sorted.projects.2.new
8838 mv -f .sorted.projects.2.new .sorted.projects.2
8839 cat .sorted.projects.2 >> .sorted.projects.1
8841 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8842 rm -f .sorted.projects.2 .sorted.projects.1
8846 if [ -f .projects ]; then
8847 uniq .projects >.tmp
8848 mv -f .tmp .projects
8849 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8851 if [ -f .projects.3 ]; then
8852 uniq .projects.3 >.tmp
8853 mv -f .tmp .projects.3
8854 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8856 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8860 for part in $CFG_BUILD_PARTS; do
8862 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8863 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8864 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8865 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8870 if [ "$CFG_DEV" = "yes" ]; then
8871 PART_ROOTS="$PART_ROOTS tests"
8874 echo "Creating makefiles. Please wait..."
8875 for file in .projects .projects.3; do
8876 [ '!' -f "$file" ] && continue
8877 for a in `cat $file`; do
8879 for r in $PART_ROOTS; do
8880 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8885 [ "$IN_ROOT" = "no" ] && continue
8888 *winmain/winmain.pro)
8889 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8893 *s60main/s60main.pro)
8894 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
8897 *examples/activeqt/*) continue ;;
8898 */qmake/qmake.pro) continue ;;
8899 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8900 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8906 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8907 test -d "$dir" || mkdir -p "$dir"
8908 OUTDIR="$outpath/$dir"
8909 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8910 # fast configure - the makefile exists, skip it
8911 # since the makefile exists, it was generated by qmake, which means we
8912 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8914 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8917 QMAKE_SPEC_ARGS="-spec $SPEC"
8918 echo $ECHO_N " for $a$ECHO_C"
8920 QMAKE="$outpath/bin/qmake"
8921 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8922 if [ "$file" = ".projects.3" ]; then
8925 cat >"${OUTDIR}/Makefile" <<EOF
8926 # ${OUTDIR}/Makefile: generated by configure
8928 # WARNING: This makefile will be replaced with a real makefile.
8929 # All changes made to this file will be lost.
8931 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8933 cat >>"${OUTDIR}/Makefile" <<EOF
8935 all clean install qmake first Makefile: FORCE
8936 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8944 if [ "$OPT_VERBOSE" = "yes" ]; then
8945 echo " (`basename $SPEC`)"
8946 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8951 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8952 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8956 rm -f .projects .projects.3
8958 #-------------------------------------------------------------------------------
8959 # check for platforms that we don't yet know about
8960 #-------------------------------------------------------------------------------
8961 if [ "$CFG_ARCH" = "generic" ]; then
8964 NOTICE: Atomic operations are not yet supported for this
8967 Qt will use the 'generic' architecture instead, which uses a
8968 single pthread_mutex_t to protect all atomic operations. This
8969 implementation is the slow (but safe) fallback implementation
8970 for architectures Qt does not yet support.
8974 #-------------------------------------------------------------------------------
8975 # check if the user passed the -no-zlib option, which is no longer supported
8976 #-------------------------------------------------------------------------------
8977 if [ -n "$ZLIB_FORCED" ]; then
8978 which_zlib="supplied"
8979 if [ "$CFG_ZLIB" = "system" ]; then
8985 NOTICE: The -no-zlib option was supplied but is no longer
8988 Qt now requires zlib support in all builds, so the -no-zlib
8989 option was ignored. Qt will be built using the $which_zlib
8994 #-------------------------------------------------------------------------------
8995 # finally save the executed command to another script
8996 #-------------------------------------------------------------------------------
8997 if [ `basename $0` != "config.status" ]; then
8998 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
9000 # add the system variables
9001 for varname in $SYSTEM_VARIABLES; do
9003 'if [ -n "\$'${varname}'" ]; then
9004 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
9009 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
9011 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
9012 echo "#!/bin/sh" > "$outpath/config.status"
9013 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
9014 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
9015 echo "else" >> "$outpath/config.status"
9016 echo " $CONFIG_STATUS" >> "$outpath/config.status"
9017 echo "fi" >> "$outpath/config.status"
9018 chmod +x "$outpath/config.status"
9021 if [ -n "$RPATH_MESSAGE" ]; then
9023 echo "$RPATH_MESSAGE"
9026 MAKE=`basename "$MAKE"`
9028 echo Qt is now configured for building. Just run \'$MAKE\'.
9029 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
9030 echo Once everything is built, Qt is installed.
9031 echo You should not run \'$MAKE install\'.
9033 echo Once everything is built, you must run \'$MAKE install\'.
9034 echo Qt will be installed into $QT_INSTALL_PREFIX
9037 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.