2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## All rights reserved.
6 ## Contact: http://www.qt-project.org/
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 #-------------------------------------------------------------------------------
234 EditionString=Commercial
238 # parse the arguments, setting things to "yes" or "no"
239 while [ "$#" -gt 0 ]; do
243 #Autoconf style options
245 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
249 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
253 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
254 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
257 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
262 # this option may or may not be followed by an argument
263 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
272 # this option may or may not be followed by an argument
273 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
286 -h|help|--help|-help)
287 if [ "$VAL" = "yes" ]; then
289 COMMERCIAL_USER="no" #doesn't matter we will display the help
292 COMMERCIAL_USER="no" #doesn't matter we will display the help
296 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
300 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
307 if [ "$UNKNOWN_ARG" = "yes" ]; then
324 if [ "$PLATFORM_QPA" != "no" ]; then
325 if [ "$PLATFORM_QPA" = "maybe" ]; then
332 echo "No license exists to enable Qt QPA. Disabling."
337 echo "Using NaCl at $VAL."
349 COMMERCIAL_USER="yes"
363 if [ "$COMMERCIAL_USER" = "ask" ]; then
365 echo "Which edition of Qt do you want to use ?"
367 echo "Type 'c' if you want to use the Commercial Edition."
368 echo "Type 'o' if you want to use the Open Source Edition."
372 if [ "$commercial" = "c" ]; then
373 COMMERCIAL_USER="yes"
375 elif [ "$commercial" = "o" ]; then
382 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
383 # Commercial preview release
384 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
387 QT_EDITION="QT_EDITION_DESKTOP"
388 LicenseType="Technology Preview"
389 elif [ $COMMERCIAL_USER = "yes" ]; then
390 # one of commercial editions
391 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
392 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
393 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
395 # read in the license file
396 if [ -f "$LICENSE_FILE" ]; then
397 . "$LICENSE_FILE" >/dev/null 2>&1
398 if [ -z "$LicenseKeyExt" ]; then
400 echo "You are using an old license file."
402 echo "Please install the license file supplied by Nokia,"
403 echo "or install the Qt Open Source Edition if you intend to"
404 echo "develop free software."
407 if [ -z "$Licensee" ]; then
409 echo "Invalid license key. Please check the license key."
413 if [ -z "$LicenseKeyExt" ]; then
415 echo $ECHO_N "Please enter your license key: $ECHO_C"
417 Licensee="Unknown user"
422 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
423 && LicenseValid="yes" \
425 if [ "$LicenseValid" != "yes" ]; then
427 echo "Invalid license key. Please check the license key."
430 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
431 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
432 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
433 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
435 # determine which edition we are licensed to use
436 case "$LicenseTypeCode" in
438 LicenseType="Commercial"
442 QT_EDITION="QT_EDITION_UNIVERSAL"
445 Edition="FullFramework"
446 EditionString="Full Framework"
447 QT_EDITION="QT_EDITION_DESKTOP"
450 Edition="GUIFramework"
451 EditionString="GUI Framework"
452 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
457 LicenseType="Evaluation"
458 QMakeVar add DEFINES QT_EVAL
462 QT_EDITION="QT_EDITION_EVALUATION"
467 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
469 echo "Invalid license key. Please check the license key."
473 # verify that we are licensed to use Qt on this platform
475 case "$PlatformCode" in
478 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
482 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
485 ### EMBEDDED_QPA logic missing ###
486 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
487 X9,* | XC,* | XU,* | XW,* | XM,*)
489 LICENSE_EXTENSION="-ALLOS"
491 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
492 # Qt for Embedded Linux
493 LICENSE_EXTENSION="-EMBEDDED"
495 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
497 LICENSE_EXTENSION="-EMBEDDED"
499 FM,*,no | LM,yes,* | ZM,no,no)
501 LICENSE_EXTENSION="-DESKTOP"
505 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
506 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
508 echo "You are not licensed for the $Platform platform."
510 echo "Please contact qt-info@nokia.com to upgrade your license to"
511 echo "include the $Platform platform, or install the Qt Open Source Edition"
512 echo "if you intend to develop free software."
517 if test -r "$relpath/.LICENSE"; then
518 # Generic, non-final license
520 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
525 *TECHNOLOGY?PREVIEW*)
532 echo >&2 "Invalid license files; cannot continue"
537 EditionString="$Edition"
538 QT_EDITION="QT_EDITION_DESKTOP"
541 case "$LicenseFeatureCode" in
544 case "$LicenseType" in
546 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
549 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
555 case "$LicenseType" in
557 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
560 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
566 echo "Invalid license key. Please check the license key."
570 case "$LicenseFeatureCode" in
578 if [ '!' -f "$outpath/LICENSE" ]; then
579 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
580 echo "this software has disappeared."
582 echo "Sorry, you are not licensed to use this software."
583 echo "Try re-installing."
587 elif [ $COMMERCIAL_USER = "no" ]; then
588 # Open Source edition - may only be used under the terms of the GPL or LGPL.
589 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
590 Licensee="Open Source"
592 EditionString="Open Source"
593 QT_EDITION="QT_EDITION_OPENSOURCE"
596 #-------------------------------------------------------------------------------
597 # initalize variables
598 #-------------------------------------------------------------------------------
600 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
601 for varname in $SYSTEM_VARIABLES; do
602 qmakevarname="${varname}"
603 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
604 if [ "${varname}" = "LDFLAGS" ]; then
605 qmakevarname="LFLAGS"
606 elif [ "${varname}" = "LD" ]; then
610 'if [ -n "\$'${varname}'" ]; then
611 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
615 # Use CC/CXX to run config.tests
616 mkdir -p "$outpath/config.tests"
617 rm -f "$outpath/config.tests/.qmake.cache"
618 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
620 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
621 QMakeVar add decorations "default windows styled"
622 QMakeVar add mouse-drivers "pc"
623 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
624 QMakeVar add gfx-drivers "linuxfb"
625 QMakeVar add mouse-drivers "linuxtp"
627 QMakeVar add kbd-drivers "tty"
629 if [ "$CFG_DEV" = "yes" ]; then
630 QMakeVar add kbd-drivers "um"
633 # QTDIR may be set and point to an old or system-wide Qt installation
636 # the minimum version of libdbus-1 that we require:
637 MIN_DBUS_1_VERSION=0.93
639 # initalize internal variables
640 CFG_CONFIGURE_EXIT_ON_ERROR=yes
642 CFG_EXCEPTIONS=unspecified
643 CFG_GUI=auto # (yes|no|auto)
644 CFG_SCRIPT=auto # (yes|no|auto)
645 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
646 CFG_XMLPATTERNS=auto # (yes|no|auto)
676 CFG_OPENVG_LC_INCLUDES=no
677 CFG_OPENVG_SHIVA=auto
678 CFG_OPENVG_ON_OPENGL=auto
680 CFG_EGL_GLES_INCLUDES=no
683 CFG_QWS_FREETYPE=auto
686 QT_DEFAULT_BUILD_PARTS="libs examples tests"
691 CFG_PHONON_BACKEND=yes
693 CFG_AUDIO_BACKEND=auto
698 CFG_DECLARATIVE_DEBUG=yes
699 CFG_WEBKIT=auto # (yes|no|auto|debug)
700 CFG_JAVASCRIPTCORE_JIT=auto
703 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
704 CFG_GFX_ON="linuxfb multiscreen"
705 CFG_GFX_PLUGIN_AVAILABLE=
708 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
709 CFG_KBD_ON="tty" #default, see QMakeVar above
710 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
711 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
713 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
714 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
715 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
716 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
718 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
719 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
720 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
721 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
726 CFG_KBD_PLUGIN_AVAILABLE=
729 CFG_MOUSE_PLUGIN_AVAILABLE=
734 CFG_DECORATION_AVAILABLE="styled windows default"
735 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
736 CFG_DECORATION_PLUGIN_AVAILABLE=
737 CFG_DECORATION_PLUGIN=
755 CFG_SEPARATE_DEBUG_INFO=no
756 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
757 CFG_REDUCE_EXPORTS=auto
767 CFG_REDUCE_RELOCATIONS=auto
770 CFG_ACCESSIBILITY=auto
773 CFG_DOUBLEFORMAT=auto
777 CFG_CLOCK_GETTIME=auto
778 CFG_CLOCK_MONOTONIC=auto
787 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
792 CFG_PREFIX_INSTALL=yes
801 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
802 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
806 OPT_CONFIRM_LICENSE=no
819 # initalize variables used for installation
828 QT_INSTALL_TRANSLATIONS=
834 #flags for SQL drivers
842 QT_LFLAGS_ODBC="-lodbc"
845 # flags for libdbus-1
849 # flags for Glib (X11 only)
853 # flags for GStreamer (X11 only)
857 #-------------------------------------------------------------------------------
858 # check SQL drivers, mouse drivers and decorations available in this package
859 #-------------------------------------------------------------------------------
861 # opensource version removes some drivers, so force them to be off
867 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
868 for a in "$relpath/src/plugins/sqldrivers/"*; do
870 base_a=`basename "$a"`
871 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
872 eval "CFG_SQL_${base_a}=auto"
877 CFG_DECORATION_PLUGIN_AVAILABLE=
878 if [ -d "$relpath/src/plugins/decorations" ]; then
879 for a in "$relpath/src/plugins/decorations/"*; do
881 base_a=`basename "$a"`
882 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
887 CFG_KBD_PLUGIN_AVAILABLE=
888 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
889 for a in "$relpath/src/plugins/kbddrivers/"*; do
891 base_a=`basename "$a"`
892 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
897 CFG_MOUSE_PLUGIN_AVAILABLE=
898 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
899 for a in "$relpath/src/plugins/mousedrivers/"*; do
901 base_a=`basename "$a"`
902 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
907 CFG_GFX_PLUGIN_AVAILABLE=
908 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
909 for a in "$relpath/src/plugins/gfxdrivers/"*; do
911 base_a=`basename "$a"`
912 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
915 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
918 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
919 if [ -d "$relpath/src/plugins/imageformats" ]; then
920 for a in "$relpath/src/plugins/imageformats/"*; do
922 base_a=`basename "$a"`
923 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
928 #-------------------------------------------------------------------------------
929 # Set Default NaCl options
930 #-------------------------------------------------------------------------------
931 if [ "$CFG_EMBEDDED" = "nacl" ]; then
932 echo "Setting NaCl options:"
942 if [ `uname` = "Linux" ]; then
943 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
944 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
946 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
947 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
950 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
961 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
962 QT_CONFIG="$QT_CONFIG nacl"
965 #-------------------------------------------------------------------------------
966 # parse command line arguments
967 #-------------------------------------------------------------------------------
969 # parse the arguments, setting things to "yes" or "no"
970 while [ "$#" -gt 0 ]; do
974 #Autoconf style options
976 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
980 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
984 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
985 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
988 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
992 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
996 -no-*-*|-plugin-*-*|-qt-*-*)
997 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
998 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1013 #Qt style no options
1015 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1018 #Qt style yes options
1019 -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|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
1020 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1023 #Qt style options that pass an argument
1025 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1027 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1031 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1035 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1036 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1040 #Qt style complex options in one command
1041 -enable-*|-disable-*)
1042 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1043 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1045 #Qt Builtin/System style options
1046 -no-*|-system-*|-qt-*)
1047 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1048 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1050 #Options that cannot be generalized
1057 # this option may or may not be followed by an argument
1058 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1065 -embedded-lite|-qpa)
1067 # this option may or may not be followed by an argument
1068 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1081 # this option may or may not be followed by an argument
1082 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1091 # this option may or may not be followed by an argument
1092 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1100 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1101 # this option may or may not be followed by an argument
1102 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1111 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1115 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1129 if [ "$1" = "-D" ]; then
1133 VAL=`echo $1 | sed 's,-D,,'`
1138 # this option may or may not be followed by an argument
1139 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1148 if [ "$1" = "-I" ]; then
1152 VAL=`echo $1 | sed 's,-I,,'`
1157 if [ "$1" = "-L" ]; then
1161 VAL=`echo $1 | sed 's,-L,,'`
1166 if [ "$1" = "-R" ]; then
1170 VAL=`echo $1 | sed 's,-R,,'`
1175 VAL=`echo $1 | sed 's,-l,,'`
1179 if [ "$1" = "-F" ]; then
1183 VAL=`echo $1 | sed 's,-F,,'`
1188 if [ "$1" = "-fw" ]; then
1192 VAL=`echo $1 | sed 's,-fw,,'`
1200 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1207 if [ "$UNKNOWN_ARG" = "yes" ]; then
1208 echo "$1: unknown argument"
1219 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1220 CFG_ACCESSIBILITY="$VAL"
1229 CFG_USE_GNUMAKE="$VAL"
1232 CFG_MYSQL_CONFIG="$VAL"
1235 QT_INSTALL_PREFIX="$VAL"
1238 QT_HOST_PREFIX="$VAL"
1241 QT_FORCE_PKGCONFIG=yes
1244 QT_INSTALL_DOCS="$VAL"
1247 QT_INSTALL_HEADERS="$VAL"
1250 QT_INSTALL_PLUGINS="$VAL"
1253 QT_INSTALL_IMPORTS="$VAL"
1256 QT_INSTALL_DATA="$VAL"
1259 QT_INSTALL_LIBS="$VAL"
1268 QT_INSTALL_TRANSLATIONS="$VAL"
1270 sysconfdir|settingsdir)
1271 QT_INSTALL_SETTINGS="$VAL"
1274 QT_INSTALL_EXAMPLES="$VAL"
1277 QT_INSTALL_TESTS="$VAL"
1286 QT_INSTALL_BINS="$VAL"
1308 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1315 if [ "$VAL" = "little" ]; then
1316 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1317 elif [ "$VAL" = "big" ]; then
1318 CFG_ENDIAN="Q_BIG_ENDIAN"
1324 if [ "$VAL" = "little" ]; then
1325 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1326 elif [ "$VAL" = "big" ]; then
1327 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1333 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1340 CFG_QWS_DEPTHS="$VAL"
1343 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1344 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1345 [ "$VAL" = "es2" ]; then
1347 if [ "$VAL" = "es2" ]; then
1355 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1357 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1364 qvfb) # left for commandline compatibility, not documented
1365 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1366 if [ "$VAL" = "yes" ]; then
1367 QMakeVar add gfx-drivers qvfb
1368 QMakeVar add kbd-drivers qvfb
1369 QMakeVar add mouse-drivers qvfb
1370 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1371 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1372 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1379 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1382 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1391 if [ "$PLATFORM_MAC" = "yes" ]; then
1398 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1399 CFG_MAC_DWARF2="$VAL"
1405 # if this is a Mac then "windows" probably means
1406 # we are cross-compiling for MinGW
1407 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1408 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1417 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1418 CFG_MAC_HARFBUZZ="$VAL"
1425 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1426 CFG_FRAMEWORK="$VAL"
1432 if [ "$VAL" = "yes" ]; then
1434 QMakeVar add QMAKE_CFLAGS -pg
1435 QMakeVar add QMAKE_CXXFLAGS -pg
1436 QMakeVar add QMAKE_LFLAGS -pg
1437 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1443 if [ "$VAL" = "yes" ]; then
1444 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1447 exceptions|g++-exceptions)
1448 if [ "$VAL" = "no" ]; then
1450 elif [ "$VAL" = "yes" ]; then
1458 # keep compatibility with old platform names
1464 PLATFORM=hpux-acc-o64
1467 PLATFORM=hpux-acc-64
1470 PLATFORM=hpux-acc-64
1482 PLATFORM=reliant-cds-64
1485 PLATFORM=solaris-cc-64
1488 PLATFORM=unixware-cc
1491 PLATFORM=unixware-g++
1494 PLATFORM=unixware-cc
1497 PLATFORM=unixware-g++
1503 i386) NATIVE_64_ARCH="x86_64" ;;
1504 powerpc) NATIVE_64_ARCH="ppc64" ;;
1505 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1507 if [ ! -z "$NATIVE_64_ARCH" ]; then
1508 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1515 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1518 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1519 CFG_DEBUG_RELEASE="$VAL"
1525 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1526 CFG_RELEASE_QMAKE="$VAL"
1532 if [ "$VAL" = "yes" ]; then
1534 elif [ "$VAL" = "no" ]; then
1541 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1542 CFG_PREFIX_INSTALL="$VAL"
1550 developer-build|commercial|opensource)
1551 # These switches have been dealt with already
1554 if [ "$VAL" = "yes" ]; then
1556 elif [ "$VAL" = "no" ]; then
1563 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1564 CFG_INCREMENTAL="$VAL"
1570 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1571 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1577 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1578 if [ "$VAL" = "no" ]; then
1579 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1580 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1581 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1587 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1594 if [ "$VAL" = "no" ]; then
1601 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1609 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1616 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1623 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1630 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1637 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1644 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1651 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1658 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1665 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1666 CFG_PRECOMPILE="$VAL"
1671 separate-debug-info)
1672 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1673 CFG_SEPARATE_DEBUG_INFO="$VAL"
1674 elif [ "$VAL" = "nocopy" ] ; then
1675 CFG_SEPARATE_DEBUG_INFO="yes"
1676 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1682 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1683 CFG_REDUCE_EXPORTS="$VAL"
1689 if [ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "no" ]; then
1703 if [ "$VAL" = "no" ]; then
1710 if [ "$VAL" = "no" ]; then
1717 if [ "$VAL" = "no" ]; then
1724 if [ "$VAL" = "no" ]; then
1731 if [ "$VAL" = "no" ]; then
1738 if [ "$VAL" = "no" ]; then
1745 if [ "$VAL" = "no" ]; then
1755 if [ "$VAL" = "no" ]; then
1762 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1763 CFG_REDUCE_RELOCATIONS="$VAL"
1769 [ "$VAL" = "qt" ] && VAL=yes
1770 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1771 CFG_QWS_FREETYPE="$VAL"
1777 [ "$VAL" = "qt" ] && VAL=yes
1778 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1783 # No longer supported:
1784 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1787 if [ "$VAL" = "system" ]; then
1794 [ "$VAL" = "yes" ] && VAL=qt
1795 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1802 [ "$VAL" = "yes" ] && VAL=qt
1803 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1810 [ "$VAL" = "yes" ] && VAL=qt
1811 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1818 [ "$VAL" = "yes" ] && VAL=qt
1819 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1826 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1833 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1840 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1847 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1854 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1861 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1868 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1869 CFG_FONTCONFIG="$VAL"
1875 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1882 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1889 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1896 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1903 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1910 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1917 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1918 CFG_GSTREAMER="$VAL"
1924 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1925 CFG_QGTKSTYLE="$VAL"
1931 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1934 if [ "$VAL" = "no" ]; then
1942 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1944 elif [ "$VAL" = "runtime" ]; then
1951 if [ "$VAL" = "yes" ]; then
1958 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1965 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1966 CFG_LARGEFILE="$VAL"
1972 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1979 if [ "$VAL" = "yes" ]; then
1980 CFG_OPENSSL="linked"
1986 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1987 CFG_XMLPATTERNS="yes"
1989 if [ "$VAL" = "no" ]; then
1990 CFG_XMLPATTERNS="no"
1997 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2000 if [ "$VAL" = "no" ]; then
2008 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2009 CFG_SCRIPTTOOLS="yes"
2011 if [ "$VAL" = "no" ]; then
2012 CFG_SCRIPTTOOLS="no"
2019 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2022 if [ "$VAL" = "no" ]; then
2030 if [ "$VAL" = "yes" ]; then
2033 if [ "$VAL" = "no" ]; then
2041 if [ "$VAL" = "yes" ]; then
2042 CFG_DECLARATIVE="yes"
2044 if [ "$VAL" = "no" ]; then
2045 CFG_DECLARATIVE="no"
2052 if [ "$VAL" = "yes" ]; then
2053 CFG_DECLARATIVE_DEBUG="yes"
2055 if [ "$VAL" = "no" ]; then
2056 CFG_DECLARATIVE_DEBUG="no"
2063 [ "$VAL" = "auto" ] && VAL="yes"
2067 if [ "$VAL" = "yes" ]; then
2070 if [ "$VAL" = "no" ]; then
2078 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2079 CFG_JAVASCRIPTCORE_JIT="$VAL"
2085 if [ "$VAL" = "yes" ]; then
2086 OPT_CONFIRM_LICENSE="$VAL"
2092 if [ "$VAL" = "yes" ]; then
2098 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2099 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2100 # if autoconf style options were used, $VAL can be "yes" or "no"
2101 [ "$VAL" = "yes" ] && VAL=qt
2102 # now $VAL should be "no", "qt", or "plugin"... double-check
2103 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2106 # now $VAL is "no", "qt", or "plugin"
2108 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2109 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2111 # Grab the available values
2114 avail="$CFG_SQL_AVAILABLE"
2117 avail="$CFG_GFX_AVAILABLE"
2118 if [ "$OPT" = "plugin" ]; then
2119 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2123 avail="$CFG_DECORATION_AVAILABLE"
2124 if [ "$OPT" = "plugin" ]; then
2125 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2129 avail="$CFG_KBD_AVAILABLE"
2130 if [ "$OPT" = "plugin" ]; then
2131 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2135 avail="$CFG_MOUSE_AVAILABLE"
2136 if [ "$OPT" = "plugin" ]; then
2137 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2141 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2142 if [ "$OPT" != "plugin" ]; then
2143 # png is always built in
2149 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2153 # Check that that user's value is available.
2156 if [ "$VAL" = "$d" ]; then
2161 [ "$found" = yes ] || ERROR=yes
2163 if [ "$VAR" = "sql" ]; then
2164 # set the CFG_SQL_driver
2165 eval "CFG_SQL_$VAL=\$OPT"
2167 elif [ "$VAR" = "imageformat" ]; then
2168 [ "$OPT" = "qt" ] && OPT=yes
2169 VAL="`echo $VAL |tr a-z A-Z`"
2170 eval "CFG_$VAL=$OPT"
2174 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2175 if [ "$OPT" = "plugin" ]; then
2176 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2177 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2178 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2179 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2180 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2181 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2182 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2183 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2186 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2187 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2188 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2189 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2190 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2194 QMakeVar add "${VAR}s" "${VAL}"
2195 elif [ "$OPT" = "no" ]; then
2196 PLUG_VAR="${VAR}-plugin"
2197 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2198 IN_VAR="${VAR}-driver"
2202 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2203 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2204 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2205 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2206 QMakeVar del "${IN_VAR}s" "$VAL"
2207 QMakeVar del "${PLUG_VAR}s" "$VAL"
2209 if [ "$ERROR" = "yes" ]; then
2210 echo "$CURRENT_OPT: unknown argument"
2215 if [ "$VAL" = "yes" ]; then
2216 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2217 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2221 elif [ "$VAL" = "no" ]; then
2222 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2223 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2232 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2239 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2246 D_FLAGS="$D_FLAGS \"$VAL\""
2249 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2252 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2255 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2258 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2261 if [ "$PLATFORM_MAC" = "yes" ]; then
2262 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2263 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2269 if [ "$PLATFORM_MAC" = "yes" ]; then
2270 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2276 W_FLAGS="$W_FLAGS \"${VAL}\""
2282 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2289 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2290 CFG_PHONON_BACKEND="$VAL"
2296 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2297 CFG_MULTIMEDIA="$VAL"
2309 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2310 CFG_AUDIO_BACKEND="$VAL"
2316 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2323 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2324 CFG_FORCE_ASSERTS="$VAL"
2333 if [ "$UNKNOWN_OPT" = "yes" ]; then
2334 echo "${CURRENT_OPT}: invalid command-line switch"
2340 # update QT_CONFIG to show our current predefined configuration
2341 case "$CFG_QCONFIG" in
2342 minimal|small|medium|large|full)
2343 # these are a sequence of increasing functionality
2344 for c in minimal small medium large full; do
2345 QT_CONFIG="$QT_CONFIG $c-config"
2346 [ "$CFG_QCONFIG" = $c ] && break
2350 # not known to be sufficient for anything
2351 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2352 echo >&2 "Error: configuration file not found:"
2353 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2355 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2360 #-------------------------------------------------------------------------------
2361 # build tree initialization
2362 #-------------------------------------------------------------------------------
2364 # where to find which..
2365 unixtests="$relpath/config.tests/unix"
2366 mactests="$relpath/config.tests/mac"
2367 WHICH="$unixtests/which.test"
2369 PERL=`$WHICH perl 2>/dev/null`
2371 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2373 for e in gawk nawk awk; do
2374 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2381 PERL="/usr/bin/perl"
2382 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2386 ### skip this if the user just needs help...
2387 if [ "$OPT_HELP" != "yes" ]; then
2389 # is this a shadow build?
2390 if [ "$OPT_SHADOW" = "maybe" ]; then
2392 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2393 if [ -h "$outpath" ]; then
2394 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2400 if [ "$OPT_SHADOW" = "yes" ]; then
2401 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2402 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2403 echo >&2 "Cannot proceed."
2406 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2409 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2411 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2412 echo "Qt can be built in release mode with separate debug information, so"
2413 echo "-debug-and-release is not necessary anymore"
2417 if [ "$CFG_SILENT" = "yes" ]; then
2418 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2421 # if the source tree is different from the build tree,
2422 # symlink or copy part of the sources
2423 if [ "$OPT_SHADOW" = "yes" ]; then
2424 echo "Preparing build tree..."
2426 if [ -z "$PERL" ]; then
2428 echo "You need perl in your PATH to make a shadow build."
2429 echo "Cannot proceed."
2433 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2435 # symlink the qmake directory
2436 find "$relpath/qmake" | while read a; do
2437 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2438 if [ '!' -f "$my_a" ]; then
2439 if [ -d "$a" ]; then
2440 # directories are created...
2443 a_dir=`dirname "$my_a"`
2444 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2445 # ... and files are symlinked
2446 case `basename "$a"` in
2447 *.o|*.d|GNUmakefile*|qmake)
2458 # make a syncqt script that can be used in the shadow
2459 rm -f "$outpath/bin/syncqt"
2460 if [ -x "$relpath/bin/syncqt" ]; then
2461 mkdir -p "$outpath/bin"
2462 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2463 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2464 chmod 755 "$outpath/bin/syncqt"
2467 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2468 rm -f "$outpath/bin/$i"
2469 if [ -x "$relpath/bin/$i" ]; then
2470 mkdir -p "$outpath/bin"
2471 echo "#!/bin/sh" >"$outpath/bin/$i"
2472 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2473 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2474 chmod 755 "$outpath/bin/$i"
2478 # symlink the mkspecs directory
2479 mkdir -p "$outpath/mkspecs"
2480 rm -rf "$outpath"/mkspecs/*
2481 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2482 rm -f "$outpath/mkspecs/default"
2486 rm -rf "$outpath/mkspecs/$1"
2487 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2488 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2491 # Special case for mkspecs/features directory.
2492 # To be able to place .prf files into a shadow build directory,
2493 # we're creating links for files only. The directory structure is reproduced.
2494 ShadowMkspecs features
2496 # The modules dir is special, too.
2497 ShadowMkspecs modules
2499 # symlink the doc directory
2500 rm -rf "$outpath/doc"
2501 ln -s "$relpath/doc" "$outpath/doc"
2503 # make sure q3porting.xml can be found
2504 mkdir -p "$outpath/tools/porting/src"
2505 rm -f "$outpath/tools/porting/src/q3porting.xml"
2506 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2509 # symlink fonts to be able to run application from build directory
2510 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2511 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2512 mkdir -p "${outpath}/lib"
2513 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2517 if [ "$OPT_FAST" = "auto" ]; then
2518 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2525 # find a make command
2526 if [ -z "$MAKE" ]; then
2528 for mk in gmake make; do
2529 if "$WHICH" $mk >/dev/null 2>&1; then
2534 if [ -z "$MAKE" ]; then
2535 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2536 echo >&2 "Cannot proceed."
2539 # export MAKE, we need it later in the config.tests
2545 #-------------------------------------------------------------------------------
2546 # auto-detect all that hasn't been specified in the arguments
2547 #-------------------------------------------------------------------------------
2549 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2550 if [ "$CFG_EMBEDDED" != "no" ]; then
2551 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2553 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2554 if [ -z "$XPLATFORM" ]; then
2555 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2556 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2560 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2561 if [ -z "$XPLATFORM" ]; then
2562 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2563 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2567 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2568 if [ -z "$XPLATFORM" ]; then
2569 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2570 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2574 if [ -z "$PLATFORM" ]; then
2575 case "$UNAME_MACHINE" in
2577 PLATFORM=qws/linux-x86-g++
2580 PLATFORM=qws/linux-x86_64-g++
2583 PLATFORM=qws/linux-generic-g++
2587 if [ -z "$XPLATFORM" ]; then
2588 if [ "$CFG_EMBEDDED" = "auto" ]; then
2589 if [ -n "$CFG_ARCH" ]; then
2590 CFG_EMBEDDED=$CFG_ARCH
2592 case "$UNAME_MACHINE" in
2600 CFG_EMBEDDED=generic
2605 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2609 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2610 if [ -z "$XPLATFORM" ]; then
2611 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2612 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2616 if [ -z "$XPLATFORM" ]; then
2621 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2628 if [ -z "$PLATFORM" ]; then
2630 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2632 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2634 # PLATFORM=macx-xcode
2641 #PLATFORM=aix-g++-64
2643 #PLATFORM=aix-xlc-64
2645 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2655 # PLATFORM=dynix-g++
2661 PLATFORM=freebsd-g++
2663 - Also available for FreeBSD: freebsd-icc
2667 PLATFORM=openbsd-g++
2678 #PLATFORM=irix-cc-64
2680 - Also available for IRIX: irix-g++ irix-cc-64
2684 case "$UNAME_MACHINE" in
2686 #PLATFORM=hpuxi-acc-32
2687 PLATFORM=hpuxi-acc-64
2689 - Also available for HP-UXi: hpuxi-acc-32
2695 #PLATFORM=hpux-acc-64
2697 #PLATFORM=hpux-acc-o64
2699 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2708 - Also available for Tru64: tru64-g++
2712 case "$UNAME_MACHINE" in
2714 PLATFORM=linux-g++-64
2721 - Also available for Linux: linux-kcc linux-icc linux-cxx
2725 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2726 PLATFORM="solaris-g++"
2728 #PLATFORM=solaris-g++
2730 #PLATFORM=solaris-cc64
2733 - Also available for Solaris: solaris-g++ solaris-cc-64
2736 ReliantUNIX-*:*|SINIX-*:*)
2737 PLATFORM=reliant-cds
2738 #PLATFORM=reliant-cds-64
2740 - Also available for Reliant UNIX: reliant-cds-64
2750 #PLATFORM=unixware-g++
2751 PLATFORM=unixware-cc
2753 - Also available for OpenUNIX: unixware-g++
2757 #PLATFORM=unixware-g++
2758 PLATFORM=unixware-cc
2760 - Also available for UnixWare: unixware-g++
2767 - Also available for SCO OpenServer: sco-g++
2771 PLATFORM=unixware-g++
2774 PLATFORM=unsupported/qnx-g++
2777 if [ "$OPT_HELP" != "yes" ]; then
2779 for p in $PLATFORMS; do
2780 echo " $relconf $* -platform $p"
2783 echo " The build script does not currently recognize all" >&2
2784 echo " platforms supported by Qt." >&2
2785 echo " Rerun this script with a -platform option listed to" >&2
2786 echo " set the system/compiler combination you use." >&2
2793 if [ "$PLATFORM_QWS" = "yes" ]; then
2795 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2797 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2800 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2802 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2803 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2805 if [ -d "$PLATFORM" ]; then
2806 QMAKESPEC="$PLATFORM"
2808 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2810 if [ -d "$XPLATFORM" ]; then
2811 XQMAKESPEC="$XPLATFORM"
2813 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2815 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2816 QT_CROSS_COMPILE=yes
2817 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2820 if [ "$PLATFORM_MAC" = "yes" ]; then
2821 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2823 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2824 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2825 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2826 echo " built with 'macx-g++'" >&2
2832 # check specified platforms are supported
2833 if [ '!' -d "$QMAKESPEC" ]; then
2835 echo " The specified system/compiler is not supported:"
2839 echo " Please see the README file for a complete list."
2843 if [ '!' -d "$XQMAKESPEC" ]; then
2845 echo " The specified system/compiler is not supported:"
2849 echo " Please see the README file for a complete list."
2853 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2855 echo " The specified system/compiler port is not complete:"
2857 echo " $XQMAKESPEC/qplatformdefs.h"
2859 echo " Please contact qt-info@nokia.com."
2864 # now look at the configs and figure out what platform we are config'd for
2865 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2866 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2868 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2870 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2871 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2872 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2873 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2874 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2878 #-------------------------------------------------------------------------------
2879 # determine the system architecture
2880 #-------------------------------------------------------------------------------
2881 if [ "$OPT_VERBOSE" = "yes" ]; then
2882 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2885 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2886 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2888 echo "You have specified a target architecture with -embedded and -arch."
2889 echo "The two architectures you have specified are different, so we can"
2890 echo "not proceed. Either set both to be the same, or only use -embedded."
2896 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2897 case `basename "$XPLATFORM"` in
2900 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2902 echo "Please contact qt-info@nokia.com to upgrade your license to"
2903 echo "include this platform, or install the Qt Open Source Edition"
2904 echo "if you intend to develop free software."
2910 if [ -z "${CFG_HOST_ARCH}" ]; then
2911 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2913 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2914 case "$CFG_HOST_ARCH" in
2919 if [ "$OPT_VERBOSE" = "yes" ]; then
2920 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2924 CFG_HOST_ARCH=`uname -p`
2925 if [ "$OPT_VERBOSE" = "yes" ]; then
2926 echo " SGI ($CFG_HOST_ARCH)"
2930 case "$UNAME_MACHINE" in
2932 if [ "$OPT_VERBOSE" = "yes" ]; then
2933 echo " Sun SPARC (sparc)"
2940 if [ "$OPT_VERBOSE" = "yes" ]; then
2941 echo " 64-bit AMD 80x86 (x86_64)"
2943 CFG_HOST_ARCH=x86_64
2946 if [ "$OPT_VERBOSE" = "yes" ]; then
2947 echo " 32-bit Intel 80x86 (i386)"
2955 case "$UNAME_MACHINE" in
2957 if [ "$OPT_VERBOSE" = "yes" ]; then
2958 echo " 32-bit Apple PowerPC (powerpc)"
2962 if [ "$OPT_VERBOSE" = "yes" ]; then
2963 echo " 32-bit Intel 80x86 (i386)"
2967 CFG_HOST_ARCH=macosx
2970 if [ "$OPT_VERBOSE" = "yes" ]; then
2971 echo " 64-bit IBM PowerPC (powerpc)"
2973 CFG_HOST_ARCH=powerpc
2976 if [ "$OPT_VERBOSE" = "yes" ]; then
2977 echo " HP PA-RISC (parisc)"
2979 CFG_HOST_ARCH=parisc
2982 if [ "$OPT_VERBOSE" = "yes" ]; then
2983 echo " 32-bit Intel 80x86 (i386)"
2987 *:*:x86_64|*:*:amd64)
2988 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2989 if [ "$OPT_VERBOSE" = "yes" ]; then
2990 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2994 if [ "$OPT_VERBOSE" = "yes" ]; then
2995 echo " 64-bit AMD 80x86 (x86_64)"
2997 CFG_HOST_ARCH=x86_64
3001 if [ "$OPT_VERBOSE" = "yes" ]; then
3002 echo " 32-bit PowerPC (powerpc)"
3004 CFG_HOST_ARCH=powerpc
3007 if [ "$OPT_VERBOSE" = "yes" ]; then
3008 echo " 64-bit PowerPC (powerpc)"
3010 CFG_HOST_ARCH=powerpc
3013 if [ "$OPT_VERBOSE" = "yes" ]; then
3014 echo " IBM S/390 (s390)"
3019 if [ "$OPT_VERBOSE" = "yes" ]; then
3025 if [ "$OPT_VERBOSE" = "yes" ]; then
3026 echo " Linux on SPARC"
3031 case "$UNAME_MACHINE" in
3033 if [ "$OPT_VERBOSE" = "yes" ]; then
3034 echo " QNX on Intel 80x86 (i386)"
3041 if [ "$OPT_VERBOSE" = "yes" ]; then
3042 echo " Trying '$UNAME_MACHINE'..."
3044 CFG_HOST_ARCH="$UNAME_MACHINE"
3049 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3050 if [ -n "$CFG_ARCH" ]; then
3051 CFG_EMBEDDED=$CFG_ARCH
3054 case "$CFG_EMBEDDED" in
3077 CFG_ARCH="$CFG_EMBEDDED"
3080 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3081 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3082 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3083 CFG_ARCH=$CFG_HOST_ARCH
3090 # previously, armv6 was a different arch
3096 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3097 if [ "$OPT_VERBOSE" = "yes" ]; then
3098 echo " '$CFG_ARCH' is supported"
3101 if [ "$OPT_VERBOSE" = "yes" ]; then
3102 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3106 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3107 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3108 if [ "$OPT_VERBOSE" = "yes" ]; then
3109 echo " '$CFG_HOST_ARCH' is supported"
3112 if [ "$OPT_VERBOSE" = "yes" ]; then
3113 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3115 CFG_HOST_ARCH=generic
3119 if [ "$OPT_VERBOSE" = "yes" ]; then
3120 echo "System architecture: '$CFG_ARCH'"
3121 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3122 echo "Host architecture: '$CFG_HOST_ARCH'"
3126 #-------------------------------------------------------------------------------
3127 # tests that don't need qmake (must be run before displaying help)
3128 #-------------------------------------------------------------------------------
3130 # detect build style
3131 if [ "$CFG_DEBUG" = "auto" ]; then
3132 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3133 CFG_DEBUG_RELEASE=yes
3135 elif [ "$CFG_DEV" = "yes" ]; then
3136 CFG_DEBUG_RELEASE=no
3139 CFG_DEBUG_RELEASE=no
3143 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3144 QT_CONFIG="$QT_CONFIG build_all"
3147 if [ -z "$PKG_CONFIG" ]; then
3148 # See if PKG_CONFIG is set in the mkspec:
3149 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3151 if [ -z "$PKG_CONFIG" ]; then
3152 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3155 # Work out if we can use pkg-config
3156 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3157 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3159 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3160 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3161 echo >&2 "environment!"
3163 if [ -z "$PKG_CONFIG_PATH" ]; then
3165 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3166 echo >&2 "the host compiler's .pc files will be used. This is probably"
3167 echo >&2 "not what you want."
3169 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3171 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3172 echo >&2 "been set. This means your toolchain's .pc files must contain"
3173 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3174 echo >&2 "tests are failing, please check these files."
3179 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3180 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3181 echo >&2 "dependencies"
3187 if [ ! -n "$PKG_CONFIG" ]; then
3188 QT_CONFIG="$QT_CONFIG no-pkg-config"
3191 # pass on $CFG_SDK to the configure tests.
3192 if [ '!' -z "$CFG_SDK" ]; then
3193 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3196 # find the default framework value
3197 if [ "$CFG_ARCH" = "macosx" ]; then
3198 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3199 CFG_FRAMEWORK="$CFG_SHARED"
3200 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3202 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3210 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3211 TEST_COMPILER="$CXX"
3213 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3214 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3215 if [ -z "$TEST_COMPILER" ]; then
3216 echo "ERROR: Cannot set the compiler for the configuration tests"
3221 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3222 TEST_COMPILER="nacl-gcc"
3226 if [ -n "$CFG_SYSROOT" ]; then
3227 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3228 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3229 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3231 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3235 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3237 # auto-detect precompiled header support
3238 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3239 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3246 #auto-detect DWARF2 on the mac
3247 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3248 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3255 # don't autodetect support for separate debug info on objcopy when
3256 # cross-compiling as lots of toolchains seems to have problems with this
3257 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3258 CFG_SEPARATE_DEBUG_INFO="no"
3261 # auto-detect support for separate debug info in objcopy
3262 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3263 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3264 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3265 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3266 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3267 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3268 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3269 CFG_SEPARATE_DEBUG_INFO=no
3273 # binutils on HP-UX is buggy; default to no.
3274 CFG_SEPARATE_DEBUG_INFO=no
3277 CFG_SEPARATE_DEBUG_INFO=yes
3283 # auto-detect -fvisibility support
3284 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3285 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3286 CFG_REDUCE_EXPORTS=no
3288 CFG_REDUCE_EXPORTS=yes
3292 # detect the availability of the -Bsymbolic-functions linker optimization
3293 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3294 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3295 CFG_REDUCE_RELOCATIONS=no
3297 CFG_REDUCE_RELOCATIONS=yes
3301 # auto-detect GNU make support
3302 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3306 # If -opengl wasn't specified, don't try to auto-detect
3307 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3312 if [ "$PLATFORM_MAC" = "yes" ]; then
3313 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3318 # find the default framework value
3319 if [ "$CFG_ARCH" = "macosx" ]; then
3320 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3321 CFG_FRAMEWORK="$CFG_SHARED"
3322 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3324 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3332 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3333 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3334 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3335 # get the darwin version. 10.0.0 and up means snow leopard.
3336 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3337 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3339 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3344 # x11 tests are done after qmake is built
3347 #setup the build parts
3348 if [ -z "$CFG_BUILD_PARTS" ]; then
3349 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3351 # don't build tools by default when cross-compiling
3352 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3353 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3356 for nobuild in $CFG_NOBUILD_PARTS; do
3357 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3359 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3361 # echo "WARNING: libs is a required part of the build."
3363 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3366 #-------------------------------------------------------------------------------
3367 # post process QT_INSTALL_* variables
3368 #-------------------------------------------------------------------------------
3370 if [ -z "$QT_INSTALL_PREFIX" ]; then
3371 if [ "$CFG_DEV" = "yes" ]; then
3372 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3374 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3377 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3379 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3380 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3381 if [ "$PLATFORM_MAC" = "yes" ]; then
3382 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3385 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3388 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3390 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3391 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3392 if [ "$PLATFORM_MAC" = "yes" ]; then
3393 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3398 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3401 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3403 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3404 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3405 if [ "$PLATFORM_MAC" = "yes" ]; then
3406 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3407 QT_INSTALL_LIBS="/Libraries/Frameworks"
3411 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3413 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3415 if [ -z "$QT_INSTALL_BINS" ]; then #default
3416 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3417 if [ "$PLATFORM_MAC" = "yes" ]; then
3418 QT_INSTALL_BINS="/Developer/Applications/Qt"
3421 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3423 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3425 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3426 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3427 if [ "$PLATFORM_MAC" = "yes" ]; then
3428 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3431 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3433 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3435 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3436 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3437 if [ "$PLATFORM_MAC" = "yes" ]; then
3438 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3441 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3443 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3445 if [ -z "$QT_INSTALL_DATA" ]; then #default
3446 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3448 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3450 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3451 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3453 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3455 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3456 if [ "$PLATFORM_MAC" = "yes" ]; then
3457 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3459 QT_INSTALL_SETTINGS=/etc/xdg
3462 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3464 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3465 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3466 if [ "$PLATFORM_MAC" = "yes" ]; then
3467 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3470 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3472 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3475 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3476 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3477 if [ "$PLATFORM_MAC" = "yes" ]; then
3478 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3481 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3483 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3485 #-------------------------------------------------------------------------------
3486 # help - interactive parts of the script _after_ this section please
3487 #-------------------------------------------------------------------------------
3489 # next, emit a usage message if something failed.
3490 if [ "$OPT_HELP" = "yes" ]; then
3491 [ "x$ERROR" = "xyes" ] && echo
3492 if [ "$CFG_NIS" = "no" ]; then
3499 if [ "$CFG_CUPS" = "no" ]; then
3506 if [ "$CFG_ICONV" = "no" ]; then
3513 if [ "$CFG_LARGEFILE" = "no" ]; then
3520 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3527 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3535 if [ "$CFG_XCB" = "no" ]; then
3543 if [ "$CFG_WAYLAND" = "no" ]; then
3550 if [ "$CFG_XINPUT2" = "no" ]; then
3559 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3560 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3561 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3562 [-release] [-debug] [-debug-and-release]
3563 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3564 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3565 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3566 [-plugin-sql-<driver>] [-system-sqlite]
3567 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3568 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3569 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3570 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3571 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3572 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3573 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3574 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3575 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3576 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3577 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3578 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3579 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3580 [-no-openssl] [-openssl] [-openssl-linked]
3581 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3582 [-no-javascript-jit] [-javascript-jit]
3583 [-no-script] [-script] [-no-scripttools] [-scripttools]
3584 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3585 [-no-location] [-location]
3586 [additional platform specific options (see below)]
3589 Installation options:
3591 -qpa ................ This will enable the QPA build.
3592 QPA is a window system agnostic implementation of Qt.
3594 These are optional, but you may specify install directories.
3596 -prefix <dir> ...... This will install everything relative to <dir>
3597 (default $QT_INSTALL_PREFIX)
3599 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3602 -hostprefix [dir] .. Tools and libraries needed when developing
3603 applications are installed in [dir]. If [dir] is
3604 not given, the current build directory will be used.
3609 * -prefix-install .... Force a sandboxed "local" installation of
3610 Qt. This will install into
3611 $QT_INSTALL_PREFIX, if this option is
3612 disabled then some platforms will attempt a
3613 "system" install by placing default values to
3614 be placed in a system location other than
3617 You may use these to separate different parts of the install:
3619 -bindir <dir> ......... Executables will be installed to <dir>
3620 (default PREFIX/bin)
3621 -libdir <dir> ......... Libraries will be installed to <dir>
3622 (default PREFIX/lib)
3623 -docdir <dir> ......... Documentation will be installed to <dir>
3624 (default PREFIX/doc)
3625 -headerdir <dir> ...... Headers will be installed to <dir>
3626 (default PREFIX/include)
3627 -plugindir <dir> ...... Plugins will be installed to <dir>
3628 (default PREFIX/plugins)
3629 -importdir <dir> ...... Imports for QML will be installed to <dir>
3630 (default PREFIX/imports)
3631 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3633 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3634 (default PREFIX/translations)
3635 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3636 (default PREFIX/etc/settings)
3637 -examplesdir <dir> .... Examples will be installed to <dir>
3638 (default PREFIX/examples)
3639 -testsdir <dir> ....... Tests will be installed to <dir>
3640 (default PREFIX/tests)
3644 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3645 that needs to be evaluated. If the evaluation succeeds, the feature is
3646 included. Here is a short explanation of each option:
3648 * -release ........... Compile and link Qt with debugging turned off.
3649 -debug ............. Compile and link Qt with debugging turned on.
3650 -debug-and-release . Compile and link two versions of Qt, with and without
3651 debugging turned on (Mac only).
3653 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3655 -opensource ........ Compile and link the Open-Source Edition of Qt.
3656 -commercial ........ Compile and link the Commercial Edition of Qt.
3659 * -shared ............ Create and use shared Qt libraries.
3660 -static ............ Create and use static Qt libraries.
3662 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3664 -fast .............. Configure Qt quickly by generating Makefiles only for
3665 library and subdirectory targets. All other Makefiles
3666 are created as wrappers, which will in turn run qmake.
3668 -no-largefile ...... Disables large file support.
3669 + -largefile ......... Enables Qt to access files larger than 4 GB.
3672 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3679 if [ "$CFG_DBUS" = "no" ]; then
3688 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3689 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3691 -no-accessibility .. Do not compile Accessibility support.
3692 * -accessibility ..... Compile Accessibility support.
3694 $SHN -no-stl ............ Do not compile STL support.
3695 $SHY -stl ............... Compile STL support.
3697 -no-sql-<driver> ... Disable SQL <driver> entirely.
3698 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3700 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3703 Possible values for <driver>:
3704 [ $CFG_SQL_AVAILABLE ]
3706 -system-sqlite ..... Use sqlite from the operating system.
3708 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3709 + -xmlpatterns ....... Build the QtXmlPatterns module.
3710 QtXmlPatterns is built if a decent C++ compiler
3711 is used and exceptions are enabled.
3713 -no-multimedia ..... Do not build the QtMultimedia module.
3714 + -multimedia ........ Build the QtMultimedia module.
3716 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3717 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3719 -no-phonon ......... Do not build the Phonon module.
3720 + -phonon ............ Build the Phonon module.
3721 Phonon is built if a decent C++ compiler is used.
3722 -no-phonon-backend.. Do not build the platform phonon plugin.
3723 + -phonon-backend..... Build the platform phonon plugin.
3725 -no-svg ............ Do not build the SVG module.
3726 + -svg ............... Build the SVG module.
3728 -no-webkit ......... Do not build the WebKit module.
3729 + -webkit ............ Build the WebKit module.
3730 WebKit is built if a decent C++ compiler is used.
3731 -webkit-debug ...... Build the WebKit module with debug symbols.
3733 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3734 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3736 -no-script ......... Do not build the QtScript module.
3737 + -script ............ Build the QtScript module.
3739 -no-scripttools .... Do not build the QtScriptTools module.
3740 + -scripttools ....... Build the QtScriptTools module.
3742 -no-v8 ............. Do not build the V8 module.
3743 + -v8 ................ Build the V8 module.
3745 -no-declarative ..... Do not build the declarative module.
3746 + -declarative ....... Build the declarative module.
3748 -no-declarative-debug ..... Do not build the declarative debugging support.
3749 + -declarative-debug ....... Build the declarative debugging support.
3751 -no-location ....... Do not build the QtLocation module.
3752 + -location .......... Build the QtLocation module.
3754 -platform target ... The operating system and compiler you are building
3757 See the README file for a list of supported
3758 operating systems and compilers.
3761 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3763 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3764 raster - Software rasterizer
3765 opengl - Rendering via OpenGL, Experimental!
3766 openvg - Rendering via OpenVG, Experimental!
3773 -no-mmx ............ Do not compile with use of MMX instructions.
3774 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3775 -no-sse ............ Do not compile with use of SSE instructions.
3776 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3777 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3778 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3779 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3780 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3781 -no-avx ............ Do not compile with use of AVX instructions.
3782 -no-neon ........... Do not compile with use of NEON instructions.
3784 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3785 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3787 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3789 -D <string> ........ Add an explicit define to the preprocessor.
3790 -I <string> ........ Add an explicit include path.
3791 -L <string> ........ Add an explicit library path.
3793 -help, -h .......... Display this information.
3795 Third Party Libraries:
3797 -qt-zlib ........... Use the zlib bundled with Qt.
3798 + -system-zlib ....... Use zlib from the operating system.
3799 See http://www.gzip.org/zlib
3801 -no-gif ............ Do not compile GIF reading support.
3803 -no-libtiff ........ Do not compile TIFF support.
3804 -qt-libtiff ........ Use the libtiff bundled with Qt.
3805 + -system-libtiff .... Use libtiff from the operating system.
3806 See http://www.libtiff.org
3808 -no-libpng ......... Do not compile PNG support.
3809 -qt-libpng ......... Use the libpng bundled with Qt.
3810 + -system-libpng ..... Use libpng from the operating system.
3811 See http://www.libpng.org/pub/png
3813 -no-libmng ......... Do not compile MNG support.
3814 -qt-libmng ......... Use the libmng bundled with Qt.
3815 + -system-libmng ..... Use libmng from the operating system.
3816 See http://www.libmng.com
3818 -no-libjpeg ........ Do not compile JPEG support.
3819 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3820 + -system-libjpeg .... Use libjpeg from the operating system.
3821 See http://www.ijg.org
3823 -no-openssl ........ Do not compile support for OpenSSL.
3824 + -openssl ........... Enable run-time OpenSSL support.
3825 -openssl-linked .... Enabled linked OpenSSL support.
3829 -make <part> ....... Add part to the list of parts to be built at make time.
3830 ($QT_DEFAULT_BUILD_PARTS)
3831 -nomake <part> ..... Exclude part from the list of parts to be built.
3833 -R <string> ........ Add an explicit runtime library path to the Qt
3835 -l <string> ........ Add an explicit library.
3837 -no-rpath .......... Do not use the library install path as a runtime
3839 + -rpath ............. Link Qt libraries and executables using the library
3840 install path as a runtime library path. Equivalent
3841 to -R install_libpath
3843 -continue .......... Continue as far as possible if an error occurs.
3845 -verbose, -v ....... Print verbose information about each step of the
3848 -silent ............ Reduce the build output so that warnings and errors
3849 can be seen more easily.
3851 * -no-optimized-qmake ... Do not build qmake optimized.
3852 -optimized-qmake ...... Build qmake optimized.
3854 -no-gui ............ Don't build the Qt GUI library
3856 $NSN -no-nis ............ Do not compile NIS support.
3857 $NSY -nis ............... Compile NIS support.
3859 $CUN -no-cups ........... Do not compile CUPS support.
3860 $CUY -cups .............. Compile CUPS support.
3861 Requires cups/cups.h and libcups.so.2.
3863 $CIN -no-iconv .......... Do not compile support for iconv(3).
3864 $CIY -iconv ............. Compile support for iconv(3).
3866 $PHN -no-pch ............ Do not use precompiled header support.
3867 $PHY -pch ............... Use precompiled header support.
3869 $DBN -no-dbus ........... Do not compile the QtDBus module.
3870 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3871 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3873 -reduce-relocations ..... Reduce relocations in the libraries through extra
3874 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3875 experimental; needs GNU ld >= 2.18).
3877 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3881 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3882 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3889 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3897 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3901 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3902 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3904 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3905 $XCBY -xcb ............... Compile Xcb support.
3907 $XWN -no-wayland......... Do not compile Wayland support.
3908 $XWY -wayland .......... Compile Wayland support.
3914 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3918 $X2N -no-xinput2......... Do not compile XInput2 support.
3919 $X2Y -xinput2............ Compile XInput2 support.
3925 if [ "$PLATFORM_X11" = "yes" ]; then
3926 if [ "$CFG_SM" = "no" ]; then
3933 if [ "$CFG_XSHAPE" = "no" ]; then
3940 if [ "$CFG_XVIDEO" = "no" ]; then
3947 if [ "$CFG_XINERAMA" = "no" ]; then
3954 if [ "$CFG_FONTCONFIG" = "no" ]; then
3961 if [ "$CFG_XCURSOR" = "no" ]; then
3968 if [ "$CFG_XFIXES" = "no" ]; then
3975 if [ "$CFG_XRANDR" = "no" ]; then
3982 if [ "$CFG_XRENDER" = "no" ]; then
3989 if [ "$CFG_MITSHM" = "no" ]; then
3996 if [ "$CFG_XINPUT" = "no" ]; then
4003 if [ "$CFG_XKB" = "no" ]; then
4010 if [ "$CFG_IM" = "no" ]; then
4021 -no-gtkstyle ....... Do not build the GTK theme integration.
4022 + -gtkstyle .......... Build the GTK theme integration.
4024 * -no-nas-sound ...... Do not compile in NAS sound support.
4025 -system-nas-sound .. Use NAS libaudio from the operating system.
4026 See http://radscan.com/nas.html
4028 -egl ............... Use EGL instead of GLX to manage contexts.
4029 When building for desktop OpenGL, this option will
4030 make Qt use EGL to manage contexts rather than the
4031 GLX, which is the default. Note: For OpenGL ES, EGL
4034 -no-opengl ......... Do not support OpenGL.
4035 + -opengl <api> ...... Enable OpenGL support.
4036 With no parameter, this will auto-detect the "best"
4037 OpenGL API to use. If desktop OpenGL is available, it
4038 will be used. Use desktop or es2 for <api>
4039 to force the use of the Desktop OpenGL or
4040 OpenGL ES 2 APIs instead.
4042 -no-openvg ........ Do not support OpenVG.
4043 + -openvg ........... Enable OpenVG support.
4044 Requires EGL support, typically supplied by an OpenGL
4045 or other graphics implementation.
4047 $SMN -no-sm ............. Do not support X Session Management.
4048 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4050 $SHN -no-xshape ......... Do not compile XShape support.
4051 $SHY -xshape ............ Compile XShape support.
4052 Requires X11/extensions/shape.h.
4054 $XVN -no-xvideo ......... Do not compile XVideo support.
4055 $XVY -xvideo ............ Compile XVideo support.
4056 Requires X11/extensions/Xv.h & Xvlib.h.
4058 $SHN -no-xsync .......... Do not compile XSync support.
4059 $SHY -xsync ............. Compile XSync support.
4060 Requires X11/extensions/sync.h.
4062 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4063 $XAY -xinerama .......... Compile Xinerama support.
4064 Requires X11/extensions/Xinerama.h and libXinerama.
4065 By default, Xinerama support will be compiled if
4066 available and the shared libraries are dynamically
4069 $XCN -no-xcursor ........ Do not compile Xcursor support.
4070 $XCY -xcursor ........... Compile Xcursor support.
4071 Requires X11/Xcursor/Xcursor.h and libXcursor.
4072 By default, Xcursor support will be compiled if
4073 available and the shared libraries are dynamically
4076 $XFN -no-xfixes ......... Do not compile Xfixes support.
4077 $XFY -xfixes ............ Compile Xfixes support.
4078 Requires X11/extensions/Xfixes.h and libXfixes.
4079 By default, Xfixes support will be compiled if
4080 available and the shared libraries are dynamically
4083 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4084 $XZY -xrandr ............ Compile Xrandr support.
4085 Requires X11/extensions/Xrandr.h and libXrandr.
4087 $XRN -no-xrender ........ Do not compile Xrender support.
4088 $XRY -xrender ........... Compile Xrender support.
4089 Requires X11/extensions/Xrender.h and libXrender.
4091 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4092 $XMY -mitshm ............ Compile MIT-SHM support.
4093 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4095 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4096 $FCGY -fontconfig ........ Compile FontConfig support.
4097 Requires fontconfig/fontconfig.h, libfontconfig,
4098 freetype.h and libfreetype.
4100 $XIN -no-xinput ......... Do not compile Xinput support.
4101 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4102 which requires IRIX with wacom.h and libXi or
4103 XFree86 with X11/extensions/XInput.h and libXi.
4105 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4106 $XKY -xkb ............... Compile XKB support.
4111 if [ "$BUILD_ON_MAC" = "yes" ]; then
4116 -Fstring ........... Add an explicit framework path.
4117 -fw string ......... Add an explicit framework.
4119 * -framework ......... Build Qt as a series of frameworks and
4120 link tools against those frameworks.
4121 -no-framework ...... Do not build Qt as a series of frameworks.
4123 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4124 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4126 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
4127 Only one arch value can be specified.
4129 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4130 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4132 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4133 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4134 QT_ENABLE_HARFBUZZ environment variable.
4139 if [ "$PLATFORM_QWS" = "yes" ]; then
4141 Qt for Embedded Linux:
4143 -embedded <arch> .... This will enable the embedded build, you must have a
4144 proper license for this switch to work.
4145 Example values for <arch>: arm mips x86 generic
4149 if [ "$PLATFORM_QPA" = "yes" ]; then
4155 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4158 -xplatform target ... The target platform when cross-compiling.
4160 -no-feature-<feature> Do not compile in <feature>.
4161 -feature-<feature> .. Compile in <feature>. The available features
4162 are described in src/corelib/global/qfeatures.txt
4164 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4165 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4167 The floating point format is usually autodetected by configure. Use this
4168 to override the detected value.
4170 -little-endian ...... Target platform is little endian (LSB first).
4171 -big-endian ......... Target platform is big endian (MSB first).
4173 -host-little-endian . Host platform is little endian (LSB first).
4174 -host-big-endian .... Host platform is big endian (MSB first).
4176 You only need to specify the endianness when
4177 cross-compiling, otherwise the host
4178 endianness will be used.
4180 -no-freetype ........ Do not compile in Freetype2 support.
4181 -qt-freetype ........ Use the libfreetype bundled with Qt.
4182 * -system-freetype .... Use libfreetype from the operating system.
4183 See http://www.freetype.org/
4185 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4186 default ($CFG_QCONFIG).
4188 -no-opengl .......... Do not support OpenGL.
4189 -opengl <api> ....... Enable OpenGL ES support
4190 With no parameter, this will attempt to auto-detect
4191 OpenGL ES 2, or regular desktop OpenGL.
4192 Use es2 for <api> to override auto-detection.
4196 if [ "$PLATFORM_QWS" = "yes" ]; then
4199 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4200 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4202 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4203 by default all available decorations are on.
4204 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4205 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4206 linked to at run time.
4207 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4208 -no-decoration-<style> ....Disable decoration <style> entirely.
4209 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4211 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4212 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4213 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4214 linked to at run time.
4215 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4216 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4217 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4219 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4220 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4222 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4224 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4226 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4227 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4229 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4230 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4231 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4233 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4234 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4235 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4237 -iwmmxt ............ Compile using the iWMMXt instruction set
4238 (available on some XScale CPUs).
4242 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4243 if [ "$CFG_GLIB" = "no" ]; then
4251 $GBN -no-glib ........... Do not compile Glib support.
4252 $GBY -glib .............. Compile Glib support.
4257 [ "x$ERROR" = "xyes" ] && exit 1
4262 # -----------------------------------------------------------------------------
4263 # LICENSING, INTERACTIVE PART
4264 # -----------------------------------------------------------------------------
4266 if [ "$PLATFORM_QWS" = "yes" ]; then
4267 Platform="Qt for Embedded Linux"
4268 elif [ "$PLATFORM_QPA" = "yes" ]; then
4269 Platform="Qt Lighthouse"
4270 elif [ "$PLATFORM_MAC" = "yes" ]; then
4271 Platform="Qt for Mac OS X"
4272 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4273 Platform="Qt for Windows"
4274 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4276 Platform="Qt for Linux/X11"
4280 echo "This is the $Platform ${EditionString} Edition."
4283 if [ "$Edition" = "OpenSource" ]; then
4285 echo "You are licensed to use this software under the terms of"
4286 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4287 if [ -f "$relpath/LICENSE.GPL3" ]; then
4288 echo "You are also licensed to use this software under the terms of"
4289 echo "the GNU General Public License (GPL) versions 3."
4295 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4296 echo "You have already accepted the terms of the $LicenseType license."
4299 if [ -f "$relpath/LICENSE.GPL3" ]; then
4300 echo "Type '3' to view the GNU General Public License version 3."
4302 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4303 echo "Type 'yes' to accept this license offer."
4304 echo "Type 'no' to decline this license offer."
4306 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4310 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4312 elif [ "$acceptance" = "no" ]; then
4313 echo "You are not licensed to use this software."
4316 elif [ "$acceptance" = "3" ]; then
4317 more "$relpath/LICENSE.GPL3"
4318 elif [ "$acceptance" = "L" ]; then
4319 more "$relpath/LICENSE.LGPL"
4322 elif [ "$Edition" = "Preview" ]; then
4323 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4326 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4327 echo "You have already accepted the terms of the $LicenseType license."
4330 echo "You are licensed to use this software under the terms of"
4331 echo "the $TheLicense"
4333 echo "Type '?' to read the Preview License."
4334 echo "Type 'yes' to accept this license offer."
4335 echo "Type 'no' to decline this license offer."
4337 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4341 if [ "$acceptance" = "yes" ]; then
4343 elif [ "$acceptance" = "no" ] ;then
4344 echo "You are not licensed to use this software."
4347 elif [ "$acceptance" = "?" ]; then
4348 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4351 elif [ "$Edition" != "OpenSource" ]; then
4352 if [ -n "$ExpiryDate" ]; then
4353 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4354 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4355 Today=`date +%Y%m%d`
4356 if [ "$Today" -gt "$ExpiryDate" ]; then
4357 case "$LicenseType" in
4358 Commercial|Academic|Educational)
4359 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4361 echo "NOTICE NOTICE NOTICE NOTICE"
4363 echo " Your support and upgrade period has expired."
4365 echo " You are no longer licensed to use this version of Qt."
4366 echo " Please contact qt-info@nokia.com to renew your support"
4367 echo " and upgrades for this license."
4369 echo "NOTICE NOTICE NOTICE NOTICE"
4374 echo "WARNING WARNING WARNING WARNING"
4376 echo " Your support and upgrade period has expired."
4378 echo " You may continue to use your last licensed release"
4379 echo " of Qt under the terms of your existing license"
4380 echo " agreement. But you are not entitled to technical"
4381 echo " support, nor are you entitled to use any more recent"
4382 echo " Qt releases."
4384 echo " Please contact qt-info@nokia.com to renew your"
4385 echo " support and upgrades for this license."
4387 echo "WARNING WARNING WARNING WARNING"
4394 echo "NOTICE NOTICE NOTICE NOTICE"
4396 echo " Your Evaluation license has expired."
4398 echo " You are no longer licensed to use this software. Please"
4399 echo " contact qt-info@nokia.com to purchase license, or install"
4400 echo " the Qt Open Source Edition if you intend to develop free"
4403 echo "NOTICE NOTICE NOTICE NOTICE"
4410 TheLicense=`head -n 1 "$outpath/LICENSE"`
4412 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4413 echo "You have already accepted the terms of the $TheLicense."
4416 echo "You are licensed to use this software under the terms of"
4417 echo "the $TheLicense."
4419 echo "Type '?' to view the $TheLicense."
4420 echo "Type 'yes' to accept this license offer."
4421 echo "Type 'no' to decline this license offer."
4423 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4427 if [ "$acceptance" = "yes" ]; then
4429 elif [ "$acceptance" = "no" ]; then
4430 echo "You are not licensed to use this software."
4433 else [ "$acceptance" = "?" ]
4434 more "$outpath/LICENSE"
4439 # this should be moved somewhere else
4442 AIX_VERSION=`uname -v`
4443 if [ "$AIX_VERSION" -lt "5" ]; then
4444 QMakeVar add QMAKE_LIBS_X11 -lbind
4451 #-------------------------------------------------------------------------------
4452 # generate qconfig.cpp
4453 #-------------------------------------------------------------------------------
4454 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4456 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4457 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4458 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4459 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4460 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4461 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4462 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4463 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4464 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4465 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4466 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4467 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4468 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4469 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4471 TODAY=`date +%Y-%m-%d`
4472 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4474 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4475 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4477 /* Installation date */
4478 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4482 if [ ! -z "$QT_HOST_PREFIX" ]; then
4483 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4484 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4485 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4486 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4487 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4488 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4489 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4490 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4491 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4492 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4493 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4494 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4496 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4498 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4499 /* Installation Info */
4500 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4501 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4502 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4503 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4504 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4505 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4506 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4507 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4508 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4509 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4510 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4511 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4512 #else // QT_BOOTSTRAPPED
4516 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4517 /* Installation Info */
4518 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4519 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4520 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4521 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4522 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4523 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4524 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4525 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4526 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4527 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4528 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4529 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4532 if [ ! -z "$QT_HOST_PREFIX" ]; then
4533 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4534 #endif // QT_BOOTSTRAPPED
4539 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4540 /* strlen( "qt_lcnsxxxx" ) == 12 */
4541 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4542 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4543 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4544 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4545 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4546 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4547 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4548 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4549 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4550 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4551 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4552 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4553 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4554 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4557 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4558 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4559 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4561 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4562 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4563 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4566 # -----------------------------------------------------------------------------
4567 if [ "$LicenseType" = "Evaluation" ]; then
4568 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4569 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4570 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4573 if [ -n "$EVALKEY" ]; then
4574 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4575 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4576 /* Evaluation license key */
4577 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4579 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4583 # -----------------------------------------------------------------------------
4585 # -----------------------------------------------------------------------------
4588 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4590 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4591 if [ "$OPT_SHADOW" = "yes" ]; then
4592 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4593 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4594 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4599 # $2: optional transformation
4600 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4601 # is where the resulting variable is written to
4602 # Assumes that the optional transformation produces the same variable name for each hit
4603 setBootstrapVariable()
4605 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4611 valStart = index($0, "=") + 1
4614 if (substr($0, valStart - 2, 1) == "+") {
4618 variable = substr($0, 0, valStart - 2 - append)
4619 value = substr($0, valStart)
4620 gsub("[ \t]+", "", variable)
4621 gsub("^[ \t]+", "", value)
4622 gsub("[ \t]+$", "", value)
4624 if (append == 1 && length(combinedValue) > 0) {
4625 combinedValue = combinedValue " " value
4627 combinedValue = value
4631 if (length(combinedValue) > 0) {
4632 printf "%s = %s\n", variable, combinedValue
4638 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4639 echo "Creating qmake. Please wait..."
4642 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4643 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4644 if [ -f "$QCONFIG_H" ]; then
4645 OLD_QCONFIG_H=$QCONFIG_H
4646 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4649 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4650 # when building qmake, we use #defines for the install paths,
4651 # however they are real functions in the library
4652 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4653 mkdir -p "$outpath/src/corelib/global"
4654 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4655 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4658 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4660 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4661 rm -rf mkspecs/default
4662 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4664 for mkfile in GNUmakefile Makefile; do
4667 in_mkfile="${mkfile}.in"
4668 if [ "$mkfile" = "Makefile" ]; then
4669 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4670 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4672 in_mkfile="${mkfile}.unix"
4674 in_mkfile="$relpath/qmake/$in_mkfile"
4675 mkfile="$outpath/qmake/$mkfile"
4676 if [ -f "$mkfile" ]; then
4677 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4680 [ -f "$in_mkfile" ] || continue
4682 echo "########################################################################" > "$mkfile"
4683 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4684 echo "########################################################################" >> "$mkfile"
4687 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4688 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4689 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4691 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4692 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4695 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4696 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4697 if [ "$CFG_SILENT" = "yes" ]; then
4698 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4699 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4701 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4702 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4704 setBootstrapVariable QMAKE_CFLAGS
4705 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4706 setBootstrapVariable QMAKE_LFLAGS
4708 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4709 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4710 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4712 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4713 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4714 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4715 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4716 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4717 elif [ "$CFG_DEBUG" = "yes" ]; then
4718 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4719 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4720 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4721 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4724 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4725 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4726 for rpath in $RPATH_FLAGS; do
4727 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4730 if [ "$BUILD_ON_MAC" = "yes" ]; then
4731 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4732 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4733 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4734 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4735 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4736 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4737 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4738 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4739 if [ '!' -z "$CFG_SDK" ]; then
4740 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4741 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4742 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4743 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4744 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4747 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4748 if [ '!' -z "$D_FLAGS" ]; then
4749 for DEF in $D_FLAGS; do
4750 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4753 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4754 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4755 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4756 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4758 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4759 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4760 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4761 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4762 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4763 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4764 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4765 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4766 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4767 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4769 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4770 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4771 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4772 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4777 QMAKE_BUILD_ERROR=no
4778 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4779 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4780 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4781 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4784 #-------------------------------------------------------------------------------
4785 # tests that need qmake
4786 #-------------------------------------------------------------------------------
4788 # detect availability of float math.h functions
4789 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4790 CFG_USE_FLOATMATH=yes
4792 CFG_USE_FLOATMATH=no
4795 # detect mmx support
4796 if [ "${CFG_MMX}" = "auto" ]; then
4797 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4804 # detect 3dnow support
4805 if [ "${CFG_3DNOW}" = "auto" ]; then
4806 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4813 # detect sse support
4814 if [ "${CFG_SSE}" = "auto" ]; then
4815 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4822 # detect sse2 support
4823 if [ "${CFG_SSE2}" = "auto" ]; then
4824 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4831 # detect sse3 support
4832 if [ "${CFG_SSE3}" = "auto" ]; then
4833 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4840 # detect ssse3 support
4841 if [ "${CFG_SSSE3}" = "auto" ]; then
4842 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4849 # detect sse4.1 support
4850 if [ "${CFG_SSE4_1}" = "auto" ]; then
4851 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
4858 # detect sse4.2 support
4859 if [ "${CFG_SSE4_2}" = "auto" ]; then
4860 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
4867 # detect avx support
4868 if [ "${CFG_AVX}" = "auto" ]; then
4869 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4876 # check iWMMXt support
4877 if [ "$CFG_IWMMXT" = "yes" ]; then
4878 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4879 if [ $? != "0" ]; then
4880 echo "The iWMMXt functionality test failed!"
4881 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4886 # detect neon support
4887 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4888 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
4895 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4898 if [ "$CFG_ZLIB" = "no" ]; then
4899 # Note: Qt no longer support builds without zlib
4900 # So we force a "no" to be "auto" here.
4901 # If you REALLY really need no zlib support, you can still disable
4902 # it by doing the following:
4903 # add "no-zlib" to mkspecs/qconfig.pri
4904 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4906 # There's no guarantee that Qt will build under those conditions
4911 if [ "$CFG_ZLIB" = "auto" ]; then
4912 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
4919 if [ "$CFG_LARGEFILE" = "auto" ]; then
4920 #Large files should be enabled for all Linux systems
4924 # detect how jpeg should be built
4925 if [ "$CFG_JPEG" = "auto" ]; then
4926 if [ "$CFG_SHARED" = "yes" ]; then
4933 if [ "$CFG_LIBJPEG" = "auto" ]; then
4934 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
4941 # detect how gif should be built
4942 if [ "$CFG_GIF" = "auto" ]; then
4943 if [ "$CFG_SHARED" = "yes" ]; then
4950 # detect how tiff should be built
4951 if [ "$CFG_TIFF" = "auto" ]; then
4952 if [ "$CFG_SHARED" = "yes" ]; then
4960 if [ "$CFG_LIBTIFF" = "auto" ]; then
4961 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
4968 # detect how mng should be built
4969 if [ "$CFG_MNG" = "auto" ]; then
4970 if [ "$CFG_SHARED" = "yes" ]; then
4977 if [ "$CFG_LIBMNG" = "auto" ]; then
4978 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
4986 if [ "$CFG_LIBPNG" = "auto" ]; then
4987 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
4994 # detect accessibility
4995 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4996 CFG_ACCESSIBILITY=yes
4999 # auto-detect SQL-modules support
5000 for _SQLDR in $CFG_SQL_AVAILABLE; do
5003 if [ "$CFG_SQL_mysql" != "no" ]; then
5004 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5005 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5006 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5007 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5008 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5009 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5010 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5012 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5013 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5014 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5015 echo " You need MySql 4 or higher."
5016 echo " If you believe this message is in error you may use the continue"
5017 echo " switch (-continue) to $0 to continue."
5022 QT_LFLAGS_MYSQL_R=""
5026 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
5027 QMakeVar add CONFIG use_libmysqlclient_r
5028 if [ "$CFG_SQL_mysql" = "auto" ]; then
5029 CFG_SQL_mysql=plugin
5031 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5032 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
5033 if [ "$CFG_SQL_mysql" = "auto" ]; then
5034 CFG_SQL_mysql=plugin
5037 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5038 echo "MySQL support cannot be enabled due to functionality tests!"
5039 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5040 echo " If you believe this message is in error you may use the continue"
5041 echo " switch (-continue) to $0 to continue."
5046 QT_LFLAGS_MYSQL_R=""
5054 if [ "$CFG_SQL_psql" != "no" ]; then
5055 # Be careful not to use native pg_config when cross building.
5056 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5057 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5058 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5060 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5061 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5062 # But, respect PSQL_LIBS if set
5063 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5064 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
5065 if [ "$CFG_SQL_psql" = "auto" ]; then
5069 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5070 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5071 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5072 echo " If you believe this message is in error you may use the continue"
5073 echo " switch (-continue) to $0 to continue."
5084 if [ "$CFG_SQL_odbc" != "no" ]; then
5085 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
5086 if [ "$CFG_SQL_odbc" = "auto" ]; then
5090 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
5091 QT_LFLAGS_ODBC="-liodbc"
5092 if [ "$CFG_SQL_odbc" = "auto" ]; then
5096 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5097 echo "ODBC support cannot be enabled due to functionality tests!"
5098 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5099 echo " If you believe this message is in error you may use the continue"
5100 echo " switch (-continue) to $0 to continue."
5110 if [ "$CFG_SQL_oci" != "no" ]; then
5111 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
5112 if [ "$CFG_SQL_oci" = "auto" ]; then
5116 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5117 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5118 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5119 echo " If you believe this message is in error you may use the continue"
5120 echo " switch (-continue) to $0 to continue."
5129 if [ "$CFG_SQL_tds" != "no" ]; then
5130 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5131 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5132 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
5133 if [ "$CFG_SQL_tds" = "auto" ]; then
5137 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5138 echo "TDS support cannot be enabled due to functionality tests!"
5139 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5140 echo " If you believe this message is in error you may use the continue"
5141 echo " switch (-continue) to $0 to continue."
5150 if [ "$CFG_SQL_db2" != "no" ]; then
5151 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
5152 if [ "$CFG_SQL_db2" = "auto" ]; then
5156 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5157 echo "ODBC support cannot be enabled due to functionality tests!"
5158 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5159 echo " If you believe this message is in error you may use the continue"
5160 echo " switch (-continue) to $0 to continue."
5169 if [ "$CFG_SQL_ibase" != "no" ]; then
5170 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
5171 if [ "$CFG_SQL_ibase" = "auto" ]; then
5172 CFG_SQL_ibase=plugin
5175 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5176 echo "InterBase support cannot be enabled due to functionality tests!"
5177 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5178 echo " If you believe this message is in error you may use the continue"
5179 echo " switch (-continue) to $0 to continue."
5188 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5189 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
5190 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5191 CFG_SQL_sqlite2=plugin
5194 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5195 echo "SQLite2 support cannot be enabled due to functionality tests!"
5196 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5197 echo " If you believe this message is in error you may use the continue"
5198 echo " switch (-continue) to $0 to continue."
5207 if [ "$CFG_SQL_sqlite" != "no" ]; then
5208 SQLITE_AUTODETECT_FAILED="no"
5209 if [ "$CFG_SQLITE" = "system" ]; then
5210 if [ -n "$PKG_CONFIG" ]; then
5211 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5212 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5214 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
5215 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5216 CFG_SQL_sqlite=plugin
5218 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5220 SQLITE_AUTODETECT_FAILED="yes"
5223 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5224 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5225 CFG_SQL_sqlite=plugin
5228 SQLITE_AUTODETECT_FAILED="yes"
5232 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5233 echo "SQLite support cannot be enabled due to functionality tests!"
5234 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5235 echo " If you believe this message is in error you may use the continue"
5236 echo " switch (-continue) to $0 to continue."
5242 if [ "$OPT_VERBOSE" = "yes" ]; then
5243 echo "unknown SQL driver: $_SQLDR"
5249 # auto-detect NIS support
5250 if [ "$CFG_NIS" != "no" ]; then
5251 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
5254 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5255 echo "NIS support cannot be enabled due to functionality tests!"
5256 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5257 echo " If you believe this message is in error you may use the continue"
5258 echo " switch (-continue) to $0 to continue."
5266 # auto-detect CUPS support
5267 if [ "$CFG_CUPS" != "no" ]; then
5268 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
5271 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5272 echo "Cups support cannot be enabled due to functionality tests!"
5273 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5274 echo " If you believe this message is in error you may use the continue"
5275 echo " switch (-continue) to $0 to continue."
5283 # auto-detect iconv(3) support
5284 if [ "$CFG_ICONV" != "no" ]; then
5285 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5287 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
5289 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
5291 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
5294 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5295 echo "Iconv support cannot be enabled due to functionality tests!"
5296 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5297 echo " If you believe this message is in error you may use the continue"
5298 echo " switch (-continue) to $0 to continue."
5306 # auto-detect libdbus-1 support
5307 if [ "$CFG_DBUS" != "no" ]; then
5308 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5309 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5310 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5312 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
5313 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5314 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5315 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5317 if [ "$CFG_DBUS" = "auto" ]; then
5319 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5320 # CFG_DBUS is "yes" or "linked" here
5322 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5323 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5324 echo " If you believe this message is in error you may use the continue"
5325 echo " switch (-continue) to $0 to continue."
5331 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5332 CFG_MULTIMEDIA="$CFG_GUI"
5335 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5336 echo "QtMultimedia requested, but it can't be built without QtGui"
5340 # X11/QWS/Lighthouse
5341 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5343 # auto-detect Glib support
5344 if [ "$CFG_GLIB" != "no" ]; then
5345 if [ -n "$PKG_CONFIG" ]; then
5346 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5347 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5349 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
5351 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5352 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5354 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5355 echo "Glib support cannot be enabled due to functionality tests!"
5356 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5357 echo " If you believe this message is in error you may use the continue"
5358 echo " switch (-continue) to $0 to continue."
5366 if [ "$CFG_GUI" = "no" ]; then
5367 if [ "$CFG_PHONON" = "auto" ]; then
5370 if [ "$CFG_PHONON" != "no" ]; then
5371 echo "Phonon enabled, but GUI disabled."
5372 echo " You might need to either enable the GUI or disable Phonon"
5377 # Auto-detect GStreamer support (needed for Phonon)
5378 if [ "$CFG_PHONON" != "no" ]; then
5379 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5380 if [ -n "$PKG_CONFIG" ]; then
5381 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5382 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5384 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
5386 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5387 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5389 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5390 echo "Gstreamer support cannot be enabled due to functionality tests!"
5391 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5392 echo " If you believe this message is in error you may use the continue"
5393 echo " switch (-continue) to $0 to continue."
5399 elif [ "$CFG_GLIB" = "no" ]; then
5406 if [ "$CFG_PHONON" != "no" ]; then
5407 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5408 if [ "$CFG_GSTREAMER" = "yes" ]; then
5411 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5412 echo "Phonon support cannot be enabled due to functionality tests!"
5413 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5414 echo " If you believe this message is in error you may use the continue"
5415 echo " switch (-continue) to $0 to continue."
5426 # auto-detect libicu support
5427 if [ "$CFG_ICU" != "no" ]; then
5428 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5429 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5431 if [ "$CFG_ICU" = "auto" ]; then
5433 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5436 echo "The ICU library support cannot be enabled."
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."
5445 # Auto-detect PulseAudio support
5446 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5447 if [ -n "$PKG_CONFIG" ]; then
5448 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5449 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5451 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
5453 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5454 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5456 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5457 echo "PulseAudio support cannot be enabled due to functionality tests!"
5458 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5459 echo " If you believe this message is in error you may use the continue"
5460 echo " switch (-continue) to $0 to continue."
5467 fi # X11/QWS/Lighthouse
5470 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5471 x11tests="$relpath/config.tests/x11"
5474 # work around broken X11 headers when using GCC 2.95 or later
5476 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5477 if [ $NOTYPE = "yes" ]; then
5478 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5479 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5482 # Check we actually have X11 :-)
5483 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5484 if [ $? != "0" ]; then
5485 echo "Basic XLib functionality test failed!"
5486 echo " You might need to modify the include and library search paths by editing"
5487 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5493 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5494 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5495 if [ "$CFG_GUI" = "no" ]; then
5496 if [ "$CFG_OPENGL" = "auto" ]; then
5499 if [ "$CFG_OPENGL" != "no" ]; then
5500 echo "OpenGL enabled, but GUI disabled."
5501 echo " You might need to either enable the GUI or disable OpenGL"
5505 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5506 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
5508 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
5510 if [ "$CFG_EGL" = "no" ]; then
5514 if [ "$CFG_OPENGL" = "yes" ]; then
5515 echo "All the OpenGL functionality tests failed!"
5516 echo " You might need to modify the include and library search paths by editing"
5517 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5518 echo " ${XQMAKESPEC}."
5525 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5526 if [ "$CFG_OPENGL" = "desktop" ]; then
5527 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5528 if [ $? != "0" ]; then
5529 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5536 elif [ "$CFG_OPENGL" = "es2" ]; then
5538 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5539 if [ $? != "0" ]; then
5540 echo "The OpenGL ES 2.0 functionality test failed!"
5541 echo " You might need to modify the include and library search paths by editing"
5542 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5543 echo " ${XQMAKESPEC}."
5546 elif [ "$CFG_OPENGL" = "desktop" ]; then
5547 # Desktop OpenGL support
5548 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5549 if [ $? != "0" ]; then
5550 echo "The OpenGL functionality test failed!"
5551 echo " You might need to modify the include and library search paths by editing"
5552 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5553 echo " ${XQMAKESPEC}."
5558 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5559 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5560 if [ $? != "0" ]; then
5561 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5568 fi # X11/MINGW OpenGL
5571 if [ "$PLATFORM_X11" = "yes" ]; then
5572 # auto-detect Xcursor support
5573 if [ "$CFG_XCURSOR" != "no" ]; then
5574 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
5575 if [ "$CFG_XCURSOR" != "runtime" ]; then
5579 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5580 echo "Xcursor support cannot be enabled due to functionality tests!"
5581 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5582 echo " If you believe this message is in error you may use the continue"
5583 echo " switch (-continue) to $0 to continue."
5591 # auto-detect Xfixes support
5592 if [ "$CFG_XFIXES" != "no" ]; then
5593 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5594 if [ "$CFG_XFIXES" != "runtime" ]; then
5598 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5599 echo "Xfixes support cannot be enabled due to functionality tests!"
5600 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5601 echo " If you believe this message is in error you may use the continue"
5602 echo " switch (-continue) to $0 to continue."
5610 # auto-detect Xrandr support (resize and rotate extension)
5611 if [ "$CFG_XRANDR" != "no" ]; then
5612 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
5613 if [ "$CFG_XRANDR" != "runtime" ]; then
5617 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5618 echo "Xrandr support cannot be enabled due to functionality tests!"
5619 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5620 echo " If you believe this message is in error you may use the continue"
5621 echo " switch (-continue) to $0 to continue."
5629 # auto-detect Xrender support
5630 if [ "$CFG_XRENDER" != "no" ]; then
5631 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
5634 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5635 echo "Xrender support cannot be enabled due to functionality tests!"
5636 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5637 echo " If you believe this message is in error you may use the continue"
5638 echo " switch (-continue) to $0 to continue."
5646 # Additional check to decide if WebKit support will be included
5647 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5648 echo "Warning: -no-xrender will disable the QtWebkit module."
5652 # auto-detect MIT-SHM support
5653 if [ "$CFG_MITSHM" != "no" ]; then
5654 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
5657 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5658 echo "MITSHM support cannot be enabled due to functionality tests!"
5659 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5660 echo " If you believe this message is in error you may use the continue"
5661 echo " switch (-continue) to $0 to continue."
5669 # auto-detect FontConfig support
5670 if [ "$CFG_FONTCONFIG" != "no" ]; then
5671 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5672 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5673 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5675 QT_CFLAGS_FONTCONFIG=
5676 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5678 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
5680 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5681 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5682 CFG_LIBFREETYPE=system
5684 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5685 echo "FontConfig support cannot be enabled due to functionality tests!"
5686 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5687 echo " If you believe this message is in error you may use the continue"
5688 echo " switch (-continue) to $0 to continue."
5696 # auto-detect Session Management support
5697 if [ "$CFG_SM" = "auto" ]; then
5698 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
5701 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5702 echo "Session Management support cannot be enabled due to functionality tests!"
5703 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5704 echo " If you believe this message is in error you may use the continue"
5705 echo " switch (-continue) to $0 to continue."
5713 # auto-detect SHAPE support
5714 if [ "$CFG_XSHAPE" != "no" ]; then
5715 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
5718 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5719 echo "XShape support cannot be enabled due to functionality tests!"
5720 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5721 echo " If you believe this message is in error you may use the continue"
5722 echo " switch (-continue) to $0 to continue."
5730 # auto-detect XVideo support
5731 if [ "$CFG_XVIDEO" != "no" ]; then
5732 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
5735 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5736 echo "XVideo support cannot be enabled due to functionality tests!"
5737 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5738 echo " If you believe this message is in error you may use the continue"
5739 echo " switch (-continue) to $0 to continue."
5747 # auto-detect XSync support
5748 if [ "$CFG_XSYNC" != "no" ]; then
5749 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
5752 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5753 echo "XSync support cannot be enabled due to functionality tests!"
5754 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5755 echo " If you believe this message is in error you may use the continue"
5756 echo " switch (-continue) to $0 to continue."
5764 # auto-detect Xinerama support
5765 if [ "$CFG_XINERAMA" != "no" ]; then
5766 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
5767 if [ "$CFG_XINERAMA" != "runtime" ]; then
5771 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5772 echo "Xinerama support cannot be enabled due to functionality tests!"
5773 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5774 echo " If you believe this message is in error you may use the continue"
5775 echo " switch (-continue) to $0 to continue."
5783 # auto-detect Xinput support
5784 if [ "$CFG_XINPUT" != "no" ]; then
5785 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
5786 if [ "$CFG_XINPUT" != "runtime" ]; then
5790 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5791 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5792 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5793 echo " If you believe this message is in error you may use the continue"
5794 echo " switch (-continue) to $0 to continue."
5802 # auto-detect XKB support
5803 if [ "$CFG_XKB" != "no" ]; then
5804 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
5807 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5808 echo "XKB support cannot be enabled due to functionality tests!"
5809 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5810 echo " If you believe this message is in error you may use the continue"
5811 echo " switch (-continue) to $0 to continue."
5819 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5820 if [ -n "$PKG_CONFIG" ]; then
5821 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5822 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5824 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5826 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5827 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5829 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5830 echo "Gtk theme support cannot be enabled due to functionality tests!"
5831 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5832 echo " If you believe this message is in error you may use the continue"
5833 echo " switch (-continue) to $0 to continue."
5839 elif [ "$CFG_GLIB" = "no" ]; then
5845 if [ "$PLATFORM_MAC" = "yes" ]; then
5846 if [ "$CFG_PHONON" != "no" ]; then
5847 # Always enable Phonon (unless it was explicitly disabled)
5851 if [ "$CFG_COREWLAN" = "auto" ]; then
5852 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
5861 if [ "$PLATFORM_QPA" = "yes" ]; then
5862 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5863 if [ "$CFG_ARCH" = "macosx" ]; then
5865 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5866 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
5868 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
5871 if [ "$CFG_OPENGL" = "yes" ]; then
5872 echo "All the OpenGL functionality tests failed!"
5873 echo " You might need to modify the include and library search paths by editing"
5874 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5875 echo " ${XQMAKESPEC}."
5880 elif [ "$CFG_OPENGL" = "es2" ]; then
5882 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5883 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
5884 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
5885 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5886 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5887 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5888 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5889 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5892 "$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
5893 if [ $? != "0" ]; then
5894 echo "The OpenGL ES 2.0 functionality test failed!"
5895 echo " You might need to modify the include and library search paths by editing"
5896 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5897 echo " ${XQMAKESPEC}."
5900 elif [ "$CFG_OPENGL" = "desktop" ]; then
5901 # Desktop OpenGL support
5902 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5903 if [ $? != "0" ]; then
5904 echo "The OpenGL functionality test failed!"
5905 echo " You might need to modify the include and library search paths by editing"
5906 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5907 echo " ${XQMAKESPEC}."
5912 # auto-detect FontConfig support
5913 if [ "$CFG_FONTCONFIG" != "no" ]; then
5914 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5915 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5916 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5918 QT_CFLAGS_FONTCONFIG=
5919 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5921 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
5922 QT_CONFIG="$QT_CONFIG fontconfig"
5923 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5924 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5925 CFG_LIBFREETYPE=system
5930 # Save these for a check later
5931 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5932 ORIG_CFG_XCB="$CFG_XCB"
5934 if [ "$CFG_WAYLAND" != "no" ]; then
5935 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5936 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5937 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5938 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
5939 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
5941 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
5943 QT_CONFIG="$QT_CONFIG wayland"
5944 elif [ "$CFG_WAYLAND" = "yes" ]; then
5945 echo "The Wayland functionality test failed!"
5949 QMakeVar add DEFINES QT_NO_WAYLAND
5953 # Check we actually have X11 :-)
5954 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
5955 QT_CONFIG="$QT_CONFIG xlib"
5958 # auto-detect Xrender support
5959 if [ "$CFG_XRENDER" != "no" ]; then
5960 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
5962 QT_CONFIG="$QT_CONFIG xrender"
5964 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5965 echo "Xrender support cannot be enabled due to functionality tests!"
5966 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5967 echo " If you believe this message is in error you may use the continue"
5968 echo " switch (-continue) to $0 to continue."
5976 if [ "$CFG_XCB" != "no" ]; then
5977 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
5979 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
5980 QT_CONFIG="$QT_CONFIG xcb-render"
5983 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
5985 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5988 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
5989 QT_CONFIG="$QT_CONFIG xcb-xlib"
5992 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5993 # auto-detect XInput2/Xinput support
5994 if [ "$CFG_XINPUT2" != "no" ]; then
5995 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
5999 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6000 echo "XInput2 support cannot be enabled due to functionality tests!"
6001 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6002 echo " If you believe this message is in error you may use the continue"
6003 echo " switch (-continue) to $0 to continue."
6012 if [ "$CFG_XCB" = "yes" ]; then
6013 echo "The XCB test failed!"
6014 echo " You might need to install dependency packages."
6015 echo " See src/plugins/platforms/xcb/README."
6019 QMakeVar add DEFINES QT_NO_XCB
6023 # Detect libxkbcommon
6024 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6025 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6026 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6027 if [ "$CFG_WAYLAND" = "yes" ]; then
6028 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6029 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6031 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6032 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6034 if [ "$CFG_WAYLAND" = "yes" ]; then
6035 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6037 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6040 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6041 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6042 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6043 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6044 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6045 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6046 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6049 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6050 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6051 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6052 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6055 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
6056 QT_CONFIG="$QT_CONFIG coreservices"
6058 QMakeVar add DEFINES QT_NO_CORESERVICES
6061 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
6062 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6063 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6064 echo "No QPA platform plugin enabled!"
6065 echo " If you really want to build without a QPA platform plugin you must pass"
6066 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6067 echo " cannot run GUI applications."
6077 if [ "$PLATFORM_QWS" = "yes" ]; then
6079 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6080 if [ "$CFG_GUI" = "no" ]; then
6081 if [ "$CFG_OPENGL" = "auto" ]; then
6084 if [ "$CFG_OPENGL" != "no" ]; then
6085 echo "OpenGL enabled, but GUI disabled."
6086 echo " You might need to either enable the GUI or disable OpenGL"
6090 if [ "$CFG_OPENGL" = "yes" ]; then
6092 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
6095 elif [ "$CFG_OPENGL" = "es2" ]; then
6097 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6098 if [ $? != "0" ]; then
6099 echo "The OpenGL ES 2.0 functionality test failed!"
6100 echo " You might need to modify the include and library search paths by editing"
6101 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6102 echo " ${XQMAKESPEC}."
6106 elif [ "$CFG_OPENGL" = "desktop" ]; then
6107 # Desktop OpenGL support
6108 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6113 if [ "$PLATFORM_QWS" = "yes" ]; then
6116 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6117 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6118 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6119 if [ $? != "0" ]; then
6120 echo "The Ahi screen driver functionality test failed!"
6121 echo " You might need to modify the include and library search paths by editing"
6122 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6123 echo " ${XQMAKESPEC}."
6128 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6129 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6130 if [ $? != "0" ]; then
6131 echo "The SVGAlib screen driver functionality test failed!"
6132 echo " You might need to modify the include and library search paths by editing"
6133 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6134 echo " ${XQMAKESPEC}."
6139 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6140 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6141 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6142 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6143 elif directfb-config --version >/dev/null 2>&1; then
6144 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6145 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6148 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6149 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6150 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6151 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6154 "$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
6155 if [ $? != "0" ]; then
6156 echo "The DirectFB screen driver functionality test failed!"
6157 echo " You might need to modify the include and library search paths by editing"
6158 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6159 echo " ${XQMAKESPEC}."
6167 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6168 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6169 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6170 if [ $? != "0" ]; then
6171 echo "The tslib functionality test failed!"
6172 echo " You might need to modify the include and library search paths by editing"
6173 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6174 echo " ${XQMAKESPEC}."
6183 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6184 if [ $? != "0" ]; then
6185 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6192 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6193 if [ "$CFG_EGL" != "no" ]; then
6194 # detect EGL support
6195 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
6196 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6201 if [ "$EGL_VARIANT" = "none" ]; then
6202 if [ "$CFG_EGL" = "yes" ]; then
6203 echo "The EGL functionality test failed!"
6204 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6205 echo " You might need to modify the include and library search paths by editing"
6206 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6207 echo " ${XQMAKESPEC}."
6211 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6212 if [ "$CFG_OPENGL" = "es2" ]; then
6219 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6222 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6223 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6224 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6225 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6226 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
6227 CFG_LIBFREETYPE=system
6233 if [ "$CFG_ENDIAN" = "auto" ]; then
6234 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6235 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6236 elif [ "$PLATFORM_MAC" = "yes" ]; then
6239 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6241 if [ "$F" -eq 0 ]; then
6242 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6243 elif [ "$F" -eq 1 ]; then
6244 CFG_ENDIAN="Q_BIG_ENDIAN"
6247 echo "The target system byte order could not be detected!"
6248 echo "Turn on verbose messaging (-v) to see the final report."
6249 echo "You can use the -little-endian or -big-endian switch to"
6250 echo "$0 to continue."
6256 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6257 if [ "$PLATFORM_MAC" = "yes" ]; then
6260 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6262 if [ "$F" -eq 0 ]; then
6263 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6264 elif [ "$F" -eq 1 ]; then
6265 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6268 echo "The host system byte order could not be detected!"
6269 echo "Turn on verbose messaging (-v) to see the final report."
6270 echo "You can use the -host-little-endian or -host-big-endian switch to"
6271 echo "$0 to continue."
6277 if [ "$CFG_ARMFPA" != "auto" ]; then
6278 if [ "$CFG_ARMFPA" = "yes" ]; then
6279 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6280 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6282 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6285 CFG_DOUBLEFORMAT="normal"
6290 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6291 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6292 CFG_DOUBLEFORMAT=normal
6294 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6296 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6297 CFG_DOUBLEFORMAT=normal
6298 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6299 CFG_DOUBLEFORMAT=normal
6300 elif [ "$F" -eq 10 ]; then
6301 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6302 elif [ "$F" -eq 11 ]; then
6303 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6304 elif [ "$F" -eq 12 ]; then
6305 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6307 elif [ "$F" -eq 13 ]; then
6308 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6312 echo "The system floating point format could not be detected."
6313 echo "This may cause data to be generated in a wrong format"
6314 echo "Turn on verbose messaging (-v) to see the final report."
6315 # we do not fail on this since this is a new test, and if it fails,
6316 # the old behavior should be correct in most cases
6317 CFG_DOUBLEFORMAT=normal
6323 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6327 if [ "$CFG_STL" != "no" ]; then
6328 if [ "$HAVE_STL" = "yes" ]; then
6331 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6332 echo "STL support cannot be enabled due to functionality tests!"
6333 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6334 echo " If you believe this message is in error you may use the continue"
6335 echo " switch (-continue) to $0 to continue."
6343 # detect POSIX clock_gettime()
6344 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6345 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
6346 CFG_CLOCK_GETTIME=yes
6348 CFG_CLOCK_GETTIME=no
6352 # detect POSIX monotonic clocks
6353 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6354 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
6355 CFG_CLOCK_MONOTONIC=yes
6357 CFG_CLOCK_MONOTONIC=no
6359 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6360 CFG_CLOCK_MONOTONIC=no
6364 if [ "$CFG_MREMAP" = "auto" ]; then
6365 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6372 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6373 if [ "$CFG_GETADDRINFO" != "no" ]; then
6374 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6377 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6378 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6379 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6380 echo " If you believe this message is in error you may use the continue"
6381 echo " switch (-continue) to $0 to continue."
6389 # find if the platform provides inotify
6390 if [ "$CFG_INOTIFY" != "no" ]; then
6391 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6394 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6395 echo "inotify support cannot be enabled due to functionality tests!"
6396 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6397 echo " If you believe this message is in error you may use the continue"
6398 echo " switch (-continue) to $0 to continue."
6406 # find if the platform provides if_nametoindex (ipv6 interface name support)
6407 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6408 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
6411 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6412 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6413 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6414 echo " If you believe this message is in error you may use the continue"
6415 echo " switch (-continue) to $0 to continue."
6423 # find if the platform provides getifaddrs (network interface enumeration)
6424 if [ "$CFG_GETIFADDRS" != "no" ]; then
6425 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6428 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6429 echo "getifaddrs support cannot be enabled due to functionality tests!"
6430 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6431 echo " If you believe this message is in error you may use the continue"
6432 echo " switch (-continue) to $0 to continue."
6441 if [ "$CFG_OPENSSL" != "no" ]; then
6442 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
6443 if [ "$CFG_OPENSSL" = "auto" ]; then
6447 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6448 echo "OpenSSL support cannot be enabled due to functionality tests!"
6449 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6450 echo " If you believe this message is in error you may use the continue"
6451 echo " switch (-continue) to $0 to continue."
6459 # detect OpenVG support
6460 if [ "$CFG_OPENVG" != "no" ]; then
6461 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
6462 if [ "$CFG_OPENVG" = "auto" ]; then
6465 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
6466 if [ "$CFG_OPENVG" = "auto" ]; then
6469 CFG_OPENVG_ON_OPENGL=yes
6470 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
6471 if [ "$CFG_OPENVG" = "auto" ]; then
6474 CFG_OPENVG_LC_INCLUDES=yes
6475 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
6476 if [ "$CFG_OPENVG" = "auto" ]; then
6479 CFG_OPENVG_LC_INCLUDES=yes
6480 CFG_OPENVG_ON_OPENGL=yes
6482 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6483 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6484 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6485 echo " If you believe this message is in error you may use the continue"
6486 echo " switch (-continue) to $0 to continue."
6492 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
6493 CFG_OPENVG_SHIVA=yes
6497 if [ "$CFG_ALSA" = "auto" ]; then
6498 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6505 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6506 if [ "$CFG_ARCH" = "arm" ]; then
6507 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6508 if [ $? != "0" ]; then
6509 CFG_JAVASCRIPTCORE_JIT=no
6512 case "$XPLATFORM" in
6514 CFG_JAVASCRIPTCORE_JIT=no
6520 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6521 QMakeVar set JAVASCRIPTCORE_JIT yes
6522 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6523 QMakeVar set JAVASCRIPTCORE_JIT no
6526 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6527 CFG_AUDIO_BACKEND=yes
6530 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6531 echo "Warning: largefile support cannot be disabled for win32."
6535 #-------------------------------------------------------------------------------
6536 # ask for all that hasn't been auto-detected or specified in the arguments
6537 #-------------------------------------------------------------------------------
6539 ### fix this: user input should be validated in a loop
6540 if [ "$PLATFORM_QWS" = "yes" ]; then
6541 PROMPT_FOR_DEPTHS="yes"
6543 PROMPT_FOR_DEPTHS="no"
6545 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6547 echo "Choose pixel-depths to support:"
6549 echo " 1. 1bpp, black/white"
6550 echo " 4. 4bpp, grayscale"
6551 echo " 8. 8bpp, paletted"
6552 echo " 12. 12bpp, rgb 4-4-4"
6553 echo " 15. 15bpp, rgb 5-5-5"
6554 echo " 16. 16bpp, rgb 5-6-5"
6555 echo " 18. 18bpp, rgb 6-6-6"
6556 echo " 24. 24bpp, rgb 8-8-8"
6557 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6558 echo " all. All supported depths"
6560 echo "Your choices (default 8,16,32):"
6562 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6563 CFG_QWS_DEPTHS=8,16,32
6566 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6567 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6568 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6570 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6572 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6573 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6578 # enable dwarf2 support on Mac
6579 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6580 QT_CONFIG="$QT_CONFIG dwarf2"
6583 # Set the default arch if there are no "-arch" arguments on the configure line
6584 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6585 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6586 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6587 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6590 if [ "$CFG_PHONON" = "yes" ]; then
6591 # No longer needed after modularization
6592 #QT_CONFIG="$QT_CONFIG phonon"
6593 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6594 QT_CONFIG="$QT_CONFIG phonon-backend"
6597 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6600 # disable accessibility
6601 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6602 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6604 QT_CONFIG="$QT_CONFIG accessibility"
6607 # egl stuff does not belong in lighthouse, but rather in plugins
6608 if [ "$PLATFORM_QPA" = "yes" ]; then
6613 if [ "$CFG_EGL" = "no" ]; then
6614 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6616 QT_CONFIG="$QT_CONFIG egl"
6617 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6618 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6623 if [ "$CFG_OPENVG" = "no" ]; then
6624 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6626 QT_CONFIG="$QT_CONFIG openvg"
6627 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6628 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6630 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6631 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6633 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6634 QT_CONFIG="$QT_CONFIG shivavg"
6635 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6640 if [ "$CFG_OPENGL" = "no" ]; then
6641 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6643 QT_CONFIG="$QT_CONFIG opengl"
6646 if [ "$CFG_OPENGL" = "es2" ]; then
6647 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6650 if [ "$CFG_OPENGL" = "es2" ]; then
6651 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6652 QT_CONFIG="$QT_CONFIG opengles2"
6655 # safe execution environment
6656 if [ "$CFG_SXE" != "no" ]; then
6657 QT_CONFIG="$QT_CONFIG sxe"
6660 # build up the variables for output
6661 if [ "$CFG_DEBUG" = "yes" ]; then
6662 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6663 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6664 elif [ "$CFG_DEBUG" = "no" ]; then
6665 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6666 QMAKE_CONFIG="$QMAKE_CONFIG release"
6668 if [ "$CFG_SHARED" = "yes" ]; then
6669 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6670 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6671 elif [ "$CFG_SHARED" = "no" ]; then
6672 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6673 QMAKE_CONFIG="$QMAKE_CONFIG static"
6675 if [ "$PLATFORM_QWS" = "yes" ]; then
6676 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6677 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6678 QT_CONFIG="$QT_CONFIG embedded"
6679 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6681 if [ "$PLATFORM_QPA" = "yes" ]; then
6682 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6683 QT_CONFIG="$QT_CONFIG qpa"
6684 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6685 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6688 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6689 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6690 QT_CONFIG="$QT_CONFIG nacl pepper"
6691 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6694 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6695 # Do not set this here for Windows. Let qmake do it so
6696 # debug and release precompiled headers are kept separate.
6697 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6699 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6700 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6701 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6702 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6703 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6704 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6706 if [ "$CFG_STL" = "no" ]; then
6707 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6709 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6711 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6712 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6714 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6715 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6716 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6717 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6718 QMakeVar add QMAKE_CFLAGS -g
6719 QMakeVar add QMAKE_CXXFLAGS -g
6720 QT_CONFIG="$QT_CONFIG separate_debug_info"
6722 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6723 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6725 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6726 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6727 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6728 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6729 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6730 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6731 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6732 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6733 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6734 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6735 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6736 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6737 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6738 QT_CONFIG="$QT_CONFIG clock-gettime"
6740 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6741 QT_CONFIG="$QT_CONFIG clock-monotonic"
6743 if [ "$CFG_MREMAP" = "yes" ]; then
6744 QT_CONFIG="$QT_CONFIG mremap"
6746 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6747 QT_CONFIG="$QT_CONFIG getaddrinfo"
6749 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6750 QT_CONFIG="$QT_CONFIG ipv6ifname"
6752 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6753 QT_CONFIG="$QT_CONFIG getifaddrs"
6755 if [ "$CFG_INOTIFY" = "yes" ]; then
6756 QT_CONFIG="$QT_CONFIG inotify"
6758 if [ "$CFG_LIBJPEG" = "no" ]; then
6760 elif [ "$CFG_LIBJPEG" = "system" ]; then
6761 QT_CONFIG="$QT_CONFIG system-jpeg"
6763 if [ "$CFG_JPEG" = "no" ]; then
6764 QT_CONFIG="$QT_CONFIG no-jpeg"
6765 elif [ "$CFG_JPEG" = "yes" ]; then
6766 QT_CONFIG="$QT_CONFIG jpeg"
6768 if [ "$CFG_LIBMNG" = "no" ]; then
6770 elif [ "$CFG_LIBMNG" = "system" ]; then
6771 QT_CONFIG="$QT_CONFIG system-mng"
6773 if [ "$CFG_MNG" = "no" ]; then
6774 QT_CONFIG="$QT_CONFIG no-mng"
6775 elif [ "$CFG_MNG" = "yes" ]; then
6776 QT_CONFIG="$QT_CONFIG mng"
6778 if [ "$CFG_LIBPNG" = "no" ]; then
6781 if [ "$CFG_LIBPNG" = "system" ]; then
6782 QT_CONFIG="$QT_CONFIG system-png"
6784 if [ "$CFG_PNG" = "no" ]; then
6785 QT_CONFIG="$QT_CONFIG no-png"
6786 elif [ "$CFG_PNG" = "yes" ]; then
6787 QT_CONFIG="$QT_CONFIG png"
6789 if [ "$CFG_GIF" = "no" ]; then
6790 QT_CONFIG="$QT_CONFIG no-gif"
6791 elif [ "$CFG_GIF" = "yes" ]; then
6792 QT_CONFIG="$QT_CONFIG gif"
6794 if [ "$CFG_LIBTIFF" = "no" ]; then
6796 elif [ "$CFG_LIBTIFF" = "system" ]; then
6797 QT_CONFIG="$QT_CONFIG system-tiff"
6799 if [ "$CFG_TIFF" = "no" ]; then
6800 QT_CONFIG="$QT_CONFIG no-tiff"
6801 elif [ "$CFG_TIFF" = "yes" ]; then
6802 QT_CONFIG="$QT_CONFIG tiff"
6804 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6805 QT_CONFIG="$QT_CONFIG no-freetype"
6806 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6807 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6808 QT_CONFIG="$QT_CONFIG system-freetype"
6810 QT_CONFIG="$QT_CONFIG freetype"
6812 if [ "$CFG_GUI" = "auto" ]; then
6815 if [ "$CFG_GUI" = "no" ]; then
6816 QT_CONFIG="$QT_CONFIG no-gui"
6818 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6822 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6823 #On Mac we implicitly link against libz, so we
6824 #never use the 3rdparty stuff.
6825 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6827 if [ "$CFG_ZLIB" = "yes" ]; then
6828 QT_CONFIG="$QT_CONFIG zlib"
6829 elif [ "$CFG_ZLIB" = "system" ]; then
6830 QT_CONFIG="$QT_CONFIG system-zlib"
6833 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6834 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6835 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6836 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6837 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6838 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6839 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6840 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6841 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6842 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6843 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6844 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6845 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6846 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6847 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6849 if [ "$PLATFORM_X11" = "yes" ]; then
6850 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6852 # for some reason, the following libraries are not always built shared,
6853 # so *every* program/lib (including Qt) has to link against them
6854 if [ "$CFG_XSHAPE" = "yes" ]; then
6855 QT_CONFIG="$QT_CONFIG xshape"
6857 if [ "$CFG_XVIDEO" = "yes" ]; then
6858 QT_CONFIG="$QT_CONFIG xvideo"
6860 if [ "$CFG_XSYNC" = "yes" ]; then
6861 QT_CONFIG="$QT_CONFIG xsync"
6863 if [ "$CFG_XINERAMA" = "yes" ]; then
6864 QT_CONFIG="$QT_CONFIG xinerama"
6865 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6867 if [ "$CFG_XCURSOR" = "yes" ]; then
6868 QT_CONFIG="$QT_CONFIG xcursor"
6869 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6871 if [ "$CFG_XFIXES" = "yes" ]; then
6872 QT_CONFIG="$QT_CONFIG xfixes"
6873 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6875 if [ "$CFG_XRANDR" = "yes" ]; then
6876 QT_CONFIG="$QT_CONFIG xrandr"
6877 if [ "$CFG_XRENDER" != "yes" ]; then
6878 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6879 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6881 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6884 if [ "$CFG_XRENDER" = "yes" ]; then
6885 QT_CONFIG="$QT_CONFIG xrender"
6886 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6888 if [ "$CFG_MITSHM" = "yes" ]; then
6889 QT_CONFIG="$QT_CONFIG mitshm"
6891 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6892 QT_CONFIG="$QT_CONFIG fontconfig"
6894 if [ "$CFG_XINPUT" = "yes" ]; then
6895 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6897 if [ "$CFG_XINPUT" = "yes" ]; then
6898 QT_CONFIG="$QT_CONFIG xinput tablet"
6900 if [ "$CFG_XKB" = "yes" ]; then
6901 QT_CONFIG="$QT_CONFIG xkb"
6905 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6906 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6907 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6909 if [ "$CFG_ARCH" = "macosx" ]; then
6910 if [ "$CFG_RPATH" = "yes" ]; then
6911 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6913 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
6914 if [ -n "$RPATH_FLAGS" ]; then
6916 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6920 elif [ "$CFG_RPATH" = "yes" ]; then
6921 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6925 if [ "$CFG_RPATH" = "yes" ]; then
6926 # set the default rpath to the library installation directory
6927 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6929 if [ -n "$RPATH_FLAGS" ]; then
6930 # add the user defined rpaths
6931 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6935 if [ '!' -z "$I_FLAGS" ]; then
6936 # add the user define include paths
6937 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6938 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6941 if [ '!' -z "$W_FLAGS" ]; then
6942 # add the user defined warning flags
6943 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6944 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6945 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6948 # turn off exceptions for the compilers that support it
6949 if [ "$PLATFORM_QWS" = "yes" ]; then
6950 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6951 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
6952 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6954 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6956 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6960 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6961 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6964 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6965 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6966 # Follow default behavior of configure.exe by overriding with "rtti".
6967 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6970 if [ "$CFG_ALSA" = "yes" ]; then
6971 QT_CONFIG="$QT_CONFIG alsa"
6974 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6975 QT_CONFIG="$QT_CONFIG pulseaudio"
6978 if [ "$CFG_COREWLAN" = "yes" ]; then
6979 QT_CONFIG="$QT_CONFIG corewlan"
6982 if [ "$CFG_ICU" = "yes" ]; then
6983 QT_CONFIG="$QT_CONFIG icu"
6986 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6987 QT_CONFIG="$QT_CONFIG force_asserts"
6991 # Some Qt modules are too advanced in C++ for some old compilers
6992 # Detect here the platforms where they are known to work.
6994 # See Qt documentation for more information on which features are
6995 # supported and on which compilers.
6997 canBuildQtXmlPatterns="yes"
6998 canBuildWebKit="$HAVE_STL"
6999 canBuildQtConcurrent="yes"
7001 canUseV8Snapshot="yes"
7003 # WebKit requires stdint.h
7004 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7005 if [ $? != "0" ]; then
7009 case "$XPLATFORM" in
7011 # PA-RISC's assembly is too limited
7012 # gcc 3.4 on that platform can't build QtXmlPatterns
7013 # the assembly it generates cannot be compiled
7015 # Check gcc's version
7016 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7020 canBuildQtXmlPatterns="no"
7024 canBuildQtXmlPatterns="no"
7028 unsupported/vxworks-*-g++*)
7031 unsupported/vxworks-*-dcc*)
7033 canBuildQtXmlPatterns="no"
7036 # Check gcc's version
7037 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7045 canBuildQtXmlPatterns="no"
7050 # Check the compiler version
7051 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7054 canBuildQtXmlPatterns="no"
7055 canBuildQtConcurrent="no"
7059 canBuildQtConcurrent="no"
7065 canBuildQtXmlPatterns="no"
7066 canBuildQtConcurrent="no"
7072 # Get the xlC version
7073 cat > xlcver.c <<EOF
7077 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7082 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7083 xlcver=`./xlcver 2>/dev/null`
7086 if [ "$OPT_VERBOSE" = "yes" ]; then
7087 if [ -n "$xlcver" ]; then
7088 echo Found IBM xlC version: $xlcver.
7090 echo Could not determine IBM xlC version, assuming oldest supported.
7097 canBuildQtXmlPatterns="no"
7098 canBuildQtConcurrent="no"
7102 canBuildQtConcurrent="no"
7108 canBuildQtConcurrent="no"
7112 if [ "$CFG_GUI" = "no" ]; then
7113 # WebKit requires QtGui
7117 if [ "$CFG_SHARED" = "no" ]; then
7119 echo "WARNING: Using static linking will disable the WebKit module."
7124 CFG_CONCURRENT="yes"
7125 if [ "$canBuildQtConcurrent" = "no" ]; then
7126 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7129 QT_CONFIG="$QT_CONFIG concurrent"
7132 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7133 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7136 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7137 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7138 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7139 CFG_XMLPATTERNS="no"
7141 # No longer needed after modularization
7142 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7143 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7145 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7148 # No longer needed after modularization
7149 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7150 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7152 # QT_CONFIG="$QT_CONFIG multimedia"
7155 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7156 QT_CONFIG="$QT_CONFIG audio-backend"
7159 if [ "$CFG_SVG" = "auto" ]; then
7163 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7164 echo "QtSvg requested, but it can't be built without QtGui"
7168 if [ "$CFG_SVG" = "yes" ]; then
7169 QT_CONFIG="$QT_CONFIG svg"
7171 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7174 if [ "$CFG_WEBKIT" != "no" ]; then
7175 CFG_WEBKIT="$canBuildWebKit"
7178 if [ "$CFG_WEBKIT" != "no" ]; then
7179 # No longer needed after modularization
7180 #QT_CONFIG="$QT_CONFIG webkit"
7181 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7182 if [ "$CFG_WEBKIT" = "debug" ]; then
7183 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7187 if [ "$CFG_SCRIPT" = "auto" ]; then
7191 # No longer needed after modularization
7192 #if [ "$CFG_SCRIPT" = "yes" ]; then
7193 # QT_CONFIG="$QT_CONFIG script"
7195 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7198 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7199 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7202 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7203 CFG_SCRIPTTOOLS="yes"
7204 elif [ "$CFG_SCRIPT" = "no" ]; then
7205 CFG_SCRIPTTOOLS="no"
7208 # No longer needed after modularization
7209 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7210 # QT_CONFIG="$QT_CONFIG scripttools"
7212 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7217 i386|x86_64|arm|mips|macosx) ;;
7218 *) canBuildV8="no";;
7221 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7222 echo "Error: V8 was requested, but is not supported on this platform."
7226 if [ "$CFG_V8" = "auto" ]; then
7227 CFG_V8="$canBuildV8"
7230 if [ "$CFG_V8" = "no" ]; then
7231 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7233 QT_CONFIG="$QT_CONFIG v8"
7234 # Detect snapshot support
7235 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7236 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7239 *) canUseV8Snapshot="no"
7243 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" == "arm" ]; then
7244 # QEMU crashes when building inside Scratchbox with an ARM target
7245 canUseV8Snapshot="no"
7248 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7249 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7251 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7252 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7255 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7256 QT_CONFIG="$QT_CONFIG v8snapshot"
7260 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7261 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7262 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7266 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7267 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7274 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7275 # No longer needed after modularization
7276 #QT_CONFIG="$QT_CONFIG declarative"
7277 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7278 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7281 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7284 if [ "$CFG_LOCATION" = "auto" ]; then
7285 CFG_LOCATION="$CFG_GUI"
7288 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7289 echo "QtLocation requested, but it can't be built without QtGui"
7293 #Disable QtLocation until ready
7296 if [ "$CFG_LOCATION" = "no" ]; then
7297 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7300 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7303 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7304 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7305 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7310 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7311 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7312 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7319 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7325 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7327 case "$COMPILER_VERSION" in
7329 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7330 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7331 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7334 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7335 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7336 QT_GCC_PATCH_VERSION=0
7346 #-------------------------------------------------------------------------------
7347 # part of configuration information goes into qconfig.h
7348 #-------------------------------------------------------------------------------
7350 case "$CFG_QCONFIG" in
7352 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7355 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7356 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7357 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7358 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7359 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7360 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7362 echo "#endif" >>"$tmpconfig"
7366 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7370 # define QT_EDITION $QT_EDITION
7373 /* Machine byte-order */
7374 #define Q_BIG_ENDIAN 4321
7375 #define Q_LITTLE_ENDIAN 1234
7378 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7379 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7380 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7381 #if defined(__BIG_ENDIAN__)
7382 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7383 #elif defined(__LITTLE_ENDIAN__)
7384 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7386 # error "Unable to determine byte order!"
7390 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7392 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7393 if [ "$CFG_ENDIAN" = "auto" ]; then
7394 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7395 #if defined(__BIG_ENDIAN__)
7396 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7397 #elif defined(__LITTLE_ENDIAN__)
7398 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7400 # error "Unable to determine byte order!"
7404 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7406 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7408 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7409 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7410 /* Non-IEEE double format */
7411 #define Q_DOUBLE_LITTLE "01234567"
7412 #define Q_DOUBLE_BIG "76543210"
7413 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7414 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7415 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7418 if [ "$CFG_ARMFPA" = "yes" ]; then
7419 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7420 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7421 #ifndef QT_BOOTSTRAPPED
7426 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7430 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7431 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7432 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7433 /* Machine Architecture */
7434 #ifndef QT_BOOTSTRAPPED
7435 # define QT_ARCH_${CFG_ARCH_STR}
7437 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7441 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7442 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7444 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7445 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7448 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7449 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7452 if [ "$PLATFORM_MAC" = "yes" ]; then
7453 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7454 #if defined(__LP64__)
7455 # define QT_POINTER_SIZE 8
7457 # define QT_POINTER_SIZE 4
7461 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7462 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7466 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7468 if [ "$CFG_DEV" = "yes" ]; then
7469 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7472 # Embedded compile time options
7473 if [ "$PLATFORM_QWS" = "yes" ]; then
7474 # Add QWS to config.h
7475 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7477 # Add excluded decorations to $QCONFIG_FLAGS
7478 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7479 for decor in $decors; do
7480 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7481 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7484 # Figure which embedded drivers which are turned off
7485 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7486 for ADRIVER in $CFG_GFX_ON; do
7487 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7490 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7491 # the um driver is currently not in the available list for external builds
7492 if [ "$CFG_DEV" = "no" ]; then
7493 CFG_KBD_OFF="$CFG_KBD_OFF um"
7495 for ADRIVER in $CFG_KBD_ON; do
7496 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7499 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7500 for ADRIVER in $CFG_MOUSE_ON; do
7501 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7504 for DRIVER in $CFG_GFX_OFF; do
7505 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7506 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7509 for DRIVER in $CFG_KBD_OFF; do
7510 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7511 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7514 for DRIVER in $CFG_MOUSE_OFF; do
7515 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7516 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7520 if [ "$PLATFORM_QPA" = "yes" ]; then
7521 # Add QPA to config.h
7522 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7525 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7526 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7529 # Add turned on SQL drivers
7530 for DRIVER in $CFG_SQL_AVAILABLE; do
7531 eval "VAL=\$CFG_SQL_$DRIVER"
7534 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7535 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7536 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7539 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7545 QMakeVar set sql-drivers "$SQL_DRIVERS"
7546 QMakeVar set sql-plugins "$SQL_PLUGINS"
7548 # Add other configuration options to the qconfig.h file
7549 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7550 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7551 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7552 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7553 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7554 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7555 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7556 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7557 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7559 # ATM we need this define to compile Qt. Remove later!
7560 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7562 # X11/Unix/Mac only configs
7563 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7564 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7565 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7566 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7567 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7568 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7569 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7570 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7571 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7572 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7573 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7574 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7575 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7576 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7577 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7579 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7580 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7581 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7582 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7583 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7584 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7585 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7586 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7587 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7588 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7589 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7590 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7591 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7593 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7594 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7595 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7596 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7597 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7598 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7599 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7600 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7602 # sort QCONFIG_FLAGS for neatness if we can
7603 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7604 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7606 if [ -n "$QCONFIG_FLAGS" ]; then
7607 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7608 #ifndef QT_BOOTSTRAPPED
7611 for cfg in $QCONFIG_FLAGS; do
7612 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7613 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7614 # figure out define logic, so we can output the correct
7615 # ifdefs to override the global defines in a project
7617 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7618 # QT_NO_option can be forcefully turned on by QT_option
7619 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7620 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7621 # QT_option can be forcefully turned off by QT_NO_option
7622 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7625 if [ -z $cfgdNeg ]; then
7626 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7633 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7634 #if defined($cfgd) && defined($cfgdNeg)
7636 #elif !defined($cfgd) && !defined($cfgdNeg)
7643 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7644 #endif // QT_BOOTSTRAPPED
7649 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7650 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7651 #define QT_VISIBILITY_AVAILABLE
7656 if [ -n "$QT_LIBINFIX" ]; then
7657 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7658 #define QT_LIBINFIX "$QT_LIBINFIX"
7663 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7664 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7665 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7667 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7668 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7669 chmod -w "$outpath/src/corelib/global/qconfig.h"
7670 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7671 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7675 #-------------------------------------------------------------------------------
7676 # save configuration into qconfig.pri
7677 #-------------------------------------------------------------------------------
7678 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7679 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7680 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7681 if [ "$CFG_DEBUG" = "yes" ]; then
7682 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7683 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7684 QT_CONFIG="$QT_CONFIG release"
7686 QT_CONFIG="$QT_CONFIG debug"
7687 elif [ "$CFG_DEBUG" = "no" ]; then
7688 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7689 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7690 QT_CONFIG="$QT_CONFIG debug"
7692 QT_CONFIG="$QT_CONFIG release"
7694 if [ "$CFG_STL" = "yes" ]; then
7695 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7697 if [ "$CFG_FRAMEWORK" = "no" ]; then
7698 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7700 QT_CONFIG="$QT_CONFIG qt_framework"
7701 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7703 if [ "$BUILD_ON_MAC" = "yes" ]; then
7704 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7706 if [ "$CFG_DEV" = "yes" ]; then
7707 QT_CONFIG="$QT_CONFIG private_tests"
7710 # Make the application arch follow the Qt arch for single arch builds.
7711 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7712 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7713 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7716 cat >>"$QTCONFIG.tmp" <<EOF
7718 CONFIG += $QTCONFIG_CONFIG
7720 QT_EDITION = $Edition
7721 QT_CONFIG += $QT_CONFIG
7724 QT_VERSION = $QT_VERSION
7725 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7726 QT_MINOR_VERSION = $QT_MINOR_VERSION
7727 QT_PATCH_VERSION = $QT_PATCH_VERSION
7730 QT_LIBINFIX = $QT_LIBINFIX
7731 QT_NAMESPACE = $QT_NAMESPACE
7732 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7735 if [ -n "$CFG_SYSROOT" ]; then
7736 echo "# sysroot" >>"$QTCONFIG.tmp"
7737 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7738 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7739 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7740 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7741 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7742 echo "}" >> "$QTCONFIG.tmp"
7743 echo >> "$QTCONFIG.tmp"
7745 if [ "$CFG_RPATH" = "yes" ]; then
7746 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7748 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7749 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7750 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7751 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7754 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7755 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7756 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7759 # replace qconfig.pri if it differs from the newly created temp file
7760 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7761 rm -f "$QTCONFIG.tmp"
7763 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7766 #-------------------------------------------------------------------------------
7767 # save configuration into qmodule.pri
7768 #-------------------------------------------------------------------------------
7769 QTMODULE="$outpath/mkspecs/qmodule.pri"
7771 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7773 # Ensure we can link to uninistalled libraries
7774 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7775 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7777 if [ -n "$QT_CFLAGS_PSQL" ]; then
7778 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7780 if [ -n "$QT_LFLAGS_PSQL" ]; then
7781 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7783 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7784 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7786 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7787 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7789 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7790 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7792 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7793 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7795 if [ -n "$QT_LFLAGS_ODBC" ]; then
7796 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7798 if [ -n "$QT_LFLAGS_TDS" ]; then
7799 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
7802 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7803 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
7806 #dump in the OPENSSL_LIBS info
7807 if [ '!' -z "$OPENSSL_LIBS" ]; then
7808 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
7809 elif [ "$CFG_OPENSSL" = "linked" ]; then
7810 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
7813 #dump in the SDK info
7814 if [ '!' -z "$CFG_SDK" ]; then
7815 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
7818 # mac gcc -Xarch support
7819 if [ "$CFG_MAC_XARCH" = "no" ]; then
7820 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
7824 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
7825 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7827 # replace qmodule.pri if it differs from the newly created temp file
7828 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
7829 rm -f "$QTMODULE.tmp"
7831 mv -f "$QTMODULE.tmp" "$QTMODULE"
7834 #-------------------------------------------------------------------------------
7835 # save configuration into .qmake.cache
7836 #-------------------------------------------------------------------------------
7838 CACHEFILE="$outpath/.qmake.cache"
7839 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7840 cat >>"$CACHEFILE.tmp" <<EOF
7842 QT_SOURCE_TREE = \$\$quote($relpath)
7843 QT_BUILD_TREE = \$\$quote($outpath)
7844 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7846 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7847 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7848 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7849 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7850 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7851 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7852 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7854 include(\$\$PWD/mkspecs/qmodule.pri)
7855 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
7856 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7857 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7861 #dump the qmake spec
7862 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7863 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7865 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7870 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7871 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7872 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7873 # don't need to worry about generated files
7874 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7875 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7877 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7879 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7880 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7883 # replace .qmake.cache if it differs from the newly created temp file
7884 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7885 rm -f "$CACHEFILE.tmp"
7887 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7890 #-------------------------------------------------------------------------------
7891 # give feedback on configuration
7892 #-------------------------------------------------------------------------------
7896 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7899 This target is using the GNU C++ compiler ($PLATFORM).
7901 Recent versions of this compiler automatically include code for
7902 exceptions, which increase both the size of the Qt libraries and
7903 the amount of memory taken by your applications.
7905 You may choose to re-run `basename $0` with the -no-exceptions
7906 option to compile Qt without exceptions. This is completely binary
7907 compatible, and existing applications will continue to work.
7915 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7918 This target is using the MIPSpro C++ compiler ($PLATFORM).
7920 You may choose to re-run `basename $0` with the -no-exceptions
7921 option to compile Qt without exceptions. This will make the
7922 size of the Qt library smaller and reduce the amount of memory
7923 taken by your applications.
7934 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7936 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7937 in debug mode will run out of memory on systems with 2GB or less.
7938 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7939 -no-webkit or -release to skip webkit debug.
7944 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7945 echo "Build type: $PLATFORM"
7947 echo "Building on: $PLATFORM"
7948 echo "Building for: $XPLATFORM"
7951 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7952 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7954 echo "Architecture: $CFG_ARCH"
7957 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7958 echo "Host architecture: $CFG_HOST_ARCH"
7961 if [ -n "$PLATFORM_NOTES" ]; then
7962 echo "Platform notes:"
7963 echo "$PLATFORM_NOTES"
7968 if [ "$OPT_VERBOSE" = "yes" ]; then
7969 echo $ECHO_N "qmake vars .......... $ECHO_C"
7970 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7971 echo "qmake switches ......... $QMAKE_SWITCHES"
7974 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7975 echo "Build .................. $CFG_BUILD_PARTS"
7976 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7977 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7978 echo "Debug .................. yes (combined)"
7979 if [ "$CFG_DEBUG" = "yes" ]; then
7980 echo "Default Link ........... debug"
7982 echo "Default Link ........... release"
7985 echo "Debug .................. $CFG_DEBUG"
7987 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7988 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7989 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7990 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7991 echo "QtGui module ........... $CFG_GUI"
7992 echo "QtScript module ........ $CFG_SCRIPT"
7993 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
7994 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
7995 echo "Phonon module .......... $CFG_PHONON"
7996 echo "Multimedia module ...... $CFG_MULTIMEDIA"
7997 echo "SVG module ............. $CFG_SVG"
7998 case "$CFG_WEBKIT" in
7999 yes) echo "WebKit module .......... yes" ;;
8000 debug) echo "WebKit module .......... yes (debug)" ;;
8001 no) echo "WebKit module .......... no" ;;
8003 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8004 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8005 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8007 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8010 echo "V8 module .............. $CFG_V8"
8011 echo "Declarative module ..... $CFG_DECLARATIVE"
8012 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8013 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8015 echo "Location module ........ $CFG_LOCATION"
8016 echo "STL support ............ $CFG_STL"
8017 echo "PCH support ............ $CFG_PRECOMPILE"
8018 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8019 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8020 echo "AVX..................... ${CFG_AVX}"
8021 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8022 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8023 echo "NEON support ........... ${CFG_NEON}"
8025 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8026 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8027 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8028 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8029 echo "NIS support ............ $CFG_NIS"
8030 echo "CUPS support ........... $CFG_CUPS"
8031 echo "Iconv support .......... $CFG_ICONV"
8032 echo "Glib support ........... $CFG_GLIB"
8033 echo "GStreamer support ...... $CFG_GSTREAMER"
8034 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8035 echo "Large File support ..... $CFG_LARGEFILE"
8036 echo "GIF support ............ $CFG_GIF"
8037 if [ "$CFG_TIFF" = "no" ]; then
8038 echo "TIFF support ........... $CFG_TIFF"
8040 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8042 if [ "$CFG_JPEG" = "no" ]; then
8043 echo "JPEG support ........... $CFG_JPEG"
8045 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8047 if [ "$CFG_PNG" = "no" ]; then
8048 echo "PNG support ............ $CFG_PNG"
8050 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8052 if [ "$CFG_MNG" = "no" ]; then
8053 echo "MNG support ............ $CFG_MNG"
8055 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8057 echo "zlib support ........... $CFG_ZLIB"
8058 echo "Session management ..... $CFG_SM"
8059 if [ "$PLATFORM_QWS" = "yes" ]; then
8060 echo "Embedded support ....... $CFG_EMBEDDED"
8061 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8062 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8064 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8066 # Normalize the decoration output first
8067 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8068 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8069 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8070 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8071 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8072 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8073 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8074 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8075 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8076 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8077 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8078 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8079 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8080 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8081 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8082 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8084 if [ "$CFG_OPENGL" = "desktop" ]; then
8085 echo "OpenGL support ......... yes (Desktop OpenGL)"
8086 elif [ "$CFG_OPENGL" = "es2" ]; then
8087 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8089 echo "OpenGL support ......... no"
8091 if [ "$CFG_EGL" != "no" ]; then
8092 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8093 echo "EGL support ............ yes <GLES/egl.h>"
8095 echo "EGL support ............ yes <EGL/egl.h>"
8098 if [ "$CFG_OPENVG" ]; then
8099 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8100 echo "OpenVG support ......... ShivaVG"
8102 echo "OpenVG support ......... $CFG_OPENVG"
8105 if [ "$PLATFORM_X11" = "yes" ]; then
8106 echo "NAS sound support ...... $CFG_NAS"
8107 echo "XShape support ......... $CFG_XSHAPE"
8108 echo "XVideo support ......... $CFG_XVIDEO"
8109 echo "XSync support .......... $CFG_XSYNC"
8110 echo "Xinerama support ....... $CFG_XINERAMA"
8111 echo "Xcursor support ........ $CFG_XCURSOR"
8112 echo "Xfixes support ......... $CFG_XFIXES"
8113 echo "Xrandr support ......... $CFG_XRANDR"
8114 echo "Xi support ............. $CFG_XINPUT"
8115 echo "MIT-SHM support ........ $CFG_MITSHM"
8116 echo "FontConfig support ..... $CFG_FONTCONFIG"
8117 echo "XKB Support ............ $CFG_XKB"
8118 echo "immodule support ....... $CFG_IM"
8119 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8121 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8122 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8123 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8124 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8125 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8126 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8127 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8128 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8129 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8132 if [ "$CFG_OPENSSL" = "yes" ]; then
8133 OPENSSL_LINKAGE="(run-time)"
8134 elif [ "$CFG_OPENSSL" = "linked" ]; then
8135 OPENSSL_LINKAGE="(linked)"
8137 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8138 echo "Alsa support ........... $CFG_ALSA"
8139 if [ "$PLATFORM_MAC" = "yes" ]; then
8140 echo "CoreWlan support ....... $CFG_COREWLAN"
8142 echo "libICU support ......... $CFG_ICU"
8143 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8144 echo "Xcb support ............ limited (old version)"
8146 echo "Xcb support ............ $CFG_XCB"
8148 echo "Xrender support ........ $CFG_XRENDER"
8149 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8150 echo "XInput2 support ........ $CFG_XINPUT2"
8154 # complain about not being able to use dynamic plugins if we are using a static build
8155 if [ "$CFG_SHARED" = "no" ]; then
8157 echo "WARNING: Using static linking will disable the use of dynamically"
8158 echo "loaded plugins. Make sure to import all needed static plugins,"
8159 echo "or compile needed modules into the library."
8162 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8164 echo "NOTE: When linking against OpenSSL, you can override the default"
8165 echo "library names through OPENSSL_LIBS."
8167 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8170 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8172 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8173 echo "if you want a pure debug build."
8178 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8183 #-------------------------------------------------------------------------------
8184 # build makefiles based on the configuration
8185 #-------------------------------------------------------------------------------
8187 echo "Finding project files. Please wait..."
8188 if [ "$CFG_NOPROCESS" != "yes" ]; then
8189 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8190 if [ -f "${relpath}/qtbase.pro" ]; then
8191 mkfile="${outpath}/Makefile"
8192 [ -f "$mkfile" ] && chmod +w "$mkfile"
8193 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8197 # .projects -> projects to process
8198 # .projects.1 -> qt and moc
8199 # .projects.2 -> subdirs and libs
8200 # .projects.3 -> the rest
8201 rm -f .projects .projects.1 .projects.2 .projects.3
8203 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8204 if [ -z "$AWK" ]; then
8205 for p in `echo $QMAKE_PROJECTS`; do
8206 echo "$p" >> .projects
8209 cat >projects.awk <<EOF
8215 first = "./.projects.1.tmp"
8216 second = "./.projects.2.tmp"
8217 third = "./.projects.3.tmp"
8222 if ( ! target_file )
8224 print input_file >target_file
8229 input_file = FILENAME
8234 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8237 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8238 target_file = second
8243 matched_target == 0 && /^(TEMPLATE.*=)/ {
8244 if ( \$3 == "subdirs" )
8245 target_file = second
8246 else if ( \$3 == "lib" )
8252 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8253 if ( \$0 ~ /plugin/ )
8256 target_file = second
8261 if ( ! target_file )
8263 print input_file >>target_file
8270 for p in `echo $QMAKE_PROJECTS`; do
8271 echo "$p" >> .projects.all
8274 # if you get errors about the length of the command line to awk, change the -l arg
8276 split -l 100 .projects.all .projects.all.
8277 for p in .projects.all.*; do
8278 "$AWK" -f projects.awk `cat $p`
8279 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8280 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8281 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8282 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8284 rm -f .projects.all* projects.awk
8286 [ -f .projects.1 ] && cat .projects.1 >>.projects
8287 [ -f .projects.2 ] && cat .projects.2 >>.projects
8288 rm -f .projects.1 .projects.2
8289 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8290 cat .projects.3 >>.projects
8294 # don't sort Qt and MOC in with the other project files
8295 # also work around a segfaulting uniq(1)
8296 if [ -f .sorted.projects.2 ]; then
8297 sort .sorted.projects.2 > .sorted.projects.2.new
8298 mv -f .sorted.projects.2.new .sorted.projects.2
8299 cat .sorted.projects.2 >> .sorted.projects.1
8301 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8302 rm -f .sorted.projects.2 .sorted.projects.1
8306 if [ -f .projects ]; then
8307 uniq .projects >.tmp
8308 mv -f .tmp .projects
8309 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8311 if [ -f .projects.3 ]; then
8312 uniq .projects.3 >.tmp
8313 mv -f .tmp .projects.3
8314 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8316 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8320 for part in $CFG_BUILD_PARTS; do
8322 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8323 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8324 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8325 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8330 if [ "$CFG_DEV" = "yes" ]; then
8331 PART_ROOTS="$PART_ROOTS tests"
8334 echo "Creating makefiles. Please wait..."
8335 for file in .projects .projects.3; do
8336 [ '!' -f "$file" ] && continue
8337 for a in `cat $file`; do
8339 for r in $PART_ROOTS; do
8340 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8345 [ "$IN_ROOT" = "no" ] && continue
8348 *winmain/winmain.pro)
8349 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8353 *examples/activeqt/*) continue ;;
8354 */qmake/qmake.pro) continue ;;
8355 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8356 *tools/mkv8snapshot/*)
8357 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8363 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8369 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8370 test -d "$dir" || mkdir -p "$dir"
8371 OUTDIR="$outpath/$dir"
8372 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8373 # fast configure - the makefile exists, skip it
8374 # since the makefile exists, it was generated by qmake, which means we
8375 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8377 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8380 QMAKE_SPEC_ARGS="-spec $SPEC"
8381 echo $ECHO_N " for $a$ECHO_C"
8383 QMAKE="$outpath/bin/qmake"
8384 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8385 if [ "$file" = ".projects.3" ]; then
8388 cat >"${OUTDIR}/Makefile" <<EOF
8389 # ${OUTDIR}/Makefile: generated by configure
8391 # WARNING: This makefile will be replaced with a real makefile.
8392 # All changes made to this file will be lost.
8394 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8396 cat >>"${OUTDIR}/Makefile" <<EOF
8398 all clean install qmake first Makefile: FORCE
8399 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8407 if [ "$OPT_VERBOSE" = "yes" ]; then
8408 echo " (`basename $SPEC`)"
8409 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8414 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8415 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8419 rm -f .projects .projects.3
8421 #-------------------------------------------------------------------------------
8422 # check for platforms that we don't yet know about
8423 #-------------------------------------------------------------------------------
8424 if [ "$CFG_ARCH" = "generic" ]; then
8427 NOTICE: Atomic operations are not yet supported for this
8430 Qt will use the 'generic' architecture instead, which uses a
8431 single pthread_mutex_t to protect all atomic operations. This
8432 implementation is the slow (but safe) fallback implementation
8433 for architectures Qt does not yet support.
8437 #-------------------------------------------------------------------------------
8438 # check if the user passed the -no-zlib option, which is no longer supported
8439 #-------------------------------------------------------------------------------
8440 if [ -n "$ZLIB_FORCED" ]; then
8441 which_zlib="supplied"
8442 if [ "$CFG_ZLIB" = "system" ]; then
8448 NOTICE: The -no-zlib option was supplied but is no longer
8451 Qt now requires zlib support in all builds, so the -no-zlib
8452 option was ignored. Qt will be built using the $which_zlib
8457 #-------------------------------------------------------------------------------
8458 # finally save the executed command to another script
8459 #-------------------------------------------------------------------------------
8460 if [ `basename $0` != "config.status" ]; then
8461 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8463 # add the system variables
8464 for varname in $SYSTEM_VARIABLES; do
8466 'if [ -n "\$'${varname}'" ]; then
8467 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8472 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8474 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8475 echo "#!/bin/sh" > "$outpath/config.status"
8476 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8477 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8478 echo "else" >> "$outpath/config.status"
8479 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8480 echo "fi" >> "$outpath/config.status"
8481 chmod +x "$outpath/config.status"
8484 if [ -n "$RPATH_MESSAGE" ]; then
8486 echo "$RPATH_MESSAGE"
8489 MAKE=`basename "$MAKE"`
8491 echo Qt is now configured for building. Just run \'$MAKE\'.
8492 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8493 echo Once everything is built, Qt is installed.
8494 echo You should not run \'$MAKE install\'.
8496 echo Once everything is built, you must run \'$MAKE install\'.
8497 echo Qt will be installed into $QT_INSTALL_PREFIX
8500 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.