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
819 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce"
820 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
821 XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*)
822 XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2)
826 OPT_CONFIRM_LICENSE=no
832 CFG_GRAPHICS_SYSTEM=default
841 # initalize variables used for installation
850 QT_INSTALL_TRANSLATIONS=
855 #flags for SQL drivers
863 QT_LFLAGS_ODBC="-lodbc"
866 # flags for libdbus-1
870 # flags for Glib (X11 only)
874 # flags for GStreamer (X11 only)
878 #flag for Symbian fpu settings
881 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
882 QT_CFLAGS_CONNSETTINGS=
883 QT_LIBS_CONNSETTINGS=
885 #-------------------------------------------------------------------------------
886 # check SQL drivers, mouse drivers and decorations available in this package
887 #-------------------------------------------------------------------------------
889 # opensource version removes some drivers, so force them to be off
895 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
896 for a in "$relpath/src/plugins/sqldrivers/"*; do
898 base_a=`basename "$a"`
899 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
900 eval "CFG_SQL_${base_a}=auto"
905 CFG_DECORATION_PLUGIN_AVAILABLE=
906 if [ -d "$relpath/src/plugins/decorations" ]; then
907 for a in "$relpath/src/plugins/decorations/"*; do
909 base_a=`basename "$a"`
910 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
915 CFG_KBD_PLUGIN_AVAILABLE=
916 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
917 for a in "$relpath/src/plugins/kbddrivers/"*; do
919 base_a=`basename "$a"`
920 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
925 CFG_MOUSE_PLUGIN_AVAILABLE=
926 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
927 for a in "$relpath/src/plugins/mousedrivers/"*; do
929 base_a=`basename "$a"`
930 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
935 CFG_GFX_PLUGIN_AVAILABLE=
936 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
937 for a in "$relpath/src/plugins/gfxdrivers/"*; do
939 base_a=`basename "$a"`
940 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
943 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
946 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
947 if [ -d "$relpath/src/plugins/imageformats" ]; then
948 for a in "$relpath/src/plugins/imageformats/"*; do
950 base_a=`basename "$a"`
951 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
956 #-------------------------------------------------------------------------------
957 # Set Default NaCl options
958 #-------------------------------------------------------------------------------
959 if [ "$CFG_EMBEDDED" = "nacl" ]; then
960 echo "Setting NaCl options:"
970 if [ `uname` = "Linux" ]; then
971 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
972 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
974 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
975 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
978 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
989 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
990 QT_CONFIG="$QT_CONFIG nacl"
993 #-------------------------------------------------------------------------------
994 # parse command line arguments
995 #-------------------------------------------------------------------------------
997 # parse the arguments, setting things to "yes" or "no"
998 while [ "$#" -gt 0 ]; do
1002 #Autoconf style options
1004 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1008 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1012 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1013 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1016 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1020 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1024 -no-*-*|-plugin-*-*|-qt-*-*)
1025 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1026 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1041 #Qt style no options
1043 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1046 #Qt style yes options
1047 -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)
1048 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1051 #Qt style options that pass an argument
1053 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1055 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1059 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1063 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config)
1064 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1068 #Qt style complex options in one command
1069 -enable-*|-disable-*)
1070 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1071 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1073 #Qt Builtin/System style options
1074 -no-*|-system-*|-qt-*)
1075 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1076 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1078 #Options that cannot be generalized
1085 # this option may or may not be followed by an argument
1086 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1093 -embedded-lite|-qpa)
1095 # this option may or may not be followed by an argument
1096 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1109 # this option may or may not be followed by an argument
1110 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1119 # this option may or may not be followed by an argument
1120 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1128 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1129 # this option may or may not be followed by an argument
1130 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1139 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1143 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1151 VAR="graphicssystem"
1155 -runtimegraphicssystem)
1156 VAR="runtimegraphicssystem"
1167 if [ "$1" = "-D" ]; then
1171 VAL=`echo $1 | sed 's,-D,,'`
1176 # this option may or may not be followed by an argument
1177 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1186 if [ "$1" = "-I" ]; then
1190 VAL=`echo $1 | sed 's,-I,,'`
1195 if [ "$1" = "-L" ]; then
1199 VAL=`echo $1 | sed 's,-L,,'`
1204 if [ "$1" = "-R" ]; then
1208 VAL=`echo $1 | sed 's,-R,,'`
1213 VAL=`echo $1 | sed 's,-l,,'`
1217 if [ "$1" = "-F" ]; then
1221 VAL=`echo $1 | sed 's,-F,,'`
1226 if [ "$1" = "-fw" ]; then
1230 VAL=`echo $1 | sed 's,-fw,,'`
1234 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1241 if [ "$UNKNOWN_ARG" = "yes" ]; then
1242 echo "$1: unknown argument"
1253 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1254 CFG_QT3SUPPORT="$VAL"
1260 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1261 CFG_ACCESSIBILITY="$VAL"
1270 CFG_USE_GNUMAKE="$VAL"
1273 CFG_MYSQL_CONFIG="$VAL"
1276 QT_INSTALL_PREFIX="$VAL"
1279 QT_HOST_PREFIX="$VAL"
1282 QT_FORCE_PKGCONFIG=yes
1285 QT_INSTALL_DOCS="$VAL"
1288 QT_INSTALL_HEADERS="$VAL"
1291 QT_INSTALL_PLUGINS="$VAL"
1294 QT_INSTALL_IMPORTS="$VAL"
1297 QT_INSTALL_DATA="$VAL"
1300 QT_INSTALL_LIBS="$VAL"
1309 QT_INSTALL_TRANSLATIONS="$VAL"
1311 sysconfdir|settingsdir)
1312 QT_INSTALL_SETTINGS="$VAL"
1315 QT_INSTALL_EXAMPLES="$VAL"
1324 QT_INSTALL_BINS="$VAL"
1346 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1353 if [ "$VAL" = "little" ]; then
1354 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1355 elif [ "$VAL" = "big" ]; then
1356 CFG_ENDIAN="Q_BIG_ENDIAN"
1362 if [ "$VAL" = "little" ]; then
1363 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1364 elif [ "$VAL" = "big" ]; then
1365 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1371 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1378 CFG_QWS_DEPTHS="$VAL"
1381 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1382 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1383 [ "$VAL" = "es2" ]; then
1385 if [ "$VAL" = "es2" ]; then
1393 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1395 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1403 if [ "$PLATFORM_QWS" = "yes" ]; then
1404 echo "Error: Graphics System plugins are not supported on QWS."
1405 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1406 echo " rather than existing as a separate plugin."
1410 if [ "$VAL" = "opengl" ]; then
1411 CFG_GRAPHICS_SYSTEM="opengl"
1412 elif [ "$VAL" = "openvg" ]; then
1413 CFG_GRAPHICS_SYSTEM="openvg"
1414 elif [ "$VAL" = "raster" ]; then
1415 CFG_GRAPHICS_SYSTEM="raster"
1416 elif [ "$VAL" = "runtime" ]; then
1417 CFG_GRAPHICS_SYSTEM="runtime"
1423 runtimegraphicssystem)
1424 if [ "$VAL" != "runtime" ]; then
1425 CFG_RUNTIME_SYSTEM="$VAL"
1429 qvfb) # left for commandline compatibility, not documented
1430 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1431 if [ "$VAL" = "yes" ]; then
1432 QMakeVar add gfx-drivers qvfb
1433 QMakeVar add kbd-drivers qvfb
1434 QMakeVar add mouse-drivers qvfb
1435 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1436 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1437 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1444 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1447 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1456 if [ "$PLATFORM_MAC" = "yes" ]; then
1463 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1464 CFG_MAC_DWARF2="$VAL"
1470 # if this is a Mac then "windows" probably means
1471 # we are cross-compiling for MinGW
1472 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1473 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1482 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1483 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1489 # do nothing - Cocoa is the default.
1492 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1493 CFG_MAC_CARBON="$VAL"
1494 COMMANDLINE_MAC_CARBON="$VAL"
1500 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1501 CFG_MAC_HARFBUZZ="$VAL"
1508 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1509 CFG_FRAMEWORK="$VAL"
1515 if [ "$VAL" = "yes" ]; then
1517 QMakeVar add QMAKE_CFLAGS -pg
1518 QMakeVar add QMAKE_CXXFLAGS -pg
1519 QMakeVar add QMAKE_LFLAGS -pg
1520 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1525 exceptions|g++-exceptions)
1526 if [ "$VAL" = "no" ]; then
1528 elif [ "$VAL" = "yes" ]; then
1536 # keep compatibility with old platform names
1542 PLATFORM=hpux-acc-o64
1545 PLATFORM=hpux-acc-64
1548 PLATFORM=hpux-acc-64
1560 PLATFORM=reliant-cds-64
1563 PLATFORM=solaris-cc-64
1566 PLATFORM=unixware-cc
1569 PLATFORM=unixware-g++
1572 PLATFORM=unixware-cc
1575 PLATFORM=unixware-g++
1581 i386) NATIVE_64_ARCH="x86_64" ;;
1582 powerpc) NATIVE_64_ARCH="ppc64" ;;
1583 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1585 if [ ! -z "$NATIVE_64_ARCH" ]; then
1586 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1587 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1594 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1595 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
1596 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
1597 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
1600 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1601 CFG_DEBUG_RELEASE="$VAL"
1607 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1608 CFG_RELEASE_QMAKE="$VAL"
1614 if [ "$VAL" = "yes" ]; then
1616 elif [ "$VAL" = "no" ]; then
1623 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1624 CFG_PREFIX_INSTALL="$VAL"
1632 developer-build|commercial|opensource|nokia-developer)
1633 # These switches have been dealt with already
1636 if [ "$VAL" = "yes" ]; then
1638 elif [ "$VAL" = "no" ]; then
1645 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1646 CFG_INCREMENTAL="$VAL"
1652 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1653 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1659 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1660 if [ "$VAL" = "no" ]; then
1661 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1662 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1663 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1669 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1676 if [ "$VAL" = "no" ]; then
1683 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1691 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1698 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1705 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1712 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1719 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1726 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1733 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1740 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1747 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1748 CFG_PRECOMPILE="$VAL"
1753 separate-debug-info)
1754 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1755 CFG_SEPARATE_DEBUG_INFO="$VAL"
1756 elif [ "$VAL" = "nocopy" ] ; then
1757 CFG_SEPARATE_DEBUG_INFO="yes"
1758 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1764 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1765 CFG_REDUCE_EXPORTS="$VAL"
1771 if [ "$VAL" = "no" ]; then
1778 if [ "$VAL" = "no" ]; then
1785 if [ "$VAL" = "no" ]; then
1792 if [ "$VAL" = "no" ]; then
1799 if [ "$VAL" = "no" ]; then
1806 if [ "$VAL" = "no" ]; then
1813 if [ "$VAL" = "no" ]; then
1820 if [ "$VAL" = "no" ]; then
1827 if [ "$VAL" = "no" ]; then
1837 if [ "$VAL" = "no" ]; then
1844 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1845 CFG_REDUCE_RELOCATIONS="$VAL"
1851 [ "$VAL" = "qt" ] && VAL=yes
1852 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1853 CFG_QWS_FREETYPE="$VAL"
1859 [ "$VAL" = "qt" ] && VAL=yes
1860 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1865 # No longer supported:
1866 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1869 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1876 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1877 CFG_SYMBIAN_DEFFILES="$VAL"
1883 if [ "$VAL" = "system" ]; then
1890 [ "$VAL" = "yes" ] && VAL=qt
1891 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1898 [ "$VAL" = "yes" ] && VAL=qt
1899 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1906 [ "$VAL" = "yes" ] && VAL=qt
1907 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1914 [ "$VAL" = "yes" ] && VAL=qt
1915 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1922 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1929 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1936 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1943 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1950 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1965 CFG_FONTCONFIG="$VAL"
1971 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1978 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1985 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1992 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1999 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2006 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2013 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2014 CFG_GSTREAMER="$VAL"
2020 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2021 CFG_QGTKSTYLE="$VAL"
2027 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ]; then
2028 CFG_QS60STYLE="$VAL"
2034 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2037 if [ "$VAL" = "no" ]; then
2045 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
2047 elif [ "$VAL" = "runtime" ]; then
2054 if [ "$VAL" = "yes" ]; then
2061 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2068 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2069 CFG_LARGEFILE="$VAL"
2075 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2082 if [ "$VAL" = "yes" ]; then
2083 CFG_OPENSSL="linked"
2089 if [ "$VAL" = "yes" ]; then
2097 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2098 CFG_XMLPATTERNS="yes"
2100 if [ "$VAL" = "no" ]; then
2101 CFG_XMLPATTERNS="no"
2108 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2111 if [ "$VAL" = "no" ]; then
2119 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2120 CFG_SCRIPTTOOLS="yes"
2122 if [ "$VAL" = "no" ]; then
2123 CFG_SCRIPTTOOLS="no"
2130 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2133 if [ "$VAL" = "no" ]; then
2141 if [ "$VAL" = "yes" ]; then
2144 if [ "$VAL" = "no" ]; then
2152 if [ "$VAL" = "yes" ]; then
2153 CFG_DECLARATIVE="yes"
2155 if [ "$VAL" = "no" ]; then
2156 CFG_DECLARATIVE="no"
2163 if [ "$VAL" = "yes" ]; then
2164 CFG_DECLARATIVE_DEBUG="yes"
2166 if [ "$VAL" = "no" ]; then
2167 CFG_DECLARATIVE_DEBUG="no"
2174 [ "$VAL" = "auto" ] && VAL="yes"
2178 if [ "$VAL" = "yes" ]; then
2181 if [ "$VAL" = "no" ]; then
2189 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2190 CFG_JAVASCRIPTCORE_JIT="$VAL"
2196 if [ "$VAL" = "yes" ]; then
2197 OPT_CONFIRM_LICENSE="$VAL"
2203 if [ "$VAL" = "yes" ]; then
2209 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2210 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2211 # if autoconf style options were used, $VAL can be "yes" or "no"
2212 [ "$VAL" = "yes" ] && VAL=qt
2213 # now $VAL should be "no", "qt", or "plugin"... double-check
2214 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2217 # now $VAL is "no", "qt", or "plugin"
2219 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2220 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2222 # Grab the available values
2225 avail="$CFG_SQL_AVAILABLE"
2228 avail="$CFG_GFX_AVAILABLE"
2229 if [ "$OPT" = "plugin" ]; then
2230 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2234 avail="$CFG_DECORATION_AVAILABLE"
2235 if [ "$OPT" = "plugin" ]; then
2236 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2240 avail="$CFG_KBD_AVAILABLE"
2241 if [ "$OPT" = "plugin" ]; then
2242 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2246 avail="$CFG_MOUSE_AVAILABLE"
2247 if [ "$OPT" = "plugin" ]; then
2248 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2252 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2253 if [ "$OPT" != "plugin" ]; then
2254 # png is always built in
2260 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2264 # Check that that user's value is available.
2267 if [ "$VAL" = "$d" ]; then
2272 [ "$found" = yes ] || ERROR=yes
2274 if [ "$VAR" = "sql" ]; then
2275 # set the CFG_SQL_driver
2276 eval "CFG_SQL_$VAL=\$OPT"
2278 elif [ "$VAR" = "imageformat" ]; then
2279 [ "$OPT" = "qt" ] && OPT=yes
2280 VAL="`echo $VAL |tr a-z A-Z`"
2281 eval "CFG_$VAL=$OPT"
2285 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2286 if [ "$OPT" = "plugin" ]; then
2287 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2288 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2289 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2290 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2291 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2292 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2293 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2294 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2297 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2298 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2299 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2300 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2301 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2305 QMakeVar add "${VAR}s" "${VAL}"
2306 elif [ "$OPT" = "no" ]; then
2307 PLUG_VAR="${VAR}-plugin"
2308 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2309 IN_VAR="${VAR}-driver"
2313 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2314 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2315 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2316 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2317 QMakeVar del "${IN_VAR}s" "$VAL"
2318 QMakeVar del "${PLUG_VAR}s" "$VAL"
2320 if [ "$ERROR" = "yes" ]; then
2321 echo "$CURRENT_OPT: unknown argument"
2326 if [ "$VAL" = "yes" ]; then
2327 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2328 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2332 elif [ "$VAL" = "no" ]; then
2333 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2334 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2343 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2350 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2357 D_FLAGS="$D_FLAGS \"$VAL\""
2360 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2363 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2366 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2369 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2372 if [ "$PLATFORM_MAC" = "yes" ]; then
2373 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2374 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2380 if [ "$PLATFORM_MAC" = "yes" ]; then
2381 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2390 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2397 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2398 CFG_PHONON_BACKEND="$VAL"
2404 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2405 CFG_MULTIMEDIA="$VAL"
2417 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2418 CFG_AUDIO_BACKEND="$VAL"
2424 if [ "$VAL" != "no" ]; then
2429 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2439 if [ "$UNKNOWN_OPT" = "yes" ]; then
2440 echo "${CURRENT_OPT}: invalid command-line switch"
2446 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2447 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2450 if [ "$CFG_GUI" = "no" ]; then
2451 echo "Warning: -no-gui will disable the qt3support library."
2455 #disable Qt3Support for Lighthouse
2456 if [ "$PLATFORM_QPA" = "yes" ]; then
2460 # update QT_CONFIG to show our current predefined configuration
2461 case "$CFG_QCONFIG" in
2462 minimal|small|medium|large|full)
2463 # these are a sequence of increasing functionality
2464 for c in minimal small medium large full; do
2465 QT_CONFIG="$QT_CONFIG $c-config"
2466 [ "$CFG_QCONFIG" = $c ] && break
2470 # not known to be sufficient for anything
2471 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2472 echo >&2 "Error: configuration file not found:"
2473 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2475 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2480 #-------------------------------------------------------------------------------
2481 # build tree initialization
2482 #-------------------------------------------------------------------------------
2484 # where to find which..
2485 unixtests="$relpath/config.tests/unix"
2486 mactests="$relpath/config.tests/mac"
2487 symbiantests="$relpath/config.tests/symbian"
2488 WHICH="$unixtests/which.test"
2490 PERL=`$WHICH perl 2>/dev/null`
2492 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2494 for e in gawk nawk awk; do
2495 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2502 PERL="/usr/bin/perl"
2503 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2507 ### skip this if the user just needs help...
2508 if [ "$OPT_HELP" != "yes" ]; then
2510 # is this a shadow build?
2511 if [ "$OPT_SHADOW" = "maybe" ]; then
2513 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2514 if [ -h "$outpath" ]; then
2515 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2521 if [ "$OPT_SHADOW" = "yes" ]; then
2522 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2523 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2524 echo >&2 "Cannot proceed."
2527 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2530 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2532 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2533 echo "Qt can be built in release mode with separate debug information, so"
2534 echo "-debug-and-release is not necessary anymore"
2538 if [ "$CFG_SILENT" = "yes" ]; then
2539 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2542 # if the source tree is different from the build tree,
2543 # symlink or copy part of the sources
2544 if [ "$OPT_SHADOW" = "yes" ]; then
2545 echo "Preparing build tree..."
2547 if [ -z "$PERL" ]; then
2549 echo "You need perl in your PATH to make a shadow build."
2550 echo "Cannot proceed."
2554 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2556 # symlink the qmake directory
2557 find "$relpath/qmake" | while read a; do
2558 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2559 if [ '!' -f "$my_a" ]; then
2560 if [ -d "$a" ]; then
2561 # directories are created...
2564 a_dir=`dirname "$my_a"`
2565 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2566 # ... and files are symlinked
2567 case `basename "$a"` in
2568 *.o|*.d|GNUmakefile*|qmake)
2579 # make a syncqt script that can be used in the shadow
2580 rm -f "$outpath/bin/syncqt"
2581 if [ -x "$relpath/bin/syncqt" ]; then
2582 mkdir -p "$outpath/bin"
2583 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2584 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2585 chmod 755 "$outpath/bin/syncqt"
2588 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2589 rm -f "$outpath/bin/$i"
2590 if [ -x "$relpath/bin/$i" ]; then
2591 mkdir -p "$outpath/bin"
2592 echo "#!/bin/sh" >"$outpath/bin/$i"
2593 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2594 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2595 chmod 755 "$outpath/bin/$i"
2599 # symlink the mkspecs directory
2600 mkdir -p "$outpath/mkspecs"
2601 rm -rf "$outpath"/mkspecs/*
2602 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2603 rm -f "$outpath/mkspecs/default"
2607 rm -rf "$outpath/mkspecs/$1"
2608 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2609 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2612 # Special case for mkspecs/features directory.
2613 # To be able to place .prf files into a shadow build directory,
2614 # we're creating links for files only. The directory structure is reproduced.
2615 ShadowMkspecs features
2617 # The modules dir is special, too.
2618 ShadowMkspecs modules
2620 # symlink the doc directory
2621 rm -rf "$outpath/doc"
2622 ln -s "$relpath/doc" "$outpath/doc"
2624 # make sure q3porting.xml can be found
2625 mkdir -p "$outpath/tools/porting/src"
2626 rm -f "$outpath/tools/porting/src/q3porting.xml"
2627 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2630 # symlink fonts to be able to run application from build directory
2631 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2632 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2633 mkdir -p "${outpath}/lib"
2634 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2638 if [ "$OPT_FAST" = "auto" ]; then
2639 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2646 # find a make command
2647 if [ -z "$MAKE" ]; then
2649 for mk in gmake make; do
2650 if "$WHICH" $mk >/dev/null 2>&1; then
2655 if [ -z "$MAKE" ]; then
2656 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2657 echo >&2 "Cannot proceed."
2660 # export MAKE, we need it later in the config.tests
2666 #-------------------------------------------------------------------------------
2667 # auto-detect all that hasn't been specified in the arguments
2668 #-------------------------------------------------------------------------------
2670 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2671 if [ "$CFG_EMBEDDED" != "no" ]; then
2672 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2674 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2675 if [ -z "$XPLATFORM" ]; then
2676 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2677 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2681 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2682 if [ -z "$XPLATFORM" ]; then
2683 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2684 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2688 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2689 if [ -z "$XPLATFORM" ]; then
2690 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2691 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2695 if [ -z "$PLATFORM" ]; then
2696 case "$UNAME_MACHINE" in
2698 PLATFORM=qws/linux-x86-g++
2701 PLATFORM=qws/linux-x86_64-g++
2704 PLATFORM=qws/linux-generic-g++
2708 if [ -z "$XPLATFORM" ]; then
2709 if [ "$CFG_EMBEDDED" = "auto" ]; then
2710 if [ -n "$CFG_ARCH" ]; then
2711 CFG_EMBEDDED=$CFG_ARCH
2713 case "$UNAME_MACHINE" in
2721 CFG_EMBEDDED=generic
2726 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2730 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2731 if [ -z "$XPLATFORM" ]; then
2732 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2733 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2737 if [ -z "$XPLATFORM" ]; then
2742 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2749 if [ -z "$PLATFORM" ]; then
2751 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2753 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2755 # PLATFORM=macx-xcode
2762 #PLATFORM=aix-g++-64
2764 #PLATFORM=aix-xlc-64
2766 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2776 # PLATFORM=dynix-g++
2782 PLATFORM=freebsd-g++
2784 - Also available for FreeBSD: freebsd-icc
2788 PLATFORM=openbsd-g++
2799 #PLATFORM=irix-cc-64
2801 - Also available for IRIX: irix-g++ irix-cc-64
2805 case "$UNAME_MACHINE" in
2807 #PLATFORM=hpuxi-acc-32
2808 PLATFORM=hpuxi-acc-64
2810 - Also available for HP-UXi: hpuxi-acc-32
2816 #PLATFORM=hpux-acc-64
2818 #PLATFORM=hpux-acc-o64
2820 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2829 - Also available for Tru64: tru64-g++
2833 case "$UNAME_MACHINE" in
2835 PLATFORM=linux-g++-64
2842 - Also available for Linux: linux-kcc linux-icc linux-cxx
2846 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2847 PLATFORM="solaris-g++"
2849 #PLATFORM=solaris-g++
2851 #PLATFORM=solaris-cc64
2854 - Also available for Solaris: solaris-g++ solaris-cc-64
2857 ReliantUNIX-*:*|SINIX-*:*)
2858 PLATFORM=reliant-cds
2859 #PLATFORM=reliant-cds-64
2861 - Also available for Reliant UNIX: reliant-cds-64
2871 #PLATFORM=unixware-g++
2872 PLATFORM=unixware-cc
2874 - Also available for OpenUNIX: unixware-g++
2878 #PLATFORM=unixware-g++
2879 PLATFORM=unixware-cc
2881 - Also available for UnixWare: unixware-g++
2888 - Also available for SCO OpenServer: sco-g++
2892 PLATFORM=unixware-g++
2895 PLATFORM=unsupported/qnx-g++
2898 if [ "$OPT_HELP" != "yes" ]; then
2900 for p in $PLATFORMS; do
2901 echo " $relconf $* -platform $p"
2904 echo " The build script does not currently recognize all" >&2
2905 echo " platforms supported by Qt." >&2
2906 echo " Rerun this script with a -platform option listed to" >&2
2907 echo " set the system/compiler combination you use." >&2
2914 if [ "$PLATFORM_QWS" = "yes" ]; then
2916 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2918 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2921 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2923 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2924 case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
2925 case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
2926 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2928 if [ -d "$PLATFORM" ]; then
2929 QMAKESPEC="$PLATFORM"
2931 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2933 if [ -d "$XPLATFORM" ]; then
2934 XQMAKESPEC="$XPLATFORM"
2936 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2938 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2939 QT_CROSS_COMPILE=yes
2940 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2943 if [ "$PLATFORM_MAC" = "yes" ]; then
2944 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2946 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2947 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2948 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2949 echo " built with 'macx-g++'" >&2
2955 # check specified platforms are supported
2956 if [ '!' -d "$QMAKESPEC" ]; then
2958 echo " The specified system/compiler is not supported:"
2962 echo " Please see the README file for a complete list."
2966 if [ '!' -d "$XQMAKESPEC" ]; then
2968 echo " The specified system/compiler is not supported:"
2972 echo " Please see the README file for a complete list."
2976 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2978 echo " The specified system/compiler port is not complete:"
2980 echo " $XQMAKESPEC/qplatformdefs.h"
2982 echo " Please contact qt-info@nokia.com."
2987 # now look at the configs and figure out what platform we are config'd for
2988 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2989 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2991 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2993 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2994 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2995 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2996 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2997 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
3001 #-------------------------------------------------------------------------------
3002 # determine the system architecture
3003 #-------------------------------------------------------------------------------
3004 if [ "$OPT_VERBOSE" = "yes" ]; then
3005 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
3008 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
3009 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
3011 echo "You have specified a target architecture with -embedded and -arch."
3012 echo "The two architectures you have specified are different, so we can"
3013 echo "not proceed. Either set both to be the same, or only use -embedded."
3019 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
3020 case `basename "$XPLATFORM"` in
3023 echo "You are not licensed for Qt for `basename $XPLATFORM`."
3025 echo "Please contact qt-info@nokia.com to upgrade your license to"
3026 echo "include this platform, or install the Qt Open Source Edition"
3027 echo "if you intend to develop free software."
3033 if [ -z "${CFG_HOST_ARCH}" ]; then
3034 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
3036 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
3037 case "$CFG_HOST_ARCH" in
3042 if [ "$OPT_VERBOSE" = "yes" ]; then
3043 echo " GNU/Hurd ($CFG_HOST_ARCH)"
3047 CFG_HOST_ARCH=`uname -p`
3048 if [ "$OPT_VERBOSE" = "yes" ]; then
3049 echo " SGI ($CFG_HOST_ARCH)"
3053 case "$UNAME_MACHINE" in
3055 if [ "$OPT_VERBOSE" = "yes" ]; then
3056 echo " Sun SPARC (sparc)"
3063 if [ "$OPT_VERBOSE" = "yes" ]; then
3064 echo " 64-bit AMD 80x86 (x86_64)"
3066 CFG_HOST_ARCH=x86_64
3069 if [ "$OPT_VERBOSE" = "yes" ]; then
3070 echo " 32-bit Intel 80x86 (i386)"
3078 case "$UNAME_MACHINE" in
3080 if [ "$OPT_VERBOSE" = "yes" ]; then
3081 echo " 32-bit Apple PowerPC (powerpc)"
3085 if [ "$OPT_VERBOSE" = "yes" ]; then
3086 echo " 32-bit Intel 80x86 (i386)"
3090 CFG_HOST_ARCH=macosx
3093 if [ "$OPT_VERBOSE" = "yes" ]; then
3094 echo " 64-bit IBM PowerPC (powerpc)"
3096 CFG_HOST_ARCH=powerpc
3099 if [ "$OPT_VERBOSE" = "yes" ]; then
3100 echo " HP PA-RISC (parisc)"
3102 CFG_HOST_ARCH=parisc
3105 if [ "$OPT_VERBOSE" = "yes" ]; then
3106 echo " 32-bit Intel 80x86 (i386)"
3110 *:*:x86_64|*:*:amd64)
3111 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3112 if [ "$OPT_VERBOSE" = "yes" ]; then
3113 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3117 if [ "$OPT_VERBOSE" = "yes" ]; then
3118 echo " 64-bit AMD 80x86 (x86_64)"
3120 CFG_HOST_ARCH=x86_64
3124 if [ "$OPT_VERBOSE" = "yes" ]; then
3125 echo " 32-bit PowerPC (powerpc)"
3127 CFG_HOST_ARCH=powerpc
3130 if [ "$OPT_VERBOSE" = "yes" ]; then
3131 echo " 64-bit PowerPC (powerpc)"
3133 CFG_HOST_ARCH=powerpc
3136 if [ "$OPT_VERBOSE" = "yes" ]; then
3137 echo " IBM S/390 (s390)"
3142 if [ "$OPT_VERBOSE" = "yes" ]; then
3148 if [ "$OPT_VERBOSE" = "yes" ]; then
3149 echo " Linux on SPARC"
3154 case "$UNAME_MACHINE" in
3156 if [ "$OPT_VERBOSE" = "yes" ]; then
3157 echo " QNX on Intel 80x86 (i386)"
3164 if [ "$OPT_VERBOSE" = "yes" ]; then
3165 echo " Trying '$UNAME_MACHINE'..."
3167 CFG_HOST_ARCH="$UNAME_MACHINE"
3172 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3173 if [ -n "$CFG_ARCH" ]; then
3174 CFG_EMBEDDED=$CFG_ARCH
3177 case "$CFG_EMBEDDED" in
3200 CFG_ARCH="$CFG_EMBEDDED"
3203 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3204 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3205 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3207 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3208 CFG_ARCH=$CFG_HOST_ARCH
3215 # previously, armv6 was a different arch
3221 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3222 if [ "$OPT_VERBOSE" = "yes" ]; then
3223 echo " '$CFG_ARCH' is supported"
3226 if [ "$OPT_VERBOSE" = "yes" ]; then
3227 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3231 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3232 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3233 if [ "$OPT_VERBOSE" = "yes" ]; then
3234 echo " '$CFG_HOST_ARCH' is supported"
3237 if [ "$OPT_VERBOSE" = "yes" ]; then
3238 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3240 CFG_HOST_ARCH=generic
3244 if [ "$OPT_VERBOSE" = "yes" ]; then
3245 echo "System architecture: '$CFG_ARCH'"
3246 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3247 echo "Host architecture: '$CFG_HOST_ARCH'"
3251 #-------------------------------------------------------------------------------
3252 # tests that don't need qmake (must be run before displaying help)
3253 #-------------------------------------------------------------------------------
3255 # detect build style
3256 if [ "$CFG_DEBUG" = "auto" ]; then
3257 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3258 CFG_DEBUG_RELEASE=yes
3260 elif [ "$CFG_DEV" = "yes" ]; then
3261 CFG_DEBUG_RELEASE=no
3264 CFG_DEBUG_RELEASE=no
3268 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3269 QT_CONFIG="$QT_CONFIG build_all"
3272 if [ -z "$PKG_CONFIG" ]; then
3273 # See if PKG_CONFIG is set in the mkspec:
3274 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3276 if [ -z "$PKG_CONFIG" ]; then
3277 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3280 # Work out if we can use pkg-config
3281 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3282 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3284 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3285 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3286 echo >&2 "environment!"
3288 if [ -z "$PKG_CONFIG_PATH" ]; then
3290 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3291 echo >&2 "the host compiler's .pc files will be used. This is probably"
3292 echo >&2 "not what you want."
3294 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3296 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3297 echo >&2 "been set. This means your toolchain's .pc files must contain"
3298 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3299 echo >&2 "tests are failing, please check these files."
3304 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3305 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3306 echo >&2 "dependencies"
3312 if [ ! -n "$PKG_CONFIG" ]; then
3313 QT_CONFIG="$QT_CONFIG no-pkg-config"
3316 # process CFG_MAC_ARCHS
3317 if [ "$PLATFORM_MAC" = "yes" ]; then
3318 # check -arch arguments for validity.
3319 ALLOWED="x86 ppc x86_64 ppc64 i386"
3320 # Save the list so we can re-write it using only valid values
3321 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3323 for i in $CFG_MAC_ARCHS_IN
3325 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3326 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3329 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3330 # These are synonymous values
3331 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3332 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3333 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3335 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3336 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3341 # pass on $CFG_SDK to the configure tests.
3342 if [ '!' -z "$CFG_SDK" ]; then
3343 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3346 # find the default framework value
3347 if [ "$CFG_ARCH" = "macosx" ]; then
3348 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3349 CFG_FRAMEWORK="$CFG_SHARED"
3350 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3352 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3360 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3361 TEST_COMPILER="$CXX"
3363 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3364 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3365 #for Symbian we don't need this checking
3366 if [ -z "$TEST_COMPILER" ]; then
3367 echo "ERROR: Cannot set the compiler for the configuration tests"
3372 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3373 TEST_COMPILER="nacl-gcc"
3377 if [ -n "$CFG_SYSROOT" ]; then
3378 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3379 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3380 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3382 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3386 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3388 # auto-detect precompiled header support
3389 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3390 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3392 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3397 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3399 echo "WARNING: Using universal binaries disables precompiled headers."
3404 #auto-detect DWARF2 on the mac
3405 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3406 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3413 # auto-detect support for -Xarch on the mac
3414 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3415 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3422 # don't autodetect support for separate debug info on objcopy when
3423 # cross-compiling as lots of toolchains seems to have problems with this
3424 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3425 CFG_SEPARATE_DEBUG_INFO="no"
3428 # auto-detect support for separate debug info in objcopy
3429 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3430 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3431 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3432 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3433 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3434 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3435 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3436 CFG_SEPARATE_DEBUG_INFO=no
3440 # binutils on HP-UX is buggy; default to no.
3441 CFG_SEPARATE_DEBUG_INFO=no
3444 CFG_SEPARATE_DEBUG_INFO=yes
3450 # auto-detect -fvisibility support
3451 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3452 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3453 CFG_REDUCE_EXPORTS=no
3455 CFG_REDUCE_EXPORTS=yes
3459 # detect the availability of the -Bsymbolic-functions linker optimization
3460 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3461 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3462 CFG_REDUCE_RELOCATIONS=no
3464 CFG_REDUCE_RELOCATIONS=yes
3468 # auto-detect GNU make support
3469 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3473 # If -opengl wasn't specified, don't try to auto-detect
3474 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3479 if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
3480 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3485 # find the default framework value
3486 if [ "$CFG_ARCH" = "macosx" ]; then
3487 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3488 CFG_FRAMEWORK="$CFG_SHARED"
3489 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3491 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3499 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3500 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3501 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3502 # get the darwin version. 10.0.0 and up means snow leopard.
3503 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3504 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3506 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3511 # x11 tests are done after qmake is built
3514 #setup the build parts
3515 if [ -z "$CFG_BUILD_PARTS" ]; then
3516 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3518 # don't build tools by default when cross-compiling
3519 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3520 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3523 for nobuild in $CFG_NOBUILD_PARTS; do
3524 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3526 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3528 # echo "WARNING: libs is a required part of the build."
3530 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3533 #-------------------------------------------------------------------------------
3534 # post process QT_INSTALL_* variables
3535 #-------------------------------------------------------------------------------
3538 if [ -z "$QT_INSTALL_PREFIX" ]; then
3539 if [ "$CFG_DEV" = "yes" ]; then
3540 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3542 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3545 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3547 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
3548 [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
3549 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
3550 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
3551 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS=
3552 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS=
3553 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="\\\\resource\\\\qt$QT_LIBINFIX\\\\plugins"
3554 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="\\\\resource\\\\qt$QT_LIBINFIX\\\\imports"
3555 [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA=
3556 [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations"
3557 [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS=
3558 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES=
3561 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3562 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3563 if [ "$PLATFORM_MAC" = "yes" ]; then
3564 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3567 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3570 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3573 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3574 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3575 if [ "$PLATFORM_MAC" = "yes" ]; then
3576 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3581 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3584 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3587 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3588 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3589 if [ "$PLATFORM_MAC" = "yes" ]; then
3590 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3591 QT_INSTALL_LIBS="/Libraries/Frameworks"
3595 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3597 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3600 if [ -z "$QT_INSTALL_BINS" ]; then #default
3601 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3602 if [ "$PLATFORM_MAC" = "yes" ]; then
3603 QT_INSTALL_BINS="/Developer/Applications/Qt"
3606 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3609 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3612 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3613 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3614 if [ "$PLATFORM_MAC" = "yes" ]; then
3615 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3618 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3620 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3623 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3624 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3625 if [ "$PLATFORM_MAC" = "yes" ]; then
3626 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3629 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3631 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3634 if [ -z "$QT_INSTALL_DATA" ]; then #default
3635 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3637 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3640 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3641 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3643 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3646 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3647 if [ "$PLATFORM_MAC" = "yes" ]; then
3648 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3650 QT_INSTALL_SETTINGS=/etc/xdg
3653 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3656 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3657 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3658 if [ "$PLATFORM_MAC" = "yes" ]; then
3659 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3662 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3664 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3667 #-------------------------------------------------------------------------------
3668 # help - interactive parts of the script _after_ this section please
3669 #-------------------------------------------------------------------------------
3671 # next, emit a usage message if something failed.
3672 if [ "$OPT_HELP" = "yes" ]; then
3673 [ "x$ERROR" = "xyes" ] && echo
3674 if [ "$CFG_NIS" = "no" ]; then
3681 if [ "$CFG_CUPS" = "no" ]; then
3688 if [ "$CFG_ICONV" = "no" ]; then
3695 if [ "$CFG_LARGEFILE" = "no" ]; then
3702 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3709 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3717 if [ "$CFG_XCB" = "no" ]; then
3725 if [ "$CFG_WAYLAND" = "no" ]; then
3732 if [ "$CFG_XINPUT2" = "no" ]; then
3741 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3742 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3743 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3744 [-release] [-debug] [-debug-and-release]
3745 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3746 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3747 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3748 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3749 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3750 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3751 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3752 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3753 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3754 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3755 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3756 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3757 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3758 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3759 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3760 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3761 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3762 [-no-openssl] [-openssl] [-openssl-linked]
3763 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3764 [-no-javascript-jit] [-javascript-jit]
3765 [-no-script] [-script] [-no-scripttools] [-scripttools]
3766 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3767 [-no-location] [-location]
3768 [additional platform specific options (see below)]
3771 Installation options:
3773 -qpa ................ This will enable the QPA build.
3774 QPA is a window system agnostic implementation of Qt.
3776 These are optional, but you may specify install directories.
3778 -prefix <dir> ...... This will install everything relative to <dir>
3779 (default $QT_INSTALL_PREFIX)
3781 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3784 -hostprefix [dir] .. Tools and libraries needed when developing
3785 applications are installed in [dir]. If [dir] is
3786 not given, the current build directory will be used.
3791 * -prefix-install .... Force a sandboxed "local" installation of
3792 Qt. This will install into
3793 $QT_INSTALL_PREFIX, if this option is
3794 disabled then some platforms will attempt a
3795 "system" install by placing default values to
3796 be placed in a system location other than
3799 You may use these to separate different parts of the install:
3801 -bindir <dir> ......... Executables will be installed to <dir>
3802 (default PREFIX/bin)
3803 -libdir <dir> ......... Libraries will be installed to <dir>
3804 (default PREFIX/lib)
3805 -docdir <dir> ......... Documentation will be installed to <dir>
3806 (default PREFIX/doc)
3807 -headerdir <dir> ...... Headers will be installed to <dir>
3808 (default PREFIX/include)
3809 -plugindir <dir> ...... Plugins will be installed to <dir>
3810 (default PREFIX/plugins)
3811 -importdir <dir> ...... Imports for QML will be installed to <dir>
3812 (default PREFIX/imports)
3813 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3815 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3816 (default PREFIX/translations)
3817 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3818 (default PREFIX/etc/settings)
3819 -examplesdir <dir> .... Examples will be installed to <dir>
3820 (default PREFIX/examples)
3824 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3825 that needs to be evaluated. If the evaluation succeeds, the feature is
3826 included. Here is a short explanation of each option:
3828 * -release ........... Compile and link Qt with debugging turned off.
3829 -debug ............. Compile and link Qt with debugging turned on.
3830 -debug-and-release . Compile and link two versions of Qt, with and without
3831 debugging turned on (Mac only).
3833 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3835 -opensource ........ Compile and link the Open-Source Edition of Qt.
3836 -commercial ........ Compile and link the Commercial Edition of Qt.
3839 * -shared ............ Create and use shared Qt libraries.
3840 -static ............ Create and use static Qt libraries.
3842 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3844 -fast .............. Configure Qt quickly by generating Makefiles only for
3845 library and subdirectory targets. All other Makefiles
3846 are created as wrappers, which will in turn run qmake.
3848 -no-largefile ...... Disables large file support.
3849 + -largefile ......... Enables Qt to access files larger than 4 GB.
3852 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3859 if [ "$CFG_DBUS" = "no" ]; then
3868 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3869 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3871 -no-accessibility .. Do not compile Accessibility support.
3872 * -accessibility ..... Compile Accessibility support.
3874 $SHN -no-stl ............ Do not compile STL support.
3875 $SHY -stl ............... Compile STL support.
3877 -no-sql-<driver> ... Disable SQL <driver> entirely.
3878 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3880 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3883 Possible values for <driver>:
3884 [ $CFG_SQL_AVAILABLE ]
3886 -system-sqlite ..... Use sqlite from the operating system.
3888 -no-qt3support ..... Disables the Qt 3 support functionality.
3889 * -qt3support ........ Enables the Qt 3 support functionality.
3891 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3892 + -xmlpatterns ....... Build the QtXmlPatterns module.
3893 QtXmlPatterns is built if a decent C++ compiler
3894 is used and exceptions are enabled.
3896 -no-multimedia ..... Do not build the QtMultimedia module.
3897 + -multimedia ........ Build the QtMultimedia module.
3899 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3900 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3902 -no-phonon ......... Do not build the Phonon module.
3903 + -phonon ............ Build the Phonon module.
3904 Phonon is built if a decent C++ compiler is used.
3905 -no-phonon-backend.. Do not build the platform phonon plugin.
3906 + -phonon-backend..... Build the platform phonon plugin.
3908 -no-svg ............ Do not build the SVG module.
3909 + -svg ............... Build the SVG module.
3911 -no-webkit ......... Do not build the WebKit module.
3912 + -webkit ............ Build the WebKit module.
3913 WebKit is built if a decent C++ compiler is used.
3914 -webkit-debug ...... Build the WebKit module with debug symbols.
3916 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3917 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3919 -no-script ......... Do not build the QtScript module.
3920 + -script ............ Build the QtScript module.
3922 -no-scripttools .... Do not build the QtScriptTools module.
3923 + -scripttools ....... Build the QtScriptTools module.
3925 -no-v8 ............. Do not build the V8 module.
3926 + -v8 ................ Build the V8 module.
3928 -no-declarative ..... Do not build the declarative module.
3929 + -declarative ....... Build the declarative module.
3931 -no-declarative-debug ..... Do not build the declarative debugging support.
3932 + -declarative-debug ....... Build the declarative debugging support.
3934 -no-location ....... Do not build the QtLocation module.
3935 + -location .......... Build the QtLocation module.
3937 -platform target ... The operating system and compiler you are building
3940 See the README file for a list of supported
3941 operating systems and compilers.
3944 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3946 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3947 raster - Software rasterizer
3948 opengl - Rendering via OpenGL, Experimental!
3949 openvg - Rendering via OpenVG, Experimental!
3956 -no-mmx ............ Do not compile with use of MMX instructions.
3957 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3958 -no-sse ............ Do not compile with use of SSE instructions.
3959 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3960 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3961 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3962 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3963 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3964 -no-avx ............ Do not compile with use of AVX instructions.
3965 -no-neon ........... Do not compile with use of NEON instructions.
3967 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3968 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3970 -D <string> ........ Add an explicit define to the preprocessor.
3971 -I <string> ........ Add an explicit include path.
3972 -L <string> ........ Add an explicit library path.
3974 -help, -h .......... Display this information.
3976 Third Party Libraries:
3978 -qt-zlib ........... Use the zlib bundled with Qt.
3979 + -system-zlib ....... Use zlib from the operating system.
3980 See http://www.gzip.org/zlib
3982 -no-gif ............ Do not compile GIF reading support.
3984 -no-libtiff ........ Do not compile TIFF support.
3985 -qt-libtiff ........ Use the libtiff bundled with Qt.
3986 + -system-libtiff .... Use libtiff from the operating system.
3987 See http://www.libtiff.org
3989 -no-libpng ......... Do not compile PNG support.
3990 -qt-libpng ......... Use the libpng bundled with Qt.
3991 + -system-libpng ..... Use libpng from the operating system.
3992 See http://www.libpng.org/pub/png
3994 -no-libmng ......... Do not compile MNG support.
3995 -qt-libmng ......... Use the libmng bundled with Qt.
3996 + -system-libmng ..... Use libmng from the operating system.
3997 See http://www.libmng.com
3999 -no-libjpeg ........ Do not compile JPEG support.
4000 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
4001 + -system-libjpeg .... Use libjpeg from the operating system.
4002 See http://www.ijg.org
4004 -no-openssl ........ Do not compile support for OpenSSL.
4005 + -openssl ........... Enable run-time OpenSSL support.
4006 -openssl-linked .... Enabled linked OpenSSL support.
4008 -ptmalloc .......... Override the system memory allocator with ptmalloc.
4013 -make <part> ....... Add part to the list of parts to be built at make time.
4014 ($QT_DEFAULT_BUILD_PARTS)
4015 -nomake <part> ..... Exclude part from the list of parts to be built.
4017 -R <string> ........ Add an explicit runtime library path to the Qt
4019 -l <string> ........ Add an explicit library.
4021 -no-rpath .......... Do not use the library install path as a runtime
4023 + -rpath ............. Link Qt libraries and executables using the library
4024 install path as a runtime library path. Equivalent
4025 to -R install_libpath
4027 -continue .......... Continue as far as possible if an error occurs.
4029 -verbose, -v ....... Print verbose information about each step of the
4032 -silent ............ Reduce the build output so that warnings and errors
4033 can be seen more easily.
4035 * -no-optimized-qmake ... Do not build qmake optimized.
4036 -optimized-qmake ...... Build qmake optimized.
4038 -no-gui ............ Don't build the Qt GUI library
4040 $NSN -no-nis ............ Do not compile NIS support.
4041 $NSY -nis ............... Compile NIS support.
4043 $CUN -no-cups ........... Do not compile CUPS support.
4044 $CUY -cups .............. Compile CUPS support.
4045 Requires cups/cups.h and libcups.so.2.
4047 $CIN -no-iconv .......... Do not compile support for iconv(3).
4048 $CIY -iconv ............. Compile support for iconv(3).
4050 $PHN -no-pch ............ Do not use precompiled header support.
4051 $PHY -pch ............... Use precompiled header support.
4053 $DBN -no-dbus ........... Do not compile the QtDBus module.
4054 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
4055 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
4057 -reduce-relocations ..... Reduce relocations in the libraries through extra
4058 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
4059 experimental; needs GNU ld >= 2.18).
4062 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
4063 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
4070 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4078 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4082 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4083 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4085 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
4086 $XCBY -xcb ............... Compile Xcb support.
4088 $XWN -no-wayland......... Do not compile Wayland support.
4089 $XWY -wayland .......... Compile Wayland support.
4095 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4099 $X2N -no-xinput2......... Do not compile XInput2 support.
4100 $X2Y -xinput2............ Compile XInput2 support.
4106 if [ "$PLATFORM_X11" = "yes" ]; then
4107 if [ "$CFG_SM" = "no" ]; then
4114 if [ "$CFG_XSHAPE" = "no" ]; then
4121 if [ "$CFG_XVIDEO" = "no" ]; then
4128 if [ "$CFG_XINERAMA" = "no" ]; then
4135 if [ "$CFG_FONTCONFIG" = "no" ]; then
4142 if [ "$CFG_XCURSOR" = "no" ]; then
4149 if [ "$CFG_XFIXES" = "no" ]; then
4156 if [ "$CFG_XRANDR" = "no" ]; then
4163 if [ "$CFG_XRENDER" = "no" ]; then
4170 if [ "$CFG_MITSHM" = "no" ]; then
4177 if [ "$CFG_XINPUT" = "no" ]; then
4184 if [ "$CFG_XKB" = "no" ]; then
4191 if [ "$CFG_IM" = "no" ]; then
4202 -no-gtkstyle ....... Do not build the GTK theme integration.
4203 + -gtkstyle .......... Build the GTK theme integration.
4205 * -no-nas-sound ...... Do not compile in NAS sound support.
4206 -system-nas-sound .. Use NAS libaudio from the operating system.
4207 See http://radscan.com/nas.html
4209 -egl ............... Use EGL instead of GLX to manage contexts.
4210 When building for desktop OpenGL, this option will
4211 make Qt use EGL to manage contexts rather than the
4212 GLX, which is the default. Note: For OpenGL ES, EGL
4215 -no-opengl ......... Do not support OpenGL.
4216 + -opengl <api> ...... Enable OpenGL support.
4217 With no parameter, this will auto-detect the "best"
4218 OpenGL API to use. If desktop OpenGL is available, it
4219 will be used. Use desktop or es2 for <api>
4220 to force the use of the Desktop OpenGL or
4221 OpenGL ES 2 APIs instead.
4223 -no-openvg ........ Do not support OpenVG.
4224 + -openvg ........... Enable OpenVG support.
4225 Requires EGL support, typically supplied by an OpenGL
4226 or other graphics implementation.
4228 $SMN -no-sm ............. Do not support X Session Management.
4229 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4231 $SHN -no-xshape ......... Do not compile XShape support.
4232 $SHY -xshape ............ Compile XShape support.
4233 Requires X11/extensions/shape.h.
4235 $XVN -no-xvideo ......... Do not compile XVideo support.
4236 $XVY -xvideo ............ Compile XVideo support.
4237 Requires X11/extensions/Xv.h & Xvlib.h.
4239 $SHN -no-xsync .......... Do not compile XSync support.
4240 $SHY -xsync ............. Compile XSync support.
4241 Requires X11/extensions/sync.h.
4243 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4244 $XAY -xinerama .......... Compile Xinerama support.
4245 Requires X11/extensions/Xinerama.h and libXinerama.
4246 By default, Xinerama support will be compiled if
4247 available and the shared libraries are dynamically
4250 $XCN -no-xcursor ........ Do not compile Xcursor support.
4251 $XCY -xcursor ........... Compile Xcursor support.
4252 Requires X11/Xcursor/Xcursor.h and libXcursor.
4253 By default, Xcursor support will be compiled if
4254 available and the shared libraries are dynamically
4257 $XFN -no-xfixes ......... Do not compile Xfixes support.
4258 $XFY -xfixes ............ Compile Xfixes support.
4259 Requires X11/extensions/Xfixes.h and libXfixes.
4260 By default, Xfixes support will be compiled if
4261 available and the shared libraries are dynamically
4264 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4265 $XZY -xrandr ............ Compile Xrandr support.
4266 Requires X11/extensions/Xrandr.h and libXrandr.
4268 $XRN -no-xrender ........ Do not compile Xrender support.
4269 $XRY -xrender ........... Compile Xrender support.
4270 Requires X11/extensions/Xrender.h and libXrender.
4272 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4273 $XMY -mitshm ............ Compile MIT-SHM support.
4274 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4276 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4277 $FCGY -fontconfig ........ Compile FontConfig support.
4278 Requires fontconfig/fontconfig.h, libfontconfig,
4279 freetype.h and libfreetype.
4281 $XIN -no-xinput ......... Do not compile Xinput support.
4282 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4283 which requires IRIX with wacom.h and libXi or
4284 XFree86 with X11/extensions/XInput.h and libXi.
4286 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4287 $XKY -xkb ............... Compile XKB support.
4292 if [ "$PLATFORM_MAC" = "yes" ]; then
4297 -Fstring ........... Add an explicit framework path.
4298 -fw string ......... Add an explicit framework.
4300 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4302 -carbon .............Build the Carbon version of Qt. 64-bit archs
4303 are not supported by carbon and will be built
4306 * -framework ......... Build Qt as a series of frameworks and
4307 link tools against those frameworks.
4308 -no-framework ...... Do not build Qt as a series of frameworks.
4310 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4311 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4313 -universal ......... Equivalent to -arch "ppc x86"
4315 -arch <arch> ....... Build Qt for <arch>
4316 Example values for <arch>: x86 ppc x86_64 ppc64
4317 Multiple -arch arguments can be specified.
4319 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4320 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4322 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4323 It is only available to Cocoa builds.
4324 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4325 QT_ENABLE_HARFBUZZ environment variable.
4330 if [ "$PLATFORM_QWS" = "yes" ]; then
4332 Qt for Embedded Linux:
4334 -embedded <arch> .... This will enable the embedded build, you must have a
4335 proper license for this switch to work.
4336 Example values for <arch>: arm mips x86 generic
4340 if [ "$PLATFORM_QPA" = "yes" ]; then
4346 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4349 -xplatform target ... The target platform when cross-compiling.
4351 -no-feature-<feature> Do not compile in <feature>.
4352 -feature-<feature> .. Compile in <feature>. The available features
4353 are described in src/corelib/global/qfeatures.txt
4355 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4356 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4358 The floating point format is usually autodetected by configure. Use this
4359 to override the detected value.
4361 -little-endian ...... Target platform is little endian (LSB first).
4362 -big-endian ......... Target platform is big endian (MSB first).
4364 -host-little-endian . Host platform is little endian (LSB first).
4365 -host-big-endian .... Host platform is big endian (MSB first).
4367 You only need to specify the endianness when
4368 cross-compiling, otherwise the host
4369 endianness will be used.
4371 -no-freetype ........ Do not compile in Freetype2 support.
4372 -qt-freetype ........ Use the libfreetype bundled with Qt.
4373 * -system-freetype .... Use libfreetype from the operating system.
4374 See http://www.freetype.org/
4376 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4377 default ($CFG_QCONFIG).
4379 -no-opengl .......... Do not support OpenGL.
4380 -opengl <api> ....... Enable OpenGL ES support
4381 With no parameter, this will attempt to auto-detect
4382 OpenGL ES 2, or regular desktop OpenGL.
4383 Use es2 for <api> to override auto-detection.
4387 if [ "$PLATFORM_QWS" = "yes" ]; then
4390 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4391 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4393 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4394 by default all available decorations are on.
4395 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4396 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4397 linked to at run time.
4398 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4399 -no-decoration-<style> ....Disable decoration <style> entirely.
4400 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4402 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4403 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4404 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4405 linked to at run time.
4406 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4407 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4408 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4410 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4411 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4413 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4415 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4417 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4418 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4420 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4421 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4422 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4424 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4425 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4426 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4428 -iwmmxt ............ Compile using the iWMMXt instruction set
4429 (available on some XScale CPUs).
4433 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4434 if [ "$CFG_GLIB" = "no" ]; then
4442 $GBN -no-glib ........... Do not compile Glib support.
4443 $GBY -glib .............. Compile Glib support.
4448 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
4451 Qt for Symbian only:
4452 -no-s60 ............ Do not compile in S60 support.
4453 + -s60 ............... Compile with support for the S60 UI Framework.
4454 -no-style-s60....... Disable s60 style
4455 + -qt-style-s60....... Enable s60 style in the Qt Library
4457 -no-usedeffiles .... Disable the usage of DEF files.
4458 * -usedeffiles ....... Enable the usage of DEF files.
4461 [ "x$ERROR" = "xyes" ] && exit 1
4466 # -----------------------------------------------------------------------------
4467 # LICENSING, INTERACTIVE PART
4468 # -----------------------------------------------------------------------------
4470 if [ "$PLATFORM_QWS" = "yes" ]; then
4471 Platform="Qt for Embedded Linux"
4472 elif [ "$PLATFORM_QPA" = "yes" ]; then
4473 Platform="Qt Lighthouse"
4474 elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
4475 Platform="Qt for Symbian"
4476 elif [ "$PLATFORM_MAC" = "yes" ]; then
4477 Platform="Qt for Mac OS X"
4478 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4479 Platform="Qt for Windows"
4480 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4482 Platform="Qt for Linux/X11"
4486 echo "This is the $Platform ${EditionString} Edition."
4489 if [ "$Edition" = "NokiaInternalBuild" ]; then
4490 echo "Detected -nokia-developer option"
4491 echo "Nokia employees and agents are allowed to use this software under"
4492 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4493 elif [ "$Edition" = "OpenSource" ]; then
4495 echo "You are licensed to use this software under the terms of"
4496 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4497 if [ -f "$relpath/LICENSE.GPL3" ]; then
4498 echo "You are also licensed to use this software under the terms of"
4499 echo "the GNU General Public License (GPL) versions 3."
4505 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4506 echo "You have already accepted the terms of the $LicenseType license."
4509 if [ -f "$relpath/LICENSE.GPL3" ]; then
4510 echo "Type '3' to view the GNU General Public License version 3."
4512 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4513 echo "Type 'yes' to accept this license offer."
4514 echo "Type 'no' to decline this license offer."
4516 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4520 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4522 elif [ "$acceptance" = "no" ]; then
4523 echo "You are not licensed to use this software."
4526 elif [ "$acceptance" = "3" ]; then
4527 more "$relpath/LICENSE.GPL3"
4528 elif [ "$acceptance" = "L" ]; then
4529 more "$relpath/LICENSE.LGPL"
4532 elif [ "$Edition" = "Preview" ]; then
4533 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4536 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4537 echo "You have already accepted the terms of the $LicenseType license."
4540 echo "You are licensed to use this software under the terms of"
4541 echo "the $TheLicense"
4543 echo "Type '?' to read the Preview License."
4544 echo "Type 'yes' to accept this license offer."
4545 echo "Type 'no' to decline this license offer."
4547 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4551 if [ "$acceptance" = "yes" ]; then
4553 elif [ "$acceptance" = "no" ] ;then
4554 echo "You are not licensed to use this software."
4557 elif [ "$acceptance" = "?" ]; then
4558 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4561 elif [ "$Edition" != "OpenSource" ]; then
4562 if [ -n "$ExpiryDate" ]; then
4563 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4564 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4565 Today=`date +%Y%m%d`
4566 if [ "$Today" -gt "$ExpiryDate" ]; then
4567 case "$LicenseType" in
4568 Commercial|Academic|Educational)
4569 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4571 echo "NOTICE NOTICE NOTICE NOTICE"
4573 echo " Your support and upgrade period has expired."
4575 echo " You are no longer licensed to use this version of Qt."
4576 echo " Please contact qt-info@nokia.com to renew your support"
4577 echo " and upgrades for this license."
4579 echo "NOTICE NOTICE NOTICE NOTICE"
4584 echo "WARNING WARNING WARNING WARNING"
4586 echo " Your support and upgrade period has expired."
4588 echo " You may continue to use your last licensed release"
4589 echo " of Qt under the terms of your existing license"
4590 echo " agreement. But you are not entitled to technical"
4591 echo " support, nor are you entitled to use any more recent"
4592 echo " Qt releases."
4594 echo " Please contact qt-info@nokia.com to renew your"
4595 echo " support and upgrades for this license."
4597 echo "WARNING WARNING WARNING WARNING"
4604 echo "NOTICE NOTICE NOTICE NOTICE"
4606 echo " Your Evaluation license has expired."
4608 echo " You are no longer licensed to use this software. Please"
4609 echo " contact qt-info@nokia.com to purchase license, or install"
4610 echo " the Qt Open Source Edition if you intend to develop free"
4613 echo "NOTICE NOTICE NOTICE NOTICE"
4620 TheLicense=`head -n 1 "$outpath/LICENSE"`
4622 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4623 echo "You have already accepted the terms of the $TheLicense."
4626 echo "You are licensed to use this software under the terms of"
4627 echo "the $TheLicense."
4629 echo "Type '?' to view the $TheLicense."
4630 echo "Type 'yes' to accept this license offer."
4631 echo "Type 'no' to decline this license offer."
4633 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4637 if [ "$acceptance" = "yes" ]; then
4639 elif [ "$acceptance" = "no" ]; then
4640 echo "You are not licensed to use this software."
4643 else [ "$acceptance" = "?" ]
4644 more "$outpath/LICENSE"
4649 # this should be moved somewhere else
4652 AIX_VERSION=`uname -v`
4653 if [ "$AIX_VERSION" -lt "5" ]; then
4654 QMakeVar add QMAKE_LIBS_X11 -lbind
4661 #-------------------------------------------------------------------------------
4662 # generate qconfig.cpp
4663 #-------------------------------------------------------------------------------
4664 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4666 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4667 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4668 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4669 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4670 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4671 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4672 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4673 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4674 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4675 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4676 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4677 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4678 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4680 TODAY=`date +%Y-%m-%d`
4681 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4683 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4684 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4686 /* Installation date */
4687 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4691 if [ ! -z "$QT_HOST_PREFIX" ]; then
4692 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4693 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4694 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4695 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4696 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4697 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4698 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4699 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4700 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4701 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4702 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4704 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4706 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4707 /* Installation Info */
4708 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4709 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4710 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4711 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4712 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4713 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4714 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4715 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4716 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4717 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4718 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4719 #else // QT_BOOTSTRAPPED
4723 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4724 /* Installation Info */
4725 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4726 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4727 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4728 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4729 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4730 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4731 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4732 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4733 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4734 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4735 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4738 if [ ! -z "$QT_HOST_PREFIX" ]; then
4739 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4740 #endif // QT_BOOTSTRAPPED
4745 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4746 /* strlen( "qt_lcnsxxxx" ) == 12 */
4747 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4748 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4749 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4750 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4751 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4752 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4753 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4754 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4755 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4756 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4757 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4758 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4759 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4762 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4763 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4764 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4766 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4767 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4768 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4771 # -----------------------------------------------------------------------------
4772 if [ "$LicenseType" = "Evaluation" ]; then
4773 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4774 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4775 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4778 if [ -n "$EVALKEY" ]; then
4779 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4780 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4781 /* Evaluation license key */
4782 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4784 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4788 # -----------------------------------------------------------------------------
4790 # -----------------------------------------------------------------------------
4793 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4795 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4796 if [ "$OPT_SHADOW" = "yes" ]; then
4797 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4798 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4799 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4804 # $2: optional transformation
4805 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4806 # is where the resulting variable is written to
4807 # Assumes that the optional transformation produces the same variable name for each hit
4808 setBootstrapVariable()
4810 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4816 valStart = index($0, "=") + 1
4819 if (substr($0, valStart - 2, 1) == "+") {
4823 variable = substr($0, 0, valStart - 2 - append)
4824 value = substr($0, valStart)
4825 gsub("[ \t]+", "", variable)
4826 gsub("^[ \t]+", "", value)
4827 gsub("[ \t]+$", "", value)
4829 if (append == 1 && length(combinedValue) > 0) {
4830 combinedValue = combinedValue " " value
4832 combinedValue = value
4836 if (length(combinedValue) > 0) {
4837 printf "%s = %s\n", variable, combinedValue
4843 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4844 echo "Creating qmake. Please wait..."
4847 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4848 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4849 if [ -f "$QCONFIG_H" ]; then
4850 OLD_QCONFIG_H=$QCONFIG_H
4851 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4854 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4855 # when building qmake, we use #defines for the install paths,
4856 # however they are real functions in the library
4857 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4858 mkdir -p "$outpath/src/corelib/global"
4859 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4860 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4863 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4865 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4866 rm -rf mkspecs/default
4867 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4869 for mkfile in GNUmakefile Makefile; do
4872 in_mkfile="${mkfile}.in"
4873 if [ "$mkfile" = "Makefile" ]; then
4874 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4875 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4877 in_mkfile="${mkfile}.unix"
4879 in_mkfile="$relpath/qmake/$in_mkfile"
4880 mkfile="$outpath/qmake/$mkfile"
4881 if [ -f "$mkfile" ]; then
4882 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4885 [ -f "$in_mkfile" ] || continue
4887 echo "########################################################################" > "$mkfile"
4888 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4889 echo "########################################################################" >> "$mkfile"
4892 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4893 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4894 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4896 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4897 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4900 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4901 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4902 if [ "$CFG_SILENT" = "yes" ]; then
4903 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4904 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4906 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4907 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4909 setBootstrapVariable QMAKE_CFLAGS
4910 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4911 setBootstrapVariable QMAKE_LFLAGS
4913 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4914 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4915 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4917 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4918 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4919 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4920 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4921 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4922 elif [ "$CFG_DEBUG" = "yes" ]; then
4923 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4924 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4925 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4926 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4929 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4930 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4931 for rpath in $RPATH_FLAGS; do
4932 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4935 if [ "$BUILD_ON_MAC" = "yes" ]; then
4936 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4937 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4938 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4939 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4940 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4941 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4942 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4943 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4944 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4945 X86_CFLAGS="-arch i386"
4946 X86_LFLAGS="-arch i386"
4947 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4948 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4949 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4951 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4952 PPC_CFLAGS="-arch ppc"
4953 PPC_LFLAGS="-arch ppc"
4954 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4955 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4956 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4958 if [ '!' -z "$CFG_SDK" ]; then
4959 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4960 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4961 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4962 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4963 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4966 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4967 if [ '!' -z "$D_FLAGS" ]; then
4968 for DEF in $D_FLAGS; do
4969 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4972 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4973 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4974 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4975 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4977 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4978 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4979 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4980 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4981 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4982 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4983 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4984 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4985 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4986 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4988 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4989 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4990 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4991 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4996 QMAKE_BUILD_ERROR=no
4997 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4998 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4999 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
5000 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
5003 #-------------------------------------------------------------------------------
5004 # tests that need qmake
5005 #-------------------------------------------------------------------------------
5007 # detect availability of float math.h functions
5008 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
5009 CFG_USE_FLOATMATH=yes
5011 CFG_USE_FLOATMATH=no
5014 # detect mmx support
5015 if [ "${CFG_MMX}" = "auto" ]; then
5016 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
5023 # detect 3dnow support
5024 if [ "${CFG_3DNOW}" = "auto" ]; then
5025 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
5032 # detect sse support
5033 if [ "${CFG_SSE}" = "auto" ]; then
5034 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
5041 # detect sse2 support
5042 if [ "${CFG_SSE2}" = "auto" ]; then
5043 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
5050 # detect sse3 support
5051 if [ "${CFG_SSE3}" = "auto" ]; then
5052 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
5059 # detect ssse3 support
5060 if [ "${CFG_SSSE3}" = "auto" ]; then
5061 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
5068 # detect sse4.1 support
5069 if [ "${CFG_SSE4_1}" = "auto" ]; then
5070 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
5077 # detect sse4.2 support
5078 if [ "${CFG_SSE4_2}" = "auto" ]; then
5079 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
5086 # detect avx support
5087 if [ "${CFG_AVX}" = "auto" ]; then
5088 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5095 # check iWMMXt support
5096 if [ "$CFG_IWMMXT" = "yes" ]; then
5097 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5098 if [ $? != "0" ]; then
5099 echo "The iWMMXt functionality test failed!"
5100 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5105 # detect neon support
5106 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5107 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
5114 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5116 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5117 QMakeVar set styles "windows s60" #overwrite previous default
5121 if [ "$CFG_LARGEFILE" = auto ]; then
5124 if [ "$CFG_PHONON" = auto ]; then
5128 if test -z "$EPOCROOT"; then
5129 echo "Please export EPOCROOT. It should point to the sdk install dir"
5132 if test ! -d "$EPOCROOT/epoc32"; then
5133 echo "Could not find the 'epoc32' dir in your EPOCROOT."
5137 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
5138 # Raptor does not support configure tests.
5140 # the main commands needed to compile;
5141 (mkdir -p config.tests/symbian/rcomp
5142 cd config.tests/symbian/rcomp
5143 rm -f rcomp_test.rsg
5144 touch rcomp_test.rpp rcomp_test.rsc rcomp_test.rss
5145 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
5146 if test ! -f rcomp_test.rsg; then
5147 echo "Finding a working rcomp in your PATH failed."
5148 echo "Fatal error. Make sure you have the epoc tools working and in your PATH";
5153 # compile a simple main that uses printf
5154 if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS
5156 echo "Testing your compiler failed. Could not compile a simple application."
5157 echo "Fatal error; Rerun configure with -verbose to get more details."
5164 if [ "$CFG_ZLIB" = "no" ]; then
5165 # Note: Qt no longer support builds without zlib
5166 # So we force a "no" to be "auto" here.
5167 # If you REALLY really need no zlib support, you can still disable
5168 # it by doing the following:
5169 # add "no-zlib" to mkspecs/qconfig.pri
5170 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5172 # There's no guarantee that Qt will build under those conditions
5177 if [ "$CFG_ZLIB" = "auto" ]; then
5178 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
5185 if [ "$CFG_LARGEFILE" = "auto" ]; then
5186 #Large files should be enabled for all Linux systems
5191 if [ "$CFG_S60" = "auto" ]; then
5192 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5199 if [ "$CFG_QS60STYLE" = "auto" ]; then
5200 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5207 if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then
5208 # elf2e32 crashes when using def files together with gcce.
5209 if [ "$XPLATFORM_SYMBIAN" = "yes" ] && [ "$CFG_DEV" = "no" ] && [ "$XPLATFORM" != "symbian-gcce" ]; then
5210 CFG_SYMBIAN_DEFFILES=yes
5212 CFG_SYMBIAN_DEFFILES=no
5216 # detect how jpeg should be built
5217 if [ "$CFG_JPEG" = "auto" ]; then
5218 if [ "$CFG_SHARED" = "yes" ]; then
5225 if [ "$CFG_LIBJPEG" = "auto" ]; then
5226 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
5233 # detect how gif should be built
5234 if [ "$CFG_GIF" = "auto" ]; then
5235 if [ "$CFG_SHARED" = "yes" ]; then
5242 # detect how tiff should be built
5243 if [ "$CFG_TIFF" = "auto" ]; then
5244 if [ "$CFG_SHARED" = "yes" ]; then
5252 if [ "$CFG_LIBTIFF" = "auto" ]; then
5253 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
5260 # detect how mng should be built
5261 if [ "$CFG_MNG" = "auto" ]; then
5262 if [ "$CFG_SHARED" = "yes" ]; then
5269 if [ "$CFG_LIBMNG" = "auto" ]; then
5270 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
5278 if [ "$CFG_LIBPNG" = "auto" ]; then
5279 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
5286 # detect accessibility
5287 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5288 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5289 # accessibility is currently unsupported
5290 CFG_ACCESSIBILITY=no
5292 CFG_ACCESSIBILITY=yes
5296 # auto-detect SQL-modules support
5297 for _SQLDR in $CFG_SQL_AVAILABLE; do
5300 if [ "$CFG_SQL_mysql" != "no" ]; then
5301 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5302 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5303 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5304 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5305 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5306 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5307 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5309 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5310 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5311 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5312 echo " You need MySql 4 or higher."
5313 echo " If you believe this message is in error you may use the continue"
5314 echo " switch (-continue) to $0 to continue."
5319 QT_LFLAGS_MYSQL_R=""
5323 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
5324 QMakeVar add CONFIG use_libmysqlclient_r
5325 if [ "$CFG_SQL_mysql" = "auto" ]; then
5326 CFG_SQL_mysql=plugin
5328 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5329 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
5330 if [ "$CFG_SQL_mysql" = "auto" ]; then
5331 CFG_SQL_mysql=plugin
5334 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5335 echo "MySQL support cannot be enabled due to functionality tests!"
5336 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5337 echo " If you believe this message is in error you may use the continue"
5338 echo " switch (-continue) to $0 to continue."
5343 QT_LFLAGS_MYSQL_R=""
5351 if [ "$CFG_SQL_psql" != "no" ]; then
5352 # Be careful not to use native pg_config when cross building.
5353 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5354 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5355 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5357 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5358 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5359 # But, respect PSQL_LIBS if set
5360 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5361 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
5362 if [ "$CFG_SQL_psql" = "auto" ]; then
5366 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5367 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5368 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5369 echo " If you believe this message is in error you may use the continue"
5370 echo " switch (-continue) to $0 to continue."
5381 if [ "$CFG_SQL_odbc" != "no" ]; then
5382 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
5383 if [ "$CFG_SQL_odbc" = "auto" ]; then
5387 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
5388 QT_LFLAGS_ODBC="-liodbc"
5389 if [ "$CFG_SQL_odbc" = "auto" ]; then
5393 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5394 echo "ODBC support cannot be enabled due to functionality tests!"
5395 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5396 echo " If you believe this message is in error you may use the continue"
5397 echo " switch (-continue) to $0 to continue."
5407 if [ "$CFG_SQL_oci" != "no" ]; then
5408 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
5409 if [ "$CFG_SQL_oci" = "auto" ]; then
5413 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5414 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5415 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5416 echo " If you believe this message is in error you may use the continue"
5417 echo " switch (-continue) to $0 to continue."
5426 if [ "$CFG_SQL_tds" != "no" ]; then
5427 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5428 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5429 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
5430 if [ "$CFG_SQL_tds" = "auto" ]; then
5434 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5435 echo "TDS support cannot be enabled due to functionality tests!"
5436 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5437 echo " If you believe this message is in error you may use the continue"
5438 echo " switch (-continue) to $0 to continue."
5447 if [ "$CFG_SQL_db2" != "no" ]; then
5448 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
5449 if [ "$CFG_SQL_db2" = "auto" ]; then
5453 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5454 echo "ODBC support cannot be enabled due to functionality tests!"
5455 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5456 echo " If you believe this message is in error you may use the continue"
5457 echo " switch (-continue) to $0 to continue."
5466 if [ "$CFG_SQL_ibase" != "no" ]; then
5467 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
5468 if [ "$CFG_SQL_ibase" = "auto" ]; then
5469 CFG_SQL_ibase=plugin
5472 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5473 echo "InterBase support cannot be enabled due to functionality tests!"
5474 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5475 echo " If you believe this message is in error you may use the continue"
5476 echo " switch (-continue) to $0 to continue."
5485 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5486 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
5487 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5488 CFG_SQL_sqlite2=plugin
5491 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5492 echo "SQLite2 support cannot be enabled due to functionality tests!"
5493 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5494 echo " If you believe this message is in error you may use the continue"
5495 echo " switch (-continue) to $0 to continue."
5504 if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
5505 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
5506 # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file and should be marked as driver.
5507 # Configuration parameters should be set
5509 QT_LFLAGS_SQLITE=-lsqlite3
5510 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5513 if [ "$CFG_SQL_sqlite" != "no" ]; then
5514 SQLITE_AUTODETECT_FAILED="no"
5515 if [ "$CFG_SQLITE" = "system" ]; then
5516 if [ -n "$PKG_CONFIG" ]; then
5517 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5518 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5520 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
5521 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5522 CFG_SQL_sqlite=plugin
5524 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5526 SQLITE_AUTODETECT_FAILED="yes"
5529 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5530 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5531 CFG_SQL_sqlite=plugin
5534 SQLITE_AUTODETECT_FAILED="yes"
5538 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5539 echo "SQLite support cannot be enabled due to functionality tests!"
5540 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5541 echo " If you believe this message is in error you may use the continue"
5542 echo " switch (-continue) to $0 to continue."
5548 if [ "$OPT_VERBOSE" = "yes" ]; then
5549 echo "unknown SQL driver: $_SQLDR"
5555 # auto-detect NIS support
5556 if [ "$CFG_NIS" != "no" ]; then
5557 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
5560 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5561 echo "NIS support cannot be enabled due to functionality tests!"
5562 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5563 echo " If you believe this message is in error you may use the continue"
5564 echo " switch (-continue) to $0 to continue."
5572 # auto-detect CUPS support
5573 if [ "$CFG_CUPS" != "no" ]; then
5574 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
5577 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5578 echo "Cups support cannot be enabled due to functionality tests!"
5579 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5580 echo " If you believe this message is in error you may use the continue"
5581 echo " switch (-continue) to $0 to continue."
5589 # auto-detect iconv(3) support
5590 if [ "$CFG_ICONV" != "no" ]; then
5591 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5593 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
5595 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
5597 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
5600 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5601 echo "Iconv support cannot be enabled due to functionality tests!"
5602 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5603 echo " If you believe this message is in error you may use the continue"
5604 echo " switch (-continue) to $0 to continue."
5612 # auto-detect libdbus-1 support
5613 if [ "$CFG_DBUS" != "no" ]; then
5614 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5615 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5616 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5618 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
5619 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5620 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5621 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5623 if [ "$CFG_DBUS" = "auto" ]; then
5625 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5626 # CFG_DBUS is "yes" or "linked" here
5628 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5629 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5630 echo " If you believe this message is in error you may use the continue"
5631 echo " switch (-continue) to $0 to continue."
5637 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5638 CFG_MULTIMEDIA="$CFG_GUI"
5641 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5642 echo "QtMultimedia requested, but it can't be built without QtGui"
5646 # Generate a CRC of the namespace for using in constants for the Carbon port.
5647 # This should mean that you really *can* load two Qt's and have our custom
5648 # Carbon events work.
5649 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5650 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`
5653 # X11/QWS/Lighthouse
5654 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5656 # auto-detect Glib support
5657 if [ "$CFG_GLIB" != "no" ]; then
5658 if [ -n "$PKG_CONFIG" ]; then
5659 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5660 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5662 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
5664 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5665 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5667 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5668 echo "Glib support cannot be enabled due to functionality tests!"
5669 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5670 echo " If you believe this message is in error you may use the continue"
5671 echo " switch (-continue) to $0 to continue."
5679 if [ "$CFG_GUI" = "no" ]; then
5680 if [ "$CFG_PHONON" = "auto" ]; then
5683 if [ "$CFG_PHONON" != "no" ]; then
5684 echo "Phonon enabled, but GUI disabled."
5685 echo " You might need to either enable the GUI or disable Phonon"
5690 # Auto-detect GStreamer support (needed for Phonon)
5691 if [ "$CFG_PHONON" != "no" ]; then
5692 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5693 if [ -n "$PKG_CONFIG" ]; then
5694 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5695 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5697 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
5699 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5700 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5702 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5703 echo "Gstreamer support cannot be enabled due to functionality tests!"
5704 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5705 echo " If you believe this message is in error you may use the continue"
5706 echo " switch (-continue) to $0 to continue."
5712 elif [ "$CFG_GLIB" = "no" ]; then
5719 if [ "$CFG_PHONON" != "no" ]; then
5720 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5721 if [ "$CFG_GSTREAMER" = "yes" ]; then
5724 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5725 echo "Phonon support cannot be enabled due to functionality tests!"
5726 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5727 echo " If you believe this message is in error you may use the continue"
5728 echo " switch (-continue) to $0 to continue."
5739 # auto-detect icd support
5740 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5741 if [ -n "$PKG_CONFIG" ]; then
5742 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5743 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5745 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
5746 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5747 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5748 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5750 if [ "$CFG_ICD" = "auto" ]; then
5752 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5755 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5756 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5757 echo " If you believe this message is in error you may use the continue"
5758 echo " switch (-continue) to $0 to continue."
5762 elif [ "$CFG_GLIB" = "no" ]; then
5766 # auto-detect libicu support
5767 if [ "$CFG_ICU" != "no" ]; then
5768 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5769 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5771 if [ "$CFG_ICU" = "auto" ]; then
5773 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5776 echo "The ICU library support cannot be enabled."
5777 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5778 echo " If you believe this message is in error you may use the continue"
5779 echo " switch (-continue) to $0 to continue."
5785 # Auto-detect PulseAudio support
5786 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5787 if [ -n "$PKG_CONFIG" ]; then
5788 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5789 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5791 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
5793 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5794 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5796 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5797 echo "PulseAudio support cannot be enabled due to functionality tests!"
5798 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5799 echo " If you believe this message is in error you may use the continue"
5800 echo " switch (-continue) to $0 to continue."
5807 fi # X11/QWS/Lighthouse
5810 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5811 x11tests="$relpath/config.tests/x11"
5814 # work around broken X11 headers when using GCC 2.95 or later
5816 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5817 if [ $NOTYPE = "yes" ]; then
5818 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5819 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5822 # Check we actually have X11 :-)
5823 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5824 if [ $? != "0" ]; then
5825 echo "Basic XLib functionality test failed!"
5826 echo " You might need to modify the include and library search paths by editing"
5827 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5832 # X11/MINGW/SYMBIAN OpenGL
5833 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIAN" = "yes" ]; then
5834 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5835 if [ "$CFG_GUI" = "no" ]; then
5836 if [ "$CFG_OPENGL" = "auto" ]; then
5839 if [ "$CFG_OPENGL" != "no" ]; then
5840 echo "OpenGL enabled, but GUI disabled."
5841 echo " You might need to either enable the GUI or disable OpenGL"
5845 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5846 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
5848 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
5850 if [ "$CFG_EGL" = "no" ]; then
5854 if [ "$CFG_OPENGL" = "yes" ]; then
5855 echo "All the OpenGL functionality tests failed!"
5856 echo " You might need to modify the include and library search paths by editing"
5857 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5858 echo " ${XQMAKESPEC}."
5865 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5866 if [ "$CFG_OPENGL" = "desktop" ]; then
5867 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5868 if [ $? != "0" ]; then
5869 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5876 elif [ "$CFG_OPENGL" = "es2" ]; then
5878 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5879 if [ $? != "0" ]; then
5880 echo "The OpenGL ES 2.0 functionality test failed!"
5881 echo " You might need to modify the include and library search paths by editing"
5882 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5883 echo " ${XQMAKESPEC}."
5886 elif [ "$CFG_OPENGL" = "desktop" ]; then
5887 # Desktop OpenGL support
5888 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5889 if [ $? != "0" ]; then
5890 echo "The OpenGL functionality test failed!"
5891 echo " You might need to modify the include and library search paths by editing"
5892 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5893 echo " ${XQMAKESPEC}."
5898 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5899 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5900 if [ $? != "0" ]; then
5901 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5909 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5910 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5911 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5912 CFG_GRAPHICS_SYSTEM=default
5914 fi # X11/MINGW OpenGL
5917 if [ "$PLATFORM_X11" = "yes" ]; then
5918 # auto-detect Xcursor support
5919 if [ "$CFG_XCURSOR" != "no" ]; then
5920 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
5921 if [ "$CFG_XCURSOR" != "runtime" ]; then
5925 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5926 echo "Xcursor support cannot be enabled due to functionality tests!"
5927 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5928 echo " If you believe this message is in error you may use the continue"
5929 echo " switch (-continue) to $0 to continue."
5937 # auto-detect Xfixes support
5938 if [ "$CFG_XFIXES" != "no" ]; then
5939 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5940 if [ "$CFG_XFIXES" != "runtime" ]; then
5944 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5945 echo "Xfixes support cannot be enabled due to functionality tests!"
5946 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5947 echo " If you believe this message is in error you may use the continue"
5948 echo " switch (-continue) to $0 to continue."
5956 # auto-detect Xrandr support (resize and rotate extension)
5957 if [ "$CFG_XRANDR" != "no" ]; then
5958 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
5959 if [ "$CFG_XRANDR" != "runtime" ]; then
5963 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5964 echo "Xrandr support cannot be enabled due to functionality tests!"
5965 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5966 echo " If you believe this message is in error you may use the continue"
5967 echo " switch (-continue) to $0 to continue."
5975 # auto-detect Xrender support
5976 if [ "$CFG_XRENDER" != "no" ]; then
5977 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
5980 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5981 echo "Xrender support cannot be enabled due to functionality tests!"
5982 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5983 echo " If you believe this message is in error you may use the continue"
5984 echo " switch (-continue) to $0 to continue."
5992 # Additional check to decide if WebKit support will be included
5993 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5994 echo "Warning: -no-xrender will disable the QtWebkit module."
5998 # auto-detect MIT-SHM support
5999 if [ "$CFG_MITSHM" != "no" ]; then
6000 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
6003 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6004 echo "MITSHM support cannot be enabled due to functionality tests!"
6005 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6006 echo " If you believe this message is in error you may use the continue"
6007 echo " switch (-continue) to $0 to continue."
6015 # auto-detect FontConfig support
6016 if [ "$CFG_FONTCONFIG" != "no" ]; then
6017 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6018 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6019 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6021 QT_CFLAGS_FONTCONFIG=
6022 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6024 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
6026 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
6027 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
6028 CFG_LIBFREETYPE=system
6030 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6031 echo "FontConfig support cannot be enabled due to functionality tests!"
6032 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6033 echo " If you believe this message is in error you may use the continue"
6034 echo " switch (-continue) to $0 to continue."
6042 # auto-detect Session Management support
6043 if [ "$CFG_SM" = "auto" ]; then
6044 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
6047 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6048 echo "Session Management support cannot be enabled due to functionality tests!"
6049 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6050 echo " If you believe this message is in error you may use the continue"
6051 echo " switch (-continue) to $0 to continue."
6059 # auto-detect SHAPE support
6060 if [ "$CFG_XSHAPE" != "no" ]; then
6061 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
6064 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6065 echo "XShape support cannot be enabled due to functionality tests!"
6066 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6067 echo " If you believe this message is in error you may use the continue"
6068 echo " switch (-continue) to $0 to continue."
6076 # auto-detect XVideo support
6077 if [ "$CFG_XVIDEO" != "no" ]; then
6078 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
6081 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6082 echo "XVideo support cannot be enabled due to functionality tests!"
6083 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6084 echo " If you believe this message is in error you may use the continue"
6085 echo " switch (-continue) to $0 to continue."
6093 # auto-detect XSync support
6094 if [ "$CFG_XSYNC" != "no" ]; then
6095 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
6098 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6099 echo "XSync support cannot be enabled due to functionality tests!"
6100 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6101 echo " If you believe this message is in error you may use the continue"
6102 echo " switch (-continue) to $0 to continue."
6110 # auto-detect Xinerama support
6111 if [ "$CFG_XINERAMA" != "no" ]; then
6112 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
6113 if [ "$CFG_XINERAMA" != "runtime" ]; then
6117 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6118 echo "Xinerama support cannot be enabled due to functionality tests!"
6119 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6120 echo " If you believe this message is in error you may use the continue"
6121 echo " switch (-continue) to $0 to continue."
6129 # auto-detect Xinput support
6130 if [ "$CFG_XINPUT" != "no" ]; then
6131 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
6132 if [ "$CFG_XINPUT" != "runtime" ]; then
6136 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6137 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
6138 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6139 echo " If you believe this message is in error you may use the continue"
6140 echo " switch (-continue) to $0 to continue."
6148 # auto-detect XKB support
6149 if [ "$CFG_XKB" != "no" ]; then
6150 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
6153 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6154 echo "XKB support cannot be enabled due to functionality tests!"
6155 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6156 echo " If you believe this message is in error you may use the continue"
6157 echo " switch (-continue) to $0 to continue."
6165 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
6166 if [ -n "$PKG_CONFIG" ]; then
6167 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
6168 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
6170 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
6172 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
6173 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
6175 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6176 echo "Gtk theme support cannot be enabled due to functionality tests!"
6177 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6178 echo " If you believe this message is in error you may use the continue"
6179 echo " switch (-continue) to $0 to continue."
6185 elif [ "$CFG_GLIB" = "no" ]; then
6191 if [ "$PLATFORM_MAC" = "yes" ]; then
6192 if [ "$CFG_PHONON" != "no" ]; then
6193 # Always enable Phonon (unless it was explicitly disabled)
6197 if [ "$CFG_COREWLAN" = "auto" ]; then
6198 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
6207 if [ "$PLATFORM_QPA" = "yes" ]; then
6208 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6209 if [ "$CFG_ARCH" = "macosx" ]; then
6211 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6212 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
6214 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
6217 if [ "$CFG_OPENGL" = "yes" ]; then
6218 echo "All the OpenGL functionality tests failed!"
6219 echo " You might need to modify the include and library search paths by editing"
6220 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6221 echo " ${XQMAKESPEC}."
6226 elif [ "$CFG_OPENGL" = "es2" ]; then
6228 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6229 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6230 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6231 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6232 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6233 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6234 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6235 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6238 "$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
6239 if [ $? != "0" ]; then
6240 echo "The OpenGL ES 2.0 functionality test failed!"
6241 echo " You might need to modify the include and library search paths by editing"
6242 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6243 echo " ${XQMAKESPEC}."
6246 elif [ "$CFG_OPENGL" = "desktop" ]; then
6247 # Desktop OpenGL support
6248 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6249 if [ $? != "0" ]; then
6250 echo "The OpenGL functionality test failed!"
6251 echo " You might need to modify the include and library search paths by editing"
6252 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6253 echo " ${XQMAKESPEC}."
6258 # auto-detect FontConfig support
6259 if [ "$CFG_FONTCONFIG" != "no" ]; then
6260 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6261 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6262 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6264 QT_CFLAGS_FONTCONFIG=
6265 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6267 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
6268 QT_CONFIG="$QT_CONFIG fontconfig"
6269 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6270 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6271 CFG_LIBFREETYPE=system
6276 # Save these for a check later
6277 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6278 ORIG_CFG_XCB="$CFG_XCB"
6280 if [ "$CFG_WAYLAND" != "no" ]; then
6281 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6282 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6283 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6284 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6285 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6287 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/wayland "Wayland" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_WAYLAND $QMAKE_LIBS_WAYLAND; then
6289 QT_CONFIG="$QT_CONFIG wayland"
6290 elif [ "$CFG_WAYLAND" = "yes" ]; then
6291 echo "The Wayland functionality test failed!"
6295 QMakeVar add DEFINES QT_NO_WAYLAND
6299 # Check we actually have X11 :-)
6300 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
6301 QT_CONFIG="$QT_CONFIG xlib"
6304 if [ "$CFG_XCB" != "no" ]; then
6305 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6307 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
6308 QT_CONFIG="$QT_CONFIG xcb-render"
6311 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
6313 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6316 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
6317 QT_CONFIG="$QT_CONFIG xcb-xlib"
6320 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6321 # auto-detect XInput2/Xinput support
6322 if [ "$CFG_XINPUT2" != "no" ]; then
6323 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
6327 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6328 echo "XInput2 support cannot be enabled due to functionality tests!"
6329 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6330 echo " If you believe this message is in error you may use the continue"
6331 echo " switch (-continue) to $0 to continue."
6340 if [ "$CFG_XCB" = "yes" ]; then
6341 echo "The XCB test failed!"
6342 echo " You might need to install dependency packages."
6343 echo " See src/plugins/platforms/xcb/README."
6347 QMakeVar add DEFINES QT_NO_XCB
6351 # Detect libxkbcommon
6352 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6353 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6354 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6355 if [ "$CFG_WAYLAND" = "yes" ]; then
6356 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6357 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6359 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6360 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6362 if [ "$CFG_WAYLAND" = "yes" ]; then
6363 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6365 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6368 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6369 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6370 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6371 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6372 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6373 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6374 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6377 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6378 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6379 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6380 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6383 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
6384 QT_CONFIG="$QT_CONFIG coreservices"
6386 QMakeVar add DEFINES QT_NO_CORESERVICES
6389 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6390 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6391 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6392 echo "No QPA platform plugin enabled!"
6393 echo " If you really want to build without a QPA platform plugin you must pass"
6394 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6395 echo " cannot run GUI applications."
6405 if [ "$PLATFORM_QWS" = "yes" ]; then
6407 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6408 if [ "$CFG_GUI" = "no" ]; then
6409 if [ "$CFG_OPENGL" = "auto" ]; then
6412 if [ "$CFG_OPENGL" != "no" ]; then
6413 echo "OpenGL enabled, but GUI disabled."
6414 echo " You might need to either enable the GUI or disable OpenGL"
6418 if [ "$CFG_OPENGL" = "yes" ]; then
6420 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
6423 elif [ "$CFG_OPENGL" = "es2" ]; then
6425 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6426 if [ $? != "0" ]; then
6427 echo "The OpenGL ES 2.0 functionality test failed!"
6428 echo " You might need to modify the include and library search paths by editing"
6429 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6430 echo " ${XQMAKESPEC}."
6434 elif [ "$CFG_OPENGL" = "desktop" ]; then
6435 # Desktop OpenGL support
6436 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6441 if [ "$PLATFORM_QWS" = "yes" ]; then
6444 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6445 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6446 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6447 if [ $? != "0" ]; then
6448 echo "The Ahi screen driver functionality test failed!"
6449 echo " You might need to modify the include and library search paths by editing"
6450 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6451 echo " ${XQMAKESPEC}."
6456 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6457 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6458 if [ $? != "0" ]; then
6459 echo "The SVGAlib screen driver functionality test failed!"
6460 echo " You might need to modify the include and library search paths by editing"
6461 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6462 echo " ${XQMAKESPEC}."
6467 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6468 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6469 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6470 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6471 elif directfb-config --version >/dev/null 2>&1; then
6472 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6473 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6476 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6477 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6478 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6479 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6482 "$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
6483 if [ $? != "0" ]; then
6484 echo "The DirectFB screen driver functionality test failed!"
6485 echo " You might need to modify the include and library search paths by editing"
6486 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6487 echo " ${XQMAKESPEC}."
6495 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6496 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6497 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6498 if [ $? != "0" ]; then
6499 echo "The tslib functionality test failed!"
6500 echo " You might need to modify the include and library search paths by editing"
6501 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6502 echo " ${XQMAKESPEC}."
6511 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6512 if [ $? != "0" ]; then
6513 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6520 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6521 if [ "$CFG_EGL" != "no" ]; then
6522 # detect EGL support
6523 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
6524 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6529 if [ "$EGL_VARIANT" = "none" ]; then
6530 if [ "$CFG_EGL" = "yes" ]; then
6531 echo "The EGL functionality test failed!"
6532 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6533 echo " You might need to modify the include and library search paths by editing"
6534 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6535 echo " ${XQMAKESPEC}."
6539 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6540 if [ "$CFG_OPENGL" = "es2" ]; then
6547 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6550 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6551 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6552 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6553 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6554 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
6555 CFG_LIBFREETYPE=system
6561 if [ "$CFG_ENDIAN" = "auto" ]; then
6562 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6563 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6564 elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6565 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6566 elif [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
6569 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6571 if [ "$F" -eq 0 ]; then
6572 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6573 elif [ "$F" -eq 1 ]; then
6574 CFG_ENDIAN="Q_BIG_ENDIAN"
6577 echo "The target system byte order could not be detected!"
6578 echo "Turn on verbose messaging (-v) to see the final report."
6579 echo "You can use the -little-endian or -big-endian switch to"
6580 echo "$0 to continue."
6586 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6587 if [ "$PLATFORM_MAC" = "yes" ]; then
6590 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6592 if [ "$F" -eq 0 ]; then
6593 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6594 elif [ "$F" -eq 1 ]; then
6595 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6598 echo "The host system byte order could not be detected!"
6599 echo "Turn on verbose messaging (-v) to see the final report."
6600 echo "You can use the -host-little-endian or -host-big-endian switch to"
6601 echo "$0 to continue."
6607 if [ "$CFG_ARMFPA" != "auto" ]; then
6608 if [ "$CFG_ARMFPA" = "yes" ]; then
6609 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6610 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6612 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6615 CFG_DOUBLEFORMAT="normal"
6620 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6621 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6622 CFG_DOUBLEFORMAT=normal
6624 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6626 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6627 CFG_DOUBLEFORMAT=normal
6628 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6629 CFG_DOUBLEFORMAT=normal
6630 elif [ "$F" -eq 10 ]; then
6631 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6632 elif [ "$F" -eq 11 ]; then
6633 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6634 elif [ "$F" -eq 12 ]; then
6635 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6637 elif [ "$F" -eq 13 ]; then
6638 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6642 echo "The system floating point format could not be detected."
6643 echo "This may cause data to be generated in a wrong format"
6644 echo "Turn on verbose messaging (-v) to see the final report."
6645 # we do not fail on this since this is a new test, and if it fails,
6646 # the old behavior should be correct in most cases
6647 CFG_DOUBLEFORMAT=normal
6653 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
6657 if [ "$CFG_STL" != "no" ]; then
6658 if [ "$HAVE_STL" = "yes" ]; then
6661 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6662 echo "STL support cannot be enabled due to functionality tests!"
6663 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6664 echo " If you believe this message is in error you may use the continue"
6665 echo " switch (-continue) to $0 to continue."
6673 # detect POSIX clock_gettime()
6674 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6675 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
6676 CFG_CLOCK_GETTIME=yes
6678 CFG_CLOCK_GETTIME=no
6682 # detect POSIX monotonic clocks
6683 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6684 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
6685 CFG_CLOCK_MONOTONIC=yes
6687 CFG_CLOCK_MONOTONIC=no
6689 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6690 CFG_CLOCK_MONOTONIC=no
6694 if [ "$CFG_MREMAP" = "auto" ]; then
6695 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6702 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6703 if [ "$CFG_GETADDRINFO" != "no" ]; then
6704 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6707 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6708 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6709 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6710 echo " If you believe this message is in error you may use the continue"
6711 echo " switch (-continue) to $0 to continue."
6719 # find if the platform provides inotify
6720 if [ "$CFG_INOTIFY" != "no" ]; then
6721 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6724 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6725 echo "inotify support cannot be enabled due to functionality tests!"
6726 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6727 echo " If you believe this message is in error you may use the continue"
6728 echo " switch (-continue) to $0 to continue."
6736 # find if the platform provides if_nametoindex (ipv6 interface name support)
6737 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6738 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
6741 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6742 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6743 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6744 echo " If you believe this message is in error you may use the continue"
6745 echo " switch (-continue) to $0 to continue."
6753 # find if the platform provides getifaddrs (network interface enumeration)
6754 if [ "$CFG_GETIFADDRS" != "no" ]; then
6755 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6758 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6759 echo "getifaddrs support cannot be enabled due to functionality tests!"
6760 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6761 echo " If you believe this message is in error you may use the continue"
6762 echo " switch (-continue) to $0 to continue."
6771 if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6772 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
6773 if [ "$CFG_OPENSSL" = "auto" ]; then
6777 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6778 echo "OpenSSL support cannot be enabled due to functionality tests!"
6779 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6780 echo " If you believe this message is in error you may use the continue"
6781 echo " switch (-continue) to $0 to continue."
6788 if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6789 #OpenSSl should be enabled for Symbian release
6794 # detect OpenVG support
6795 if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6796 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
6797 if [ "$CFG_OPENVG" = "auto" ]; then
6800 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
6801 if [ "$CFG_OPENVG" = "auto" ]; then
6804 CFG_OPENVG_ON_OPENGL=yes
6805 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
6806 if [ "$CFG_OPENVG" = "auto" ]; then
6809 CFG_OPENVG_LC_INCLUDES=yes
6810 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
6811 if [ "$CFG_OPENVG" = "auto" ]; then
6814 CFG_OPENVG_LC_INCLUDES=yes
6815 CFG_OPENVG_ON_OPENGL=yes
6817 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6818 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6819 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6820 echo " If you believe this message is in error you may use the continue"
6821 echo " switch (-continue) to $0 to continue."
6827 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
6828 CFG_OPENVG_SHIVA=yes
6832 # if openvg is disabled and the user specified graphicssystem vg, disable it...
6833 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
6834 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
6835 CFG_GRAPHICS_SYSTEM=default
6838 if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
6839 echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
6843 if [ "$CFG_PTMALLOC" != "no" ]; then
6844 # build ptmalloc, copy .a file to lib/
6845 echo "Building ptmalloc. Please wait..."
6846 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
6847 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
6849 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
6852 if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
6853 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6858 elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
6859 # Disabled for Symbian release
6863 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6864 if [ "$CFG_ARCH" = "arm" ]; then
6865 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6866 if [ $? != "0" ]; then
6867 CFG_JAVASCRIPTCORE_JIT=no
6870 case "$XPLATFORM" in
6872 CFG_JAVASCRIPTCORE_JIT=no
6875 CFG_JAVASCRIPTCORE_JIT=no
6881 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6882 QMakeVar set JAVASCRIPTCORE_JIT yes
6883 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6884 QMakeVar set JAVASCRIPTCORE_JIT no
6887 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6888 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6889 if "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS ; then
6890 CFG_AUDIO_BACKEND=yes
6893 CFG_AUDIO_BACKEND=yes
6897 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6898 echo "Warning: largefile support cannot be disabled for win32."
6900 elif [ "$CFG_LARGEFILE" != "no" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
6901 echo "Warning: largefile support cannot be enabled for symbian."
6905 #-------------------------------------------------------------------------------
6906 # ask for all that hasn't been auto-detected or specified in the arguments
6907 #-------------------------------------------------------------------------------
6909 ### fix this: user input should be validated in a loop
6910 if [ "$PLATFORM_QWS" = "yes" ]; then
6911 PROMPT_FOR_DEPTHS="yes"
6913 PROMPT_FOR_DEPTHS="no"
6915 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6917 echo "Choose pixel-depths to support:"
6919 echo " 1. 1bpp, black/white"
6920 echo " 4. 4bpp, grayscale"
6921 echo " 8. 8bpp, paletted"
6922 echo " 12. 12bpp, rgb 4-4-4"
6923 echo " 15. 15bpp, rgb 5-5-5"
6924 echo " 16. 16bpp, rgb 5-6-5"
6925 echo " 18. 18bpp, rgb 6-6-6"
6926 echo " 24. 24bpp, rgb 8-8-8"
6927 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6928 echo " all. All supported depths"
6930 echo "Your choices (default 8,16,32):"
6932 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6933 CFG_QWS_DEPTHS=8,16,32
6936 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6937 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6938 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6940 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6942 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6943 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6948 # enable dwarf2 support on Mac
6949 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6950 QT_CONFIG="$QT_CONFIG dwarf2"
6953 # Set the default arch if there are no "-arch" arguments on the configure line
6954 # For "-carbon" builds: 32 bit x86/ppc.
6955 # For builds on snow leopard : compiler default (64-bit).
6956 # For builds on leopard : compiler default (32-bit).
6957 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6958 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6960 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6961 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6962 CFG_MAC_ARCHS=" x86"
6963 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6964 CFG_MAC_ARCHS=" ppc"
6966 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6969 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6972 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6975 # enable Cocoa and/or Carbon on Mac
6976 # -carbon on the command line disables Cocoa, except for 64-bit archs
6977 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6978 CFG_MAC_CARBON="YES"
6981 # check which archs are in use, enable cocoa if we find a 64-bit one
6982 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6983 CFG_MAC_COCOA="yes";
6984 CFG_MAC_CARBON="no";
6985 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6986 CFG_MAC_CARBON="yes";
6988 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6989 CFG_MAC_CARBON="yes";
6994 # select Carbon on 10.4 Tiger.
6995 if [ "$PLATFORM_MAC" = "yes" ]; then
6996 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6997 if [ "$VERSION" == 8 ]; then
6999 CFG_MAC_CARBON="yes";
7003 # select Carbon when using the 10.4u SDK
7004 if [ "$PLATFORM_MAC" = "yes" ]; then
7005 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
7008 CFG_MAC_CARBON="yes";
7012 # but disable Cocoa if cross-building for mingw and symbian
7013 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
7014 [ "$XPLATFORM_SYMBIAN" = "yes" ] && CFG_MAC_COCOA="no"
7016 # disable Qt 3 support on VxWorks and Symbian
7017 case "$XPLATFORM" in
7018 unsupported/vxworks*|symbian*)
7023 # enable Qt 3 support functionality
7024 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
7025 QT_CONFIG="$QT_CONFIG gui-qt3support"
7029 if [ "$CFG_PHONON" = "yes" ]; then
7030 # No longer needed after modularization
7031 #QT_CONFIG="$QT_CONFIG phonon"
7032 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
7033 QT_CONFIG="$QT_CONFIG phonon-backend"
7036 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
7039 # disable accessibility
7040 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
7041 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
7043 QT_CONFIG="$QT_CONFIG accessibility"
7046 # egl stuff does not belong in lighthouse, but rather in plugins
7047 if [ "$PLATFORM_QPA" = "yes" ]; then
7052 if [ "$CFG_EGL" = "no" ]; then
7053 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
7055 QT_CONFIG="$QT_CONFIG egl"
7056 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7057 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
7062 if [ "$CFG_OPENVG" = "no" ]; then
7063 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
7065 QT_CONFIG="$QT_CONFIG openvg"
7066 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
7067 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
7069 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
7070 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
7072 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7073 QT_CONFIG="$QT_CONFIG shivavg"
7074 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
7078 if [ "$CFG_QS60STYLE" = "no" ]; then
7079 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7081 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_STYLE_S60"
7084 # Just check if OpenGL is not set by command argumets for Symbian.
7085 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
7086 if [ "$CFG_OPENGL" = "auto" ]; then
7092 if [ "$CFG_OPENGL" = "no" ]; then
7093 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
7095 QT_CONFIG="$QT_CONFIG opengl"
7098 if [ "$CFG_OPENGL" = "es2" ]; then
7099 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
7102 if [ "$CFG_OPENGL" = "es2" ]; then
7103 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
7104 QT_CONFIG="$QT_CONFIG opengles2"
7107 # safe execution environment
7108 if [ "$CFG_SXE" != "no" ]; then
7109 QT_CONFIG="$QT_CONFIG sxe"
7112 # build up the variables for output
7113 if [ "$CFG_DEBUG" = "yes" ]; then
7114 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
7115 QMAKE_CONFIG="$QMAKE_CONFIG debug"
7116 elif [ "$CFG_DEBUG" = "no" ]; then
7117 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
7118 QMAKE_CONFIG="$QMAKE_CONFIG release"
7120 if [ "$CFG_SHARED" = "yes" ]; then
7121 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
7122 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
7123 elif [ "$CFG_SHARED" = "no" ]; then
7124 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
7125 QMAKE_CONFIG="$QMAKE_CONFIG static"
7127 if [ "$PLATFORM_QWS" = "yes" ]; then
7128 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
7129 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
7130 QT_CONFIG="$QT_CONFIG embedded"
7131 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7133 if [ "$PLATFORM_QPA" = "yes" ]; then
7134 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
7135 QT_CONFIG="$QT_CONFIG qpa"
7136 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
7137 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7140 if [ "$CFG_EMBEDDED" = "nacl" ]; then
7141 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
7142 QT_CONFIG="$QT_CONFIG nacl pepper"
7143 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
7146 if [ "$XPLATFORM_MINGW" != "yes" ]; then
7147 # Do not set this here for Windows. Let qmake do it so
7148 # debug and release precompiled headers are kept separate.
7149 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
7151 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
7152 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
7153 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
7154 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
7155 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7156 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
7158 if [ "$CFG_STL" = "no" ]; then
7159 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
7161 QMAKE_CONFIG="$QMAKE_CONFIG stl"
7163 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
7164 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
7166 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
7167 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
7168 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
7169 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
7170 QMakeVar add QMAKE_CFLAGS -g
7171 QMakeVar add QMAKE_CXXFLAGS -g
7172 QT_CONFIG="$QT_CONFIG separate_debug_info"
7174 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
7175 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
7177 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
7178 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
7179 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
7180 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
7181 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
7182 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
7183 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
7184 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
7185 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
7186 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
7187 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
7188 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
7189 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
7190 QT_CONFIG="$QT_CONFIG clock-gettime"
7192 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
7193 QT_CONFIG="$QT_CONFIG clock-monotonic"
7195 if [ "$CFG_MREMAP" = "yes" ]; then
7196 QT_CONFIG="$QT_CONFIG mremap"
7198 if [ "$CFG_GETADDRINFO" = "yes" ]; then
7199 QT_CONFIG="$QT_CONFIG getaddrinfo"
7201 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
7202 QT_CONFIG="$QT_CONFIG ipv6ifname"
7204 if [ "$CFG_GETIFADDRS" = "yes" ]; then
7205 QT_CONFIG="$QT_CONFIG getifaddrs"
7207 if [ "$CFG_INOTIFY" = "yes" ]; then
7208 QT_CONFIG="$QT_CONFIG inotify"
7210 if [ "$CFG_LIBJPEG" = "no" ]; then
7212 elif [ "$CFG_LIBJPEG" = "system" ]; then
7213 QT_CONFIG="$QT_CONFIG system-jpeg"
7215 if [ "$CFG_JPEG" = "no" ]; then
7216 QT_CONFIG="$QT_CONFIG no-jpeg"
7217 elif [ "$CFG_JPEG" = "yes" ]; then
7218 QT_CONFIG="$QT_CONFIG jpeg"
7220 if [ "$CFG_LIBMNG" = "no" ]; then
7222 elif [ "$CFG_LIBMNG" = "system" ]; then
7223 QT_CONFIG="$QT_CONFIG system-mng"
7225 if [ "$CFG_MNG" = "no" ]; then
7226 QT_CONFIG="$QT_CONFIG no-mng"
7227 elif [ "$CFG_MNG" = "yes" ]; then
7228 QT_CONFIG="$QT_CONFIG mng"
7230 if [ "$CFG_LIBPNG" = "no" ]; then
7233 if [ "$CFG_LIBPNG" = "system" ]; then
7234 QT_CONFIG="$QT_CONFIG system-png"
7236 if [ "$CFG_PNG" = "no" ]; then
7237 QT_CONFIG="$QT_CONFIG no-png"
7238 elif [ "$CFG_PNG" = "yes" ]; then
7239 QT_CONFIG="$QT_CONFIG png"
7241 if [ "$CFG_GIF" = "no" ]; then
7242 QT_CONFIG="$QT_CONFIG no-gif"
7243 elif [ "$CFG_GIF" = "yes" ]; then
7244 QT_CONFIG="$QT_CONFIG gif"
7246 if [ "$CFG_LIBTIFF" = "no" ]; then
7248 elif [ "$CFG_LIBTIFF" = "system" ]; then
7249 QT_CONFIG="$QT_CONFIG system-tiff"
7251 if [ "$CFG_TIFF" = "no" ]; then
7252 QT_CONFIG="$QT_CONFIG no-tiff"
7253 elif [ "$CFG_TIFF" = "yes" ]; then
7254 QT_CONFIG="$QT_CONFIG tiff"
7256 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7257 QT_CONFIG="$QT_CONFIG no-freetype"
7258 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7259 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7260 QT_CONFIG="$QT_CONFIG system-freetype"
7262 QT_CONFIG="$QT_CONFIG freetype"
7264 if [ "$CFG_GUI" = "auto" ]; then
7267 if [ "$CFG_GUI" = "no" ]; then
7268 QT_CONFIG="$QT_CONFIG no-gui"
7270 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7274 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
7275 #On Mac we implicitly link against libz, so we
7276 #never use the 3rdparty stuff.
7277 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7279 if [ "$CFG_ZLIB" = "yes" ]; then
7280 QT_CONFIG="$QT_CONFIG zlib"
7281 elif [ "$CFG_ZLIB" = "system" ]; then
7282 QT_CONFIG="$QT_CONFIG system-zlib"
7285 if [ "$CFG_S60" = "yes" ]; then
7286 QT_CONFIG="$QT_CONFIG s60"
7289 if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then
7290 QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files"
7292 QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files_disabled"
7295 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7296 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7297 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7298 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7299 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7300 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7301 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7302 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7303 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7304 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7305 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7306 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7307 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7308 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7309 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7311 if [ "$PLATFORM_X11" = "yes" ]; then
7312 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7314 # for some reason, the following libraries are not always built shared,
7315 # so *every* program/lib (including Qt) has to link against them
7316 if [ "$CFG_XSHAPE" = "yes" ]; then
7317 QT_CONFIG="$QT_CONFIG xshape"
7319 if [ "$CFG_XVIDEO" = "yes" ]; then
7320 QT_CONFIG="$QT_CONFIG xvideo"
7322 if [ "$CFG_XSYNC" = "yes" ]; then
7323 QT_CONFIG="$QT_CONFIG xsync"
7325 if [ "$CFG_XINERAMA" = "yes" ]; then
7326 QT_CONFIG="$QT_CONFIG xinerama"
7327 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7329 if [ "$CFG_XCURSOR" = "yes" ]; then
7330 QT_CONFIG="$QT_CONFIG xcursor"
7331 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7333 if [ "$CFG_XFIXES" = "yes" ]; then
7334 QT_CONFIG="$QT_CONFIG xfixes"
7335 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7337 if [ "$CFG_XRANDR" = "yes" ]; then
7338 QT_CONFIG="$QT_CONFIG xrandr"
7339 if [ "$CFG_XRENDER" != "yes" ]; then
7340 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7341 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7343 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7346 if [ "$CFG_XRENDER" = "yes" ]; then
7347 QT_CONFIG="$QT_CONFIG xrender"
7348 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7350 if [ "$CFG_MITSHM" = "yes" ]; then
7351 QT_CONFIG="$QT_CONFIG mitshm"
7353 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7354 QT_CONFIG="$QT_CONFIG fontconfig"
7356 if [ "$CFG_XINPUT" = "yes" ]; then
7357 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7359 if [ "$CFG_XINPUT" = "yes" ]; then
7360 QT_CONFIG="$QT_CONFIG xinput tablet"
7362 if [ "$CFG_XKB" = "yes" ]; then
7363 QT_CONFIG="$QT_CONFIG xkb"
7367 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7368 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7369 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7371 if [ "$CFG_ARCH" = "macosx" ]; then
7372 if [ "$CFG_RPATH" = "yes" ]; then
7373 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7375 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7376 if [ -n "$RPATH_FLAGS" ]; then
7378 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7382 elif [ "$CFG_RPATH" = "yes" ]; then
7383 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7387 if [ "$CFG_RPATH" = "yes" ]; then
7388 # set the default rpath to the library installation directory
7389 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7391 if [ -n "$RPATH_FLAGS" ]; then
7392 # add the user defined rpaths
7393 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7397 if [ '!' -z "$I_FLAGS" ]; then
7398 # add the user define include paths
7399 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7400 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7403 # turn off exceptions for the compilers that support it
7404 if [ "$PLATFORM_QWS" = "yes" ]; then
7405 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7406 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7407 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7409 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7411 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7415 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7416 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7419 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7420 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7421 # Follow default behavior of configure.exe by overriding with "rtti".
7422 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7425 if [ "$CFG_ALSA" = "yes" ]; then
7426 QT_CONFIG="$QT_CONFIG alsa"
7429 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7430 QT_CONFIG="$QT_CONFIG pulseaudio"
7433 if [ "$CFG_COREWLAN" = "yes" ]; then
7434 QT_CONFIG="$QT_CONFIG corewlan"
7437 if [ "$CFG_ICD" = "yes" ]; then
7438 QT_CONFIG="$QT_CONFIG icd"
7441 if [ "$CFG_ICU" = "yes" ]; then
7442 QT_CONFIG="$QT_CONFIG icu"
7446 # Some Qt modules are too advanced in C++ for some old compilers
7447 # Detect here the platforms where they are known to work.
7449 # See Qt documentation for more information on which features are
7450 # supported and on which compilers.
7452 canBuildQtXmlPatterns="yes"
7453 canBuildWebKit="$HAVE_STL"
7454 canBuildQtConcurrent="yes"
7457 # WebKit requires stdint.h
7458 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7459 if [ $? != "0" ]; then
7463 case "$XPLATFORM" in
7465 # PA-RISC's assembly is too limited
7466 # gcc 3.4 on that platform can't build QtXmlPatterns
7467 # the assembly it generates cannot be compiled
7469 # Check gcc's version
7470 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7474 canBuildQtXmlPatterns="no"
7478 canBuildQtXmlPatterns="no"
7482 unsupported/vxworks-*-g++*)
7485 unsupported/vxworks-*-dcc*)
7487 canBuildQtXmlPatterns="no"
7490 # Check gcc's version
7491 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7499 canBuildQtXmlPatterns="no"
7504 # Check the compiler version
7505 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7508 canBuildQtXmlPatterns="no"
7509 canBuildQtConcurrent="no"
7513 canBuildQtConcurrent="no"
7519 canBuildQtXmlPatterns="no"
7520 canBuildQtConcurrent="no"
7526 # Get the xlC version
7527 cat > xlcver.c <<EOF
7531 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7536 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7537 xlcver=`./xlcver 2>/dev/null`
7540 if [ "$OPT_VERBOSE" = "yes" ]; then
7541 if [ -n "$xlcver" ]; then
7542 echo Found IBM xlC version: $xlcver.
7544 echo Could not determine IBM xlC version, assuming oldest supported.
7551 canBuildQtXmlPatterns="no"
7552 canBuildQtConcurrent="no"
7556 canBuildQtConcurrent="no"
7562 canBuildQtConcurrent="no"
7570 if [ "$CFG_GUI" = "no" ]; then
7571 # WebKit requires QtGui
7575 if [ "$CFG_SHARED" = "no" ]; then
7577 echo "WARNING: Using static linking will disable the WebKit module."
7582 CFG_CONCURRENT="yes"
7583 if [ "$canBuildQtConcurrent" = "no" ]; then
7584 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7587 QT_CONFIG="$QT_CONFIG concurrent"
7590 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7591 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7594 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7595 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7596 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7597 CFG_XMLPATTERNS="no"
7599 # No longer needed after modularization
7600 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7601 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7603 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7606 # No longer needed after modularization
7607 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7608 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7610 # QT_CONFIG="$QT_CONFIG multimedia"
7613 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7614 QT_CONFIG="$QT_CONFIG audio-backend"
7617 if [ "$CFG_SVG" = "auto" ]; then
7621 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7622 echo "QtSvg requested, but it can't be built without QtGui"
7626 if [ "$CFG_SVG" = "yes" ]; then
7627 QT_CONFIG="$QT_CONFIG svg"
7629 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7632 if [ "$CFG_WEBKIT" != "no" ]; then
7633 CFG_WEBKIT="$canBuildWebKit"
7636 if [ "$CFG_WEBKIT" != "no" ]; then
7637 # No longer needed after modularization
7638 #QT_CONFIG="$QT_CONFIG webkit"
7639 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7640 if [ "$CFG_WEBKIT" = "debug" ]; then
7641 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7645 if [ "$CFG_SCRIPT" = "auto" ]; then
7649 # No longer needed after modularization
7650 #if [ "$CFG_SCRIPT" = "yes" ]; then
7651 # QT_CONFIG="$QT_CONFIG script"
7653 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7656 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7657 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7660 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7661 case "$XPLATFORM" in
7663 CFG_SCRIPTTOOLS="no"
7666 CFG_SCRIPTTOOLS="yes"
7669 elif [ "$CFG_SCRIPT" = "no" ]; then
7670 CFG_SCRIPTTOOLS="no"
7673 # No longer needed after modularization
7674 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7675 # QT_CONFIG="$QT_CONFIG scripttools"
7677 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7682 i386|x86_64|arm|macosx) ;;
7683 *) canBuildV8="no";;
7686 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7687 echo "Error: V8 was requested, but is not supported on this platform."
7691 if [ "$CFG_V8" = "auto" ]; then
7692 CFG_V8="$canBuildV8"
7695 if [ "$CFG_V8" = "no" ]; then
7696 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7698 QT_CONFIG="$QT_CONFIG v8"
7701 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7702 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7703 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7707 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7708 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7715 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7716 # No longer needed after modularization
7717 #QT_CONFIG="$QT_CONFIG declarative"
7718 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7719 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7722 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7725 if [ "$CFG_LOCATION" = "auto" ]; then
7726 CFG_LOCATION="$CFG_GUI"
7729 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7730 echo "QtLocation requested, but it can't be built without QtGui"
7734 #Disable QtLocation until ready
7737 if [ "$CFG_LOCATION" = "no" ]; then
7738 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7741 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7744 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7745 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7746 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7751 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7752 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7753 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7760 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7763 # On Mac, set the minimum deployment target for the different architechtures
7764 # using the Xarch compiler option when supported (10.5 and up).
7765 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7766 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7767 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7768 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7769 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7770 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7772 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7773 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7774 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7775 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7776 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7778 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7779 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7780 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7781 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7782 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7784 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7785 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7786 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7787 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7788 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7795 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7797 case "$COMPILER_VERSION" in
7799 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7800 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7801 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7804 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7805 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7806 QT_GCC_PATCH_VERSION=0
7816 #-------------------------------------------------------------------------------
7817 # part of configuration information goes into qconfig.h
7818 #-------------------------------------------------------------------------------
7820 case "$CFG_QCONFIG" in
7822 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7825 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7826 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7827 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7828 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7829 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7830 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7832 echo "#endif" >>"$tmpconfig"
7836 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7840 # define QT_EDITION $QT_EDITION
7843 /* Machine byte-order */
7844 #define Q_BIG_ENDIAN 4321
7845 #define Q_LITTLE_ENDIAN 1234
7848 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7849 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7850 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7851 #if defined(__BIG_ENDIAN__)
7852 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7853 #elif defined(__LITTLE_ENDIAN__)
7854 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7856 # error "Unable to determine byte order!"
7860 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7862 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7863 if [ "$CFG_ENDIAN" = "auto" ]; then
7864 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7865 #if defined(__BIG_ENDIAN__)
7866 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7867 #elif defined(__LITTLE_ENDIAN__)
7868 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7870 # error "Unable to determine byte order!"
7874 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7876 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7878 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7879 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7880 /* Non-IEEE double format */
7881 #define Q_DOUBLE_LITTLE "01234567"
7882 #define Q_DOUBLE_BIG "76543210"
7883 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7884 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7885 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7888 if [ "$CFG_ARMFPA" = "yes" ]; then
7889 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7890 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7891 #ifndef QT_BOOTSTRAPPED
7896 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7900 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7901 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7902 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7903 /* Machine Architecture */
7904 #ifndef QT_BOOTSTRAPPED
7905 # define QT_ARCH_${CFG_ARCH_STR}
7907 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7911 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7912 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7914 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7915 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7918 # if both carbon and cocoa are specified, enable the autodetection code.
7919 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7920 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7921 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7922 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7925 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7926 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7929 if [ "$PLATFORM_MAC" = "yes" ]; then
7930 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7931 #if defined(__LP64__)
7932 # define QT_POINTER_SIZE 8
7934 # define QT_POINTER_SIZE 4
7938 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7939 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7943 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7945 if [ "$CFG_DEV" = "yes" ]; then
7946 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7949 # Embedded compile time options
7950 if [ "$PLATFORM_QWS" = "yes" ]; then
7951 # Add QWS to config.h
7952 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7954 # Add excluded decorations to $QCONFIG_FLAGS
7955 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7956 for decor in $decors; do
7957 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7958 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7961 # Figure which embedded drivers which are turned off
7962 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7963 for ADRIVER in $CFG_GFX_ON; do
7964 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7967 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7968 # the um driver is currently not in the available list for external builds
7969 if [ "$CFG_DEV" = "no" ]; then
7970 CFG_KBD_OFF="$CFG_KBD_OFF um"
7972 for ADRIVER in $CFG_KBD_ON; do
7973 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7976 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7977 for ADRIVER in $CFG_MOUSE_ON; do
7978 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7981 for DRIVER in $CFG_GFX_OFF; do
7982 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7983 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7986 for DRIVER in $CFG_KBD_OFF; do
7987 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7988 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7991 for DRIVER in $CFG_MOUSE_OFF; do
7992 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7993 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7997 if [ "$PLATFORM_QPA" = "yes" ]; then
7998 # Add QPA to config.h
7999 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
8002 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
8003 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
8006 # Add turned on SQL drivers
8007 for DRIVER in $CFG_SQL_AVAILABLE; do
8008 eval "VAL=\$CFG_SQL_$DRIVER"
8011 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8012 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
8013 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
8016 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
8022 QMakeVar set sql-drivers "$SQL_DRIVERS"
8023 QMakeVar set sql-plugins "$SQL_PLUGINS"
8025 # Add other configuration options to the qconfig.h file
8026 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
8027 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
8028 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
8029 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
8030 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
8031 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
8032 [ "$CFG_S60" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_S60"
8033 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
8034 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
8035 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
8037 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
8038 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
8039 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
8040 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
8041 [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
8044 # X11/Unix/Mac only configs
8045 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
8046 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
8047 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
8048 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
8049 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
8050 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
8051 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
8052 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
8053 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
8054 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
8055 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
8056 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
8057 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
8058 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
8059 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
8061 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
8062 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
8063 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
8064 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
8065 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
8066 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
8067 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
8068 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
8069 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
8070 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
8071 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
8072 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
8073 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
8075 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
8076 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
8077 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
8078 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
8079 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
8080 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
8081 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
8082 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
8083 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
8085 # sort QCONFIG_FLAGS for neatness if we can
8086 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
8087 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
8089 if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
8090 # Enable Symbian DLLs and export rules.
8091 # We cannot use Linux's default export rules since they export everything.
8092 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL"
8093 # Disable non-working features.
8094 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_SYSTEMTRAYICON"
8097 if [ -n "$QCONFIG_FLAGS" ]; then
8098 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8099 #ifndef QT_BOOTSTRAPPED
8102 for cfg in $QCONFIG_FLAGS; do
8103 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
8104 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
8105 # figure out define logic, so we can output the correct
8106 # ifdefs to override the global defines in a project
8108 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
8109 # QT_NO_option can be forcefully turned on by QT_option
8110 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
8111 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
8112 # QT_option can be forcefully turned off by QT_NO_option
8113 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
8116 if [ -z $cfgdNeg ]; then
8117 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8124 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8125 #if defined($cfgd) && defined($cfgdNeg)
8127 #elif !defined($cfgd) && !defined($cfgdNeg)
8134 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8135 #endif // QT_BOOTSTRAPPED
8140 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
8141 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8142 #define QT_VISIBILITY_AVAILABLE
8147 if [ -n "$QT_LIBINFIX" ]; then
8148 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8149 #define QT_LIBINFIX "$QT_LIBINFIX"
8154 if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
8155 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
8156 #define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
8161 # avoid unecessary rebuilds by copying only if qconfig.h has changed
8162 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
8163 rm -f "$outpath/src/corelib/global/qconfig.h.new"
8165 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
8166 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
8167 chmod -w "$outpath/src/corelib/global/qconfig.h"
8168 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
8169 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
8173 #-------------------------------------------------------------------------------
8174 # save configuration into qconfig.pri
8175 #-------------------------------------------------------------------------------
8176 QTCONFIG="$outpath/mkspecs/qconfig.pri"
8177 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
8178 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
8179 if [ "$CFG_DEBUG" = "yes" ]; then
8180 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
8181 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8182 QT_CONFIG="$QT_CONFIG release"
8184 QT_CONFIG="$QT_CONFIG debug"
8185 elif [ "$CFG_DEBUG" = "no" ]; then
8186 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
8187 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8188 QT_CONFIG="$QT_CONFIG debug"
8190 QT_CONFIG="$QT_CONFIG release"
8192 if [ "$CFG_STL" = "yes" ]; then
8193 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
8195 if [ "$CFG_FRAMEWORK" = "no" ]; then
8196 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
8198 QT_CONFIG="$QT_CONFIG qt_framework"
8199 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
8201 if [ "$PLATFORM_MAC" = "yes" ]; then
8202 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
8204 if [ "$CFG_DEV" = "yes" ]; then
8205 QT_CONFIG="$QT_CONFIG private_tests"
8208 if [ -z "$QT_CFLAGS_FPU" ]; then
8209 if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1; then
8210 QT_CFLAGS_FPU=softvfp
8214 # Make the application arch follow the Qt arch for single arch builds.
8215 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
8216 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
8217 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
8220 cat >>"$QTCONFIG.tmp" <<EOF
8222 CONFIG += $QTCONFIG_CONFIG
8224 QT_EDITION = $Edition
8225 QT_CONFIG += $QT_CONFIG
8228 QT_VERSION = $QT_VERSION
8229 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
8230 QT_MINOR_VERSION = $QT_MINOR_VERSION
8231 QT_PATCH_VERSION = $QT_PATCH_VERSION
8234 QT_LIBINFIX = $QT_LIBINFIX
8235 QT_NAMESPACE = $QT_NAMESPACE
8236 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
8239 if [ -n "$CFG_SYSROOT" ]; then
8240 echo "# sysroot" >>"$QTCONFIG.tmp"
8241 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
8242 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
8243 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8244 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8245 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8246 echo "}" >> "$QTCONFIG.tmp"
8247 echo >> "$QTCONFIG.tmp"
8249 if [ "$CFG_RPATH" = "yes" ]; then
8250 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8252 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8253 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8254 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8255 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8257 if [ -n "$QT_CFLAGS_FPU" ]; then
8258 echo "#Qt for symbian FPU settings" >> "$QTCONFIG.tmp"
8259 echo "MMP_RULES += \"ARMFPU $QT_CFLAGS_FPU\"" >> "$QTCONFIG.tmp"
8262 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8263 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
8264 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8267 # replace qconfig.pri if it differs from the newly created temp file
8268 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8269 rm -f "$QTCONFIG.tmp"
8271 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8274 #-------------------------------------------------------------------------------
8275 # save configuration into qmodule.pri
8276 #-------------------------------------------------------------------------------
8277 QTMODULE="$outpath/mkspecs/qmodule.pri"
8279 # Ensure we can link to uninistalled libraries
8280 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8281 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8283 if [ -n "$QT_CFLAGS_PSQL" ]; then
8284 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8286 if [ -n "$QT_LFLAGS_PSQL" ]; then
8287 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8289 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8290 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8292 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8293 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8295 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8296 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8298 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8299 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8301 if [ -n "$QT_LFLAGS_ODBC" ]; then
8302 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8304 if [ -n "$QT_LFLAGS_TDS" ]; then
8305 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8308 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8309 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8312 #dump in the OPENSSL_LIBS info
8313 if [ '!' -z "$OPENSSL_LIBS" ]; then
8314 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8315 elif [ "$CFG_OPENSSL" = "linked" ]; then
8316 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8319 #dump in the SDK info
8320 if [ '!' -z "$CFG_SDK" ]; then
8321 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8324 # mac gcc -Xarch support
8325 if [ "$CFG_MAC_XARCH" = "no" ]; then
8326 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8330 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8331 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8333 # replace qmodule.pri if it differs from the newly created temp file
8334 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8335 rm -f "$QTMODULE.tmp"
8337 mv -f "$QTMODULE.tmp" "$QTMODULE"
8340 #-------------------------------------------------------------------------------
8341 # save configuration into .qmake.cache
8342 #-------------------------------------------------------------------------------
8344 CACHEFILE="$outpath/.qmake.cache"
8345 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8346 cat >>"$CACHEFILE.tmp" <<EOF
8348 QT_SOURCE_TREE = \$\$quote($relpath)
8349 QT_BUILD_TREE = \$\$quote($outpath)
8350 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8352 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8353 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8354 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8355 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8356 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8357 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8358 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8360 include(\$\$PWD/mkspecs/qmodule.pri)
8361 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8362 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8363 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8367 #dump the qmake spec
8368 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8369 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8371 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8376 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8377 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8378 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8379 # don't need to worry about generated files
8380 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8381 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8383 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8385 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8386 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8389 # replace .qmake.cache if it differs from the newly created temp file
8390 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8391 rm -f "$CACHEFILE.tmp"
8393 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8396 #-------------------------------------------------------------------------------
8397 # give feedback on configuration
8398 #-------------------------------------------------------------------------------
8402 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8405 This target is using the GNU C++ compiler ($PLATFORM).
8407 Recent versions of this compiler automatically include code for
8408 exceptions, which increase both the size of the Qt libraries and
8409 the amount of memory taken by your applications.
8411 You may choose to re-run `basename $0` with the -no-exceptions
8412 option to compile Qt without exceptions. This is completely binary
8413 compatible, and existing applications will continue to work.
8421 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8424 This target is using the MIPSpro C++ compiler ($PLATFORM).
8426 You may choose to re-run `basename $0` with the -no-exceptions
8427 option to compile Qt without exceptions. This will make the
8428 size of the Qt library smaller and reduce the amount of memory
8429 taken by your applications.
8440 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8442 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8443 in debug mode will run out of memory on systems with 2GB or less.
8444 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8445 -no-webkit or -release to skip webkit debug.
8450 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8451 echo "Build type: $PLATFORM"
8453 echo "Building on: $PLATFORM"
8454 echo "Building for: $XPLATFORM"
8457 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8458 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8460 echo "Architecture: $CFG_ARCH"
8463 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8464 echo "Host architecture: $CFG_HOST_ARCH"
8467 if [ "$PLATFORM_MAC" = "yes" ]; then
8468 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8469 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8470 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8472 echo "Using framework: Cocoa"
8475 echo "Using framework: Carbon"
8479 if [ -n "$PLATFORM_NOTES" ]; then
8480 echo "Platform notes:"
8481 echo "$PLATFORM_NOTES"
8486 if [ "$OPT_VERBOSE" = "yes" ]; then
8487 echo $ECHO_N "qmake vars .......... $ECHO_C"
8488 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8489 echo "qmake switches ......... $QMAKE_SWITCHES"
8492 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8493 echo "Build .................. $CFG_BUILD_PARTS"
8494 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8495 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8496 echo "Debug .................. yes (combined)"
8497 if [ "$CFG_DEBUG" = "yes" ]; then
8498 echo "Default Link ........... debug"
8500 echo "Default Link ........... release"
8503 echo "Debug .................. $CFG_DEBUG"
8505 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8506 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8507 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8508 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8509 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8510 echo "QtGui module ........... $CFG_GUI"
8511 echo "QtScript module ........ $CFG_SCRIPT"
8512 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8513 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8514 echo "Phonon module .......... $CFG_PHONON"
8515 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8516 echo "SVG module ............. $CFG_SVG"
8517 case "$CFG_WEBKIT" in
8518 yes) echo "WebKit module .......... yes" ;;
8519 debug) echo "WebKit module .......... yes (debug)" ;;
8520 no) echo "WebKit module .......... no" ;;
8522 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8523 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8524 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8526 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8529 echo "V8 module .............. $CFG_V8"
8530 echo "Declarative module ..... $CFG_DECLARATIVE"
8531 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8532 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8534 echo "Location module ........ $CFG_LOCATION"
8535 echo "Support for S60 ........ $CFG_S60"
8536 echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES"
8537 echo "STL support ............ $CFG_STL"
8538 echo "PCH support ............ $CFG_PRECOMPILE"
8539 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8540 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8541 echo "AVX..................... ${CFG_AVX}"
8542 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8543 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8544 echo "NEON support ........... ${CFG_NEON}"
8546 [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
8547 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8548 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8549 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8550 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8551 echo "NIS support ............ $CFG_NIS"
8552 echo "CUPS support ........... $CFG_CUPS"
8553 echo "Iconv support .......... $CFG_ICONV"
8554 echo "Glib support ........... $CFG_GLIB"
8555 echo "GStreamer support ...... $CFG_GSTREAMER"
8556 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8557 echo "Large File support ..... $CFG_LARGEFILE"
8558 echo "GIF support ............ $CFG_GIF"
8559 if [ "$CFG_TIFF" = "no" ]; then
8560 echo "TIFF support ........... $CFG_TIFF"
8562 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8564 if [ "$CFG_JPEG" = "no" ]; then
8565 echo "JPEG support ........... $CFG_JPEG"
8567 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8569 if [ "$CFG_PNG" = "no" ]; then
8570 echo "PNG support ............ $CFG_PNG"
8572 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8574 if [ "$CFG_MNG" = "no" ]; then
8575 echo "MNG support ............ $CFG_MNG"
8577 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8579 echo "zlib support ........... $CFG_ZLIB"
8580 echo "Session management ..... $CFG_SM"
8581 if [ "$PLATFORM_QWS" = "yes" ]; then
8582 echo "Embedded support ....... $CFG_EMBEDDED"
8583 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8584 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8586 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8588 # Normalize the decoration output first
8589 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8590 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8591 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8592 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8593 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8594 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8595 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8596 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8597 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8598 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8599 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8600 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8601 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8602 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8603 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8604 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8606 if [ "$CFG_OPENGL" = "desktop" ]; then
8607 echo "OpenGL support ......... yes (Desktop OpenGL)"
8608 elif [ "$CFG_OPENGL" = "es2" ]; then
8609 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8611 echo "OpenGL support ......... no"
8613 if [ "$CFG_EGL" != "no" ]; then
8614 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8615 echo "EGL support ............ yes <GLES/egl.h>"
8617 echo "EGL support ............ yes <EGL/egl.h>"
8620 if [ "$CFG_OPENVG" ]; then
8621 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8622 echo "OpenVG support ......... ShivaVG"
8624 echo "OpenVG support ......... $CFG_OPENVG"
8627 if [ "$PLATFORM_X11" = "yes" ]; then
8628 echo "NAS sound support ...... $CFG_NAS"
8629 echo "XShape support ......... $CFG_XSHAPE"
8630 echo "XVideo support ......... $CFG_XVIDEO"
8631 echo "XSync support .......... $CFG_XSYNC"
8632 echo "Xinerama support ....... $CFG_XINERAMA"
8633 echo "Xcursor support ........ $CFG_XCURSOR"
8634 echo "Xfixes support ......... $CFG_XFIXES"
8635 echo "Xrandr support ......... $CFG_XRANDR"
8636 echo "Xrender support ........ $CFG_XRENDER"
8637 echo "Xi support ............. $CFG_XINPUT"
8638 echo "MIT-SHM support ........ $CFG_MITSHM"
8639 echo "FontConfig support ..... $CFG_FONTCONFIG"
8640 echo "XKB Support ............ $CFG_XKB"
8641 echo "immodule support ....... $CFG_IM"
8642 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8644 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8645 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8646 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8647 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8648 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8649 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8650 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8651 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8652 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8655 if [ "$CFG_OPENSSL" = "yes" ]; then
8656 OPENSSL_LINKAGE="(run-time)"
8657 elif [ "$CFG_OPENSSL" = "linked" ]; then
8658 OPENSSL_LINKAGE="(linked)"
8660 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8661 echo "Alsa support ........... $CFG_ALSA"
8662 if [ "$PLATFORM_MAC" = "yes" ]; then
8663 echo "CoreWlan support ....... $CFG_COREWLAN"
8665 echo "ICD support ............ $CFG_ICD"
8666 echo "libICU support ......... $CFG_ICU"
8667 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8668 echo "Xcb support ............ limited (old version)"
8670 echo "Xcb support ............ $CFG_XCB"
8672 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8673 echo "XInput2 support ........ $CFG_XINPUT2"
8677 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC"
8679 # complain about not being able to use dynamic plugins if we are using a static build
8680 if [ "$CFG_SHARED" = "no" ]; then
8682 echo "WARNING: Using static linking will disable the use of dynamically"
8683 echo "loaded plugins. Make sure to import all needed static plugins,"
8684 echo "or compile needed modules into the library."
8687 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8689 echo "NOTE: When linking against OpenSSL, you can override the default"
8690 echo "library names through OPENSSL_LIBS."
8692 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8695 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8697 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8698 echo "if you want a pure debug build."
8703 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8708 #-------------------------------------------------------------------------------
8709 # build makefiles based on the configuration
8710 #-------------------------------------------------------------------------------
8712 echo "Finding project files. Please wait..."
8713 if [ "$CFG_NOPROCESS" != "yes" ]; then
8714 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8715 if [ -f "${relpath}/qtbase.pro" ]; then
8716 mkfile="${outpath}/Makefile"
8717 [ -f "$mkfile" ] && chmod +w "$mkfile"
8718 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8722 # .projects -> projects to process
8723 # .projects.1 -> qt and moc
8724 # .projects.2 -> subdirs and libs
8725 # .projects.3 -> the rest
8726 rm -f .projects .projects.1 .projects.2 .projects.3
8728 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8729 if [ -z "$AWK" ]; then
8730 for p in `echo $QMAKE_PROJECTS`; do
8731 echo "$p" >> .projects
8734 cat >projects.awk <<EOF
8740 first = "./.projects.1.tmp"
8741 second = "./.projects.2.tmp"
8742 third = "./.projects.3.tmp"
8747 if ( ! target_file )
8749 print input_file >target_file
8754 input_file = FILENAME
8759 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8762 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8763 target_file = second
8768 matched_target == 0 && /^(TEMPLATE.*=)/ {
8769 if ( \$3 == "subdirs" )
8770 target_file = second
8771 else if ( \$3 == "lib" )
8777 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8778 if ( \$0 ~ /plugin/ )
8781 target_file = second
8786 if ( ! target_file )
8788 print input_file >>target_file
8795 for p in `echo $QMAKE_PROJECTS`; do
8796 echo "$p" >> .projects.all
8799 # if you get errors about the length of the command line to awk, change the -l arg
8801 split -l 100 .projects.all .projects.all.
8802 for p in .projects.all.*; do
8803 "$AWK" -f projects.awk `cat $p`
8804 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8805 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8806 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8807 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8809 rm -f .projects.all* projects.awk
8811 [ -f .projects.1 ] && cat .projects.1 >>.projects
8812 [ -f .projects.2 ] && cat .projects.2 >>.projects
8813 rm -f .projects.1 .projects.2
8814 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8815 cat .projects.3 >>.projects
8819 # don't sort Qt and MOC in with the other project files
8820 # also work around a segfaulting uniq(1)
8821 if [ -f .sorted.projects.2 ]; then
8822 sort .sorted.projects.2 > .sorted.projects.2.new
8823 mv -f .sorted.projects.2.new .sorted.projects.2
8824 cat .sorted.projects.2 >> .sorted.projects.1
8826 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8827 rm -f .sorted.projects.2 .sorted.projects.1
8831 if [ -f .projects ]; then
8832 uniq .projects >.tmp
8833 mv -f .tmp .projects
8834 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8836 if [ -f .projects.3 ]; then
8837 uniq .projects.3 >.tmp
8838 mv -f .tmp .projects.3
8839 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8841 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8845 for part in $CFG_BUILD_PARTS; do
8847 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8848 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8849 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8850 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8855 if [ "$CFG_DEV" = "yes" ]; then
8856 PART_ROOTS="$PART_ROOTS tests"
8859 echo "Creating makefiles. Please wait..."
8860 for file in .projects .projects.3; do
8861 [ '!' -f "$file" ] && continue
8862 for a in `cat $file`; do
8864 for r in $PART_ROOTS; do
8865 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8870 [ "$IN_ROOT" = "no" ] && continue
8873 *winmain/winmain.pro)
8874 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8878 *s60main/s60main.pro)
8879 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
8882 *examples/activeqt/*) continue ;;
8883 */qmake/qmake.pro) continue ;;
8884 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8885 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8891 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8892 test -d "$dir" || mkdir -p "$dir"
8893 OUTDIR="$outpath/$dir"
8894 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8895 # fast configure - the makefile exists, skip it
8896 # since the makefile exists, it was generated by qmake, which means we
8897 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8899 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8902 QMAKE_SPEC_ARGS="-spec $SPEC"
8903 echo $ECHO_N " for $a$ECHO_C"
8905 QMAKE="$outpath/bin/qmake"
8906 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8907 if [ "$file" = ".projects.3" ]; then
8910 cat >"${OUTDIR}/Makefile" <<EOF
8911 # ${OUTDIR}/Makefile: generated by configure
8913 # WARNING: This makefile will be replaced with a real makefile.
8914 # All changes made to this file will be lost.
8916 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8918 cat >>"${OUTDIR}/Makefile" <<EOF
8920 all clean install qmake first Makefile: FORCE
8921 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8929 if [ "$OPT_VERBOSE" = "yes" ]; then
8930 echo " (`basename $SPEC`)"
8931 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8936 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8937 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8941 rm -f .projects .projects.3
8943 #-------------------------------------------------------------------------------
8944 # check for platforms that we don't yet know about
8945 #-------------------------------------------------------------------------------
8946 if [ "$CFG_ARCH" = "generic" ]; then
8949 NOTICE: Atomic operations are not yet supported for this
8952 Qt will use the 'generic' architecture instead, which uses a
8953 single pthread_mutex_t to protect all atomic operations. This
8954 implementation is the slow (but safe) fallback implementation
8955 for architectures Qt does not yet support.
8959 #-------------------------------------------------------------------------------
8960 # check if the user passed the -no-zlib option, which is no longer supported
8961 #-------------------------------------------------------------------------------
8962 if [ -n "$ZLIB_FORCED" ]; then
8963 which_zlib="supplied"
8964 if [ "$CFG_ZLIB" = "system" ]; then
8970 NOTICE: The -no-zlib option was supplied but is no longer
8973 Qt now requires zlib support in all builds, so the -no-zlib
8974 option was ignored. Qt will be built using the $which_zlib
8979 #-------------------------------------------------------------------------------
8980 # finally save the executed command to another script
8981 #-------------------------------------------------------------------------------
8982 if [ `basename $0` != "config.status" ]; then
8983 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8985 # add the system variables
8986 for varname in $SYSTEM_VARIABLES; do
8988 'if [ -n "\$'${varname}'" ]; then
8989 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8994 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8996 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8997 echo "#!/bin/sh" > "$outpath/config.status"
8998 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8999 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
9000 echo "else" >> "$outpath/config.status"
9001 echo " $CONFIG_STATUS" >> "$outpath/config.status"
9002 echo "fi" >> "$outpath/config.status"
9003 chmod +x "$outpath/config.status"
9006 if [ -n "$RPATH_MESSAGE" ]; then
9008 echo "$RPATH_MESSAGE"
9011 MAKE=`basename "$MAKE"`
9013 echo Qt is now configured for building. Just run \'$MAKE\'.
9014 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
9015 echo Once everything is built, Qt is installed.
9016 echo You should not run \'$MAKE install\'.
9018 echo Once everything is built, you must run \'$MAKE install\'.
9019 echo Qt will be installed into $QT_INSTALL_PREFIX
9022 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.