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=
854 #flags for SQL drivers
862 QT_LFLAGS_ODBC="-lodbc"
865 # flags for libdbus-1
869 # flags for Glib (X11 only)
873 # flags for GStreamer (X11 only)
877 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
878 QT_CFLAGS_CONNSETTINGS=
879 QT_LIBS_CONNSETTINGS=
881 #-------------------------------------------------------------------------------
882 # check SQL drivers, mouse drivers and decorations available in this package
883 #-------------------------------------------------------------------------------
885 # opensource version removes some drivers, so force them to be off
891 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
892 for a in "$relpath/src/plugins/sqldrivers/"*; do
894 base_a=`basename "$a"`
895 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
896 eval "CFG_SQL_${base_a}=auto"
901 CFG_DECORATION_PLUGIN_AVAILABLE=
902 if [ -d "$relpath/src/plugins/decorations" ]; then
903 for a in "$relpath/src/plugins/decorations/"*; do
905 base_a=`basename "$a"`
906 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
911 CFG_KBD_PLUGIN_AVAILABLE=
912 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
913 for a in "$relpath/src/plugins/kbddrivers/"*; do
915 base_a=`basename "$a"`
916 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
921 CFG_MOUSE_PLUGIN_AVAILABLE=
922 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
923 for a in "$relpath/src/plugins/mousedrivers/"*; do
925 base_a=`basename "$a"`
926 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
931 CFG_GFX_PLUGIN_AVAILABLE=
932 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
933 for a in "$relpath/src/plugins/gfxdrivers/"*; do
935 base_a=`basename "$a"`
936 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
939 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
942 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
943 if [ -d "$relpath/src/plugins/imageformats" ]; then
944 for a in "$relpath/src/plugins/imageformats/"*; do
946 base_a=`basename "$a"`
947 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
952 #-------------------------------------------------------------------------------
953 # Set Default NaCl options
954 #-------------------------------------------------------------------------------
955 if [ "$CFG_EMBEDDED" = "nacl" ]; then
956 echo "Setting NaCl options:"
966 if [ `uname` = "Linux" ]; then
967 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
968 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
970 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
971 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
974 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
985 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
986 QT_CONFIG="$QT_CONFIG nacl"
989 #-------------------------------------------------------------------------------
990 # parse command line arguments
991 #-------------------------------------------------------------------------------
993 # parse the arguments, setting things to "yes" or "no"
994 while [ "$#" -gt 0 ]; do
998 #Autoconf style options
1000 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1004 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1008 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1009 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1012 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1016 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1020 -no-*-*|-plugin-*-*|-qt-*-*)
1021 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1022 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1037 #Qt style no options
1039 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1042 #Qt style yes options
1043 -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)
1044 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1047 #Qt style options that pass an argument
1049 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1051 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1055 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1059 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1060 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1064 #Qt style complex options in one command
1065 -enable-*|-disable-*)
1066 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1067 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1069 #Qt Builtin/System style options
1070 -no-*|-system-*|-qt-*)
1071 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1072 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1074 #Options that cannot be generalized
1081 # this option may or may not be followed by an argument
1082 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1089 -embedded-lite|-qpa)
1091 # this option may or may not be followed by an argument
1092 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1105 # this option may or may not be followed by an argument
1106 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1115 # this option may or may not be followed by an argument
1116 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1124 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1125 # this option may or may not be followed by an argument
1126 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1135 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1139 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1147 VAR="graphicssystem"
1151 -runtimegraphicssystem)
1152 VAR="runtimegraphicssystem"
1163 if [ "$1" = "-D" ]; then
1167 VAL=`echo $1 | sed 's,-D,,'`
1172 # this option may or may not be followed by an argument
1173 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1182 if [ "$1" = "-I" ]; then
1186 VAL=`echo $1 | sed 's,-I,,'`
1191 if [ "$1" = "-L" ]; then
1195 VAL=`echo $1 | sed 's,-L,,'`
1200 if [ "$1" = "-R" ]; then
1204 VAL=`echo $1 | sed 's,-R,,'`
1209 VAL=`echo $1 | sed 's,-l,,'`
1213 if [ "$1" = "-F" ]; then
1217 VAL=`echo $1 | sed 's,-F,,'`
1222 if [ "$1" = "-fw" ]; then
1226 VAL=`echo $1 | sed 's,-fw,,'`
1234 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1241 if [ "$UNKNOWN_ARG" = "yes" ]; then
1242 echo "$1: unknown argument"
1253 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1254 CFG_QT3SUPPORT="$VAL"
1260 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1261 CFG_ACCESSIBILITY="$VAL"
1270 CFG_USE_GNUMAKE="$VAL"
1273 CFG_MYSQL_CONFIG="$VAL"
1276 QT_INSTALL_PREFIX="$VAL"
1279 QT_HOST_PREFIX="$VAL"
1282 QT_FORCE_PKGCONFIG=yes
1285 QT_INSTALL_DOCS="$VAL"
1288 QT_INSTALL_HEADERS="$VAL"
1291 QT_INSTALL_PLUGINS="$VAL"
1294 QT_INSTALL_IMPORTS="$VAL"
1297 QT_INSTALL_DATA="$VAL"
1300 QT_INSTALL_LIBS="$VAL"
1309 QT_INSTALL_TRANSLATIONS="$VAL"
1311 sysconfdir|settingsdir)
1312 QT_INSTALL_SETTINGS="$VAL"
1315 QT_INSTALL_EXAMPLES="$VAL"
1318 QT_INSTALL_TESTS="$VAL"
1327 QT_INSTALL_BINS="$VAL"
1349 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1356 if [ "$VAL" = "little" ]; then
1357 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1358 elif [ "$VAL" = "big" ]; then
1359 CFG_ENDIAN="Q_BIG_ENDIAN"
1365 if [ "$VAL" = "little" ]; then
1366 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1367 elif [ "$VAL" = "big" ]; then
1368 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1374 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1381 CFG_QWS_DEPTHS="$VAL"
1384 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1385 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1386 [ "$VAL" = "es2" ]; then
1388 if [ "$VAL" = "es2" ]; then
1396 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1398 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1406 if [ "$PLATFORM_QWS" = "yes" ]; then
1407 echo "Error: Graphics System plugins are not supported on QWS."
1408 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1409 echo " rather than existing as a separate plugin."
1413 if [ "$VAL" = "opengl" ]; then
1414 CFG_GRAPHICS_SYSTEM="opengl"
1415 elif [ "$VAL" = "openvg" ]; then
1416 CFG_GRAPHICS_SYSTEM="openvg"
1417 elif [ "$VAL" = "raster" ]; then
1418 CFG_GRAPHICS_SYSTEM="raster"
1419 elif [ "$VAL" = "runtime" ]; then
1420 CFG_GRAPHICS_SYSTEM="runtime"
1426 runtimegraphicssystem)
1427 if [ "$VAL" != "runtime" ]; then
1428 CFG_RUNTIME_SYSTEM="$VAL"
1432 qvfb) # left for commandline compatibility, not documented
1433 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1434 if [ "$VAL" = "yes" ]; then
1435 QMakeVar add gfx-drivers qvfb
1436 QMakeVar add kbd-drivers qvfb
1437 QMakeVar add mouse-drivers qvfb
1438 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1439 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1440 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1447 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1450 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1459 if [ "$PLATFORM_MAC" = "yes" ]; then
1466 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1467 CFG_MAC_DWARF2="$VAL"
1473 # if this is a Mac then "windows" probably means
1474 # we are cross-compiling for MinGW
1475 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1476 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1485 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1486 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1492 # do nothing - Cocoa is the default.
1495 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1496 CFG_MAC_CARBON="$VAL"
1497 COMMANDLINE_MAC_CARBON="$VAL"
1503 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1504 CFG_MAC_HARFBUZZ="$VAL"
1511 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1512 CFG_FRAMEWORK="$VAL"
1518 if [ "$VAL" = "yes" ]; then
1520 QMakeVar add QMAKE_CFLAGS -pg
1521 QMakeVar add QMAKE_CXXFLAGS -pg
1522 QMakeVar add QMAKE_LFLAGS -pg
1523 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1529 if [ "$VAL" = "yes" ]; then
1530 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1533 exceptions|g++-exceptions)
1534 if [ "$VAL" = "no" ]; then
1536 elif [ "$VAL" = "yes" ]; then
1544 # keep compatibility with old platform names
1550 PLATFORM=hpux-acc-o64
1553 PLATFORM=hpux-acc-64
1556 PLATFORM=hpux-acc-64
1568 PLATFORM=reliant-cds-64
1571 PLATFORM=solaris-cc-64
1574 PLATFORM=unixware-cc
1577 PLATFORM=unixware-g++
1580 PLATFORM=unixware-cc
1583 PLATFORM=unixware-g++
1589 i386) NATIVE_64_ARCH="x86_64" ;;
1590 powerpc) NATIVE_64_ARCH="ppc64" ;;
1591 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1593 if [ ! -z "$NATIVE_64_ARCH" ]; then
1594 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1595 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1602 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1605 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1606 CFG_DEBUG_RELEASE="$VAL"
1612 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1613 CFG_RELEASE_QMAKE="$VAL"
1619 if [ "$VAL" = "yes" ]; then
1621 elif [ "$VAL" = "no" ]; then
1628 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1629 CFG_PREFIX_INSTALL="$VAL"
1637 developer-build|commercial|opensource|nokia-developer)
1638 # These switches have been dealt with already
1641 if [ "$VAL" = "yes" ]; then
1643 elif [ "$VAL" = "no" ]; then
1650 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1651 CFG_INCREMENTAL="$VAL"
1657 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1658 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1664 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1665 if [ "$VAL" = "no" ]; then
1666 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1667 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1668 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1674 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1681 if [ "$VAL" = "no" ]; then
1688 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1703 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1710 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1717 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1724 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1731 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1738 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1745 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1752 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1753 CFG_PRECOMPILE="$VAL"
1758 separate-debug-info)
1759 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1760 CFG_SEPARATE_DEBUG_INFO="$VAL"
1761 elif [ "$VAL" = "nocopy" ] ; then
1762 CFG_SEPARATE_DEBUG_INFO="yes"
1763 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1769 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1770 CFG_REDUCE_EXPORTS="$VAL"
1776 if [ "$VAL" = "no" ]; then
1783 if [ "$VAL" = "no" ]; then
1790 if [ "$VAL" = "no" ]; then
1797 if [ "$VAL" = "no" ]; then
1804 if [ "$VAL" = "no" ]; then
1811 if [ "$VAL" = "no" ]; then
1818 if [ "$VAL" = "no" ]; then
1825 if [ "$VAL" = "no" ]; then
1832 if [ "$VAL" = "no" ]; then
1842 if [ "$VAL" = "no" ]; then
1849 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1850 CFG_REDUCE_RELOCATIONS="$VAL"
1856 [ "$VAL" = "qt" ] && VAL=yes
1857 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1858 CFG_QWS_FREETYPE="$VAL"
1864 [ "$VAL" = "qt" ] && VAL=yes
1865 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1870 # No longer supported:
1871 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1874 if [ "$VAL" = "system" ]; then
1881 [ "$VAL" = "yes" ] && VAL=qt
1882 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1889 [ "$VAL" = "yes" ] && VAL=qt
1890 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1897 [ "$VAL" = "yes" ] && VAL=qt
1898 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1905 [ "$VAL" = "yes" ] && VAL=qt
1906 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1913 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1920 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1927 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1934 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1941 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1948 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1955 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1956 CFG_FONTCONFIG="$VAL"
1962 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1969 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1976 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1983 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1990 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1997 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2004 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2005 CFG_GSTREAMER="$VAL"
2011 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2012 CFG_QGTKSTYLE="$VAL"
2018 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2021 if [ "$VAL" = "no" ]; then
2029 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
2031 elif [ "$VAL" = "runtime" ]; then
2038 if [ "$VAL" = "yes" ]; then
2045 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2052 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2053 CFG_LARGEFILE="$VAL"
2059 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2066 if [ "$VAL" = "yes" ]; then
2067 CFG_OPENSSL="linked"
2073 if [ "$VAL" = "yes" ]; then
2081 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2082 CFG_XMLPATTERNS="yes"
2084 if [ "$VAL" = "no" ]; then
2085 CFG_XMLPATTERNS="no"
2092 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2095 if [ "$VAL" = "no" ]; then
2103 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2104 CFG_SCRIPTTOOLS="yes"
2106 if [ "$VAL" = "no" ]; then
2107 CFG_SCRIPTTOOLS="no"
2114 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2117 if [ "$VAL" = "no" ]; then
2125 if [ "$VAL" = "yes" ]; then
2128 if [ "$VAL" = "no" ]; then
2136 if [ "$VAL" = "yes" ]; then
2137 CFG_DECLARATIVE="yes"
2139 if [ "$VAL" = "no" ]; then
2140 CFG_DECLARATIVE="no"
2147 if [ "$VAL" = "yes" ]; then
2148 CFG_DECLARATIVE_DEBUG="yes"
2150 if [ "$VAL" = "no" ]; then
2151 CFG_DECLARATIVE_DEBUG="no"
2158 [ "$VAL" = "auto" ] && VAL="yes"
2162 if [ "$VAL" = "yes" ]; then
2165 if [ "$VAL" = "no" ]; then
2173 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2174 CFG_JAVASCRIPTCORE_JIT="$VAL"
2180 if [ "$VAL" = "yes" ]; then
2181 OPT_CONFIRM_LICENSE="$VAL"
2187 if [ "$VAL" = "yes" ]; then
2193 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2194 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2195 # if autoconf style options were used, $VAL can be "yes" or "no"
2196 [ "$VAL" = "yes" ] && VAL=qt
2197 # now $VAL should be "no", "qt", or "plugin"... double-check
2198 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2201 # now $VAL is "no", "qt", or "plugin"
2203 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2204 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2206 # Grab the available values
2209 avail="$CFG_SQL_AVAILABLE"
2212 avail="$CFG_GFX_AVAILABLE"
2213 if [ "$OPT" = "plugin" ]; then
2214 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2218 avail="$CFG_DECORATION_AVAILABLE"
2219 if [ "$OPT" = "plugin" ]; then
2220 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2224 avail="$CFG_KBD_AVAILABLE"
2225 if [ "$OPT" = "plugin" ]; then
2226 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2230 avail="$CFG_MOUSE_AVAILABLE"
2231 if [ "$OPT" = "plugin" ]; then
2232 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2236 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2237 if [ "$OPT" != "plugin" ]; then
2238 # png is always built in
2244 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2248 # Check that that user's value is available.
2251 if [ "$VAL" = "$d" ]; then
2256 [ "$found" = yes ] || ERROR=yes
2258 if [ "$VAR" = "sql" ]; then
2259 # set the CFG_SQL_driver
2260 eval "CFG_SQL_$VAL=\$OPT"
2262 elif [ "$VAR" = "imageformat" ]; then
2263 [ "$OPT" = "qt" ] && OPT=yes
2264 VAL="`echo $VAL |tr a-z A-Z`"
2265 eval "CFG_$VAL=$OPT"
2269 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2270 if [ "$OPT" = "plugin" ]; then
2271 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2272 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2273 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2274 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2275 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2276 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2277 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2278 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2281 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2282 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2283 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2284 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2285 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2289 QMakeVar add "${VAR}s" "${VAL}"
2290 elif [ "$OPT" = "no" ]; then
2291 PLUG_VAR="${VAR}-plugin"
2292 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2293 IN_VAR="${VAR}-driver"
2297 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2298 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2299 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2300 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2301 QMakeVar del "${IN_VAR}s" "$VAL"
2302 QMakeVar del "${PLUG_VAR}s" "$VAL"
2304 if [ "$ERROR" = "yes" ]; then
2305 echo "$CURRENT_OPT: unknown argument"
2310 if [ "$VAL" = "yes" ]; then
2311 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2312 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2316 elif [ "$VAL" = "no" ]; then
2317 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2318 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2327 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2334 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2341 D_FLAGS="$D_FLAGS \"$VAL\""
2344 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2347 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2350 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2353 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2356 if [ "$PLATFORM_MAC" = "yes" ]; then
2357 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2358 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2364 if [ "$PLATFORM_MAC" = "yes" ]; then
2365 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2371 W_FLAGS="$W_FLAGS \"${VAL}\""
2377 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2384 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2385 CFG_PHONON_BACKEND="$VAL"
2391 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2392 CFG_MULTIMEDIA="$VAL"
2404 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2405 CFG_AUDIO_BACKEND="$VAL"
2411 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2418 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2419 CFG_FORCE_ASSERTS="$VAL"
2428 if [ "$UNKNOWN_OPT" = "yes" ]; then
2429 echo "${CURRENT_OPT}: invalid command-line switch"
2435 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2436 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2439 if [ "$CFG_GUI" = "no" ]; then
2440 echo "Warning: -no-gui will disable the qt3support library."
2444 #disable Qt3Support for Lighthouse
2445 if [ "$PLATFORM_QPA" = "yes" ]; then
2449 # update QT_CONFIG to show our current predefined configuration
2450 case "$CFG_QCONFIG" in
2451 minimal|small|medium|large|full)
2452 # these are a sequence of increasing functionality
2453 for c in minimal small medium large full; do
2454 QT_CONFIG="$QT_CONFIG $c-config"
2455 [ "$CFG_QCONFIG" = $c ] && break
2459 # not known to be sufficient for anything
2460 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2461 echo >&2 "Error: configuration file not found:"
2462 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2464 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2469 #-------------------------------------------------------------------------------
2470 # build tree initialization
2471 #-------------------------------------------------------------------------------
2473 # where to find which..
2474 unixtests="$relpath/config.tests/unix"
2475 mactests="$relpath/config.tests/mac"
2476 WHICH="$unixtests/which.test"
2478 PERL=`$WHICH perl 2>/dev/null`
2480 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2482 for e in gawk nawk awk; do
2483 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2490 PERL="/usr/bin/perl"
2491 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2495 ### skip this if the user just needs help...
2496 if [ "$OPT_HELP" != "yes" ]; then
2498 # is this a shadow build?
2499 if [ "$OPT_SHADOW" = "maybe" ]; then
2501 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2502 if [ -h "$outpath" ]; then
2503 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2509 if [ "$OPT_SHADOW" = "yes" ]; then
2510 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2511 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2512 echo >&2 "Cannot proceed."
2515 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2518 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2520 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2521 echo "Qt can be built in release mode with separate debug information, so"
2522 echo "-debug-and-release is not necessary anymore"
2526 if [ "$CFG_SILENT" = "yes" ]; then
2527 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2530 # if the source tree is different from the build tree,
2531 # symlink or copy part of the sources
2532 if [ "$OPT_SHADOW" = "yes" ]; then
2533 echo "Preparing build tree..."
2535 if [ -z "$PERL" ]; then
2537 echo "You need perl in your PATH to make a shadow build."
2538 echo "Cannot proceed."
2542 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2544 # symlink the qmake directory
2545 find "$relpath/qmake" | while read a; do
2546 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2547 if [ '!' -f "$my_a" ]; then
2548 if [ -d "$a" ]; then
2549 # directories are created...
2552 a_dir=`dirname "$my_a"`
2553 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2554 # ... and files are symlinked
2555 case `basename "$a"` in
2556 *.o|*.d|GNUmakefile*|qmake)
2567 # make a syncqt script that can be used in the shadow
2568 rm -f "$outpath/bin/syncqt"
2569 if [ -x "$relpath/bin/syncqt" ]; then
2570 mkdir -p "$outpath/bin"
2571 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2572 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2573 chmod 755 "$outpath/bin/syncqt"
2576 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2577 rm -f "$outpath/bin/$i"
2578 if [ -x "$relpath/bin/$i" ]; then
2579 mkdir -p "$outpath/bin"
2580 echo "#!/bin/sh" >"$outpath/bin/$i"
2581 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2582 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2583 chmod 755 "$outpath/bin/$i"
2587 # symlink the mkspecs directory
2588 mkdir -p "$outpath/mkspecs"
2589 rm -rf "$outpath"/mkspecs/*
2590 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2591 rm -f "$outpath/mkspecs/default"
2595 rm -rf "$outpath/mkspecs/$1"
2596 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2597 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2600 # Special case for mkspecs/features directory.
2601 # To be able to place .prf files into a shadow build directory,
2602 # we're creating links for files only. The directory structure is reproduced.
2603 ShadowMkspecs features
2605 # The modules dir is special, too.
2606 ShadowMkspecs modules
2608 # symlink the doc directory
2609 rm -rf "$outpath/doc"
2610 ln -s "$relpath/doc" "$outpath/doc"
2612 # make sure q3porting.xml can be found
2613 mkdir -p "$outpath/tools/porting/src"
2614 rm -f "$outpath/tools/porting/src/q3porting.xml"
2615 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2618 # symlink fonts to be able to run application from build directory
2619 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2620 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2621 mkdir -p "${outpath}/lib"
2622 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2626 if [ "$OPT_FAST" = "auto" ]; then
2627 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2634 # find a make command
2635 if [ -z "$MAKE" ]; then
2637 for mk in gmake make; do
2638 if "$WHICH" $mk >/dev/null 2>&1; then
2643 if [ -z "$MAKE" ]; then
2644 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2645 echo >&2 "Cannot proceed."
2648 # export MAKE, we need it later in the config.tests
2654 #-------------------------------------------------------------------------------
2655 # auto-detect all that hasn't been specified in the arguments
2656 #-------------------------------------------------------------------------------
2658 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2659 if [ "$CFG_EMBEDDED" != "no" ]; then
2660 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2662 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2663 if [ -z "$XPLATFORM" ]; then
2664 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2665 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2669 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2670 if [ -z "$XPLATFORM" ]; then
2671 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2672 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2676 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2677 if [ -z "$XPLATFORM" ]; then
2678 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2679 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2683 if [ -z "$PLATFORM" ]; then
2684 case "$UNAME_MACHINE" in
2686 PLATFORM=qws/linux-x86-g++
2689 PLATFORM=qws/linux-x86_64-g++
2692 PLATFORM=qws/linux-generic-g++
2696 if [ -z "$XPLATFORM" ]; then
2697 if [ "$CFG_EMBEDDED" = "auto" ]; then
2698 if [ -n "$CFG_ARCH" ]; then
2699 CFG_EMBEDDED=$CFG_ARCH
2701 case "$UNAME_MACHINE" in
2709 CFG_EMBEDDED=generic
2714 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2718 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2719 if [ -z "$XPLATFORM" ]; then
2720 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2721 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2725 if [ -z "$XPLATFORM" ]; then
2730 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2737 if [ -z "$PLATFORM" ]; then
2739 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2741 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2743 # PLATFORM=macx-xcode
2750 #PLATFORM=aix-g++-64
2752 #PLATFORM=aix-xlc-64
2754 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2764 # PLATFORM=dynix-g++
2770 PLATFORM=freebsd-g++
2772 - Also available for FreeBSD: freebsd-icc
2776 PLATFORM=openbsd-g++
2787 #PLATFORM=irix-cc-64
2789 - Also available for IRIX: irix-g++ irix-cc-64
2793 case "$UNAME_MACHINE" in
2795 #PLATFORM=hpuxi-acc-32
2796 PLATFORM=hpuxi-acc-64
2798 - Also available for HP-UXi: hpuxi-acc-32
2804 #PLATFORM=hpux-acc-64
2806 #PLATFORM=hpux-acc-o64
2808 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2817 - Also available for Tru64: tru64-g++
2821 case "$UNAME_MACHINE" in
2823 PLATFORM=linux-g++-64
2830 - Also available for Linux: linux-kcc linux-icc linux-cxx
2834 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2835 PLATFORM="solaris-g++"
2837 #PLATFORM=solaris-g++
2839 #PLATFORM=solaris-cc64
2842 - Also available for Solaris: solaris-g++ solaris-cc-64
2845 ReliantUNIX-*:*|SINIX-*:*)
2846 PLATFORM=reliant-cds
2847 #PLATFORM=reliant-cds-64
2849 - Also available for Reliant UNIX: reliant-cds-64
2859 #PLATFORM=unixware-g++
2860 PLATFORM=unixware-cc
2862 - Also available for OpenUNIX: unixware-g++
2866 #PLATFORM=unixware-g++
2867 PLATFORM=unixware-cc
2869 - Also available for UnixWare: unixware-g++
2876 - Also available for SCO OpenServer: sco-g++
2880 PLATFORM=unixware-g++
2883 PLATFORM=unsupported/qnx-g++
2886 if [ "$OPT_HELP" != "yes" ]; then
2888 for p in $PLATFORMS; do
2889 echo " $relconf $* -platform $p"
2892 echo " The build script does not currently recognize all" >&2
2893 echo " platforms supported by Qt." >&2
2894 echo " Rerun this script with a -platform option listed to" >&2
2895 echo " set the system/compiler combination you use." >&2
2902 if [ "$PLATFORM_QWS" = "yes" ]; then
2904 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2906 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2909 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2911 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2912 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2914 if [ -d "$PLATFORM" ]; then
2915 QMAKESPEC="$PLATFORM"
2917 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2919 if [ -d "$XPLATFORM" ]; then
2920 XQMAKESPEC="$XPLATFORM"
2922 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2924 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2925 QT_CROSS_COMPILE=yes
2926 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2929 if [ "$PLATFORM_MAC" = "yes" ]; then
2930 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2932 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2933 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2934 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2935 echo " built with 'macx-g++'" >&2
2941 # check specified platforms are supported
2942 if [ '!' -d "$QMAKESPEC" ]; then
2944 echo " The specified system/compiler is not supported:"
2948 echo " Please see the README file for a complete list."
2952 if [ '!' -d "$XQMAKESPEC" ]; then
2954 echo " The specified system/compiler is not supported:"
2958 echo " Please see the README file for a complete list."
2962 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2964 echo " The specified system/compiler port is not complete:"
2966 echo " $XQMAKESPEC/qplatformdefs.h"
2968 echo " Please contact qt-info@nokia.com."
2973 # now look at the configs and figure out what platform we are config'd for
2974 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2975 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2977 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2979 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2980 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2981 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2982 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2983 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2987 #-------------------------------------------------------------------------------
2988 # determine the system architecture
2989 #-------------------------------------------------------------------------------
2990 if [ "$OPT_VERBOSE" = "yes" ]; then
2991 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2994 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2995 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2997 echo "You have specified a target architecture with -embedded and -arch."
2998 echo "The two architectures you have specified are different, so we can"
2999 echo "not proceed. Either set both to be the same, or only use -embedded."
3005 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
3006 case `basename "$XPLATFORM"` in
3009 echo "You are not licensed for Qt for `basename $XPLATFORM`."
3011 echo "Please contact qt-info@nokia.com to upgrade your license to"
3012 echo "include this platform, or install the Qt Open Source Edition"
3013 echo "if you intend to develop free software."
3019 if [ -z "${CFG_HOST_ARCH}" ]; then
3020 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
3022 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
3023 case "$CFG_HOST_ARCH" in
3028 if [ "$OPT_VERBOSE" = "yes" ]; then
3029 echo " GNU/Hurd ($CFG_HOST_ARCH)"
3033 CFG_HOST_ARCH=`uname -p`
3034 if [ "$OPT_VERBOSE" = "yes" ]; then
3035 echo " SGI ($CFG_HOST_ARCH)"
3039 case "$UNAME_MACHINE" in
3041 if [ "$OPT_VERBOSE" = "yes" ]; then
3042 echo " Sun SPARC (sparc)"
3049 if [ "$OPT_VERBOSE" = "yes" ]; then
3050 echo " 64-bit AMD 80x86 (x86_64)"
3052 CFG_HOST_ARCH=x86_64
3055 if [ "$OPT_VERBOSE" = "yes" ]; then
3056 echo " 32-bit Intel 80x86 (i386)"
3064 case "$UNAME_MACHINE" in
3066 if [ "$OPT_VERBOSE" = "yes" ]; then
3067 echo " 32-bit Apple PowerPC (powerpc)"
3071 if [ "$OPT_VERBOSE" = "yes" ]; then
3072 echo " 32-bit Intel 80x86 (i386)"
3076 CFG_HOST_ARCH=macosx
3079 if [ "$OPT_VERBOSE" = "yes" ]; then
3080 echo " 64-bit IBM PowerPC (powerpc)"
3082 CFG_HOST_ARCH=powerpc
3085 if [ "$OPT_VERBOSE" = "yes" ]; then
3086 echo " HP PA-RISC (parisc)"
3088 CFG_HOST_ARCH=parisc
3091 if [ "$OPT_VERBOSE" = "yes" ]; then
3092 echo " 32-bit Intel 80x86 (i386)"
3096 *:*:x86_64|*:*:amd64)
3097 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3098 if [ "$OPT_VERBOSE" = "yes" ]; then
3099 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3103 if [ "$OPT_VERBOSE" = "yes" ]; then
3104 echo " 64-bit AMD 80x86 (x86_64)"
3106 CFG_HOST_ARCH=x86_64
3110 if [ "$OPT_VERBOSE" = "yes" ]; then
3111 echo " 32-bit PowerPC (powerpc)"
3113 CFG_HOST_ARCH=powerpc
3116 if [ "$OPT_VERBOSE" = "yes" ]; then
3117 echo " 64-bit PowerPC (powerpc)"
3119 CFG_HOST_ARCH=powerpc
3122 if [ "$OPT_VERBOSE" = "yes" ]; then
3123 echo " IBM S/390 (s390)"
3128 if [ "$OPT_VERBOSE" = "yes" ]; then
3134 if [ "$OPT_VERBOSE" = "yes" ]; then
3135 echo " Linux on SPARC"
3140 case "$UNAME_MACHINE" in
3142 if [ "$OPT_VERBOSE" = "yes" ]; then
3143 echo " QNX on Intel 80x86 (i386)"
3150 if [ "$OPT_VERBOSE" = "yes" ]; then
3151 echo " Trying '$UNAME_MACHINE'..."
3153 CFG_HOST_ARCH="$UNAME_MACHINE"
3158 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3159 if [ -n "$CFG_ARCH" ]; then
3160 CFG_EMBEDDED=$CFG_ARCH
3163 case "$CFG_EMBEDDED" in
3186 CFG_ARCH="$CFG_EMBEDDED"
3189 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3190 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3191 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3192 CFG_ARCH=$CFG_HOST_ARCH
3199 # previously, armv6 was a different arch
3205 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3206 if [ "$OPT_VERBOSE" = "yes" ]; then
3207 echo " '$CFG_ARCH' is supported"
3210 if [ "$OPT_VERBOSE" = "yes" ]; then
3211 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3215 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3216 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3217 if [ "$OPT_VERBOSE" = "yes" ]; then
3218 echo " '$CFG_HOST_ARCH' is supported"
3221 if [ "$OPT_VERBOSE" = "yes" ]; then
3222 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3224 CFG_HOST_ARCH=generic
3228 if [ "$OPT_VERBOSE" = "yes" ]; then
3229 echo "System architecture: '$CFG_ARCH'"
3230 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3231 echo "Host architecture: '$CFG_HOST_ARCH'"
3235 #-------------------------------------------------------------------------------
3236 # tests that don't need qmake (must be run before displaying help)
3237 #-------------------------------------------------------------------------------
3239 # detect build style
3240 if [ "$CFG_DEBUG" = "auto" ]; then
3241 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3242 CFG_DEBUG_RELEASE=yes
3244 elif [ "$CFG_DEV" = "yes" ]; then
3245 CFG_DEBUG_RELEASE=no
3248 CFG_DEBUG_RELEASE=no
3252 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3253 QT_CONFIG="$QT_CONFIG build_all"
3256 if [ -z "$PKG_CONFIG" ]; then
3257 # See if PKG_CONFIG is set in the mkspec:
3258 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3260 if [ -z "$PKG_CONFIG" ]; then
3261 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3264 # Work out if we can use pkg-config
3265 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3266 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3268 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3269 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3270 echo >&2 "environment!"
3272 if [ -z "$PKG_CONFIG_PATH" ]; then
3274 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3275 echo >&2 "the host compiler's .pc files will be used. This is probably"
3276 echo >&2 "not what you want."
3278 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3280 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3281 echo >&2 "been set. This means your toolchain's .pc files must contain"
3282 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3283 echo >&2 "tests are failing, please check these files."
3288 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3289 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3290 echo >&2 "dependencies"
3296 if [ ! -n "$PKG_CONFIG" ]; then
3297 QT_CONFIG="$QT_CONFIG no-pkg-config"
3300 # process CFG_MAC_ARCHS
3301 if [ "$PLATFORM_MAC" = "yes" ]; then
3302 # check -arch arguments for validity.
3303 ALLOWED="x86 ppc x86_64 ppc64 i386"
3304 # Save the list so we can re-write it using only valid values
3305 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3307 for i in $CFG_MAC_ARCHS_IN
3309 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3310 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3313 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3314 # These are synonymous values
3315 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3316 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3317 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3319 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3320 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3325 # pass on $CFG_SDK to the configure tests.
3326 if [ '!' -z "$CFG_SDK" ]; then
3327 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3330 # find the default framework value
3331 if [ "$CFG_ARCH" = "macosx" ]; then
3332 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3333 CFG_FRAMEWORK="$CFG_SHARED"
3334 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3336 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3344 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3345 TEST_COMPILER="$CXX"
3347 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3348 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3349 if [ -z "$TEST_COMPILER" ]; then
3350 echo "ERROR: Cannot set the compiler for the configuration tests"
3355 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3356 TEST_COMPILER="nacl-gcc"
3360 if [ -n "$CFG_SYSROOT" ]; then
3361 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3362 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3363 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3365 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3369 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3371 # auto-detect precompiled header support
3372 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3373 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3375 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3380 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3382 echo "WARNING: Using universal binaries disables precompiled headers."
3387 #auto-detect DWARF2 on the mac
3388 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3389 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3396 # auto-detect support for -Xarch on the mac
3397 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3398 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3405 # don't autodetect support for separate debug info on objcopy when
3406 # cross-compiling as lots of toolchains seems to have problems with this
3407 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3408 CFG_SEPARATE_DEBUG_INFO="no"
3411 # auto-detect support for separate debug info in objcopy
3412 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3413 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3414 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3415 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3416 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3417 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3418 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3419 CFG_SEPARATE_DEBUG_INFO=no
3423 # binutils on HP-UX is buggy; default to no.
3424 CFG_SEPARATE_DEBUG_INFO=no
3427 CFG_SEPARATE_DEBUG_INFO=yes
3433 # auto-detect -fvisibility support
3434 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3435 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3436 CFG_REDUCE_EXPORTS=no
3438 CFG_REDUCE_EXPORTS=yes
3442 # detect the availability of the -Bsymbolic-functions linker optimization
3443 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3444 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3445 CFG_REDUCE_RELOCATIONS=no
3447 CFG_REDUCE_RELOCATIONS=yes
3451 # auto-detect GNU make support
3452 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3456 # If -opengl wasn't specified, don't try to auto-detect
3457 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3462 if [ "$PLATFORM_MAC" = "yes" ]; then
3463 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3468 # find the default framework value
3469 if [ "$CFG_ARCH" = "macosx" ]; then
3470 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3471 CFG_FRAMEWORK="$CFG_SHARED"
3472 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3474 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3482 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3483 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3484 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3485 # get the darwin version. 10.0.0 and up means snow leopard.
3486 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3487 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3489 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3494 # x11 tests are done after qmake is built
3497 #setup the build parts
3498 if [ -z "$CFG_BUILD_PARTS" ]; then
3499 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3501 # don't build tools by default when cross-compiling
3502 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3503 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3506 for nobuild in $CFG_NOBUILD_PARTS; do
3507 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3509 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3511 # echo "WARNING: libs is a required part of the build."
3513 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3516 #-------------------------------------------------------------------------------
3517 # post process QT_INSTALL_* variables
3518 #-------------------------------------------------------------------------------
3520 if [ -z "$QT_INSTALL_PREFIX" ]; then
3521 if [ "$CFG_DEV" = "yes" ]; then
3522 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3524 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3527 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3529 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3530 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3531 if [ "$PLATFORM_MAC" = "yes" ]; then
3532 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3535 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3538 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3540 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3541 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3542 if [ "$PLATFORM_MAC" = "yes" ]; then
3543 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3548 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3551 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3553 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3554 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3555 if [ "$PLATFORM_MAC" = "yes" ]; then
3556 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3557 QT_INSTALL_LIBS="/Libraries/Frameworks"
3561 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3563 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3565 if [ -z "$QT_INSTALL_BINS" ]; then #default
3566 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3567 if [ "$PLATFORM_MAC" = "yes" ]; then
3568 QT_INSTALL_BINS="/Developer/Applications/Qt"
3571 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3573 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3575 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3576 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3577 if [ "$PLATFORM_MAC" = "yes" ]; then
3578 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3581 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3583 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3585 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3586 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3587 if [ "$PLATFORM_MAC" = "yes" ]; then
3588 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3591 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3593 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3595 if [ -z "$QT_INSTALL_DATA" ]; then #default
3596 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3598 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3600 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3601 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3603 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3605 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3606 if [ "$PLATFORM_MAC" = "yes" ]; then
3607 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3609 QT_INSTALL_SETTINGS=/etc/xdg
3612 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3614 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3615 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3616 if [ "$PLATFORM_MAC" = "yes" ]; then
3617 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3620 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3622 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3625 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3626 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3627 if [ "$PLATFORM_MAC" = "yes" ]; then
3628 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3631 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3633 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3635 #-------------------------------------------------------------------------------
3636 # help - interactive parts of the script _after_ this section please
3637 #-------------------------------------------------------------------------------
3639 # next, emit a usage message if something failed.
3640 if [ "$OPT_HELP" = "yes" ]; then
3641 [ "x$ERROR" = "xyes" ] && echo
3642 if [ "$CFG_NIS" = "no" ]; then
3649 if [ "$CFG_CUPS" = "no" ]; then
3656 if [ "$CFG_ICONV" = "no" ]; then
3663 if [ "$CFG_LARGEFILE" = "no" ]; then
3670 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3677 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3685 if [ "$CFG_XCB" = "no" ]; then
3693 if [ "$CFG_WAYLAND" = "no" ]; then
3700 if [ "$CFG_XINPUT2" = "no" ]; then
3709 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3710 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3711 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3712 [-release] [-debug] [-debug-and-release]
3713 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3714 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3715 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3716 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3717 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3718 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3719 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3720 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3721 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3722 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3723 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3724 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3725 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3726 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3727 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3728 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3729 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3730 [-no-openssl] [-openssl] [-openssl-linked]
3731 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3732 [-no-javascript-jit] [-javascript-jit]
3733 [-no-script] [-script] [-no-scripttools] [-scripttools]
3734 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3735 [-no-location] [-location]
3736 [additional platform specific options (see below)]
3739 Installation options:
3741 -qpa ................ This will enable the QPA build.
3742 QPA is a window system agnostic implementation of Qt.
3744 These are optional, but you may specify install directories.
3746 -prefix <dir> ...... This will install everything relative to <dir>
3747 (default $QT_INSTALL_PREFIX)
3749 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3752 -hostprefix [dir] .. Tools and libraries needed when developing
3753 applications are installed in [dir]. If [dir] is
3754 not given, the current build directory will be used.
3759 * -prefix-install .... Force a sandboxed "local" installation of
3760 Qt. This will install into
3761 $QT_INSTALL_PREFIX, if this option is
3762 disabled then some platforms will attempt a
3763 "system" install by placing default values to
3764 be placed in a system location other than
3767 You may use these to separate different parts of the install:
3769 -bindir <dir> ......... Executables will be installed to <dir>
3770 (default PREFIX/bin)
3771 -libdir <dir> ......... Libraries will be installed to <dir>
3772 (default PREFIX/lib)
3773 -docdir <dir> ......... Documentation will be installed to <dir>
3774 (default PREFIX/doc)
3775 -headerdir <dir> ...... Headers will be installed to <dir>
3776 (default PREFIX/include)
3777 -plugindir <dir> ...... Plugins will be installed to <dir>
3778 (default PREFIX/plugins)
3779 -importdir <dir> ...... Imports for QML will be installed to <dir>
3780 (default PREFIX/imports)
3781 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3783 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3784 (default PREFIX/translations)
3785 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3786 (default PREFIX/etc/settings)
3787 -examplesdir <dir> .... Examples will be installed to <dir>
3788 (default PREFIX/examples)
3789 -testsdir <dir> ....... Tests will be installed to <dir>
3790 (default PREFIX/tests)
3794 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3795 that needs to be evaluated. If the evaluation succeeds, the feature is
3796 included. Here is a short explanation of each option:
3798 * -release ........... Compile and link Qt with debugging turned off.
3799 -debug ............. Compile and link Qt with debugging turned on.
3800 -debug-and-release . Compile and link two versions of Qt, with and without
3801 debugging turned on (Mac only).
3803 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3805 -opensource ........ Compile and link the Open-Source Edition of Qt.
3806 -commercial ........ Compile and link the Commercial Edition of Qt.
3809 * -shared ............ Create and use shared Qt libraries.
3810 -static ............ Create and use static Qt libraries.
3812 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3814 -fast .............. Configure Qt quickly by generating Makefiles only for
3815 library and subdirectory targets. All other Makefiles
3816 are created as wrappers, which will in turn run qmake.
3818 -no-largefile ...... Disables large file support.
3819 + -largefile ......... Enables Qt to access files larger than 4 GB.
3822 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3829 if [ "$CFG_DBUS" = "no" ]; then
3838 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3839 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3841 -no-accessibility .. Do not compile Accessibility support.
3842 * -accessibility ..... Compile Accessibility support.
3844 $SHN -no-stl ............ Do not compile STL support.
3845 $SHY -stl ............... Compile STL support.
3847 -no-sql-<driver> ... Disable SQL <driver> entirely.
3848 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3850 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3853 Possible values for <driver>:
3854 [ $CFG_SQL_AVAILABLE ]
3856 -system-sqlite ..... Use sqlite from the operating system.
3858 -no-qt3support ..... Disables the Qt 3 support functionality.
3859 * -qt3support ........ Enables the Qt 3 support functionality.
3861 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3862 + -xmlpatterns ....... Build the QtXmlPatterns module.
3863 QtXmlPatterns is built if a decent C++ compiler
3864 is used and exceptions are enabled.
3866 -no-multimedia ..... Do not build the QtMultimedia module.
3867 + -multimedia ........ Build the QtMultimedia module.
3869 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3870 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3872 -no-phonon ......... Do not build the Phonon module.
3873 + -phonon ............ Build the Phonon module.
3874 Phonon is built if a decent C++ compiler is used.
3875 -no-phonon-backend.. Do not build the platform phonon plugin.
3876 + -phonon-backend..... Build the platform phonon plugin.
3878 -no-svg ............ Do not build the SVG module.
3879 + -svg ............... Build the SVG module.
3881 -no-webkit ......... Do not build the WebKit module.
3882 + -webkit ............ Build the WebKit module.
3883 WebKit is built if a decent C++ compiler is used.
3884 -webkit-debug ...... Build the WebKit module with debug symbols.
3886 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3887 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3889 -no-script ......... Do not build the QtScript module.
3890 + -script ............ Build the QtScript module.
3892 -no-scripttools .... Do not build the QtScriptTools module.
3893 + -scripttools ....... Build the QtScriptTools module.
3895 -no-v8 ............. Do not build the V8 module.
3896 + -v8 ................ Build the V8 module.
3898 -no-declarative ..... Do not build the declarative module.
3899 + -declarative ....... Build the declarative module.
3901 -no-declarative-debug ..... Do not build the declarative debugging support.
3902 + -declarative-debug ....... Build the declarative debugging support.
3904 -no-location ....... Do not build the QtLocation module.
3905 + -location .......... Build the QtLocation module.
3907 -platform target ... The operating system and compiler you are building
3910 See the README file for a list of supported
3911 operating systems and compilers.
3914 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3916 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3917 raster - Software rasterizer
3918 opengl - Rendering via OpenGL, Experimental!
3919 openvg - Rendering via OpenVG, Experimental!
3926 -no-mmx ............ Do not compile with use of MMX instructions.
3927 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3928 -no-sse ............ Do not compile with use of SSE instructions.
3929 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3930 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3931 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3932 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3933 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3934 -no-avx ............ Do not compile with use of AVX instructions.
3935 -no-neon ........... Do not compile with use of NEON instructions.
3937 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3938 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3940 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3942 -D <string> ........ Add an explicit define to the preprocessor.
3943 -I <string> ........ Add an explicit include path.
3944 -L <string> ........ Add an explicit library path.
3946 -help, -h .......... Display this information.
3948 Third Party Libraries:
3950 -qt-zlib ........... Use the zlib bundled with Qt.
3951 + -system-zlib ....... Use zlib from the operating system.
3952 See http://www.gzip.org/zlib
3954 -no-gif ............ Do not compile GIF reading support.
3956 -no-libtiff ........ Do not compile TIFF support.
3957 -qt-libtiff ........ Use the libtiff bundled with Qt.
3958 + -system-libtiff .... Use libtiff from the operating system.
3959 See http://www.libtiff.org
3961 -no-libpng ......... Do not compile PNG support.
3962 -qt-libpng ......... Use the libpng bundled with Qt.
3963 + -system-libpng ..... Use libpng from the operating system.
3964 See http://www.libpng.org/pub/png
3966 -no-libmng ......... Do not compile MNG support.
3967 -qt-libmng ......... Use the libmng bundled with Qt.
3968 + -system-libmng ..... Use libmng from the operating system.
3969 See http://www.libmng.com
3971 -no-libjpeg ........ Do not compile JPEG support.
3972 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3973 + -system-libjpeg .... Use libjpeg from the operating system.
3974 See http://www.ijg.org
3976 -no-openssl ........ Do not compile support for OpenSSL.
3977 + -openssl ........... Enable run-time OpenSSL support.
3978 -openssl-linked .... Enabled linked OpenSSL support.
3980 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3985 -make <part> ....... Add part to the list of parts to be built at make time.
3986 ($QT_DEFAULT_BUILD_PARTS)
3987 -nomake <part> ..... Exclude part from the list of parts to be built.
3989 -R <string> ........ Add an explicit runtime library path to the Qt
3991 -l <string> ........ Add an explicit library.
3993 -no-rpath .......... Do not use the library install path as a runtime
3995 + -rpath ............. Link Qt libraries and executables using the library
3996 install path as a runtime library path. Equivalent
3997 to -R install_libpath
3999 -continue .......... Continue as far as possible if an error occurs.
4001 -verbose, -v ....... Print verbose information about each step of the
4004 -silent ............ Reduce the build output so that warnings and errors
4005 can be seen more easily.
4007 * -no-optimized-qmake ... Do not build qmake optimized.
4008 -optimized-qmake ...... Build qmake optimized.
4010 -no-gui ............ Don't build the Qt GUI library
4012 $NSN -no-nis ............ Do not compile NIS support.
4013 $NSY -nis ............... Compile NIS support.
4015 $CUN -no-cups ........... Do not compile CUPS support.
4016 $CUY -cups .............. Compile CUPS support.
4017 Requires cups/cups.h and libcups.so.2.
4019 $CIN -no-iconv .......... Do not compile support for iconv(3).
4020 $CIY -iconv ............. Compile support for iconv(3).
4022 $PHN -no-pch ............ Do not use precompiled header support.
4023 $PHY -pch ............... Use precompiled header support.
4025 $DBN -no-dbus ........... Do not compile the QtDBus module.
4026 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
4027 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
4029 -reduce-relocations ..... Reduce relocations in the libraries through extra
4030 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
4031 experimental; needs GNU ld >= 2.18).
4034 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
4035 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
4042 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4050 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4054 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4055 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4057 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
4058 $XCBY -xcb ............... Compile Xcb support.
4060 $XWN -no-wayland......... Do not compile Wayland support.
4061 $XWY -wayland .......... Compile Wayland support.
4067 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4071 $X2N -no-xinput2......... Do not compile XInput2 support.
4072 $X2Y -xinput2............ Compile XInput2 support.
4078 if [ "$PLATFORM_X11" = "yes" ]; then
4079 if [ "$CFG_SM" = "no" ]; then
4086 if [ "$CFG_XSHAPE" = "no" ]; then
4093 if [ "$CFG_XVIDEO" = "no" ]; then
4100 if [ "$CFG_XINERAMA" = "no" ]; then
4107 if [ "$CFG_FONTCONFIG" = "no" ]; then
4114 if [ "$CFG_XCURSOR" = "no" ]; then
4121 if [ "$CFG_XFIXES" = "no" ]; then
4128 if [ "$CFG_XRANDR" = "no" ]; then
4135 if [ "$CFG_XRENDER" = "no" ]; then
4142 if [ "$CFG_MITSHM" = "no" ]; then
4149 if [ "$CFG_XINPUT" = "no" ]; then
4156 if [ "$CFG_XKB" = "no" ]; then
4163 if [ "$CFG_IM" = "no" ]; then
4174 -no-gtkstyle ....... Do not build the GTK theme integration.
4175 + -gtkstyle .......... Build the GTK theme integration.
4177 * -no-nas-sound ...... Do not compile in NAS sound support.
4178 -system-nas-sound .. Use NAS libaudio from the operating system.
4179 See http://radscan.com/nas.html
4181 -egl ............... Use EGL instead of GLX to manage contexts.
4182 When building for desktop OpenGL, this option will
4183 make Qt use EGL to manage contexts rather than the
4184 GLX, which is the default. Note: For OpenGL ES, EGL
4187 -no-opengl ......... Do not support OpenGL.
4188 + -opengl <api> ...... Enable OpenGL support.
4189 With no parameter, this will auto-detect the "best"
4190 OpenGL API to use. If desktop OpenGL is available, it
4191 will be used. Use desktop or es2 for <api>
4192 to force the use of the Desktop OpenGL or
4193 OpenGL ES 2 APIs instead.
4195 -no-openvg ........ Do not support OpenVG.
4196 + -openvg ........... Enable OpenVG support.
4197 Requires EGL support, typically supplied by an OpenGL
4198 or other graphics implementation.
4200 $SMN -no-sm ............. Do not support X Session Management.
4201 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4203 $SHN -no-xshape ......... Do not compile XShape support.
4204 $SHY -xshape ............ Compile XShape support.
4205 Requires X11/extensions/shape.h.
4207 $XVN -no-xvideo ......... Do not compile XVideo support.
4208 $XVY -xvideo ............ Compile XVideo support.
4209 Requires X11/extensions/Xv.h & Xvlib.h.
4211 $SHN -no-xsync .......... Do not compile XSync support.
4212 $SHY -xsync ............. Compile XSync support.
4213 Requires X11/extensions/sync.h.
4215 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4216 $XAY -xinerama .......... Compile Xinerama support.
4217 Requires X11/extensions/Xinerama.h and libXinerama.
4218 By default, Xinerama support will be compiled if
4219 available and the shared libraries are dynamically
4222 $XCN -no-xcursor ........ Do not compile Xcursor support.
4223 $XCY -xcursor ........... Compile Xcursor support.
4224 Requires X11/Xcursor/Xcursor.h and libXcursor.
4225 By default, Xcursor support will be compiled if
4226 available and the shared libraries are dynamically
4229 $XFN -no-xfixes ......... Do not compile Xfixes support.
4230 $XFY -xfixes ............ Compile Xfixes support.
4231 Requires X11/extensions/Xfixes.h and libXfixes.
4232 By default, Xfixes support will be compiled if
4233 available and the shared libraries are dynamically
4236 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4237 $XZY -xrandr ............ Compile Xrandr support.
4238 Requires X11/extensions/Xrandr.h and libXrandr.
4240 $XRN -no-xrender ........ Do not compile Xrender support.
4241 $XRY -xrender ........... Compile Xrender support.
4242 Requires X11/extensions/Xrender.h and libXrender.
4244 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4245 $XMY -mitshm ............ Compile MIT-SHM support.
4246 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4248 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4249 $FCGY -fontconfig ........ Compile FontConfig support.
4250 Requires fontconfig/fontconfig.h, libfontconfig,
4251 freetype.h and libfreetype.
4253 $XIN -no-xinput ......... Do not compile Xinput support.
4254 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4255 which requires IRIX with wacom.h and libXi or
4256 XFree86 with X11/extensions/XInput.h and libXi.
4258 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4259 $XKY -xkb ............... Compile XKB support.
4264 if [ "$PLATFORM_MAC" = "yes" ]; then
4269 -Fstring ........... Add an explicit framework path.
4270 -fw string ......... Add an explicit framework.
4272 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4274 -carbon .............Build the Carbon version of Qt. 64-bit archs
4275 are not supported by carbon and will be built
4278 * -framework ......... Build Qt as a series of frameworks and
4279 link tools against those frameworks.
4280 -no-framework ...... Do not build Qt as a series of frameworks.
4282 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4283 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4285 -universal ......... Equivalent to -arch "ppc x86"
4287 -arch <arch> ....... Build Qt for <arch>
4288 Example values for <arch>: x86 ppc x86_64 ppc64
4289 Multiple -arch arguments can be specified.
4291 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4292 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4294 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4295 It is only available to Cocoa builds.
4296 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4297 QT_ENABLE_HARFBUZZ environment variable.
4302 if [ "$PLATFORM_QWS" = "yes" ]; then
4304 Qt for Embedded Linux:
4306 -embedded <arch> .... This will enable the embedded build, you must have a
4307 proper license for this switch to work.
4308 Example values for <arch>: arm mips x86 generic
4312 if [ "$PLATFORM_QPA" = "yes" ]; then
4318 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4321 -xplatform target ... The target platform when cross-compiling.
4323 -no-feature-<feature> Do not compile in <feature>.
4324 -feature-<feature> .. Compile in <feature>. The available features
4325 are described in src/corelib/global/qfeatures.txt
4327 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4328 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4330 The floating point format is usually autodetected by configure. Use this
4331 to override the detected value.
4333 -little-endian ...... Target platform is little endian (LSB first).
4334 -big-endian ......... Target platform is big endian (MSB first).
4336 -host-little-endian . Host platform is little endian (LSB first).
4337 -host-big-endian .... Host platform is big endian (MSB first).
4339 You only need to specify the endianness when
4340 cross-compiling, otherwise the host
4341 endianness will be used.
4343 -no-freetype ........ Do not compile in Freetype2 support.
4344 -qt-freetype ........ Use the libfreetype bundled with Qt.
4345 * -system-freetype .... Use libfreetype from the operating system.
4346 See http://www.freetype.org/
4348 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4349 default ($CFG_QCONFIG).
4351 -no-opengl .......... Do not support OpenGL.
4352 -opengl <api> ....... Enable OpenGL ES support
4353 With no parameter, this will attempt to auto-detect
4354 OpenGL ES 2, or regular desktop OpenGL.
4355 Use es2 for <api> to override auto-detection.
4359 if [ "$PLATFORM_QWS" = "yes" ]; then
4362 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4363 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4365 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4366 by default all available decorations are on.
4367 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4368 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4369 linked to at run time.
4370 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4371 -no-decoration-<style> ....Disable decoration <style> entirely.
4372 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4374 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4375 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4376 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4377 linked to at run time.
4378 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4379 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4380 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4382 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4383 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4385 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4387 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4389 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4390 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4392 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4393 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4394 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4396 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4397 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4398 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4400 -iwmmxt ............ Compile using the iWMMXt instruction set
4401 (available on some XScale CPUs).
4405 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4406 if [ "$CFG_GLIB" = "no" ]; then
4414 $GBN -no-glib ........... Do not compile Glib support.
4415 $GBY -glib .............. Compile Glib support.
4420 [ "x$ERROR" = "xyes" ] && exit 1
4425 # -----------------------------------------------------------------------------
4426 # LICENSING, INTERACTIVE PART
4427 # -----------------------------------------------------------------------------
4429 if [ "$PLATFORM_QWS" = "yes" ]; then
4430 Platform="Qt for Embedded Linux"
4431 elif [ "$PLATFORM_QPA" = "yes" ]; then
4432 Platform="Qt Lighthouse"
4433 elif [ "$PLATFORM_MAC" = "yes" ]; then
4434 Platform="Qt for Mac OS X"
4435 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4436 Platform="Qt for Windows"
4437 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4439 Platform="Qt for Linux/X11"
4443 echo "This is the $Platform ${EditionString} Edition."
4446 if [ "$Edition" = "NokiaInternalBuild" ]; then
4447 echo "Detected -nokia-developer option"
4448 echo "Nokia employees and agents are allowed to use this software under"
4449 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4450 elif [ "$Edition" = "OpenSource" ]; then
4452 echo "You are licensed to use this software under the terms of"
4453 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4454 if [ -f "$relpath/LICENSE.GPL3" ]; then
4455 echo "You are also licensed to use this software under the terms of"
4456 echo "the GNU General Public License (GPL) versions 3."
4462 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4463 echo "You have already accepted the terms of the $LicenseType license."
4466 if [ -f "$relpath/LICENSE.GPL3" ]; then
4467 echo "Type '3' to view the GNU General Public License version 3."
4469 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4470 echo "Type 'yes' to accept this license offer."
4471 echo "Type 'no' to decline this license offer."
4473 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4477 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4479 elif [ "$acceptance" = "no" ]; then
4480 echo "You are not licensed to use this software."
4483 elif [ "$acceptance" = "3" ]; then
4484 more "$relpath/LICENSE.GPL3"
4485 elif [ "$acceptance" = "L" ]; then
4486 more "$relpath/LICENSE.LGPL"
4489 elif [ "$Edition" = "Preview" ]; then
4490 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4493 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4494 echo "You have already accepted the terms of the $LicenseType license."
4497 echo "You are licensed to use this software under the terms of"
4498 echo "the $TheLicense"
4500 echo "Type '?' to read the Preview License."
4501 echo "Type 'yes' to accept this license offer."
4502 echo "Type 'no' to decline this license offer."
4504 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4508 if [ "$acceptance" = "yes" ]; then
4510 elif [ "$acceptance" = "no" ] ;then
4511 echo "You are not licensed to use this software."
4514 elif [ "$acceptance" = "?" ]; then
4515 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4518 elif [ "$Edition" != "OpenSource" ]; then
4519 if [ -n "$ExpiryDate" ]; then
4520 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4521 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4522 Today=`date +%Y%m%d`
4523 if [ "$Today" -gt "$ExpiryDate" ]; then
4524 case "$LicenseType" in
4525 Commercial|Academic|Educational)
4526 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4528 echo "NOTICE NOTICE NOTICE NOTICE"
4530 echo " Your support and upgrade period has expired."
4532 echo " You are no longer licensed to use this version of Qt."
4533 echo " Please contact qt-info@nokia.com to renew your support"
4534 echo " and upgrades for this license."
4536 echo "NOTICE NOTICE NOTICE NOTICE"
4541 echo "WARNING WARNING WARNING WARNING"
4543 echo " Your support and upgrade period has expired."
4545 echo " You may continue to use your last licensed release"
4546 echo " of Qt under the terms of your existing license"
4547 echo " agreement. But you are not entitled to technical"
4548 echo " support, nor are you entitled to use any more recent"
4549 echo " Qt releases."
4551 echo " Please contact qt-info@nokia.com to renew your"
4552 echo " support and upgrades for this license."
4554 echo "WARNING WARNING WARNING WARNING"
4561 echo "NOTICE NOTICE NOTICE NOTICE"
4563 echo " Your Evaluation license has expired."
4565 echo " You are no longer licensed to use this software. Please"
4566 echo " contact qt-info@nokia.com to purchase license, or install"
4567 echo " the Qt Open Source Edition if you intend to develop free"
4570 echo "NOTICE NOTICE NOTICE NOTICE"
4577 TheLicense=`head -n 1 "$outpath/LICENSE"`
4579 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4580 echo "You have already accepted the terms of the $TheLicense."
4583 echo "You are licensed to use this software under the terms of"
4584 echo "the $TheLicense."
4586 echo "Type '?' to view the $TheLicense."
4587 echo "Type 'yes' to accept this license offer."
4588 echo "Type 'no' to decline this license offer."
4590 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4594 if [ "$acceptance" = "yes" ]; then
4596 elif [ "$acceptance" = "no" ]; then
4597 echo "You are not licensed to use this software."
4600 else [ "$acceptance" = "?" ]
4601 more "$outpath/LICENSE"
4606 # this should be moved somewhere else
4609 AIX_VERSION=`uname -v`
4610 if [ "$AIX_VERSION" -lt "5" ]; then
4611 QMakeVar add QMAKE_LIBS_X11 -lbind
4618 #-------------------------------------------------------------------------------
4619 # generate qconfig.cpp
4620 #-------------------------------------------------------------------------------
4621 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4623 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4624 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4625 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4626 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4627 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4628 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4629 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4630 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4631 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4632 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4633 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4634 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4635 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4636 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4638 TODAY=`date +%Y-%m-%d`
4639 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4641 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4642 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4644 /* Installation date */
4645 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4649 if [ ! -z "$QT_HOST_PREFIX" ]; then
4650 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4651 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4652 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4653 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4654 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4655 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4656 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4657 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4658 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4659 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4660 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4661 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4663 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4665 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4666 /* Installation Info */
4667 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4668 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4669 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4670 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4671 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4672 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4673 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4674 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4675 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4676 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4677 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4678 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4679 #else // QT_BOOTSTRAPPED
4683 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4684 /* Installation Info */
4685 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4686 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4687 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4688 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4689 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4690 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4691 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4692 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4693 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4694 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4695 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4696 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4699 if [ ! -z "$QT_HOST_PREFIX" ]; then
4700 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4701 #endif // QT_BOOTSTRAPPED
4706 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4707 /* strlen( "qt_lcnsxxxx" ) == 12 */
4708 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4709 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4710 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4711 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4712 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4713 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4714 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4715 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4716 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4717 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4718 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4719 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4720 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4721 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4724 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4725 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4726 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4728 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4729 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4730 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4733 # -----------------------------------------------------------------------------
4734 if [ "$LicenseType" = "Evaluation" ]; then
4735 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4736 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4737 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4740 if [ -n "$EVALKEY" ]; then
4741 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4742 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4743 /* Evaluation license key */
4744 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4746 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4750 # -----------------------------------------------------------------------------
4752 # -----------------------------------------------------------------------------
4755 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4757 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4758 if [ "$OPT_SHADOW" = "yes" ]; then
4759 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4760 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4761 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4766 # $2: optional transformation
4767 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4768 # is where the resulting variable is written to
4769 # Assumes that the optional transformation produces the same variable name for each hit
4770 setBootstrapVariable()
4772 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4778 valStart = index($0, "=") + 1
4781 if (substr($0, valStart - 2, 1) == "+") {
4785 variable = substr($0, 0, valStart - 2 - append)
4786 value = substr($0, valStart)
4787 gsub("[ \t]+", "", variable)
4788 gsub("^[ \t]+", "", value)
4789 gsub("[ \t]+$", "", value)
4791 if (append == 1 && length(combinedValue) > 0) {
4792 combinedValue = combinedValue " " value
4794 combinedValue = value
4798 if (length(combinedValue) > 0) {
4799 printf "%s = %s\n", variable, combinedValue
4805 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4806 echo "Creating qmake. Please wait..."
4809 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4810 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4811 if [ -f "$QCONFIG_H" ]; then
4812 OLD_QCONFIG_H=$QCONFIG_H
4813 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4816 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4817 # when building qmake, we use #defines for the install paths,
4818 # however they are real functions in the library
4819 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4820 mkdir -p "$outpath/src/corelib/global"
4821 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4822 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4825 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4827 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4828 rm -rf mkspecs/default
4829 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4831 for mkfile in GNUmakefile Makefile; do
4834 in_mkfile="${mkfile}.in"
4835 if [ "$mkfile" = "Makefile" ]; then
4836 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4837 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4839 in_mkfile="${mkfile}.unix"
4841 in_mkfile="$relpath/qmake/$in_mkfile"
4842 mkfile="$outpath/qmake/$mkfile"
4843 if [ -f "$mkfile" ]; then
4844 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4847 [ -f "$in_mkfile" ] || continue
4849 echo "########################################################################" > "$mkfile"
4850 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4851 echo "########################################################################" >> "$mkfile"
4854 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4855 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4856 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4858 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4859 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4862 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4863 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4864 if [ "$CFG_SILENT" = "yes" ]; then
4865 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4866 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4868 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4869 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4871 setBootstrapVariable QMAKE_CFLAGS
4872 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4873 setBootstrapVariable QMAKE_LFLAGS
4875 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4876 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4877 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4879 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4880 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4881 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4882 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4883 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4884 elif [ "$CFG_DEBUG" = "yes" ]; then
4885 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4886 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4887 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4888 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4891 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4892 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4893 for rpath in $RPATH_FLAGS; do
4894 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4897 if [ "$BUILD_ON_MAC" = "yes" ]; then
4898 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4899 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4900 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4901 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4902 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4903 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4904 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4905 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4906 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4907 X86_CFLAGS="-arch i386"
4908 X86_LFLAGS="-arch i386"
4909 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4910 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4911 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4913 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4914 PPC_CFLAGS="-arch ppc"
4915 PPC_LFLAGS="-arch ppc"
4916 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4917 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4918 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4920 if [ '!' -z "$CFG_SDK" ]; then
4921 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4922 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4923 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4924 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4925 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4928 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4929 if [ '!' -z "$D_FLAGS" ]; then
4930 for DEF in $D_FLAGS; do
4931 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4934 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4935 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4936 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4937 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4939 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4940 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4941 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4942 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4943 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4944 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4945 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4946 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4947 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4948 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4950 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4951 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4952 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4953 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4958 QMAKE_BUILD_ERROR=no
4959 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4960 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4961 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4962 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4965 #-------------------------------------------------------------------------------
4966 # tests that need qmake
4967 #-------------------------------------------------------------------------------
4969 # detect availability of float math.h functions
4970 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4971 CFG_USE_FLOATMATH=yes
4973 CFG_USE_FLOATMATH=no
4976 # detect mmx support
4977 if [ "${CFG_MMX}" = "auto" ]; then
4978 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4985 # detect 3dnow support
4986 if [ "${CFG_3DNOW}" = "auto" ]; then
4987 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4994 # detect sse support
4995 if [ "${CFG_SSE}" = "auto" ]; then
4996 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
5003 # detect sse2 support
5004 if [ "${CFG_SSE2}" = "auto" ]; then
5005 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
5012 # detect sse3 support
5013 if [ "${CFG_SSE3}" = "auto" ]; then
5014 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
5021 # detect ssse3 support
5022 if [ "${CFG_SSSE3}" = "auto" ]; then
5023 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
5030 # detect sse4.1 support
5031 if [ "${CFG_SSE4_1}" = "auto" ]; then
5032 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
5039 # detect sse4.2 support
5040 if [ "${CFG_SSE4_2}" = "auto" ]; then
5041 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
5048 # detect avx support
5049 if [ "${CFG_AVX}" = "auto" ]; then
5050 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5057 # check iWMMXt support
5058 if [ "$CFG_IWMMXT" = "yes" ]; then
5059 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5060 if [ $? != "0" ]; then
5061 echo "The iWMMXt functionality test failed!"
5062 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5067 # detect neon support
5068 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5069 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
5076 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5079 if [ "$CFG_ZLIB" = "no" ]; then
5080 # Note: Qt no longer support builds without zlib
5081 # So we force a "no" to be "auto" here.
5082 # If you REALLY really need no zlib support, you can still disable
5083 # it by doing the following:
5084 # add "no-zlib" to mkspecs/qconfig.pri
5085 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5087 # There's no guarantee that Qt will build under those conditions
5092 if [ "$CFG_ZLIB" = "auto" ]; then
5093 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
5100 if [ "$CFG_LARGEFILE" = "auto" ]; then
5101 #Large files should be enabled for all Linux systems
5105 # detect how jpeg should be built
5106 if [ "$CFG_JPEG" = "auto" ]; then
5107 if [ "$CFG_SHARED" = "yes" ]; then
5114 if [ "$CFG_LIBJPEG" = "auto" ]; then
5115 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
5122 # detect how gif should be built
5123 if [ "$CFG_GIF" = "auto" ]; then
5124 if [ "$CFG_SHARED" = "yes" ]; then
5131 # detect how tiff should be built
5132 if [ "$CFG_TIFF" = "auto" ]; then
5133 if [ "$CFG_SHARED" = "yes" ]; then
5141 if [ "$CFG_LIBTIFF" = "auto" ]; then
5142 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
5149 # detect how mng should be built
5150 if [ "$CFG_MNG" = "auto" ]; then
5151 if [ "$CFG_SHARED" = "yes" ]; then
5158 if [ "$CFG_LIBMNG" = "auto" ]; then
5159 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
5167 if [ "$CFG_LIBPNG" = "auto" ]; then
5168 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
5175 # detect accessibility
5176 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5177 CFG_ACCESSIBILITY=yes
5180 # auto-detect SQL-modules support
5181 for _SQLDR in $CFG_SQL_AVAILABLE; do
5184 if [ "$CFG_SQL_mysql" != "no" ]; then
5185 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5186 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5187 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5188 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5189 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5190 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5191 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5193 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5194 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5195 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5196 echo " You need MySql 4 or higher."
5197 echo " If you believe this message is in error you may use the continue"
5198 echo " switch (-continue) to $0 to continue."
5203 QT_LFLAGS_MYSQL_R=""
5207 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
5208 QMakeVar add CONFIG use_libmysqlclient_r
5209 if [ "$CFG_SQL_mysql" = "auto" ]; then
5210 CFG_SQL_mysql=plugin
5212 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5213 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
5214 if [ "$CFG_SQL_mysql" = "auto" ]; then
5215 CFG_SQL_mysql=plugin
5218 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5219 echo "MySQL support cannot be enabled due to functionality tests!"
5220 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5221 echo " If you believe this message is in error you may use the continue"
5222 echo " switch (-continue) to $0 to continue."
5227 QT_LFLAGS_MYSQL_R=""
5235 if [ "$CFG_SQL_psql" != "no" ]; then
5236 # Be careful not to use native pg_config when cross building.
5237 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5238 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5239 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5241 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5242 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5243 # But, respect PSQL_LIBS if set
5244 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5245 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
5246 if [ "$CFG_SQL_psql" = "auto" ]; then
5250 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5251 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5252 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5253 echo " If you believe this message is in error you may use the continue"
5254 echo " switch (-continue) to $0 to continue."
5265 if [ "$CFG_SQL_odbc" != "no" ]; then
5266 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
5267 if [ "$CFG_SQL_odbc" = "auto" ]; then
5271 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
5272 QT_LFLAGS_ODBC="-liodbc"
5273 if [ "$CFG_SQL_odbc" = "auto" ]; then
5277 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5278 echo "ODBC support cannot be enabled due to functionality tests!"
5279 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5280 echo " If you believe this message is in error you may use the continue"
5281 echo " switch (-continue) to $0 to continue."
5291 if [ "$CFG_SQL_oci" != "no" ]; then
5292 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
5293 if [ "$CFG_SQL_oci" = "auto" ]; then
5297 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5298 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5299 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5300 echo " If you believe this message is in error you may use the continue"
5301 echo " switch (-continue) to $0 to continue."
5310 if [ "$CFG_SQL_tds" != "no" ]; then
5311 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5312 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5313 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
5314 if [ "$CFG_SQL_tds" = "auto" ]; then
5318 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5319 echo "TDS support cannot be enabled due to functionality tests!"
5320 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5321 echo " If you believe this message is in error you may use the continue"
5322 echo " switch (-continue) to $0 to continue."
5331 if [ "$CFG_SQL_db2" != "no" ]; then
5332 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
5333 if [ "$CFG_SQL_db2" = "auto" ]; then
5337 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5338 echo "ODBC support cannot be enabled due to functionality tests!"
5339 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5340 echo " If you believe this message is in error you may use the continue"
5341 echo " switch (-continue) to $0 to continue."
5350 if [ "$CFG_SQL_ibase" != "no" ]; then
5351 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
5352 if [ "$CFG_SQL_ibase" = "auto" ]; then
5353 CFG_SQL_ibase=plugin
5356 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5357 echo "InterBase support cannot be enabled due to functionality tests!"
5358 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5359 echo " If you believe this message is in error you may use the continue"
5360 echo " switch (-continue) to $0 to continue."
5369 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5370 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
5371 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5372 CFG_SQL_sqlite2=plugin
5375 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5376 echo "SQLite2 support cannot be enabled due to functionality tests!"
5377 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5378 echo " If you believe this message is in error you may use the continue"
5379 echo " switch (-continue) to $0 to continue."
5388 if [ "$CFG_SQL_sqlite" != "no" ]; then
5389 SQLITE_AUTODETECT_FAILED="no"
5390 if [ "$CFG_SQLITE" = "system" ]; then
5391 if [ -n "$PKG_CONFIG" ]; then
5392 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5393 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5395 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
5396 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5397 CFG_SQL_sqlite=plugin
5399 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5401 SQLITE_AUTODETECT_FAILED="yes"
5404 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5405 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5406 CFG_SQL_sqlite=plugin
5409 SQLITE_AUTODETECT_FAILED="yes"
5413 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5414 echo "SQLite 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."
5423 if [ "$OPT_VERBOSE" = "yes" ]; then
5424 echo "unknown SQL driver: $_SQLDR"
5430 # auto-detect NIS support
5431 if [ "$CFG_NIS" != "no" ]; then
5432 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
5435 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5436 echo "NIS support cannot be enabled due to functionality tests!"
5437 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5438 echo " If you believe this message is in error you may use the continue"
5439 echo " switch (-continue) to $0 to continue."
5447 # auto-detect CUPS support
5448 if [ "$CFG_CUPS" != "no" ]; then
5449 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
5452 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5453 echo "Cups support cannot be enabled due to functionality tests!"
5454 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5455 echo " If you believe this message is in error you may use the continue"
5456 echo " switch (-continue) to $0 to continue."
5464 # auto-detect iconv(3) support
5465 if [ "$CFG_ICONV" != "no" ]; then
5466 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5468 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
5470 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
5472 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
5475 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5476 echo "Iconv support cannot be enabled due to functionality tests!"
5477 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5478 echo " If you believe this message is in error you may use the continue"
5479 echo " switch (-continue) to $0 to continue."
5487 # auto-detect libdbus-1 support
5488 if [ "$CFG_DBUS" != "no" ]; then
5489 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5490 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5491 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5493 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
5494 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5495 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5496 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5498 if [ "$CFG_DBUS" = "auto" ]; then
5500 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5501 # CFG_DBUS is "yes" or "linked" here
5503 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5504 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5505 echo " If you believe this message is in error you may use the continue"
5506 echo " switch (-continue) to $0 to continue."
5512 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5513 CFG_MULTIMEDIA="$CFG_GUI"
5516 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5517 echo "QtMultimedia requested, but it can't be built without QtGui"
5521 # Generate a CRC of the namespace for using in constants for the Carbon port.
5522 # This should mean that you really *can* load two Qt's and have our custom
5523 # Carbon events work.
5524 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5525 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`
5528 # X11/QWS/Lighthouse
5529 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5531 # auto-detect Glib support
5532 if [ "$CFG_GLIB" != "no" ]; then
5533 if [ -n "$PKG_CONFIG" ]; then
5534 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5535 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5537 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
5539 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5540 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5542 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5543 echo "Glib support cannot be enabled due to functionality tests!"
5544 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5545 echo " If you believe this message is in error you may use the continue"
5546 echo " switch (-continue) to $0 to continue."
5554 if [ "$CFG_GUI" = "no" ]; then
5555 if [ "$CFG_PHONON" = "auto" ]; then
5558 if [ "$CFG_PHONON" != "no" ]; then
5559 echo "Phonon enabled, but GUI disabled."
5560 echo " You might need to either enable the GUI or disable Phonon"
5565 # Auto-detect GStreamer support (needed for Phonon)
5566 if [ "$CFG_PHONON" != "no" ]; then
5567 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5568 if [ -n "$PKG_CONFIG" ]; then
5569 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5570 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5572 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
5574 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5575 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5577 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5578 echo "Gstreamer 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."
5587 elif [ "$CFG_GLIB" = "no" ]; then
5594 if [ "$CFG_PHONON" != "no" ]; then
5595 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5596 if [ "$CFG_GSTREAMER" = "yes" ]; then
5599 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5600 echo "Phonon support cannot be enabled due to functionality tests!"
5601 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5602 echo " If you believe this message is in error you may use the continue"
5603 echo " switch (-continue) to $0 to continue."
5614 # auto-detect icd support
5615 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5616 if [ -n "$PKG_CONFIG" ]; then
5617 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5618 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5620 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
5621 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5622 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5623 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5625 if [ "$CFG_ICD" = "auto" ]; then
5627 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5630 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5631 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5632 echo " If you believe this message is in error you may use the continue"
5633 echo " switch (-continue) to $0 to continue."
5637 elif [ "$CFG_GLIB" = "no" ]; then
5641 # auto-detect libicu support
5642 if [ "$CFG_ICU" != "no" ]; then
5643 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5644 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5646 if [ "$CFG_ICU" = "auto" ]; then
5648 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5651 echo "The ICU library support cannot be enabled."
5652 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5653 echo " If you believe this message is in error you may use the continue"
5654 echo " switch (-continue) to $0 to continue."
5660 # Auto-detect PulseAudio support
5661 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5662 if [ -n "$PKG_CONFIG" ]; then
5663 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5664 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5666 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
5668 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5669 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5671 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5672 echo "PulseAudio support cannot be enabled due to functionality tests!"
5673 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5674 echo " If you believe this message is in error you may use the continue"
5675 echo " switch (-continue) to $0 to continue."
5682 fi # X11/QWS/Lighthouse
5685 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5686 x11tests="$relpath/config.tests/x11"
5689 # work around broken X11 headers when using GCC 2.95 or later
5691 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5692 if [ $NOTYPE = "yes" ]; then
5693 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5694 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5697 # Check we actually have X11 :-)
5698 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5699 if [ $? != "0" ]; then
5700 echo "Basic XLib functionality test failed!"
5701 echo " You might need to modify the include and library search paths by editing"
5702 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5708 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5709 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5710 if [ "$CFG_GUI" = "no" ]; then
5711 if [ "$CFG_OPENGL" = "auto" ]; then
5714 if [ "$CFG_OPENGL" != "no" ]; then
5715 echo "OpenGL enabled, but GUI disabled."
5716 echo " You might need to either enable the GUI or disable OpenGL"
5720 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5721 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
5723 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
5725 if [ "$CFG_EGL" = "no" ]; then
5729 if [ "$CFG_OPENGL" = "yes" ]; then
5730 echo "All the OpenGL functionality tests failed!"
5731 echo " You might need to modify the include and library search paths by editing"
5732 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5733 echo " ${XQMAKESPEC}."
5740 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5741 if [ "$CFG_OPENGL" = "desktop" ]; then
5742 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5743 if [ $? != "0" ]; then
5744 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5751 elif [ "$CFG_OPENGL" = "es2" ]; then
5753 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5754 if [ $? != "0" ]; then
5755 echo "The OpenGL ES 2.0 functionality test failed!"
5756 echo " You might need to modify the include and library search paths by editing"
5757 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5758 echo " ${XQMAKESPEC}."
5761 elif [ "$CFG_OPENGL" = "desktop" ]; then
5762 # Desktop OpenGL support
5763 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5764 if [ $? != "0" ]; then
5765 echo "The OpenGL functionality test failed!"
5766 echo " You might need to modify the include and library search paths by editing"
5767 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5768 echo " ${XQMAKESPEC}."
5773 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5774 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5775 if [ $? != "0" ]; then
5776 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5784 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5785 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5786 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5787 CFG_GRAPHICS_SYSTEM=default
5789 fi # X11/MINGW OpenGL
5792 if [ "$PLATFORM_X11" = "yes" ]; then
5793 # auto-detect Xcursor support
5794 if [ "$CFG_XCURSOR" != "no" ]; then
5795 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
5796 if [ "$CFG_XCURSOR" != "runtime" ]; then
5800 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5801 echo "Xcursor support cannot be enabled due to functionality tests!"
5802 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5803 echo " If you believe this message is in error you may use the continue"
5804 echo " switch (-continue) to $0 to continue."
5812 # auto-detect Xfixes support
5813 if [ "$CFG_XFIXES" != "no" ]; then
5814 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5815 if [ "$CFG_XFIXES" != "runtime" ]; then
5819 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5820 echo "Xfixes support cannot be enabled due to functionality tests!"
5821 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5822 echo " If you believe this message is in error you may use the continue"
5823 echo " switch (-continue) to $0 to continue."
5831 # auto-detect Xrandr support (resize and rotate extension)
5832 if [ "$CFG_XRANDR" != "no" ]; then
5833 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
5834 if [ "$CFG_XRANDR" != "runtime" ]; then
5838 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5839 echo "Xrandr support cannot be enabled due to functionality tests!"
5840 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5841 echo " If you believe this message is in error you may use the continue"
5842 echo " switch (-continue) to $0 to continue."
5850 # auto-detect Xrender support
5851 if [ "$CFG_XRENDER" != "no" ]; then
5852 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
5855 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5856 echo "Xrender support cannot be enabled due to functionality tests!"
5857 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5858 echo " If you believe this message is in error you may use the continue"
5859 echo " switch (-continue) to $0 to continue."
5867 # Additional check to decide if WebKit support will be included
5868 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5869 echo "Warning: -no-xrender will disable the QtWebkit module."
5873 # auto-detect MIT-SHM support
5874 if [ "$CFG_MITSHM" != "no" ]; then
5875 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
5878 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5879 echo "MITSHM support cannot be enabled due to functionality tests!"
5880 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5881 echo " If you believe this message is in error you may use the continue"
5882 echo " switch (-continue) to $0 to continue."
5890 # auto-detect FontConfig support
5891 if [ "$CFG_FONTCONFIG" != "no" ]; then
5892 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5893 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5894 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5896 QT_CFLAGS_FONTCONFIG=
5897 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5899 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
5901 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5902 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5903 CFG_LIBFREETYPE=system
5905 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5906 echo "FontConfig support cannot be enabled due to functionality tests!"
5907 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5908 echo " If you believe this message is in error you may use the continue"
5909 echo " switch (-continue) to $0 to continue."
5917 # auto-detect Session Management support
5918 if [ "$CFG_SM" = "auto" ]; then
5919 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
5922 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5923 echo "Session Management support cannot be enabled due to functionality tests!"
5924 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5925 echo " If you believe this message is in error you may use the continue"
5926 echo " switch (-continue) to $0 to continue."
5934 # auto-detect SHAPE support
5935 if [ "$CFG_XSHAPE" != "no" ]; then
5936 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
5939 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5940 echo "XShape support cannot be enabled due to functionality tests!"
5941 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5942 echo " If you believe this message is in error you may use the continue"
5943 echo " switch (-continue) to $0 to continue."
5951 # auto-detect XVideo support
5952 if [ "$CFG_XVIDEO" != "no" ]; then
5953 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
5956 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5957 echo "XVideo support cannot be enabled due to functionality tests!"
5958 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5959 echo " If you believe this message is in error you may use the continue"
5960 echo " switch (-continue) to $0 to continue."
5968 # auto-detect XSync support
5969 if [ "$CFG_XSYNC" != "no" ]; then
5970 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
5973 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5974 echo "XSync support cannot be enabled due to functionality tests!"
5975 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5976 echo " If you believe this message is in error you may use the continue"
5977 echo " switch (-continue) to $0 to continue."
5985 # auto-detect Xinerama support
5986 if [ "$CFG_XINERAMA" != "no" ]; then
5987 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
5988 if [ "$CFG_XINERAMA" != "runtime" ]; then
5992 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5993 echo "Xinerama support cannot be enabled due to functionality tests!"
5994 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5995 echo " If you believe this message is in error you may use the continue"
5996 echo " switch (-continue) to $0 to continue."
6004 # auto-detect Xinput support
6005 if [ "$CFG_XINPUT" != "no" ]; then
6006 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
6007 if [ "$CFG_XINPUT" != "runtime" ]; then
6011 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6012 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
6013 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6014 echo " If you believe this message is in error you may use the continue"
6015 echo " switch (-continue) to $0 to continue."
6023 # auto-detect XKB support
6024 if [ "$CFG_XKB" != "no" ]; then
6025 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
6028 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6029 echo "XKB 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."
6040 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
6041 if [ -n "$PKG_CONFIG" ]; then
6042 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
6043 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
6045 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
6047 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
6048 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
6050 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6051 echo "Gtk theme support cannot be enabled due to functionality tests!"
6052 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6053 echo " If you believe this message is in error you may use the continue"
6054 echo " switch (-continue) to $0 to continue."
6060 elif [ "$CFG_GLIB" = "no" ]; then
6066 if [ "$PLATFORM_MAC" = "yes" ]; then
6067 if [ "$CFG_PHONON" != "no" ]; then
6068 # Always enable Phonon (unless it was explicitly disabled)
6072 if [ "$CFG_COREWLAN" = "auto" ]; then
6073 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
6082 if [ "$PLATFORM_QPA" = "yes" ]; then
6083 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6084 if [ "$CFG_ARCH" = "macosx" ]; then
6086 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6087 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
6089 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
6092 if [ "$CFG_OPENGL" = "yes" ]; then
6093 echo "All the OpenGL functionality tests failed!"
6094 echo " You might need to modify the include and library search paths by editing"
6095 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6096 echo " ${XQMAKESPEC}."
6101 elif [ "$CFG_OPENGL" = "es2" ]; then
6103 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6104 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6105 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6106 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6107 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6108 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6109 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6110 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6113 "$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
6114 if [ $? != "0" ]; then
6115 echo "The OpenGL ES 2.0 functionality test failed!"
6116 echo " You might need to modify the include and library search paths by editing"
6117 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6118 echo " ${XQMAKESPEC}."
6121 elif [ "$CFG_OPENGL" = "desktop" ]; then
6122 # Desktop OpenGL support
6123 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6124 if [ $? != "0" ]; then
6125 echo "The OpenGL functionality test failed!"
6126 echo " You might need to modify the include and library search paths by editing"
6127 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6128 echo " ${XQMAKESPEC}."
6133 # auto-detect FontConfig support
6134 if [ "$CFG_FONTCONFIG" != "no" ]; then
6135 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6136 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6137 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6139 QT_CFLAGS_FONTCONFIG=
6140 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6142 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
6143 QT_CONFIG="$QT_CONFIG fontconfig"
6144 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6145 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6146 CFG_LIBFREETYPE=system
6151 # Save these for a check later
6152 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6153 ORIG_CFG_XCB="$CFG_XCB"
6155 if [ "$CFG_WAYLAND" != "no" ]; then
6156 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6157 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6158 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6159 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6160 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6162 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
6164 QT_CONFIG="$QT_CONFIG wayland"
6165 elif [ "$CFG_WAYLAND" = "yes" ]; then
6166 echo "The Wayland functionality test failed!"
6170 QMakeVar add DEFINES QT_NO_WAYLAND
6174 # Check we actually have X11 :-)
6175 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
6176 QT_CONFIG="$QT_CONFIG xlib"
6179 if [ "$CFG_XCB" != "no" ]; then
6180 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6182 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
6183 QT_CONFIG="$QT_CONFIG xcb-render"
6186 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
6188 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6191 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
6192 QT_CONFIG="$QT_CONFIG xcb-xlib"
6195 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6196 # auto-detect XInput2/Xinput support
6197 if [ "$CFG_XINPUT2" != "no" ]; then
6198 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
6202 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6203 echo "XInput2 support cannot be enabled due to functionality tests!"
6204 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6205 echo " If you believe this message is in error you may use the continue"
6206 echo " switch (-continue) to $0 to continue."
6215 if [ "$CFG_XCB" = "yes" ]; then
6216 echo "The XCB test failed!"
6217 echo " You might need to install dependency packages."
6218 echo " See src/plugins/platforms/xcb/README."
6222 QMakeVar add DEFINES QT_NO_XCB
6226 # Detect libxkbcommon
6227 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6228 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6229 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6230 if [ "$CFG_WAYLAND" = "yes" ]; then
6231 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6232 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6234 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6235 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6237 if [ "$CFG_WAYLAND" = "yes" ]; then
6238 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6240 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6243 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6244 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6245 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6246 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6247 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6248 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6249 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6252 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6253 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6254 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6255 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6258 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
6259 QT_CONFIG="$QT_CONFIG coreservices"
6261 QMakeVar add DEFINES QT_NO_CORESERVICES
6264 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6265 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6266 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6267 echo "No QPA platform plugin enabled!"
6268 echo " If you really want to build without a QPA platform plugin you must pass"
6269 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6270 echo " cannot run GUI applications."
6280 if [ "$PLATFORM_QWS" = "yes" ]; then
6282 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6283 if [ "$CFG_GUI" = "no" ]; then
6284 if [ "$CFG_OPENGL" = "auto" ]; then
6287 if [ "$CFG_OPENGL" != "no" ]; then
6288 echo "OpenGL enabled, but GUI disabled."
6289 echo " You might need to either enable the GUI or disable OpenGL"
6293 if [ "$CFG_OPENGL" = "yes" ]; then
6295 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
6298 elif [ "$CFG_OPENGL" = "es2" ]; then
6300 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6301 if [ $? != "0" ]; then
6302 echo "The OpenGL ES 2.0 functionality test failed!"
6303 echo " You might need to modify the include and library search paths by editing"
6304 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6305 echo " ${XQMAKESPEC}."
6309 elif [ "$CFG_OPENGL" = "desktop" ]; then
6310 # Desktop OpenGL support
6311 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6316 if [ "$PLATFORM_QWS" = "yes" ]; then
6319 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6320 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6321 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6322 if [ $? != "0" ]; then
6323 echo "The Ahi screen driver functionality test failed!"
6324 echo " You might need to modify the include and library search paths by editing"
6325 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6326 echo " ${XQMAKESPEC}."
6331 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6332 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6333 if [ $? != "0" ]; then
6334 echo "The SVGAlib screen driver functionality test failed!"
6335 echo " You might need to modify the include and library search paths by editing"
6336 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6337 echo " ${XQMAKESPEC}."
6342 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6343 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6344 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6345 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6346 elif directfb-config --version >/dev/null 2>&1; then
6347 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6348 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6351 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6352 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6353 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6354 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6357 "$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
6358 if [ $? != "0" ]; then
6359 echo "The DirectFB screen driver functionality test failed!"
6360 echo " You might need to modify the include and library search paths by editing"
6361 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6362 echo " ${XQMAKESPEC}."
6370 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6371 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6372 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6373 if [ $? != "0" ]; then
6374 echo "The tslib functionality test failed!"
6375 echo " You might need to modify the include and library search paths by editing"
6376 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6377 echo " ${XQMAKESPEC}."
6386 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6387 if [ $? != "0" ]; then
6388 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6395 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6396 if [ "$CFG_EGL" != "no" ]; then
6397 # detect EGL support
6398 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
6399 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6404 if [ "$EGL_VARIANT" = "none" ]; then
6405 if [ "$CFG_EGL" = "yes" ]; then
6406 echo "The EGL functionality test failed!"
6407 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6408 echo " You might need to modify the include and library search paths by editing"
6409 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6410 echo " ${XQMAKESPEC}."
6414 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6415 if [ "$CFG_OPENGL" = "es2" ]; then
6422 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6425 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6426 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6427 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6428 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6429 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
6430 CFG_LIBFREETYPE=system
6436 if [ "$CFG_ENDIAN" = "auto" ]; then
6437 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6438 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6439 elif [ "$PLATFORM_MAC" = "yes" ]; then
6442 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6444 if [ "$F" -eq 0 ]; then
6445 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6446 elif [ "$F" -eq 1 ]; then
6447 CFG_ENDIAN="Q_BIG_ENDIAN"
6450 echo "The target system byte order could not be detected!"
6451 echo "Turn on verbose messaging (-v) to see the final report."
6452 echo "You can use the -little-endian or -big-endian switch to"
6453 echo "$0 to continue."
6459 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6460 if [ "$PLATFORM_MAC" = "yes" ]; then
6463 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6465 if [ "$F" -eq 0 ]; then
6466 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6467 elif [ "$F" -eq 1 ]; then
6468 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6471 echo "The host system byte order could not be detected!"
6472 echo "Turn on verbose messaging (-v) to see the final report."
6473 echo "You can use the -host-little-endian or -host-big-endian switch to"
6474 echo "$0 to continue."
6480 if [ "$CFG_ARMFPA" != "auto" ]; then
6481 if [ "$CFG_ARMFPA" = "yes" ]; then
6482 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6483 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6485 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6488 CFG_DOUBLEFORMAT="normal"
6493 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6494 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6495 CFG_DOUBLEFORMAT=normal
6497 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6499 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6500 CFG_DOUBLEFORMAT=normal
6501 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6502 CFG_DOUBLEFORMAT=normal
6503 elif [ "$F" -eq 10 ]; then
6504 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6505 elif [ "$F" -eq 11 ]; then
6506 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6507 elif [ "$F" -eq 12 ]; then
6508 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6510 elif [ "$F" -eq 13 ]; then
6511 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6515 echo "The system floating point format could not be detected."
6516 echo "This may cause data to be generated in a wrong format"
6517 echo "Turn on verbose messaging (-v) to see the final report."
6518 # we do not fail on this since this is a new test, and if it fails,
6519 # the old behavior should be correct in most cases
6520 CFG_DOUBLEFORMAT=normal
6526 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6530 if [ "$CFG_STL" != "no" ]; then
6531 if [ "$HAVE_STL" = "yes" ]; then
6534 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6535 echo "STL support cannot be enabled due to functionality tests!"
6536 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6537 echo " If you believe this message is in error you may use the continue"
6538 echo " switch (-continue) to $0 to continue."
6546 # detect POSIX clock_gettime()
6547 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6548 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
6549 CFG_CLOCK_GETTIME=yes
6551 CFG_CLOCK_GETTIME=no
6555 # detect POSIX monotonic clocks
6556 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6557 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
6558 CFG_CLOCK_MONOTONIC=yes
6560 CFG_CLOCK_MONOTONIC=no
6562 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6563 CFG_CLOCK_MONOTONIC=no
6567 if [ "$CFG_MREMAP" = "auto" ]; then
6568 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6575 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6576 if [ "$CFG_GETADDRINFO" != "no" ]; then
6577 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6580 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6581 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6582 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6583 echo " If you believe this message is in error you may use the continue"
6584 echo " switch (-continue) to $0 to continue."
6592 # find if the platform provides inotify
6593 if [ "$CFG_INOTIFY" != "no" ]; then
6594 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6597 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6598 echo "inotify support cannot be enabled due to functionality tests!"
6599 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6600 echo " If you believe this message is in error you may use the continue"
6601 echo " switch (-continue) to $0 to continue."
6609 # find if the platform provides if_nametoindex (ipv6 interface name support)
6610 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6611 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
6614 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6615 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6616 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6617 echo " If you believe this message is in error you may use the continue"
6618 echo " switch (-continue) to $0 to continue."
6626 # find if the platform provides getifaddrs (network interface enumeration)
6627 if [ "$CFG_GETIFADDRS" != "no" ]; then
6628 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6631 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6632 echo "getifaddrs support cannot be enabled due to functionality tests!"
6633 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6634 echo " If you believe this message is in error you may use the continue"
6635 echo " switch (-continue) to $0 to continue."
6644 if [ "$CFG_OPENSSL" != "no" ]; then
6645 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
6646 if [ "$CFG_OPENSSL" = "auto" ]; then
6650 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6651 echo "OpenSSL support cannot be enabled due to functionality tests!"
6652 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6653 echo " If you believe this message is in error you may use the continue"
6654 echo " switch (-continue) to $0 to continue."
6662 # detect OpenVG support
6663 if [ "$CFG_OPENVG" != "no" ]; then
6664 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
6665 if [ "$CFG_OPENVG" = "auto" ]; then
6668 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
6669 if [ "$CFG_OPENVG" = "auto" ]; then
6672 CFG_OPENVG_ON_OPENGL=yes
6673 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
6674 if [ "$CFG_OPENVG" = "auto" ]; then
6677 CFG_OPENVG_LC_INCLUDES=yes
6678 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
6679 if [ "$CFG_OPENVG" = "auto" ]; then
6682 CFG_OPENVG_LC_INCLUDES=yes
6683 CFG_OPENVG_ON_OPENGL=yes
6685 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6686 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6687 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6688 echo " If you believe this message is in error you may use the continue"
6689 echo " switch (-continue) to $0 to continue."
6695 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
6696 CFG_OPENVG_SHIVA=yes
6700 # if openvg is disabled and the user specified graphicssystem vg, disable it...
6701 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
6702 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
6703 CFG_GRAPHICS_SYSTEM=default
6706 if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
6707 echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
6711 if [ "$CFG_PTMALLOC" != "no" ]; then
6712 # build ptmalloc, copy .a file to lib/
6713 echo "Building ptmalloc. Please wait..."
6714 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
6715 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
6717 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
6720 if [ "$CFG_ALSA" = "auto" ]; then
6721 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6728 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6729 if [ "$CFG_ARCH" = "arm" ]; then
6730 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6731 if [ $? != "0" ]; then
6732 CFG_JAVASCRIPTCORE_JIT=no
6735 case "$XPLATFORM" in
6737 CFG_JAVASCRIPTCORE_JIT=no
6743 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6744 QMakeVar set JAVASCRIPTCORE_JIT yes
6745 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6746 QMakeVar set JAVASCRIPTCORE_JIT no
6749 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6750 CFG_AUDIO_BACKEND=yes
6753 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6754 echo "Warning: largefile support cannot be disabled for win32."
6758 #-------------------------------------------------------------------------------
6759 # ask for all that hasn't been auto-detected or specified in the arguments
6760 #-------------------------------------------------------------------------------
6762 ### fix this: user input should be validated in a loop
6763 if [ "$PLATFORM_QWS" = "yes" ]; then
6764 PROMPT_FOR_DEPTHS="yes"
6766 PROMPT_FOR_DEPTHS="no"
6768 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6770 echo "Choose pixel-depths to support:"
6772 echo " 1. 1bpp, black/white"
6773 echo " 4. 4bpp, grayscale"
6774 echo " 8. 8bpp, paletted"
6775 echo " 12. 12bpp, rgb 4-4-4"
6776 echo " 15. 15bpp, rgb 5-5-5"
6777 echo " 16. 16bpp, rgb 5-6-5"
6778 echo " 18. 18bpp, rgb 6-6-6"
6779 echo " 24. 24bpp, rgb 8-8-8"
6780 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6781 echo " all. All supported depths"
6783 echo "Your choices (default 8,16,32):"
6785 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6786 CFG_QWS_DEPTHS=8,16,32
6789 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6790 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6791 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6793 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6795 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6796 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6801 # enable dwarf2 support on Mac
6802 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6803 QT_CONFIG="$QT_CONFIG dwarf2"
6806 # Set the default arch if there are no "-arch" arguments on the configure line
6807 # For "-carbon" builds: 32 bit x86/ppc.
6808 # For builds on snow leopard : compiler default (64-bit).
6809 # For builds on leopard : compiler default (32-bit).
6810 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6811 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6813 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6814 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6815 CFG_MAC_ARCHS=" x86"
6816 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6817 CFG_MAC_ARCHS=" ppc"
6819 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6822 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6825 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6828 # enable Cocoa and/or Carbon on Mac
6829 # -carbon on the command line disables Cocoa, except for 64-bit archs
6830 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6831 CFG_MAC_CARBON="YES"
6834 # check which archs are in use, enable cocoa if we find a 64-bit one
6835 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6836 CFG_MAC_COCOA="yes";
6837 CFG_MAC_CARBON="no";
6838 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6839 CFG_MAC_CARBON="yes";
6841 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6842 CFG_MAC_CARBON="yes";
6847 # select Carbon on 10.4 Tiger.
6848 if [ "$PLATFORM_MAC" = "yes" ]; then
6849 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6850 if [ "$VERSION" == 8 ]; then
6852 CFG_MAC_CARBON="yes";
6856 # select Carbon when using the 10.4u SDK
6857 if [ "$PLATFORM_MAC" = "yes" ]; then
6858 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6861 CFG_MAC_CARBON="yes";
6865 # but disable Cocoa if cross-building for mingw
6866 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6868 # disable Qt 3 support on VxWorks
6869 case "$XPLATFORM" in
6870 unsupported/vxworks*)
6875 # enable Qt 3 support functionality
6876 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6877 QT_CONFIG="$QT_CONFIG gui-qt3support"
6881 if [ "$CFG_PHONON" = "yes" ]; then
6882 # No longer needed after modularization
6883 #QT_CONFIG="$QT_CONFIG phonon"
6884 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6885 QT_CONFIG="$QT_CONFIG phonon-backend"
6888 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6891 # disable accessibility
6892 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6893 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6895 QT_CONFIG="$QT_CONFIG accessibility"
6898 # egl stuff does not belong in lighthouse, but rather in plugins
6899 if [ "$PLATFORM_QPA" = "yes" ]; then
6904 if [ "$CFG_EGL" = "no" ]; then
6905 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6907 QT_CONFIG="$QT_CONFIG egl"
6908 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6909 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6914 if [ "$CFG_OPENVG" = "no" ]; then
6915 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6917 QT_CONFIG="$QT_CONFIG openvg"
6918 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6919 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6921 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6922 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6924 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6925 QT_CONFIG="$QT_CONFIG shivavg"
6926 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6931 if [ "$CFG_OPENGL" = "no" ]; then
6932 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6934 QT_CONFIG="$QT_CONFIG opengl"
6937 if [ "$CFG_OPENGL" = "es2" ]; then
6938 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6941 if [ "$CFG_OPENGL" = "es2" ]; then
6942 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6943 QT_CONFIG="$QT_CONFIG opengles2"
6946 # safe execution environment
6947 if [ "$CFG_SXE" != "no" ]; then
6948 QT_CONFIG="$QT_CONFIG sxe"
6951 # build up the variables for output
6952 if [ "$CFG_DEBUG" = "yes" ]; then
6953 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6954 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6955 elif [ "$CFG_DEBUG" = "no" ]; then
6956 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6957 QMAKE_CONFIG="$QMAKE_CONFIG release"
6959 if [ "$CFG_SHARED" = "yes" ]; then
6960 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6961 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6962 elif [ "$CFG_SHARED" = "no" ]; then
6963 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6964 QMAKE_CONFIG="$QMAKE_CONFIG static"
6966 if [ "$PLATFORM_QWS" = "yes" ]; then
6967 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6968 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6969 QT_CONFIG="$QT_CONFIG embedded"
6970 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6972 if [ "$PLATFORM_QPA" = "yes" ]; then
6973 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6974 QT_CONFIG="$QT_CONFIG qpa"
6975 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6976 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6979 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6980 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6981 QT_CONFIG="$QT_CONFIG nacl pepper"
6982 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6985 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6986 # Do not set this here for Windows. Let qmake do it so
6987 # debug and release precompiled headers are kept separate.
6988 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6990 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6991 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6992 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6993 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6994 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6995 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6997 if [ "$CFG_STL" = "no" ]; then
6998 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
7000 QMAKE_CONFIG="$QMAKE_CONFIG stl"
7002 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
7003 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
7005 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
7006 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
7007 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
7008 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
7009 QMakeVar add QMAKE_CFLAGS -g
7010 QMakeVar add QMAKE_CXXFLAGS -g
7011 QT_CONFIG="$QT_CONFIG separate_debug_info"
7013 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
7014 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
7016 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
7017 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
7018 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
7019 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
7020 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
7021 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
7022 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
7023 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
7024 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
7025 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
7026 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
7027 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
7028 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
7029 QT_CONFIG="$QT_CONFIG clock-gettime"
7031 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
7032 QT_CONFIG="$QT_CONFIG clock-monotonic"
7034 if [ "$CFG_MREMAP" = "yes" ]; then
7035 QT_CONFIG="$QT_CONFIG mremap"
7037 if [ "$CFG_GETADDRINFO" = "yes" ]; then
7038 QT_CONFIG="$QT_CONFIG getaddrinfo"
7040 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
7041 QT_CONFIG="$QT_CONFIG ipv6ifname"
7043 if [ "$CFG_GETIFADDRS" = "yes" ]; then
7044 QT_CONFIG="$QT_CONFIG getifaddrs"
7046 if [ "$CFG_INOTIFY" = "yes" ]; then
7047 QT_CONFIG="$QT_CONFIG inotify"
7049 if [ "$CFG_LIBJPEG" = "no" ]; then
7051 elif [ "$CFG_LIBJPEG" = "system" ]; then
7052 QT_CONFIG="$QT_CONFIG system-jpeg"
7054 if [ "$CFG_JPEG" = "no" ]; then
7055 QT_CONFIG="$QT_CONFIG no-jpeg"
7056 elif [ "$CFG_JPEG" = "yes" ]; then
7057 QT_CONFIG="$QT_CONFIG jpeg"
7059 if [ "$CFG_LIBMNG" = "no" ]; then
7061 elif [ "$CFG_LIBMNG" = "system" ]; then
7062 QT_CONFIG="$QT_CONFIG system-mng"
7064 if [ "$CFG_MNG" = "no" ]; then
7065 QT_CONFIG="$QT_CONFIG no-mng"
7066 elif [ "$CFG_MNG" = "yes" ]; then
7067 QT_CONFIG="$QT_CONFIG mng"
7069 if [ "$CFG_LIBPNG" = "no" ]; then
7072 if [ "$CFG_LIBPNG" = "system" ]; then
7073 QT_CONFIG="$QT_CONFIG system-png"
7075 if [ "$CFG_PNG" = "no" ]; then
7076 QT_CONFIG="$QT_CONFIG no-png"
7077 elif [ "$CFG_PNG" = "yes" ]; then
7078 QT_CONFIG="$QT_CONFIG png"
7080 if [ "$CFG_GIF" = "no" ]; then
7081 QT_CONFIG="$QT_CONFIG no-gif"
7082 elif [ "$CFG_GIF" = "yes" ]; then
7083 QT_CONFIG="$QT_CONFIG gif"
7085 if [ "$CFG_LIBTIFF" = "no" ]; then
7087 elif [ "$CFG_LIBTIFF" = "system" ]; then
7088 QT_CONFIG="$QT_CONFIG system-tiff"
7090 if [ "$CFG_TIFF" = "no" ]; then
7091 QT_CONFIG="$QT_CONFIG no-tiff"
7092 elif [ "$CFG_TIFF" = "yes" ]; then
7093 QT_CONFIG="$QT_CONFIG tiff"
7095 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7096 QT_CONFIG="$QT_CONFIG no-freetype"
7097 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7098 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7099 QT_CONFIG="$QT_CONFIG system-freetype"
7101 QT_CONFIG="$QT_CONFIG freetype"
7103 if [ "$CFG_GUI" = "auto" ]; then
7106 if [ "$CFG_GUI" = "no" ]; then
7107 QT_CONFIG="$QT_CONFIG no-gui"
7109 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7113 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7114 #On Mac we implicitly link against libz, so we
7115 #never use the 3rdparty stuff.
7116 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7118 if [ "$CFG_ZLIB" = "yes" ]; then
7119 QT_CONFIG="$QT_CONFIG zlib"
7120 elif [ "$CFG_ZLIB" = "system" ]; then
7121 QT_CONFIG="$QT_CONFIG system-zlib"
7124 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7125 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7126 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7127 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7128 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7129 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7130 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7131 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7132 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7133 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7134 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7135 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7136 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7137 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7138 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7140 if [ "$PLATFORM_X11" = "yes" ]; then
7141 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7143 # for some reason, the following libraries are not always built shared,
7144 # so *every* program/lib (including Qt) has to link against them
7145 if [ "$CFG_XSHAPE" = "yes" ]; then
7146 QT_CONFIG="$QT_CONFIG xshape"
7148 if [ "$CFG_XVIDEO" = "yes" ]; then
7149 QT_CONFIG="$QT_CONFIG xvideo"
7151 if [ "$CFG_XSYNC" = "yes" ]; then
7152 QT_CONFIG="$QT_CONFIG xsync"
7154 if [ "$CFG_XINERAMA" = "yes" ]; then
7155 QT_CONFIG="$QT_CONFIG xinerama"
7156 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7158 if [ "$CFG_XCURSOR" = "yes" ]; then
7159 QT_CONFIG="$QT_CONFIG xcursor"
7160 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7162 if [ "$CFG_XFIXES" = "yes" ]; then
7163 QT_CONFIG="$QT_CONFIG xfixes"
7164 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7166 if [ "$CFG_XRANDR" = "yes" ]; then
7167 QT_CONFIG="$QT_CONFIG xrandr"
7168 if [ "$CFG_XRENDER" != "yes" ]; then
7169 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7170 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7172 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7175 if [ "$CFG_XRENDER" = "yes" ]; then
7176 QT_CONFIG="$QT_CONFIG xrender"
7177 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7179 if [ "$CFG_MITSHM" = "yes" ]; then
7180 QT_CONFIG="$QT_CONFIG mitshm"
7182 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7183 QT_CONFIG="$QT_CONFIG fontconfig"
7185 if [ "$CFG_XINPUT" = "yes" ]; then
7186 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7188 if [ "$CFG_XINPUT" = "yes" ]; then
7189 QT_CONFIG="$QT_CONFIG xinput tablet"
7191 if [ "$CFG_XKB" = "yes" ]; then
7192 QT_CONFIG="$QT_CONFIG xkb"
7196 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7197 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7198 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7200 if [ "$CFG_ARCH" = "macosx" ]; then
7201 if [ "$CFG_RPATH" = "yes" ]; then
7202 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7204 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7205 if [ -n "$RPATH_FLAGS" ]; then
7207 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7211 elif [ "$CFG_RPATH" = "yes" ]; then
7212 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7216 if [ "$CFG_RPATH" = "yes" ]; then
7217 # set the default rpath to the library installation directory
7218 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7220 if [ -n "$RPATH_FLAGS" ]; then
7221 # add the user defined rpaths
7222 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7226 if [ '!' -z "$I_FLAGS" ]; then
7227 # add the user define include paths
7228 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7229 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7232 if [ '!' -z "$W_FLAGS" ]; then
7233 # add the user defined warning flags
7234 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7235 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7236 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7239 # turn off exceptions for the compilers that support it
7240 if [ "$PLATFORM_QWS" = "yes" ]; then
7241 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7242 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7243 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7245 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7247 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7251 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7252 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7255 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7256 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7257 # Follow default behavior of configure.exe by overriding with "rtti".
7258 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7261 if [ "$CFG_ALSA" = "yes" ]; then
7262 QT_CONFIG="$QT_CONFIG alsa"
7265 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7266 QT_CONFIG="$QT_CONFIG pulseaudio"
7269 if [ "$CFG_COREWLAN" = "yes" ]; then
7270 QT_CONFIG="$QT_CONFIG corewlan"
7273 if [ "$CFG_ICD" = "yes" ]; then
7274 QT_CONFIG="$QT_CONFIG icd"
7277 if [ "$CFG_ICU" = "yes" ]; then
7278 QT_CONFIG="$QT_CONFIG icu"
7281 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
7282 QT_CONFIG="$QT_CONFIG force_asserts"
7286 # Some Qt modules are too advanced in C++ for some old compilers
7287 # Detect here the platforms where they are known to work.
7289 # See Qt documentation for more information on which features are
7290 # supported and on which compilers.
7292 canBuildQtXmlPatterns="yes"
7293 canBuildWebKit="$HAVE_STL"
7294 canBuildQtConcurrent="yes"
7296 canUseV8Snapshot="yes"
7298 # WebKit requires stdint.h
7299 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7300 if [ $? != "0" ]; then
7304 case "$XPLATFORM" in
7306 # PA-RISC's assembly is too limited
7307 # gcc 3.4 on that platform can't build QtXmlPatterns
7308 # the assembly it generates cannot be compiled
7310 # Check gcc's version
7311 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7315 canBuildQtXmlPatterns="no"
7319 canBuildQtXmlPatterns="no"
7323 unsupported/vxworks-*-g++*)
7326 unsupported/vxworks-*-dcc*)
7328 canBuildQtXmlPatterns="no"
7331 # Check gcc's version
7332 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7340 canBuildQtXmlPatterns="no"
7345 # Check the compiler version
7346 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7349 canBuildQtXmlPatterns="no"
7350 canBuildQtConcurrent="no"
7354 canBuildQtConcurrent="no"
7360 canBuildQtXmlPatterns="no"
7361 canBuildQtConcurrent="no"
7367 # Get the xlC version
7368 cat > xlcver.c <<EOF
7372 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7377 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7378 xlcver=`./xlcver 2>/dev/null`
7381 if [ "$OPT_VERBOSE" = "yes" ]; then
7382 if [ -n "$xlcver" ]; then
7383 echo Found IBM xlC version: $xlcver.
7385 echo Could not determine IBM xlC version, assuming oldest supported.
7392 canBuildQtXmlPatterns="no"
7393 canBuildQtConcurrent="no"
7397 canBuildQtConcurrent="no"
7403 canBuildQtConcurrent="no"
7407 if [ "$CFG_GUI" = "no" ]; then
7408 # WebKit requires QtGui
7412 if [ "$CFG_SHARED" = "no" ]; then
7414 echo "WARNING: Using static linking will disable the WebKit module."
7419 CFG_CONCURRENT="yes"
7420 if [ "$canBuildQtConcurrent" = "no" ]; then
7421 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7424 QT_CONFIG="$QT_CONFIG concurrent"
7427 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7428 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7431 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7432 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7433 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7434 CFG_XMLPATTERNS="no"
7436 # No longer needed after modularization
7437 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7438 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7440 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7443 # No longer needed after modularization
7444 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7445 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7447 # QT_CONFIG="$QT_CONFIG multimedia"
7450 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7451 QT_CONFIG="$QT_CONFIG audio-backend"
7454 if [ "$CFG_SVG" = "auto" ]; then
7458 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7459 echo "QtSvg requested, but it can't be built without QtGui"
7463 if [ "$CFG_SVG" = "yes" ]; then
7464 QT_CONFIG="$QT_CONFIG svg"
7466 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7469 if [ "$CFG_WEBKIT" != "no" ]; then
7470 CFG_WEBKIT="$canBuildWebKit"
7473 if [ "$CFG_WEBKIT" != "no" ]; then
7474 # No longer needed after modularization
7475 #QT_CONFIG="$QT_CONFIG webkit"
7476 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7477 if [ "$CFG_WEBKIT" = "debug" ]; then
7478 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7482 if [ "$CFG_SCRIPT" = "auto" ]; then
7486 # No longer needed after modularization
7487 #if [ "$CFG_SCRIPT" = "yes" ]; then
7488 # QT_CONFIG="$QT_CONFIG script"
7490 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7493 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7494 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7497 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7498 CFG_SCRIPTTOOLS="yes"
7499 elif [ "$CFG_SCRIPT" = "no" ]; then
7500 CFG_SCRIPTTOOLS="no"
7503 # No longer needed after modularization
7504 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7505 # QT_CONFIG="$QT_CONFIG scripttools"
7507 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7512 i386|x86_64|arm|mips|macosx) ;;
7513 *) canBuildV8="no";;
7516 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7517 echo "Error: V8 was requested, but is not supported on this platform."
7521 if [ "$CFG_V8" = "auto" ]; then
7522 CFG_V8="$canBuildV8"
7525 if [ "$CFG_V8" = "no" ]; then
7526 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7528 QT_CONFIG="$QT_CONFIG v8"
7529 # Detect snapshot support
7530 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7531 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7534 *) canUseV8Snapshot="no"
7538 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7539 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7541 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7542 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7545 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7546 QT_CONFIG="$QT_CONFIG v8snapshot"
7550 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7551 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7552 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7556 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7557 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7564 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7565 # No longer needed after modularization
7566 #QT_CONFIG="$QT_CONFIG declarative"
7567 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7568 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7571 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7574 if [ "$CFG_LOCATION" = "auto" ]; then
7575 CFG_LOCATION="$CFG_GUI"
7578 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7579 echo "QtLocation requested, but it can't be built without QtGui"
7583 #Disable QtLocation until ready
7586 if [ "$CFG_LOCATION" = "no" ]; then
7587 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7590 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7593 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7594 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7595 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7600 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7601 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7602 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7609 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7612 # On Mac, set the minimum deployment target for the different architechtures
7613 # using the Xarch compiler option when supported (10.5 and up).
7614 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7615 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7616 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7617 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7618 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7619 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7621 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7622 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7623 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7624 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7625 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7627 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7628 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7629 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7630 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7631 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7633 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7634 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7635 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7636 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7637 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7644 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7646 case "$COMPILER_VERSION" in
7648 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7649 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7650 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7653 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7654 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7655 QT_GCC_PATCH_VERSION=0
7665 #-------------------------------------------------------------------------------
7666 # part of configuration information goes into qconfig.h
7667 #-------------------------------------------------------------------------------
7669 case "$CFG_QCONFIG" in
7671 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7674 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7675 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7676 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7677 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7678 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7679 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7681 echo "#endif" >>"$tmpconfig"
7685 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7689 # define QT_EDITION $QT_EDITION
7692 /* Machine byte-order */
7693 #define Q_BIG_ENDIAN 4321
7694 #define Q_LITTLE_ENDIAN 1234
7697 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7698 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7699 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7700 #if defined(__BIG_ENDIAN__)
7701 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7702 #elif defined(__LITTLE_ENDIAN__)
7703 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7705 # error "Unable to determine byte order!"
7709 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7711 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7712 if [ "$CFG_ENDIAN" = "auto" ]; then
7713 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7714 #if defined(__BIG_ENDIAN__)
7715 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7716 #elif defined(__LITTLE_ENDIAN__)
7717 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7719 # error "Unable to determine byte order!"
7723 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7725 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7727 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7728 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7729 /* Non-IEEE double format */
7730 #define Q_DOUBLE_LITTLE "01234567"
7731 #define Q_DOUBLE_BIG "76543210"
7732 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7733 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7734 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7737 if [ "$CFG_ARMFPA" = "yes" ]; then
7738 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7739 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7740 #ifndef QT_BOOTSTRAPPED
7745 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7749 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7750 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7751 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7752 /* Machine Architecture */
7753 #ifndef QT_BOOTSTRAPPED
7754 # define QT_ARCH_${CFG_ARCH_STR}
7756 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7760 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7761 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7763 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7764 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7767 # if both carbon and cocoa are specified, enable the autodetection code.
7768 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7769 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7770 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7771 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7774 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7775 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7778 if [ "$PLATFORM_MAC" = "yes" ]; then
7779 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7780 #if defined(__LP64__)
7781 # define QT_POINTER_SIZE 8
7783 # define QT_POINTER_SIZE 4
7787 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7788 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7792 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7794 if [ "$CFG_DEV" = "yes" ]; then
7795 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7798 # Embedded compile time options
7799 if [ "$PLATFORM_QWS" = "yes" ]; then
7800 # Add QWS to config.h
7801 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7803 # Add excluded decorations to $QCONFIG_FLAGS
7804 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7805 for decor in $decors; do
7806 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7807 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7810 # Figure which embedded drivers which are turned off
7811 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7812 for ADRIVER in $CFG_GFX_ON; do
7813 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7816 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7817 # the um driver is currently not in the available list for external builds
7818 if [ "$CFG_DEV" = "no" ]; then
7819 CFG_KBD_OFF="$CFG_KBD_OFF um"
7821 for ADRIVER in $CFG_KBD_ON; do
7822 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7825 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7826 for ADRIVER in $CFG_MOUSE_ON; do
7827 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7830 for DRIVER in $CFG_GFX_OFF; do
7831 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7832 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7835 for DRIVER in $CFG_KBD_OFF; do
7836 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7837 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7840 for DRIVER in $CFG_MOUSE_OFF; do
7841 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7842 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7846 if [ "$PLATFORM_QPA" = "yes" ]; then
7847 # Add QPA to config.h
7848 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7851 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7852 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7855 # Add turned on SQL drivers
7856 for DRIVER in $CFG_SQL_AVAILABLE; do
7857 eval "VAL=\$CFG_SQL_$DRIVER"
7860 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7861 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7862 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7865 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7871 QMakeVar set sql-drivers "$SQL_DRIVERS"
7872 QMakeVar set sql-plugins "$SQL_PLUGINS"
7874 # Add other configuration options to the qconfig.h file
7875 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7876 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7877 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7878 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7879 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7880 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7881 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7882 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7883 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7885 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
7886 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7887 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7888 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7889 [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
7892 # ATM we need this define to compile Qt. Remove later!
7893 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7895 # X11/Unix/Mac only configs
7896 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7897 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7898 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7899 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7900 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7901 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7902 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7903 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7904 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7905 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7906 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7907 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7908 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7909 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7910 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7912 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7913 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7914 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7915 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7916 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7917 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7918 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7919 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7920 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7921 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7922 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7923 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7924 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7926 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7927 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7928 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7929 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7930 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7931 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7932 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7933 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7934 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
7936 # sort QCONFIG_FLAGS for neatness if we can
7937 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7938 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7940 if [ -n "$QCONFIG_FLAGS" ]; then
7941 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7942 #ifndef QT_BOOTSTRAPPED
7945 for cfg in $QCONFIG_FLAGS; do
7946 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7947 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7948 # figure out define logic, so we can output the correct
7949 # ifdefs to override the global defines in a project
7951 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7952 # QT_NO_option can be forcefully turned on by QT_option
7953 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7954 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7955 # QT_option can be forcefully turned off by QT_NO_option
7956 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7959 if [ -z $cfgdNeg ]; then
7960 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7967 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7968 #if defined($cfgd) && defined($cfgdNeg)
7970 #elif !defined($cfgd) && !defined($cfgdNeg)
7977 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7978 #endif // QT_BOOTSTRAPPED
7983 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7984 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7985 #define QT_VISIBILITY_AVAILABLE
7990 if [ -n "$QT_LIBINFIX" ]; then
7991 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7992 #define QT_LIBINFIX "$QT_LIBINFIX"
7997 if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
7998 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7999 #define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
8004 # avoid unecessary rebuilds by copying only if qconfig.h has changed
8005 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
8006 rm -f "$outpath/src/corelib/global/qconfig.h.new"
8008 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
8009 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
8010 chmod -w "$outpath/src/corelib/global/qconfig.h"
8011 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
8012 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
8016 #-------------------------------------------------------------------------------
8017 # save configuration into qconfig.pri
8018 #-------------------------------------------------------------------------------
8019 QTCONFIG="$outpath/mkspecs/qconfig.pri"
8020 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
8021 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
8022 if [ "$CFG_DEBUG" = "yes" ]; then
8023 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
8024 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8025 QT_CONFIG="$QT_CONFIG release"
8027 QT_CONFIG="$QT_CONFIG debug"
8028 elif [ "$CFG_DEBUG" = "no" ]; then
8029 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
8030 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8031 QT_CONFIG="$QT_CONFIG debug"
8033 QT_CONFIG="$QT_CONFIG release"
8035 if [ "$CFG_STL" = "yes" ]; then
8036 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
8038 if [ "$CFG_FRAMEWORK" = "no" ]; then
8039 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
8041 QT_CONFIG="$QT_CONFIG qt_framework"
8042 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
8044 if [ "$PLATFORM_MAC" = "yes" ]; then
8045 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
8047 if [ "$CFG_DEV" = "yes" ]; then
8048 QT_CONFIG="$QT_CONFIG private_tests"
8051 # Make the application arch follow the Qt arch for single arch builds.
8052 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
8053 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
8054 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
8057 cat >>"$QTCONFIG.tmp" <<EOF
8059 CONFIG += $QTCONFIG_CONFIG
8061 QT_EDITION = $Edition
8062 QT_CONFIG += $QT_CONFIG
8065 QT_VERSION = $QT_VERSION
8066 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
8067 QT_MINOR_VERSION = $QT_MINOR_VERSION
8068 QT_PATCH_VERSION = $QT_PATCH_VERSION
8071 QT_LIBINFIX = $QT_LIBINFIX
8072 QT_NAMESPACE = $QT_NAMESPACE
8073 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
8076 if [ -n "$CFG_SYSROOT" ]; then
8077 echo "# sysroot" >>"$QTCONFIG.tmp"
8078 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
8079 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
8080 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8081 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8082 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8083 echo "}" >> "$QTCONFIG.tmp"
8084 echo >> "$QTCONFIG.tmp"
8086 if [ "$CFG_RPATH" = "yes" ]; then
8087 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8089 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8090 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8091 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8092 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8095 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8096 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
8097 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8100 # replace qconfig.pri if it differs from the newly created temp file
8101 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8102 rm -f "$QTCONFIG.tmp"
8104 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8107 #-------------------------------------------------------------------------------
8108 # save configuration into qmodule.pri
8109 #-------------------------------------------------------------------------------
8110 QTMODULE="$outpath/mkspecs/qmodule.pri"
8112 # Ensure we can link to uninistalled libraries
8113 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8114 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8116 if [ -n "$QT_CFLAGS_PSQL" ]; then
8117 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8119 if [ -n "$QT_LFLAGS_PSQL" ]; then
8120 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8122 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8123 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8125 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8126 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8128 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8129 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8131 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8132 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8134 if [ -n "$QT_LFLAGS_ODBC" ]; then
8135 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8137 if [ -n "$QT_LFLAGS_TDS" ]; then
8138 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8141 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8142 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8145 #dump in the OPENSSL_LIBS info
8146 if [ '!' -z "$OPENSSL_LIBS" ]; then
8147 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8148 elif [ "$CFG_OPENSSL" = "linked" ]; then
8149 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8152 #dump in the SDK info
8153 if [ '!' -z "$CFG_SDK" ]; then
8154 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8157 # mac gcc -Xarch support
8158 if [ "$CFG_MAC_XARCH" = "no" ]; then
8159 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8163 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8164 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8166 # replace qmodule.pri if it differs from the newly created temp file
8167 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8168 rm -f "$QTMODULE.tmp"
8170 mv -f "$QTMODULE.tmp" "$QTMODULE"
8173 #-------------------------------------------------------------------------------
8174 # save configuration into .qmake.cache
8175 #-------------------------------------------------------------------------------
8177 CACHEFILE="$outpath/.qmake.cache"
8178 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8179 cat >>"$CACHEFILE.tmp" <<EOF
8181 QT_SOURCE_TREE = \$\$quote($relpath)
8182 QT_BUILD_TREE = \$\$quote($outpath)
8183 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8185 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8186 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8187 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8188 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8189 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8190 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8191 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8193 include(\$\$PWD/mkspecs/qmodule.pri)
8194 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8195 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8196 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8200 #dump the qmake spec
8201 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8202 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8204 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8209 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8210 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8211 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8212 # don't need to worry about generated files
8213 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8214 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8216 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8218 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8219 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8222 # replace .qmake.cache if it differs from the newly created temp file
8223 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8224 rm -f "$CACHEFILE.tmp"
8226 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8229 #-------------------------------------------------------------------------------
8230 # give feedback on configuration
8231 #-------------------------------------------------------------------------------
8235 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8238 This target is using the GNU C++ compiler ($PLATFORM).
8240 Recent versions of this compiler automatically include code for
8241 exceptions, which increase both the size of the Qt libraries and
8242 the amount of memory taken by your applications.
8244 You may choose to re-run `basename $0` with the -no-exceptions
8245 option to compile Qt without exceptions. This is completely binary
8246 compatible, and existing applications will continue to work.
8254 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8257 This target is using the MIPSpro C++ compiler ($PLATFORM).
8259 You may choose to re-run `basename $0` with the -no-exceptions
8260 option to compile Qt without exceptions. This will make the
8261 size of the Qt library smaller and reduce the amount of memory
8262 taken by your applications.
8273 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8275 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8276 in debug mode will run out of memory on systems with 2GB or less.
8277 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8278 -no-webkit or -release to skip webkit debug.
8283 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8284 echo "Build type: $PLATFORM"
8286 echo "Building on: $PLATFORM"
8287 echo "Building for: $XPLATFORM"
8290 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8291 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8293 echo "Architecture: $CFG_ARCH"
8296 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8297 echo "Host architecture: $CFG_HOST_ARCH"
8300 if [ "$PLATFORM_MAC" = "yes" ]; then
8301 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8302 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8303 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8305 echo "Using framework: Cocoa"
8308 echo "Using framework: Carbon"
8312 if [ -n "$PLATFORM_NOTES" ]; then
8313 echo "Platform notes:"
8314 echo "$PLATFORM_NOTES"
8319 if [ "$OPT_VERBOSE" = "yes" ]; then
8320 echo $ECHO_N "qmake vars .......... $ECHO_C"
8321 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8322 echo "qmake switches ......... $QMAKE_SWITCHES"
8325 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8326 echo "Build .................. $CFG_BUILD_PARTS"
8327 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8328 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8329 echo "Debug .................. yes (combined)"
8330 if [ "$CFG_DEBUG" = "yes" ]; then
8331 echo "Default Link ........... debug"
8333 echo "Default Link ........... release"
8336 echo "Debug .................. $CFG_DEBUG"
8338 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8339 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8340 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8341 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8342 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8343 echo "QtGui module ........... $CFG_GUI"
8344 echo "QtScript module ........ $CFG_SCRIPT"
8345 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8346 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8347 echo "Phonon module .......... $CFG_PHONON"
8348 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8349 echo "SVG module ............. $CFG_SVG"
8350 case "$CFG_WEBKIT" in
8351 yes) echo "WebKit module .......... yes" ;;
8352 debug) echo "WebKit module .......... yes (debug)" ;;
8353 no) echo "WebKit module .......... no" ;;
8355 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8356 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8357 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8359 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8362 echo "V8 module .............. $CFG_V8"
8363 echo "Declarative module ..... $CFG_DECLARATIVE"
8364 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8365 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8367 echo "Location module ........ $CFG_LOCATION"
8368 echo "STL support ............ $CFG_STL"
8369 echo "PCH support ............ $CFG_PRECOMPILE"
8370 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8371 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8372 echo "AVX..................... ${CFG_AVX}"
8373 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8374 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8375 echo "NEON support ........... ${CFG_NEON}"
8377 [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
8378 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8379 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8380 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8381 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8382 echo "NIS support ............ $CFG_NIS"
8383 echo "CUPS support ........... $CFG_CUPS"
8384 echo "Iconv support .......... $CFG_ICONV"
8385 echo "Glib support ........... $CFG_GLIB"
8386 echo "GStreamer support ...... $CFG_GSTREAMER"
8387 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8388 echo "Large File support ..... $CFG_LARGEFILE"
8389 echo "GIF support ............ $CFG_GIF"
8390 if [ "$CFG_TIFF" = "no" ]; then
8391 echo "TIFF support ........... $CFG_TIFF"
8393 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8395 if [ "$CFG_JPEG" = "no" ]; then
8396 echo "JPEG support ........... $CFG_JPEG"
8398 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8400 if [ "$CFG_PNG" = "no" ]; then
8401 echo "PNG support ............ $CFG_PNG"
8403 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8405 if [ "$CFG_MNG" = "no" ]; then
8406 echo "MNG support ............ $CFG_MNG"
8408 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8410 echo "zlib support ........... $CFG_ZLIB"
8411 echo "Session management ..... $CFG_SM"
8412 if [ "$PLATFORM_QWS" = "yes" ]; then
8413 echo "Embedded support ....... $CFG_EMBEDDED"
8414 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8415 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8417 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8419 # Normalize the decoration output first
8420 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8421 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8422 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8423 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8424 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8425 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8426 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8427 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8428 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8429 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8430 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8431 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8432 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8433 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8434 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8435 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8437 if [ "$CFG_OPENGL" = "desktop" ]; then
8438 echo "OpenGL support ......... yes (Desktop OpenGL)"
8439 elif [ "$CFG_OPENGL" = "es2" ]; then
8440 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8442 echo "OpenGL support ......... no"
8444 if [ "$CFG_EGL" != "no" ]; then
8445 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8446 echo "EGL support ............ yes <GLES/egl.h>"
8448 echo "EGL support ............ yes <EGL/egl.h>"
8451 if [ "$CFG_OPENVG" ]; then
8452 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8453 echo "OpenVG support ......... ShivaVG"
8455 echo "OpenVG support ......... $CFG_OPENVG"
8458 if [ "$PLATFORM_X11" = "yes" ]; then
8459 echo "NAS sound support ...... $CFG_NAS"
8460 echo "XShape support ......... $CFG_XSHAPE"
8461 echo "XVideo support ......... $CFG_XVIDEO"
8462 echo "XSync support .......... $CFG_XSYNC"
8463 echo "Xinerama support ....... $CFG_XINERAMA"
8464 echo "Xcursor support ........ $CFG_XCURSOR"
8465 echo "Xfixes support ......... $CFG_XFIXES"
8466 echo "Xrandr support ......... $CFG_XRANDR"
8467 echo "Xrender support ........ $CFG_XRENDER"
8468 echo "Xi support ............. $CFG_XINPUT"
8469 echo "MIT-SHM support ........ $CFG_MITSHM"
8470 echo "FontConfig support ..... $CFG_FONTCONFIG"
8471 echo "XKB Support ............ $CFG_XKB"
8472 echo "immodule support ....... $CFG_IM"
8473 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8475 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8476 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8477 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8478 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8479 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8480 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8481 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8482 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8483 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8486 if [ "$CFG_OPENSSL" = "yes" ]; then
8487 OPENSSL_LINKAGE="(run-time)"
8488 elif [ "$CFG_OPENSSL" = "linked" ]; then
8489 OPENSSL_LINKAGE="(linked)"
8491 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8492 echo "Alsa support ........... $CFG_ALSA"
8493 if [ "$PLATFORM_MAC" = "yes" ]; then
8494 echo "CoreWlan support ....... $CFG_COREWLAN"
8496 echo "ICD support ............ $CFG_ICD"
8497 echo "libICU support ......... $CFG_ICU"
8498 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8499 echo "Xcb support ............ limited (old version)"
8501 echo "Xcb support ............ $CFG_XCB"
8503 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8504 echo "XInput2 support ........ $CFG_XINPUT2"
8508 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC"
8510 # complain about not being able to use dynamic plugins if we are using a static build
8511 if [ "$CFG_SHARED" = "no" ]; then
8513 echo "WARNING: Using static linking will disable the use of dynamically"
8514 echo "loaded plugins. Make sure to import all needed static plugins,"
8515 echo "or compile needed modules into the library."
8518 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8520 echo "NOTE: When linking against OpenSSL, you can override the default"
8521 echo "library names through OPENSSL_LIBS."
8523 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8526 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8528 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8529 echo "if you want a pure debug build."
8534 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8539 #-------------------------------------------------------------------------------
8540 # build makefiles based on the configuration
8541 #-------------------------------------------------------------------------------
8543 echo "Finding project files. Please wait..."
8544 if [ "$CFG_NOPROCESS" != "yes" ]; then
8545 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8546 if [ -f "${relpath}/qtbase.pro" ]; then
8547 mkfile="${outpath}/Makefile"
8548 [ -f "$mkfile" ] && chmod +w "$mkfile"
8549 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8553 # .projects -> projects to process
8554 # .projects.1 -> qt and moc
8555 # .projects.2 -> subdirs and libs
8556 # .projects.3 -> the rest
8557 rm -f .projects .projects.1 .projects.2 .projects.3
8559 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8560 if [ -z "$AWK" ]; then
8561 for p in `echo $QMAKE_PROJECTS`; do
8562 echo "$p" >> .projects
8565 cat >projects.awk <<EOF
8571 first = "./.projects.1.tmp"
8572 second = "./.projects.2.tmp"
8573 third = "./.projects.3.tmp"
8578 if ( ! target_file )
8580 print input_file >target_file
8585 input_file = FILENAME
8590 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8593 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8594 target_file = second
8599 matched_target == 0 && /^(TEMPLATE.*=)/ {
8600 if ( \$3 == "subdirs" )
8601 target_file = second
8602 else if ( \$3 == "lib" )
8608 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8609 if ( \$0 ~ /plugin/ )
8612 target_file = second
8617 if ( ! target_file )
8619 print input_file >>target_file
8626 for p in `echo $QMAKE_PROJECTS`; do
8627 echo "$p" >> .projects.all
8630 # if you get errors about the length of the command line to awk, change the -l arg
8632 split -l 100 .projects.all .projects.all.
8633 for p in .projects.all.*; do
8634 "$AWK" -f projects.awk `cat $p`
8635 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8636 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8637 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8638 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8640 rm -f .projects.all* projects.awk
8642 [ -f .projects.1 ] && cat .projects.1 >>.projects
8643 [ -f .projects.2 ] && cat .projects.2 >>.projects
8644 rm -f .projects.1 .projects.2
8645 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8646 cat .projects.3 >>.projects
8650 # don't sort Qt and MOC in with the other project files
8651 # also work around a segfaulting uniq(1)
8652 if [ -f .sorted.projects.2 ]; then
8653 sort .sorted.projects.2 > .sorted.projects.2.new
8654 mv -f .sorted.projects.2.new .sorted.projects.2
8655 cat .sorted.projects.2 >> .sorted.projects.1
8657 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8658 rm -f .sorted.projects.2 .sorted.projects.1
8662 if [ -f .projects ]; then
8663 uniq .projects >.tmp
8664 mv -f .tmp .projects
8665 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8667 if [ -f .projects.3 ]; then
8668 uniq .projects.3 >.tmp
8669 mv -f .tmp .projects.3
8670 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8672 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8676 for part in $CFG_BUILD_PARTS; do
8678 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8679 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8680 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8681 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8686 if [ "$CFG_DEV" = "yes" ]; then
8687 PART_ROOTS="$PART_ROOTS tests"
8690 echo "Creating makefiles. Please wait..."
8691 for file in .projects .projects.3; do
8692 [ '!' -f "$file" ] && continue
8693 for a in `cat $file`; do
8695 for r in $PART_ROOTS; do
8696 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8701 [ "$IN_ROOT" = "no" ] && continue
8704 *winmain/winmain.pro)
8705 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8709 *examples/activeqt/*) continue ;;
8710 */qmake/qmake.pro) continue ;;
8711 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8712 *tools/mkv8snapshot/*)
8713 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8719 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8725 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8726 test -d "$dir" || mkdir -p "$dir"
8727 OUTDIR="$outpath/$dir"
8728 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8729 # fast configure - the makefile exists, skip it
8730 # since the makefile exists, it was generated by qmake, which means we
8731 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8733 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8736 QMAKE_SPEC_ARGS="-spec $SPEC"
8737 echo $ECHO_N " for $a$ECHO_C"
8739 QMAKE="$outpath/bin/qmake"
8740 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8741 if [ "$file" = ".projects.3" ]; then
8744 cat >"${OUTDIR}/Makefile" <<EOF
8745 # ${OUTDIR}/Makefile: generated by configure
8747 # WARNING: This makefile will be replaced with a real makefile.
8748 # All changes made to this file will be lost.
8750 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8752 cat >>"${OUTDIR}/Makefile" <<EOF
8754 all clean install qmake first Makefile: FORCE
8755 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8763 if [ "$OPT_VERBOSE" = "yes" ]; then
8764 echo " (`basename $SPEC`)"
8765 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8770 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8771 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8775 rm -f .projects .projects.3
8777 #-------------------------------------------------------------------------------
8778 # check for platforms that we don't yet know about
8779 #-------------------------------------------------------------------------------
8780 if [ "$CFG_ARCH" = "generic" ]; then
8783 NOTICE: Atomic operations are not yet supported for this
8786 Qt will use the 'generic' architecture instead, which uses a
8787 single pthread_mutex_t to protect all atomic operations. This
8788 implementation is the slow (but safe) fallback implementation
8789 for architectures Qt does not yet support.
8793 #-------------------------------------------------------------------------------
8794 # check if the user passed the -no-zlib option, which is no longer supported
8795 #-------------------------------------------------------------------------------
8796 if [ -n "$ZLIB_FORCED" ]; then
8797 which_zlib="supplied"
8798 if [ "$CFG_ZLIB" = "system" ]; then
8804 NOTICE: The -no-zlib option was supplied but is no longer
8807 Qt now requires zlib support in all builds, so the -no-zlib
8808 option was ignored. Qt will be built using the $which_zlib
8813 #-------------------------------------------------------------------------------
8814 # finally save the executed command to another script
8815 #-------------------------------------------------------------------------------
8816 if [ `basename $0` != "config.status" ]; then
8817 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8819 # add the system variables
8820 for varname in $SYSTEM_VARIABLES; do
8822 'if [ -n "\$'${varname}'" ]; then
8823 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8828 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8830 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8831 echo "#!/bin/sh" > "$outpath/config.status"
8832 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8833 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8834 echo "else" >> "$outpath/config.status"
8835 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8836 echo "fi" >> "$outpath/config.status"
8837 chmod +x "$outpath/config.status"
8840 if [ -n "$RPATH_MESSAGE" ]; then
8842 echo "$RPATH_MESSAGE"
8845 MAKE=`basename "$MAKE"`
8847 echo Qt is now configured for building. Just run \'$MAKE\'.
8848 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8849 echo Once everything is built, Qt is installed.
8850 echo You should not run \'$MAKE install\'.
8852 echo Once everything is built, you must run \'$MAKE install\'.
8853 echo Qt will be installed into $QT_INSTALL_PREFIX
8856 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.