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)
688 CFG_OPENVG_LC_INCLUDES=no
689 CFG_OPENVG_SHIVA=auto
690 CFG_OPENVG_ON_OPENGL=auto
692 CFG_EGL_GLES_INCLUDES=no
695 CFG_QWS_FREETYPE=auto
698 QT_DEFAULT_BUILD_PARTS="libs examples tests"
703 CFG_PHONON_BACKEND=yes
705 CFG_AUDIO_BACKEND=auto
710 CFG_DECLARATIVE_DEBUG=yes
711 CFG_WEBKIT=auto # (yes|no|auto|debug)
712 CFG_JAVASCRIPTCORE_JIT=auto
715 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
716 CFG_GFX_ON="linuxfb multiscreen"
717 CFG_GFX_PLUGIN_AVAILABLE=
720 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
721 CFG_KBD_ON="tty" #default, see QMakeVar above
722 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
723 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
725 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
726 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
727 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
728 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
730 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
731 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
732 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
733 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
738 CFG_KBD_PLUGIN_AVAILABLE=
741 CFG_MOUSE_PLUGIN_AVAILABLE=
746 CFG_DECORATION_AVAILABLE="styled windows default"
747 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
748 CFG_DECORATION_PLUGIN_AVAILABLE=
749 CFG_DECORATION_PLUGIN=
767 CFG_SEPARATE_DEBUG_INFO=no
768 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
769 CFG_REDUCE_EXPORTS=auto
779 CFG_REDUCE_RELOCATIONS=auto
782 CFG_ACCESSIBILITY=auto
786 CFG_DOUBLEFORMAT=auto
790 CFG_CLOCK_GETTIME=auto
791 CFG_CLOCK_MONOTONIC=auto
800 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
805 COMMANDLINE_MAC_CARBON=no
808 CFG_PREFIX_INSTALL=yes
817 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
818 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
822 OPT_CONFIRM_LICENSE=no
828 CFG_GRAPHICS_SYSTEM=default
838 # initalize variables used for installation
847 QT_INSTALL_TRANSLATIONS=
853 #flags for SQL drivers
861 QT_LFLAGS_ODBC="-lodbc"
864 # flags for libdbus-1
868 # flags for Glib (X11 only)
872 # flags for GStreamer (X11 only)
876 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
877 QT_CFLAGS_CONNSETTINGS=
878 QT_LIBS_CONNSETTINGS=
880 #-------------------------------------------------------------------------------
881 # check SQL drivers, mouse drivers and decorations available in this package
882 #-------------------------------------------------------------------------------
884 # opensource version removes some drivers, so force them to be off
890 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
891 for a in "$relpath/src/plugins/sqldrivers/"*; do
893 base_a=`basename "$a"`
894 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
895 eval "CFG_SQL_${base_a}=auto"
900 CFG_DECORATION_PLUGIN_AVAILABLE=
901 if [ -d "$relpath/src/plugins/decorations" ]; then
902 for a in "$relpath/src/plugins/decorations/"*; do
904 base_a=`basename "$a"`
905 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
910 CFG_KBD_PLUGIN_AVAILABLE=
911 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
912 for a in "$relpath/src/plugins/kbddrivers/"*; do
914 base_a=`basename "$a"`
915 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
920 CFG_MOUSE_PLUGIN_AVAILABLE=
921 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
922 for a in "$relpath/src/plugins/mousedrivers/"*; do
924 base_a=`basename "$a"`
925 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
930 CFG_GFX_PLUGIN_AVAILABLE=
931 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
932 for a in "$relpath/src/plugins/gfxdrivers/"*; do
934 base_a=`basename "$a"`
935 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
938 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
941 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
942 if [ -d "$relpath/src/plugins/imageformats" ]; then
943 for a in "$relpath/src/plugins/imageformats/"*; do
945 base_a=`basename "$a"`
946 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
951 #-------------------------------------------------------------------------------
952 # Set Default NaCl options
953 #-------------------------------------------------------------------------------
954 if [ "$CFG_EMBEDDED" = "nacl" ]; then
955 echo "Setting NaCl options:"
965 if [ `uname` = "Linux" ]; then
966 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
967 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
969 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
970 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
973 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
984 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
985 QT_CONFIG="$QT_CONFIG nacl"
988 #-------------------------------------------------------------------------------
989 # parse command line arguments
990 #-------------------------------------------------------------------------------
992 # parse the arguments, setting things to "yes" or "no"
993 while [ "$#" -gt 0 ]; do
997 #Autoconf style options
999 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1003 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1007 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1008 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1011 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1015 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1019 -no-*-*|-plugin-*-*|-qt-*-*)
1020 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1021 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1036 #Qt style no options
1038 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1041 #Qt style yes options
1042 -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|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
1043 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1046 #Qt style options that pass an argument
1048 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1050 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1054 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1058 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1059 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1063 #Qt style complex options in one command
1064 -enable-*|-disable-*)
1065 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1066 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1068 #Qt Builtin/System style options
1069 -no-*|-system-*|-qt-*)
1070 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1071 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1073 #Options that cannot be generalized
1080 # this option may or may not be followed by an argument
1081 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1088 -embedded-lite|-qpa)
1090 # this option may or may not be followed by an argument
1091 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1104 # this option may or may not be followed by an argument
1105 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1114 # this option may or may not be followed by an argument
1115 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1123 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1124 # this option may or may not be followed by an argument
1125 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1134 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1138 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1146 VAR="graphicssystem"
1150 -runtimegraphicssystem)
1151 VAR="runtimegraphicssystem"
1162 if [ "$1" = "-D" ]; then
1166 VAL=`echo $1 | sed 's,-D,,'`
1171 # this option may or may not be followed by an argument
1172 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1181 if [ "$1" = "-I" ]; then
1185 VAL=`echo $1 | sed 's,-I,,'`
1190 if [ "$1" = "-L" ]; then
1194 VAL=`echo $1 | sed 's,-L,,'`
1199 if [ "$1" = "-R" ]; then
1203 VAL=`echo $1 | sed 's,-R,,'`
1208 VAL=`echo $1 | sed 's,-l,,'`
1212 if [ "$1" = "-F" ]; then
1216 VAL=`echo $1 | sed 's,-F,,'`
1221 if [ "$1" = "-fw" ]; then
1225 VAL=`echo $1 | sed 's,-fw,,'`
1233 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1240 if [ "$UNKNOWN_ARG" = "yes" ]; then
1241 echo "$1: unknown argument"
1252 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1253 CFG_QT3SUPPORT="$VAL"
1259 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1260 CFG_ACCESSIBILITY="$VAL"
1269 CFG_USE_GNUMAKE="$VAL"
1272 CFG_MYSQL_CONFIG="$VAL"
1275 QT_INSTALL_PREFIX="$VAL"
1278 QT_HOST_PREFIX="$VAL"
1281 QT_FORCE_PKGCONFIG=yes
1284 QT_INSTALL_DOCS="$VAL"
1287 QT_INSTALL_HEADERS="$VAL"
1290 QT_INSTALL_PLUGINS="$VAL"
1293 QT_INSTALL_IMPORTS="$VAL"
1296 QT_INSTALL_DATA="$VAL"
1299 QT_INSTALL_LIBS="$VAL"
1308 QT_INSTALL_TRANSLATIONS="$VAL"
1310 sysconfdir|settingsdir)
1311 QT_INSTALL_SETTINGS="$VAL"
1314 QT_INSTALL_EXAMPLES="$VAL"
1317 QT_INSTALL_TESTS="$VAL"
1326 QT_INSTALL_BINS="$VAL"
1348 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1355 if [ "$VAL" = "little" ]; then
1356 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1357 elif [ "$VAL" = "big" ]; then
1358 CFG_ENDIAN="Q_BIG_ENDIAN"
1364 if [ "$VAL" = "little" ]; then
1365 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1366 elif [ "$VAL" = "big" ]; then
1367 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1373 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1380 CFG_QWS_DEPTHS="$VAL"
1383 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1384 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1385 [ "$VAL" = "es2" ]; then
1387 if [ "$VAL" = "es2" ]; then
1395 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1397 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1405 if [ "$PLATFORM_QWS" = "yes" ]; then
1406 echo "Error: Graphics System plugins are not supported on QWS."
1407 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1408 echo " rather than existing as a separate plugin."
1412 if [ "$VAL" = "opengl" ]; then
1413 CFG_GRAPHICS_SYSTEM="opengl"
1414 elif [ "$VAL" = "openvg" ]; then
1415 CFG_GRAPHICS_SYSTEM="openvg"
1416 elif [ "$VAL" = "raster" ]; then
1417 CFG_GRAPHICS_SYSTEM="raster"
1418 elif [ "$VAL" = "runtime" ]; then
1419 CFG_GRAPHICS_SYSTEM="runtime"
1425 runtimegraphicssystem)
1426 if [ "$VAL" != "runtime" ]; then
1427 CFG_RUNTIME_SYSTEM="$VAL"
1431 qvfb) # left for commandline compatibility, not documented
1432 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1433 if [ "$VAL" = "yes" ]; then
1434 QMakeVar add gfx-drivers qvfb
1435 QMakeVar add kbd-drivers qvfb
1436 QMakeVar add mouse-drivers qvfb
1437 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1438 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1439 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1446 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1449 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1458 if [ "$PLATFORM_MAC" = "yes" ]; then
1465 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1466 CFG_MAC_DWARF2="$VAL"
1472 # if this is a Mac then "windows" probably means
1473 # we are cross-compiling for MinGW
1474 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1475 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1484 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1485 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1491 # do nothing - Cocoa is the default.
1494 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1495 CFG_MAC_CARBON="$VAL"
1496 COMMANDLINE_MAC_CARBON="$VAL"
1502 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1503 CFG_MAC_HARFBUZZ="$VAL"
1510 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1511 CFG_FRAMEWORK="$VAL"
1517 if [ "$VAL" = "yes" ]; then
1519 QMakeVar add QMAKE_CFLAGS -pg
1520 QMakeVar add QMAKE_CXXFLAGS -pg
1521 QMakeVar add QMAKE_LFLAGS -pg
1522 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1528 if [ "$VAL" = "yes" ]; then
1529 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1532 exceptions|g++-exceptions)
1533 if [ "$VAL" = "no" ]; then
1535 elif [ "$VAL" = "yes" ]; then
1543 # keep compatibility with old platform names
1549 PLATFORM=hpux-acc-o64
1552 PLATFORM=hpux-acc-64
1555 PLATFORM=hpux-acc-64
1567 PLATFORM=reliant-cds-64
1570 PLATFORM=solaris-cc-64
1573 PLATFORM=unixware-cc
1576 PLATFORM=unixware-g++
1579 PLATFORM=unixware-cc
1582 PLATFORM=unixware-g++
1588 i386) NATIVE_64_ARCH="x86_64" ;;
1589 powerpc) NATIVE_64_ARCH="ppc64" ;;
1590 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1592 if [ ! -z "$NATIVE_64_ARCH" ]; then
1593 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1594 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1601 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1604 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1605 CFG_DEBUG_RELEASE="$VAL"
1611 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1612 CFG_RELEASE_QMAKE="$VAL"
1618 if [ "$VAL" = "yes" ]; then
1620 elif [ "$VAL" = "no" ]; then
1627 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1628 CFG_PREFIX_INSTALL="$VAL"
1636 developer-build|commercial|opensource|nokia-developer)
1637 # These switches have been dealt with already
1640 if [ "$VAL" = "yes" ]; then
1642 elif [ "$VAL" = "no" ]; then
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1650 CFG_INCREMENTAL="$VAL"
1656 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1657 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1663 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1664 if [ "$VAL" = "no" ]; then
1665 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1666 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1667 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1673 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1680 if [ "$VAL" = "no" ]; then
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1695 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1702 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1709 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1716 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1723 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1730 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1737 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1744 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1751 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1752 CFG_PRECOMPILE="$VAL"
1757 separate-debug-info)
1758 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1759 CFG_SEPARATE_DEBUG_INFO="$VAL"
1760 elif [ "$VAL" = "nocopy" ] ; then
1761 CFG_SEPARATE_DEBUG_INFO="yes"
1762 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1768 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1769 CFG_REDUCE_EXPORTS="$VAL"
1775 if [ "$VAL" = "no" ]; then
1782 if [ "$VAL" = "no" ]; then
1789 if [ "$VAL" = "no" ]; then
1796 if [ "$VAL" = "no" ]; then
1803 if [ "$VAL" = "no" ]; then
1810 if [ "$VAL" = "no" ]; then
1817 if [ "$VAL" = "no" ]; then
1824 if [ "$VAL" = "no" ]; then
1831 if [ "$VAL" = "no" ]; then
1841 if [ "$VAL" = "no" ]; then
1848 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1849 CFG_REDUCE_RELOCATIONS="$VAL"
1855 [ "$VAL" = "qt" ] && VAL=yes
1856 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1857 CFG_QWS_FREETYPE="$VAL"
1863 [ "$VAL" = "qt" ] && VAL=yes
1864 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1869 # No longer supported:
1870 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1873 if [ "$VAL" = "system" ]; then
1880 [ "$VAL" = "yes" ] && VAL=qt
1881 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1888 [ "$VAL" = "yes" ] && VAL=qt
1889 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1896 [ "$VAL" = "yes" ] && VAL=qt
1897 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1904 [ "$VAL" = "yes" ] && VAL=qt
1905 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1912 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1919 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1926 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1933 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1940 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1947 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1954 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1955 CFG_FONTCONFIG="$VAL"
1961 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1968 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1975 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1982 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1989 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1996 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2003 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2004 CFG_GSTREAMER="$VAL"
2010 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2011 CFG_QGTKSTYLE="$VAL"
2017 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2020 if [ "$VAL" = "no" ]; then
2028 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
2030 elif [ "$VAL" = "runtime" ]; then
2037 if [ "$VAL" = "yes" ]; then
2044 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2051 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2052 CFG_LARGEFILE="$VAL"
2058 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2065 if [ "$VAL" = "yes" ]; then
2066 CFG_OPENSSL="linked"
2072 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2073 CFG_XMLPATTERNS="yes"
2075 if [ "$VAL" = "no" ]; then
2076 CFG_XMLPATTERNS="no"
2083 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2086 if [ "$VAL" = "no" ]; then
2094 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2095 CFG_SCRIPTTOOLS="yes"
2097 if [ "$VAL" = "no" ]; then
2098 CFG_SCRIPTTOOLS="no"
2105 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2108 if [ "$VAL" = "no" ]; then
2116 if [ "$VAL" = "yes" ]; then
2119 if [ "$VAL" = "no" ]; then
2127 if [ "$VAL" = "yes" ]; then
2128 CFG_DECLARATIVE="yes"
2130 if [ "$VAL" = "no" ]; then
2131 CFG_DECLARATIVE="no"
2138 if [ "$VAL" = "yes" ]; then
2139 CFG_DECLARATIVE_DEBUG="yes"
2141 if [ "$VAL" = "no" ]; then
2142 CFG_DECLARATIVE_DEBUG="no"
2149 [ "$VAL" = "auto" ] && VAL="yes"
2153 if [ "$VAL" = "yes" ]; then
2156 if [ "$VAL" = "no" ]; then
2164 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2165 CFG_JAVASCRIPTCORE_JIT="$VAL"
2171 if [ "$VAL" = "yes" ]; then
2172 OPT_CONFIRM_LICENSE="$VAL"
2178 if [ "$VAL" = "yes" ]; then
2184 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2185 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2186 # if autoconf style options were used, $VAL can be "yes" or "no"
2187 [ "$VAL" = "yes" ] && VAL=qt
2188 # now $VAL should be "no", "qt", or "plugin"... double-check
2189 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2192 # now $VAL is "no", "qt", or "plugin"
2194 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2195 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2197 # Grab the available values
2200 avail="$CFG_SQL_AVAILABLE"
2203 avail="$CFG_GFX_AVAILABLE"
2204 if [ "$OPT" = "plugin" ]; then
2205 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2209 avail="$CFG_DECORATION_AVAILABLE"
2210 if [ "$OPT" = "plugin" ]; then
2211 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2215 avail="$CFG_KBD_AVAILABLE"
2216 if [ "$OPT" = "plugin" ]; then
2217 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2221 avail="$CFG_MOUSE_AVAILABLE"
2222 if [ "$OPT" = "plugin" ]; then
2223 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2227 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2228 if [ "$OPT" != "plugin" ]; then
2229 # png is always built in
2235 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2239 # Check that that user's value is available.
2242 if [ "$VAL" = "$d" ]; then
2247 [ "$found" = yes ] || ERROR=yes
2249 if [ "$VAR" = "sql" ]; then
2250 # set the CFG_SQL_driver
2251 eval "CFG_SQL_$VAL=\$OPT"
2253 elif [ "$VAR" = "imageformat" ]; then
2254 [ "$OPT" = "qt" ] && OPT=yes
2255 VAL="`echo $VAL |tr a-z A-Z`"
2256 eval "CFG_$VAL=$OPT"
2260 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2261 if [ "$OPT" = "plugin" ]; then
2262 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2263 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2264 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2265 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2266 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2267 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2268 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2269 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2272 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2273 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2274 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2275 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2276 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2280 QMakeVar add "${VAR}s" "${VAL}"
2281 elif [ "$OPT" = "no" ]; then
2282 PLUG_VAR="${VAR}-plugin"
2283 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2284 IN_VAR="${VAR}-driver"
2288 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2289 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2290 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2291 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2292 QMakeVar del "${IN_VAR}s" "$VAL"
2293 QMakeVar del "${PLUG_VAR}s" "$VAL"
2295 if [ "$ERROR" = "yes" ]; then
2296 echo "$CURRENT_OPT: unknown argument"
2301 if [ "$VAL" = "yes" ]; then
2302 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2303 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2307 elif [ "$VAL" = "no" ]; then
2308 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2309 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2318 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2325 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2332 D_FLAGS="$D_FLAGS \"$VAL\""
2335 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2338 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2341 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2344 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2347 if [ "$PLATFORM_MAC" = "yes" ]; then
2348 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2349 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2355 if [ "$PLATFORM_MAC" = "yes" ]; then
2356 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2362 W_FLAGS="$W_FLAGS \"${VAL}\""
2368 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2375 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2376 CFG_PHONON_BACKEND="$VAL"
2382 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2383 CFG_MULTIMEDIA="$VAL"
2395 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2396 CFG_AUDIO_BACKEND="$VAL"
2402 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2409 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2410 CFG_FORCE_ASSERTS="$VAL"
2419 if [ "$UNKNOWN_OPT" = "yes" ]; then
2420 echo "${CURRENT_OPT}: invalid command-line switch"
2426 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2427 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2430 if [ "$CFG_GUI" = "no" ]; then
2431 echo "Warning: -no-gui will disable the qt3support library."
2435 #disable Qt3Support for Lighthouse
2436 if [ "$PLATFORM_QPA" = "yes" ]; then
2440 # update QT_CONFIG to show our current predefined configuration
2441 case "$CFG_QCONFIG" in
2442 minimal|small|medium|large|full)
2443 # these are a sequence of increasing functionality
2444 for c in minimal small medium large full; do
2445 QT_CONFIG="$QT_CONFIG $c-config"
2446 [ "$CFG_QCONFIG" = $c ] && break
2450 # not known to be sufficient for anything
2451 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2452 echo >&2 "Error: configuration file not found:"
2453 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2455 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2460 #-------------------------------------------------------------------------------
2461 # build tree initialization
2462 #-------------------------------------------------------------------------------
2464 # where to find which..
2465 unixtests="$relpath/config.tests/unix"
2466 mactests="$relpath/config.tests/mac"
2467 WHICH="$unixtests/which.test"
2469 PERL=`$WHICH perl 2>/dev/null`
2471 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2473 for e in gawk nawk awk; do
2474 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2481 PERL="/usr/bin/perl"
2482 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2486 ### skip this if the user just needs help...
2487 if [ "$OPT_HELP" != "yes" ]; then
2489 # is this a shadow build?
2490 if [ "$OPT_SHADOW" = "maybe" ]; then
2492 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2493 if [ -h "$outpath" ]; then
2494 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2500 if [ "$OPT_SHADOW" = "yes" ]; then
2501 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2502 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2503 echo >&2 "Cannot proceed."
2506 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2509 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2511 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2512 echo "Qt can be built in release mode with separate debug information, so"
2513 echo "-debug-and-release is not necessary anymore"
2517 if [ "$CFG_SILENT" = "yes" ]; then
2518 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2521 # if the source tree is different from the build tree,
2522 # symlink or copy part of the sources
2523 if [ "$OPT_SHADOW" = "yes" ]; then
2524 echo "Preparing build tree..."
2526 if [ -z "$PERL" ]; then
2528 echo "You need perl in your PATH to make a shadow build."
2529 echo "Cannot proceed."
2533 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2535 # symlink the qmake directory
2536 find "$relpath/qmake" | while read a; do
2537 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2538 if [ '!' -f "$my_a" ]; then
2539 if [ -d "$a" ]; then
2540 # directories are created...
2543 a_dir=`dirname "$my_a"`
2544 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2545 # ... and files are symlinked
2546 case `basename "$a"` in
2547 *.o|*.d|GNUmakefile*|qmake)
2558 # make a syncqt script that can be used in the shadow
2559 rm -f "$outpath/bin/syncqt"
2560 if [ -x "$relpath/bin/syncqt" ]; then
2561 mkdir -p "$outpath/bin"
2562 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2563 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2564 chmod 755 "$outpath/bin/syncqt"
2567 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2568 rm -f "$outpath/bin/$i"
2569 if [ -x "$relpath/bin/$i" ]; then
2570 mkdir -p "$outpath/bin"
2571 echo "#!/bin/sh" >"$outpath/bin/$i"
2572 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2573 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2574 chmod 755 "$outpath/bin/$i"
2578 # symlink the mkspecs directory
2579 mkdir -p "$outpath/mkspecs"
2580 rm -rf "$outpath"/mkspecs/*
2581 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2582 rm -f "$outpath/mkspecs/default"
2586 rm -rf "$outpath/mkspecs/$1"
2587 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2588 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2591 # Special case for mkspecs/features directory.
2592 # To be able to place .prf files into a shadow build directory,
2593 # we're creating links for files only. The directory structure is reproduced.
2594 ShadowMkspecs features
2596 # The modules dir is special, too.
2597 ShadowMkspecs modules
2599 # symlink the doc directory
2600 rm -rf "$outpath/doc"
2601 ln -s "$relpath/doc" "$outpath/doc"
2603 # make sure q3porting.xml can be found
2604 mkdir -p "$outpath/tools/porting/src"
2605 rm -f "$outpath/tools/porting/src/q3porting.xml"
2606 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2609 # symlink fonts to be able to run application from build directory
2610 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2611 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2612 mkdir -p "${outpath}/lib"
2613 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2617 if [ "$OPT_FAST" = "auto" ]; then
2618 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2625 # find a make command
2626 if [ -z "$MAKE" ]; then
2628 for mk in gmake make; do
2629 if "$WHICH" $mk >/dev/null 2>&1; then
2634 if [ -z "$MAKE" ]; then
2635 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2636 echo >&2 "Cannot proceed."
2639 # export MAKE, we need it later in the config.tests
2645 #-------------------------------------------------------------------------------
2646 # auto-detect all that hasn't been specified in the arguments
2647 #-------------------------------------------------------------------------------
2649 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2650 if [ "$CFG_EMBEDDED" != "no" ]; then
2651 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2653 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2654 if [ -z "$XPLATFORM" ]; then
2655 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2656 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2660 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2661 if [ -z "$XPLATFORM" ]; then
2662 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2663 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2667 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2668 if [ -z "$XPLATFORM" ]; then
2669 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2670 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2674 if [ -z "$PLATFORM" ]; then
2675 case "$UNAME_MACHINE" in
2677 PLATFORM=qws/linux-x86-g++
2680 PLATFORM=qws/linux-x86_64-g++
2683 PLATFORM=qws/linux-generic-g++
2687 if [ -z "$XPLATFORM" ]; then
2688 if [ "$CFG_EMBEDDED" = "auto" ]; then
2689 if [ -n "$CFG_ARCH" ]; then
2690 CFG_EMBEDDED=$CFG_ARCH
2692 case "$UNAME_MACHINE" in
2700 CFG_EMBEDDED=generic
2705 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2709 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2710 if [ -z "$XPLATFORM" ]; then
2711 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2712 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2716 if [ -z "$XPLATFORM" ]; then
2721 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2728 if [ -z "$PLATFORM" ]; then
2730 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2732 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2734 # PLATFORM=macx-xcode
2741 #PLATFORM=aix-g++-64
2743 #PLATFORM=aix-xlc-64
2745 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2755 # PLATFORM=dynix-g++
2761 PLATFORM=freebsd-g++
2763 - Also available for FreeBSD: freebsd-icc
2767 PLATFORM=openbsd-g++
2778 #PLATFORM=irix-cc-64
2780 - Also available for IRIX: irix-g++ irix-cc-64
2784 case "$UNAME_MACHINE" in
2786 #PLATFORM=hpuxi-acc-32
2787 PLATFORM=hpuxi-acc-64
2789 - Also available for HP-UXi: hpuxi-acc-32
2795 #PLATFORM=hpux-acc-64
2797 #PLATFORM=hpux-acc-o64
2799 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2808 - Also available for Tru64: tru64-g++
2812 case "$UNAME_MACHINE" in
2814 PLATFORM=linux-g++-64
2821 - Also available for Linux: linux-kcc linux-icc linux-cxx
2825 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2826 PLATFORM="solaris-g++"
2828 #PLATFORM=solaris-g++
2830 #PLATFORM=solaris-cc64
2833 - Also available for Solaris: solaris-g++ solaris-cc-64
2836 ReliantUNIX-*:*|SINIX-*:*)
2837 PLATFORM=reliant-cds
2838 #PLATFORM=reliant-cds-64
2840 - Also available for Reliant UNIX: reliant-cds-64
2850 #PLATFORM=unixware-g++
2851 PLATFORM=unixware-cc
2853 - Also available for OpenUNIX: unixware-g++
2857 #PLATFORM=unixware-g++
2858 PLATFORM=unixware-cc
2860 - Also available for UnixWare: unixware-g++
2867 - Also available for SCO OpenServer: sco-g++
2871 PLATFORM=unixware-g++
2874 PLATFORM=unsupported/qnx-g++
2877 if [ "$OPT_HELP" != "yes" ]; then
2879 for p in $PLATFORMS; do
2880 echo " $relconf $* -platform $p"
2883 echo " The build script does not currently recognize all" >&2
2884 echo " platforms supported by Qt." >&2
2885 echo " Rerun this script with a -platform option listed to" >&2
2886 echo " set the system/compiler combination you use." >&2
2893 if [ "$PLATFORM_QWS" = "yes" ]; then
2895 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2897 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2900 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2902 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2903 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2905 if [ -d "$PLATFORM" ]; then
2906 QMAKESPEC="$PLATFORM"
2908 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2910 if [ -d "$XPLATFORM" ]; then
2911 XQMAKESPEC="$XPLATFORM"
2913 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2915 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2916 QT_CROSS_COMPILE=yes
2917 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2920 if [ "$PLATFORM_MAC" = "yes" ]; then
2921 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2923 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2924 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2925 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2926 echo " built with 'macx-g++'" >&2
2932 # check specified platforms are supported
2933 if [ '!' -d "$QMAKESPEC" ]; then
2935 echo " The specified system/compiler is not supported:"
2939 echo " Please see the README file for a complete list."
2943 if [ '!' -d "$XQMAKESPEC" ]; then
2945 echo " The specified system/compiler is not supported:"
2949 echo " Please see the README file for a complete list."
2953 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2955 echo " The specified system/compiler port is not complete:"
2957 echo " $XQMAKESPEC/qplatformdefs.h"
2959 echo " Please contact qt-info@nokia.com."
2964 # now look at the configs and figure out what platform we are config'd for
2965 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2966 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2968 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2970 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2971 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2972 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2973 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2974 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2978 #-------------------------------------------------------------------------------
2979 # determine the system architecture
2980 #-------------------------------------------------------------------------------
2981 if [ "$OPT_VERBOSE" = "yes" ]; then
2982 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2985 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2986 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2988 echo "You have specified a target architecture with -embedded and -arch."
2989 echo "The two architectures you have specified are different, so we can"
2990 echo "not proceed. Either set both to be the same, or only use -embedded."
2996 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2997 case `basename "$XPLATFORM"` in
3000 echo "You are not licensed for Qt for `basename $XPLATFORM`."
3002 echo "Please contact qt-info@nokia.com to upgrade your license to"
3003 echo "include this platform, or install the Qt Open Source Edition"
3004 echo "if you intend to develop free software."
3010 if [ -z "${CFG_HOST_ARCH}" ]; then
3011 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
3013 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
3014 case "$CFG_HOST_ARCH" in
3019 if [ "$OPT_VERBOSE" = "yes" ]; then
3020 echo " GNU/Hurd ($CFG_HOST_ARCH)"
3024 CFG_HOST_ARCH=`uname -p`
3025 if [ "$OPT_VERBOSE" = "yes" ]; then
3026 echo " SGI ($CFG_HOST_ARCH)"
3030 case "$UNAME_MACHINE" in
3032 if [ "$OPT_VERBOSE" = "yes" ]; then
3033 echo " Sun SPARC (sparc)"
3040 if [ "$OPT_VERBOSE" = "yes" ]; then
3041 echo " 64-bit AMD 80x86 (x86_64)"
3043 CFG_HOST_ARCH=x86_64
3046 if [ "$OPT_VERBOSE" = "yes" ]; then
3047 echo " 32-bit Intel 80x86 (i386)"
3055 case "$UNAME_MACHINE" in
3057 if [ "$OPT_VERBOSE" = "yes" ]; then
3058 echo " 32-bit Apple PowerPC (powerpc)"
3062 if [ "$OPT_VERBOSE" = "yes" ]; then
3063 echo " 32-bit Intel 80x86 (i386)"
3067 CFG_HOST_ARCH=macosx
3070 if [ "$OPT_VERBOSE" = "yes" ]; then
3071 echo " 64-bit IBM PowerPC (powerpc)"
3073 CFG_HOST_ARCH=powerpc
3076 if [ "$OPT_VERBOSE" = "yes" ]; then
3077 echo " HP PA-RISC (parisc)"
3079 CFG_HOST_ARCH=parisc
3082 if [ "$OPT_VERBOSE" = "yes" ]; then
3083 echo " 32-bit Intel 80x86 (i386)"
3087 *:*:x86_64|*:*:amd64)
3088 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3089 if [ "$OPT_VERBOSE" = "yes" ]; then
3090 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3094 if [ "$OPT_VERBOSE" = "yes" ]; then
3095 echo " 64-bit AMD 80x86 (x86_64)"
3097 CFG_HOST_ARCH=x86_64
3101 if [ "$OPT_VERBOSE" = "yes" ]; then
3102 echo " 32-bit PowerPC (powerpc)"
3104 CFG_HOST_ARCH=powerpc
3107 if [ "$OPT_VERBOSE" = "yes" ]; then
3108 echo " 64-bit PowerPC (powerpc)"
3110 CFG_HOST_ARCH=powerpc
3113 if [ "$OPT_VERBOSE" = "yes" ]; then
3114 echo " IBM S/390 (s390)"
3119 if [ "$OPT_VERBOSE" = "yes" ]; then
3125 if [ "$OPT_VERBOSE" = "yes" ]; then
3126 echo " Linux on SPARC"
3131 case "$UNAME_MACHINE" in
3133 if [ "$OPT_VERBOSE" = "yes" ]; then
3134 echo " QNX on Intel 80x86 (i386)"
3141 if [ "$OPT_VERBOSE" = "yes" ]; then
3142 echo " Trying '$UNAME_MACHINE'..."
3144 CFG_HOST_ARCH="$UNAME_MACHINE"
3149 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3150 if [ -n "$CFG_ARCH" ]; then
3151 CFG_EMBEDDED=$CFG_ARCH
3154 case "$CFG_EMBEDDED" in
3177 CFG_ARCH="$CFG_EMBEDDED"
3180 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3181 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3182 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3183 CFG_ARCH=$CFG_HOST_ARCH
3190 # previously, armv6 was a different arch
3196 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3197 if [ "$OPT_VERBOSE" = "yes" ]; then
3198 echo " '$CFG_ARCH' is supported"
3201 if [ "$OPT_VERBOSE" = "yes" ]; then
3202 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3206 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3207 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3208 if [ "$OPT_VERBOSE" = "yes" ]; then
3209 echo " '$CFG_HOST_ARCH' is supported"
3212 if [ "$OPT_VERBOSE" = "yes" ]; then
3213 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3215 CFG_HOST_ARCH=generic
3219 if [ "$OPT_VERBOSE" = "yes" ]; then
3220 echo "System architecture: '$CFG_ARCH'"
3221 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3222 echo "Host architecture: '$CFG_HOST_ARCH'"
3226 #-------------------------------------------------------------------------------
3227 # tests that don't need qmake (must be run before displaying help)
3228 #-------------------------------------------------------------------------------
3230 # detect build style
3231 if [ "$CFG_DEBUG" = "auto" ]; then
3232 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3233 CFG_DEBUG_RELEASE=yes
3235 elif [ "$CFG_DEV" = "yes" ]; then
3236 CFG_DEBUG_RELEASE=no
3239 CFG_DEBUG_RELEASE=no
3243 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3244 QT_CONFIG="$QT_CONFIG build_all"
3247 if [ -z "$PKG_CONFIG" ]; then
3248 # See if PKG_CONFIG is set in the mkspec:
3249 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3251 if [ -z "$PKG_CONFIG" ]; then
3252 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3255 # Work out if we can use pkg-config
3256 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3257 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3259 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3260 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3261 echo >&2 "environment!"
3263 if [ -z "$PKG_CONFIG_PATH" ]; then
3265 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3266 echo >&2 "the host compiler's .pc files will be used. This is probably"
3267 echo >&2 "not what you want."
3269 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3271 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3272 echo >&2 "been set. This means your toolchain's .pc files must contain"
3273 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3274 echo >&2 "tests are failing, please check these files."
3279 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3280 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3281 echo >&2 "dependencies"
3287 if [ ! -n "$PKG_CONFIG" ]; then
3288 QT_CONFIG="$QT_CONFIG no-pkg-config"
3291 # process CFG_MAC_ARCHS
3292 if [ "$PLATFORM_MAC" = "yes" ]; then
3293 # check -arch arguments for validity.
3294 ALLOWED="x86 ppc x86_64 ppc64 i386"
3295 # Save the list so we can re-write it using only valid values
3296 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3298 for i in $CFG_MAC_ARCHS_IN
3300 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3301 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3304 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3305 # These are synonymous values
3306 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3307 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3308 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3310 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3311 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3316 # pass on $CFG_SDK to the configure tests.
3317 if [ '!' -z "$CFG_SDK" ]; then
3318 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3321 # find the default framework value
3322 if [ "$CFG_ARCH" = "macosx" ]; then
3323 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3324 CFG_FRAMEWORK="$CFG_SHARED"
3325 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3327 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3335 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3336 TEST_COMPILER="$CXX"
3338 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3339 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3340 if [ -z "$TEST_COMPILER" ]; then
3341 echo "ERROR: Cannot set the compiler for the configuration tests"
3346 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3347 TEST_COMPILER="nacl-gcc"
3351 if [ -n "$CFG_SYSROOT" ]; then
3352 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3353 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3354 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3356 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3360 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3362 # auto-detect precompiled header support
3363 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3364 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3366 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3371 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3373 echo "WARNING: Using universal binaries disables precompiled headers."
3378 #auto-detect DWARF2 on the mac
3379 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3380 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3387 # auto-detect support for -Xarch on the mac
3388 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3389 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3396 # don't autodetect support for separate debug info on objcopy when
3397 # cross-compiling as lots of toolchains seems to have problems with this
3398 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3399 CFG_SEPARATE_DEBUG_INFO="no"
3402 # auto-detect support for separate debug info in objcopy
3403 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3404 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3405 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3406 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3407 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3408 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3409 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3410 CFG_SEPARATE_DEBUG_INFO=no
3414 # binutils on HP-UX is buggy; default to no.
3415 CFG_SEPARATE_DEBUG_INFO=no
3418 CFG_SEPARATE_DEBUG_INFO=yes
3424 # auto-detect -fvisibility support
3425 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3426 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3427 CFG_REDUCE_EXPORTS=no
3429 CFG_REDUCE_EXPORTS=yes
3433 # detect the availability of the -Bsymbolic-functions linker optimization
3434 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3435 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3436 CFG_REDUCE_RELOCATIONS=no
3438 CFG_REDUCE_RELOCATIONS=yes
3442 # auto-detect GNU make support
3443 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3447 # If -opengl wasn't specified, don't try to auto-detect
3448 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3453 if [ "$PLATFORM_MAC" = "yes" ]; then
3454 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3459 # find the default framework value
3460 if [ "$CFG_ARCH" = "macosx" ]; then
3461 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3462 CFG_FRAMEWORK="$CFG_SHARED"
3463 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3465 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3473 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3474 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3475 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3476 # get the darwin version. 10.0.0 and up means snow leopard.
3477 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3478 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3480 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3485 # x11 tests are done after qmake is built
3488 #setup the build parts
3489 if [ -z "$CFG_BUILD_PARTS" ]; then
3490 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3492 # don't build tools by default when cross-compiling
3493 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3494 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3497 for nobuild in $CFG_NOBUILD_PARTS; do
3498 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3500 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3502 # echo "WARNING: libs is a required part of the build."
3504 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3507 #-------------------------------------------------------------------------------
3508 # post process QT_INSTALL_* variables
3509 #-------------------------------------------------------------------------------
3511 if [ -z "$QT_INSTALL_PREFIX" ]; then
3512 if [ "$CFG_DEV" = "yes" ]; then
3513 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3515 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3518 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3520 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3521 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3522 if [ "$PLATFORM_MAC" = "yes" ]; then
3523 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3526 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3529 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3531 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3532 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3533 if [ "$PLATFORM_MAC" = "yes" ]; then
3534 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3539 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3542 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3544 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3545 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3546 if [ "$PLATFORM_MAC" = "yes" ]; then
3547 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3548 QT_INSTALL_LIBS="/Libraries/Frameworks"
3552 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3554 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3556 if [ -z "$QT_INSTALL_BINS" ]; then #default
3557 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3558 if [ "$PLATFORM_MAC" = "yes" ]; then
3559 QT_INSTALL_BINS="/Developer/Applications/Qt"
3562 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3564 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3566 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3567 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3568 if [ "$PLATFORM_MAC" = "yes" ]; then
3569 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3572 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3574 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3576 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3577 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3578 if [ "$PLATFORM_MAC" = "yes" ]; then
3579 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3582 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3584 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3586 if [ -z "$QT_INSTALL_DATA" ]; then #default
3587 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3589 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3591 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3592 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3594 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3596 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3597 if [ "$PLATFORM_MAC" = "yes" ]; then
3598 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3600 QT_INSTALL_SETTINGS=/etc/xdg
3603 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3605 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3606 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3607 if [ "$PLATFORM_MAC" = "yes" ]; then
3608 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3611 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3613 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3616 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3617 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3618 if [ "$PLATFORM_MAC" = "yes" ]; then
3619 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3622 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3624 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3626 #-------------------------------------------------------------------------------
3627 # help - interactive parts of the script _after_ this section please
3628 #-------------------------------------------------------------------------------
3630 # next, emit a usage message if something failed.
3631 if [ "$OPT_HELP" = "yes" ]; then
3632 [ "x$ERROR" = "xyes" ] && echo
3633 if [ "$CFG_NIS" = "no" ]; then
3640 if [ "$CFG_CUPS" = "no" ]; then
3647 if [ "$CFG_ICONV" = "no" ]; then
3654 if [ "$CFG_LARGEFILE" = "no" ]; then
3661 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3668 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3676 if [ "$CFG_XCB" = "no" ]; then
3684 if [ "$CFG_WAYLAND" = "no" ]; then
3691 if [ "$CFG_XINPUT2" = "no" ]; then
3700 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3701 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3702 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3703 [-release] [-debug] [-debug-and-release]
3704 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3705 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3706 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3707 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3708 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3709 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3710 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3711 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3712 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3713 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3714 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3715 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3716 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3717 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3718 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3719 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3720 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3721 [-no-openssl] [-openssl] [-openssl-linked]
3722 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3723 [-no-javascript-jit] [-javascript-jit]
3724 [-no-script] [-script] [-no-scripttools] [-scripttools]
3725 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3726 [-no-location] [-location]
3727 [additional platform specific options (see below)]
3730 Installation options:
3732 -qpa ................ This will enable the QPA build.
3733 QPA is a window system agnostic implementation of Qt.
3735 These are optional, but you may specify install directories.
3737 -prefix <dir> ...... This will install everything relative to <dir>
3738 (default $QT_INSTALL_PREFIX)
3740 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3743 -hostprefix [dir] .. Tools and libraries needed when developing
3744 applications are installed in [dir]. If [dir] is
3745 not given, the current build directory will be used.
3750 * -prefix-install .... Force a sandboxed "local" installation of
3751 Qt. This will install into
3752 $QT_INSTALL_PREFIX, if this option is
3753 disabled then some platforms will attempt a
3754 "system" install by placing default values to
3755 be placed in a system location other than
3758 You may use these to separate different parts of the install:
3760 -bindir <dir> ......... Executables will be installed to <dir>
3761 (default PREFIX/bin)
3762 -libdir <dir> ......... Libraries will be installed to <dir>
3763 (default PREFIX/lib)
3764 -docdir <dir> ......... Documentation will be installed to <dir>
3765 (default PREFIX/doc)
3766 -headerdir <dir> ...... Headers will be installed to <dir>
3767 (default PREFIX/include)
3768 -plugindir <dir> ...... Plugins will be installed to <dir>
3769 (default PREFIX/plugins)
3770 -importdir <dir> ...... Imports for QML will be installed to <dir>
3771 (default PREFIX/imports)
3772 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3774 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3775 (default PREFIX/translations)
3776 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3777 (default PREFIX/etc/settings)
3778 -examplesdir <dir> .... Examples will be installed to <dir>
3779 (default PREFIX/examples)
3780 -testsdir <dir> ....... Tests will be installed to <dir>
3781 (default PREFIX/tests)
3785 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3786 that needs to be evaluated. If the evaluation succeeds, the feature is
3787 included. Here is a short explanation of each option:
3789 * -release ........... Compile and link Qt with debugging turned off.
3790 -debug ............. Compile and link Qt with debugging turned on.
3791 -debug-and-release . Compile and link two versions of Qt, with and without
3792 debugging turned on (Mac only).
3794 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3796 -opensource ........ Compile and link the Open-Source Edition of Qt.
3797 -commercial ........ Compile and link the Commercial Edition of Qt.
3800 * -shared ............ Create and use shared Qt libraries.
3801 -static ............ Create and use static Qt libraries.
3803 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3805 -fast .............. Configure Qt quickly by generating Makefiles only for
3806 library and subdirectory targets. All other Makefiles
3807 are created as wrappers, which will in turn run qmake.
3809 -no-largefile ...... Disables large file support.
3810 + -largefile ......... Enables Qt to access files larger than 4 GB.
3813 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3820 if [ "$CFG_DBUS" = "no" ]; then
3829 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3830 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3832 -no-accessibility .. Do not compile Accessibility support.
3833 * -accessibility ..... Compile Accessibility support.
3835 $SHN -no-stl ............ Do not compile STL support.
3836 $SHY -stl ............... Compile STL support.
3838 -no-sql-<driver> ... Disable SQL <driver> entirely.
3839 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3841 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3844 Possible values for <driver>:
3845 [ $CFG_SQL_AVAILABLE ]
3847 -system-sqlite ..... Use sqlite from the operating system.
3849 -no-qt3support ..... Disables the Qt 3 support functionality.
3850 * -qt3support ........ Enables the Qt 3 support functionality.
3852 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3853 + -xmlpatterns ....... Build the QtXmlPatterns module.
3854 QtXmlPatterns is built if a decent C++ compiler
3855 is used and exceptions are enabled.
3857 -no-multimedia ..... Do not build the QtMultimedia module.
3858 + -multimedia ........ Build the QtMultimedia module.
3860 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3861 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3863 -no-phonon ......... Do not build the Phonon module.
3864 + -phonon ............ Build the Phonon module.
3865 Phonon is built if a decent C++ compiler is used.
3866 -no-phonon-backend.. Do not build the platform phonon plugin.
3867 + -phonon-backend..... Build the platform phonon plugin.
3869 -no-svg ............ Do not build the SVG module.
3870 + -svg ............... Build the SVG module.
3872 -no-webkit ......... Do not build the WebKit module.
3873 + -webkit ............ Build the WebKit module.
3874 WebKit is built if a decent C++ compiler is used.
3875 -webkit-debug ...... Build the WebKit module with debug symbols.
3877 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3878 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3880 -no-script ......... Do not build the QtScript module.
3881 + -script ............ Build the QtScript module.
3883 -no-scripttools .... Do not build the QtScriptTools module.
3884 + -scripttools ....... Build the QtScriptTools module.
3886 -no-v8 ............. Do not build the V8 module.
3887 + -v8 ................ Build the V8 module.
3889 -no-declarative ..... Do not build the declarative module.
3890 + -declarative ....... Build the declarative module.
3892 -no-declarative-debug ..... Do not build the declarative debugging support.
3893 + -declarative-debug ....... Build the declarative debugging support.
3895 -no-location ....... Do not build the QtLocation module.
3896 + -location .......... Build the QtLocation module.
3898 -platform target ... The operating system and compiler you are building
3901 See the README file for a list of supported
3902 operating systems and compilers.
3905 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3907 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3908 raster - Software rasterizer
3909 opengl - Rendering via OpenGL, Experimental!
3910 openvg - Rendering via OpenVG, Experimental!
3917 -no-mmx ............ Do not compile with use of MMX instructions.
3918 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3919 -no-sse ............ Do not compile with use of SSE instructions.
3920 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3921 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3922 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3923 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3924 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3925 -no-avx ............ Do not compile with use of AVX instructions.
3926 -no-neon ........... Do not compile with use of NEON instructions.
3928 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3929 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3931 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3933 -D <string> ........ Add an explicit define to the preprocessor.
3934 -I <string> ........ Add an explicit include path.
3935 -L <string> ........ Add an explicit library path.
3937 -help, -h .......... Display this information.
3939 Third Party Libraries:
3941 -qt-zlib ........... Use the zlib bundled with Qt.
3942 + -system-zlib ....... Use zlib from the operating system.
3943 See http://www.gzip.org/zlib
3945 -no-gif ............ Do not compile GIF reading support.
3947 -no-libtiff ........ Do not compile TIFF support.
3948 -qt-libtiff ........ Use the libtiff bundled with Qt.
3949 + -system-libtiff .... Use libtiff from the operating system.
3950 See http://www.libtiff.org
3952 -no-libpng ......... Do not compile PNG support.
3953 -qt-libpng ......... Use the libpng bundled with Qt.
3954 + -system-libpng ..... Use libpng from the operating system.
3955 See http://www.libpng.org/pub/png
3957 -no-libmng ......... Do not compile MNG support.
3958 -qt-libmng ......... Use the libmng bundled with Qt.
3959 + -system-libmng ..... Use libmng from the operating system.
3960 See http://www.libmng.com
3962 -no-libjpeg ........ Do not compile JPEG support.
3963 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3964 + -system-libjpeg .... Use libjpeg from the operating system.
3965 See http://www.ijg.org
3967 -no-openssl ........ Do not compile support for OpenSSL.
3968 + -openssl ........... Enable run-time OpenSSL support.
3969 -openssl-linked .... Enabled linked OpenSSL support.
3973 -make <part> ....... Add part to the list of parts to be built at make time.
3974 ($QT_DEFAULT_BUILD_PARTS)
3975 -nomake <part> ..... Exclude part from the list of parts to be built.
3977 -R <string> ........ Add an explicit runtime library path to the Qt
3979 -l <string> ........ Add an explicit library.
3981 -no-rpath .......... Do not use the library install path as a runtime
3983 + -rpath ............. Link Qt libraries and executables using the library
3984 install path as a runtime library path. Equivalent
3985 to -R install_libpath
3987 -continue .......... Continue as far as possible if an error occurs.
3989 -verbose, -v ....... Print verbose information about each step of the
3992 -silent ............ Reduce the build output so that warnings and errors
3993 can be seen more easily.
3995 * -no-optimized-qmake ... Do not build qmake optimized.
3996 -optimized-qmake ...... Build qmake optimized.
3998 -no-gui ............ Don't build the Qt GUI library
4000 $NSN -no-nis ............ Do not compile NIS support.
4001 $NSY -nis ............... Compile NIS support.
4003 $CUN -no-cups ........... Do not compile CUPS support.
4004 $CUY -cups .............. Compile CUPS support.
4005 Requires cups/cups.h and libcups.so.2.
4007 $CIN -no-iconv .......... Do not compile support for iconv(3).
4008 $CIY -iconv ............. Compile support for iconv(3).
4010 $PHN -no-pch ............ Do not use precompiled header support.
4011 $PHY -pch ............... Use precompiled header support.
4013 $DBN -no-dbus ........... Do not compile the QtDBus module.
4014 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
4015 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
4017 -reduce-relocations ..... Reduce relocations in the libraries through extra
4018 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
4019 experimental; needs GNU ld >= 2.18).
4021 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
4025 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
4026 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
4033 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4041 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4045 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4046 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4048 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
4049 $XCBY -xcb ............... Compile Xcb support.
4051 $XWN -no-wayland......... Do not compile Wayland support.
4052 $XWY -wayland .......... Compile Wayland support.
4058 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4062 $X2N -no-xinput2......... Do not compile XInput2 support.
4063 $X2Y -xinput2............ Compile XInput2 support.
4069 if [ "$PLATFORM_X11" = "yes" ]; then
4070 if [ "$CFG_SM" = "no" ]; then
4077 if [ "$CFG_XSHAPE" = "no" ]; then
4084 if [ "$CFG_XVIDEO" = "no" ]; then
4091 if [ "$CFG_XINERAMA" = "no" ]; then
4098 if [ "$CFG_FONTCONFIG" = "no" ]; then
4105 if [ "$CFG_XCURSOR" = "no" ]; then
4112 if [ "$CFG_XFIXES" = "no" ]; then
4119 if [ "$CFG_XRANDR" = "no" ]; then
4126 if [ "$CFG_XRENDER" = "no" ]; then
4133 if [ "$CFG_MITSHM" = "no" ]; then
4140 if [ "$CFG_XINPUT" = "no" ]; then
4147 if [ "$CFG_XKB" = "no" ]; then
4154 if [ "$CFG_IM" = "no" ]; then
4165 -no-gtkstyle ....... Do not build the GTK theme integration.
4166 + -gtkstyle .......... Build the GTK theme integration.
4168 * -no-nas-sound ...... Do not compile in NAS sound support.
4169 -system-nas-sound .. Use NAS libaudio from the operating system.
4170 See http://radscan.com/nas.html
4172 -egl ............... Use EGL instead of GLX to manage contexts.
4173 When building for desktop OpenGL, this option will
4174 make Qt use EGL to manage contexts rather than the
4175 GLX, which is the default. Note: For OpenGL ES, EGL
4178 -no-opengl ......... Do not support OpenGL.
4179 + -opengl <api> ...... Enable OpenGL support.
4180 With no parameter, this will auto-detect the "best"
4181 OpenGL API to use. If desktop OpenGL is available, it
4182 will be used. Use desktop or es2 for <api>
4183 to force the use of the Desktop OpenGL or
4184 OpenGL ES 2 APIs instead.
4186 -no-openvg ........ Do not support OpenVG.
4187 + -openvg ........... Enable OpenVG support.
4188 Requires EGL support, typically supplied by an OpenGL
4189 or other graphics implementation.
4191 $SMN -no-sm ............. Do not support X Session Management.
4192 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4194 $SHN -no-xshape ......... Do not compile XShape support.
4195 $SHY -xshape ............ Compile XShape support.
4196 Requires X11/extensions/shape.h.
4198 $XVN -no-xvideo ......... Do not compile XVideo support.
4199 $XVY -xvideo ............ Compile XVideo support.
4200 Requires X11/extensions/Xv.h & Xvlib.h.
4202 $SHN -no-xsync .......... Do not compile XSync support.
4203 $SHY -xsync ............. Compile XSync support.
4204 Requires X11/extensions/sync.h.
4206 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4207 $XAY -xinerama .......... Compile Xinerama support.
4208 Requires X11/extensions/Xinerama.h and libXinerama.
4209 By default, Xinerama support will be compiled if
4210 available and the shared libraries are dynamically
4213 $XCN -no-xcursor ........ Do not compile Xcursor support.
4214 $XCY -xcursor ........... Compile Xcursor support.
4215 Requires X11/Xcursor/Xcursor.h and libXcursor.
4216 By default, Xcursor support will be compiled if
4217 available and the shared libraries are dynamically
4220 $XFN -no-xfixes ......... Do not compile Xfixes support.
4221 $XFY -xfixes ............ Compile Xfixes support.
4222 Requires X11/extensions/Xfixes.h and libXfixes.
4223 By default, Xfixes support will be compiled if
4224 available and the shared libraries are dynamically
4227 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4228 $XZY -xrandr ............ Compile Xrandr support.
4229 Requires X11/extensions/Xrandr.h and libXrandr.
4231 $XRN -no-xrender ........ Do not compile Xrender support.
4232 $XRY -xrender ........... Compile Xrender support.
4233 Requires X11/extensions/Xrender.h and libXrender.
4235 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4236 $XMY -mitshm ............ Compile MIT-SHM support.
4237 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4239 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4240 $FCGY -fontconfig ........ Compile FontConfig support.
4241 Requires fontconfig/fontconfig.h, libfontconfig,
4242 freetype.h and libfreetype.
4244 $XIN -no-xinput ......... Do not compile Xinput support.
4245 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4246 which requires IRIX with wacom.h and libXi or
4247 XFree86 with X11/extensions/XInput.h and libXi.
4249 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4250 $XKY -xkb ............... Compile XKB support.
4255 if [ "$PLATFORM_MAC" = "yes" ]; then
4260 -Fstring ........... Add an explicit framework path.
4261 -fw string ......... Add an explicit framework.
4263 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4265 -carbon .............Build the Carbon version of Qt. 64-bit archs
4266 are not supported by carbon and will be built
4269 * -framework ......... Build Qt as a series of frameworks and
4270 link tools against those frameworks.
4271 -no-framework ...... Do not build Qt as a series of frameworks.
4273 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4274 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4276 -universal ......... Equivalent to -arch "ppc x86"
4278 -arch <arch> ....... Build Qt for <arch>
4279 Example values for <arch>: x86 ppc x86_64 ppc64
4280 Multiple -arch arguments can be specified.
4282 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4283 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4285 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4286 It is only available to Cocoa builds.
4287 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4288 QT_ENABLE_HARFBUZZ environment variable.
4293 if [ "$PLATFORM_QWS" = "yes" ]; then
4295 Qt for Embedded Linux:
4297 -embedded <arch> .... This will enable the embedded build, you must have a
4298 proper license for this switch to work.
4299 Example values for <arch>: arm mips x86 generic
4303 if [ "$PLATFORM_QPA" = "yes" ]; then
4309 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4312 -xplatform target ... The target platform when cross-compiling.
4314 -no-feature-<feature> Do not compile in <feature>.
4315 -feature-<feature> .. Compile in <feature>. The available features
4316 are described in src/corelib/global/qfeatures.txt
4318 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4319 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4321 The floating point format is usually autodetected by configure. Use this
4322 to override the detected value.
4324 -little-endian ...... Target platform is little endian (LSB first).
4325 -big-endian ......... Target platform is big endian (MSB first).
4327 -host-little-endian . Host platform is little endian (LSB first).
4328 -host-big-endian .... Host platform is big endian (MSB first).
4330 You only need to specify the endianness when
4331 cross-compiling, otherwise the host
4332 endianness will be used.
4334 -no-freetype ........ Do not compile in Freetype2 support.
4335 -qt-freetype ........ Use the libfreetype bundled with Qt.
4336 * -system-freetype .... Use libfreetype from the operating system.
4337 See http://www.freetype.org/
4339 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4340 default ($CFG_QCONFIG).
4342 -no-opengl .......... Do not support OpenGL.
4343 -opengl <api> ....... Enable OpenGL ES support
4344 With no parameter, this will attempt to auto-detect
4345 OpenGL ES 2, or regular desktop OpenGL.
4346 Use es2 for <api> to override auto-detection.
4350 if [ "$PLATFORM_QWS" = "yes" ]; then
4353 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4354 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4356 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4357 by default all available decorations are on.
4358 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4359 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4360 linked to at run time.
4361 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4362 -no-decoration-<style> ....Disable decoration <style> entirely.
4363 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4365 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4366 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4367 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4368 linked to at run time.
4369 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4370 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4371 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4373 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4374 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4376 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4378 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4380 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4381 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4383 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4384 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4385 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4387 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4388 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4389 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4391 -iwmmxt ............ Compile using the iWMMXt instruction set
4392 (available on some XScale CPUs).
4396 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4397 if [ "$CFG_GLIB" = "no" ]; then
4405 $GBN -no-glib ........... Do not compile Glib support.
4406 $GBY -glib .............. Compile Glib support.
4411 [ "x$ERROR" = "xyes" ] && exit 1
4416 # -----------------------------------------------------------------------------
4417 # LICENSING, INTERACTIVE PART
4418 # -----------------------------------------------------------------------------
4420 if [ "$PLATFORM_QWS" = "yes" ]; then
4421 Platform="Qt for Embedded Linux"
4422 elif [ "$PLATFORM_QPA" = "yes" ]; then
4423 Platform="Qt Lighthouse"
4424 elif [ "$PLATFORM_MAC" = "yes" ]; then
4425 Platform="Qt for Mac OS X"
4426 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4427 Platform="Qt for Windows"
4428 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4430 Platform="Qt for Linux/X11"
4434 echo "This is the $Platform ${EditionString} Edition."
4437 if [ "$Edition" = "NokiaInternalBuild" ]; then
4438 echo "Detected -nokia-developer option"
4439 echo "Nokia employees and agents are allowed to use this software under"
4440 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4441 elif [ "$Edition" = "OpenSource" ]; then
4443 echo "You are licensed to use this software under the terms of"
4444 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4445 if [ -f "$relpath/LICENSE.GPL3" ]; then
4446 echo "You are also licensed to use this software under the terms of"
4447 echo "the GNU General Public License (GPL) versions 3."
4453 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4454 echo "You have already accepted the terms of the $LicenseType license."
4457 if [ -f "$relpath/LICENSE.GPL3" ]; then
4458 echo "Type '3' to view the GNU General Public License version 3."
4460 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4461 echo "Type 'yes' to accept this license offer."
4462 echo "Type 'no' to decline this license offer."
4464 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4468 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4470 elif [ "$acceptance" = "no" ]; then
4471 echo "You are not licensed to use this software."
4474 elif [ "$acceptance" = "3" ]; then
4475 more "$relpath/LICENSE.GPL3"
4476 elif [ "$acceptance" = "L" ]; then
4477 more "$relpath/LICENSE.LGPL"
4480 elif [ "$Edition" = "Preview" ]; then
4481 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4484 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4485 echo "You have already accepted the terms of the $LicenseType license."
4488 echo "You are licensed to use this software under the terms of"
4489 echo "the $TheLicense"
4491 echo "Type '?' to read the Preview License."
4492 echo "Type 'yes' to accept this license offer."
4493 echo "Type 'no' to decline this license offer."
4495 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4499 if [ "$acceptance" = "yes" ]; then
4501 elif [ "$acceptance" = "no" ] ;then
4502 echo "You are not licensed to use this software."
4505 elif [ "$acceptance" = "?" ]; then
4506 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4509 elif [ "$Edition" != "OpenSource" ]; then
4510 if [ -n "$ExpiryDate" ]; then
4511 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4512 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4513 Today=`date +%Y%m%d`
4514 if [ "$Today" -gt "$ExpiryDate" ]; then
4515 case "$LicenseType" in
4516 Commercial|Academic|Educational)
4517 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4519 echo "NOTICE NOTICE NOTICE NOTICE"
4521 echo " Your support and upgrade period has expired."
4523 echo " You are no longer licensed to use this version of Qt."
4524 echo " Please contact qt-info@nokia.com to renew your support"
4525 echo " and upgrades for this license."
4527 echo "NOTICE NOTICE NOTICE NOTICE"
4532 echo "WARNING WARNING WARNING WARNING"
4534 echo " Your support and upgrade period has expired."
4536 echo " You may continue to use your last licensed release"
4537 echo " of Qt under the terms of your existing license"
4538 echo " agreement. But you are not entitled to technical"
4539 echo " support, nor are you entitled to use any more recent"
4540 echo " Qt releases."
4542 echo " Please contact qt-info@nokia.com to renew your"
4543 echo " support and upgrades for this license."
4545 echo "WARNING WARNING WARNING WARNING"
4552 echo "NOTICE NOTICE NOTICE NOTICE"
4554 echo " Your Evaluation license has expired."
4556 echo " You are no longer licensed to use this software. Please"
4557 echo " contact qt-info@nokia.com to purchase license, or install"
4558 echo " the Qt Open Source Edition if you intend to develop free"
4561 echo "NOTICE NOTICE NOTICE NOTICE"
4568 TheLicense=`head -n 1 "$outpath/LICENSE"`
4570 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4571 echo "You have already accepted the terms of the $TheLicense."
4574 echo "You are licensed to use this software under the terms of"
4575 echo "the $TheLicense."
4577 echo "Type '?' to view the $TheLicense."
4578 echo "Type 'yes' to accept this license offer."
4579 echo "Type 'no' to decline this license offer."
4581 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4585 if [ "$acceptance" = "yes" ]; then
4587 elif [ "$acceptance" = "no" ]; then
4588 echo "You are not licensed to use this software."
4591 else [ "$acceptance" = "?" ]
4592 more "$outpath/LICENSE"
4597 # this should be moved somewhere else
4600 AIX_VERSION=`uname -v`
4601 if [ "$AIX_VERSION" -lt "5" ]; then
4602 QMakeVar add QMAKE_LIBS_X11 -lbind
4609 #-------------------------------------------------------------------------------
4610 # generate qconfig.cpp
4611 #-------------------------------------------------------------------------------
4612 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4614 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4615 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4616 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4617 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4618 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4619 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4620 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4621 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4622 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4623 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4624 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4625 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4626 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4627 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4629 TODAY=`date +%Y-%m-%d`
4630 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4632 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4633 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4635 /* Installation date */
4636 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4640 if [ ! -z "$QT_HOST_PREFIX" ]; then
4641 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4642 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4643 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4644 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4645 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4646 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4647 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4648 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4649 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4650 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4651 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4652 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4654 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4656 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4657 /* Installation Info */
4658 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4659 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4660 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4661 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4662 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4663 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4664 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4665 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4666 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4667 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4668 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4669 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4670 #else // QT_BOOTSTRAPPED
4674 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4675 /* Installation Info */
4676 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4677 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4678 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4679 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4680 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4681 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4682 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4683 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4684 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4685 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4686 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4687 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4690 if [ ! -z "$QT_HOST_PREFIX" ]; then
4691 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4692 #endif // QT_BOOTSTRAPPED
4697 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4698 /* strlen( "qt_lcnsxxxx" ) == 12 */
4699 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4700 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4701 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4702 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4703 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4704 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4705 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4706 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4707 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4708 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4709 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4710 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4711 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4712 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4715 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4716 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4717 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4719 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4720 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4721 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4724 # -----------------------------------------------------------------------------
4725 if [ "$LicenseType" = "Evaluation" ]; then
4726 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4727 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4728 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4731 if [ -n "$EVALKEY" ]; then
4732 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4733 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4734 /* Evaluation license key */
4735 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4737 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4741 # -----------------------------------------------------------------------------
4743 # -----------------------------------------------------------------------------
4746 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4748 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4749 if [ "$OPT_SHADOW" = "yes" ]; then
4750 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4751 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4752 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4757 # $2: optional transformation
4758 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4759 # is where the resulting variable is written to
4760 # Assumes that the optional transformation produces the same variable name for each hit
4761 setBootstrapVariable()
4763 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4769 valStart = index($0, "=") + 1
4772 if (substr($0, valStart - 2, 1) == "+") {
4776 variable = substr($0, 0, valStart - 2 - append)
4777 value = substr($0, valStart)
4778 gsub("[ \t]+", "", variable)
4779 gsub("^[ \t]+", "", value)
4780 gsub("[ \t]+$", "", value)
4782 if (append == 1 && length(combinedValue) > 0) {
4783 combinedValue = combinedValue " " value
4785 combinedValue = value
4789 if (length(combinedValue) > 0) {
4790 printf "%s = %s\n", variable, combinedValue
4796 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4797 echo "Creating qmake. Please wait..."
4800 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4801 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4802 if [ -f "$QCONFIG_H" ]; then
4803 OLD_QCONFIG_H=$QCONFIG_H
4804 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4807 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4808 # when building qmake, we use #defines for the install paths,
4809 # however they are real functions in the library
4810 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4811 mkdir -p "$outpath/src/corelib/global"
4812 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4813 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4816 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4818 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4819 rm -rf mkspecs/default
4820 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4822 for mkfile in GNUmakefile Makefile; do
4825 in_mkfile="${mkfile}.in"
4826 if [ "$mkfile" = "Makefile" ]; then
4827 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4828 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4830 in_mkfile="${mkfile}.unix"
4832 in_mkfile="$relpath/qmake/$in_mkfile"
4833 mkfile="$outpath/qmake/$mkfile"
4834 if [ -f "$mkfile" ]; then
4835 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4838 [ -f "$in_mkfile" ] || continue
4840 echo "########################################################################" > "$mkfile"
4841 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4842 echo "########################################################################" >> "$mkfile"
4845 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4846 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4847 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4849 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4850 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4853 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4854 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4855 if [ "$CFG_SILENT" = "yes" ]; then
4856 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4857 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4859 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4860 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4862 setBootstrapVariable QMAKE_CFLAGS
4863 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4864 setBootstrapVariable QMAKE_LFLAGS
4866 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4867 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4868 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4870 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4871 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4872 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4873 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4874 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4875 elif [ "$CFG_DEBUG" = "yes" ]; then
4876 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4877 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4878 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4879 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4882 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4883 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4884 for rpath in $RPATH_FLAGS; do
4885 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4888 if [ "$BUILD_ON_MAC" = "yes" ]; then
4889 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4890 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4891 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4892 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4893 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4894 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4895 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4896 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4897 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4898 X86_CFLAGS="-arch i386"
4899 X86_LFLAGS="-arch i386"
4900 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4901 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4902 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4904 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4905 PPC_CFLAGS="-arch ppc"
4906 PPC_LFLAGS="-arch ppc"
4907 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4908 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4909 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4911 if [ '!' -z "$CFG_SDK" ]; then
4912 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4913 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4914 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4915 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4916 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4919 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4920 if [ '!' -z "$D_FLAGS" ]; then
4921 for DEF in $D_FLAGS; do
4922 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4925 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4926 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4927 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4928 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4930 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4931 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4932 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4933 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4934 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4935 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4936 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4937 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4938 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4939 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4941 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4942 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4943 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4944 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4949 QMAKE_BUILD_ERROR=no
4950 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4951 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4952 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4953 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4956 #-------------------------------------------------------------------------------
4957 # tests that need qmake
4958 #-------------------------------------------------------------------------------
4960 # detect availability of float math.h functions
4961 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4962 CFG_USE_FLOATMATH=yes
4964 CFG_USE_FLOATMATH=no
4967 # detect mmx support
4968 if [ "${CFG_MMX}" = "auto" ]; then
4969 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4976 # detect 3dnow support
4977 if [ "${CFG_3DNOW}" = "auto" ]; then
4978 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4985 # detect sse support
4986 if [ "${CFG_SSE}" = "auto" ]; then
4987 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4994 # detect sse2 support
4995 if [ "${CFG_SSE2}" = "auto" ]; then
4996 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
5003 # detect sse3 support
5004 if [ "${CFG_SSE3}" = "auto" ]; then
5005 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
5012 # detect ssse3 support
5013 if [ "${CFG_SSSE3}" = "auto" ]; then
5014 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
5021 # detect sse4.1 support
5022 if [ "${CFG_SSE4_1}" = "auto" ]; then
5023 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
5030 # detect sse4.2 support
5031 if [ "${CFG_SSE4_2}" = "auto" ]; then
5032 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
5039 # detect avx support
5040 if [ "${CFG_AVX}" = "auto" ]; then
5041 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5048 # check iWMMXt support
5049 if [ "$CFG_IWMMXT" = "yes" ]; then
5050 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5051 if [ $? != "0" ]; then
5052 echo "The iWMMXt functionality test failed!"
5053 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5058 # detect neon support
5059 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5060 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
5067 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5070 if [ "$CFG_ZLIB" = "no" ]; then
5071 # Note: Qt no longer support builds without zlib
5072 # So we force a "no" to be "auto" here.
5073 # If you REALLY really need no zlib support, you can still disable
5074 # it by doing the following:
5075 # add "no-zlib" to mkspecs/qconfig.pri
5076 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5078 # There's no guarantee that Qt will build under those conditions
5083 if [ "$CFG_ZLIB" = "auto" ]; then
5084 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
5091 if [ "$CFG_LARGEFILE" = "auto" ]; then
5092 #Large files should be enabled for all Linux systems
5096 # detect how jpeg should be built
5097 if [ "$CFG_JPEG" = "auto" ]; then
5098 if [ "$CFG_SHARED" = "yes" ]; then
5105 if [ "$CFG_LIBJPEG" = "auto" ]; then
5106 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
5113 # detect how gif should be built
5114 if [ "$CFG_GIF" = "auto" ]; then
5115 if [ "$CFG_SHARED" = "yes" ]; then
5122 # detect how tiff should be built
5123 if [ "$CFG_TIFF" = "auto" ]; then
5124 if [ "$CFG_SHARED" = "yes" ]; then
5132 if [ "$CFG_LIBTIFF" = "auto" ]; then
5133 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
5140 # detect how mng should be built
5141 if [ "$CFG_MNG" = "auto" ]; then
5142 if [ "$CFG_SHARED" = "yes" ]; then
5149 if [ "$CFG_LIBMNG" = "auto" ]; then
5150 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
5158 if [ "$CFG_LIBPNG" = "auto" ]; then
5159 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
5166 # detect accessibility
5167 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5168 CFG_ACCESSIBILITY=yes
5171 # auto-detect SQL-modules support
5172 for _SQLDR in $CFG_SQL_AVAILABLE; do
5175 if [ "$CFG_SQL_mysql" != "no" ]; then
5176 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5177 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5178 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5179 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5180 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5181 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5182 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5184 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5185 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5186 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5187 echo " You need MySql 4 or higher."
5188 echo " If you believe this message is in error you may use the continue"
5189 echo " switch (-continue) to $0 to continue."
5194 QT_LFLAGS_MYSQL_R=""
5198 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
5199 QMakeVar add CONFIG use_libmysqlclient_r
5200 if [ "$CFG_SQL_mysql" = "auto" ]; then
5201 CFG_SQL_mysql=plugin
5203 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5204 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
5205 if [ "$CFG_SQL_mysql" = "auto" ]; then
5206 CFG_SQL_mysql=plugin
5209 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5210 echo "MySQL support cannot be enabled due to functionality tests!"
5211 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5212 echo " If you believe this message is in error you may use the continue"
5213 echo " switch (-continue) to $0 to continue."
5218 QT_LFLAGS_MYSQL_R=""
5226 if [ "$CFG_SQL_psql" != "no" ]; then
5227 # Be careful not to use native pg_config when cross building.
5228 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5229 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5230 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5232 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5233 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5234 # But, respect PSQL_LIBS if set
5235 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5236 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
5237 if [ "$CFG_SQL_psql" = "auto" ]; then
5241 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5242 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5243 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5244 echo " If you believe this message is in error you may use the continue"
5245 echo " switch (-continue) to $0 to continue."
5256 if [ "$CFG_SQL_odbc" != "no" ]; then
5257 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
5258 if [ "$CFG_SQL_odbc" = "auto" ]; then
5262 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
5263 QT_LFLAGS_ODBC="-liodbc"
5264 if [ "$CFG_SQL_odbc" = "auto" ]; then
5268 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5269 echo "ODBC support cannot be enabled due to functionality tests!"
5270 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5271 echo " If you believe this message is in error you may use the continue"
5272 echo " switch (-continue) to $0 to continue."
5282 if [ "$CFG_SQL_oci" != "no" ]; then
5283 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
5284 if [ "$CFG_SQL_oci" = "auto" ]; then
5288 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5289 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5290 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5291 echo " If you believe this message is in error you may use the continue"
5292 echo " switch (-continue) to $0 to continue."
5301 if [ "$CFG_SQL_tds" != "no" ]; then
5302 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5303 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5304 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
5305 if [ "$CFG_SQL_tds" = "auto" ]; then
5309 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5310 echo "TDS support cannot be enabled due to functionality tests!"
5311 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5312 echo " If you believe this message is in error you may use the continue"
5313 echo " switch (-continue) to $0 to continue."
5322 if [ "$CFG_SQL_db2" != "no" ]; then
5323 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
5324 if [ "$CFG_SQL_db2" = "auto" ]; then
5328 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5329 echo "ODBC support cannot be enabled due to functionality tests!"
5330 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5331 echo " If you believe this message is in error you may use the continue"
5332 echo " switch (-continue) to $0 to continue."
5341 if [ "$CFG_SQL_ibase" != "no" ]; then
5342 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
5343 if [ "$CFG_SQL_ibase" = "auto" ]; then
5344 CFG_SQL_ibase=plugin
5347 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5348 echo "InterBase support cannot be enabled due to functionality tests!"
5349 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5350 echo " If you believe this message is in error you may use the continue"
5351 echo " switch (-continue) to $0 to continue."
5360 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5361 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
5362 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5363 CFG_SQL_sqlite2=plugin
5366 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5367 echo "SQLite2 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."
5379 if [ "$CFG_SQL_sqlite" != "no" ]; then
5380 SQLITE_AUTODETECT_FAILED="no"
5381 if [ "$CFG_SQLITE" = "system" ]; then
5382 if [ -n "$PKG_CONFIG" ]; then
5383 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5384 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5386 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
5387 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5388 CFG_SQL_sqlite=plugin
5390 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5392 SQLITE_AUTODETECT_FAILED="yes"
5395 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5396 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5397 CFG_SQL_sqlite=plugin
5400 SQLITE_AUTODETECT_FAILED="yes"
5404 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5405 echo "SQLite support cannot be enabled due to functionality tests!"
5406 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5407 echo " If you believe this message is in error you may use the continue"
5408 echo " switch (-continue) to $0 to continue."
5414 if [ "$OPT_VERBOSE" = "yes" ]; then
5415 echo "unknown SQL driver: $_SQLDR"
5421 # auto-detect NIS support
5422 if [ "$CFG_NIS" != "no" ]; then
5423 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
5426 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5427 echo "NIS support cannot be enabled due to functionality tests!"
5428 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5429 echo " If you believe this message is in error you may use the continue"
5430 echo " switch (-continue) to $0 to continue."
5438 # auto-detect CUPS support
5439 if [ "$CFG_CUPS" != "no" ]; then
5440 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
5443 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5444 echo "Cups support cannot be enabled due to functionality tests!"
5445 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5446 echo " If you believe this message is in error you may use the continue"
5447 echo " switch (-continue) to $0 to continue."
5455 # auto-detect iconv(3) support
5456 if [ "$CFG_ICONV" != "no" ]; then
5457 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5459 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
5461 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
5463 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
5466 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5467 echo "Iconv support cannot be enabled due to functionality tests!"
5468 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5469 echo " If you believe this message is in error you may use the continue"
5470 echo " switch (-continue) to $0 to continue."
5478 # auto-detect libdbus-1 support
5479 if [ "$CFG_DBUS" != "no" ]; then
5480 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5481 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5482 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5484 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
5485 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5486 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5487 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5489 if [ "$CFG_DBUS" = "auto" ]; then
5491 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5492 # CFG_DBUS is "yes" or "linked" here
5494 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5495 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5496 echo " If you believe this message is in error you may use the continue"
5497 echo " switch (-continue) to $0 to continue."
5503 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5504 CFG_MULTIMEDIA="$CFG_GUI"
5507 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5508 echo "QtMultimedia requested, but it can't be built without QtGui"
5512 # Generate a CRC of the namespace for using in constants for the Carbon port.
5513 # This should mean that you really *can* load two Qt's and have our custom
5514 # Carbon events work.
5515 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5516 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`
5519 # X11/QWS/Lighthouse
5520 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5522 # auto-detect Glib support
5523 if [ "$CFG_GLIB" != "no" ]; then
5524 if [ -n "$PKG_CONFIG" ]; then
5525 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5526 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5528 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
5530 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5531 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5533 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5534 echo "Glib support cannot be enabled due to functionality tests!"
5535 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5536 echo " If you believe this message is in error you may use the continue"
5537 echo " switch (-continue) to $0 to continue."
5545 if [ "$CFG_GUI" = "no" ]; then
5546 if [ "$CFG_PHONON" = "auto" ]; then
5549 if [ "$CFG_PHONON" != "no" ]; then
5550 echo "Phonon enabled, but GUI disabled."
5551 echo " You might need to either enable the GUI or disable Phonon"
5556 # Auto-detect GStreamer support (needed for Phonon)
5557 if [ "$CFG_PHONON" != "no" ]; then
5558 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5559 if [ -n "$PKG_CONFIG" ]; then
5560 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5561 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5563 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
5565 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5566 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5568 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5569 echo "Gstreamer support cannot be enabled due to functionality tests!"
5570 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5571 echo " If you believe this message is in error you may use the continue"
5572 echo " switch (-continue) to $0 to continue."
5578 elif [ "$CFG_GLIB" = "no" ]; then
5585 if [ "$CFG_PHONON" != "no" ]; then
5586 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5587 if [ "$CFG_GSTREAMER" = "yes" ]; then
5590 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5591 echo "Phonon support cannot be enabled due to functionality tests!"
5592 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5593 echo " If you believe this message is in error you may use the continue"
5594 echo " switch (-continue) to $0 to continue."
5605 # auto-detect icd support
5606 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5607 if [ -n "$PKG_CONFIG" ]; then
5608 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5609 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5611 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
5612 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5613 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5614 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5616 if [ "$CFG_ICD" = "auto" ]; then
5618 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5621 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5622 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5623 echo " If you believe this message is in error you may use the continue"
5624 echo " switch (-continue) to $0 to continue."
5628 elif [ "$CFG_GLIB" = "no" ]; then
5632 # auto-detect libicu support
5633 if [ "$CFG_ICU" != "no" ]; then
5634 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5635 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5637 if [ "$CFG_ICU" = "auto" ]; then
5639 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5642 echo "The ICU library support cannot be enabled."
5643 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5644 echo " If you believe this message is in error you may use the continue"
5645 echo " switch (-continue) to $0 to continue."
5651 # Auto-detect PulseAudio support
5652 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5653 if [ -n "$PKG_CONFIG" ]; then
5654 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5655 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5657 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
5659 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5660 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5662 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5663 echo "PulseAudio support cannot be enabled due to functionality tests!"
5664 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5665 echo " If you believe this message is in error you may use the continue"
5666 echo " switch (-continue) to $0 to continue."
5673 fi # X11/QWS/Lighthouse
5676 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5677 x11tests="$relpath/config.tests/x11"
5680 # work around broken X11 headers when using GCC 2.95 or later
5682 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5683 if [ $NOTYPE = "yes" ]; then
5684 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5685 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5688 # Check we actually have X11 :-)
5689 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5690 if [ $? != "0" ]; then
5691 echo "Basic XLib functionality test failed!"
5692 echo " You might need to modify the include and library search paths by editing"
5693 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5699 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5700 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5701 if [ "$CFG_GUI" = "no" ]; then
5702 if [ "$CFG_OPENGL" = "auto" ]; then
5705 if [ "$CFG_OPENGL" != "no" ]; then
5706 echo "OpenGL enabled, but GUI disabled."
5707 echo " You might need to either enable the GUI or disable OpenGL"
5711 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5712 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
5714 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
5716 if [ "$CFG_EGL" = "no" ]; then
5720 if [ "$CFG_OPENGL" = "yes" ]; then
5721 echo "All the OpenGL functionality tests failed!"
5722 echo " You might need to modify the include and library search paths by editing"
5723 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5724 echo " ${XQMAKESPEC}."
5731 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5732 if [ "$CFG_OPENGL" = "desktop" ]; then
5733 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5734 if [ $? != "0" ]; then
5735 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5742 elif [ "$CFG_OPENGL" = "es2" ]; then
5744 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5745 if [ $? != "0" ]; then
5746 echo "The OpenGL ES 2.0 functionality test failed!"
5747 echo " You might need to modify the include and library search paths by editing"
5748 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5749 echo " ${XQMAKESPEC}."
5752 elif [ "$CFG_OPENGL" = "desktop" ]; then
5753 # Desktop OpenGL support
5754 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5755 if [ $? != "0" ]; then
5756 echo "The OpenGL functionality test failed!"
5757 echo " You might need to modify the include and library search paths by editing"
5758 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5759 echo " ${XQMAKESPEC}."
5764 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5765 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5766 if [ $? != "0" ]; then
5767 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5775 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5776 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5777 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5778 CFG_GRAPHICS_SYSTEM=default
5780 fi # X11/MINGW OpenGL
5783 if [ "$PLATFORM_X11" = "yes" ]; then
5784 # auto-detect Xcursor support
5785 if [ "$CFG_XCURSOR" != "no" ]; then
5786 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
5787 if [ "$CFG_XCURSOR" != "runtime" ]; then
5791 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5792 echo "Xcursor support cannot be enabled due to functionality tests!"
5793 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5794 echo " If you believe this message is in error you may use the continue"
5795 echo " switch (-continue) to $0 to continue."
5803 # auto-detect Xfixes support
5804 if [ "$CFG_XFIXES" != "no" ]; then
5805 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5806 if [ "$CFG_XFIXES" != "runtime" ]; then
5810 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5811 echo "Xfixes support cannot be enabled due to functionality tests!"
5812 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5813 echo " If you believe this message is in error you may use the continue"
5814 echo " switch (-continue) to $0 to continue."
5822 # auto-detect Xrandr support (resize and rotate extension)
5823 if [ "$CFG_XRANDR" != "no" ]; then
5824 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
5825 if [ "$CFG_XRANDR" != "runtime" ]; then
5829 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5830 echo "Xrandr support cannot be enabled due to functionality tests!"
5831 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5832 echo " If you believe this message is in error you may use the continue"
5833 echo " switch (-continue) to $0 to continue."
5841 # auto-detect Xrender support
5842 if [ "$CFG_XRENDER" != "no" ]; then
5843 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
5846 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5847 echo "Xrender support cannot be enabled due to functionality tests!"
5848 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5849 echo " If you believe this message is in error you may use the continue"
5850 echo " switch (-continue) to $0 to continue."
5858 # Additional check to decide if WebKit support will be included
5859 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5860 echo "Warning: -no-xrender will disable the QtWebkit module."
5864 # auto-detect MIT-SHM support
5865 if [ "$CFG_MITSHM" != "no" ]; then
5866 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
5869 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5870 echo "MITSHM support cannot be enabled due to functionality tests!"
5871 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5872 echo " If you believe this message is in error you may use the continue"
5873 echo " switch (-continue) to $0 to continue."
5881 # auto-detect FontConfig support
5882 if [ "$CFG_FONTCONFIG" != "no" ]; then
5883 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5884 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5885 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5887 QT_CFLAGS_FONTCONFIG=
5888 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5890 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
5892 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5893 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5894 CFG_LIBFREETYPE=system
5896 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5897 echo "FontConfig support cannot be enabled due to functionality tests!"
5898 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5899 echo " If you believe this message is in error you may use the continue"
5900 echo " switch (-continue) to $0 to continue."
5908 # auto-detect Session Management support
5909 if [ "$CFG_SM" = "auto" ]; then
5910 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
5913 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5914 echo "Session Management support cannot be enabled due to functionality tests!"
5915 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5916 echo " If you believe this message is in error you may use the continue"
5917 echo " switch (-continue) to $0 to continue."
5925 # auto-detect SHAPE support
5926 if [ "$CFG_XSHAPE" != "no" ]; then
5927 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
5930 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5931 echo "XShape support cannot be enabled due to functionality tests!"
5932 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5933 echo " If you believe this message is in error you may use the continue"
5934 echo " switch (-continue) to $0 to continue."
5942 # auto-detect XVideo support
5943 if [ "$CFG_XVIDEO" != "no" ]; then
5944 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
5947 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5948 echo "XVideo support cannot be enabled due to functionality tests!"
5949 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5950 echo " If you believe this message is in error you may use the continue"
5951 echo " switch (-continue) to $0 to continue."
5959 # auto-detect XSync support
5960 if [ "$CFG_XSYNC" != "no" ]; then
5961 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
5964 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5965 echo "XSync support cannot be enabled due to functionality tests!"
5966 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5967 echo " If you believe this message is in error you may use the continue"
5968 echo " switch (-continue) to $0 to continue."
5976 # auto-detect Xinerama support
5977 if [ "$CFG_XINERAMA" != "no" ]; then
5978 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
5979 if [ "$CFG_XINERAMA" != "runtime" ]; then
5983 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5984 echo "Xinerama support cannot be enabled due to functionality tests!"
5985 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5986 echo " If you believe this message is in error you may use the continue"
5987 echo " switch (-continue) to $0 to continue."
5995 # auto-detect Xinput support
5996 if [ "$CFG_XINPUT" != "no" ]; then
5997 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
5998 if [ "$CFG_XINPUT" != "runtime" ]; then
6002 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6003 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
6004 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6005 echo " If you believe this message is in error you may use the continue"
6006 echo " switch (-continue) to $0 to continue."
6014 # auto-detect XKB support
6015 if [ "$CFG_XKB" != "no" ]; then
6016 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
6019 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6020 echo "XKB support cannot be enabled due to functionality tests!"
6021 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6022 echo " If you believe this message is in error you may use the continue"
6023 echo " switch (-continue) to $0 to continue."
6031 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
6032 if [ -n "$PKG_CONFIG" ]; then
6033 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
6034 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
6036 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
6038 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
6039 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
6041 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6042 echo "Gtk theme support cannot be enabled due to functionality tests!"
6043 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6044 echo " If you believe this message is in error you may use the continue"
6045 echo " switch (-continue) to $0 to continue."
6051 elif [ "$CFG_GLIB" = "no" ]; then
6057 if [ "$PLATFORM_MAC" = "yes" ]; then
6058 if [ "$CFG_PHONON" != "no" ]; then
6059 # Always enable Phonon (unless it was explicitly disabled)
6063 if [ "$CFG_COREWLAN" = "auto" ]; then
6064 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
6073 if [ "$PLATFORM_QPA" = "yes" ]; then
6074 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6075 if [ "$CFG_ARCH" = "macosx" ]; then
6077 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6078 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
6080 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
6083 if [ "$CFG_OPENGL" = "yes" ]; then
6084 echo "All the OpenGL functionality tests failed!"
6085 echo " You might need to modify the include and library search paths by editing"
6086 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6087 echo " ${XQMAKESPEC}."
6092 elif [ "$CFG_OPENGL" = "es2" ]; then
6094 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6095 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6096 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6097 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6098 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6099 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6100 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6101 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6104 "$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
6105 if [ $? != "0" ]; then
6106 echo "The OpenGL ES 2.0 functionality test failed!"
6107 echo " You might need to modify the include and library search paths by editing"
6108 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6109 echo " ${XQMAKESPEC}."
6112 elif [ "$CFG_OPENGL" = "desktop" ]; then
6113 # Desktop OpenGL support
6114 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6115 if [ $? != "0" ]; then
6116 echo "The OpenGL functionality test failed!"
6117 echo " You might need to modify the include and library search paths by editing"
6118 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6119 echo " ${XQMAKESPEC}."
6124 # auto-detect FontConfig support
6125 if [ "$CFG_FONTCONFIG" != "no" ]; then
6126 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6127 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6128 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6130 QT_CFLAGS_FONTCONFIG=
6131 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6133 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
6134 QT_CONFIG="$QT_CONFIG fontconfig"
6135 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6136 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6137 CFG_LIBFREETYPE=system
6142 # Save these for a check later
6143 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6144 ORIG_CFG_XCB="$CFG_XCB"
6146 if [ "$CFG_WAYLAND" != "no" ]; then
6147 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6148 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6149 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6150 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6151 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6153 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
6155 QT_CONFIG="$QT_CONFIG wayland"
6156 elif [ "$CFG_WAYLAND" = "yes" ]; then
6157 echo "The Wayland functionality test failed!"
6161 QMakeVar add DEFINES QT_NO_WAYLAND
6165 # Check we actually have X11 :-)
6166 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
6167 QT_CONFIG="$QT_CONFIG xlib"
6170 if [ "$CFG_XCB" != "no" ]; then
6171 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6173 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
6174 QT_CONFIG="$QT_CONFIG xcb-render"
6177 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
6179 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6182 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
6183 QT_CONFIG="$QT_CONFIG xcb-xlib"
6186 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6187 # auto-detect XInput2/Xinput support
6188 if [ "$CFG_XINPUT2" != "no" ]; then
6189 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
6193 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6194 echo "XInput2 support cannot be enabled due to functionality tests!"
6195 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6196 echo " If you believe this message is in error you may use the continue"
6197 echo " switch (-continue) to $0 to continue."
6206 if [ "$CFG_XCB" = "yes" ]; then
6207 echo "The XCB test failed!"
6208 echo " You might need to install dependency packages."
6209 echo " See src/plugins/platforms/xcb/README."
6213 QMakeVar add DEFINES QT_NO_XCB
6217 # Detect libxkbcommon
6218 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6219 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6220 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6221 if [ "$CFG_WAYLAND" = "yes" ]; then
6222 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6223 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6225 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6226 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6228 if [ "$CFG_WAYLAND" = "yes" ]; then
6229 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6231 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6234 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6235 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6236 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6237 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6238 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6239 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6240 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6243 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6244 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6245 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6246 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6249 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
6250 QT_CONFIG="$QT_CONFIG coreservices"
6252 QMakeVar add DEFINES QT_NO_CORESERVICES
6255 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6256 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6257 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6258 echo "No QPA platform plugin enabled!"
6259 echo " If you really want to build without a QPA platform plugin you must pass"
6260 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6261 echo " cannot run GUI applications."
6271 if [ "$PLATFORM_QWS" = "yes" ]; then
6273 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6274 if [ "$CFG_GUI" = "no" ]; then
6275 if [ "$CFG_OPENGL" = "auto" ]; then
6278 if [ "$CFG_OPENGL" != "no" ]; then
6279 echo "OpenGL enabled, but GUI disabled."
6280 echo " You might need to either enable the GUI or disable OpenGL"
6284 if [ "$CFG_OPENGL" = "yes" ]; then
6286 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
6289 elif [ "$CFG_OPENGL" = "es2" ]; then
6291 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6292 if [ $? != "0" ]; then
6293 echo "The OpenGL ES 2.0 functionality test failed!"
6294 echo " You might need to modify the include and library search paths by editing"
6295 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6296 echo " ${XQMAKESPEC}."
6300 elif [ "$CFG_OPENGL" = "desktop" ]; then
6301 # Desktop OpenGL support
6302 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6307 if [ "$PLATFORM_QWS" = "yes" ]; then
6310 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6311 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6312 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6313 if [ $? != "0" ]; then
6314 echo "The Ahi screen driver functionality test failed!"
6315 echo " You might need to modify the include and library search paths by editing"
6316 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6317 echo " ${XQMAKESPEC}."
6322 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6323 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6324 if [ $? != "0" ]; then
6325 echo "The SVGAlib screen driver functionality test failed!"
6326 echo " You might need to modify the include and library search paths by editing"
6327 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6328 echo " ${XQMAKESPEC}."
6333 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6334 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6335 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6336 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6337 elif directfb-config --version >/dev/null 2>&1; then
6338 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6339 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6342 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6343 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6344 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6345 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6348 "$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
6349 if [ $? != "0" ]; then
6350 echo "The DirectFB screen driver functionality test failed!"
6351 echo " You might need to modify the include and library search paths by editing"
6352 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6353 echo " ${XQMAKESPEC}."
6361 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6362 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6363 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6364 if [ $? != "0" ]; then
6365 echo "The tslib functionality test failed!"
6366 echo " You might need to modify the include and library search paths by editing"
6367 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6368 echo " ${XQMAKESPEC}."
6377 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6378 if [ $? != "0" ]; then
6379 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6386 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6387 if [ "$CFG_EGL" != "no" ]; then
6388 # detect EGL support
6389 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
6390 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6395 if [ "$EGL_VARIANT" = "none" ]; then
6396 if [ "$CFG_EGL" = "yes" ]; then
6397 echo "The EGL functionality test failed!"
6398 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6399 echo " You might need to modify the include and library search paths by editing"
6400 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6401 echo " ${XQMAKESPEC}."
6405 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6406 if [ "$CFG_OPENGL" = "es2" ]; then
6413 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6416 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6417 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6418 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6419 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6420 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
6421 CFG_LIBFREETYPE=system
6427 if [ "$CFG_ENDIAN" = "auto" ]; then
6428 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6429 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6430 elif [ "$PLATFORM_MAC" = "yes" ]; then
6433 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6435 if [ "$F" -eq 0 ]; then
6436 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6437 elif [ "$F" -eq 1 ]; then
6438 CFG_ENDIAN="Q_BIG_ENDIAN"
6441 echo "The target system byte order could not be detected!"
6442 echo "Turn on verbose messaging (-v) to see the final report."
6443 echo "You can use the -little-endian or -big-endian switch to"
6444 echo "$0 to continue."
6450 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6451 if [ "$PLATFORM_MAC" = "yes" ]; then
6454 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6456 if [ "$F" -eq 0 ]; then
6457 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6458 elif [ "$F" -eq 1 ]; then
6459 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6462 echo "The host system byte order could not be detected!"
6463 echo "Turn on verbose messaging (-v) to see the final report."
6464 echo "You can use the -host-little-endian or -host-big-endian switch to"
6465 echo "$0 to continue."
6471 if [ "$CFG_ARMFPA" != "auto" ]; then
6472 if [ "$CFG_ARMFPA" = "yes" ]; then
6473 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6474 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6476 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6479 CFG_DOUBLEFORMAT="normal"
6484 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6485 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6486 CFG_DOUBLEFORMAT=normal
6488 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6490 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6491 CFG_DOUBLEFORMAT=normal
6492 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6493 CFG_DOUBLEFORMAT=normal
6494 elif [ "$F" -eq 10 ]; then
6495 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6496 elif [ "$F" -eq 11 ]; then
6497 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6498 elif [ "$F" -eq 12 ]; then
6499 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6501 elif [ "$F" -eq 13 ]; then
6502 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6506 echo "The system floating point format could not be detected."
6507 echo "This may cause data to be generated in a wrong format"
6508 echo "Turn on verbose messaging (-v) to see the final report."
6509 # we do not fail on this since this is a new test, and if it fails,
6510 # the old behavior should be correct in most cases
6511 CFG_DOUBLEFORMAT=normal
6517 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6521 if [ "$CFG_STL" != "no" ]; then
6522 if [ "$HAVE_STL" = "yes" ]; then
6525 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6526 echo "STL support cannot be enabled due to functionality tests!"
6527 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6528 echo " If you believe this message is in error you may use the continue"
6529 echo " switch (-continue) to $0 to continue."
6537 # detect POSIX clock_gettime()
6538 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6539 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
6540 CFG_CLOCK_GETTIME=yes
6542 CFG_CLOCK_GETTIME=no
6546 # detect POSIX monotonic clocks
6547 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6548 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
6549 CFG_CLOCK_MONOTONIC=yes
6551 CFG_CLOCK_MONOTONIC=no
6553 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6554 CFG_CLOCK_MONOTONIC=no
6558 if [ "$CFG_MREMAP" = "auto" ]; then
6559 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6566 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6567 if [ "$CFG_GETADDRINFO" != "no" ]; then
6568 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6571 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6572 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6573 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6574 echo " If you believe this message is in error you may use the continue"
6575 echo " switch (-continue) to $0 to continue."
6583 # find if the platform provides inotify
6584 if [ "$CFG_INOTIFY" != "no" ]; then
6585 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6588 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6589 echo "inotify support cannot be enabled due to functionality tests!"
6590 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6591 echo " If you believe this message is in error you may use the continue"
6592 echo " switch (-continue) to $0 to continue."
6600 # find if the platform provides if_nametoindex (ipv6 interface name support)
6601 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6602 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
6605 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6606 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6607 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6608 echo " If you believe this message is in error you may use the continue"
6609 echo " switch (-continue) to $0 to continue."
6617 # find if the platform provides getifaddrs (network interface enumeration)
6618 if [ "$CFG_GETIFADDRS" != "no" ]; then
6619 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6622 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6623 echo "getifaddrs support cannot be enabled due to functionality tests!"
6624 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6625 echo " If you believe this message is in error you may use the continue"
6626 echo " switch (-continue) to $0 to continue."
6635 if [ "$CFG_OPENSSL" != "no" ]; then
6636 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
6637 if [ "$CFG_OPENSSL" = "auto" ]; then
6641 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6642 echo "OpenSSL support cannot be enabled due to functionality tests!"
6643 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6644 echo " If you believe this message is in error you may use the continue"
6645 echo " switch (-continue) to $0 to continue."
6653 # detect OpenVG support
6654 if [ "$CFG_OPENVG" != "no" ]; then
6655 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
6656 if [ "$CFG_OPENVG" = "auto" ]; then
6659 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
6660 if [ "$CFG_OPENVG" = "auto" ]; then
6663 CFG_OPENVG_ON_OPENGL=yes
6664 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
6665 if [ "$CFG_OPENVG" = "auto" ]; then
6668 CFG_OPENVG_LC_INCLUDES=yes
6669 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
6670 if [ "$CFG_OPENVG" = "auto" ]; then
6673 CFG_OPENVG_LC_INCLUDES=yes
6674 CFG_OPENVG_ON_OPENGL=yes
6676 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6677 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6678 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6679 echo " If you believe this message is in error you may use the continue"
6680 echo " switch (-continue) to $0 to continue."
6686 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
6687 CFG_OPENVG_SHIVA=yes
6691 # if openvg is disabled and the user specified graphicssystem vg, disable it...
6692 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
6693 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
6694 CFG_GRAPHICS_SYSTEM=default
6697 if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
6698 echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
6702 if [ "$CFG_ALSA" = "auto" ]; then
6703 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6710 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6711 if [ "$CFG_ARCH" = "arm" ]; then
6712 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6713 if [ $? != "0" ]; then
6714 CFG_JAVASCRIPTCORE_JIT=no
6717 case "$XPLATFORM" in
6719 CFG_JAVASCRIPTCORE_JIT=no
6725 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6726 QMakeVar set JAVASCRIPTCORE_JIT yes
6727 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6728 QMakeVar set JAVASCRIPTCORE_JIT no
6731 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6732 CFG_AUDIO_BACKEND=yes
6735 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6736 echo "Warning: largefile support cannot be disabled for win32."
6740 #-------------------------------------------------------------------------------
6741 # ask for all that hasn't been auto-detected or specified in the arguments
6742 #-------------------------------------------------------------------------------
6744 ### fix this: user input should be validated in a loop
6745 if [ "$PLATFORM_QWS" = "yes" ]; then
6746 PROMPT_FOR_DEPTHS="yes"
6748 PROMPT_FOR_DEPTHS="no"
6750 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6752 echo "Choose pixel-depths to support:"
6754 echo " 1. 1bpp, black/white"
6755 echo " 4. 4bpp, grayscale"
6756 echo " 8. 8bpp, paletted"
6757 echo " 12. 12bpp, rgb 4-4-4"
6758 echo " 15. 15bpp, rgb 5-5-5"
6759 echo " 16. 16bpp, rgb 5-6-5"
6760 echo " 18. 18bpp, rgb 6-6-6"
6761 echo " 24. 24bpp, rgb 8-8-8"
6762 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6763 echo " all. All supported depths"
6765 echo "Your choices (default 8,16,32):"
6767 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6768 CFG_QWS_DEPTHS=8,16,32
6771 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6772 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6773 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6775 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6777 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6778 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6783 # enable dwarf2 support on Mac
6784 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6785 QT_CONFIG="$QT_CONFIG dwarf2"
6788 # Set the default arch if there are no "-arch" arguments on the configure line
6789 # For "-carbon" builds: 32 bit x86/ppc.
6790 # For builds on snow leopard : compiler default (64-bit).
6791 # For builds on leopard : compiler default (32-bit).
6792 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6793 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6795 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6796 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6797 CFG_MAC_ARCHS=" x86"
6798 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6799 CFG_MAC_ARCHS=" ppc"
6801 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6804 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6807 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6810 # enable Cocoa and/or Carbon on Mac
6811 # -carbon on the command line disables Cocoa, except for 64-bit archs
6812 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6813 CFG_MAC_CARBON="YES"
6816 # check which archs are in use, enable cocoa if we find a 64-bit one
6817 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6818 CFG_MAC_COCOA="yes";
6819 CFG_MAC_CARBON="no";
6820 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6821 CFG_MAC_CARBON="yes";
6823 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6824 CFG_MAC_CARBON="yes";
6829 # select Carbon on 10.4 Tiger.
6830 if [ "$PLATFORM_MAC" = "yes" ]; then
6831 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6832 if [ "$VERSION" == 8 ]; then
6834 CFG_MAC_CARBON="yes";
6838 # select Carbon when using the 10.4u SDK
6839 if [ "$PLATFORM_MAC" = "yes" ]; then
6840 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6843 CFG_MAC_CARBON="yes";
6847 # but disable Cocoa if cross-building for mingw
6848 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6850 # disable Qt 3 support on VxWorks
6851 case "$XPLATFORM" in
6852 unsupported/vxworks*)
6857 # enable Qt 3 support functionality
6858 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6859 QT_CONFIG="$QT_CONFIG gui-qt3support"
6863 if [ "$CFG_PHONON" = "yes" ]; then
6864 # No longer needed after modularization
6865 #QT_CONFIG="$QT_CONFIG phonon"
6866 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6867 QT_CONFIG="$QT_CONFIG phonon-backend"
6870 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6873 # disable accessibility
6874 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6875 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6877 QT_CONFIG="$QT_CONFIG accessibility"
6880 # egl stuff does not belong in lighthouse, but rather in plugins
6881 if [ "$PLATFORM_QPA" = "yes" ]; then
6886 if [ "$CFG_EGL" = "no" ]; then
6887 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6889 QT_CONFIG="$QT_CONFIG egl"
6890 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6891 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6896 if [ "$CFG_OPENVG" = "no" ]; then
6897 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6899 QT_CONFIG="$QT_CONFIG openvg"
6900 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6901 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6903 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6904 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6906 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6907 QT_CONFIG="$QT_CONFIG shivavg"
6908 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6913 if [ "$CFG_OPENGL" = "no" ]; then
6914 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6916 QT_CONFIG="$QT_CONFIG opengl"
6919 if [ "$CFG_OPENGL" = "es2" ]; then
6920 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6923 if [ "$CFG_OPENGL" = "es2" ]; then
6924 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6925 QT_CONFIG="$QT_CONFIG opengles2"
6928 # safe execution environment
6929 if [ "$CFG_SXE" != "no" ]; then
6930 QT_CONFIG="$QT_CONFIG sxe"
6933 # build up the variables for output
6934 if [ "$CFG_DEBUG" = "yes" ]; then
6935 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6936 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6937 elif [ "$CFG_DEBUG" = "no" ]; then
6938 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6939 QMAKE_CONFIG="$QMAKE_CONFIG release"
6941 if [ "$CFG_SHARED" = "yes" ]; then
6942 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6943 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6944 elif [ "$CFG_SHARED" = "no" ]; then
6945 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6946 QMAKE_CONFIG="$QMAKE_CONFIG static"
6948 if [ "$PLATFORM_QWS" = "yes" ]; then
6949 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6950 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6951 QT_CONFIG="$QT_CONFIG embedded"
6952 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6954 if [ "$PLATFORM_QPA" = "yes" ]; then
6955 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6956 QT_CONFIG="$QT_CONFIG qpa"
6957 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6958 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6961 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6962 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6963 QT_CONFIG="$QT_CONFIG nacl pepper"
6964 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6967 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6968 # Do not set this here for Windows. Let qmake do it so
6969 # debug and release precompiled headers are kept separate.
6970 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6972 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6973 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6974 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6975 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6976 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6977 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6979 if [ "$CFG_STL" = "no" ]; then
6980 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6982 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6984 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6985 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6987 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6988 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6989 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6990 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6991 QMakeVar add QMAKE_CFLAGS -g
6992 QMakeVar add QMAKE_CXXFLAGS -g
6993 QT_CONFIG="$QT_CONFIG separate_debug_info"
6995 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6996 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6998 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6999 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
7000 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
7001 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
7002 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
7003 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
7004 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
7005 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
7006 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
7007 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
7008 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
7009 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
7010 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
7011 QT_CONFIG="$QT_CONFIG clock-gettime"
7013 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
7014 QT_CONFIG="$QT_CONFIG clock-monotonic"
7016 if [ "$CFG_MREMAP" = "yes" ]; then
7017 QT_CONFIG="$QT_CONFIG mremap"
7019 if [ "$CFG_GETADDRINFO" = "yes" ]; then
7020 QT_CONFIG="$QT_CONFIG getaddrinfo"
7022 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
7023 QT_CONFIG="$QT_CONFIG ipv6ifname"
7025 if [ "$CFG_GETIFADDRS" = "yes" ]; then
7026 QT_CONFIG="$QT_CONFIG getifaddrs"
7028 if [ "$CFG_INOTIFY" = "yes" ]; then
7029 QT_CONFIG="$QT_CONFIG inotify"
7031 if [ "$CFG_LIBJPEG" = "no" ]; then
7033 elif [ "$CFG_LIBJPEG" = "system" ]; then
7034 QT_CONFIG="$QT_CONFIG system-jpeg"
7036 if [ "$CFG_JPEG" = "no" ]; then
7037 QT_CONFIG="$QT_CONFIG no-jpeg"
7038 elif [ "$CFG_JPEG" = "yes" ]; then
7039 QT_CONFIG="$QT_CONFIG jpeg"
7041 if [ "$CFG_LIBMNG" = "no" ]; then
7043 elif [ "$CFG_LIBMNG" = "system" ]; then
7044 QT_CONFIG="$QT_CONFIG system-mng"
7046 if [ "$CFG_MNG" = "no" ]; then
7047 QT_CONFIG="$QT_CONFIG no-mng"
7048 elif [ "$CFG_MNG" = "yes" ]; then
7049 QT_CONFIG="$QT_CONFIG mng"
7051 if [ "$CFG_LIBPNG" = "no" ]; then
7054 if [ "$CFG_LIBPNG" = "system" ]; then
7055 QT_CONFIG="$QT_CONFIG system-png"
7057 if [ "$CFG_PNG" = "no" ]; then
7058 QT_CONFIG="$QT_CONFIG no-png"
7059 elif [ "$CFG_PNG" = "yes" ]; then
7060 QT_CONFIG="$QT_CONFIG png"
7062 if [ "$CFG_GIF" = "no" ]; then
7063 QT_CONFIG="$QT_CONFIG no-gif"
7064 elif [ "$CFG_GIF" = "yes" ]; then
7065 QT_CONFIG="$QT_CONFIG gif"
7067 if [ "$CFG_LIBTIFF" = "no" ]; then
7069 elif [ "$CFG_LIBTIFF" = "system" ]; then
7070 QT_CONFIG="$QT_CONFIG system-tiff"
7072 if [ "$CFG_TIFF" = "no" ]; then
7073 QT_CONFIG="$QT_CONFIG no-tiff"
7074 elif [ "$CFG_TIFF" = "yes" ]; then
7075 QT_CONFIG="$QT_CONFIG tiff"
7077 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7078 QT_CONFIG="$QT_CONFIG no-freetype"
7079 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7080 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7081 QT_CONFIG="$QT_CONFIG system-freetype"
7083 QT_CONFIG="$QT_CONFIG freetype"
7085 if [ "$CFG_GUI" = "auto" ]; then
7088 if [ "$CFG_GUI" = "no" ]; then
7089 QT_CONFIG="$QT_CONFIG no-gui"
7091 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7095 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7096 #On Mac we implicitly link against libz, so we
7097 #never use the 3rdparty stuff.
7098 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7100 if [ "$CFG_ZLIB" = "yes" ]; then
7101 QT_CONFIG="$QT_CONFIG zlib"
7102 elif [ "$CFG_ZLIB" = "system" ]; then
7103 QT_CONFIG="$QT_CONFIG system-zlib"
7106 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7107 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7108 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7109 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7110 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7111 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7112 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7113 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7114 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7115 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7116 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7117 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7118 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7119 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7120 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7122 if [ "$PLATFORM_X11" = "yes" ]; then
7123 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7125 # for some reason, the following libraries are not always built shared,
7126 # so *every* program/lib (including Qt) has to link against them
7127 if [ "$CFG_XSHAPE" = "yes" ]; then
7128 QT_CONFIG="$QT_CONFIG xshape"
7130 if [ "$CFG_XVIDEO" = "yes" ]; then
7131 QT_CONFIG="$QT_CONFIG xvideo"
7133 if [ "$CFG_XSYNC" = "yes" ]; then
7134 QT_CONFIG="$QT_CONFIG xsync"
7136 if [ "$CFG_XINERAMA" = "yes" ]; then
7137 QT_CONFIG="$QT_CONFIG xinerama"
7138 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7140 if [ "$CFG_XCURSOR" = "yes" ]; then
7141 QT_CONFIG="$QT_CONFIG xcursor"
7142 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7144 if [ "$CFG_XFIXES" = "yes" ]; then
7145 QT_CONFIG="$QT_CONFIG xfixes"
7146 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7148 if [ "$CFG_XRANDR" = "yes" ]; then
7149 QT_CONFIG="$QT_CONFIG xrandr"
7150 if [ "$CFG_XRENDER" != "yes" ]; then
7151 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7152 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7154 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7157 if [ "$CFG_XRENDER" = "yes" ]; then
7158 QT_CONFIG="$QT_CONFIG xrender"
7159 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7161 if [ "$CFG_MITSHM" = "yes" ]; then
7162 QT_CONFIG="$QT_CONFIG mitshm"
7164 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7165 QT_CONFIG="$QT_CONFIG fontconfig"
7167 if [ "$CFG_XINPUT" = "yes" ]; then
7168 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7170 if [ "$CFG_XINPUT" = "yes" ]; then
7171 QT_CONFIG="$QT_CONFIG xinput tablet"
7173 if [ "$CFG_XKB" = "yes" ]; then
7174 QT_CONFIG="$QT_CONFIG xkb"
7178 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7179 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7180 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7182 if [ "$CFG_ARCH" = "macosx" ]; then
7183 if [ "$CFG_RPATH" = "yes" ]; then
7184 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7186 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7187 if [ -n "$RPATH_FLAGS" ]; then
7189 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7193 elif [ "$CFG_RPATH" = "yes" ]; then
7194 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7198 if [ "$CFG_RPATH" = "yes" ]; then
7199 # set the default rpath to the library installation directory
7200 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7202 if [ -n "$RPATH_FLAGS" ]; then
7203 # add the user defined rpaths
7204 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7208 if [ '!' -z "$I_FLAGS" ]; then
7209 # add the user define include paths
7210 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7211 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7214 if [ '!' -z "$W_FLAGS" ]; then
7215 # add the user defined warning flags
7216 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7217 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7218 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7221 # turn off exceptions for the compilers that support it
7222 if [ "$PLATFORM_QWS" = "yes" ]; then
7223 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7224 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7225 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7227 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7229 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7233 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7234 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7237 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7238 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7239 # Follow default behavior of configure.exe by overriding with "rtti".
7240 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7243 if [ "$CFG_ALSA" = "yes" ]; then
7244 QT_CONFIG="$QT_CONFIG alsa"
7247 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7248 QT_CONFIG="$QT_CONFIG pulseaudio"
7251 if [ "$CFG_COREWLAN" = "yes" ]; then
7252 QT_CONFIG="$QT_CONFIG corewlan"
7255 if [ "$CFG_ICD" = "yes" ]; then
7256 QT_CONFIG="$QT_CONFIG icd"
7259 if [ "$CFG_ICU" = "yes" ]; then
7260 QT_CONFIG="$QT_CONFIG icu"
7263 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
7264 QT_CONFIG="$QT_CONFIG force_asserts"
7268 # Some Qt modules are too advanced in C++ for some old compilers
7269 # Detect here the platforms where they are known to work.
7271 # See Qt documentation for more information on which features are
7272 # supported and on which compilers.
7274 canBuildQtXmlPatterns="yes"
7275 canBuildWebKit="$HAVE_STL"
7276 canBuildQtConcurrent="yes"
7278 canUseV8Snapshot="yes"
7280 # WebKit requires stdint.h
7281 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7282 if [ $? != "0" ]; then
7286 case "$XPLATFORM" in
7288 # PA-RISC's assembly is too limited
7289 # gcc 3.4 on that platform can't build QtXmlPatterns
7290 # the assembly it generates cannot be compiled
7292 # Check gcc's version
7293 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7297 canBuildQtXmlPatterns="no"
7301 canBuildQtXmlPatterns="no"
7305 unsupported/vxworks-*-g++*)
7308 unsupported/vxworks-*-dcc*)
7310 canBuildQtXmlPatterns="no"
7313 # Check gcc's version
7314 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7322 canBuildQtXmlPatterns="no"
7327 # Check the compiler version
7328 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7331 canBuildQtXmlPatterns="no"
7332 canBuildQtConcurrent="no"
7336 canBuildQtConcurrent="no"
7342 canBuildQtXmlPatterns="no"
7343 canBuildQtConcurrent="no"
7349 # Get the xlC version
7350 cat > xlcver.c <<EOF
7354 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7359 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7360 xlcver=`./xlcver 2>/dev/null`
7363 if [ "$OPT_VERBOSE" = "yes" ]; then
7364 if [ -n "$xlcver" ]; then
7365 echo Found IBM xlC version: $xlcver.
7367 echo Could not determine IBM xlC version, assuming oldest supported.
7374 canBuildQtXmlPatterns="no"
7375 canBuildQtConcurrent="no"
7379 canBuildQtConcurrent="no"
7385 canBuildQtConcurrent="no"
7389 if [ "$CFG_GUI" = "no" ]; then
7390 # WebKit requires QtGui
7394 if [ "$CFG_SHARED" = "no" ]; then
7396 echo "WARNING: Using static linking will disable the WebKit module."
7401 CFG_CONCURRENT="yes"
7402 if [ "$canBuildQtConcurrent" = "no" ]; then
7403 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7406 QT_CONFIG="$QT_CONFIG concurrent"
7409 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7410 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7413 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7414 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7415 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7416 CFG_XMLPATTERNS="no"
7418 # No longer needed after modularization
7419 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7420 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7422 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7425 # No longer needed after modularization
7426 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7427 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7429 # QT_CONFIG="$QT_CONFIG multimedia"
7432 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7433 QT_CONFIG="$QT_CONFIG audio-backend"
7436 if [ "$CFG_SVG" = "auto" ]; then
7440 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7441 echo "QtSvg requested, but it can't be built without QtGui"
7445 if [ "$CFG_SVG" = "yes" ]; then
7446 QT_CONFIG="$QT_CONFIG svg"
7448 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7451 if [ "$CFG_WEBKIT" != "no" ]; then
7452 CFG_WEBKIT="$canBuildWebKit"
7455 if [ "$CFG_WEBKIT" != "no" ]; then
7456 # No longer needed after modularization
7457 #QT_CONFIG="$QT_CONFIG webkit"
7458 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7459 if [ "$CFG_WEBKIT" = "debug" ]; then
7460 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7464 if [ "$CFG_SCRIPT" = "auto" ]; then
7468 # No longer needed after modularization
7469 #if [ "$CFG_SCRIPT" = "yes" ]; then
7470 # QT_CONFIG="$QT_CONFIG script"
7472 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7475 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7476 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7479 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7480 CFG_SCRIPTTOOLS="yes"
7481 elif [ "$CFG_SCRIPT" = "no" ]; then
7482 CFG_SCRIPTTOOLS="no"
7485 # No longer needed after modularization
7486 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7487 # QT_CONFIG="$QT_CONFIG scripttools"
7489 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7494 i386|x86_64|arm|mips|macosx) ;;
7495 *) canBuildV8="no";;
7498 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7499 echo "Error: V8 was requested, but is not supported on this platform."
7503 if [ "$CFG_V8" = "auto" ]; then
7504 CFG_V8="$canBuildV8"
7507 if [ "$CFG_V8" = "no" ]; then
7508 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7510 QT_CONFIG="$QT_CONFIG v8"
7511 # Detect snapshot support
7512 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7513 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7516 *) canUseV8Snapshot="no"
7520 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7521 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7523 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7524 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7527 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7528 QT_CONFIG="$QT_CONFIG v8snapshot"
7532 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7533 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7534 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7538 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7539 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7546 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7547 # No longer needed after modularization
7548 #QT_CONFIG="$QT_CONFIG declarative"
7549 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7550 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7553 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7556 if [ "$CFG_LOCATION" = "auto" ]; then
7557 CFG_LOCATION="$CFG_GUI"
7560 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7561 echo "QtLocation requested, but it can't be built without QtGui"
7565 #Disable QtLocation until ready
7568 if [ "$CFG_LOCATION" = "no" ]; then
7569 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7572 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7575 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7576 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7577 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7582 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7583 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7584 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7591 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7594 # On Mac, set the minimum deployment target for the different architechtures
7595 # using the Xarch compiler option when supported (10.5 and up).
7596 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7597 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7598 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7599 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7600 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7601 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7603 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7604 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7605 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7606 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7607 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7609 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7610 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7611 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7612 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7613 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7615 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7616 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7617 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7618 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7619 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7626 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7628 case "$COMPILER_VERSION" in
7630 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7631 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7632 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7635 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7636 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7637 QT_GCC_PATCH_VERSION=0
7647 #-------------------------------------------------------------------------------
7648 # part of configuration information goes into qconfig.h
7649 #-------------------------------------------------------------------------------
7651 case "$CFG_QCONFIG" in
7653 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7656 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7657 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7658 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7659 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7660 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7661 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7663 echo "#endif" >>"$tmpconfig"
7667 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7671 # define QT_EDITION $QT_EDITION
7674 /* Machine byte-order */
7675 #define Q_BIG_ENDIAN 4321
7676 #define Q_LITTLE_ENDIAN 1234
7679 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7680 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7681 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7682 #if defined(__BIG_ENDIAN__)
7683 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7684 #elif defined(__LITTLE_ENDIAN__)
7685 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7687 # error "Unable to determine byte order!"
7691 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7693 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7694 if [ "$CFG_ENDIAN" = "auto" ]; then
7695 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7696 #if defined(__BIG_ENDIAN__)
7697 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7698 #elif defined(__LITTLE_ENDIAN__)
7699 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7701 # error "Unable to determine byte order!"
7705 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7707 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7709 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7710 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7711 /* Non-IEEE double format */
7712 #define Q_DOUBLE_LITTLE "01234567"
7713 #define Q_DOUBLE_BIG "76543210"
7714 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7715 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7716 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7719 if [ "$CFG_ARMFPA" = "yes" ]; then
7720 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7721 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7722 #ifndef QT_BOOTSTRAPPED
7727 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7731 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7732 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7733 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7734 /* Machine Architecture */
7735 #ifndef QT_BOOTSTRAPPED
7736 # define QT_ARCH_${CFG_ARCH_STR}
7738 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7742 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7743 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7745 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7746 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7749 # if both carbon and cocoa are specified, enable the autodetection code.
7750 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7751 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7752 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7753 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7756 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7757 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7760 if [ "$PLATFORM_MAC" = "yes" ]; then
7761 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7762 #if defined(__LP64__)
7763 # define QT_POINTER_SIZE 8
7765 # define QT_POINTER_SIZE 4
7769 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7770 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7774 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7776 if [ "$CFG_DEV" = "yes" ]; then
7777 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7780 # Embedded compile time options
7781 if [ "$PLATFORM_QWS" = "yes" ]; then
7782 # Add QWS to config.h
7783 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7785 # Add excluded decorations to $QCONFIG_FLAGS
7786 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7787 for decor in $decors; do
7788 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7789 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7792 # Figure which embedded drivers which are turned off
7793 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7794 for ADRIVER in $CFG_GFX_ON; do
7795 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7798 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7799 # the um driver is currently not in the available list for external builds
7800 if [ "$CFG_DEV" = "no" ]; then
7801 CFG_KBD_OFF="$CFG_KBD_OFF um"
7803 for ADRIVER in $CFG_KBD_ON; do
7804 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7807 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7808 for ADRIVER in $CFG_MOUSE_ON; do
7809 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7812 for DRIVER in $CFG_GFX_OFF; do
7813 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7814 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7817 for DRIVER in $CFG_KBD_OFF; do
7818 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7819 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7822 for DRIVER in $CFG_MOUSE_OFF; do
7823 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7824 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7828 if [ "$PLATFORM_QPA" = "yes" ]; then
7829 # Add QPA to config.h
7830 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7833 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7834 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7837 # Add turned on SQL drivers
7838 for DRIVER in $CFG_SQL_AVAILABLE; do
7839 eval "VAL=\$CFG_SQL_$DRIVER"
7842 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7843 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7844 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7847 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7853 QMakeVar set sql-drivers "$SQL_DRIVERS"
7854 QMakeVar set sql-plugins "$SQL_PLUGINS"
7856 # Add other configuration options to the qconfig.h file
7857 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7858 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7859 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7860 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7861 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7862 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7863 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7864 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7865 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7867 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
7868 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7869 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7870 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7871 [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
7874 # ATM we need this define to compile Qt. Remove later!
7875 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7877 # X11/Unix/Mac only configs
7878 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7879 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7880 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7881 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7882 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7883 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7884 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7885 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7886 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7887 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7888 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7889 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7890 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7891 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7892 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7894 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7895 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7896 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7897 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7898 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7899 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7900 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7901 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7902 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7903 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7904 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7905 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7906 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7908 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7909 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7910 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7911 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7912 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7913 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7914 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7915 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7916 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
7918 # sort QCONFIG_FLAGS for neatness if we can
7919 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7920 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7922 if [ -n "$QCONFIG_FLAGS" ]; then
7923 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7924 #ifndef QT_BOOTSTRAPPED
7927 for cfg in $QCONFIG_FLAGS; do
7928 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7929 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7930 # figure out define logic, so we can output the correct
7931 # ifdefs to override the global defines in a project
7933 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7934 # QT_NO_option can be forcefully turned on by QT_option
7935 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7936 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7937 # QT_option can be forcefully turned off by QT_NO_option
7938 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7941 if [ -z $cfgdNeg ]; then
7942 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7949 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7950 #if defined($cfgd) && defined($cfgdNeg)
7952 #elif !defined($cfgd) && !defined($cfgdNeg)
7959 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7960 #endif // QT_BOOTSTRAPPED
7965 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7966 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7967 #define QT_VISIBILITY_AVAILABLE
7972 if [ -n "$QT_LIBINFIX" ]; then
7973 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7974 #define QT_LIBINFIX "$QT_LIBINFIX"
7979 if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
7980 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7981 #define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
7986 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7987 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7988 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7990 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7991 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7992 chmod -w "$outpath/src/corelib/global/qconfig.h"
7993 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7994 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7998 #-------------------------------------------------------------------------------
7999 # save configuration into qconfig.pri
8000 #-------------------------------------------------------------------------------
8001 QTCONFIG="$outpath/mkspecs/qconfig.pri"
8002 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
8003 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
8004 if [ "$CFG_DEBUG" = "yes" ]; then
8005 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
8006 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8007 QT_CONFIG="$QT_CONFIG release"
8009 QT_CONFIG="$QT_CONFIG debug"
8010 elif [ "$CFG_DEBUG" = "no" ]; then
8011 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
8012 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8013 QT_CONFIG="$QT_CONFIG debug"
8015 QT_CONFIG="$QT_CONFIG release"
8017 if [ "$CFG_STL" = "yes" ]; then
8018 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
8020 if [ "$CFG_FRAMEWORK" = "no" ]; then
8021 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
8023 QT_CONFIG="$QT_CONFIG qt_framework"
8024 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
8026 if [ "$PLATFORM_MAC" = "yes" ]; then
8027 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
8029 if [ "$CFG_DEV" = "yes" ]; then
8030 QT_CONFIG="$QT_CONFIG private_tests"
8033 # Make the application arch follow the Qt arch for single arch builds.
8034 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
8035 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
8036 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
8039 cat >>"$QTCONFIG.tmp" <<EOF
8041 CONFIG += $QTCONFIG_CONFIG
8043 QT_EDITION = $Edition
8044 QT_CONFIG += $QT_CONFIG
8047 QT_VERSION = $QT_VERSION
8048 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
8049 QT_MINOR_VERSION = $QT_MINOR_VERSION
8050 QT_PATCH_VERSION = $QT_PATCH_VERSION
8053 QT_LIBINFIX = $QT_LIBINFIX
8054 QT_NAMESPACE = $QT_NAMESPACE
8055 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
8058 if [ -n "$CFG_SYSROOT" ]; then
8059 echo "# sysroot" >>"$QTCONFIG.tmp"
8060 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
8061 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
8062 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8063 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8064 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8065 echo "}" >> "$QTCONFIG.tmp"
8066 echo >> "$QTCONFIG.tmp"
8068 if [ "$CFG_RPATH" = "yes" ]; then
8069 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8071 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8072 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8073 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8074 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8077 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8078 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
8079 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8082 # replace qconfig.pri if it differs from the newly created temp file
8083 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8084 rm -f "$QTCONFIG.tmp"
8086 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8089 #-------------------------------------------------------------------------------
8090 # save configuration into qmodule.pri
8091 #-------------------------------------------------------------------------------
8092 QTMODULE="$outpath/mkspecs/qmodule.pri"
8094 # Ensure we can link to uninistalled libraries
8095 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8096 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8098 if [ -n "$QT_CFLAGS_PSQL" ]; then
8099 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8101 if [ -n "$QT_LFLAGS_PSQL" ]; then
8102 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8104 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8105 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8107 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8108 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8110 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8111 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8113 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8114 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8116 if [ -n "$QT_LFLAGS_ODBC" ]; then
8117 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8119 if [ -n "$QT_LFLAGS_TDS" ]; then
8120 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8123 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8124 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8127 #dump in the OPENSSL_LIBS info
8128 if [ '!' -z "$OPENSSL_LIBS" ]; then
8129 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8130 elif [ "$CFG_OPENSSL" = "linked" ]; then
8131 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8134 #dump in the SDK info
8135 if [ '!' -z "$CFG_SDK" ]; then
8136 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8139 # mac gcc -Xarch support
8140 if [ "$CFG_MAC_XARCH" = "no" ]; then
8141 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8145 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8146 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8148 # replace qmodule.pri if it differs from the newly created temp file
8149 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8150 rm -f "$QTMODULE.tmp"
8152 mv -f "$QTMODULE.tmp" "$QTMODULE"
8155 #-------------------------------------------------------------------------------
8156 # save configuration into .qmake.cache
8157 #-------------------------------------------------------------------------------
8159 CACHEFILE="$outpath/.qmake.cache"
8160 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8161 cat >>"$CACHEFILE.tmp" <<EOF
8163 QT_SOURCE_TREE = \$\$quote($relpath)
8164 QT_BUILD_TREE = \$\$quote($outpath)
8165 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8167 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8168 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8169 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8170 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8171 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8172 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8173 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8175 include(\$\$PWD/mkspecs/qmodule.pri)
8176 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8177 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8178 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8182 #dump the qmake spec
8183 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8184 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8186 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8191 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8192 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8193 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8194 # don't need to worry about generated files
8195 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8196 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8198 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8200 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8201 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8204 # replace .qmake.cache if it differs from the newly created temp file
8205 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8206 rm -f "$CACHEFILE.tmp"
8208 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8211 #-------------------------------------------------------------------------------
8212 # give feedback on configuration
8213 #-------------------------------------------------------------------------------
8217 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8220 This target is using the GNU C++ compiler ($PLATFORM).
8222 Recent versions of this compiler automatically include code for
8223 exceptions, which increase both the size of the Qt libraries and
8224 the amount of memory taken by your applications.
8226 You may choose to re-run `basename $0` with the -no-exceptions
8227 option to compile Qt without exceptions. This is completely binary
8228 compatible, and existing applications will continue to work.
8236 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8239 This target is using the MIPSpro C++ compiler ($PLATFORM).
8241 You may choose to re-run `basename $0` with the -no-exceptions
8242 option to compile Qt without exceptions. This will make the
8243 size of the Qt library smaller and reduce the amount of memory
8244 taken by your applications.
8255 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8257 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8258 in debug mode will run out of memory on systems with 2GB or less.
8259 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8260 -no-webkit or -release to skip webkit debug.
8265 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8266 echo "Build type: $PLATFORM"
8268 echo "Building on: $PLATFORM"
8269 echo "Building for: $XPLATFORM"
8272 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8273 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8275 echo "Architecture: $CFG_ARCH"
8278 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8279 echo "Host architecture: $CFG_HOST_ARCH"
8282 if [ "$PLATFORM_MAC" = "yes" ]; then
8283 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8284 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8285 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8287 echo "Using framework: Cocoa"
8290 echo "Using framework: Carbon"
8294 if [ -n "$PLATFORM_NOTES" ]; then
8295 echo "Platform notes:"
8296 echo "$PLATFORM_NOTES"
8301 if [ "$OPT_VERBOSE" = "yes" ]; then
8302 echo $ECHO_N "qmake vars .......... $ECHO_C"
8303 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8304 echo "qmake switches ......... $QMAKE_SWITCHES"
8307 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8308 echo "Build .................. $CFG_BUILD_PARTS"
8309 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8310 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8311 echo "Debug .................. yes (combined)"
8312 if [ "$CFG_DEBUG" = "yes" ]; then
8313 echo "Default Link ........... debug"
8315 echo "Default Link ........... release"
8318 echo "Debug .................. $CFG_DEBUG"
8320 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8321 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8322 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8323 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8324 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8325 echo "QtGui module ........... $CFG_GUI"
8326 echo "QtScript module ........ $CFG_SCRIPT"
8327 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8328 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8329 echo "Phonon module .......... $CFG_PHONON"
8330 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8331 echo "SVG module ............. $CFG_SVG"
8332 case "$CFG_WEBKIT" in
8333 yes) echo "WebKit module .......... yes" ;;
8334 debug) echo "WebKit module .......... yes (debug)" ;;
8335 no) echo "WebKit module .......... no" ;;
8337 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8338 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8339 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8341 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8344 echo "V8 module .............. $CFG_V8"
8345 echo "Declarative module ..... $CFG_DECLARATIVE"
8346 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8347 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8349 echo "Location module ........ $CFG_LOCATION"
8350 echo "STL support ............ $CFG_STL"
8351 echo "PCH support ............ $CFG_PRECOMPILE"
8352 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8353 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8354 echo "AVX..................... ${CFG_AVX}"
8355 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8356 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8357 echo "NEON support ........... ${CFG_NEON}"
8359 [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
8360 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8361 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8362 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8363 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8364 echo "NIS support ............ $CFG_NIS"
8365 echo "CUPS support ........... $CFG_CUPS"
8366 echo "Iconv support .......... $CFG_ICONV"
8367 echo "Glib support ........... $CFG_GLIB"
8368 echo "GStreamer support ...... $CFG_GSTREAMER"
8369 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8370 echo "Large File support ..... $CFG_LARGEFILE"
8371 echo "GIF support ............ $CFG_GIF"
8372 if [ "$CFG_TIFF" = "no" ]; then
8373 echo "TIFF support ........... $CFG_TIFF"
8375 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8377 if [ "$CFG_JPEG" = "no" ]; then
8378 echo "JPEG support ........... $CFG_JPEG"
8380 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8382 if [ "$CFG_PNG" = "no" ]; then
8383 echo "PNG support ............ $CFG_PNG"
8385 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8387 if [ "$CFG_MNG" = "no" ]; then
8388 echo "MNG support ............ $CFG_MNG"
8390 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8392 echo "zlib support ........... $CFG_ZLIB"
8393 echo "Session management ..... $CFG_SM"
8394 if [ "$PLATFORM_QWS" = "yes" ]; then
8395 echo "Embedded support ....... $CFG_EMBEDDED"
8396 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8397 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8399 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8401 # Normalize the decoration output first
8402 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8403 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8404 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8405 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8406 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8407 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8408 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8409 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8410 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8411 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8412 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8413 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8414 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8415 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8416 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8417 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8419 if [ "$CFG_OPENGL" = "desktop" ]; then
8420 echo "OpenGL support ......... yes (Desktop OpenGL)"
8421 elif [ "$CFG_OPENGL" = "es2" ]; then
8422 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8424 echo "OpenGL support ......... no"
8426 if [ "$CFG_EGL" != "no" ]; then
8427 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8428 echo "EGL support ............ yes <GLES/egl.h>"
8430 echo "EGL support ............ yes <EGL/egl.h>"
8433 if [ "$CFG_OPENVG" ]; then
8434 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8435 echo "OpenVG support ......... ShivaVG"
8437 echo "OpenVG support ......... $CFG_OPENVG"
8440 if [ "$PLATFORM_X11" = "yes" ]; then
8441 echo "NAS sound support ...... $CFG_NAS"
8442 echo "XShape support ......... $CFG_XSHAPE"
8443 echo "XVideo support ......... $CFG_XVIDEO"
8444 echo "XSync support .......... $CFG_XSYNC"
8445 echo "Xinerama support ....... $CFG_XINERAMA"
8446 echo "Xcursor support ........ $CFG_XCURSOR"
8447 echo "Xfixes support ......... $CFG_XFIXES"
8448 echo "Xrandr support ......... $CFG_XRANDR"
8449 echo "Xrender support ........ $CFG_XRENDER"
8450 echo "Xi support ............. $CFG_XINPUT"
8451 echo "MIT-SHM support ........ $CFG_MITSHM"
8452 echo "FontConfig support ..... $CFG_FONTCONFIG"
8453 echo "XKB Support ............ $CFG_XKB"
8454 echo "immodule support ....... $CFG_IM"
8455 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8457 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8458 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8459 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8460 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8461 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8462 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8463 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8464 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8465 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8468 if [ "$CFG_OPENSSL" = "yes" ]; then
8469 OPENSSL_LINKAGE="(run-time)"
8470 elif [ "$CFG_OPENSSL" = "linked" ]; then
8471 OPENSSL_LINKAGE="(linked)"
8473 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8474 echo "Alsa support ........... $CFG_ALSA"
8475 if [ "$PLATFORM_MAC" = "yes" ]; then
8476 echo "CoreWlan support ....... $CFG_COREWLAN"
8478 echo "ICD support ............ $CFG_ICD"
8479 echo "libICU support ......... $CFG_ICU"
8480 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8481 echo "Xcb support ............ limited (old version)"
8483 echo "Xcb support ............ $CFG_XCB"
8485 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8486 echo "XInput2 support ........ $CFG_XINPUT2"
8490 # complain about not being able to use dynamic plugins if we are using a static build
8491 if [ "$CFG_SHARED" = "no" ]; then
8493 echo "WARNING: Using static linking will disable the use of dynamically"
8494 echo "loaded plugins. Make sure to import all needed static plugins,"
8495 echo "or compile needed modules into the library."
8498 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8500 echo "NOTE: When linking against OpenSSL, you can override the default"
8501 echo "library names through OPENSSL_LIBS."
8503 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8506 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8508 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8509 echo "if you want a pure debug build."
8514 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8519 #-------------------------------------------------------------------------------
8520 # build makefiles based on the configuration
8521 #-------------------------------------------------------------------------------
8523 echo "Finding project files. Please wait..."
8524 if [ "$CFG_NOPROCESS" != "yes" ]; then
8525 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8526 if [ -f "${relpath}/qtbase.pro" ]; then
8527 mkfile="${outpath}/Makefile"
8528 [ -f "$mkfile" ] && chmod +w "$mkfile"
8529 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8533 # .projects -> projects to process
8534 # .projects.1 -> qt and moc
8535 # .projects.2 -> subdirs and libs
8536 # .projects.3 -> the rest
8537 rm -f .projects .projects.1 .projects.2 .projects.3
8539 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8540 if [ -z "$AWK" ]; then
8541 for p in `echo $QMAKE_PROJECTS`; do
8542 echo "$p" >> .projects
8545 cat >projects.awk <<EOF
8551 first = "./.projects.1.tmp"
8552 second = "./.projects.2.tmp"
8553 third = "./.projects.3.tmp"
8558 if ( ! target_file )
8560 print input_file >target_file
8565 input_file = FILENAME
8570 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8573 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8574 target_file = second
8579 matched_target == 0 && /^(TEMPLATE.*=)/ {
8580 if ( \$3 == "subdirs" )
8581 target_file = second
8582 else if ( \$3 == "lib" )
8588 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8589 if ( \$0 ~ /plugin/ )
8592 target_file = second
8597 if ( ! target_file )
8599 print input_file >>target_file
8606 for p in `echo $QMAKE_PROJECTS`; do
8607 echo "$p" >> .projects.all
8610 # if you get errors about the length of the command line to awk, change the -l arg
8612 split -l 100 .projects.all .projects.all.
8613 for p in .projects.all.*; do
8614 "$AWK" -f projects.awk `cat $p`
8615 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8616 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8617 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8618 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8620 rm -f .projects.all* projects.awk
8622 [ -f .projects.1 ] && cat .projects.1 >>.projects
8623 [ -f .projects.2 ] && cat .projects.2 >>.projects
8624 rm -f .projects.1 .projects.2
8625 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8626 cat .projects.3 >>.projects
8630 # don't sort Qt and MOC in with the other project files
8631 # also work around a segfaulting uniq(1)
8632 if [ -f .sorted.projects.2 ]; then
8633 sort .sorted.projects.2 > .sorted.projects.2.new
8634 mv -f .sorted.projects.2.new .sorted.projects.2
8635 cat .sorted.projects.2 >> .sorted.projects.1
8637 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8638 rm -f .sorted.projects.2 .sorted.projects.1
8642 if [ -f .projects ]; then
8643 uniq .projects >.tmp
8644 mv -f .tmp .projects
8645 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8647 if [ -f .projects.3 ]; then
8648 uniq .projects.3 >.tmp
8649 mv -f .tmp .projects.3
8650 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8652 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8656 for part in $CFG_BUILD_PARTS; do
8658 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8659 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8660 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8661 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8666 if [ "$CFG_DEV" = "yes" ]; then
8667 PART_ROOTS="$PART_ROOTS tests"
8670 echo "Creating makefiles. Please wait..."
8671 for file in .projects .projects.3; do
8672 [ '!' -f "$file" ] && continue
8673 for a in `cat $file`; do
8675 for r in $PART_ROOTS; do
8676 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8681 [ "$IN_ROOT" = "no" ] && continue
8684 *winmain/winmain.pro)
8685 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8689 *examples/activeqt/*) continue ;;
8690 */qmake/qmake.pro) continue ;;
8691 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8692 *tools/mkv8snapshot/*)
8693 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8699 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8705 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8706 test -d "$dir" || mkdir -p "$dir"
8707 OUTDIR="$outpath/$dir"
8708 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8709 # fast configure - the makefile exists, skip it
8710 # since the makefile exists, it was generated by qmake, which means we
8711 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8713 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8716 QMAKE_SPEC_ARGS="-spec $SPEC"
8717 echo $ECHO_N " for $a$ECHO_C"
8719 QMAKE="$outpath/bin/qmake"
8720 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8721 if [ "$file" = ".projects.3" ]; then
8724 cat >"${OUTDIR}/Makefile" <<EOF
8725 # ${OUTDIR}/Makefile: generated by configure
8727 # WARNING: This makefile will be replaced with a real makefile.
8728 # All changes made to this file will be lost.
8730 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8732 cat >>"${OUTDIR}/Makefile" <<EOF
8734 all clean install qmake first Makefile: FORCE
8735 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8743 if [ "$OPT_VERBOSE" = "yes" ]; then
8744 echo " (`basename $SPEC`)"
8745 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8750 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8751 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8755 rm -f .projects .projects.3
8757 #-------------------------------------------------------------------------------
8758 # check for platforms that we don't yet know about
8759 #-------------------------------------------------------------------------------
8760 if [ "$CFG_ARCH" = "generic" ]; then
8763 NOTICE: Atomic operations are not yet supported for this
8766 Qt will use the 'generic' architecture instead, which uses a
8767 single pthread_mutex_t to protect all atomic operations. This
8768 implementation is the slow (but safe) fallback implementation
8769 for architectures Qt does not yet support.
8773 #-------------------------------------------------------------------------------
8774 # check if the user passed the -no-zlib option, which is no longer supported
8775 #-------------------------------------------------------------------------------
8776 if [ -n "$ZLIB_FORCED" ]; then
8777 which_zlib="supplied"
8778 if [ "$CFG_ZLIB" = "system" ]; then
8784 NOTICE: The -no-zlib option was supplied but is no longer
8787 Qt now requires zlib support in all builds, so the -no-zlib
8788 option was ignored. Qt will be built using the $which_zlib
8793 #-------------------------------------------------------------------------------
8794 # finally save the executed command to another script
8795 #-------------------------------------------------------------------------------
8796 if [ `basename $0` != "config.status" ]; then
8797 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8799 # add the system variables
8800 for varname in $SYSTEM_VARIABLES; do
8802 'if [ -n "\$'${varname}'" ]; then
8803 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8808 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8810 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8811 echo "#!/bin/sh" > "$outpath/config.status"
8812 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8813 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8814 echo "else" >> "$outpath/config.status"
8815 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8816 echo "fi" >> "$outpath/config.status"
8817 chmod +x "$outpath/config.status"
8820 if [ -n "$RPATH_MESSAGE" ]; then
8822 echo "$RPATH_MESSAGE"
8825 MAKE=`basename "$MAKE"`
8827 echo Qt is now configured for building. Just run \'$MAKE\'.
8828 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8829 echo Once everything is built, Qt is installed.
8830 echo You should not run \'$MAKE install\'.
8832 echo Once everything is built, you must run \'$MAKE install\'.
8833 echo Qt will be installed into $QT_INSTALL_PREFIX
8836 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.