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=
768 CFG_SEPARATE_DEBUG_INFO=no
769 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
770 CFG_REDUCE_EXPORTS=auto
780 CFG_REDUCE_RELOCATIONS=no
783 CFG_ACCESSIBILITY=auto
787 CFG_DOUBLEFORMAT=auto
791 CFG_CLOCK_GETTIME=auto
792 CFG_CLOCK_MONOTONIC=auto
801 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
806 COMMANDLINE_MAC_CARBON=no
809 CFG_PREFIX_INSTALL=yes
818 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
819 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
823 OPT_CONFIRM_LICENSE=no
829 CFG_GRAPHICS_SYSTEM=default
839 # initalize variables used for installation
848 QT_INSTALL_TRANSLATIONS=
853 #flags for SQL drivers
861 QT_LFLAGS_ODBC="-lodbc"
864 # flags for libdbus-1
868 # flags for Glib (X11 only)
872 # flags for GStreamer (X11 only)
876 # 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|-ptmalloc|-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|-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"
1323 QT_INSTALL_BINS="$VAL"
1345 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1352 if [ "$VAL" = "little" ]; then
1353 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1354 elif [ "$VAL" = "big" ]; then
1355 CFG_ENDIAN="Q_BIG_ENDIAN"
1361 if [ "$VAL" = "little" ]; then
1362 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1363 elif [ "$VAL" = "big" ]; then
1364 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1370 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1377 CFG_QWS_DEPTHS="$VAL"
1380 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1381 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1382 [ "$VAL" = "es2" ]; then
1384 if [ "$VAL" = "es2" ]; then
1392 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1394 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1402 if [ "$PLATFORM_QWS" = "yes" ]; then
1403 echo "Error: Graphics System plugins are not supported on QWS."
1404 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1405 echo " rather than existing as a separate plugin."
1409 if [ "$VAL" = "opengl" ]; then
1410 CFG_GRAPHICS_SYSTEM="opengl"
1411 elif [ "$VAL" = "openvg" ]; then
1412 CFG_GRAPHICS_SYSTEM="openvg"
1413 elif [ "$VAL" = "raster" ]; then
1414 CFG_GRAPHICS_SYSTEM="raster"
1415 elif [ "$VAL" = "runtime" ]; then
1416 CFG_GRAPHICS_SYSTEM="runtime"
1422 runtimegraphicssystem)
1423 if [ "$VAL" != "runtime" ]; then
1424 CFG_RUNTIME_SYSTEM="$VAL"
1428 qvfb) # left for commandline compatibility, not documented
1429 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1430 if [ "$VAL" = "yes" ]; then
1431 QMakeVar add gfx-drivers qvfb
1432 QMakeVar add kbd-drivers qvfb
1433 QMakeVar add mouse-drivers qvfb
1434 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1435 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1436 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1443 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1446 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1455 if [ "$PLATFORM_MAC" = "yes" ]; then
1462 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1463 CFG_MAC_DWARF2="$VAL"
1469 # if this is a Mac then "windows" probably means
1470 # we are cross-compiling for MinGW
1471 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1472 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1481 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1482 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1488 # do nothing - Cocoa is the default.
1491 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1492 CFG_MAC_CARBON="$VAL"
1493 COMMANDLINE_MAC_CARBON="$VAL"
1499 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1500 CFG_MAC_HARFBUZZ="$VAL"
1507 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1508 CFG_FRAMEWORK="$VAL"
1514 if [ "$VAL" = "yes" ]; then
1516 QMakeVar add QMAKE_CFLAGS -pg
1517 QMakeVar add QMAKE_CXXFLAGS -pg
1518 QMakeVar add QMAKE_LFLAGS -pg
1519 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1525 if [ "$VAL" = "yes" ]; then
1526 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1529 exceptions|g++-exceptions)
1530 if [ "$VAL" = "no" ]; then
1532 elif [ "$VAL" = "yes" ]; then
1540 # keep compatibility with old platform names
1546 PLATFORM=hpux-acc-o64
1549 PLATFORM=hpux-acc-64
1552 PLATFORM=hpux-acc-64
1564 PLATFORM=reliant-cds-64
1567 PLATFORM=solaris-cc-64
1570 PLATFORM=unixware-cc
1573 PLATFORM=unixware-g++
1576 PLATFORM=unixware-cc
1579 PLATFORM=unixware-g++
1585 i386) NATIVE_64_ARCH="x86_64" ;;
1586 powerpc) NATIVE_64_ARCH="ppc64" ;;
1587 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1589 if [ ! -z "$NATIVE_64_ARCH" ]; then
1590 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1591 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1598 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1601 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1602 CFG_DEBUG_RELEASE="$VAL"
1608 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1609 CFG_RELEASE_QMAKE="$VAL"
1615 if [ "$VAL" = "yes" ]; then
1617 elif [ "$VAL" = "no" ]; then
1624 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1625 CFG_PREFIX_INSTALL="$VAL"
1633 developer-build|commercial|opensource|nokia-developer)
1634 # These switches have been dealt with already
1637 if [ "$VAL" = "yes" ]; then
1639 elif [ "$VAL" = "no" ]; then
1646 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1647 CFG_INCREMENTAL="$VAL"
1653 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1654 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1660 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1661 if [ "$VAL" = "no" ]; then
1662 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1663 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1664 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "no" ]; then
1684 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1692 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1699 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1706 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1713 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1720 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1727 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1734 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1741 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1748 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1749 CFG_PRECOMPILE="$VAL"
1754 separate-debug-info)
1755 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1756 CFG_SEPARATE_DEBUG_INFO="$VAL"
1757 elif [ "$VAL" = "nocopy" ] ; then
1758 CFG_SEPARATE_DEBUG_INFO="yes"
1759 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1765 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1766 CFG_REDUCE_EXPORTS="$VAL"
1772 if [ "$VAL" = "no" ]; then
1779 if [ "$VAL" = "no" ]; then
1786 if [ "$VAL" = "no" ]; then
1793 if [ "$VAL" = "no" ]; then
1800 if [ "$VAL" = "no" ]; then
1807 if [ "$VAL" = "no" ]; then
1814 if [ "$VAL" = "no" ]; then
1821 if [ "$VAL" = "no" ]; then
1828 if [ "$VAL" = "no" ]; then
1838 if [ "$VAL" = "no" ]; then
1845 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1846 CFG_REDUCE_RELOCATIONS="$VAL"
1852 [ "$VAL" = "qt" ] && VAL=yes
1853 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1854 CFG_QWS_FREETYPE="$VAL"
1860 [ "$VAL" = "qt" ] && VAL=yes
1861 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1866 # No longer supported:
1867 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1870 if [ "$VAL" = "system" ]; then
1877 [ "$VAL" = "yes" ] && VAL=qt
1878 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1885 [ "$VAL" = "yes" ] && VAL=qt
1886 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1893 [ "$VAL" = "yes" ] && VAL=qt
1894 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1901 [ "$VAL" = "yes" ] && VAL=qt
1902 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1909 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1916 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1923 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1930 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1937 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1944 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1951 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1952 CFG_FONTCONFIG="$VAL"
1958 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1965 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1972 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1979 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1986 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1993 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2000 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2001 CFG_GSTREAMER="$VAL"
2007 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2008 CFG_QGTKSTYLE="$VAL"
2014 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2017 if [ "$VAL" = "no" ]; then
2025 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
2027 elif [ "$VAL" = "runtime" ]; then
2034 if [ "$VAL" = "yes" ]; then
2041 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2048 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2049 CFG_LARGEFILE="$VAL"
2055 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2062 if [ "$VAL" = "yes" ]; then
2063 CFG_OPENSSL="linked"
2069 if [ "$VAL" = "yes" ]; then
2077 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2078 CFG_XMLPATTERNS="yes"
2080 if [ "$VAL" = "no" ]; then
2081 CFG_XMLPATTERNS="no"
2088 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2091 if [ "$VAL" = "no" ]; then
2099 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2100 CFG_SCRIPTTOOLS="yes"
2102 if [ "$VAL" = "no" ]; then
2103 CFG_SCRIPTTOOLS="no"
2110 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2113 if [ "$VAL" = "no" ]; then
2121 if [ "$VAL" = "yes" ]; then
2124 if [ "$VAL" = "no" ]; then
2132 if [ "$VAL" = "yes" ]; then
2133 CFG_DECLARATIVE="yes"
2135 if [ "$VAL" = "no" ]; then
2136 CFG_DECLARATIVE="no"
2143 if [ "$VAL" = "yes" ]; then
2144 CFG_DECLARATIVE_DEBUG="yes"
2146 if [ "$VAL" = "no" ]; then
2147 CFG_DECLARATIVE_DEBUG="no"
2154 [ "$VAL" = "auto" ] && VAL="yes"
2158 if [ "$VAL" = "yes" ]; then
2161 if [ "$VAL" = "no" ]; then
2169 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2170 CFG_JAVASCRIPTCORE_JIT="$VAL"
2176 if [ "$VAL" = "yes" ]; then
2177 OPT_CONFIRM_LICENSE="$VAL"
2183 if [ "$VAL" = "yes" ]; then
2189 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2190 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2191 # if autoconf style options were used, $VAL can be "yes" or "no"
2192 [ "$VAL" = "yes" ] && VAL=qt
2193 # now $VAL should be "no", "qt", or "plugin"... double-check
2194 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2197 # now $VAL is "no", "qt", or "plugin"
2199 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2200 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2202 # Grab the available values
2205 avail="$CFG_SQL_AVAILABLE"
2208 avail="$CFG_GFX_AVAILABLE"
2209 if [ "$OPT" = "plugin" ]; then
2210 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2214 avail="$CFG_DECORATION_AVAILABLE"
2215 if [ "$OPT" = "plugin" ]; then
2216 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2220 avail="$CFG_KBD_AVAILABLE"
2221 if [ "$OPT" = "plugin" ]; then
2222 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2226 avail="$CFG_MOUSE_AVAILABLE"
2227 if [ "$OPT" = "plugin" ]; then
2228 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2232 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2233 if [ "$OPT" != "plugin" ]; then
2234 # png is always built in
2240 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2244 # Check that that user's value is available.
2247 if [ "$VAL" = "$d" ]; then
2252 [ "$found" = yes ] || ERROR=yes
2254 if [ "$VAR" = "sql" ]; then
2255 # set the CFG_SQL_driver
2256 eval "CFG_SQL_$VAL=\$OPT"
2258 elif [ "$VAR" = "imageformat" ]; then
2259 [ "$OPT" = "qt" ] && OPT=yes
2260 VAL="`echo $VAL |tr a-z A-Z`"
2261 eval "CFG_$VAL=$OPT"
2265 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2266 if [ "$OPT" = "plugin" ]; then
2267 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2268 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2269 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2270 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2271 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2272 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2273 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2274 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2277 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2278 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2279 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2280 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2281 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2285 QMakeVar add "${VAR}s" "${VAL}"
2286 elif [ "$OPT" = "no" ]; then
2287 PLUG_VAR="${VAR}-plugin"
2288 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2289 IN_VAR="${VAR}-driver"
2293 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2294 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2295 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2296 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2297 QMakeVar del "${IN_VAR}s" "$VAL"
2298 QMakeVar del "${PLUG_VAR}s" "$VAL"
2300 if [ "$ERROR" = "yes" ]; then
2301 echo "$CURRENT_OPT: unknown argument"
2306 if [ "$VAL" = "yes" ]; then
2307 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2308 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2312 elif [ "$VAL" = "no" ]; then
2313 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2314 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2323 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2330 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2337 D_FLAGS="$D_FLAGS \"$VAL\""
2340 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2343 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2346 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2349 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2352 if [ "$PLATFORM_MAC" = "yes" ]; then
2353 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2354 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2360 if [ "$PLATFORM_MAC" = "yes" ]; then
2361 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2367 W_FLAGS="$W_FLAGS \"${VAL}\""
2373 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2380 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2381 CFG_PHONON_BACKEND="$VAL"
2387 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2388 CFG_MULTIMEDIA="$VAL"
2400 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2401 CFG_AUDIO_BACKEND="$VAL"
2407 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2414 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2415 CFG_FORCE_ASSERTS="$VAL"
2424 if [ "$UNKNOWN_OPT" = "yes" ]; then
2425 echo "${CURRENT_OPT}: invalid command-line switch"
2431 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2432 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2435 if [ "$CFG_GUI" = "no" ]; then
2436 echo "Warning: -no-gui will disable the qt3support library."
2440 #disable Qt3Support for Lighthouse
2441 if [ "$PLATFORM_QPA" = "yes" ]; then
2445 # update QT_CONFIG to show our current predefined configuration
2446 case "$CFG_QCONFIG" in
2447 minimal|small|medium|large|full)
2448 # these are a sequence of increasing functionality
2449 for c in minimal small medium large full; do
2450 QT_CONFIG="$QT_CONFIG $c-config"
2451 [ "$CFG_QCONFIG" = $c ] && break
2455 # not known to be sufficient for anything
2456 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2457 echo >&2 "Error: configuration file not found:"
2458 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2460 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2465 #-------------------------------------------------------------------------------
2466 # build tree initialization
2467 #-------------------------------------------------------------------------------
2469 # where to find which..
2470 unixtests="$relpath/config.tests/unix"
2471 mactests="$relpath/config.tests/mac"
2472 WHICH="$unixtests/which.test"
2474 PERL=`$WHICH perl 2>/dev/null`
2476 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2478 for e in gawk nawk awk; do
2479 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2486 PERL="/usr/bin/perl"
2487 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2491 ### skip this if the user just needs help...
2492 if [ "$OPT_HELP" != "yes" ]; then
2494 # is this a shadow build?
2495 if [ "$OPT_SHADOW" = "maybe" ]; then
2497 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2498 if [ -h "$outpath" ]; then
2499 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2505 if [ "$OPT_SHADOW" = "yes" ]; then
2506 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2507 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2508 echo >&2 "Cannot proceed."
2511 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2514 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2516 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2517 echo "Qt can be built in release mode with separate debug information, so"
2518 echo "-debug-and-release is not necessary anymore"
2522 if [ "$CFG_SILENT" = "yes" ]; then
2523 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2526 # if the source tree is different from the build tree,
2527 # symlink or copy part of the sources
2528 if [ "$OPT_SHADOW" = "yes" ]; then
2529 echo "Preparing build tree..."
2531 if [ -z "$PERL" ]; then
2533 echo "You need perl in your PATH to make a shadow build."
2534 echo "Cannot proceed."
2538 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2540 # symlink the qmake directory
2541 find "$relpath/qmake" | while read a; do
2542 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2543 if [ '!' -f "$my_a" ]; then
2544 if [ -d "$a" ]; then
2545 # directories are created...
2548 a_dir=`dirname "$my_a"`
2549 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2550 # ... and files are symlinked
2551 case `basename "$a"` in
2552 *.o|*.d|GNUmakefile*|qmake)
2563 # make a syncqt script that can be used in the shadow
2564 rm -f "$outpath/bin/syncqt"
2565 if [ -x "$relpath/bin/syncqt" ]; then
2566 mkdir -p "$outpath/bin"
2567 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2568 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2569 chmod 755 "$outpath/bin/syncqt"
2572 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2573 rm -f "$outpath/bin/$i"
2574 if [ -x "$relpath/bin/$i" ]; then
2575 mkdir -p "$outpath/bin"
2576 echo "#!/bin/sh" >"$outpath/bin/$i"
2577 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2578 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2579 chmod 755 "$outpath/bin/$i"
2583 # symlink the mkspecs directory
2584 mkdir -p "$outpath/mkspecs"
2585 rm -rf "$outpath"/mkspecs/*
2586 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2587 rm -f "$outpath/mkspecs/default"
2591 rm -rf "$outpath/mkspecs/$1"
2592 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2593 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2596 # Special case for mkspecs/features directory.
2597 # To be able to place .prf files into a shadow build directory,
2598 # we're creating links for files only. The directory structure is reproduced.
2599 ShadowMkspecs features
2601 # The modules dir is special, too.
2602 ShadowMkspecs modules
2604 # symlink the doc directory
2605 rm -rf "$outpath/doc"
2606 ln -s "$relpath/doc" "$outpath/doc"
2608 # make sure q3porting.xml can be found
2609 mkdir -p "$outpath/tools/porting/src"
2610 rm -f "$outpath/tools/porting/src/q3porting.xml"
2611 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2614 # symlink fonts to be able to run application from build directory
2615 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2616 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2617 mkdir -p "${outpath}/lib"
2618 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2622 if [ "$OPT_FAST" = "auto" ]; then
2623 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2630 # find a make command
2631 if [ -z "$MAKE" ]; then
2633 for mk in gmake make; do
2634 if "$WHICH" $mk >/dev/null 2>&1; then
2639 if [ -z "$MAKE" ]; then
2640 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2641 echo >&2 "Cannot proceed."
2644 # export MAKE, we need it later in the config.tests
2650 #-------------------------------------------------------------------------------
2651 # auto-detect all that hasn't been specified in the arguments
2652 #-------------------------------------------------------------------------------
2654 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2655 if [ "$CFG_EMBEDDED" != "no" ]; then
2656 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2658 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2659 if [ -z "$XPLATFORM" ]; then
2660 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2661 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2665 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2666 if [ -z "$XPLATFORM" ]; then
2667 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2668 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2672 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2673 if [ -z "$XPLATFORM" ]; then
2674 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2675 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2679 if [ -z "$PLATFORM" ]; then
2680 case "$UNAME_MACHINE" in
2682 PLATFORM=qws/linux-x86-g++
2685 PLATFORM=qws/linux-x86_64-g++
2688 PLATFORM=qws/linux-generic-g++
2692 if [ -z "$XPLATFORM" ]; then
2693 if [ "$CFG_EMBEDDED" = "auto" ]; then
2694 if [ -n "$CFG_ARCH" ]; then
2695 CFG_EMBEDDED=$CFG_ARCH
2697 case "$UNAME_MACHINE" in
2705 CFG_EMBEDDED=generic
2710 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2714 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2715 if [ -z "$XPLATFORM" ]; then
2716 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2717 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2721 if [ -z "$XPLATFORM" ]; then
2726 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2733 if [ -z "$PLATFORM" ]; then
2735 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2737 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2739 # PLATFORM=macx-xcode
2746 #PLATFORM=aix-g++-64
2748 #PLATFORM=aix-xlc-64
2750 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2760 # PLATFORM=dynix-g++
2766 PLATFORM=freebsd-g++
2768 - Also available for FreeBSD: freebsd-icc
2772 PLATFORM=openbsd-g++
2783 #PLATFORM=irix-cc-64
2785 - Also available for IRIX: irix-g++ irix-cc-64
2789 case "$UNAME_MACHINE" in
2791 #PLATFORM=hpuxi-acc-32
2792 PLATFORM=hpuxi-acc-64
2794 - Also available for HP-UXi: hpuxi-acc-32
2800 #PLATFORM=hpux-acc-64
2802 #PLATFORM=hpux-acc-o64
2804 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2813 - Also available for Tru64: tru64-g++
2817 case "$UNAME_MACHINE" in
2819 PLATFORM=linux-g++-64
2826 - Also available for Linux: linux-kcc linux-icc linux-cxx
2830 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2831 PLATFORM="solaris-g++"
2833 #PLATFORM=solaris-g++
2835 #PLATFORM=solaris-cc64
2838 - Also available for Solaris: solaris-g++ solaris-cc-64
2841 ReliantUNIX-*:*|SINIX-*:*)
2842 PLATFORM=reliant-cds
2843 #PLATFORM=reliant-cds-64
2845 - Also available for Reliant UNIX: reliant-cds-64
2855 #PLATFORM=unixware-g++
2856 PLATFORM=unixware-cc
2858 - Also available for OpenUNIX: unixware-g++
2862 #PLATFORM=unixware-g++
2863 PLATFORM=unixware-cc
2865 - Also available for UnixWare: unixware-g++
2872 - Also available for SCO OpenServer: sco-g++
2876 PLATFORM=unixware-g++
2879 PLATFORM=unsupported/qnx-g++
2882 if [ "$OPT_HELP" != "yes" ]; then
2884 for p in $PLATFORMS; do
2885 echo " $relconf $* -platform $p"
2888 echo " The build script does not currently recognize all" >&2
2889 echo " platforms supported by Qt." >&2
2890 echo " Rerun this script with a -platform option listed to" >&2
2891 echo " set the system/compiler combination you use." >&2
2898 if [ "$PLATFORM_QWS" = "yes" ]; then
2900 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2902 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2905 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2907 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2908 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2910 if [ -d "$PLATFORM" ]; then
2911 QMAKESPEC="$PLATFORM"
2913 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2915 if [ -d "$XPLATFORM" ]; then
2916 XQMAKESPEC="$XPLATFORM"
2918 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2920 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2921 QT_CROSS_COMPILE=yes
2922 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2925 if [ "$PLATFORM_MAC" = "yes" ]; then
2926 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2928 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2929 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2930 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2931 echo " built with 'macx-g++'" >&2
2937 # check specified platforms are supported
2938 if [ '!' -d "$QMAKESPEC" ]; then
2940 echo " The specified system/compiler is not supported:"
2944 echo " Please see the README file for a complete list."
2948 if [ '!' -d "$XQMAKESPEC" ]; then
2950 echo " The specified system/compiler is not supported:"
2954 echo " Please see the README file for a complete list."
2958 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2960 echo " The specified system/compiler port is not complete:"
2962 echo " $XQMAKESPEC/qplatformdefs.h"
2964 echo " Please contact qt-info@nokia.com."
2969 # now look at the configs and figure out what platform we are config'd for
2970 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2971 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2973 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2975 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2976 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2977 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2978 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2979 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2983 #-------------------------------------------------------------------------------
2984 # determine the system architecture
2985 #-------------------------------------------------------------------------------
2986 if [ "$OPT_VERBOSE" = "yes" ]; then
2987 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2990 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2991 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2993 echo "You have specified a target architecture with -embedded and -arch."
2994 echo "The two architectures you have specified are different, so we can"
2995 echo "not proceed. Either set both to be the same, or only use -embedded."
3001 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
3002 case `basename "$XPLATFORM"` in
3005 echo "You are not licensed for Qt for `basename $XPLATFORM`."
3007 echo "Please contact qt-info@nokia.com to upgrade your license to"
3008 echo "include this platform, or install the Qt Open Source Edition"
3009 echo "if you intend to develop free software."
3015 if [ -z "${CFG_HOST_ARCH}" ]; then
3016 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
3018 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
3019 case "$CFG_HOST_ARCH" in
3024 if [ "$OPT_VERBOSE" = "yes" ]; then
3025 echo " GNU/Hurd ($CFG_HOST_ARCH)"
3029 CFG_HOST_ARCH=`uname -p`
3030 if [ "$OPT_VERBOSE" = "yes" ]; then
3031 echo " SGI ($CFG_HOST_ARCH)"
3035 case "$UNAME_MACHINE" in
3037 if [ "$OPT_VERBOSE" = "yes" ]; then
3038 echo " Sun SPARC (sparc)"
3045 if [ "$OPT_VERBOSE" = "yes" ]; then
3046 echo " 64-bit AMD 80x86 (x86_64)"
3048 CFG_HOST_ARCH=x86_64
3051 if [ "$OPT_VERBOSE" = "yes" ]; then
3052 echo " 32-bit Intel 80x86 (i386)"
3060 case "$UNAME_MACHINE" in
3062 if [ "$OPT_VERBOSE" = "yes" ]; then
3063 echo " 32-bit Apple PowerPC (powerpc)"
3067 if [ "$OPT_VERBOSE" = "yes" ]; then
3068 echo " 32-bit Intel 80x86 (i386)"
3072 CFG_HOST_ARCH=macosx
3075 if [ "$OPT_VERBOSE" = "yes" ]; then
3076 echo " 64-bit IBM PowerPC (powerpc)"
3078 CFG_HOST_ARCH=powerpc
3081 if [ "$OPT_VERBOSE" = "yes" ]; then
3082 echo " HP PA-RISC (parisc)"
3084 CFG_HOST_ARCH=parisc
3087 if [ "$OPT_VERBOSE" = "yes" ]; then
3088 echo " 32-bit Intel 80x86 (i386)"
3092 *:*:x86_64|*:*:amd64)
3093 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3094 if [ "$OPT_VERBOSE" = "yes" ]; then
3095 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3099 if [ "$OPT_VERBOSE" = "yes" ]; then
3100 echo " 64-bit AMD 80x86 (x86_64)"
3102 CFG_HOST_ARCH=x86_64
3106 if [ "$OPT_VERBOSE" = "yes" ]; then
3107 echo " 32-bit PowerPC (powerpc)"
3109 CFG_HOST_ARCH=powerpc
3112 if [ "$OPT_VERBOSE" = "yes" ]; then
3113 echo " 64-bit PowerPC (powerpc)"
3115 CFG_HOST_ARCH=powerpc
3118 if [ "$OPT_VERBOSE" = "yes" ]; then
3119 echo " IBM S/390 (s390)"
3124 if [ "$OPT_VERBOSE" = "yes" ]; then
3130 if [ "$OPT_VERBOSE" = "yes" ]; then
3131 echo " Linux on SPARC"
3136 case "$UNAME_MACHINE" in
3138 if [ "$OPT_VERBOSE" = "yes" ]; then
3139 echo " QNX on Intel 80x86 (i386)"
3146 if [ "$OPT_VERBOSE" = "yes" ]; then
3147 echo " Trying '$UNAME_MACHINE'..."
3149 CFG_HOST_ARCH="$UNAME_MACHINE"
3154 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3155 if [ -n "$CFG_ARCH" ]; then
3156 CFG_EMBEDDED=$CFG_ARCH
3159 case "$CFG_EMBEDDED" in
3182 CFG_ARCH="$CFG_EMBEDDED"
3185 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3186 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3187 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3188 CFG_ARCH=$CFG_HOST_ARCH
3195 # previously, armv6 was a different arch
3201 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3202 if [ "$OPT_VERBOSE" = "yes" ]; then
3203 echo " '$CFG_ARCH' is supported"
3206 if [ "$OPT_VERBOSE" = "yes" ]; then
3207 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3211 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3212 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3213 if [ "$OPT_VERBOSE" = "yes" ]; then
3214 echo " '$CFG_HOST_ARCH' is supported"
3217 if [ "$OPT_VERBOSE" = "yes" ]; then
3218 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3220 CFG_HOST_ARCH=generic
3224 if [ "$OPT_VERBOSE" = "yes" ]; then
3225 echo "System architecture: '$CFG_ARCH'"
3226 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3227 echo "Host architecture: '$CFG_HOST_ARCH'"
3231 #-------------------------------------------------------------------------------
3232 # tests that don't need qmake (must be run before displaying help)
3233 #-------------------------------------------------------------------------------
3235 # detect build style
3236 if [ "$CFG_DEBUG" = "auto" ]; then
3237 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3238 CFG_DEBUG_RELEASE=yes
3240 elif [ "$CFG_DEV" = "yes" ]; then
3241 CFG_DEBUG_RELEASE=no
3244 CFG_DEBUG_RELEASE=no
3248 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3249 QT_CONFIG="$QT_CONFIG build_all"
3252 if [ -z "$PKG_CONFIG" ]; then
3253 # See if PKG_CONFIG is set in the mkspec:
3254 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3256 if [ -z "$PKG_CONFIG" ]; then
3257 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3260 # Work out if we can use pkg-config
3261 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3262 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3264 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3265 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3266 echo >&2 "environment!"
3268 if [ -z "$PKG_CONFIG_PATH" ]; then
3270 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3271 echo >&2 "the host compiler's .pc files will be used. This is probably"
3272 echo >&2 "not what you want."
3274 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3276 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3277 echo >&2 "been set. This means your toolchain's .pc files must contain"
3278 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3279 echo >&2 "tests are failing, please check these files."
3284 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3285 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3286 echo >&2 "dependencies"
3292 if [ ! -n "$PKG_CONFIG" ]; then
3293 QT_CONFIG="$QT_CONFIG no-pkg-config"
3296 # process CFG_MAC_ARCHS
3297 if [ "$PLATFORM_MAC" = "yes" ]; then
3298 # check -arch arguments for validity.
3299 ALLOWED="x86 ppc x86_64 ppc64 i386"
3300 # Save the list so we can re-write it using only valid values
3301 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3303 for i in $CFG_MAC_ARCHS_IN
3305 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3306 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3309 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3310 # These are synonymous values
3311 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3312 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3313 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3315 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3316 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3321 # pass on $CFG_SDK to the configure tests.
3322 if [ '!' -z "$CFG_SDK" ]; then
3323 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3326 # find the default framework value
3327 if [ "$CFG_ARCH" = "macosx" ]; then
3328 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3329 CFG_FRAMEWORK="$CFG_SHARED"
3330 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3332 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3340 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3341 TEST_COMPILER="$CXX"
3343 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3344 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3345 if [ -z "$TEST_COMPILER" ]; then
3346 echo "ERROR: Cannot set the compiler for the configuration tests"
3351 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3352 TEST_COMPILER="nacl-gcc"
3356 if [ -n "$CFG_SYSROOT" ]; then
3357 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3358 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3359 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3361 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3365 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3367 # auto-detect precompiled header support
3368 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3369 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3371 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3376 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3378 echo "WARNING: Using universal binaries disables precompiled headers."
3383 #auto-detect DWARF2 on the mac
3384 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3385 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3392 # auto-detect support for -Xarch on the mac
3393 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3394 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3401 # don't autodetect support for separate debug info on objcopy when
3402 # cross-compiling as lots of toolchains seems to have problems with this
3403 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3404 CFG_SEPARATE_DEBUG_INFO="no"
3407 # auto-detect support for separate debug info in objcopy
3408 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3409 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3410 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3411 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3412 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3413 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3414 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3415 CFG_SEPARATE_DEBUG_INFO=no
3419 # binutils on HP-UX is buggy; default to no.
3420 CFG_SEPARATE_DEBUG_INFO=no
3423 CFG_SEPARATE_DEBUG_INFO=yes
3429 # auto-detect -fvisibility support
3430 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3431 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3432 CFG_REDUCE_EXPORTS=no
3434 CFG_REDUCE_EXPORTS=yes
3438 # detect the availability of the -Bsymbolic-functions linker optimization
3439 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3440 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3441 CFG_REDUCE_RELOCATIONS=no
3443 CFG_REDUCE_RELOCATIONS=yes
3447 # auto-detect GNU make support
3448 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3452 # If -opengl wasn't specified, don't try to auto-detect
3453 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3458 if [ "$PLATFORM_MAC" = "yes" ]; then
3459 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3464 # find the default framework value
3465 if [ "$CFG_ARCH" = "macosx" ]; then
3466 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3467 CFG_FRAMEWORK="$CFG_SHARED"
3468 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3470 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3478 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3479 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3480 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3481 # get the darwin version. 10.0.0 and up means snow leopard.
3482 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3483 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3485 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3490 # x11 tests are done after qmake is built
3493 #setup the build parts
3494 if [ -z "$CFG_BUILD_PARTS" ]; then
3495 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3497 # don't build tools by default when cross-compiling
3498 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3499 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3502 for nobuild in $CFG_NOBUILD_PARTS; do
3503 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3505 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3507 # echo "WARNING: libs is a required part of the build."
3509 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3512 #-------------------------------------------------------------------------------
3513 # post process QT_INSTALL_* variables
3514 #-------------------------------------------------------------------------------
3516 if [ -z "$QT_INSTALL_PREFIX" ]; then
3517 if [ "$CFG_DEV" = "yes" ]; then
3518 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3520 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3523 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3525 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3526 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3527 if [ "$PLATFORM_MAC" = "yes" ]; then
3528 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3531 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3534 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3536 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3537 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3538 if [ "$PLATFORM_MAC" = "yes" ]; then
3539 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3544 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3547 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3549 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3550 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3551 if [ "$PLATFORM_MAC" = "yes" ]; then
3552 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3553 QT_INSTALL_LIBS="/Libraries/Frameworks"
3557 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3559 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3561 if [ -z "$QT_INSTALL_BINS" ]; then #default
3562 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3563 if [ "$PLATFORM_MAC" = "yes" ]; then
3564 QT_INSTALL_BINS="/Developer/Applications/Qt"
3567 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3569 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3571 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3572 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3573 if [ "$PLATFORM_MAC" = "yes" ]; then
3574 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3577 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3579 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3581 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3582 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3583 if [ "$PLATFORM_MAC" = "yes" ]; then
3584 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3587 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3589 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3591 if [ -z "$QT_INSTALL_DATA" ]; then #default
3592 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3594 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3596 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3597 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3599 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3601 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3602 if [ "$PLATFORM_MAC" = "yes" ]; then
3603 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3605 QT_INSTALL_SETTINGS=/etc/xdg
3608 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3610 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3611 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3612 if [ "$PLATFORM_MAC" = "yes" ]; then
3613 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3616 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3618 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3620 #-------------------------------------------------------------------------------
3621 # help - interactive parts of the script _after_ this section please
3622 #-------------------------------------------------------------------------------
3624 # next, emit a usage message if something failed.
3625 if [ "$OPT_HELP" = "yes" ]; then
3626 [ "x$ERROR" = "xyes" ] && echo
3627 if [ "$CFG_NIS" = "no" ]; then
3634 if [ "$CFG_CUPS" = "no" ]; then
3641 if [ "$CFG_ICONV" = "no" ]; then
3648 if [ "$CFG_LARGEFILE" = "no" ]; then
3655 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3662 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3670 if [ "$CFG_XCB" = "no" ]; then
3678 if [ "$CFG_WAYLAND" = "no" ]; then
3685 if [ "$CFG_XINPUT2" = "no" ]; then
3694 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3695 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3696 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3697 [-release] [-debug] [-debug-and-release]
3698 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3699 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3700 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3701 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3702 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3703 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3704 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3705 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3706 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3707 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3708 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3709 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3710 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3711 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3712 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3713 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3714 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3715 [-no-openssl] [-openssl] [-openssl-linked]
3716 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3717 [-no-javascript-jit] [-javascript-jit]
3718 [-no-script] [-script] [-no-scripttools] [-scripttools]
3719 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3720 [-no-location] [-location]
3721 [additional platform specific options (see below)]
3724 Installation options:
3726 -qpa ................ This will enable the QPA build.
3727 QPA is a window system agnostic implementation of Qt.
3729 These are optional, but you may specify install directories.
3731 -prefix <dir> ...... This will install everything relative to <dir>
3732 (default $QT_INSTALL_PREFIX)
3734 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3737 -hostprefix [dir] .. Tools and libraries needed when developing
3738 applications are installed in [dir]. If [dir] is
3739 not given, the current build directory will be used.
3744 * -prefix-install .... Force a sandboxed "local" installation of
3745 Qt. This will install into
3746 $QT_INSTALL_PREFIX, if this option is
3747 disabled then some platforms will attempt a
3748 "system" install by placing default values to
3749 be placed in a system location other than
3752 You may use these to separate different parts of the install:
3754 -bindir <dir> ......... Executables will be installed to <dir>
3755 (default PREFIX/bin)
3756 -libdir <dir> ......... Libraries will be installed to <dir>
3757 (default PREFIX/lib)
3758 -docdir <dir> ......... Documentation will be installed to <dir>
3759 (default PREFIX/doc)
3760 -headerdir <dir> ...... Headers will be installed to <dir>
3761 (default PREFIX/include)
3762 -plugindir <dir> ...... Plugins will be installed to <dir>
3763 (default PREFIX/plugins)
3764 -importdir <dir> ...... Imports for QML will be installed to <dir>
3765 (default PREFIX/imports)
3766 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3768 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3769 (default PREFIX/translations)
3770 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3771 (default PREFIX/etc/settings)
3772 -examplesdir <dir> .... Examples will be installed to <dir>
3773 (default PREFIX/examples)
3777 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3778 that needs to be evaluated. If the evaluation succeeds, the feature is
3779 included. Here is a short explanation of each option:
3781 * -release ........... Compile and link Qt with debugging turned off.
3782 -debug ............. Compile and link Qt with debugging turned on.
3783 -debug-and-release . Compile and link two versions of Qt, with and without
3784 debugging turned on (Mac only).
3786 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3788 -opensource ........ Compile and link the Open-Source Edition of Qt.
3789 -commercial ........ Compile and link the Commercial Edition of Qt.
3792 * -shared ............ Create and use shared Qt libraries.
3793 -static ............ Create and use static Qt libraries.
3795 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3797 -fast .............. Configure Qt quickly by generating Makefiles only for
3798 library and subdirectory targets. All other Makefiles
3799 are created as wrappers, which will in turn run qmake.
3801 -no-largefile ...... Disables large file support.
3802 + -largefile ......... Enables Qt to access files larger than 4 GB.
3805 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3812 if [ "$CFG_DBUS" = "no" ]; then
3821 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3822 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3824 -no-accessibility .. Do not compile Accessibility support.
3825 * -accessibility ..... Compile Accessibility support.
3827 $SHN -no-stl ............ Do not compile STL support.
3828 $SHY -stl ............... Compile STL support.
3830 -no-sql-<driver> ... Disable SQL <driver> entirely.
3831 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3833 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3836 Possible values for <driver>:
3837 [ $CFG_SQL_AVAILABLE ]
3839 -system-sqlite ..... Use sqlite from the operating system.
3841 -no-qt3support ..... Disables the Qt 3 support functionality.
3842 * -qt3support ........ Enables the Qt 3 support functionality.
3844 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3845 + -xmlpatterns ....... Build the QtXmlPatterns module.
3846 QtXmlPatterns is built if a decent C++ compiler
3847 is used and exceptions are enabled.
3849 -no-multimedia ..... Do not build the QtMultimedia module.
3850 + -multimedia ........ Build the QtMultimedia module.
3852 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3853 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3855 -no-phonon ......... Do not build the Phonon module.
3856 + -phonon ............ Build the Phonon module.
3857 Phonon is built if a decent C++ compiler is used.
3858 -no-phonon-backend.. Do not build the platform phonon plugin.
3859 + -phonon-backend..... Build the platform phonon plugin.
3861 -no-svg ............ Do not build the SVG module.
3862 + -svg ............... Build the SVG module.
3864 -no-webkit ......... Do not build the WebKit module.
3865 + -webkit ............ Build the WebKit module.
3866 WebKit is built if a decent C++ compiler is used.
3867 -webkit-debug ...... Build the WebKit module with debug symbols.
3869 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3870 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3872 -no-script ......... Do not build the QtScript module.
3873 + -script ............ Build the QtScript module.
3875 -no-scripttools .... Do not build the QtScriptTools module.
3876 + -scripttools ....... Build the QtScriptTools module.
3878 -no-v8 ............. Do not build the V8 module.
3879 + -v8 ................ Build the V8 module.
3881 -no-declarative ..... Do not build the declarative module.
3882 + -declarative ....... Build the declarative module.
3884 -no-declarative-debug ..... Do not build the declarative debugging support.
3885 + -declarative-debug ....... Build the declarative debugging support.
3887 -no-location ....... Do not build the QtLocation module.
3888 + -location .......... Build the QtLocation module.
3890 -platform target ... The operating system and compiler you are building
3893 See the README file for a list of supported
3894 operating systems and compilers.
3897 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3899 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3900 raster - Software rasterizer
3901 opengl - Rendering via OpenGL, Experimental!
3902 openvg - Rendering via OpenVG, Experimental!
3909 -no-mmx ............ Do not compile with use of MMX instructions.
3910 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3911 -no-sse ............ Do not compile with use of SSE instructions.
3912 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3913 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3914 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3915 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3916 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3917 -no-avx ............ Do not compile with use of AVX instructions.
3918 -no-neon ........... Do not compile with use of NEON instructions.
3920 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3921 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3923 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3925 -D <string> ........ Add an explicit define to the preprocessor.
3926 -I <string> ........ Add an explicit include path.
3927 -L <string> ........ Add an explicit library path.
3929 -help, -h .......... Display this information.
3931 Third Party Libraries:
3933 -qt-zlib ........... Use the zlib bundled with Qt.
3934 + -system-zlib ....... Use zlib from the operating system.
3935 See http://www.gzip.org/zlib
3937 -no-gif ............ Do not compile GIF reading support.
3939 -no-libtiff ........ Do not compile TIFF support.
3940 -qt-libtiff ........ Use the libtiff bundled with Qt.
3941 + -system-libtiff .... Use libtiff from the operating system.
3942 See http://www.libtiff.org
3944 -no-libpng ......... Do not compile PNG support.
3945 -qt-libpng ......... Use the libpng bundled with Qt.
3946 + -system-libpng ..... Use libpng from the operating system.
3947 See http://www.libpng.org/pub/png
3949 -no-libmng ......... Do not compile MNG support.
3950 -qt-libmng ......... Use the libmng bundled with Qt.
3951 + -system-libmng ..... Use libmng from the operating system.
3952 See http://www.libmng.com
3954 -no-libjpeg ........ Do not compile JPEG support.
3955 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3956 + -system-libjpeg .... Use libjpeg from the operating system.
3957 See http://www.ijg.org
3959 -no-openssl ........ Do not compile support for OpenSSL.
3960 + -openssl ........... Enable run-time OpenSSL support.
3961 -openssl-linked .... Enabled linked OpenSSL support.
3963 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3968 -make <part> ....... Add part to the list of parts to be built at make time.
3969 ($QT_DEFAULT_BUILD_PARTS)
3970 -nomake <part> ..... Exclude part from the list of parts to be built.
3972 -R <string> ........ Add an explicit runtime library path to the Qt
3974 -l <string> ........ Add an explicit library.
3976 -no-rpath .......... Do not use the library install path as a runtime
3978 + -rpath ............. Link Qt libraries and executables using the library
3979 install path as a runtime library path. Equivalent
3980 to -R install_libpath
3982 -continue .......... Continue as far as possible if an error occurs.
3984 -verbose, -v ....... Print verbose information about each step of the
3987 -silent ............ Reduce the build output so that warnings and errors
3988 can be seen more easily.
3990 * -no-optimized-qmake ... Do not build qmake optimized.
3991 -optimized-qmake ...... Build qmake optimized.
3993 -no-gui ............ Don't build the Qt GUI library
3995 $NSN -no-nis ............ Do not compile NIS support.
3996 $NSY -nis ............... Compile NIS support.
3998 $CUN -no-cups ........... Do not compile CUPS support.
3999 $CUY -cups .............. Compile CUPS support.
4000 Requires cups/cups.h and libcups.so.2.
4002 $CIN -no-iconv .......... Do not compile support for iconv(3).
4003 $CIY -iconv ............. Compile support for iconv(3).
4005 $PHN -no-pch ............ Do not use precompiled header support.
4006 $PHY -pch ............... Use precompiled header support.
4008 $DBN -no-dbus ........... Do not compile the QtDBus module.
4009 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
4010 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
4012 -reduce-relocations ..... Reduce relocations in the libraries through extra
4013 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
4014 experimental; needs GNU ld >= 2.18).
4017 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
4018 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
4025 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4033 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4037 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4038 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4040 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
4041 $XCBY -xcb ............... Compile Xcb support.
4043 $XWN -no-wayland......... Do not compile Wayland support.
4044 $XWY -wayland .......... Compile Wayland support.
4050 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4054 $X2N -no-xinput2......... Do not compile XInput2 support.
4055 $X2Y -xinput2............ Compile XInput2 support.
4061 if [ "$PLATFORM_X11" = "yes" ]; then
4062 if [ "$CFG_SM" = "no" ]; then
4069 if [ "$CFG_XSHAPE" = "no" ]; then
4076 if [ "$CFG_XVIDEO" = "no" ]; then
4083 if [ "$CFG_XINERAMA" = "no" ]; then
4090 if [ "$CFG_FONTCONFIG" = "no" ]; then
4097 if [ "$CFG_XCURSOR" = "no" ]; then
4104 if [ "$CFG_XFIXES" = "no" ]; then
4111 if [ "$CFG_XRANDR" = "no" ]; then
4118 if [ "$CFG_XRENDER" = "no" ]; then
4125 if [ "$CFG_MITSHM" = "no" ]; then
4132 if [ "$CFG_XINPUT" = "no" ]; then
4139 if [ "$CFG_XKB" = "no" ]; then
4146 if [ "$CFG_IM" = "no" ]; then
4157 -no-gtkstyle ....... Do not build the GTK theme integration.
4158 + -gtkstyle .......... Build the GTK theme integration.
4160 * -no-nas-sound ...... Do not compile in NAS sound support.
4161 -system-nas-sound .. Use NAS libaudio from the operating system.
4162 See http://radscan.com/nas.html
4164 -egl ............... Use EGL instead of GLX to manage contexts.
4165 When building for desktop OpenGL, this option will
4166 make Qt use EGL to manage contexts rather than the
4167 GLX, which is the default. Note: For OpenGL ES, EGL
4170 -no-opengl ......... Do not support OpenGL.
4171 + -opengl <api> ...... Enable OpenGL support.
4172 With no parameter, this will auto-detect the "best"
4173 OpenGL API to use. If desktop OpenGL is available, it
4174 will be used. Use desktop or es2 for <api>
4175 to force the use of the Desktop OpenGL or
4176 OpenGL ES 2 APIs instead.
4178 -no-openvg ........ Do not support OpenVG.
4179 + -openvg ........... Enable OpenVG support.
4180 Requires EGL support, typically supplied by an OpenGL
4181 or other graphics implementation.
4183 $SMN -no-sm ............. Do not support X Session Management.
4184 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4186 $SHN -no-xshape ......... Do not compile XShape support.
4187 $SHY -xshape ............ Compile XShape support.
4188 Requires X11/extensions/shape.h.
4190 $XVN -no-xvideo ......... Do not compile XVideo support.
4191 $XVY -xvideo ............ Compile XVideo support.
4192 Requires X11/extensions/Xv.h & Xvlib.h.
4194 $SHN -no-xsync .......... Do not compile XSync support.
4195 $SHY -xsync ............. Compile XSync support.
4196 Requires X11/extensions/sync.h.
4198 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4199 $XAY -xinerama .......... Compile Xinerama support.
4200 Requires X11/extensions/Xinerama.h and libXinerama.
4201 By default, Xinerama support will be compiled if
4202 available and the shared libraries are dynamically
4205 $XCN -no-xcursor ........ Do not compile Xcursor support.
4206 $XCY -xcursor ........... Compile Xcursor support.
4207 Requires X11/Xcursor/Xcursor.h and libXcursor.
4208 By default, Xcursor support will be compiled if
4209 available and the shared libraries are dynamically
4212 $XFN -no-xfixes ......... Do not compile Xfixes support.
4213 $XFY -xfixes ............ Compile Xfixes support.
4214 Requires X11/extensions/Xfixes.h and libXfixes.
4215 By default, Xfixes support will be compiled if
4216 available and the shared libraries are dynamically
4219 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4220 $XZY -xrandr ............ Compile Xrandr support.
4221 Requires X11/extensions/Xrandr.h and libXrandr.
4223 $XRN -no-xrender ........ Do not compile Xrender support.
4224 $XRY -xrender ........... Compile Xrender support.
4225 Requires X11/extensions/Xrender.h and libXrender.
4227 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4228 $XMY -mitshm ............ Compile MIT-SHM support.
4229 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4231 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4232 $FCGY -fontconfig ........ Compile FontConfig support.
4233 Requires fontconfig/fontconfig.h, libfontconfig,
4234 freetype.h and libfreetype.
4236 $XIN -no-xinput ......... Do not compile Xinput support.
4237 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4238 which requires IRIX with wacom.h and libXi or
4239 XFree86 with X11/extensions/XInput.h and libXi.
4241 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4242 $XKY -xkb ............... Compile XKB support.
4247 if [ "$PLATFORM_MAC" = "yes" ]; then
4252 -Fstring ........... Add an explicit framework path.
4253 -fw string ......... Add an explicit framework.
4255 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4257 -carbon .............Build the Carbon version of Qt. 64-bit archs
4258 are not supported by carbon and will be built
4261 * -framework ......... Build Qt as a series of frameworks and
4262 link tools against those frameworks.
4263 -no-framework ...... Do not build Qt as a series of frameworks.
4265 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4266 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4268 -universal ......... Equivalent to -arch "ppc x86"
4270 -arch <arch> ....... Build Qt for <arch>
4271 Example values for <arch>: x86 ppc x86_64 ppc64
4272 Multiple -arch arguments can be specified.
4274 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4275 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4277 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4278 It is only available to Cocoa builds.
4279 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4280 QT_ENABLE_HARFBUZZ environment variable.
4285 if [ "$PLATFORM_QWS" = "yes" ]; then
4287 Qt for Embedded Linux:
4289 -embedded <arch> .... This will enable the embedded build, you must have a
4290 proper license for this switch to work.
4291 Example values for <arch>: arm mips x86 generic
4295 if [ "$PLATFORM_QPA" = "yes" ]; then
4301 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4304 -xplatform target ... The target platform when cross-compiling.
4306 -no-feature-<feature> Do not compile in <feature>.
4307 -feature-<feature> .. Compile in <feature>. The available features
4308 are described in src/corelib/global/qfeatures.txt
4310 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4311 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4313 The floating point format is usually autodetected by configure. Use this
4314 to override the detected value.
4316 -little-endian ...... Target platform is little endian (LSB first).
4317 -big-endian ......... Target platform is big endian (MSB first).
4319 -host-little-endian . Host platform is little endian (LSB first).
4320 -host-big-endian .... Host platform is big endian (MSB first).
4322 You only need to specify the endianness when
4323 cross-compiling, otherwise the host
4324 endianness will be used.
4326 -no-freetype ........ Do not compile in Freetype2 support.
4327 -qt-freetype ........ Use the libfreetype bundled with Qt.
4328 * -system-freetype .... Use libfreetype from the operating system.
4329 See http://www.freetype.org/
4331 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4332 default ($CFG_QCONFIG).
4334 -no-opengl .......... Do not support OpenGL.
4335 -opengl <api> ....... Enable OpenGL ES support
4336 With no parameter, this will attempt to auto-detect
4337 OpenGL ES 2, or regular desktop OpenGL.
4338 Use es2 for <api> to override auto-detection.
4342 if [ "$PLATFORM_QWS" = "yes" ]; then
4345 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4346 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4348 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4349 by default all available decorations are on.
4350 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4351 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4352 linked to at run time.
4353 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4354 -no-decoration-<style> ....Disable decoration <style> entirely.
4355 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4357 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4358 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4359 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4360 linked to at run time.
4361 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4362 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4363 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4365 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4366 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4368 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4370 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4372 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4373 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4375 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4376 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4377 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4379 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4380 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4381 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4383 -iwmmxt ............ Compile using the iWMMXt instruction set
4384 (available on some XScale CPUs).
4388 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4389 if [ "$CFG_GLIB" = "no" ]; then
4397 $GBN -no-glib ........... Do not compile Glib support.
4398 $GBY -glib .............. Compile Glib support.
4403 [ "x$ERROR" = "xyes" ] && exit 1
4408 # -----------------------------------------------------------------------------
4409 # LICENSING, INTERACTIVE PART
4410 # -----------------------------------------------------------------------------
4412 if [ "$PLATFORM_QWS" = "yes" ]; then
4413 Platform="Qt for Embedded Linux"
4414 elif [ "$PLATFORM_QPA" = "yes" ]; then
4415 Platform="Qt Lighthouse"
4416 elif [ "$PLATFORM_MAC" = "yes" ]; then
4417 Platform="Qt for Mac OS X"
4418 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4419 Platform="Qt for Windows"
4420 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4422 Platform="Qt for Linux/X11"
4426 echo "This is the $Platform ${EditionString} Edition."
4429 if [ "$Edition" = "NokiaInternalBuild" ]; then
4430 echo "Detected -nokia-developer option"
4431 echo "Nokia employees and agents are allowed to use this software under"
4432 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4433 elif [ "$Edition" = "OpenSource" ]; then
4435 echo "You are licensed to use this software under the terms of"
4436 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4437 if [ -f "$relpath/LICENSE.GPL3" ]; then
4438 echo "You are also licensed to use this software under the terms of"
4439 echo "the GNU General Public License (GPL) versions 3."
4445 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4446 echo "You have already accepted the terms of the $LicenseType license."
4449 if [ -f "$relpath/LICENSE.GPL3" ]; then
4450 echo "Type '3' to view the GNU General Public License version 3."
4452 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4453 echo "Type 'yes' to accept this license offer."
4454 echo "Type 'no' to decline this license offer."
4456 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4460 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4462 elif [ "$acceptance" = "no" ]; then
4463 echo "You are not licensed to use this software."
4466 elif [ "$acceptance" = "3" ]; then
4467 more "$relpath/LICENSE.GPL3"
4468 elif [ "$acceptance" = "L" ]; then
4469 more "$relpath/LICENSE.LGPL"
4472 elif [ "$Edition" = "Preview" ]; then
4473 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4476 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4477 echo "You have already accepted the terms of the $LicenseType license."
4480 echo "You are licensed to use this software under the terms of"
4481 echo "the $TheLicense"
4483 echo "Type '?' to read the Preview License."
4484 echo "Type 'yes' to accept this license offer."
4485 echo "Type 'no' to decline this license offer."
4487 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4491 if [ "$acceptance" = "yes" ]; then
4493 elif [ "$acceptance" = "no" ] ;then
4494 echo "You are not licensed to use this software."
4497 elif [ "$acceptance" = "?" ]; then
4498 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4501 elif [ "$Edition" != "OpenSource" ]; then
4502 if [ -n "$ExpiryDate" ]; then
4503 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4504 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4505 Today=`date +%Y%m%d`
4506 if [ "$Today" -gt "$ExpiryDate" ]; then
4507 case "$LicenseType" in
4508 Commercial|Academic|Educational)
4509 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4511 echo "NOTICE NOTICE NOTICE NOTICE"
4513 echo " Your support and upgrade period has expired."
4515 echo " You are no longer licensed to use this version of Qt."
4516 echo " Please contact qt-info@nokia.com to renew your support"
4517 echo " and upgrades for this license."
4519 echo "NOTICE NOTICE NOTICE NOTICE"
4524 echo "WARNING WARNING WARNING WARNING"
4526 echo " Your support and upgrade period has expired."
4528 echo " You may continue to use your last licensed release"
4529 echo " of Qt under the terms of your existing license"
4530 echo " agreement. But you are not entitled to technical"
4531 echo " support, nor are you entitled to use any more recent"
4532 echo " Qt releases."
4534 echo " Please contact qt-info@nokia.com to renew your"
4535 echo " support and upgrades for this license."
4537 echo "WARNING WARNING WARNING WARNING"
4544 echo "NOTICE NOTICE NOTICE NOTICE"
4546 echo " Your Evaluation license has expired."
4548 echo " You are no longer licensed to use this software. Please"
4549 echo " contact qt-info@nokia.com to purchase license, or install"
4550 echo " the Qt Open Source Edition if you intend to develop free"
4553 echo "NOTICE NOTICE NOTICE NOTICE"
4560 TheLicense=`head -n 1 "$outpath/LICENSE"`
4562 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4563 echo "You have already accepted the terms of the $TheLicense."
4566 echo "You are licensed to use this software under the terms of"
4567 echo "the $TheLicense."
4569 echo "Type '?' to view the $TheLicense."
4570 echo "Type 'yes' to accept this license offer."
4571 echo "Type 'no' to decline this license offer."
4573 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4577 if [ "$acceptance" = "yes" ]; then
4579 elif [ "$acceptance" = "no" ]; then
4580 echo "You are not licensed to use this software."
4583 else [ "$acceptance" = "?" ]
4584 more "$outpath/LICENSE"
4589 # this should be moved somewhere else
4592 AIX_VERSION=`uname -v`
4593 if [ "$AIX_VERSION" -lt "5" ]; then
4594 QMakeVar add QMAKE_LIBS_X11 -lbind
4601 #-------------------------------------------------------------------------------
4602 # generate qconfig.cpp
4603 #-------------------------------------------------------------------------------
4604 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4606 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4607 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4608 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4609 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4610 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4611 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4612 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4613 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4614 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4615 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4616 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4617 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4618 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4620 TODAY=`date +%Y-%m-%d`
4621 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4623 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4624 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4626 /* Installation date */
4627 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4631 if [ ! -z "$QT_HOST_PREFIX" ]; then
4632 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4633 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4634 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4635 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4636 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4637 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4638 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4639 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4640 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4641 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4642 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4644 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4646 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4647 /* Installation Info */
4648 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4649 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4650 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4651 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4652 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4653 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4654 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4655 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4656 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4657 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4658 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4659 #else // QT_BOOTSTRAPPED
4663 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4664 /* Installation Info */
4665 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4666 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4667 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4668 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4669 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4670 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4671 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4672 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4673 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4674 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4675 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4678 if [ ! -z "$QT_HOST_PREFIX" ]; then
4679 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4680 #endif // QT_BOOTSTRAPPED
4685 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4686 /* strlen( "qt_lcnsxxxx" ) == 12 */
4687 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4688 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4689 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4690 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4691 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4692 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4693 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4694 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4695 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4696 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4697 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4698 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4699 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4702 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4703 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4704 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4706 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4707 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4708 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4711 # -----------------------------------------------------------------------------
4712 if [ "$LicenseType" = "Evaluation" ]; then
4713 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4714 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4715 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4718 if [ -n "$EVALKEY" ]; then
4719 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4720 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4721 /* Evaluation license key */
4722 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4724 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4728 # -----------------------------------------------------------------------------
4730 # -----------------------------------------------------------------------------
4733 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4735 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4736 if [ "$OPT_SHADOW" = "yes" ]; then
4737 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4738 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4739 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4744 # $2: optional transformation
4745 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4746 # is where the resulting variable is written to
4747 # Assumes that the optional transformation produces the same variable name for each hit
4748 setBootstrapVariable()
4750 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4756 valStart = index($0, "=") + 1
4759 if (substr($0, valStart - 2, 1) == "+") {
4763 variable = substr($0, 0, valStart - 2 - append)
4764 value = substr($0, valStart)
4765 gsub("[ \t]+", "", variable)
4766 gsub("^[ \t]+", "", value)
4767 gsub("[ \t]+$", "", value)
4769 if (append == 1 && length(combinedValue) > 0) {
4770 combinedValue = combinedValue " " value
4772 combinedValue = value
4776 if (length(combinedValue) > 0) {
4777 printf "%s = %s\n", variable, combinedValue
4783 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4784 echo "Creating qmake. Please wait..."
4787 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4788 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4789 if [ -f "$QCONFIG_H" ]; then
4790 OLD_QCONFIG_H=$QCONFIG_H
4791 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4794 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4795 # when building qmake, we use #defines for the install paths,
4796 # however they are real functions in the library
4797 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4798 mkdir -p "$outpath/src/corelib/global"
4799 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4800 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4803 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4805 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4806 rm -rf mkspecs/default
4807 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4809 for mkfile in GNUmakefile Makefile; do
4812 in_mkfile="${mkfile}.in"
4813 if [ "$mkfile" = "Makefile" ]; then
4814 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4815 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4817 in_mkfile="${mkfile}.unix"
4819 in_mkfile="$relpath/qmake/$in_mkfile"
4820 mkfile="$outpath/qmake/$mkfile"
4821 if [ -f "$mkfile" ]; then
4822 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4825 [ -f "$in_mkfile" ] || continue
4827 echo "########################################################################" > "$mkfile"
4828 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4829 echo "########################################################################" >> "$mkfile"
4832 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4833 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4834 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4836 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4837 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4840 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4841 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4842 if [ "$CFG_SILENT" = "yes" ]; then
4843 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4844 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4846 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4847 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4849 setBootstrapVariable QMAKE_CFLAGS
4850 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4851 setBootstrapVariable QMAKE_LFLAGS
4853 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4854 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4855 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4857 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4858 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4859 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4860 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4861 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4862 elif [ "$CFG_DEBUG" = "yes" ]; then
4863 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4864 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4865 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4866 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4869 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4870 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4871 for rpath in $RPATH_FLAGS; do
4872 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4875 if [ "$BUILD_ON_MAC" = "yes" ]; then
4876 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4877 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4878 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4879 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4880 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4881 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4882 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4883 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4884 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4885 X86_CFLAGS="-arch i386"
4886 X86_LFLAGS="-arch i386"
4887 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4888 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4889 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4891 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4892 PPC_CFLAGS="-arch ppc"
4893 PPC_LFLAGS="-arch ppc"
4894 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4895 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4896 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4898 if [ '!' -z "$CFG_SDK" ]; then
4899 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4900 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4901 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4902 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4903 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4906 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4907 if [ '!' -z "$D_FLAGS" ]; then
4908 for DEF in $D_FLAGS; do
4909 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4912 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4913 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4914 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4915 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4917 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4918 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4919 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4920 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4921 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4922 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4923 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4924 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4925 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4926 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4928 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4929 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4930 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4931 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4936 QMAKE_BUILD_ERROR=no
4937 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4938 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4939 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4940 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4943 #-------------------------------------------------------------------------------
4944 # tests that need qmake
4945 #-------------------------------------------------------------------------------
4947 # detect availability of float math.h functions
4948 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4949 CFG_USE_FLOATMATH=yes
4951 CFG_USE_FLOATMATH=no
4954 # detect mmx support
4955 if [ "${CFG_MMX}" = "auto" ]; then
4956 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4963 # detect 3dnow support
4964 if [ "${CFG_3DNOW}" = "auto" ]; then
4965 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4972 # detect sse support
4973 if [ "${CFG_SSE}" = "auto" ]; then
4974 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4981 # detect sse2 support
4982 if [ "${CFG_SSE2}" = "auto" ]; then
4983 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4990 # detect sse3 support
4991 if [ "${CFG_SSE3}" = "auto" ]; then
4992 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4999 # detect ssse3 support
5000 if [ "${CFG_SSSE3}" = "auto" ]; then
5001 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
5008 # detect sse4.1 support
5009 if [ "${CFG_SSE4_1}" = "auto" ]; then
5010 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
5017 # detect sse4.2 support
5018 if [ "${CFG_SSE4_2}" = "auto" ]; then
5019 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
5026 # detect avx support
5027 if [ "${CFG_AVX}" = "auto" ]; then
5028 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5035 # check iWMMXt support
5036 if [ "$CFG_IWMMXT" = "yes" ]; then
5037 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5038 if [ $? != "0" ]; then
5039 echo "The iWMMXt functionality test failed!"
5040 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5045 # detect neon support
5046 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5047 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
5054 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5057 if [ "$CFG_ZLIB" = "no" ]; then
5058 # Note: Qt no longer support builds without zlib
5059 # So we force a "no" to be "auto" here.
5060 # If you REALLY really need no zlib support, you can still disable
5061 # it by doing the following:
5062 # add "no-zlib" to mkspecs/qconfig.pri
5063 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5065 # There's no guarantee that Qt will build under those conditions
5070 if [ "$CFG_ZLIB" = "auto" ]; then
5071 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
5078 if [ "$CFG_LARGEFILE" = "auto" ]; then
5079 #Large files should be enabled for all Linux systems
5083 # detect how jpeg should be built
5084 if [ "$CFG_JPEG" = "auto" ]; then
5085 if [ "$CFG_SHARED" = "yes" ]; then
5092 if [ "$CFG_LIBJPEG" = "auto" ]; then
5093 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
5100 # detect how gif should be built
5101 if [ "$CFG_GIF" = "auto" ]; then
5102 if [ "$CFG_SHARED" = "yes" ]; then
5109 # detect how tiff should be built
5110 if [ "$CFG_TIFF" = "auto" ]; then
5111 if [ "$CFG_SHARED" = "yes" ]; then
5119 if [ "$CFG_LIBTIFF" = "auto" ]; then
5120 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
5127 # detect how mng should be built
5128 if [ "$CFG_MNG" = "auto" ]; then
5129 if [ "$CFG_SHARED" = "yes" ]; then
5136 if [ "$CFG_LIBMNG" = "auto" ]; then
5137 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
5145 if [ "$CFG_LIBPNG" = "auto" ]; then
5146 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
5153 # detect accessibility
5154 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5155 CFG_ACCESSIBILITY=yes
5158 # auto-detect SQL-modules support
5159 for _SQLDR in $CFG_SQL_AVAILABLE; do
5162 if [ "$CFG_SQL_mysql" != "no" ]; then
5163 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5164 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5165 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5166 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5167 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5168 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5169 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5171 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5172 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5173 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5174 echo " You need MySql 4 or higher."
5175 echo " If you believe this message is in error you may use the continue"
5176 echo " switch (-continue) to $0 to continue."
5181 QT_LFLAGS_MYSQL_R=""
5185 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
5186 QMakeVar add CONFIG use_libmysqlclient_r
5187 if [ "$CFG_SQL_mysql" = "auto" ]; then
5188 CFG_SQL_mysql=plugin
5190 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5191 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
5192 if [ "$CFG_SQL_mysql" = "auto" ]; then
5193 CFG_SQL_mysql=plugin
5196 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5197 echo "MySQL support cannot be enabled due to functionality tests!"
5198 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5199 echo " If you believe this message is in error you may use the continue"
5200 echo " switch (-continue) to $0 to continue."
5205 QT_LFLAGS_MYSQL_R=""
5213 if [ "$CFG_SQL_psql" != "no" ]; then
5214 # Be careful not to use native pg_config when cross building.
5215 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5216 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5217 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5219 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5220 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5221 # But, respect PSQL_LIBS if set
5222 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5223 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
5224 if [ "$CFG_SQL_psql" = "auto" ]; then
5228 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5229 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5230 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5231 echo " If you believe this message is in error you may use the continue"
5232 echo " switch (-continue) to $0 to continue."
5243 if [ "$CFG_SQL_odbc" != "no" ]; then
5244 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
5245 if [ "$CFG_SQL_odbc" = "auto" ]; then
5249 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
5250 QT_LFLAGS_ODBC="-liodbc"
5251 if [ "$CFG_SQL_odbc" = "auto" ]; then
5255 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5256 echo "ODBC support cannot be enabled due to functionality tests!"
5257 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5258 echo " If you believe this message is in error you may use the continue"
5259 echo " switch (-continue) to $0 to continue."
5269 if [ "$CFG_SQL_oci" != "no" ]; then
5270 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
5271 if [ "$CFG_SQL_oci" = "auto" ]; then
5275 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5276 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5277 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5278 echo " If you believe this message is in error you may use the continue"
5279 echo " switch (-continue) to $0 to continue."
5288 if [ "$CFG_SQL_tds" != "no" ]; then
5289 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5290 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5291 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
5292 if [ "$CFG_SQL_tds" = "auto" ]; then
5296 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5297 echo "TDS support cannot be enabled due to functionality tests!"
5298 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5299 echo " If you believe this message is in error you may use the continue"
5300 echo " switch (-continue) to $0 to continue."
5309 if [ "$CFG_SQL_db2" != "no" ]; then
5310 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
5311 if [ "$CFG_SQL_db2" = "auto" ]; then
5315 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5316 echo "ODBC support cannot be enabled due to functionality tests!"
5317 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5318 echo " If you believe this message is in error you may use the continue"
5319 echo " switch (-continue) to $0 to continue."
5328 if [ "$CFG_SQL_ibase" != "no" ]; then
5329 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
5330 if [ "$CFG_SQL_ibase" = "auto" ]; then
5331 CFG_SQL_ibase=plugin
5334 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5335 echo "InterBase support cannot be enabled due to functionality tests!"
5336 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5337 echo " If you believe this message is in error you may use the continue"
5338 echo " switch (-continue) to $0 to continue."
5347 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5348 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
5349 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5350 CFG_SQL_sqlite2=plugin
5353 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5354 echo "SQLite2 support cannot be enabled due to functionality tests!"
5355 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5356 echo " If you believe this message is in error you may use the continue"
5357 echo " switch (-continue) to $0 to continue."
5366 if [ "$CFG_SQL_sqlite" != "no" ]; then
5367 SQLITE_AUTODETECT_FAILED="no"
5368 if [ "$CFG_SQLITE" = "system" ]; then
5369 if [ -n "$PKG_CONFIG" ]; then
5370 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5371 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5373 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
5374 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5375 CFG_SQL_sqlite=plugin
5377 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5379 SQLITE_AUTODETECT_FAILED="yes"
5382 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5383 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5384 CFG_SQL_sqlite=plugin
5387 SQLITE_AUTODETECT_FAILED="yes"
5391 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5392 echo "SQLite support cannot be enabled due to functionality tests!"
5393 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5394 echo " If you believe this message is in error you may use the continue"
5395 echo " switch (-continue) to $0 to continue."
5401 if [ "$OPT_VERBOSE" = "yes" ]; then
5402 echo "unknown SQL driver: $_SQLDR"
5408 # auto-detect NIS support
5409 if [ "$CFG_NIS" != "no" ]; then
5410 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
5413 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5414 echo "NIS support cannot be enabled due to functionality tests!"
5415 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5416 echo " If you believe this message is in error you may use the continue"
5417 echo " switch (-continue) to $0 to continue."
5425 # auto-detect CUPS support
5426 if [ "$CFG_CUPS" != "no" ]; then
5427 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
5430 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5431 echo "Cups support cannot be enabled due to functionality tests!"
5432 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5433 echo " If you believe this message is in error you may use the continue"
5434 echo " switch (-continue) to $0 to continue."
5442 # auto-detect iconv(3) support
5443 if [ "$CFG_ICONV" != "no" ]; then
5444 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5446 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
5448 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
5450 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
5453 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5454 echo "Iconv support cannot be enabled due to functionality tests!"
5455 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5456 echo " If you believe this message is in error you may use the continue"
5457 echo " switch (-continue) to $0 to continue."
5465 # auto-detect libdbus-1 support
5466 if [ "$CFG_DBUS" != "no" ]; then
5467 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5468 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5469 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5471 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
5472 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5473 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5474 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5476 if [ "$CFG_DBUS" = "auto" ]; then
5478 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5479 # CFG_DBUS is "yes" or "linked" here
5481 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5482 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5483 echo " If you believe this message is in error you may use the continue"
5484 echo " switch (-continue) to $0 to continue."
5490 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5491 CFG_MULTIMEDIA="$CFG_GUI"
5494 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5495 echo "QtMultimedia requested, but it can't be built without QtGui"
5499 # Generate a CRC of the namespace for using in constants for the Carbon port.
5500 # This should mean that you really *can* load two Qt's and have our custom
5501 # Carbon events work.
5502 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5503 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`
5506 # X11/QWS/Lighthouse
5507 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5509 # auto-detect Glib support
5510 if [ "$CFG_GLIB" != "no" ]; then
5511 if [ -n "$PKG_CONFIG" ]; then
5512 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5513 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5515 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
5517 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5518 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5520 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5521 echo "Glib support cannot be enabled due to functionality tests!"
5522 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5523 echo " If you believe this message is in error you may use the continue"
5524 echo " switch (-continue) to $0 to continue."
5532 if [ "$CFG_GUI" = "no" ]; then
5533 if [ "$CFG_PHONON" = "auto" ]; then
5536 if [ "$CFG_PHONON" != "no" ]; then
5537 echo "Phonon enabled, but GUI disabled."
5538 echo " You might need to either enable the GUI or disable Phonon"
5543 # Auto-detect GStreamer support (needed for Phonon)
5544 if [ "$CFG_PHONON" != "no" ]; then
5545 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5546 if [ -n "$PKG_CONFIG" ]; then
5547 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5548 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5550 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
5552 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5553 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5555 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5556 echo "Gstreamer support cannot be enabled due to functionality tests!"
5557 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5558 echo " If you believe this message is in error you may use the continue"
5559 echo " switch (-continue) to $0 to continue."
5565 elif [ "$CFG_GLIB" = "no" ]; then
5572 if [ "$CFG_PHONON" != "no" ]; then
5573 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5574 if [ "$CFG_GSTREAMER" = "yes" ]; then
5577 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5578 echo "Phonon support cannot be enabled due to functionality tests!"
5579 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5580 echo " If you believe this message is in error you may use the continue"
5581 echo " switch (-continue) to $0 to continue."
5592 # auto-detect icd support
5593 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5594 if [ -n "$PKG_CONFIG" ]; then
5595 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5596 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5598 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
5599 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5600 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5601 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5603 if [ "$CFG_ICD" = "auto" ]; then
5605 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5608 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5609 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5610 echo " If you believe this message is in error you may use the continue"
5611 echo " switch (-continue) to $0 to continue."
5615 elif [ "$CFG_GLIB" = "no" ]; then
5619 # auto-detect libicu support
5620 if [ "$CFG_ICU" != "no" ]; then
5621 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5622 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5624 if [ "$CFG_ICU" = "auto" ]; then
5626 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5629 echo "The ICU library support cannot be enabled."
5630 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5631 echo " If you believe this message is in error you may use the continue"
5632 echo " switch (-continue) to $0 to continue."
5638 # Auto-detect PulseAudio support
5639 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5640 if [ -n "$PKG_CONFIG" ]; then
5641 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5642 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5644 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
5646 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5647 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5649 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5650 echo "PulseAudio support cannot be enabled due to functionality tests!"
5651 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5652 echo " If you believe this message is in error you may use the continue"
5653 echo " switch (-continue) to $0 to continue."
5660 fi # X11/QWS/Lighthouse
5663 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5664 x11tests="$relpath/config.tests/x11"
5667 # work around broken X11 headers when using GCC 2.95 or later
5669 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5670 if [ $NOTYPE = "yes" ]; then
5671 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5672 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5675 # Check we actually have X11 :-)
5676 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5677 if [ $? != "0" ]; then
5678 echo "Basic XLib functionality test failed!"
5679 echo " You might need to modify the include and library search paths by editing"
5680 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5686 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5687 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5688 if [ "$CFG_GUI" = "no" ]; then
5689 if [ "$CFG_OPENGL" = "auto" ]; then
5692 if [ "$CFG_OPENGL" != "no" ]; then
5693 echo "OpenGL enabled, but GUI disabled."
5694 echo " You might need to either enable the GUI or disable OpenGL"
5698 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5699 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
5701 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
5703 if [ "$CFG_EGL" = "no" ]; then
5707 if [ "$CFG_OPENGL" = "yes" ]; then
5708 echo "All the OpenGL functionality tests failed!"
5709 echo " You might need to modify the include and library search paths by editing"
5710 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5711 echo " ${XQMAKESPEC}."
5718 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5719 if [ "$CFG_OPENGL" = "desktop" ]; then
5720 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5721 if [ $? != "0" ]; then
5722 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5729 elif [ "$CFG_OPENGL" = "es2" ]; then
5731 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5732 if [ $? != "0" ]; then
5733 echo "The OpenGL ES 2.0 functionality test failed!"
5734 echo " You might need to modify the include and library search paths by editing"
5735 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5736 echo " ${XQMAKESPEC}."
5739 elif [ "$CFG_OPENGL" = "desktop" ]; then
5740 # Desktop OpenGL support
5741 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5742 if [ $? != "0" ]; then
5743 echo "The OpenGL functionality test failed!"
5744 echo " You might need to modify the include and library search paths by editing"
5745 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5746 echo " ${XQMAKESPEC}."
5751 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5752 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5753 if [ $? != "0" ]; then
5754 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5762 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5763 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5764 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5765 CFG_GRAPHICS_SYSTEM=default
5767 fi # X11/MINGW OpenGL
5770 if [ "$PLATFORM_X11" = "yes" ]; then
5771 # auto-detect Xcursor support
5772 if [ "$CFG_XCURSOR" != "no" ]; then
5773 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
5774 if [ "$CFG_XCURSOR" != "runtime" ]; then
5778 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5779 echo "Xcursor support cannot be enabled due to functionality tests!"
5780 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5781 echo " If you believe this message is in error you may use the continue"
5782 echo " switch (-continue) to $0 to continue."
5790 # auto-detect Xfixes support
5791 if [ "$CFG_XFIXES" != "no" ]; then
5792 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5793 if [ "$CFG_XFIXES" != "runtime" ]; then
5797 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5798 echo "Xfixes support cannot be enabled due to functionality tests!"
5799 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5800 echo " If you believe this message is in error you may use the continue"
5801 echo " switch (-continue) to $0 to continue."
5809 # auto-detect Xrandr support (resize and rotate extension)
5810 if [ "$CFG_XRANDR" != "no" ]; then
5811 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
5812 if [ "$CFG_XRANDR" != "runtime" ]; then
5816 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5817 echo "Xrandr support cannot be enabled due to functionality tests!"
5818 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5819 echo " If you believe this message is in error you may use the continue"
5820 echo " switch (-continue) to $0 to continue."
5828 # auto-detect Xrender support
5829 if [ "$CFG_XRENDER" != "no" ]; then
5830 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
5833 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5834 echo "Xrender support cannot be enabled due to functionality tests!"
5835 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5836 echo " If you believe this message is in error you may use the continue"
5837 echo " switch (-continue) to $0 to continue."
5845 # Additional check to decide if WebKit support will be included
5846 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5847 echo "Warning: -no-xrender will disable the QtWebkit module."
5851 # auto-detect MIT-SHM support
5852 if [ "$CFG_MITSHM" != "no" ]; then
5853 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
5856 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5857 echo "MITSHM support cannot be enabled due to functionality tests!"
5858 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5859 echo " If you believe this message is in error you may use the continue"
5860 echo " switch (-continue) to $0 to continue."
5868 # auto-detect FontConfig support
5869 if [ "$CFG_FONTCONFIG" != "no" ]; then
5870 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5871 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5872 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5874 QT_CFLAGS_FONTCONFIG=
5875 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5877 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
5879 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5880 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5881 CFG_LIBFREETYPE=system
5883 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5884 echo "FontConfig support cannot be enabled due to functionality tests!"
5885 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5886 echo " If you believe this message is in error you may use the continue"
5887 echo " switch (-continue) to $0 to continue."
5895 # auto-detect Session Management support
5896 if [ "$CFG_SM" = "auto" ]; then
5897 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
5900 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5901 echo "Session Management support cannot be enabled due to functionality tests!"
5902 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5903 echo " If you believe this message is in error you may use the continue"
5904 echo " switch (-continue) to $0 to continue."
5912 # auto-detect SHAPE support
5913 if [ "$CFG_XSHAPE" != "no" ]; then
5914 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
5917 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5918 echo "XShape support cannot be enabled due to functionality tests!"
5919 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5920 echo " If you believe this message is in error you may use the continue"
5921 echo " switch (-continue) to $0 to continue."
5929 # auto-detect XVideo support
5930 if [ "$CFG_XVIDEO" != "no" ]; then
5931 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
5934 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5935 echo "XVideo support cannot be enabled due to functionality tests!"
5936 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5937 echo " If you believe this message is in error you may use the continue"
5938 echo " switch (-continue) to $0 to continue."
5946 # auto-detect XSync support
5947 if [ "$CFG_XSYNC" != "no" ]; then
5948 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
5951 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5952 echo "XSync support cannot be enabled due to functionality tests!"
5953 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5954 echo " If you believe this message is in error you may use the continue"
5955 echo " switch (-continue) to $0 to continue."
5963 # auto-detect Xinerama support
5964 if [ "$CFG_XINERAMA" != "no" ]; then
5965 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
5966 if [ "$CFG_XINERAMA" != "runtime" ]; then
5970 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5971 echo "Xinerama support cannot be enabled due to functionality tests!"
5972 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5973 echo " If you believe this message is in error you may use the continue"
5974 echo " switch (-continue) to $0 to continue."
5982 # auto-detect Xinput support
5983 if [ "$CFG_XINPUT" != "no" ]; then
5984 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
5985 if [ "$CFG_XINPUT" != "runtime" ]; then
5989 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5990 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5991 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5992 echo " If you believe this message is in error you may use the continue"
5993 echo " switch (-continue) to $0 to continue."
6001 # auto-detect XKB support
6002 if [ "$CFG_XKB" != "no" ]; then
6003 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
6006 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6007 echo "XKB support cannot be enabled due to functionality tests!"
6008 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6009 echo " If you believe this message is in error you may use the continue"
6010 echo " switch (-continue) to $0 to continue."
6018 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
6019 if [ -n "$PKG_CONFIG" ]; then
6020 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
6021 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
6023 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
6025 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
6026 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
6028 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6029 echo "Gtk theme support cannot be enabled due to functionality tests!"
6030 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6031 echo " If you believe this message is in error you may use the continue"
6032 echo " switch (-continue) to $0 to continue."
6038 elif [ "$CFG_GLIB" = "no" ]; then
6044 if [ "$PLATFORM_MAC" = "yes" ]; then
6045 if [ "$CFG_PHONON" != "no" ]; then
6046 # Always enable Phonon (unless it was explicitly disabled)
6050 if [ "$CFG_COREWLAN" = "auto" ]; then
6051 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
6060 if [ "$PLATFORM_QPA" = "yes" ]; then
6061 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6062 if [ "$CFG_ARCH" = "macosx" ]; then
6064 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6065 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
6067 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
6070 if [ "$CFG_OPENGL" = "yes" ]; then
6071 echo "All the OpenGL functionality tests failed!"
6072 echo " You might need to modify the include and library search paths by editing"
6073 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6074 echo " ${XQMAKESPEC}."
6079 elif [ "$CFG_OPENGL" = "es2" ]; then
6081 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6082 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6083 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6084 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6085 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6086 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6087 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6088 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6091 "$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
6092 if [ $? != "0" ]; then
6093 echo "The OpenGL ES 2.0 functionality test failed!"
6094 echo " You might need to modify the include and library search paths by editing"
6095 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6096 echo " ${XQMAKESPEC}."
6099 elif [ "$CFG_OPENGL" = "desktop" ]; then
6100 # Desktop OpenGL support
6101 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6102 if [ $? != "0" ]; then
6103 echo "The OpenGL functionality test failed!"
6104 echo " You might need to modify the include and library search paths by editing"
6105 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6106 echo " ${XQMAKESPEC}."
6111 # auto-detect FontConfig support
6112 if [ "$CFG_FONTCONFIG" != "no" ]; then
6113 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6114 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6115 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6117 QT_CFLAGS_FONTCONFIG=
6118 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6120 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
6121 QT_CONFIG="$QT_CONFIG fontconfig"
6122 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6123 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6124 CFG_LIBFREETYPE=system
6129 # Save these for a check later
6130 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6131 ORIG_CFG_XCB="$CFG_XCB"
6133 if [ "$CFG_WAYLAND" != "no" ]; then
6134 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6135 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6136 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6137 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6138 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6140 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
6142 QT_CONFIG="$QT_CONFIG wayland"
6143 elif [ "$CFG_WAYLAND" = "yes" ]; then
6144 echo "The Wayland functionality test failed!"
6148 QMakeVar add DEFINES QT_NO_WAYLAND
6152 # Check we actually have X11 :-)
6153 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
6154 QT_CONFIG="$QT_CONFIG xlib"
6157 if [ "$CFG_XCB" != "no" ]; then
6158 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6160 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
6161 QT_CONFIG="$QT_CONFIG xcb-render"
6164 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
6166 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6169 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
6170 QT_CONFIG="$QT_CONFIG xcb-xlib"
6173 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6174 # auto-detect XInput2/Xinput support
6175 if [ "$CFG_XINPUT2" != "no" ]; then
6176 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
6180 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6181 echo "XInput2 support cannot be enabled due to functionality tests!"
6182 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6183 echo " If you believe this message is in error you may use the continue"
6184 echo " switch (-continue) to $0 to continue."
6193 if [ "$CFG_XCB" = "yes" ]; then
6194 echo "The XCB test failed!"
6195 echo " You might need to install dependency packages."
6196 echo " See src/plugins/platforms/xcb/README."
6200 QMakeVar add DEFINES QT_NO_XCB
6204 # Detect libxkbcommon
6205 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6206 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6207 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6208 if [ "$CFG_WAYLAND" = "yes" ]; then
6209 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6210 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6212 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6213 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6215 if [ "$CFG_WAYLAND" = "yes" ]; then
6216 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6218 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6221 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6222 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6223 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6224 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6225 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6226 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6227 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6230 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6231 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6232 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6233 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6236 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
6237 QT_CONFIG="$QT_CONFIG coreservices"
6239 QMakeVar add DEFINES QT_NO_CORESERVICES
6242 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6243 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6244 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6245 echo "No QPA platform plugin enabled!"
6246 echo " If you really want to build without a QPA platform plugin you must pass"
6247 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6248 echo " cannot run GUI applications."
6258 if [ "$PLATFORM_QWS" = "yes" ]; then
6260 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6261 if [ "$CFG_GUI" = "no" ]; then
6262 if [ "$CFG_OPENGL" = "auto" ]; then
6265 if [ "$CFG_OPENGL" != "no" ]; then
6266 echo "OpenGL enabled, but GUI disabled."
6267 echo " You might need to either enable the GUI or disable OpenGL"
6271 if [ "$CFG_OPENGL" = "yes" ]; then
6273 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
6276 elif [ "$CFG_OPENGL" = "es2" ]; then
6278 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6279 if [ $? != "0" ]; then
6280 echo "The OpenGL ES 2.0 functionality test failed!"
6281 echo " You might need to modify the include and library search paths by editing"
6282 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6283 echo " ${XQMAKESPEC}."
6287 elif [ "$CFG_OPENGL" = "desktop" ]; then
6288 # Desktop OpenGL support
6289 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6294 if [ "$PLATFORM_QWS" = "yes" ]; then
6297 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6298 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6299 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6300 if [ $? != "0" ]; then
6301 echo "The Ahi screen driver functionality test failed!"
6302 echo " You might need to modify the include and library search paths by editing"
6303 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6304 echo " ${XQMAKESPEC}."
6309 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6310 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6311 if [ $? != "0" ]; then
6312 echo "The SVGAlib screen driver functionality test failed!"
6313 echo " You might need to modify the include and library search paths by editing"
6314 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6315 echo " ${XQMAKESPEC}."
6320 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6321 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6322 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6323 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6324 elif directfb-config --version >/dev/null 2>&1; then
6325 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6326 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6329 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6330 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6331 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6332 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6335 "$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
6336 if [ $? != "0" ]; then
6337 echo "The DirectFB screen driver functionality test failed!"
6338 echo " You might need to modify the include and library search paths by editing"
6339 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6340 echo " ${XQMAKESPEC}."
6348 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6349 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6350 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6351 if [ $? != "0" ]; then
6352 echo "The tslib functionality test failed!"
6353 echo " You might need to modify the include and library search paths by editing"
6354 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6355 echo " ${XQMAKESPEC}."
6364 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6365 if [ $? != "0" ]; then
6366 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6373 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6374 if [ "$CFG_EGL" != "no" ]; then
6375 # detect EGL support
6376 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
6377 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6382 if [ "$EGL_VARIANT" = "none" ]; then
6383 if [ "$CFG_EGL" = "yes" ]; then
6384 echo "The EGL functionality test failed!"
6385 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6386 echo " You might need to modify the include and library search paths by editing"
6387 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6388 echo " ${XQMAKESPEC}."
6392 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6393 if [ "$CFG_OPENGL" = "es2" ]; then
6400 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6403 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6404 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6405 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6406 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6407 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
6408 CFG_LIBFREETYPE=system
6414 if [ "$CFG_ENDIAN" = "auto" ]; then
6415 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6416 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6417 elif [ "$PLATFORM_MAC" = "yes" ]; then
6420 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6422 if [ "$F" -eq 0 ]; then
6423 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6424 elif [ "$F" -eq 1 ]; then
6425 CFG_ENDIAN="Q_BIG_ENDIAN"
6428 echo "The target system byte order could not be detected!"
6429 echo "Turn on verbose messaging (-v) to see the final report."
6430 echo "You can use the -little-endian or -big-endian switch to"
6431 echo "$0 to continue."
6437 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6438 if [ "$PLATFORM_MAC" = "yes" ]; then
6441 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6443 if [ "$F" -eq 0 ]; then
6444 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6445 elif [ "$F" -eq 1 ]; then
6446 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6449 echo "The host system byte order could not be detected!"
6450 echo "Turn on verbose messaging (-v) to see the final report."
6451 echo "You can use the -host-little-endian or -host-big-endian switch to"
6452 echo "$0 to continue."
6458 if [ "$CFG_ARMFPA" != "auto" ]; then
6459 if [ "$CFG_ARMFPA" = "yes" ]; then
6460 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6461 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6463 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6466 CFG_DOUBLEFORMAT="normal"
6471 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6472 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6473 CFG_DOUBLEFORMAT=normal
6475 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6477 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6478 CFG_DOUBLEFORMAT=normal
6479 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6480 CFG_DOUBLEFORMAT=normal
6481 elif [ "$F" -eq 10 ]; then
6482 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6483 elif [ "$F" -eq 11 ]; then
6484 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6485 elif [ "$F" -eq 12 ]; then
6486 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6488 elif [ "$F" -eq 13 ]; then
6489 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6493 echo "The system floating point format could not be detected."
6494 echo "This may cause data to be generated in a wrong format"
6495 echo "Turn on verbose messaging (-v) to see the final report."
6496 # we do not fail on this since this is a new test, and if it fails,
6497 # the old behavior should be correct in most cases
6498 CFG_DOUBLEFORMAT=normal
6504 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6508 if [ "$CFG_STL" != "no" ]; then
6509 if [ "$HAVE_STL" = "yes" ]; then
6512 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6513 echo "STL support cannot be enabled due to functionality tests!"
6514 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6515 echo " If you believe this message is in error you may use the continue"
6516 echo " switch (-continue) to $0 to continue."
6524 # detect POSIX clock_gettime()
6525 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6526 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
6527 CFG_CLOCK_GETTIME=yes
6529 CFG_CLOCK_GETTIME=no
6533 # detect POSIX monotonic clocks
6534 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6535 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
6536 CFG_CLOCK_MONOTONIC=yes
6538 CFG_CLOCK_MONOTONIC=no
6540 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6541 CFG_CLOCK_MONOTONIC=no
6545 if [ "$CFG_MREMAP" = "auto" ]; then
6546 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6553 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6554 if [ "$CFG_GETADDRINFO" != "no" ]; then
6555 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6558 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6559 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6560 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6561 echo " If you believe this message is in error you may use the continue"
6562 echo " switch (-continue) to $0 to continue."
6570 # find if the platform provides inotify
6571 if [ "$CFG_INOTIFY" != "no" ]; then
6572 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6575 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6576 echo "inotify support cannot be enabled due to functionality tests!"
6577 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6578 echo " If you believe this message is in error you may use the continue"
6579 echo " switch (-continue) to $0 to continue."
6587 # find if the platform provides if_nametoindex (ipv6 interface name support)
6588 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6589 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
6592 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6593 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6594 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6595 echo " If you believe this message is in error you may use the continue"
6596 echo " switch (-continue) to $0 to continue."
6604 # find if the platform provides getifaddrs (network interface enumeration)
6605 if [ "$CFG_GETIFADDRS" != "no" ]; then
6606 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6609 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6610 echo "getifaddrs support cannot be enabled due to functionality tests!"
6611 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6612 echo " If you believe this message is in error you may use the continue"
6613 echo " switch (-continue) to $0 to continue."
6622 if [ "$CFG_OPENSSL" != "no" ]; then
6623 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
6624 if [ "$CFG_OPENSSL" = "auto" ]; then
6628 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6629 echo "OpenSSL support cannot be enabled due to functionality tests!"
6630 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6631 echo " If you believe this message is in error you may use the continue"
6632 echo " switch (-continue) to $0 to continue."
6640 # detect OpenVG support
6641 if [ "$CFG_OPENVG" != "no" ]; then
6642 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
6643 if [ "$CFG_OPENVG" = "auto" ]; then
6646 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
6647 if [ "$CFG_OPENVG" = "auto" ]; then
6650 CFG_OPENVG_ON_OPENGL=yes
6651 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
6652 if [ "$CFG_OPENVG" = "auto" ]; then
6655 CFG_OPENVG_LC_INCLUDES=yes
6656 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
6657 if [ "$CFG_OPENVG" = "auto" ]; then
6660 CFG_OPENVG_LC_INCLUDES=yes
6661 CFG_OPENVG_ON_OPENGL=yes
6663 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6664 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6665 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6666 echo " If you believe this message is in error you may use the continue"
6667 echo " switch (-continue) to $0 to continue."
6673 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
6674 CFG_OPENVG_SHIVA=yes
6678 # if openvg is disabled and the user specified graphicssystem vg, disable it...
6679 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
6680 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
6681 CFG_GRAPHICS_SYSTEM=default
6684 if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
6685 echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
6689 if [ "$CFG_PTMALLOC" != "no" ]; then
6690 # build ptmalloc, copy .a file to lib/
6691 echo "Building ptmalloc. Please wait..."
6692 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
6693 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
6695 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
6698 if [ "$CFG_ALSA" = "auto" ]; then
6699 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6706 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6707 if [ "$CFG_ARCH" = "arm" ]; then
6708 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6709 if [ $? != "0" ]; then
6710 CFG_JAVASCRIPTCORE_JIT=no
6713 case "$XPLATFORM" in
6715 CFG_JAVASCRIPTCORE_JIT=no
6721 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6722 QMakeVar set JAVASCRIPTCORE_JIT yes
6723 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6724 QMakeVar set JAVASCRIPTCORE_JIT no
6727 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6728 CFG_AUDIO_BACKEND=yes
6731 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6732 echo "Warning: largefile support cannot be disabled for win32."
6736 #-------------------------------------------------------------------------------
6737 # ask for all that hasn't been auto-detected or specified in the arguments
6738 #-------------------------------------------------------------------------------
6740 ### fix this: user input should be validated in a loop
6741 if [ "$PLATFORM_QWS" = "yes" ]; then
6742 PROMPT_FOR_DEPTHS="yes"
6744 PROMPT_FOR_DEPTHS="no"
6746 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6748 echo "Choose pixel-depths to support:"
6750 echo " 1. 1bpp, black/white"
6751 echo " 4. 4bpp, grayscale"
6752 echo " 8. 8bpp, paletted"
6753 echo " 12. 12bpp, rgb 4-4-4"
6754 echo " 15. 15bpp, rgb 5-5-5"
6755 echo " 16. 16bpp, rgb 5-6-5"
6756 echo " 18. 18bpp, rgb 6-6-6"
6757 echo " 24. 24bpp, rgb 8-8-8"
6758 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6759 echo " all. All supported depths"
6761 echo "Your choices (default 8,16,32):"
6763 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6764 CFG_QWS_DEPTHS=8,16,32
6767 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6768 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6769 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6771 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6773 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6774 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6779 # enable dwarf2 support on Mac
6780 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6781 QT_CONFIG="$QT_CONFIG dwarf2"
6784 # Set the default arch if there are no "-arch" arguments on the configure line
6785 # For "-carbon" builds: 32 bit x86/ppc.
6786 # For builds on snow leopard : compiler default (64-bit).
6787 # For builds on leopard : compiler default (32-bit).
6788 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6789 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6791 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6792 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6793 CFG_MAC_ARCHS=" x86"
6794 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6795 CFG_MAC_ARCHS=" ppc"
6797 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6800 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6803 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6806 # enable Cocoa and/or Carbon on Mac
6807 # -carbon on the command line disables Cocoa, except for 64-bit archs
6808 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6809 CFG_MAC_CARBON="YES"
6812 # check which archs are in use, enable cocoa if we find a 64-bit one
6813 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6814 CFG_MAC_COCOA="yes";
6815 CFG_MAC_CARBON="no";
6816 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6817 CFG_MAC_CARBON="yes";
6819 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6820 CFG_MAC_CARBON="yes";
6825 # select Carbon on 10.4 Tiger.
6826 if [ "$PLATFORM_MAC" = "yes" ]; then
6827 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6828 if [ "$VERSION" == 8 ]; then
6830 CFG_MAC_CARBON="yes";
6834 # select Carbon when using the 10.4u SDK
6835 if [ "$PLATFORM_MAC" = "yes" ]; then
6836 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6839 CFG_MAC_CARBON="yes";
6843 # but disable Cocoa if cross-building for mingw
6844 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6846 # disable Qt 3 support on VxWorks
6847 case "$XPLATFORM" in
6848 unsupported/vxworks*)
6853 # enable Qt 3 support functionality
6854 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6855 QT_CONFIG="$QT_CONFIG gui-qt3support"
6859 if [ "$CFG_PHONON" = "yes" ]; then
6860 # No longer needed after modularization
6861 #QT_CONFIG="$QT_CONFIG phonon"
6862 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6863 QT_CONFIG="$QT_CONFIG phonon-backend"
6866 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6869 # disable accessibility
6870 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6871 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6873 QT_CONFIG="$QT_CONFIG accessibility"
6876 # egl stuff does not belong in lighthouse, but rather in plugins
6877 if [ "$PLATFORM_QPA" = "yes" ]; then
6882 if [ "$CFG_EGL" = "no" ]; then
6883 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6885 QT_CONFIG="$QT_CONFIG egl"
6886 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6887 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6892 if [ "$CFG_OPENVG" = "no" ]; then
6893 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6895 QT_CONFIG="$QT_CONFIG openvg"
6896 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6897 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6899 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6900 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6902 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6903 QT_CONFIG="$QT_CONFIG shivavg"
6904 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6909 if [ "$CFG_OPENGL" = "no" ]; then
6910 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6912 QT_CONFIG="$QT_CONFIG opengl"
6915 if [ "$CFG_OPENGL" = "es2" ]; then
6916 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6919 if [ "$CFG_OPENGL" = "es2" ]; then
6920 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6921 QT_CONFIG="$QT_CONFIG opengles2"
6924 # safe execution environment
6925 if [ "$CFG_SXE" != "no" ]; then
6926 QT_CONFIG="$QT_CONFIG sxe"
6929 # build up the variables for output
6930 if [ "$CFG_DEBUG" = "yes" ]; then
6931 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6932 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6933 elif [ "$CFG_DEBUG" = "no" ]; then
6934 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6935 QMAKE_CONFIG="$QMAKE_CONFIG release"
6937 if [ "$CFG_SHARED" = "yes" ]; then
6938 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6939 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6940 elif [ "$CFG_SHARED" = "no" ]; then
6941 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6942 QMAKE_CONFIG="$QMAKE_CONFIG static"
6944 if [ "$PLATFORM_QWS" = "yes" ]; then
6945 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6946 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6947 QT_CONFIG="$QT_CONFIG embedded"
6948 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6950 if [ "$PLATFORM_QPA" = "yes" ]; then
6951 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6952 QT_CONFIG="$QT_CONFIG qpa"
6953 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6954 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6957 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6958 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6959 QT_CONFIG="$QT_CONFIG nacl pepper"
6960 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6963 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6964 # Do not set this here for Windows. Let qmake do it so
6965 # debug and release precompiled headers are kept separate.
6966 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6968 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6969 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6970 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6971 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6972 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6973 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6975 if [ "$CFG_STL" = "no" ]; then
6976 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6978 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6980 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6981 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6983 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6984 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6985 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6986 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6987 QMakeVar add QMAKE_CFLAGS -g
6988 QMakeVar add QMAKE_CXXFLAGS -g
6989 QT_CONFIG="$QT_CONFIG separate_debug_info"
6991 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6992 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6994 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6995 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6996 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6997 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6998 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6999 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
7000 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
7001 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
7002 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
7003 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
7004 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
7005 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
7006 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
7007 QT_CONFIG="$QT_CONFIG clock-gettime"
7009 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
7010 QT_CONFIG="$QT_CONFIG clock-monotonic"
7012 if [ "$CFG_MREMAP" = "yes" ]; then
7013 QT_CONFIG="$QT_CONFIG mremap"
7015 if [ "$CFG_GETADDRINFO" = "yes" ]; then
7016 QT_CONFIG="$QT_CONFIG getaddrinfo"
7018 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
7019 QT_CONFIG="$QT_CONFIG ipv6ifname"
7021 if [ "$CFG_GETIFADDRS" = "yes" ]; then
7022 QT_CONFIG="$QT_CONFIG getifaddrs"
7024 if [ "$CFG_INOTIFY" = "yes" ]; then
7025 QT_CONFIG="$QT_CONFIG inotify"
7027 if [ "$CFG_LIBJPEG" = "no" ]; then
7029 elif [ "$CFG_LIBJPEG" = "system" ]; then
7030 QT_CONFIG="$QT_CONFIG system-jpeg"
7032 if [ "$CFG_JPEG" = "no" ]; then
7033 QT_CONFIG="$QT_CONFIG no-jpeg"
7034 elif [ "$CFG_JPEG" = "yes" ]; then
7035 QT_CONFIG="$QT_CONFIG jpeg"
7037 if [ "$CFG_LIBMNG" = "no" ]; then
7039 elif [ "$CFG_LIBMNG" = "system" ]; then
7040 QT_CONFIG="$QT_CONFIG system-mng"
7042 if [ "$CFG_MNG" = "no" ]; then
7043 QT_CONFIG="$QT_CONFIG no-mng"
7044 elif [ "$CFG_MNG" = "yes" ]; then
7045 QT_CONFIG="$QT_CONFIG mng"
7047 if [ "$CFG_LIBPNG" = "no" ]; then
7050 if [ "$CFG_LIBPNG" = "system" ]; then
7051 QT_CONFIG="$QT_CONFIG system-png"
7053 if [ "$CFG_PNG" = "no" ]; then
7054 QT_CONFIG="$QT_CONFIG no-png"
7055 elif [ "$CFG_PNG" = "yes" ]; then
7056 QT_CONFIG="$QT_CONFIG png"
7058 if [ "$CFG_GIF" = "no" ]; then
7059 QT_CONFIG="$QT_CONFIG no-gif"
7060 elif [ "$CFG_GIF" = "yes" ]; then
7061 QT_CONFIG="$QT_CONFIG gif"
7063 if [ "$CFG_LIBTIFF" = "no" ]; then
7065 elif [ "$CFG_LIBTIFF" = "system" ]; then
7066 QT_CONFIG="$QT_CONFIG system-tiff"
7068 if [ "$CFG_TIFF" = "no" ]; then
7069 QT_CONFIG="$QT_CONFIG no-tiff"
7070 elif [ "$CFG_TIFF" = "yes" ]; then
7071 QT_CONFIG="$QT_CONFIG tiff"
7073 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7074 QT_CONFIG="$QT_CONFIG no-freetype"
7075 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7076 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7077 QT_CONFIG="$QT_CONFIG system-freetype"
7079 QT_CONFIG="$QT_CONFIG freetype"
7081 if [ "$CFG_GUI" = "auto" ]; then
7084 if [ "$CFG_GUI" = "no" ]; then
7085 QT_CONFIG="$QT_CONFIG no-gui"
7087 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7091 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7092 #On Mac we implicitly link against libz, so we
7093 #never use the 3rdparty stuff.
7094 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7096 if [ "$CFG_ZLIB" = "yes" ]; then
7097 QT_CONFIG="$QT_CONFIG zlib"
7098 elif [ "$CFG_ZLIB" = "system" ]; then
7099 QT_CONFIG="$QT_CONFIG system-zlib"
7102 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7103 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7104 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7105 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7106 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7107 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7108 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7109 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7110 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7111 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7112 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7113 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7114 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7115 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7116 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7118 if [ "$PLATFORM_X11" = "yes" ]; then
7119 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7121 # for some reason, the following libraries are not always built shared,
7122 # so *every* program/lib (including Qt) has to link against them
7123 if [ "$CFG_XSHAPE" = "yes" ]; then
7124 QT_CONFIG="$QT_CONFIG xshape"
7126 if [ "$CFG_XVIDEO" = "yes" ]; then
7127 QT_CONFIG="$QT_CONFIG xvideo"
7129 if [ "$CFG_XSYNC" = "yes" ]; then
7130 QT_CONFIG="$QT_CONFIG xsync"
7132 if [ "$CFG_XINERAMA" = "yes" ]; then
7133 QT_CONFIG="$QT_CONFIG xinerama"
7134 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7136 if [ "$CFG_XCURSOR" = "yes" ]; then
7137 QT_CONFIG="$QT_CONFIG xcursor"
7138 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7140 if [ "$CFG_XFIXES" = "yes" ]; then
7141 QT_CONFIG="$QT_CONFIG xfixes"
7142 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7144 if [ "$CFG_XRANDR" = "yes" ]; then
7145 QT_CONFIG="$QT_CONFIG xrandr"
7146 if [ "$CFG_XRENDER" != "yes" ]; then
7147 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7148 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7150 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7153 if [ "$CFG_XRENDER" = "yes" ]; then
7154 QT_CONFIG="$QT_CONFIG xrender"
7155 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7157 if [ "$CFG_MITSHM" = "yes" ]; then
7158 QT_CONFIG="$QT_CONFIG mitshm"
7160 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7161 QT_CONFIG="$QT_CONFIG fontconfig"
7163 if [ "$CFG_XINPUT" = "yes" ]; then
7164 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7166 if [ "$CFG_XINPUT" = "yes" ]; then
7167 QT_CONFIG="$QT_CONFIG xinput tablet"
7169 if [ "$CFG_XKB" = "yes" ]; then
7170 QT_CONFIG="$QT_CONFIG xkb"
7174 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7175 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7176 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7178 if [ "$CFG_ARCH" = "macosx" ]; then
7179 if [ "$CFG_RPATH" = "yes" ]; then
7180 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7182 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7183 if [ -n "$RPATH_FLAGS" ]; then
7185 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7189 elif [ "$CFG_RPATH" = "yes" ]; then
7190 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7194 if [ "$CFG_RPATH" = "yes" ]; then
7195 # set the default rpath to the library installation directory
7196 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7198 if [ -n "$RPATH_FLAGS" ]; then
7199 # add the user defined rpaths
7200 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7204 if [ '!' -z "$I_FLAGS" ]; then
7205 # add the user define include paths
7206 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7207 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7210 if [ '!' -z "$W_FLAGS" ]; then
7211 # add the user defined warning flags
7212 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7213 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7214 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7217 # turn off exceptions for the compilers that support it
7218 if [ "$PLATFORM_QWS" = "yes" ]; then
7219 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7220 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7221 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7223 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7225 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7229 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7230 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7233 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7234 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7235 # Follow default behavior of configure.exe by overriding with "rtti".
7236 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7239 if [ "$CFG_ALSA" = "yes" ]; then
7240 QT_CONFIG="$QT_CONFIG alsa"
7243 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7244 QT_CONFIG="$QT_CONFIG pulseaudio"
7247 if [ "$CFG_COREWLAN" = "yes" ]; then
7248 QT_CONFIG="$QT_CONFIG corewlan"
7251 if [ "$CFG_ICD" = "yes" ]; then
7252 QT_CONFIG="$QT_CONFIG icd"
7255 if [ "$CFG_ICU" = "yes" ]; then
7256 QT_CONFIG="$QT_CONFIG icu"
7259 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
7260 QT_CONFIG="$QT_CONFIG force_asserts"
7264 # Some Qt modules are too advanced in C++ for some old compilers
7265 # Detect here the platforms where they are known to work.
7267 # See Qt documentation for more information on which features are
7268 # supported and on which compilers.
7270 canBuildQtXmlPatterns="yes"
7271 canBuildWebKit="$HAVE_STL"
7272 canBuildQtConcurrent="yes"
7274 canUseV8Snapshot="yes"
7276 # WebKit requires stdint.h
7277 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7278 if [ $? != "0" ]; then
7282 case "$XPLATFORM" in
7284 # PA-RISC's assembly is too limited
7285 # gcc 3.4 on that platform can't build QtXmlPatterns
7286 # the assembly it generates cannot be compiled
7288 # Check gcc's version
7289 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7293 canBuildQtXmlPatterns="no"
7297 canBuildQtXmlPatterns="no"
7301 unsupported/vxworks-*-g++*)
7304 unsupported/vxworks-*-dcc*)
7306 canBuildQtXmlPatterns="no"
7309 # Check gcc's version
7310 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7318 canBuildQtXmlPatterns="no"
7323 # Check the compiler version
7324 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7327 canBuildQtXmlPatterns="no"
7328 canBuildQtConcurrent="no"
7332 canBuildQtConcurrent="no"
7338 canBuildQtXmlPatterns="no"
7339 canBuildQtConcurrent="no"
7345 # Get the xlC version
7346 cat > xlcver.c <<EOF
7350 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7355 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7356 xlcver=`./xlcver 2>/dev/null`
7359 if [ "$OPT_VERBOSE" = "yes" ]; then
7360 if [ -n "$xlcver" ]; then
7361 echo Found IBM xlC version: $xlcver.
7363 echo Could not determine IBM xlC version, assuming oldest supported.
7370 canBuildQtXmlPatterns="no"
7371 canBuildQtConcurrent="no"
7375 canBuildQtConcurrent="no"
7381 canBuildQtConcurrent="no"
7385 if [ "$CFG_GUI" = "no" ]; then
7386 # WebKit requires QtGui
7390 if [ "$CFG_SHARED" = "no" ]; then
7392 echo "WARNING: Using static linking will disable the WebKit module."
7397 CFG_CONCURRENT="yes"
7398 if [ "$canBuildQtConcurrent" = "no" ]; then
7399 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7402 QT_CONFIG="$QT_CONFIG concurrent"
7405 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7406 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7409 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7410 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7411 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7412 CFG_XMLPATTERNS="no"
7414 # No longer needed after modularization
7415 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7416 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7418 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7421 # No longer needed after modularization
7422 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7423 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7425 # QT_CONFIG="$QT_CONFIG multimedia"
7428 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7429 QT_CONFIG="$QT_CONFIG audio-backend"
7432 if [ "$CFG_SVG" = "auto" ]; then
7436 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7437 echo "QtSvg requested, but it can't be built without QtGui"
7441 if [ "$CFG_SVG" = "yes" ]; then
7442 QT_CONFIG="$QT_CONFIG svg"
7444 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7447 if [ "$CFG_WEBKIT" != "no" ]; then
7448 CFG_WEBKIT="$canBuildWebKit"
7451 if [ "$CFG_WEBKIT" != "no" ]; then
7452 # No longer needed after modularization
7453 #QT_CONFIG="$QT_CONFIG webkit"
7454 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7455 if [ "$CFG_WEBKIT" = "debug" ]; then
7456 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7460 if [ "$CFG_SCRIPT" = "auto" ]; then
7464 # No longer needed after modularization
7465 #if [ "$CFG_SCRIPT" = "yes" ]; then
7466 # QT_CONFIG="$QT_CONFIG script"
7468 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7471 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7472 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7475 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7476 CFG_SCRIPTTOOLS="yes"
7477 elif [ "$CFG_SCRIPT" = "no" ]; then
7478 CFG_SCRIPTTOOLS="no"
7481 # No longer needed after modularization
7482 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7483 # QT_CONFIG="$QT_CONFIG scripttools"
7485 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7490 i386|x86_64|arm|macosx) ;;
7491 *) canBuildV8="no";;
7494 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7495 echo "Error: V8 was requested, but is not supported on this platform."
7499 if [ "$CFG_V8" = "auto" ]; then
7500 CFG_V8="$canBuildV8"
7503 if [ "$CFG_V8" = "no" ]; then
7504 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7506 QT_CONFIG="$QT_CONFIG v8"
7507 # Detect snapshot support
7508 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7509 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7512 *) canUseV8Snapshot="no"
7516 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7517 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7519 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7520 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7523 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7524 QT_CONFIG="$QT_CONFIG v8snapshot"
7528 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7529 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7530 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7534 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7535 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7542 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7543 # No longer needed after modularization
7544 #QT_CONFIG="$QT_CONFIG declarative"
7545 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7546 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7549 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7552 if [ "$CFG_LOCATION" = "auto" ]; then
7553 CFG_LOCATION="$CFG_GUI"
7556 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7557 echo "QtLocation requested, but it can't be built without QtGui"
7561 #Disable QtLocation until ready
7564 if [ "$CFG_LOCATION" = "no" ]; then
7565 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7568 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7571 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7572 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7573 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7578 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7579 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7580 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7587 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7590 # On Mac, set the minimum deployment target for the different architechtures
7591 # using the Xarch compiler option when supported (10.5 and up).
7592 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7593 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7594 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7595 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7596 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7597 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7599 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7600 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7601 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7602 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7603 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7605 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7606 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7607 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7608 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7609 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7611 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7612 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7613 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7614 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7615 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7622 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7624 case "$COMPILER_VERSION" in
7626 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7627 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7628 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7631 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7632 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7633 QT_GCC_PATCH_VERSION=0
7643 #-------------------------------------------------------------------------------
7644 # part of configuration information goes into qconfig.h
7645 #-------------------------------------------------------------------------------
7647 case "$CFG_QCONFIG" in
7649 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7652 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7653 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7654 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7655 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7656 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7657 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7659 echo "#endif" >>"$tmpconfig"
7663 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7667 # define QT_EDITION $QT_EDITION
7670 /* Machine byte-order */
7671 #define Q_BIG_ENDIAN 4321
7672 #define Q_LITTLE_ENDIAN 1234
7675 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7676 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7677 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7678 #if defined(__BIG_ENDIAN__)
7679 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7680 #elif defined(__LITTLE_ENDIAN__)
7681 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7683 # error "Unable to determine byte order!"
7687 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7689 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7690 if [ "$CFG_ENDIAN" = "auto" ]; then
7691 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7692 #if defined(__BIG_ENDIAN__)
7693 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7694 #elif defined(__LITTLE_ENDIAN__)
7695 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7697 # error "Unable to determine byte order!"
7701 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7703 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7705 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7706 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7707 /* Non-IEEE double format */
7708 #define Q_DOUBLE_LITTLE "01234567"
7709 #define Q_DOUBLE_BIG "76543210"
7710 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7711 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7712 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7715 if [ "$CFG_ARMFPA" = "yes" ]; then
7716 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7717 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7718 #ifndef QT_BOOTSTRAPPED
7723 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7727 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7728 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7729 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7730 /* Machine Architecture */
7731 #ifndef QT_BOOTSTRAPPED
7732 # define QT_ARCH_${CFG_ARCH_STR}
7734 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7738 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7739 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7741 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7742 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7745 # if both carbon and cocoa are specified, enable the autodetection code.
7746 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7747 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7748 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7749 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7752 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7753 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7756 if [ "$PLATFORM_MAC" = "yes" ]; then
7757 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7758 #if defined(__LP64__)
7759 # define QT_POINTER_SIZE 8
7761 # define QT_POINTER_SIZE 4
7765 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7766 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7770 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7772 if [ "$CFG_DEV" = "yes" ]; then
7773 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7776 # Embedded compile time options
7777 if [ "$PLATFORM_QWS" = "yes" ]; then
7778 # Add QWS to config.h
7779 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7781 # Add excluded decorations to $QCONFIG_FLAGS
7782 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7783 for decor in $decors; do
7784 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7785 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7788 # Figure which embedded drivers which are turned off
7789 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7790 for ADRIVER in $CFG_GFX_ON; do
7791 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7794 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7795 # the um driver is currently not in the available list for external builds
7796 if [ "$CFG_DEV" = "no" ]; then
7797 CFG_KBD_OFF="$CFG_KBD_OFF um"
7799 for ADRIVER in $CFG_KBD_ON; do
7800 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7803 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7804 for ADRIVER in $CFG_MOUSE_ON; do
7805 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7808 for DRIVER in $CFG_GFX_OFF; do
7809 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7810 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7813 for DRIVER in $CFG_KBD_OFF; do
7814 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7815 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7818 for DRIVER in $CFG_MOUSE_OFF; do
7819 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7820 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7824 if [ "$PLATFORM_QPA" = "yes" ]; then
7825 # Add QPA to config.h
7826 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7829 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7830 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7833 # Add turned on SQL drivers
7834 for DRIVER in $CFG_SQL_AVAILABLE; do
7835 eval "VAL=\$CFG_SQL_$DRIVER"
7838 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7839 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7840 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7843 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7849 QMakeVar set sql-drivers "$SQL_DRIVERS"
7850 QMakeVar set sql-plugins "$SQL_PLUGINS"
7852 # Add other configuration options to the qconfig.h file
7853 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7854 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7855 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7856 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7857 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7858 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7859 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7860 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7861 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7863 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
7864 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7865 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7866 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7867 [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
7870 # ATM we need this define to compile Qt. Remove later!
7871 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7873 # X11/Unix/Mac only configs
7874 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7875 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7876 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7877 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7878 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7879 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7880 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7881 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7882 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7883 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7884 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7885 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7886 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7887 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7888 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7890 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7891 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7892 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7893 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7894 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7895 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7896 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7897 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7898 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7899 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7900 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7901 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7902 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7904 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7905 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7906 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7907 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7908 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7909 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7910 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7911 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7912 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
7914 # sort QCONFIG_FLAGS for neatness if we can
7915 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7916 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7918 if [ -n "$QCONFIG_FLAGS" ]; then
7919 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7920 #ifndef QT_BOOTSTRAPPED
7923 for cfg in $QCONFIG_FLAGS; do
7924 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7925 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7926 # figure out define logic, so we can output the correct
7927 # ifdefs to override the global defines in a project
7929 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7930 # QT_NO_option can be forcefully turned on by QT_option
7931 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7932 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7933 # QT_option can be forcefully turned off by QT_NO_option
7934 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7937 if [ -z $cfgdNeg ]; then
7938 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7945 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7946 #if defined($cfgd) && defined($cfgdNeg)
7948 #elif !defined($cfgd) && !defined($cfgdNeg)
7955 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7956 #endif // QT_BOOTSTRAPPED
7961 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7962 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7963 #define QT_VISIBILITY_AVAILABLE
7968 if [ -n "$QT_LIBINFIX" ]; then
7969 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7970 #define QT_LIBINFIX "$QT_LIBINFIX"
7975 if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
7976 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7977 #define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
7982 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7983 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7984 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7986 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7987 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7988 chmod -w "$outpath/src/corelib/global/qconfig.h"
7989 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7990 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7994 #-------------------------------------------------------------------------------
7995 # save configuration into qconfig.pri
7996 #-------------------------------------------------------------------------------
7997 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7998 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7999 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
8000 if [ "$CFG_DEBUG" = "yes" ]; then
8001 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
8002 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8003 QT_CONFIG="$QT_CONFIG release"
8005 QT_CONFIG="$QT_CONFIG debug"
8006 elif [ "$CFG_DEBUG" = "no" ]; then
8007 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
8008 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8009 QT_CONFIG="$QT_CONFIG debug"
8011 QT_CONFIG="$QT_CONFIG release"
8013 if [ "$CFG_STL" = "yes" ]; then
8014 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
8016 if [ "$CFG_FRAMEWORK" = "no" ]; then
8017 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
8019 QT_CONFIG="$QT_CONFIG qt_framework"
8020 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
8022 if [ "$PLATFORM_MAC" = "yes" ]; then
8023 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
8025 if [ "$CFG_DEV" = "yes" ]; then
8026 QT_CONFIG="$QT_CONFIG private_tests"
8029 # Make the application arch follow the Qt arch for single arch builds.
8030 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
8031 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
8032 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
8035 cat >>"$QTCONFIG.tmp" <<EOF
8037 CONFIG += $QTCONFIG_CONFIG
8039 QT_EDITION = $Edition
8040 QT_CONFIG += $QT_CONFIG
8043 QT_VERSION = $QT_VERSION
8044 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
8045 QT_MINOR_VERSION = $QT_MINOR_VERSION
8046 QT_PATCH_VERSION = $QT_PATCH_VERSION
8049 QT_LIBINFIX = $QT_LIBINFIX
8050 QT_NAMESPACE = $QT_NAMESPACE
8051 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
8054 if [ -n "$CFG_SYSROOT" ]; then
8055 echo "# sysroot" >>"$QTCONFIG.tmp"
8056 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
8057 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
8058 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8059 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8060 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8061 echo "}" >> "$QTCONFIG.tmp"
8062 echo >> "$QTCONFIG.tmp"
8064 if [ "$CFG_RPATH" = "yes" ]; then
8065 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8067 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8068 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8069 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8070 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8073 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8074 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
8075 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8078 # replace qconfig.pri if it differs from the newly created temp file
8079 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8080 rm -f "$QTCONFIG.tmp"
8082 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8085 #-------------------------------------------------------------------------------
8086 # save configuration into qmodule.pri
8087 #-------------------------------------------------------------------------------
8088 QTMODULE="$outpath/mkspecs/qmodule.pri"
8090 # Ensure we can link to uninistalled libraries
8091 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8092 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8094 if [ -n "$QT_CFLAGS_PSQL" ]; then
8095 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8097 if [ -n "$QT_LFLAGS_PSQL" ]; then
8098 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8100 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8101 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8103 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8104 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8106 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8107 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8109 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8110 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8112 if [ -n "$QT_LFLAGS_ODBC" ]; then
8113 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8115 if [ -n "$QT_LFLAGS_TDS" ]; then
8116 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8119 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8120 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8123 #dump in the OPENSSL_LIBS info
8124 if [ '!' -z "$OPENSSL_LIBS" ]; then
8125 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8126 elif [ "$CFG_OPENSSL" = "linked" ]; then
8127 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8130 #dump in the SDK info
8131 if [ '!' -z "$CFG_SDK" ]; then
8132 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8135 # mac gcc -Xarch support
8136 if [ "$CFG_MAC_XARCH" = "no" ]; then
8137 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8141 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8142 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8144 # replace qmodule.pri if it differs from the newly created temp file
8145 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8146 rm -f "$QTMODULE.tmp"
8148 mv -f "$QTMODULE.tmp" "$QTMODULE"
8151 #-------------------------------------------------------------------------------
8152 # save configuration into .qmake.cache
8153 #-------------------------------------------------------------------------------
8155 CACHEFILE="$outpath/.qmake.cache"
8156 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8157 cat >>"$CACHEFILE.tmp" <<EOF
8159 QT_SOURCE_TREE = \$\$quote($relpath)
8160 QT_BUILD_TREE = \$\$quote($outpath)
8161 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8163 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8164 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8165 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8166 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8167 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8168 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8169 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8171 include(\$\$PWD/mkspecs/qmodule.pri)
8172 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8173 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8174 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8178 #dump the qmake spec
8179 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8180 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8182 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8187 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8188 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8189 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8190 # don't need to worry about generated files
8191 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8192 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8194 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8196 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8197 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8200 # replace .qmake.cache if it differs from the newly created temp file
8201 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8202 rm -f "$CACHEFILE.tmp"
8204 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8207 #-------------------------------------------------------------------------------
8208 # give feedback on configuration
8209 #-------------------------------------------------------------------------------
8213 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8216 This target is using the GNU C++ compiler ($PLATFORM).
8218 Recent versions of this compiler automatically include code for
8219 exceptions, which increase both the size of the Qt libraries and
8220 the amount of memory taken by your applications.
8222 You may choose to re-run `basename $0` with the -no-exceptions
8223 option to compile Qt without exceptions. This is completely binary
8224 compatible, and existing applications will continue to work.
8232 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8235 This target is using the MIPSpro C++ compiler ($PLATFORM).
8237 You may choose to re-run `basename $0` with the -no-exceptions
8238 option to compile Qt without exceptions. This will make the
8239 size of the Qt library smaller and reduce the amount of memory
8240 taken by your applications.
8251 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8253 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8254 in debug mode will run out of memory on systems with 2GB or less.
8255 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8256 -no-webkit or -release to skip webkit debug.
8261 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8262 echo "Build type: $PLATFORM"
8264 echo "Building on: $PLATFORM"
8265 echo "Building for: $XPLATFORM"
8268 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8269 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8271 echo "Architecture: $CFG_ARCH"
8274 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8275 echo "Host architecture: $CFG_HOST_ARCH"
8278 if [ "$PLATFORM_MAC" = "yes" ]; then
8279 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8280 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8281 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8283 echo "Using framework: Cocoa"
8286 echo "Using framework: Carbon"
8290 if [ -n "$PLATFORM_NOTES" ]; then
8291 echo "Platform notes:"
8292 echo "$PLATFORM_NOTES"
8297 if [ "$OPT_VERBOSE" = "yes" ]; then
8298 echo $ECHO_N "qmake vars .......... $ECHO_C"
8299 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8300 echo "qmake switches ......... $QMAKE_SWITCHES"
8303 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8304 echo "Build .................. $CFG_BUILD_PARTS"
8305 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8306 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8307 echo "Debug .................. yes (combined)"
8308 if [ "$CFG_DEBUG" = "yes" ]; then
8309 echo "Default Link ........... debug"
8311 echo "Default Link ........... release"
8314 echo "Debug .................. $CFG_DEBUG"
8316 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8317 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8318 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8319 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8320 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8321 echo "QtGui module ........... $CFG_GUI"
8322 echo "QtScript module ........ $CFG_SCRIPT"
8323 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8324 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8325 echo "Phonon module .......... $CFG_PHONON"
8326 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8327 echo "SVG module ............. $CFG_SVG"
8328 case "$CFG_WEBKIT" in
8329 yes) echo "WebKit module .......... yes" ;;
8330 debug) echo "WebKit module .......... yes (debug)" ;;
8331 no) echo "WebKit module .......... no" ;;
8333 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8334 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8335 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8337 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8340 echo "V8 module .............. $CFG_V8"
8341 echo "Declarative module ..... $CFG_DECLARATIVE"
8342 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8343 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8345 echo "Location module ........ $CFG_LOCATION"
8346 echo "STL support ............ $CFG_STL"
8347 echo "PCH support ............ $CFG_PRECOMPILE"
8348 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8349 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8350 echo "AVX..................... ${CFG_AVX}"
8351 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8352 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8353 echo "NEON support ........... ${CFG_NEON}"
8355 [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
8356 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8357 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8358 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8359 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8360 echo "NIS support ............ $CFG_NIS"
8361 echo "CUPS support ........... $CFG_CUPS"
8362 echo "Iconv support .......... $CFG_ICONV"
8363 echo "Glib support ........... $CFG_GLIB"
8364 echo "GStreamer support ...... $CFG_GSTREAMER"
8365 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8366 echo "Large File support ..... $CFG_LARGEFILE"
8367 echo "GIF support ............ $CFG_GIF"
8368 if [ "$CFG_TIFF" = "no" ]; then
8369 echo "TIFF support ........... $CFG_TIFF"
8371 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8373 if [ "$CFG_JPEG" = "no" ]; then
8374 echo "JPEG support ........... $CFG_JPEG"
8376 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8378 if [ "$CFG_PNG" = "no" ]; then
8379 echo "PNG support ............ $CFG_PNG"
8381 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8383 if [ "$CFG_MNG" = "no" ]; then
8384 echo "MNG support ............ $CFG_MNG"
8386 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8388 echo "zlib support ........... $CFG_ZLIB"
8389 echo "Session management ..... $CFG_SM"
8390 if [ "$PLATFORM_QWS" = "yes" ]; then
8391 echo "Embedded support ....... $CFG_EMBEDDED"
8392 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8393 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8395 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8397 # Normalize the decoration output first
8398 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8399 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8400 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8401 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8402 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8403 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8404 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8405 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8406 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8407 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8408 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8409 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8410 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8411 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8412 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8413 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8415 if [ "$CFG_OPENGL" = "desktop" ]; then
8416 echo "OpenGL support ......... yes (Desktop OpenGL)"
8417 elif [ "$CFG_OPENGL" = "es2" ]; then
8418 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8420 echo "OpenGL support ......... no"
8422 if [ "$CFG_EGL" != "no" ]; then
8423 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8424 echo "EGL support ............ yes <GLES/egl.h>"
8426 echo "EGL support ............ yes <EGL/egl.h>"
8429 if [ "$CFG_OPENVG" ]; then
8430 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8431 echo "OpenVG support ......... ShivaVG"
8433 echo "OpenVG support ......... $CFG_OPENVG"
8436 if [ "$PLATFORM_X11" = "yes" ]; then
8437 echo "NAS sound support ...... $CFG_NAS"
8438 echo "XShape support ......... $CFG_XSHAPE"
8439 echo "XVideo support ......... $CFG_XVIDEO"
8440 echo "XSync support .......... $CFG_XSYNC"
8441 echo "Xinerama support ....... $CFG_XINERAMA"
8442 echo "Xcursor support ........ $CFG_XCURSOR"
8443 echo "Xfixes support ......... $CFG_XFIXES"
8444 echo "Xrandr support ......... $CFG_XRANDR"
8445 echo "Xrender support ........ $CFG_XRENDER"
8446 echo "Xi support ............. $CFG_XINPUT"
8447 echo "MIT-SHM support ........ $CFG_MITSHM"
8448 echo "FontConfig support ..... $CFG_FONTCONFIG"
8449 echo "XKB Support ............ $CFG_XKB"
8450 echo "immodule support ....... $CFG_IM"
8451 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8453 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8454 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8455 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8456 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8457 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8458 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8459 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8460 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8461 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8464 if [ "$CFG_OPENSSL" = "yes" ]; then
8465 OPENSSL_LINKAGE="(run-time)"
8466 elif [ "$CFG_OPENSSL" = "linked" ]; then
8467 OPENSSL_LINKAGE="(linked)"
8469 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8470 echo "Alsa support ........... $CFG_ALSA"
8471 if [ "$PLATFORM_MAC" = "yes" ]; then
8472 echo "CoreWlan support ....... $CFG_COREWLAN"
8474 echo "ICD support ............ $CFG_ICD"
8475 echo "libICU support ......... $CFG_ICU"
8476 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8477 echo "Xcb support ............ limited (old version)"
8479 echo "Xcb support ............ $CFG_XCB"
8481 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8482 echo "XInput2 support ........ $CFG_XINPUT2"
8486 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC"
8488 # complain about not being able to use dynamic plugins if we are using a static build
8489 if [ "$CFG_SHARED" = "no" ]; then
8491 echo "WARNING: Using static linking will disable the use of dynamically"
8492 echo "loaded plugins. Make sure to import all needed static plugins,"
8493 echo "or compile needed modules into the library."
8496 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8498 echo "NOTE: When linking against OpenSSL, you can override the default"
8499 echo "library names through OPENSSL_LIBS."
8501 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8504 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8506 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8507 echo "if you want a pure debug build."
8512 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8517 #-------------------------------------------------------------------------------
8518 # build makefiles based on the configuration
8519 #-------------------------------------------------------------------------------
8521 echo "Finding project files. Please wait..."
8522 if [ "$CFG_NOPROCESS" != "yes" ]; then
8523 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8524 if [ -f "${relpath}/qtbase.pro" ]; then
8525 mkfile="${outpath}/Makefile"
8526 [ -f "$mkfile" ] && chmod +w "$mkfile"
8527 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8531 # .projects -> projects to process
8532 # .projects.1 -> qt and moc
8533 # .projects.2 -> subdirs and libs
8534 # .projects.3 -> the rest
8535 rm -f .projects .projects.1 .projects.2 .projects.3
8537 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8538 if [ -z "$AWK" ]; then
8539 for p in `echo $QMAKE_PROJECTS`; do
8540 echo "$p" >> .projects
8543 cat >projects.awk <<EOF
8549 first = "./.projects.1.tmp"
8550 second = "./.projects.2.tmp"
8551 third = "./.projects.3.tmp"
8556 if ( ! target_file )
8558 print input_file >target_file
8563 input_file = FILENAME
8568 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8571 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8572 target_file = second
8577 matched_target == 0 && /^(TEMPLATE.*=)/ {
8578 if ( \$3 == "subdirs" )
8579 target_file = second
8580 else if ( \$3 == "lib" )
8586 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8587 if ( \$0 ~ /plugin/ )
8590 target_file = second
8595 if ( ! target_file )
8597 print input_file >>target_file
8604 for p in `echo $QMAKE_PROJECTS`; do
8605 echo "$p" >> .projects.all
8608 # if you get errors about the length of the command line to awk, change the -l arg
8610 split -l 100 .projects.all .projects.all.
8611 for p in .projects.all.*; do
8612 "$AWK" -f projects.awk `cat $p`
8613 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8614 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8615 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8616 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8618 rm -f .projects.all* projects.awk
8620 [ -f .projects.1 ] && cat .projects.1 >>.projects
8621 [ -f .projects.2 ] && cat .projects.2 >>.projects
8622 rm -f .projects.1 .projects.2
8623 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8624 cat .projects.3 >>.projects
8628 # don't sort Qt and MOC in with the other project files
8629 # also work around a segfaulting uniq(1)
8630 if [ -f .sorted.projects.2 ]; then
8631 sort .sorted.projects.2 > .sorted.projects.2.new
8632 mv -f .sorted.projects.2.new .sorted.projects.2
8633 cat .sorted.projects.2 >> .sorted.projects.1
8635 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8636 rm -f .sorted.projects.2 .sorted.projects.1
8640 if [ -f .projects ]; then
8641 uniq .projects >.tmp
8642 mv -f .tmp .projects
8643 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8645 if [ -f .projects.3 ]; then
8646 uniq .projects.3 >.tmp
8647 mv -f .tmp .projects.3
8648 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8650 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8654 for part in $CFG_BUILD_PARTS; do
8656 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8657 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8658 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8659 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8664 if [ "$CFG_DEV" = "yes" ]; then
8665 PART_ROOTS="$PART_ROOTS tests"
8668 echo "Creating makefiles. Please wait..."
8669 for file in .projects .projects.3; do
8670 [ '!' -f "$file" ] && continue
8671 for a in `cat $file`; do
8673 for r in $PART_ROOTS; do
8674 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8679 [ "$IN_ROOT" = "no" ] && continue
8682 *winmain/winmain.pro)
8683 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8687 *examples/activeqt/*) continue ;;
8688 */qmake/qmake.pro) continue ;;
8689 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8690 *tools/mkv8snapshot/*)
8691 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8697 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8703 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8704 test -d "$dir" || mkdir -p "$dir"
8705 OUTDIR="$outpath/$dir"
8706 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8707 # fast configure - the makefile exists, skip it
8708 # since the makefile exists, it was generated by qmake, which means we
8709 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8711 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8714 QMAKE_SPEC_ARGS="-spec $SPEC"
8715 echo $ECHO_N " for $a$ECHO_C"
8717 QMAKE="$outpath/bin/qmake"
8718 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8719 if [ "$file" = ".projects.3" ]; then
8722 cat >"${OUTDIR}/Makefile" <<EOF
8723 # ${OUTDIR}/Makefile: generated by configure
8725 # WARNING: This makefile will be replaced with a real makefile.
8726 # All changes made to this file will be lost.
8728 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8730 cat >>"${OUTDIR}/Makefile" <<EOF
8732 all clean install qmake first Makefile: FORCE
8733 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8741 if [ "$OPT_VERBOSE" = "yes" ]; then
8742 echo " (`basename $SPEC`)"
8743 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8748 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8749 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8753 rm -f .projects .projects.3
8755 #-------------------------------------------------------------------------------
8756 # check for platforms that we don't yet know about
8757 #-------------------------------------------------------------------------------
8758 if [ "$CFG_ARCH" = "generic" ]; then
8761 NOTICE: Atomic operations are not yet supported for this
8764 Qt will use the 'generic' architecture instead, which uses a
8765 single pthread_mutex_t to protect all atomic operations. This
8766 implementation is the slow (but safe) fallback implementation
8767 for architectures Qt does not yet support.
8771 #-------------------------------------------------------------------------------
8772 # check if the user passed the -no-zlib option, which is no longer supported
8773 #-------------------------------------------------------------------------------
8774 if [ -n "$ZLIB_FORCED" ]; then
8775 which_zlib="supplied"
8776 if [ "$CFG_ZLIB" = "system" ]; then
8782 NOTICE: The -no-zlib option was supplied but is no longer
8785 Qt now requires zlib support in all builds, so the -no-zlib
8786 option was ignored. Qt will be built using the $which_zlib
8791 #-------------------------------------------------------------------------------
8792 # finally save the executed command to another script
8793 #-------------------------------------------------------------------------------
8794 if [ `basename $0` != "config.status" ]; then
8795 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8797 # add the system variables
8798 for varname in $SYSTEM_VARIABLES; do
8800 'if [ -n "\$'${varname}'" ]; then
8801 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8806 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8808 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8809 echo "#!/bin/sh" > "$outpath/config.status"
8810 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8811 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8812 echo "else" >> "$outpath/config.status"
8813 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8814 echo "fi" >> "$outpath/config.status"
8815 chmod +x "$outpath/config.status"
8818 if [ -n "$RPATH_MESSAGE" ]; then
8820 echo "$RPATH_MESSAGE"
8823 MAKE=`basename "$MAKE"`
8825 echo Qt is now configured for building. Just run \'$MAKE\'.
8826 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8827 echo Once everything is built, Qt is installed.
8828 echo You should not run \'$MAKE install\'.
8830 echo Once everything is built, you must run \'$MAKE install\'.
8831 echo Qt will be installed into $QT_INSTALL_PREFIX
8834 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.