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)
674 CFG_OPENVG_LC_INCLUDES=no
675 CFG_OPENVG_SHIVA=auto
676 CFG_OPENVG_ON_OPENGL=auto
678 CFG_EGL_GLES_INCLUDES=no
681 CFG_QWS_FREETYPE=auto
684 QT_DEFAULT_BUILD_PARTS="libs examples tests"
689 CFG_PHONON_BACKEND=yes
691 CFG_AUDIO_BACKEND=auto
696 CFG_DECLARATIVE_DEBUG=yes
697 CFG_WEBKIT=auto # (yes|no|auto|debug)
698 CFG_JAVASCRIPTCORE_JIT=auto
701 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
702 CFG_GFX_ON="linuxfb multiscreen"
703 CFG_GFX_PLUGIN_AVAILABLE=
706 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
707 CFG_KBD_ON="tty" #default, see QMakeVar above
708 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
709 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
711 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
712 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
713 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
714 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
716 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
717 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
718 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
719 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
724 CFG_KBD_PLUGIN_AVAILABLE=
727 CFG_MOUSE_PLUGIN_AVAILABLE=
732 CFG_DECORATION_AVAILABLE="styled windows default"
733 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
734 CFG_DECORATION_PLUGIN_AVAILABLE=
735 CFG_DECORATION_PLUGIN=
753 CFG_SEPARATE_DEBUG_INFO=no
754 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
755 CFG_REDUCE_EXPORTS=auto
765 CFG_REDUCE_RELOCATIONS=auto
768 CFG_ACCESSIBILITY=auto
771 CFG_DOUBLEFORMAT=auto
775 CFG_CLOCK_GETTIME=auto
776 CFG_CLOCK_MONOTONIC=auto
785 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
790 CFG_PREFIX_INSTALL=yes
799 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
800 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
804 OPT_CONFIRM_LICENSE=no
817 # initalize variables used for installation
826 QT_INSTALL_TRANSLATIONS=
832 #flags for SQL drivers
840 QT_LFLAGS_ODBC="-lodbc"
843 # flags for libdbus-1
847 # flags for Glib (X11 only)
851 # flags for GStreamer (X11 only)
855 #-------------------------------------------------------------------------------
856 # check SQL drivers, mouse drivers and decorations available in this package
857 #-------------------------------------------------------------------------------
859 # opensource version removes some drivers, so force them to be off
865 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
866 for a in "$relpath/src/plugins/sqldrivers/"*; do
868 base_a=`basename "$a"`
869 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
870 eval "CFG_SQL_${base_a}=auto"
875 CFG_DECORATION_PLUGIN_AVAILABLE=
876 if [ -d "$relpath/src/plugins/decorations" ]; then
877 for a in "$relpath/src/plugins/decorations/"*; do
879 base_a=`basename "$a"`
880 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
885 CFG_KBD_PLUGIN_AVAILABLE=
886 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
887 for a in "$relpath/src/plugins/kbddrivers/"*; do
889 base_a=`basename "$a"`
890 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
895 CFG_MOUSE_PLUGIN_AVAILABLE=
896 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
897 for a in "$relpath/src/plugins/mousedrivers/"*; do
899 base_a=`basename "$a"`
900 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
905 CFG_GFX_PLUGIN_AVAILABLE=
906 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
907 for a in "$relpath/src/plugins/gfxdrivers/"*; do
909 base_a=`basename "$a"`
910 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
913 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
916 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
917 if [ -d "$relpath/src/plugins/imageformats" ]; then
918 for a in "$relpath/src/plugins/imageformats/"*; do
920 base_a=`basename "$a"`
921 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
926 #-------------------------------------------------------------------------------
927 # Set Default NaCl options
928 #-------------------------------------------------------------------------------
929 if [ "$CFG_EMBEDDED" = "nacl" ]; then
930 echo "Setting NaCl options:"
940 if [ `uname` = "Linux" ]; then
941 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
942 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
944 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
945 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
948 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
959 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
960 QT_CONFIG="$QT_CONFIG nacl"
963 #-------------------------------------------------------------------------------
964 # parse command line arguments
965 #-------------------------------------------------------------------------------
967 # parse the arguments, setting things to "yes" or "no"
968 while [ "$#" -gt 0 ]; do
972 #Autoconf style options
974 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
978 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
982 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
983 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
986 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
990 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
994 -no-*-*|-plugin-*-*|-qt-*-*)
995 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
996 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1011 #Qt style no options
1013 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1016 #Qt style yes options
1017 -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)
1018 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1021 #Qt style options that pass an argument
1023 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1025 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1029 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1033 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1034 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1038 #Qt style complex options in one command
1039 -enable-*|-disable-*)
1040 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1041 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1043 #Qt Builtin/System style options
1044 -no-*|-system-*|-qt-*)
1045 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1046 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1048 #Options that cannot be generalized
1055 # this option may or may not be followed by an argument
1056 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1063 -embedded-lite|-qpa)
1065 # this option may or may not be followed by an argument
1066 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1079 # this option may or may not be followed by an argument
1080 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1089 # this option may or may not be followed by an argument
1090 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1098 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1099 # this option may or may not be followed by an argument
1100 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1109 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1113 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1127 if [ "$1" = "-D" ]; then
1131 VAL=`echo $1 | sed 's,-D,,'`
1136 # this option may or may not be followed by an argument
1137 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1146 if [ "$1" = "-I" ]; then
1150 VAL=`echo $1 | sed 's,-I,,'`
1155 if [ "$1" = "-L" ]; then
1159 VAL=`echo $1 | sed 's,-L,,'`
1164 if [ "$1" = "-R" ]; then
1168 VAL=`echo $1 | sed 's,-R,,'`
1173 VAL=`echo $1 | sed 's,-l,,'`
1177 if [ "$1" = "-F" ]; then
1181 VAL=`echo $1 | sed 's,-F,,'`
1186 if [ "$1" = "-fw" ]; then
1190 VAL=`echo $1 | sed 's,-fw,,'`
1198 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1205 if [ "$UNKNOWN_ARG" = "yes" ]; then
1206 echo "$1: unknown argument"
1217 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1218 CFG_ACCESSIBILITY="$VAL"
1227 CFG_USE_GNUMAKE="$VAL"
1230 CFG_MYSQL_CONFIG="$VAL"
1233 QT_INSTALL_PREFIX="$VAL"
1236 QT_HOST_PREFIX="$VAL"
1239 QT_FORCE_PKGCONFIG=yes
1242 QT_INSTALL_DOCS="$VAL"
1245 QT_INSTALL_HEADERS="$VAL"
1248 QT_INSTALL_PLUGINS="$VAL"
1251 QT_INSTALL_IMPORTS="$VAL"
1254 QT_INSTALL_DATA="$VAL"
1257 QT_INSTALL_LIBS="$VAL"
1266 QT_INSTALL_TRANSLATIONS="$VAL"
1268 sysconfdir|settingsdir)
1269 QT_INSTALL_SETTINGS="$VAL"
1272 QT_INSTALL_EXAMPLES="$VAL"
1275 QT_INSTALL_TESTS="$VAL"
1284 QT_INSTALL_BINS="$VAL"
1306 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1313 if [ "$VAL" = "little" ]; then
1314 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1315 elif [ "$VAL" = "big" ]; then
1316 CFG_ENDIAN="Q_BIG_ENDIAN"
1322 if [ "$VAL" = "little" ]; then
1323 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1324 elif [ "$VAL" = "big" ]; then
1325 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1331 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1338 CFG_QWS_DEPTHS="$VAL"
1341 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1342 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1343 [ "$VAL" = "es2" ]; then
1345 if [ "$VAL" = "es2" ]; then
1353 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1355 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1362 qvfb) # left for commandline compatibility, not documented
1363 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1364 if [ "$VAL" = "yes" ]; then
1365 QMakeVar add gfx-drivers qvfb
1366 QMakeVar add kbd-drivers qvfb
1367 QMakeVar add mouse-drivers qvfb
1368 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1369 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1370 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1377 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1380 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1389 if [ "$PLATFORM_MAC" = "yes" ]; then
1396 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1397 CFG_MAC_DWARF2="$VAL"
1403 # if this is a Mac then "windows" probably means
1404 # we are cross-compiling for MinGW
1405 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1406 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1415 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1416 CFG_MAC_HARFBUZZ="$VAL"
1423 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1424 CFG_FRAMEWORK="$VAL"
1430 if [ "$VAL" = "yes" ]; then
1432 QMakeVar add QMAKE_CFLAGS -pg
1433 QMakeVar add QMAKE_CXXFLAGS -pg
1434 QMakeVar add QMAKE_LFLAGS -pg
1435 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1441 if [ "$VAL" = "yes" ]; then
1442 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1445 exceptions|g++-exceptions)
1446 if [ "$VAL" = "no" ]; then
1448 elif [ "$VAL" = "yes" ]; then
1456 # keep compatibility with old platform names
1462 PLATFORM=hpux-acc-o64
1465 PLATFORM=hpux-acc-64
1468 PLATFORM=hpux-acc-64
1480 PLATFORM=reliant-cds-64
1483 PLATFORM=solaris-cc-64
1486 PLATFORM=unixware-cc
1489 PLATFORM=unixware-g++
1492 PLATFORM=unixware-cc
1495 PLATFORM=unixware-g++
1501 i386) NATIVE_64_ARCH="x86_64" ;;
1502 powerpc) NATIVE_64_ARCH="ppc64" ;;
1503 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1505 if [ ! -z "$NATIVE_64_ARCH" ]; then
1506 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1513 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1516 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1517 CFG_DEBUG_RELEASE="$VAL"
1523 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1524 CFG_RELEASE_QMAKE="$VAL"
1530 if [ "$VAL" = "yes" ]; then
1532 elif [ "$VAL" = "no" ]; then
1539 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1540 CFG_PREFIX_INSTALL="$VAL"
1548 developer-build|commercial|opensource)
1549 # These switches have been dealt with already
1552 if [ "$VAL" = "yes" ]; then
1554 elif [ "$VAL" = "no" ]; then
1561 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1562 CFG_INCREMENTAL="$VAL"
1568 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1569 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1575 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1576 if [ "$VAL" = "no" ]; then
1577 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1578 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1579 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1585 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1592 if [ "$VAL" = "no" ]; then
1599 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1607 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1614 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1621 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1628 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1635 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1642 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1656 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1663 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1664 CFG_PRECOMPILE="$VAL"
1669 separate-debug-info)
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1671 CFG_SEPARATE_DEBUG_INFO="$VAL"
1672 elif [ "$VAL" = "nocopy" ] ; then
1673 CFG_SEPARATE_DEBUG_INFO="yes"
1674 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1680 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1681 CFG_REDUCE_EXPORTS="$VAL"
1687 if [ "$VAL" = "no" ]; then
1694 if [ "$VAL" = "no" ]; then
1701 if [ "$VAL" = "no" ]; then
1708 if [ "$VAL" = "no" ]; then
1715 if [ "$VAL" = "no" ]; then
1722 if [ "$VAL" = "no" ]; then
1729 if [ "$VAL" = "no" ]; then
1736 if [ "$VAL" = "no" ]; then
1743 if [ "$VAL" = "no" ]; then
1753 if [ "$VAL" = "no" ]; then
1760 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1761 CFG_REDUCE_RELOCATIONS="$VAL"
1767 [ "$VAL" = "qt" ] && VAL=yes
1768 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1769 CFG_QWS_FREETYPE="$VAL"
1775 [ "$VAL" = "qt" ] && VAL=yes
1776 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1781 # No longer supported:
1782 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1785 if [ "$VAL" = "system" ]; then
1792 [ "$VAL" = "yes" ] && VAL=qt
1793 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1800 [ "$VAL" = "yes" ] && VAL=qt
1801 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1808 [ "$VAL" = "yes" ] && VAL=qt
1809 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1816 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1823 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1830 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1837 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1844 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1851 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1858 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1859 CFG_FONTCONFIG="$VAL"
1865 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1872 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1879 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1886 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1893 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1900 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1907 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1908 CFG_GSTREAMER="$VAL"
1914 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1915 CFG_QGTKSTYLE="$VAL"
1921 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1924 if [ "$VAL" = "no" ]; then
1932 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1934 elif [ "$VAL" = "runtime" ]; then
1941 if [ "$VAL" = "yes" ]; then
1948 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1955 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1956 CFG_LARGEFILE="$VAL"
1962 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1969 if [ "$VAL" = "yes" ]; then
1970 CFG_OPENSSL="linked"
1976 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1977 CFG_XMLPATTERNS="yes"
1979 if [ "$VAL" = "no" ]; then
1980 CFG_XMLPATTERNS="no"
1987 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1990 if [ "$VAL" = "no" ]; then
1998 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1999 CFG_SCRIPTTOOLS="yes"
2001 if [ "$VAL" = "no" ]; then
2002 CFG_SCRIPTTOOLS="no"
2009 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2012 if [ "$VAL" = "no" ]; then
2020 if [ "$VAL" = "yes" ]; then
2023 if [ "$VAL" = "no" ]; then
2031 if [ "$VAL" = "yes" ]; then
2032 CFG_DECLARATIVE="yes"
2034 if [ "$VAL" = "no" ]; then
2035 CFG_DECLARATIVE="no"
2042 if [ "$VAL" = "yes" ]; then
2043 CFG_DECLARATIVE_DEBUG="yes"
2045 if [ "$VAL" = "no" ]; then
2046 CFG_DECLARATIVE_DEBUG="no"
2053 [ "$VAL" = "auto" ] && VAL="yes"
2057 if [ "$VAL" = "yes" ]; then
2060 if [ "$VAL" = "no" ]; then
2068 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2069 CFG_JAVASCRIPTCORE_JIT="$VAL"
2075 if [ "$VAL" = "yes" ]; then
2076 OPT_CONFIRM_LICENSE="$VAL"
2082 if [ "$VAL" = "yes" ]; then
2088 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2089 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2090 # if autoconf style options were used, $VAL can be "yes" or "no"
2091 [ "$VAL" = "yes" ] && VAL=qt
2092 # now $VAL should be "no", "qt", or "plugin"... double-check
2093 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2096 # now $VAL is "no", "qt", or "plugin"
2098 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2099 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2101 # Grab the available values
2104 avail="$CFG_SQL_AVAILABLE"
2107 avail="$CFG_GFX_AVAILABLE"
2108 if [ "$OPT" = "plugin" ]; then
2109 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2113 avail="$CFG_DECORATION_AVAILABLE"
2114 if [ "$OPT" = "plugin" ]; then
2115 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2119 avail="$CFG_KBD_AVAILABLE"
2120 if [ "$OPT" = "plugin" ]; then
2121 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2125 avail="$CFG_MOUSE_AVAILABLE"
2126 if [ "$OPT" = "plugin" ]; then
2127 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2131 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2132 if [ "$OPT" != "plugin" ]; then
2133 # png is always built in
2139 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2143 # Check that that user's value is available.
2146 if [ "$VAL" = "$d" ]; then
2151 [ "$found" = yes ] || ERROR=yes
2153 if [ "$VAR" = "sql" ]; then
2154 # set the CFG_SQL_driver
2155 eval "CFG_SQL_$VAL=\$OPT"
2157 elif [ "$VAR" = "imageformat" ]; then
2158 [ "$OPT" = "qt" ] && OPT=yes
2159 VAL="`echo $VAL |tr a-z A-Z`"
2160 eval "CFG_$VAL=$OPT"
2164 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2165 if [ "$OPT" = "plugin" ]; then
2166 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2167 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2168 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2169 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2170 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2171 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2172 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2173 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2176 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2177 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2178 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2179 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2180 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2184 QMakeVar add "${VAR}s" "${VAL}"
2185 elif [ "$OPT" = "no" ]; then
2186 PLUG_VAR="${VAR}-plugin"
2187 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2188 IN_VAR="${VAR}-driver"
2192 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2193 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2194 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2195 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2196 QMakeVar del "${IN_VAR}s" "$VAL"
2197 QMakeVar del "${PLUG_VAR}s" "$VAL"
2199 if [ "$ERROR" = "yes" ]; then
2200 echo "$CURRENT_OPT: unknown argument"
2205 if [ "$VAL" = "yes" ]; then
2206 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2207 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2211 elif [ "$VAL" = "no" ]; then
2212 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2213 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2222 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2229 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2236 D_FLAGS="$D_FLAGS \"$VAL\""
2239 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2242 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2245 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2248 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2251 if [ "$PLATFORM_MAC" = "yes" ]; then
2252 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2253 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2259 if [ "$PLATFORM_MAC" = "yes" ]; then
2260 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2266 W_FLAGS="$W_FLAGS \"${VAL}\""
2272 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2279 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2280 CFG_PHONON_BACKEND="$VAL"
2286 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2287 CFG_MULTIMEDIA="$VAL"
2299 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2300 CFG_AUDIO_BACKEND="$VAL"
2306 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2313 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2314 CFG_FORCE_ASSERTS="$VAL"
2323 if [ "$UNKNOWN_OPT" = "yes" ]; then
2324 echo "${CURRENT_OPT}: invalid command-line switch"
2330 # update QT_CONFIG to show our current predefined configuration
2331 case "$CFG_QCONFIG" in
2332 minimal|small|medium|large|full)
2333 # these are a sequence of increasing functionality
2334 for c in minimal small medium large full; do
2335 QT_CONFIG="$QT_CONFIG $c-config"
2336 [ "$CFG_QCONFIG" = $c ] && break
2340 # not known to be sufficient for anything
2341 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2342 echo >&2 "Error: configuration file not found:"
2343 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2345 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2350 #-------------------------------------------------------------------------------
2351 # build tree initialization
2352 #-------------------------------------------------------------------------------
2354 # where to find which..
2355 unixtests="$relpath/config.tests/unix"
2356 mactests="$relpath/config.tests/mac"
2357 WHICH="$unixtests/which.test"
2359 PERL=`$WHICH perl 2>/dev/null`
2361 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2363 for e in gawk nawk awk; do
2364 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2371 PERL="/usr/bin/perl"
2372 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2376 ### skip this if the user just needs help...
2377 if [ "$OPT_HELP" != "yes" ]; then
2379 # is this a shadow build?
2380 if [ "$OPT_SHADOW" = "maybe" ]; then
2382 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2383 if [ -h "$outpath" ]; then
2384 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2390 if [ "$OPT_SHADOW" = "yes" ]; then
2391 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2392 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2393 echo >&2 "Cannot proceed."
2396 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2399 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2401 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2402 echo "Qt can be built in release mode with separate debug information, so"
2403 echo "-debug-and-release is not necessary anymore"
2407 if [ "$CFG_SILENT" = "yes" ]; then
2408 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2411 # if the source tree is different from the build tree,
2412 # symlink or copy part of the sources
2413 if [ "$OPT_SHADOW" = "yes" ]; then
2414 echo "Preparing build tree..."
2416 if [ -z "$PERL" ]; then
2418 echo "You need perl in your PATH to make a shadow build."
2419 echo "Cannot proceed."
2423 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2425 # symlink the qmake directory
2426 find "$relpath/qmake" | while read a; do
2427 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2428 if [ '!' -f "$my_a" ]; then
2429 if [ -d "$a" ]; then
2430 # directories are created...
2433 a_dir=`dirname "$my_a"`
2434 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2435 # ... and files are symlinked
2436 case `basename "$a"` in
2437 *.o|*.d|GNUmakefile*|qmake)
2448 # make a syncqt script that can be used in the shadow
2449 rm -f "$outpath/bin/syncqt"
2450 if [ -x "$relpath/bin/syncqt" ]; then
2451 mkdir -p "$outpath/bin"
2452 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2453 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2454 chmod 755 "$outpath/bin/syncqt"
2457 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2458 rm -f "$outpath/bin/$i"
2459 if [ -x "$relpath/bin/$i" ]; then
2460 mkdir -p "$outpath/bin"
2461 echo "#!/bin/sh" >"$outpath/bin/$i"
2462 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2463 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2464 chmod 755 "$outpath/bin/$i"
2468 # symlink the mkspecs directory
2469 mkdir -p "$outpath/mkspecs"
2470 rm -rf "$outpath"/mkspecs/*
2471 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2472 rm -f "$outpath/mkspecs/default"
2476 rm -rf "$outpath/mkspecs/$1"
2477 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2478 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2481 # Special case for mkspecs/features directory.
2482 # To be able to place .prf files into a shadow build directory,
2483 # we're creating links for files only. The directory structure is reproduced.
2484 ShadowMkspecs features
2486 # The modules dir is special, too.
2487 ShadowMkspecs modules
2489 # symlink the doc directory
2490 rm -rf "$outpath/doc"
2491 ln -s "$relpath/doc" "$outpath/doc"
2493 # make sure q3porting.xml can be found
2494 mkdir -p "$outpath/tools/porting/src"
2495 rm -f "$outpath/tools/porting/src/q3porting.xml"
2496 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2499 # symlink fonts to be able to run application from build directory
2500 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2501 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2502 mkdir -p "${outpath}/lib"
2503 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2507 if [ "$OPT_FAST" = "auto" ]; then
2508 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2515 # find a make command
2516 if [ -z "$MAKE" ]; then
2518 for mk in gmake make; do
2519 if "$WHICH" $mk >/dev/null 2>&1; then
2524 if [ -z "$MAKE" ]; then
2525 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2526 echo >&2 "Cannot proceed."
2529 # export MAKE, we need it later in the config.tests
2535 #-------------------------------------------------------------------------------
2536 # auto-detect all that hasn't been specified in the arguments
2537 #-------------------------------------------------------------------------------
2539 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2540 if [ "$CFG_EMBEDDED" != "no" ]; then
2541 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2543 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2544 if [ -z "$XPLATFORM" ]; then
2545 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2546 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2550 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2551 if [ -z "$XPLATFORM" ]; then
2552 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2553 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2557 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2558 if [ -z "$XPLATFORM" ]; then
2559 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2560 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2564 if [ -z "$PLATFORM" ]; then
2565 case "$UNAME_MACHINE" in
2567 PLATFORM=qws/linux-x86-g++
2570 PLATFORM=qws/linux-x86_64-g++
2573 PLATFORM=qws/linux-generic-g++
2577 if [ -z "$XPLATFORM" ]; then
2578 if [ "$CFG_EMBEDDED" = "auto" ]; then
2579 if [ -n "$CFG_ARCH" ]; then
2580 CFG_EMBEDDED=$CFG_ARCH
2582 case "$UNAME_MACHINE" in
2590 CFG_EMBEDDED=generic
2595 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2599 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2600 if [ -z "$XPLATFORM" ]; then
2601 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2602 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2606 if [ -z "$XPLATFORM" ]; then
2611 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2618 if [ -z "$PLATFORM" ]; then
2620 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2622 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2624 # PLATFORM=macx-xcode
2631 #PLATFORM=aix-g++-64
2633 #PLATFORM=aix-xlc-64
2635 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2645 # PLATFORM=dynix-g++
2651 PLATFORM=freebsd-g++
2653 - Also available for FreeBSD: freebsd-icc
2657 PLATFORM=openbsd-g++
2668 #PLATFORM=irix-cc-64
2670 - Also available for IRIX: irix-g++ irix-cc-64
2674 case "$UNAME_MACHINE" in
2676 #PLATFORM=hpuxi-acc-32
2677 PLATFORM=hpuxi-acc-64
2679 - Also available for HP-UXi: hpuxi-acc-32
2685 #PLATFORM=hpux-acc-64
2687 #PLATFORM=hpux-acc-o64
2689 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2698 - Also available for Tru64: tru64-g++
2702 case "$UNAME_MACHINE" in
2704 PLATFORM=linux-g++-64
2711 - Also available for Linux: linux-kcc linux-icc linux-cxx
2715 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2716 PLATFORM="solaris-g++"
2718 #PLATFORM=solaris-g++
2720 #PLATFORM=solaris-cc64
2723 - Also available for Solaris: solaris-g++ solaris-cc-64
2726 ReliantUNIX-*:*|SINIX-*:*)
2727 PLATFORM=reliant-cds
2728 #PLATFORM=reliant-cds-64
2730 - Also available for Reliant UNIX: reliant-cds-64
2740 #PLATFORM=unixware-g++
2741 PLATFORM=unixware-cc
2743 - Also available for OpenUNIX: unixware-g++
2747 #PLATFORM=unixware-g++
2748 PLATFORM=unixware-cc
2750 - Also available for UnixWare: unixware-g++
2757 - Also available for SCO OpenServer: sco-g++
2761 PLATFORM=unixware-g++
2764 PLATFORM=unsupported/qnx-g++
2767 if [ "$OPT_HELP" != "yes" ]; then
2769 for p in $PLATFORMS; do
2770 echo " $relconf $* -platform $p"
2773 echo " The build script does not currently recognize all" >&2
2774 echo " platforms supported by Qt." >&2
2775 echo " Rerun this script with a -platform option listed to" >&2
2776 echo " set the system/compiler combination you use." >&2
2783 if [ "$PLATFORM_QWS" = "yes" ]; then
2785 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2787 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2790 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2792 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2793 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2795 if [ -d "$PLATFORM" ]; then
2796 QMAKESPEC="$PLATFORM"
2798 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2800 if [ -d "$XPLATFORM" ]; then
2801 XQMAKESPEC="$XPLATFORM"
2803 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2805 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2806 QT_CROSS_COMPILE=yes
2807 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2810 if [ "$PLATFORM_MAC" = "yes" ]; then
2811 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2813 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2814 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2815 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2816 echo " built with 'macx-g++'" >&2
2822 # check specified platforms are supported
2823 if [ '!' -d "$QMAKESPEC" ]; then
2825 echo " The specified system/compiler is not supported:"
2829 echo " Please see the README file for a complete list."
2833 if [ '!' -d "$XQMAKESPEC" ]; then
2835 echo " The specified system/compiler is not supported:"
2839 echo " Please see the README file for a complete list."
2843 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2845 echo " The specified system/compiler port is not complete:"
2847 echo " $XQMAKESPEC/qplatformdefs.h"
2849 echo " Please contact qt-info@nokia.com."
2854 # now look at the configs and figure out what platform we are config'd for
2855 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2856 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2858 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2860 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2861 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2862 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2863 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2864 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2868 #-------------------------------------------------------------------------------
2869 # determine the system architecture
2870 #-------------------------------------------------------------------------------
2871 if [ "$OPT_VERBOSE" = "yes" ]; then
2872 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2875 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2876 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2878 echo "You have specified a target architecture with -embedded and -arch."
2879 echo "The two architectures you have specified are different, so we can"
2880 echo "not proceed. Either set both to be the same, or only use -embedded."
2886 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2887 case `basename "$XPLATFORM"` in
2890 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2892 echo "Please contact qt-info@nokia.com to upgrade your license to"
2893 echo "include this platform, or install the Qt Open Source Edition"
2894 echo "if you intend to develop free software."
2900 if [ -z "${CFG_HOST_ARCH}" ]; then
2901 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2903 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2904 case "$CFG_HOST_ARCH" in
2909 if [ "$OPT_VERBOSE" = "yes" ]; then
2910 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2914 CFG_HOST_ARCH=`uname -p`
2915 if [ "$OPT_VERBOSE" = "yes" ]; then
2916 echo " SGI ($CFG_HOST_ARCH)"
2920 case "$UNAME_MACHINE" in
2922 if [ "$OPT_VERBOSE" = "yes" ]; then
2923 echo " Sun SPARC (sparc)"
2930 if [ "$OPT_VERBOSE" = "yes" ]; then
2931 echo " 64-bit AMD 80x86 (x86_64)"
2933 CFG_HOST_ARCH=x86_64
2936 if [ "$OPT_VERBOSE" = "yes" ]; then
2937 echo " 32-bit Intel 80x86 (i386)"
2945 case "$UNAME_MACHINE" in
2947 if [ "$OPT_VERBOSE" = "yes" ]; then
2948 echo " 32-bit Apple PowerPC (powerpc)"
2952 if [ "$OPT_VERBOSE" = "yes" ]; then
2953 echo " 32-bit Intel 80x86 (i386)"
2957 CFG_HOST_ARCH=macosx
2960 if [ "$OPT_VERBOSE" = "yes" ]; then
2961 echo " 64-bit IBM PowerPC (powerpc)"
2963 CFG_HOST_ARCH=powerpc
2966 if [ "$OPT_VERBOSE" = "yes" ]; then
2967 echo " HP PA-RISC (parisc)"
2969 CFG_HOST_ARCH=parisc
2972 if [ "$OPT_VERBOSE" = "yes" ]; then
2973 echo " 32-bit Intel 80x86 (i386)"
2977 *:*:x86_64|*:*:amd64)
2978 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2979 if [ "$OPT_VERBOSE" = "yes" ]; then
2980 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2984 if [ "$OPT_VERBOSE" = "yes" ]; then
2985 echo " 64-bit AMD 80x86 (x86_64)"
2987 CFG_HOST_ARCH=x86_64
2991 if [ "$OPT_VERBOSE" = "yes" ]; then
2992 echo " 32-bit PowerPC (powerpc)"
2994 CFG_HOST_ARCH=powerpc
2997 if [ "$OPT_VERBOSE" = "yes" ]; then
2998 echo " 64-bit PowerPC (powerpc)"
3000 CFG_HOST_ARCH=powerpc
3003 if [ "$OPT_VERBOSE" = "yes" ]; then
3004 echo " IBM S/390 (s390)"
3009 if [ "$OPT_VERBOSE" = "yes" ]; then
3015 if [ "$OPT_VERBOSE" = "yes" ]; then
3016 echo " Linux on SPARC"
3021 case "$UNAME_MACHINE" in
3023 if [ "$OPT_VERBOSE" = "yes" ]; then
3024 echo " QNX on Intel 80x86 (i386)"
3031 if [ "$OPT_VERBOSE" = "yes" ]; then
3032 echo " Trying '$UNAME_MACHINE'..."
3034 CFG_HOST_ARCH="$UNAME_MACHINE"
3039 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3040 if [ -n "$CFG_ARCH" ]; then
3041 CFG_EMBEDDED=$CFG_ARCH
3044 case "$CFG_EMBEDDED" in
3067 CFG_ARCH="$CFG_EMBEDDED"
3070 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3071 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3072 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3073 CFG_ARCH=$CFG_HOST_ARCH
3080 # previously, armv6 was a different arch
3086 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3087 if [ "$OPT_VERBOSE" = "yes" ]; then
3088 echo " '$CFG_ARCH' is supported"
3091 if [ "$OPT_VERBOSE" = "yes" ]; then
3092 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3096 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3097 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3098 if [ "$OPT_VERBOSE" = "yes" ]; then
3099 echo " '$CFG_HOST_ARCH' is supported"
3102 if [ "$OPT_VERBOSE" = "yes" ]; then
3103 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3105 CFG_HOST_ARCH=generic
3109 if [ "$OPT_VERBOSE" = "yes" ]; then
3110 echo "System architecture: '$CFG_ARCH'"
3111 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3112 echo "Host architecture: '$CFG_HOST_ARCH'"
3116 #-------------------------------------------------------------------------------
3117 # tests that don't need qmake (must be run before displaying help)
3118 #-------------------------------------------------------------------------------
3120 # detect build style
3121 if [ "$CFG_DEBUG" = "auto" ]; then
3122 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3123 CFG_DEBUG_RELEASE=yes
3125 elif [ "$CFG_DEV" = "yes" ]; then
3126 CFG_DEBUG_RELEASE=no
3129 CFG_DEBUG_RELEASE=no
3133 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3134 QT_CONFIG="$QT_CONFIG build_all"
3137 if [ -z "$PKG_CONFIG" ]; then
3138 # See if PKG_CONFIG is set in the mkspec:
3139 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3141 if [ -z "$PKG_CONFIG" ]; then
3142 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3145 # Work out if we can use pkg-config
3146 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3147 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3149 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3150 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3151 echo >&2 "environment!"
3153 if [ -z "$PKG_CONFIG_PATH" ]; then
3155 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3156 echo >&2 "the host compiler's .pc files will be used. This is probably"
3157 echo >&2 "not what you want."
3159 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3161 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3162 echo >&2 "been set. This means your toolchain's .pc files must contain"
3163 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3164 echo >&2 "tests are failing, please check these files."
3169 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3170 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3171 echo >&2 "dependencies"
3177 if [ ! -n "$PKG_CONFIG" ]; then
3178 QT_CONFIG="$QT_CONFIG no-pkg-config"
3181 # pass on $CFG_SDK to the configure tests.
3182 if [ '!' -z "$CFG_SDK" ]; then
3183 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3186 # find the default framework value
3187 if [ "$CFG_ARCH" = "macosx" ]; then
3188 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3189 CFG_FRAMEWORK="$CFG_SHARED"
3190 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3192 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3200 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3201 TEST_COMPILER="$CXX"
3203 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3204 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3205 if [ -z "$TEST_COMPILER" ]; then
3206 echo "ERROR: Cannot set the compiler for the configuration tests"
3211 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3212 TEST_COMPILER="nacl-gcc"
3216 if [ -n "$CFG_SYSROOT" ]; then
3217 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3218 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3219 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3221 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3225 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3227 # auto-detect precompiled header support
3228 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3229 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3236 #auto-detect DWARF2 on the mac
3237 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3238 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3245 # don't autodetect support for separate debug info on objcopy when
3246 # cross-compiling as lots of toolchains seems to have problems with this
3247 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3248 CFG_SEPARATE_DEBUG_INFO="no"
3251 # auto-detect support for separate debug info in objcopy
3252 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3253 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3254 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3255 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3256 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3257 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3258 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3259 CFG_SEPARATE_DEBUG_INFO=no
3263 # binutils on HP-UX is buggy; default to no.
3264 CFG_SEPARATE_DEBUG_INFO=no
3267 CFG_SEPARATE_DEBUG_INFO=yes
3273 # auto-detect -fvisibility support
3274 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3275 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3276 CFG_REDUCE_EXPORTS=no
3278 CFG_REDUCE_EXPORTS=yes
3282 # detect the availability of the -Bsymbolic-functions linker optimization
3283 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3284 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3285 CFG_REDUCE_RELOCATIONS=no
3287 CFG_REDUCE_RELOCATIONS=yes
3291 # auto-detect GNU make support
3292 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3296 # If -opengl wasn't specified, don't try to auto-detect
3297 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3302 if [ "$PLATFORM_MAC" = "yes" ]; then
3303 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3308 # find the default framework value
3309 if [ "$CFG_ARCH" = "macosx" ]; then
3310 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3311 CFG_FRAMEWORK="$CFG_SHARED"
3312 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3314 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3322 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3323 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3324 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3325 # get the darwin version. 10.0.0 and up means snow leopard.
3326 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3327 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3329 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3334 # x11 tests are done after qmake is built
3337 #setup the build parts
3338 if [ -z "$CFG_BUILD_PARTS" ]; then
3339 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3341 # don't build tools by default when cross-compiling
3342 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3343 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3346 for nobuild in $CFG_NOBUILD_PARTS; do
3347 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3349 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3351 # echo "WARNING: libs is a required part of the build."
3353 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3356 #-------------------------------------------------------------------------------
3357 # post process QT_INSTALL_* variables
3358 #-------------------------------------------------------------------------------
3360 if [ -z "$QT_INSTALL_PREFIX" ]; then
3361 if [ "$CFG_DEV" = "yes" ]; then
3362 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3364 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3367 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3369 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3370 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3371 if [ "$PLATFORM_MAC" = "yes" ]; then
3372 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3375 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3378 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3380 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3381 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3382 if [ "$PLATFORM_MAC" = "yes" ]; then
3383 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3388 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3391 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3393 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3394 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3395 if [ "$PLATFORM_MAC" = "yes" ]; then
3396 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3397 QT_INSTALL_LIBS="/Libraries/Frameworks"
3401 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3403 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3405 if [ -z "$QT_INSTALL_BINS" ]; then #default
3406 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3407 if [ "$PLATFORM_MAC" = "yes" ]; then
3408 QT_INSTALL_BINS="/Developer/Applications/Qt"
3411 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3413 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3415 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3416 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3417 if [ "$PLATFORM_MAC" = "yes" ]; then
3418 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3421 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3423 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3425 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3426 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3427 if [ "$PLATFORM_MAC" = "yes" ]; then
3428 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3431 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3433 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3435 if [ -z "$QT_INSTALL_DATA" ]; then #default
3436 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3438 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3440 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3441 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3443 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3445 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3446 if [ "$PLATFORM_MAC" = "yes" ]; then
3447 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3449 QT_INSTALL_SETTINGS=/etc/xdg
3452 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3454 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3455 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3456 if [ "$PLATFORM_MAC" = "yes" ]; then
3457 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3460 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3462 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3465 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3466 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3467 if [ "$PLATFORM_MAC" = "yes" ]; then
3468 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3471 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3473 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3475 #-------------------------------------------------------------------------------
3476 # help - interactive parts of the script _after_ this section please
3477 #-------------------------------------------------------------------------------
3479 # next, emit a usage message if something failed.
3480 if [ "$OPT_HELP" = "yes" ]; then
3481 [ "x$ERROR" = "xyes" ] && echo
3482 if [ "$CFG_NIS" = "no" ]; then
3489 if [ "$CFG_CUPS" = "no" ]; then
3496 if [ "$CFG_ICONV" = "no" ]; then
3503 if [ "$CFG_LARGEFILE" = "no" ]; then
3510 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3517 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3525 if [ "$CFG_XCB" = "no" ]; then
3533 if [ "$CFG_WAYLAND" = "no" ]; then
3540 if [ "$CFG_XINPUT2" = "no" ]; then
3549 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3550 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3551 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3552 [-release] [-debug] [-debug-and-release]
3553 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3554 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3555 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3556 [-plugin-sql-<driver>] [-system-sqlite]
3557 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3558 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3559 [-no-libpng] [-qt-libpng] [-system-libpng]
3560 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3561 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3562 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3563 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3564 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3565 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3566 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3567 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3568 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3569 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3570 [-no-openssl] [-openssl] [-openssl-linked]
3571 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3572 [-no-javascript-jit] [-javascript-jit]
3573 [-no-script] [-script] [-no-scripttools] [-scripttools]
3574 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3575 [-no-location] [-location]
3576 [additional platform specific options (see below)]
3579 Installation options:
3581 -qpa ................ This will enable the QPA build.
3582 QPA is a window system agnostic implementation of Qt.
3584 These are optional, but you may specify install directories.
3586 -prefix <dir> ...... This will install everything relative to <dir>
3587 (default $QT_INSTALL_PREFIX)
3589 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3592 -hostprefix [dir] .. Tools and libraries needed when developing
3593 applications are installed in [dir]. If [dir] is
3594 not given, the current build directory will be used.
3599 * -prefix-install .... Force a sandboxed "local" installation of
3600 Qt. This will install into
3601 $QT_INSTALL_PREFIX, if this option is
3602 disabled then some platforms will attempt a
3603 "system" install by placing default values to
3604 be placed in a system location other than
3607 You may use these to separate different parts of the install:
3609 -bindir <dir> ......... Executables will be installed to <dir>
3610 (default PREFIX/bin)
3611 -libdir <dir> ......... Libraries will be installed to <dir>
3612 (default PREFIX/lib)
3613 -docdir <dir> ......... Documentation will be installed to <dir>
3614 (default PREFIX/doc)
3615 -headerdir <dir> ...... Headers will be installed to <dir>
3616 (default PREFIX/include)
3617 -plugindir <dir> ...... Plugins will be installed to <dir>
3618 (default PREFIX/plugins)
3619 -importdir <dir> ...... Imports for QML will be installed to <dir>
3620 (default PREFIX/imports)
3621 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3623 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3624 (default PREFIX/translations)
3625 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3626 (default PREFIX/etc/settings)
3627 -examplesdir <dir> .... Examples will be installed to <dir>
3628 (default PREFIX/examples)
3629 -testsdir <dir> ....... Tests will be installed to <dir>
3630 (default PREFIX/tests)
3634 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3635 that needs to be evaluated. If the evaluation succeeds, the feature is
3636 included. Here is a short explanation of each option:
3638 * -release ........... Compile and link Qt with debugging turned off.
3639 -debug ............. Compile and link Qt with debugging turned on.
3640 -debug-and-release . Compile and link two versions of Qt, with and without
3641 debugging turned on (Mac only).
3643 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3645 -opensource ........ Compile and link the Open-Source Edition of Qt.
3646 -commercial ........ Compile and link the Commercial Edition of Qt.
3649 * -shared ............ Create and use shared Qt libraries.
3650 -static ............ Create and use static Qt libraries.
3652 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3654 -fast .............. Configure Qt quickly by generating Makefiles only for
3655 library and subdirectory targets. All other Makefiles
3656 are created as wrappers, which will in turn run qmake.
3658 -no-largefile ...... Disables large file support.
3659 + -largefile ......... Enables Qt to access files larger than 4 GB.
3662 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3669 if [ "$CFG_DBUS" = "no" ]; then
3678 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3679 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3681 -no-accessibility .. Do not compile Accessibility support.
3682 * -accessibility ..... Compile Accessibility support.
3684 $SHN -no-stl ............ Do not compile STL support.
3685 $SHY -stl ............... Compile STL support.
3687 -no-sql-<driver> ... Disable SQL <driver> entirely.
3688 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3690 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3693 Possible values for <driver>:
3694 [ $CFG_SQL_AVAILABLE ]
3696 -system-sqlite ..... Use sqlite from the operating system.
3698 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3699 + -xmlpatterns ....... Build the QtXmlPatterns module.
3700 QtXmlPatterns is built if a decent C++ compiler
3701 is used and exceptions are enabled.
3703 -no-multimedia ..... Do not build the QtMultimedia module.
3704 + -multimedia ........ Build the QtMultimedia module.
3706 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3707 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3709 -no-phonon ......... Do not build the Phonon module.
3710 + -phonon ............ Build the Phonon module.
3711 Phonon is built if a decent C++ compiler is used.
3712 -no-phonon-backend.. Do not build the platform phonon plugin.
3713 + -phonon-backend..... Build the platform phonon plugin.
3715 -no-svg ............ Do not build the SVG module.
3716 + -svg ............... Build the SVG module.
3718 -no-webkit ......... Do not build the WebKit module.
3719 + -webkit ............ Build the WebKit module.
3720 WebKit is built if a decent C++ compiler is used.
3721 -webkit-debug ...... Build the WebKit module with debug symbols.
3723 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3724 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3726 -no-script ......... Do not build the QtScript module.
3727 + -script ............ Build the QtScript module.
3729 -no-scripttools .... Do not build the QtScriptTools module.
3730 + -scripttools ....... Build the QtScriptTools module.
3732 -no-v8 ............. Do not build the V8 module.
3733 + -v8 ................ Build the V8 module.
3735 -no-declarative ..... Do not build the declarative module.
3736 + -declarative ....... Build the declarative module.
3738 -no-declarative-debug ..... Do not build the declarative debugging support.
3739 + -declarative-debug ....... Build the declarative debugging support.
3741 -no-location ....... Do not build the QtLocation module.
3742 + -location .......... Build the QtLocation module.
3744 -platform target ... The operating system and compiler you are building
3747 See the README file for a list of supported
3748 operating systems and compilers.
3751 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3753 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3754 raster - Software rasterizer
3755 opengl - Rendering via OpenGL, Experimental!
3756 openvg - Rendering via OpenVG, Experimental!
3763 -no-mmx ............ Do not compile with use of MMX instructions.
3764 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3765 -no-sse ............ Do not compile with use of SSE instructions.
3766 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3767 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3768 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3769 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3770 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3771 -no-avx ............ Do not compile with use of AVX instructions.
3772 -no-neon ........... Do not compile with use of NEON instructions.
3774 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3775 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3777 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3779 -D <string> ........ Add an explicit define to the preprocessor.
3780 -I <string> ........ Add an explicit include path.
3781 -L <string> ........ Add an explicit library path.
3783 -help, -h .......... Display this information.
3785 Third Party Libraries:
3787 -qt-zlib ........... Use the zlib bundled with Qt.
3788 + -system-zlib ....... Use zlib from the operating system.
3789 See http://www.gzip.org/zlib
3791 -no-gif ............ Do not compile GIF reading support.
3793 -no-libtiff ........ Do not compile TIFF support.
3794 -qt-libtiff ........ Use the libtiff bundled with Qt.
3795 + -system-libtiff .... Use libtiff from the operating system.
3796 See http://www.libtiff.org
3798 -no-libpng ......... Do not compile PNG support.
3799 -qt-libpng ......... Use the libpng bundled with Qt.
3800 + -system-libpng ..... Use libpng from the operating system.
3801 See http://www.libpng.org/pub/png
3803 -no-libjpeg ........ Do not compile JPEG support.
3804 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3805 + -system-libjpeg .... Use libjpeg from the operating system.
3806 See http://www.ijg.org
3808 -no-openssl ........ Do not compile support for OpenSSL.
3809 + -openssl ........... Enable run-time OpenSSL support.
3810 -openssl-linked .... Enabled linked OpenSSL support.
3814 -make <part> ....... Add part to the list of parts to be built at make time.
3815 ($QT_DEFAULT_BUILD_PARTS)
3816 -nomake <part> ..... Exclude part from the list of parts to be built.
3818 -R <string> ........ Add an explicit runtime library path to the Qt
3820 -l <string> ........ Add an explicit library.
3822 -no-rpath .......... Do not use the library install path as a runtime
3824 + -rpath ............. Link Qt libraries and executables using the library
3825 install path as a runtime library path. Equivalent
3826 to -R install_libpath
3828 -continue .......... Continue as far as possible if an error occurs.
3830 -verbose, -v ....... Print verbose information about each step of the
3833 -silent ............ Reduce the build output so that warnings and errors
3834 can be seen more easily.
3836 * -no-optimized-qmake ... Do not build qmake optimized.
3837 -optimized-qmake ...... Build qmake optimized.
3839 -no-gui ............ Don't build the Qt GUI library
3841 $NSN -no-nis ............ Do not compile NIS support.
3842 $NSY -nis ............... Compile NIS support.
3844 $CUN -no-cups ........... Do not compile CUPS support.
3845 $CUY -cups .............. Compile CUPS support.
3846 Requires cups/cups.h and libcups.so.2.
3848 $CIN -no-iconv .......... Do not compile support for iconv(3).
3849 $CIY -iconv ............. Compile support for iconv(3).
3851 $PHN -no-pch ............ Do not use precompiled header support.
3852 $PHY -pch ............... Use precompiled header support.
3854 $DBN -no-dbus ........... Do not compile the QtDBus module.
3855 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3856 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3858 -reduce-relocations ..... Reduce relocations in the libraries through extra
3859 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3860 experimental; needs GNU ld >= 2.18).
3862 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3866 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3867 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3874 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3882 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3886 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3887 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3889 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3890 $XCBY -xcb ............... Compile Xcb support.
3892 $XWN -no-wayland......... Do not compile Wayland support.
3893 $XWY -wayland .......... Compile Wayland support.
3899 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3903 $X2N -no-xinput2......... Do not compile XInput2 support.
3904 $X2Y -xinput2............ Compile XInput2 support.
3910 if [ "$PLATFORM_X11" = "yes" ]; then
3911 if [ "$CFG_SM" = "no" ]; then
3918 if [ "$CFG_XSHAPE" = "no" ]; then
3925 if [ "$CFG_XVIDEO" = "no" ]; then
3932 if [ "$CFG_XINERAMA" = "no" ]; then
3939 if [ "$CFG_FONTCONFIG" = "no" ]; then
3946 if [ "$CFG_XCURSOR" = "no" ]; then
3953 if [ "$CFG_XFIXES" = "no" ]; then
3960 if [ "$CFG_XRANDR" = "no" ]; then
3967 if [ "$CFG_XRENDER" = "no" ]; then
3974 if [ "$CFG_MITSHM" = "no" ]; then
3981 if [ "$CFG_XINPUT" = "no" ]; then
3988 if [ "$CFG_XKB" = "no" ]; then
3995 if [ "$CFG_IM" = "no" ]; then
4006 -no-gtkstyle ....... Do not build the GTK theme integration.
4007 + -gtkstyle .......... Build the GTK theme integration.
4009 * -no-nas-sound ...... Do not compile in NAS sound support.
4010 -system-nas-sound .. Use NAS libaudio from the operating system.
4011 See http://radscan.com/nas.html
4013 -egl ............... Use EGL instead of GLX to manage contexts.
4014 When building for desktop OpenGL, this option will
4015 make Qt use EGL to manage contexts rather than the
4016 GLX, which is the default. Note: For OpenGL ES, EGL
4019 -no-opengl ......... Do not support OpenGL.
4020 + -opengl <api> ...... Enable OpenGL support.
4021 With no parameter, this will auto-detect the "best"
4022 OpenGL API to use. If desktop OpenGL is available, it
4023 will be used. Use desktop or es2 for <api>
4024 to force the use of the Desktop OpenGL or
4025 OpenGL ES 2 APIs instead.
4027 -no-openvg ........ Do not support OpenVG.
4028 + -openvg ........... Enable OpenVG support.
4029 Requires EGL support, typically supplied by an OpenGL
4030 or other graphics implementation.
4032 $SMN -no-sm ............. Do not support X Session Management.
4033 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4035 $SHN -no-xshape ......... Do not compile XShape support.
4036 $SHY -xshape ............ Compile XShape support.
4037 Requires X11/extensions/shape.h.
4039 $XVN -no-xvideo ......... Do not compile XVideo support.
4040 $XVY -xvideo ............ Compile XVideo support.
4041 Requires X11/extensions/Xv.h & Xvlib.h.
4043 $SHN -no-xsync .......... Do not compile XSync support.
4044 $SHY -xsync ............. Compile XSync support.
4045 Requires X11/extensions/sync.h.
4047 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4048 $XAY -xinerama .......... Compile Xinerama support.
4049 Requires X11/extensions/Xinerama.h and libXinerama.
4050 By default, Xinerama support will be compiled if
4051 available and the shared libraries are dynamically
4054 $XCN -no-xcursor ........ Do not compile Xcursor support.
4055 $XCY -xcursor ........... Compile Xcursor support.
4056 Requires X11/Xcursor/Xcursor.h and libXcursor.
4057 By default, Xcursor support will be compiled if
4058 available and the shared libraries are dynamically
4061 $XFN -no-xfixes ......... Do not compile Xfixes support.
4062 $XFY -xfixes ............ Compile Xfixes support.
4063 Requires X11/extensions/Xfixes.h and libXfixes.
4064 By default, Xfixes support will be compiled if
4065 available and the shared libraries are dynamically
4068 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4069 $XZY -xrandr ............ Compile Xrandr support.
4070 Requires X11/extensions/Xrandr.h and libXrandr.
4072 $XRN -no-xrender ........ Do not compile Xrender support.
4073 $XRY -xrender ........... Compile Xrender support.
4074 Requires X11/extensions/Xrender.h and libXrender.
4076 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4077 $XMY -mitshm ............ Compile MIT-SHM support.
4078 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4080 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4081 $FCGY -fontconfig ........ Compile FontConfig support.
4082 Requires fontconfig/fontconfig.h, libfontconfig,
4083 freetype.h and libfreetype.
4085 $XIN -no-xinput ......... Do not compile Xinput support.
4086 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4087 which requires IRIX with wacom.h and libXi or
4088 XFree86 with X11/extensions/XInput.h and libXi.
4090 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4091 $XKY -xkb ............... Compile XKB support.
4096 if [ "$BUILD_ON_MAC" = "yes" ]; then
4101 -Fstring ........... Add an explicit framework path.
4102 -fw string ......... Add an explicit framework.
4104 * -framework ......... Build Qt as a series of frameworks and
4105 link tools against those frameworks.
4106 -no-framework ...... Do not build Qt as a series of frameworks.
4108 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4109 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4111 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
4112 Only one arch value can be specified.
4114 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4115 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4117 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4118 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4119 QT_ENABLE_HARFBUZZ environment variable.
4124 if [ "$PLATFORM_QWS" = "yes" ]; then
4126 Qt for Embedded Linux:
4128 -embedded <arch> .... This will enable the embedded build, you must have a
4129 proper license for this switch to work.
4130 Example values for <arch>: arm mips x86 generic
4134 if [ "$PLATFORM_QPA" = "yes" ]; then
4140 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4143 -xplatform target ... The target platform when cross-compiling.
4145 -no-feature-<feature> Do not compile in <feature>.
4146 -feature-<feature> .. Compile in <feature>. The available features
4147 are described in src/corelib/global/qfeatures.txt
4149 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4150 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4152 The floating point format is usually autodetected by configure. Use this
4153 to override the detected value.
4155 -little-endian ...... Target platform is little endian (LSB first).
4156 -big-endian ......... Target platform is big endian (MSB first).
4158 -host-little-endian . Host platform is little endian (LSB first).
4159 -host-big-endian .... Host platform is big endian (MSB first).
4161 You only need to specify the endianness when
4162 cross-compiling, otherwise the host
4163 endianness will be used.
4165 -no-freetype ........ Do not compile in Freetype2 support.
4166 -qt-freetype ........ Use the libfreetype bundled with Qt.
4167 * -system-freetype .... Use libfreetype from the operating system.
4168 See http://www.freetype.org/
4170 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4171 default ($CFG_QCONFIG).
4173 -no-opengl .......... Do not support OpenGL.
4174 -opengl <api> ....... Enable OpenGL ES support
4175 With no parameter, this will attempt to auto-detect
4176 OpenGL ES 2, or regular desktop OpenGL.
4177 Use es2 for <api> to override auto-detection.
4181 if [ "$PLATFORM_QWS" = "yes" ]; then
4184 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4185 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4187 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4188 by default all available decorations are on.
4189 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4190 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4191 linked to at run time.
4192 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4193 -no-decoration-<style> ....Disable decoration <style> entirely.
4194 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4196 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4197 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4198 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4199 linked to at run time.
4200 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4201 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4202 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4204 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4205 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4207 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4209 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4211 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4212 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4214 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4215 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4216 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4218 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4219 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4220 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4222 -iwmmxt ............ Compile using the iWMMXt instruction set
4223 (available on some XScale CPUs).
4227 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4228 if [ "$CFG_GLIB" = "no" ]; then
4236 $GBN -no-glib ........... Do not compile Glib support.
4237 $GBY -glib .............. Compile Glib support.
4242 [ "x$ERROR" = "xyes" ] && exit 1
4247 # -----------------------------------------------------------------------------
4248 # LICENSING, INTERACTIVE PART
4249 # -----------------------------------------------------------------------------
4251 if [ "$PLATFORM_QWS" = "yes" ]; then
4252 Platform="Qt for Embedded Linux"
4253 elif [ "$PLATFORM_QPA" = "yes" ]; then
4254 Platform="Qt Lighthouse"
4255 elif [ "$PLATFORM_MAC" = "yes" ]; then
4256 Platform="Qt for Mac OS X"
4257 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4258 Platform="Qt for Windows"
4259 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4261 Platform="Qt for Linux/X11"
4265 echo "This is the $Platform ${EditionString} Edition."
4268 if [ "$Edition" = "OpenSource" ]; then
4270 echo "You are licensed to use this software under the terms of"
4271 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4272 if [ -f "$relpath/LICENSE.GPL3" ]; then
4273 echo "You are also licensed to use this software under the terms of"
4274 echo "the GNU General Public License (GPL) versions 3."
4280 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4281 echo "You have already accepted the terms of the $LicenseType license."
4284 if [ -f "$relpath/LICENSE.GPL3" ]; then
4285 echo "Type '3' to view the GNU General Public License version 3."
4287 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4288 echo "Type 'yes' to accept this license offer."
4289 echo "Type 'no' to decline this license offer."
4291 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4295 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4297 elif [ "$acceptance" = "no" ]; then
4298 echo "You are not licensed to use this software."
4301 elif [ "$acceptance" = "3" ]; then
4302 more "$relpath/LICENSE.GPL3"
4303 elif [ "$acceptance" = "L" ]; then
4304 more "$relpath/LICENSE.LGPL"
4307 elif [ "$Edition" = "Preview" ]; then
4308 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4311 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4312 echo "You have already accepted the terms of the $LicenseType license."
4315 echo "You are licensed to use this software under the terms of"
4316 echo "the $TheLicense"
4318 echo "Type '?' to read the Preview License."
4319 echo "Type 'yes' to accept this license offer."
4320 echo "Type 'no' to decline this license offer."
4322 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4326 if [ "$acceptance" = "yes" ]; then
4328 elif [ "$acceptance" = "no" ] ;then
4329 echo "You are not licensed to use this software."
4332 elif [ "$acceptance" = "?" ]; then
4333 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4336 elif [ "$Edition" != "OpenSource" ]; then
4337 if [ -n "$ExpiryDate" ]; then
4338 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4339 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4340 Today=`date +%Y%m%d`
4341 if [ "$Today" -gt "$ExpiryDate" ]; then
4342 case "$LicenseType" in
4343 Commercial|Academic|Educational)
4344 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4346 echo "NOTICE NOTICE NOTICE NOTICE"
4348 echo " Your support and upgrade period has expired."
4350 echo " You are no longer licensed to use this version of Qt."
4351 echo " Please contact qt-info@nokia.com to renew your support"
4352 echo " and upgrades for this license."
4354 echo "NOTICE NOTICE NOTICE NOTICE"
4359 echo "WARNING WARNING WARNING WARNING"
4361 echo " Your support and upgrade period has expired."
4363 echo " You may continue to use your last licensed release"
4364 echo " of Qt under the terms of your existing license"
4365 echo " agreement. But you are not entitled to technical"
4366 echo " support, nor are you entitled to use any more recent"
4367 echo " Qt releases."
4369 echo " Please contact qt-info@nokia.com to renew your"
4370 echo " support and upgrades for this license."
4372 echo "WARNING WARNING WARNING WARNING"
4379 echo "NOTICE NOTICE NOTICE NOTICE"
4381 echo " Your Evaluation license has expired."
4383 echo " You are no longer licensed to use this software. Please"
4384 echo " contact qt-info@nokia.com to purchase license, or install"
4385 echo " the Qt Open Source Edition if you intend to develop free"
4388 echo "NOTICE NOTICE NOTICE NOTICE"
4395 TheLicense=`head -n 1 "$outpath/LICENSE"`
4397 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4398 echo "You have already accepted the terms of the $TheLicense."
4401 echo "You are licensed to use this software under the terms of"
4402 echo "the $TheLicense."
4404 echo "Type '?' to view the $TheLicense."
4405 echo "Type 'yes' to accept this license offer."
4406 echo "Type 'no' to decline this license offer."
4408 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4412 if [ "$acceptance" = "yes" ]; then
4414 elif [ "$acceptance" = "no" ]; then
4415 echo "You are not licensed to use this software."
4418 else [ "$acceptance" = "?" ]
4419 more "$outpath/LICENSE"
4424 # this should be moved somewhere else
4427 AIX_VERSION=`uname -v`
4428 if [ "$AIX_VERSION" -lt "5" ]; then
4429 QMakeVar add QMAKE_LIBS_X11 -lbind
4436 #-------------------------------------------------------------------------------
4437 # generate qconfig.cpp
4438 #-------------------------------------------------------------------------------
4439 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4441 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4442 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4443 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4444 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4445 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4446 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4447 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4448 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4449 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4450 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4451 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4452 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4453 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4454 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4456 TODAY=`date +%Y-%m-%d`
4457 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4459 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4460 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4462 /* Installation date */
4463 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4467 if [ ! -z "$QT_HOST_PREFIX" ]; then
4468 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4469 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4470 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4471 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4472 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4473 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4474 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4475 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4476 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4477 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4478 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4479 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4481 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4483 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4484 /* Installation Info */
4485 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4486 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4487 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4488 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4489 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4490 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4491 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4492 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4493 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4494 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4495 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4496 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4497 #else // QT_BOOTSTRAPPED
4501 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4502 /* Installation Info */
4503 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4504 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4505 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4506 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4507 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4508 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4509 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4510 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4511 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4512 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4513 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4514 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4517 if [ ! -z "$QT_HOST_PREFIX" ]; then
4518 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4519 #endif // QT_BOOTSTRAPPED
4524 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4525 /* strlen( "qt_lcnsxxxx" ) == 12 */
4526 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4527 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4528 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4529 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4530 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4531 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4532 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4533 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4534 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4535 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4536 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4537 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4538 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4539 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4542 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4543 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4544 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4546 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4547 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4548 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4551 # -----------------------------------------------------------------------------
4552 if [ "$LicenseType" = "Evaluation" ]; then
4553 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4554 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4555 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4558 if [ -n "$EVALKEY" ]; then
4559 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4560 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4561 /* Evaluation license key */
4562 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4564 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4568 # -----------------------------------------------------------------------------
4570 # -----------------------------------------------------------------------------
4573 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4575 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4576 if [ "$OPT_SHADOW" = "yes" ]; then
4577 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4578 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4579 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4584 # $2: optional transformation
4585 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4586 # is where the resulting variable is written to
4587 # Assumes that the optional transformation produces the same variable name for each hit
4588 setBootstrapVariable()
4590 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4596 valStart = index($0, "=") + 1
4599 if (substr($0, valStart - 2, 1) == "+") {
4603 variable = substr($0, 0, valStart - 2 - append)
4604 value = substr($0, valStart)
4605 gsub("[ \t]+", "", variable)
4606 gsub("^[ \t]+", "", value)
4607 gsub("[ \t]+$", "", value)
4609 if (append == 1 && length(combinedValue) > 0) {
4610 combinedValue = combinedValue " " value
4612 combinedValue = value
4616 if (length(combinedValue) > 0) {
4617 printf "%s = %s\n", variable, combinedValue
4623 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4624 echo "Creating qmake. Please wait..."
4627 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4628 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4629 if [ -f "$QCONFIG_H" ]; then
4630 OLD_QCONFIG_H=$QCONFIG_H
4631 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4634 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4635 # when building qmake, we use #defines for the install paths,
4636 # however they are real functions in the library
4637 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4638 mkdir -p "$outpath/src/corelib/global"
4639 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4640 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4643 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4645 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4646 rm -rf mkspecs/default
4647 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4649 for mkfile in GNUmakefile Makefile; do
4652 in_mkfile="${mkfile}.in"
4653 if [ "$mkfile" = "Makefile" ]; then
4654 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4655 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4657 in_mkfile="${mkfile}.unix"
4659 in_mkfile="$relpath/qmake/$in_mkfile"
4660 mkfile="$outpath/qmake/$mkfile"
4661 if [ -f "$mkfile" ]; then
4662 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4665 [ -f "$in_mkfile" ] || continue
4667 echo "########################################################################" > "$mkfile"
4668 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4669 echo "########################################################################" >> "$mkfile"
4672 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4673 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4674 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4676 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4677 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4680 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4681 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4682 if [ "$CFG_SILENT" = "yes" ]; then
4683 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4684 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4686 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4687 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4689 setBootstrapVariable QMAKE_CFLAGS
4690 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4691 setBootstrapVariable QMAKE_LFLAGS
4693 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4694 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4695 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4697 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4698 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4699 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4700 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4701 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4702 elif [ "$CFG_DEBUG" = "yes" ]; then
4703 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4704 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4705 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4706 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4709 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4710 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4711 for rpath in $RPATH_FLAGS; do
4712 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4715 if [ "$BUILD_ON_MAC" = "yes" ]; then
4716 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4717 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4718 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4719 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4720 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4721 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4722 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4723 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4724 if [ '!' -z "$CFG_SDK" ]; then
4725 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4726 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4727 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4728 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4729 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4732 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4733 if [ '!' -z "$D_FLAGS" ]; then
4734 for DEF in $D_FLAGS; do
4735 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4738 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4739 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4740 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4741 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4743 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4744 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4745 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4746 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4747 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4748 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4749 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4750 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4751 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4752 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4754 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4755 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4756 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4757 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4762 QMAKE_BUILD_ERROR=no
4763 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4764 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4765 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4766 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4769 #-------------------------------------------------------------------------------
4770 # tests that need qmake
4771 #-------------------------------------------------------------------------------
4773 # detect availability of float math.h functions
4774 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4775 CFG_USE_FLOATMATH=yes
4777 CFG_USE_FLOATMATH=no
4780 # detect mmx support
4781 if [ "${CFG_MMX}" = "auto" ]; then
4782 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4789 # detect 3dnow support
4790 if [ "${CFG_3DNOW}" = "auto" ]; then
4791 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4798 # detect sse support
4799 if [ "${CFG_SSE}" = "auto" ]; then
4800 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4807 # detect sse2 support
4808 if [ "${CFG_SSE2}" = "auto" ]; then
4809 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4816 # detect sse3 support
4817 if [ "${CFG_SSE3}" = "auto" ]; then
4818 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4825 # detect ssse3 support
4826 if [ "${CFG_SSSE3}" = "auto" ]; then
4827 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4834 # detect sse4.1 support
4835 if [ "${CFG_SSE4_1}" = "auto" ]; then
4836 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
4843 # detect sse4.2 support
4844 if [ "${CFG_SSE4_2}" = "auto" ]; then
4845 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
4852 # detect avx support
4853 if [ "${CFG_AVX}" = "auto" ]; then
4854 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4861 # check iWMMXt support
4862 if [ "$CFG_IWMMXT" = "yes" ]; then
4863 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4864 if [ $? != "0" ]; then
4865 echo "The iWMMXt functionality test failed!"
4866 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4871 # detect neon support
4872 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4873 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
4880 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4883 if [ "$CFG_ZLIB" = "no" ]; then
4884 # Note: Qt no longer support builds without zlib
4885 # So we force a "no" to be "auto" here.
4886 # If you REALLY really need no zlib support, you can still disable
4887 # it by doing the following:
4888 # add "no-zlib" to mkspecs/qconfig.pri
4889 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4891 # There's no guarantee that Qt will build under those conditions
4896 if [ "$CFG_ZLIB" = "auto" ]; then
4897 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
4904 if [ "$CFG_LARGEFILE" = "auto" ]; then
4905 #Large files should be enabled for all Linux systems
4909 # detect how jpeg should be built
4910 if [ "$CFG_JPEG" = "auto" ]; then
4911 if [ "$CFG_SHARED" = "yes" ]; then
4918 if [ "$CFG_LIBJPEG" = "auto" ]; then
4919 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
4926 # detect how gif should be built
4927 if [ "$CFG_GIF" = "auto" ]; then
4928 if [ "$CFG_SHARED" = "yes" ]; then
4935 # detect how tiff should be built
4936 if [ "$CFG_TIFF" = "auto" ]; then
4937 if [ "$CFG_SHARED" = "yes" ]; then
4945 if [ "$CFG_LIBTIFF" = "auto" ]; then
4946 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
4954 if [ "$CFG_LIBPNG" = "auto" ]; then
4955 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
4962 # detect accessibility
4963 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4964 CFG_ACCESSIBILITY=yes
4967 # auto-detect SQL-modules support
4968 for _SQLDR in $CFG_SQL_AVAILABLE; do
4971 if [ "$CFG_SQL_mysql" != "no" ]; then
4972 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4973 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4974 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4975 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4976 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4977 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4978 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4980 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4981 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4982 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4983 echo " You need MySql 4 or higher."
4984 echo " If you believe this message is in error you may use the continue"
4985 echo " switch (-continue) to $0 to continue."
4990 QT_LFLAGS_MYSQL_R=""
4994 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
4995 QMakeVar add CONFIG use_libmysqlclient_r
4996 if [ "$CFG_SQL_mysql" = "auto" ]; then
4997 CFG_SQL_mysql=plugin
4999 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5000 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
5001 if [ "$CFG_SQL_mysql" = "auto" ]; then
5002 CFG_SQL_mysql=plugin
5005 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5006 echo "MySQL support cannot be enabled due to functionality tests!"
5007 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5008 echo " If you believe this message is in error you may use the continue"
5009 echo " switch (-continue) to $0 to continue."
5014 QT_LFLAGS_MYSQL_R=""
5022 if [ "$CFG_SQL_psql" != "no" ]; then
5023 # Be careful not to use native pg_config when cross building.
5024 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5025 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5026 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5028 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5029 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5030 # But, respect PSQL_LIBS if set
5031 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5032 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
5033 if [ "$CFG_SQL_psql" = "auto" ]; then
5037 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5038 echo "PostgreSQL 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."
5052 if [ "$CFG_SQL_odbc" != "no" ]; then
5053 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
5054 if [ "$CFG_SQL_odbc" = "auto" ]; then
5058 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
5059 QT_LFLAGS_ODBC="-liodbc"
5060 if [ "$CFG_SQL_odbc" = "auto" ]; then
5064 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5065 echo "ODBC support cannot be enabled due to functionality tests!"
5066 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5067 echo " If you believe this message is in error you may use the continue"
5068 echo " switch (-continue) to $0 to continue."
5078 if [ "$CFG_SQL_oci" != "no" ]; then
5079 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
5080 if [ "$CFG_SQL_oci" = "auto" ]; then
5084 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5085 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5086 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5087 echo " If you believe this message is in error you may use the continue"
5088 echo " switch (-continue) to $0 to continue."
5097 if [ "$CFG_SQL_tds" != "no" ]; then
5098 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5099 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5100 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
5101 if [ "$CFG_SQL_tds" = "auto" ]; then
5105 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5106 echo "TDS support cannot be enabled due to functionality tests!"
5107 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5108 echo " If you believe this message is in error you may use the continue"
5109 echo " switch (-continue) to $0 to continue."
5118 if [ "$CFG_SQL_db2" != "no" ]; then
5119 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
5120 if [ "$CFG_SQL_db2" = "auto" ]; then
5124 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5125 echo "ODBC support cannot be enabled due to functionality tests!"
5126 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5127 echo " If you believe this message is in error you may use the continue"
5128 echo " switch (-continue) to $0 to continue."
5137 if [ "$CFG_SQL_ibase" != "no" ]; then
5138 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
5139 if [ "$CFG_SQL_ibase" = "auto" ]; then
5140 CFG_SQL_ibase=plugin
5143 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5144 echo "InterBase support cannot be enabled due to functionality tests!"
5145 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5146 echo " If you believe this message is in error you may use the continue"
5147 echo " switch (-continue) to $0 to continue."
5156 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5157 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
5158 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5159 CFG_SQL_sqlite2=plugin
5162 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5163 echo "SQLite2 support cannot be enabled due to functionality tests!"
5164 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5165 echo " If you believe this message is in error you may use the continue"
5166 echo " switch (-continue) to $0 to continue."
5175 if [ "$CFG_SQL_sqlite" != "no" ]; then
5176 SQLITE_AUTODETECT_FAILED="no"
5177 if [ "$CFG_SQLITE" = "system" ]; then
5178 if [ -n "$PKG_CONFIG" ]; then
5179 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5180 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5182 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
5183 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5184 CFG_SQL_sqlite=plugin
5186 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5188 SQLITE_AUTODETECT_FAILED="yes"
5191 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5192 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5193 CFG_SQL_sqlite=plugin
5196 SQLITE_AUTODETECT_FAILED="yes"
5200 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5201 echo "SQLite support cannot be enabled due to functionality tests!"
5202 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5203 echo " If you believe this message is in error you may use the continue"
5204 echo " switch (-continue) to $0 to continue."
5210 if [ "$OPT_VERBOSE" = "yes" ]; then
5211 echo "unknown SQL driver: $_SQLDR"
5217 # auto-detect NIS support
5218 if [ "$CFG_NIS" != "no" ]; then
5219 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
5222 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5223 echo "NIS support cannot be enabled due to functionality tests!"
5224 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5225 echo " If you believe this message is in error you may use the continue"
5226 echo " switch (-continue) to $0 to continue."
5234 # auto-detect CUPS support
5235 if [ "$CFG_CUPS" != "no" ]; then
5236 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
5239 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5240 echo "Cups support cannot be enabled due to functionality tests!"
5241 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5242 echo " If you believe this message is in error you may use the continue"
5243 echo " switch (-continue) to $0 to continue."
5251 # auto-detect iconv(3) support
5252 if [ "$CFG_ICONV" != "no" ]; then
5253 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5255 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
5257 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
5259 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
5262 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5263 echo "Iconv support cannot be enabled due to functionality tests!"
5264 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5265 echo " If you believe this message is in error you may use the continue"
5266 echo " switch (-continue) to $0 to continue."
5274 # auto-detect libdbus-1 support
5275 if [ "$CFG_DBUS" != "no" ]; then
5276 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5277 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5278 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5280 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
5281 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5282 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5283 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5285 if [ "$CFG_DBUS" = "auto" ]; then
5287 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5288 # CFG_DBUS is "yes" or "linked" here
5290 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5291 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5292 echo " If you believe this message is in error you may use the continue"
5293 echo " switch (-continue) to $0 to continue."
5299 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5300 CFG_MULTIMEDIA="$CFG_GUI"
5303 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5304 echo "QtMultimedia requested, but it can't be built without QtGui"
5308 # X11/QWS/Lighthouse
5309 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5311 # auto-detect Glib support
5312 if [ "$CFG_GLIB" != "no" ]; then
5313 if [ -n "$PKG_CONFIG" ]; then
5314 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5315 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5317 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
5319 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5320 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5322 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5323 echo "Glib support cannot be enabled due to functionality tests!"
5324 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5325 echo " If you believe this message is in error you may use the continue"
5326 echo " switch (-continue) to $0 to continue."
5334 if [ "$CFG_GUI" = "no" ]; then
5335 if [ "$CFG_PHONON" = "auto" ]; then
5338 if [ "$CFG_PHONON" != "no" ]; then
5339 echo "Phonon enabled, but GUI disabled."
5340 echo " You might need to either enable the GUI or disable Phonon"
5345 # Auto-detect GStreamer support (needed for Phonon)
5346 if [ "$CFG_PHONON" != "no" ]; then
5347 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5348 if [ -n "$PKG_CONFIG" ]; then
5349 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5350 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5352 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
5354 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5355 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5357 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5358 echo "Gstreamer support cannot be enabled due to functionality tests!"
5359 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5360 echo " If you believe this message is in error you may use the continue"
5361 echo " switch (-continue) to $0 to continue."
5367 elif [ "$CFG_GLIB" = "no" ]; then
5374 if [ "$CFG_PHONON" != "no" ]; then
5375 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5376 if [ "$CFG_GSTREAMER" = "yes" ]; then
5379 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5380 echo "Phonon support cannot be enabled due to functionality tests!"
5381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5382 echo " If you believe this message is in error you may use the continue"
5383 echo " switch (-continue) to $0 to continue."
5394 # auto-detect libicu support
5395 if [ "$CFG_ICU" != "no" ]; then
5396 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5397 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5399 if [ "$CFG_ICU" = "auto" ]; then
5401 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5404 echo "The ICU library support cannot be enabled."
5405 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5406 echo " If you believe this message is in error you may use the continue"
5407 echo " switch (-continue) to $0 to continue."
5413 # Auto-detect PulseAudio support
5414 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5415 if [ -n "$PKG_CONFIG" ]; then
5416 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5417 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5419 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
5421 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5422 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5424 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5425 echo "PulseAudio support cannot be enabled due to functionality tests!"
5426 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5427 echo " If you believe this message is in error you may use the continue"
5428 echo " switch (-continue) to $0 to continue."
5435 fi # X11/QWS/Lighthouse
5438 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5439 x11tests="$relpath/config.tests/x11"
5442 # work around broken X11 headers when using GCC 2.95 or later
5444 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5445 if [ $NOTYPE = "yes" ]; then
5446 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5447 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5450 # Check we actually have X11 :-)
5451 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5452 if [ $? != "0" ]; then
5453 echo "Basic XLib functionality test failed!"
5454 echo " You might need to modify the include and library search paths by editing"
5455 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5461 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5462 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5463 if [ "$CFG_GUI" = "no" ]; then
5464 if [ "$CFG_OPENGL" = "auto" ]; then
5467 if [ "$CFG_OPENGL" != "no" ]; then
5468 echo "OpenGL enabled, but GUI disabled."
5469 echo " You might need to either enable the GUI or disable OpenGL"
5473 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5474 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
5476 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
5478 if [ "$CFG_EGL" = "no" ]; then
5482 if [ "$CFG_OPENGL" = "yes" ]; then
5483 echo "All the OpenGL functionality tests failed!"
5484 echo " You might need to modify the include and library search paths by editing"
5485 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5486 echo " ${XQMAKESPEC}."
5493 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5494 if [ "$CFG_OPENGL" = "desktop" ]; then
5495 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5496 if [ $? != "0" ]; then
5497 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5504 elif [ "$CFG_OPENGL" = "es2" ]; then
5506 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5507 if [ $? != "0" ]; then
5508 echo "The OpenGL ES 2.0 functionality test failed!"
5509 echo " You might need to modify the include and library search paths by editing"
5510 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5511 echo " ${XQMAKESPEC}."
5514 elif [ "$CFG_OPENGL" = "desktop" ]; then
5515 # Desktop OpenGL support
5516 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5517 if [ $? != "0" ]; then
5518 echo "The OpenGL functionality test failed!"
5519 echo " You might need to modify the include and library search paths by editing"
5520 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5521 echo " ${XQMAKESPEC}."
5526 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
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 fi # X11/MINGW OpenGL
5539 if [ "$PLATFORM_X11" = "yes" ]; then
5540 # auto-detect Xcursor support
5541 if [ "$CFG_XCURSOR" != "no" ]; then
5542 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
5543 if [ "$CFG_XCURSOR" != "runtime" ]; then
5547 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5548 echo "Xcursor support cannot be enabled due to functionality tests!"
5549 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5550 echo " If you believe this message is in error you may use the continue"
5551 echo " switch (-continue) to $0 to continue."
5559 # auto-detect Xfixes support
5560 if [ "$CFG_XFIXES" != "no" ]; then
5561 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5562 if [ "$CFG_XFIXES" != "runtime" ]; then
5566 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5567 echo "Xfixes support cannot be enabled due to functionality tests!"
5568 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5569 echo " If you believe this message is in error you may use the continue"
5570 echo " switch (-continue) to $0 to continue."
5578 # auto-detect Xrandr support (resize and rotate extension)
5579 if [ "$CFG_XRANDR" != "no" ]; then
5580 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
5581 if [ "$CFG_XRANDR" != "runtime" ]; then
5585 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5586 echo "Xrandr support cannot be enabled due to functionality tests!"
5587 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5588 echo " If you believe this message is in error you may use the continue"
5589 echo " switch (-continue) to $0 to continue."
5597 # auto-detect Xrender support
5598 if [ "$CFG_XRENDER" != "no" ]; then
5599 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
5602 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5603 echo "Xrender support cannot be enabled due to functionality tests!"
5604 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5605 echo " If you believe this message is in error you may use the continue"
5606 echo " switch (-continue) to $0 to continue."
5614 # Additional check to decide if WebKit support will be included
5615 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5616 echo "Warning: -no-xrender will disable the QtWebkit module."
5620 # auto-detect MIT-SHM support
5621 if [ "$CFG_MITSHM" != "no" ]; then
5622 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
5625 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5626 echo "MITSHM support cannot be enabled due to functionality tests!"
5627 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5628 echo " If you believe this message is in error you may use the continue"
5629 echo " switch (-continue) to $0 to continue."
5637 # auto-detect FontConfig support
5638 if [ "$CFG_FONTCONFIG" != "no" ]; then
5639 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5640 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5641 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5643 QT_CFLAGS_FONTCONFIG=
5644 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5646 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
5648 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5649 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5650 CFG_LIBFREETYPE=system
5652 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5653 echo "FontConfig support cannot be enabled due to functionality tests!"
5654 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5655 echo " If you believe this message is in error you may use the continue"
5656 echo " switch (-continue) to $0 to continue."
5664 # auto-detect Session Management support
5665 if [ "$CFG_SM" = "auto" ]; then
5666 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
5669 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5670 echo "Session Management support cannot be enabled due to functionality tests!"
5671 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5672 echo " If you believe this message is in error you may use the continue"
5673 echo " switch (-continue) to $0 to continue."
5681 # auto-detect SHAPE support
5682 if [ "$CFG_XSHAPE" != "no" ]; then
5683 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
5686 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5687 echo "XShape support cannot be enabled due to functionality tests!"
5688 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5689 echo " If you believe this message is in error you may use the continue"
5690 echo " switch (-continue) to $0 to continue."
5698 # auto-detect XVideo support
5699 if [ "$CFG_XVIDEO" != "no" ]; then
5700 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
5703 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5704 echo "XVideo support cannot be enabled due to functionality tests!"
5705 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5706 echo " If you believe this message is in error you may use the continue"
5707 echo " switch (-continue) to $0 to continue."
5715 # auto-detect XSync support
5716 if [ "$CFG_XSYNC" != "no" ]; then
5717 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
5720 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5721 echo "XSync support cannot be enabled due to functionality tests!"
5722 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5723 echo " If you believe this message is in error you may use the continue"
5724 echo " switch (-continue) to $0 to continue."
5732 # auto-detect Xinerama support
5733 if [ "$CFG_XINERAMA" != "no" ]; then
5734 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
5735 if [ "$CFG_XINERAMA" != "runtime" ]; then
5739 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5740 echo "Xinerama support cannot be enabled due to functionality tests!"
5741 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5742 echo " If you believe this message is in error you may use the continue"
5743 echo " switch (-continue) to $0 to continue."
5751 # auto-detect Xinput support
5752 if [ "$CFG_XINPUT" != "no" ]; then
5753 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
5754 if [ "$CFG_XINPUT" != "runtime" ]; then
5758 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5759 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5760 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5761 echo " If you believe this message is in error you may use the continue"
5762 echo " switch (-continue) to $0 to continue."
5770 # auto-detect XKB support
5771 if [ "$CFG_XKB" != "no" ]; then
5772 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
5775 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5776 echo "XKB support cannot be enabled due to functionality tests!"
5777 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5778 echo " If you believe this message is in error you may use the continue"
5779 echo " switch (-continue) to $0 to continue."
5787 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5788 if [ -n "$PKG_CONFIG" ]; then
5789 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5790 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5792 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5794 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5795 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5797 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5798 echo "Gtk theme support cannot be enabled due to functionality tests!"
5799 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5800 echo " If you believe this message is in error you may use the continue"
5801 echo " switch (-continue) to $0 to continue."
5807 elif [ "$CFG_GLIB" = "no" ]; then
5813 if [ "$PLATFORM_MAC" = "yes" ]; then
5814 if [ "$CFG_PHONON" != "no" ]; then
5815 # Always enable Phonon (unless it was explicitly disabled)
5819 if [ "$CFG_COREWLAN" = "auto" ]; then
5820 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
5829 if [ "$PLATFORM_QPA" = "yes" ]; then
5830 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5831 if [ "$CFG_ARCH" = "macosx" ]; then
5833 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5834 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
5836 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
5839 if [ "$CFG_OPENGL" = "yes" ]; then
5840 echo "All the OpenGL functionality tests failed!"
5841 echo " You might need to modify the include and library search paths by editing"
5842 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5843 echo " ${XQMAKESPEC}."
5848 elif [ "$CFG_OPENGL" = "es2" ]; then
5850 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5851 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
5852 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
5853 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5854 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5855 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5856 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5857 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5860 "$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
5861 if [ $? != "0" ]; then
5862 echo "The OpenGL ES 2.0 functionality test failed!"
5863 echo " You might need to modify the include and library search paths by editing"
5864 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5865 echo " ${XQMAKESPEC}."
5868 elif [ "$CFG_OPENGL" = "desktop" ]; then
5869 # Desktop OpenGL support
5870 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5871 if [ $? != "0" ]; then
5872 echo "The OpenGL functionality test 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 # auto-detect FontConfig support
5881 if [ "$CFG_FONTCONFIG" != "no" ]; then
5882 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5883 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5884 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5886 QT_CFLAGS_FONTCONFIG=
5887 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5889 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
5890 QT_CONFIG="$QT_CONFIG fontconfig"
5891 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5892 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5893 CFG_LIBFREETYPE=system
5898 # Save these for a check later
5899 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5900 ORIG_CFG_XCB="$CFG_XCB"
5902 if [ "$CFG_WAYLAND" != "no" ]; then
5903 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5904 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5905 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5906 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
5907 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
5909 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
5911 QT_CONFIG="$QT_CONFIG wayland"
5912 elif [ "$CFG_WAYLAND" = "yes" ]; then
5913 echo "The Wayland functionality test failed!"
5917 QMakeVar add DEFINES QT_NO_WAYLAND
5921 # Check we actually have X11 :-)
5922 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
5923 QT_CONFIG="$QT_CONFIG xlib"
5926 # auto-detect Xrender support
5927 if [ "$CFG_XRENDER" != "no" ]; then
5928 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
5930 QT_CONFIG="$QT_CONFIG xrender"
5932 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5933 echo "Xrender support cannot be enabled due to functionality tests!"
5934 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5935 echo " If you believe this message is in error you may use the continue"
5936 echo " switch (-continue) to $0 to continue."
5944 if [ "$CFG_XCB" != "no" ]; then
5945 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
5947 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
5948 QT_CONFIG="$QT_CONFIG xcb-render"
5951 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
5953 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5956 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
5957 QT_CONFIG="$QT_CONFIG xcb-xlib"
5960 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5961 # auto-detect XInput2/Xinput support
5962 if [ "$CFG_XINPUT2" != "no" ]; then
5963 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
5967 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5968 echo "XInput2 support cannot be enabled due to functionality tests!"
5969 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5970 echo " If you believe this message is in error you may use the continue"
5971 echo " switch (-continue) to $0 to continue."
5980 if [ "$CFG_XCB" = "yes" ]; then
5981 echo "The XCB test failed!"
5982 echo " You might need to install dependency packages."
5983 echo " See src/plugins/platforms/xcb/README."
5987 QMakeVar add DEFINES QT_NO_XCB
5991 # Detect libxkbcommon
5992 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5993 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5994 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5995 if [ "$CFG_WAYLAND" = "yes" ]; then
5996 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5997 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5999 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6000 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6002 if [ "$CFG_WAYLAND" = "yes" ]; then
6003 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6005 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6008 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6009 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6010 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6011 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6012 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6013 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6014 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6017 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6018 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6019 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6020 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6023 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
6024 QT_CONFIG="$QT_CONFIG coreservices"
6026 QMakeVar add DEFINES QT_NO_CORESERVICES
6029 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
6030 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6031 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6032 echo "No QPA platform plugin enabled!"
6033 echo " If you really want to build without a QPA platform plugin you must pass"
6034 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6035 echo " cannot run GUI applications."
6045 if [ "$PLATFORM_QWS" = "yes" ]; then
6047 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6048 if [ "$CFG_GUI" = "no" ]; then
6049 if [ "$CFG_OPENGL" = "auto" ]; then
6052 if [ "$CFG_OPENGL" != "no" ]; then
6053 echo "OpenGL enabled, but GUI disabled."
6054 echo " You might need to either enable the GUI or disable OpenGL"
6058 if [ "$CFG_OPENGL" = "yes" ]; then
6060 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
6063 elif [ "$CFG_OPENGL" = "es2" ]; then
6065 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6066 if [ $? != "0" ]; then
6067 echo "The OpenGL ES 2.0 functionality test failed!"
6068 echo " You might need to modify the include and library search paths by editing"
6069 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6070 echo " ${XQMAKESPEC}."
6074 elif [ "$CFG_OPENGL" = "desktop" ]; then
6075 # Desktop OpenGL support
6076 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6081 if [ "$PLATFORM_QWS" = "yes" ]; then
6084 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6085 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6086 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6087 if [ $? != "0" ]; then
6088 echo "The Ahi screen driver functionality test failed!"
6089 echo " You might need to modify the include and library search paths by editing"
6090 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6091 echo " ${XQMAKESPEC}."
6096 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6097 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6098 if [ $? != "0" ]; then
6099 echo "The SVGAlib screen driver functionality test failed!"
6100 echo " You might need to modify the include and library search paths by editing"
6101 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6102 echo " ${XQMAKESPEC}."
6107 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6108 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6109 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6110 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6111 elif directfb-config --version >/dev/null 2>&1; then
6112 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6113 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6116 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6117 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6118 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6119 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6122 "$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
6123 if [ $? != "0" ]; then
6124 echo "The DirectFB screen driver functionality test failed!"
6125 echo " You might need to modify the include and library search paths by editing"
6126 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6127 echo " ${XQMAKESPEC}."
6135 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6136 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6137 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6138 if [ $? != "0" ]; then
6139 echo "The tslib functionality test failed!"
6140 echo " You might need to modify the include and library search paths by editing"
6141 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6142 echo " ${XQMAKESPEC}."
6151 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6152 if [ $? != "0" ]; then
6153 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6160 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6161 if [ "$CFG_EGL" != "no" ]; then
6162 # detect EGL support
6163 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
6164 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6169 if [ "$EGL_VARIANT" = "none" ]; then
6170 if [ "$CFG_EGL" = "yes" ]; then
6171 echo "The EGL functionality test failed!"
6172 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6173 echo " You might need to modify the include and library search paths by editing"
6174 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6175 echo " ${XQMAKESPEC}."
6179 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6180 if [ "$CFG_OPENGL" = "es2" ]; then
6187 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6190 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6191 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6192 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6193 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6194 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
6195 CFG_LIBFREETYPE=system
6201 if [ "$CFG_ENDIAN" = "auto" ]; then
6202 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6203 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6204 elif [ "$PLATFORM_MAC" = "yes" ]; then
6207 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6209 if [ "$F" -eq 0 ]; then
6210 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6211 elif [ "$F" -eq 1 ]; then
6212 CFG_ENDIAN="Q_BIG_ENDIAN"
6215 echo "The target system byte order could not be detected!"
6216 echo "Turn on verbose messaging (-v) to see the final report."
6217 echo "You can use the -little-endian or -big-endian switch to"
6218 echo "$0 to continue."
6224 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6225 if [ "$PLATFORM_MAC" = "yes" ]; then
6228 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6230 if [ "$F" -eq 0 ]; then
6231 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6232 elif [ "$F" -eq 1 ]; then
6233 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6236 echo "The host system byte order could not be detected!"
6237 echo "Turn on verbose messaging (-v) to see the final report."
6238 echo "You can use the -host-little-endian or -host-big-endian switch to"
6239 echo "$0 to continue."
6245 if [ "$CFG_ARMFPA" != "auto" ]; then
6246 if [ "$CFG_ARMFPA" = "yes" ]; then
6247 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6248 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6250 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6253 CFG_DOUBLEFORMAT="normal"
6258 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6259 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6260 CFG_DOUBLEFORMAT=normal
6262 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6264 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6265 CFG_DOUBLEFORMAT=normal
6266 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6267 CFG_DOUBLEFORMAT=normal
6268 elif [ "$F" -eq 10 ]; then
6269 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6270 elif [ "$F" -eq 11 ]; then
6271 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6272 elif [ "$F" -eq 12 ]; then
6273 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6275 elif [ "$F" -eq 13 ]; then
6276 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6280 echo "The system floating point format could not be detected."
6281 echo "This may cause data to be generated in a wrong format"
6282 echo "Turn on verbose messaging (-v) to see the final report."
6283 # we do not fail on this since this is a new test, and if it fails,
6284 # the old behavior should be correct in most cases
6285 CFG_DOUBLEFORMAT=normal
6291 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6295 if [ "$CFG_STL" != "no" ]; then
6296 if [ "$HAVE_STL" = "yes" ]; then
6299 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6300 echo "STL support cannot be enabled due to functionality tests!"
6301 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6302 echo " If you believe this message is in error you may use the continue"
6303 echo " switch (-continue) to $0 to continue."
6311 # detect POSIX clock_gettime()
6312 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6313 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
6314 CFG_CLOCK_GETTIME=yes
6316 CFG_CLOCK_GETTIME=no
6320 # detect POSIX monotonic clocks
6321 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6322 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
6323 CFG_CLOCK_MONOTONIC=yes
6325 CFG_CLOCK_MONOTONIC=no
6327 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6328 CFG_CLOCK_MONOTONIC=no
6332 if [ "$CFG_MREMAP" = "auto" ]; then
6333 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6340 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6341 if [ "$CFG_GETADDRINFO" != "no" ]; then
6342 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6345 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6346 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6347 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6348 echo " If you believe this message is in error you may use the continue"
6349 echo " switch (-continue) to $0 to continue."
6357 # find if the platform provides inotify
6358 if [ "$CFG_INOTIFY" != "no" ]; then
6359 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6362 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6363 echo "inotify support cannot be enabled due to functionality tests!"
6364 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6365 echo " If you believe this message is in error you may use the continue"
6366 echo " switch (-continue) to $0 to continue."
6374 # find if the platform provides if_nametoindex (ipv6 interface name support)
6375 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6376 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
6379 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6380 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6382 echo " If you believe this message is in error you may use the continue"
6383 echo " switch (-continue) to $0 to continue."
6391 # find if the platform provides getifaddrs (network interface enumeration)
6392 if [ "$CFG_GETIFADDRS" != "no" ]; then
6393 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6396 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6397 echo "getifaddrs support cannot be enabled due to functionality tests!"
6398 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6399 echo " If you believe this message is in error you may use the continue"
6400 echo " switch (-continue) to $0 to continue."
6409 if [ "$CFG_OPENSSL" != "no" ]; then
6410 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
6411 if [ "$CFG_OPENSSL" = "auto" ]; then
6415 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6416 echo "OpenSSL support cannot be enabled due to functionality tests!"
6417 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6418 echo " If you believe this message is in error you may use the continue"
6419 echo " switch (-continue) to $0 to continue."
6427 # detect OpenVG support
6428 if [ "$CFG_OPENVG" != "no" ]; then
6429 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
6430 if [ "$CFG_OPENVG" = "auto" ]; then
6433 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
6434 if [ "$CFG_OPENVG" = "auto" ]; then
6437 CFG_OPENVG_ON_OPENGL=yes
6438 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
6439 if [ "$CFG_OPENVG" = "auto" ]; then
6442 CFG_OPENVG_LC_INCLUDES=yes
6443 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
6444 if [ "$CFG_OPENVG" = "auto" ]; then
6447 CFG_OPENVG_LC_INCLUDES=yes
6448 CFG_OPENVG_ON_OPENGL=yes
6450 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6451 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6452 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6453 echo " If you believe this message is in error you may use the continue"
6454 echo " switch (-continue) to $0 to continue."
6460 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
6461 CFG_OPENVG_SHIVA=yes
6465 if [ "$CFG_ALSA" = "auto" ]; then
6466 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6473 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6474 if [ "$CFG_ARCH" = "arm" ]; then
6475 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6476 if [ $? != "0" ]; then
6477 CFG_JAVASCRIPTCORE_JIT=no
6480 case "$XPLATFORM" in
6482 CFG_JAVASCRIPTCORE_JIT=no
6488 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6489 QMakeVar set JAVASCRIPTCORE_JIT yes
6490 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6491 QMakeVar set JAVASCRIPTCORE_JIT no
6494 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6495 CFG_AUDIO_BACKEND=yes
6498 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6499 echo "Warning: largefile support cannot be disabled for win32."
6503 #-------------------------------------------------------------------------------
6504 # ask for all that hasn't been auto-detected or specified in the arguments
6505 #-------------------------------------------------------------------------------
6507 ### fix this: user input should be validated in a loop
6508 if [ "$PLATFORM_QWS" = "yes" ]; then
6509 PROMPT_FOR_DEPTHS="yes"
6511 PROMPT_FOR_DEPTHS="no"
6513 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6515 echo "Choose pixel-depths to support:"
6517 echo " 1. 1bpp, black/white"
6518 echo " 4. 4bpp, grayscale"
6519 echo " 8. 8bpp, paletted"
6520 echo " 12. 12bpp, rgb 4-4-4"
6521 echo " 15. 15bpp, rgb 5-5-5"
6522 echo " 16. 16bpp, rgb 5-6-5"
6523 echo " 18. 18bpp, rgb 6-6-6"
6524 echo " 24. 24bpp, rgb 8-8-8"
6525 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6526 echo " all. All supported depths"
6528 echo "Your choices (default 8,16,32):"
6530 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6531 CFG_QWS_DEPTHS=8,16,32
6534 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6535 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6536 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6538 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6540 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6541 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6546 # enable dwarf2 support on Mac
6547 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6548 QT_CONFIG="$QT_CONFIG dwarf2"
6551 # Set the default arch if there are no "-arch" arguments on the configure line
6552 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6553 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6554 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6555 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6558 if [ "$CFG_PHONON" = "yes" ]; then
6559 # No longer needed after modularization
6560 #QT_CONFIG="$QT_CONFIG phonon"
6561 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6562 QT_CONFIG="$QT_CONFIG phonon-backend"
6565 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6568 # disable accessibility
6569 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6570 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6572 QT_CONFIG="$QT_CONFIG accessibility"
6575 # egl stuff does not belong in lighthouse, but rather in plugins
6576 if [ "$PLATFORM_QPA" = "yes" ]; then
6581 if [ "$CFG_EGL" = "no" ]; then
6582 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6584 QT_CONFIG="$QT_CONFIG egl"
6585 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6586 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6591 if [ "$CFG_OPENVG" = "no" ]; then
6592 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6594 QT_CONFIG="$QT_CONFIG openvg"
6595 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6596 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6598 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6599 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6601 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6602 QT_CONFIG="$QT_CONFIG shivavg"
6603 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6608 if [ "$CFG_OPENGL" = "no" ]; then
6609 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6611 QT_CONFIG="$QT_CONFIG opengl"
6614 if [ "$CFG_OPENGL" = "es2" ]; then
6615 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6618 if [ "$CFG_OPENGL" = "es2" ]; then
6619 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6620 QT_CONFIG="$QT_CONFIG opengles2"
6623 # safe execution environment
6624 if [ "$CFG_SXE" != "no" ]; then
6625 QT_CONFIG="$QT_CONFIG sxe"
6628 # build up the variables for output
6629 if [ "$CFG_DEBUG" = "yes" ]; then
6630 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6631 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6632 elif [ "$CFG_DEBUG" = "no" ]; then
6633 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6634 QMAKE_CONFIG="$QMAKE_CONFIG release"
6636 if [ "$CFG_SHARED" = "yes" ]; then
6637 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6638 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6639 elif [ "$CFG_SHARED" = "no" ]; then
6640 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6641 QMAKE_CONFIG="$QMAKE_CONFIG static"
6643 if [ "$PLATFORM_QWS" = "yes" ]; then
6644 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6645 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6646 QT_CONFIG="$QT_CONFIG embedded"
6647 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6649 if [ "$PLATFORM_QPA" = "yes" ]; then
6650 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6651 QT_CONFIG="$QT_CONFIG qpa"
6652 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6653 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6656 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6657 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6658 QT_CONFIG="$QT_CONFIG nacl pepper"
6659 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6662 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6663 # Do not set this here for Windows. Let qmake do it so
6664 # debug and release precompiled headers are kept separate.
6665 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6667 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6668 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6669 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6670 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6671 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6672 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6674 if [ "$CFG_STL" = "no" ]; then
6675 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6677 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6679 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6680 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6682 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6683 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6684 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6685 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6686 QMakeVar add QMAKE_CFLAGS -g
6687 QMakeVar add QMAKE_CXXFLAGS -g
6688 QT_CONFIG="$QT_CONFIG separate_debug_info"
6690 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6691 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6693 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6694 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6695 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6696 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6697 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6698 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6699 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6700 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6701 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6702 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6703 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6704 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6705 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6706 QT_CONFIG="$QT_CONFIG clock-gettime"
6708 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6709 QT_CONFIG="$QT_CONFIG clock-monotonic"
6711 if [ "$CFG_MREMAP" = "yes" ]; then
6712 QT_CONFIG="$QT_CONFIG mremap"
6714 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6715 QT_CONFIG="$QT_CONFIG getaddrinfo"
6717 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6718 QT_CONFIG="$QT_CONFIG ipv6ifname"
6720 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6721 QT_CONFIG="$QT_CONFIG getifaddrs"
6723 if [ "$CFG_INOTIFY" = "yes" ]; then
6724 QT_CONFIG="$QT_CONFIG inotify"
6726 if [ "$CFG_LIBJPEG" = "no" ]; then
6728 elif [ "$CFG_LIBJPEG" = "system" ]; then
6729 QT_CONFIG="$QT_CONFIG system-jpeg"
6731 if [ "$CFG_JPEG" = "no" ]; then
6732 QT_CONFIG="$QT_CONFIG no-jpeg"
6733 elif [ "$CFG_JPEG" = "yes" ]; then
6734 QT_CONFIG="$QT_CONFIG jpeg"
6736 if [ "$CFG_LIBPNG" = "no" ]; then
6739 if [ "$CFG_LIBPNG" = "system" ]; then
6740 QT_CONFIG="$QT_CONFIG system-png"
6742 if [ "$CFG_PNG" = "no" ]; then
6743 QT_CONFIG="$QT_CONFIG no-png"
6744 elif [ "$CFG_PNG" = "yes" ]; then
6745 QT_CONFIG="$QT_CONFIG png"
6747 if [ "$CFG_GIF" = "no" ]; then
6748 QT_CONFIG="$QT_CONFIG no-gif"
6749 elif [ "$CFG_GIF" = "yes" ]; then
6750 QT_CONFIG="$QT_CONFIG gif"
6752 if [ "$CFG_LIBTIFF" = "no" ]; then
6754 elif [ "$CFG_LIBTIFF" = "system" ]; then
6755 QT_CONFIG="$QT_CONFIG system-tiff"
6757 if [ "$CFG_TIFF" = "no" ]; then
6758 QT_CONFIG="$QT_CONFIG no-tiff"
6759 elif [ "$CFG_TIFF" = "yes" ]; then
6760 QT_CONFIG="$QT_CONFIG tiff"
6762 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6763 QT_CONFIG="$QT_CONFIG no-freetype"
6764 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6765 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6766 QT_CONFIG="$QT_CONFIG system-freetype"
6768 QT_CONFIG="$QT_CONFIG freetype"
6770 if [ "$CFG_GUI" = "auto" ]; then
6773 if [ "$CFG_GUI" = "no" ]; then
6774 QT_CONFIG="$QT_CONFIG no-gui"
6776 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6780 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6781 #On Mac we implicitly link against libz, so we
6782 #never use the 3rdparty stuff.
6783 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6785 if [ "$CFG_ZLIB" = "yes" ]; then
6786 QT_CONFIG="$QT_CONFIG zlib"
6787 elif [ "$CFG_ZLIB" = "system" ]; then
6788 QT_CONFIG="$QT_CONFIG system-zlib"
6791 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6792 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6793 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6794 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6795 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6796 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6797 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6798 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6799 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6800 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6801 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6802 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6803 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6804 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6805 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6807 if [ "$PLATFORM_X11" = "yes" ]; then
6808 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6810 # for some reason, the following libraries are not always built shared,
6811 # so *every* program/lib (including Qt) has to link against them
6812 if [ "$CFG_XSHAPE" = "yes" ]; then
6813 QT_CONFIG="$QT_CONFIG xshape"
6815 if [ "$CFG_XVIDEO" = "yes" ]; then
6816 QT_CONFIG="$QT_CONFIG xvideo"
6818 if [ "$CFG_XSYNC" = "yes" ]; then
6819 QT_CONFIG="$QT_CONFIG xsync"
6821 if [ "$CFG_XINERAMA" = "yes" ]; then
6822 QT_CONFIG="$QT_CONFIG xinerama"
6823 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6825 if [ "$CFG_XCURSOR" = "yes" ]; then
6826 QT_CONFIG="$QT_CONFIG xcursor"
6827 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6829 if [ "$CFG_XFIXES" = "yes" ]; then
6830 QT_CONFIG="$QT_CONFIG xfixes"
6831 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6833 if [ "$CFG_XRANDR" = "yes" ]; then
6834 QT_CONFIG="$QT_CONFIG xrandr"
6835 if [ "$CFG_XRENDER" != "yes" ]; then
6836 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6837 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6839 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6842 if [ "$CFG_XRENDER" = "yes" ]; then
6843 QT_CONFIG="$QT_CONFIG xrender"
6844 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6846 if [ "$CFG_MITSHM" = "yes" ]; then
6847 QT_CONFIG="$QT_CONFIG mitshm"
6849 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6850 QT_CONFIG="$QT_CONFIG fontconfig"
6852 if [ "$CFG_XINPUT" = "yes" ]; then
6853 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6855 if [ "$CFG_XINPUT" = "yes" ]; then
6856 QT_CONFIG="$QT_CONFIG xinput tablet"
6858 if [ "$CFG_XKB" = "yes" ]; then
6859 QT_CONFIG="$QT_CONFIG xkb"
6863 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6864 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6865 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6867 if [ "$CFG_ARCH" = "macosx" ]; then
6868 if [ "$CFG_RPATH" = "yes" ]; then
6869 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6871 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
6872 if [ -n "$RPATH_FLAGS" ]; then
6874 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6878 elif [ "$CFG_RPATH" = "yes" ]; then
6879 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6883 if [ "$CFG_RPATH" = "yes" ]; then
6884 # set the default rpath to the library installation directory
6885 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6887 if [ -n "$RPATH_FLAGS" ]; then
6888 # add the user defined rpaths
6889 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6893 if [ '!' -z "$I_FLAGS" ]; then
6894 # add the user define include paths
6895 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6896 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6899 if [ '!' -z "$W_FLAGS" ]; then
6900 # add the user defined warning flags
6901 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6902 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6903 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6906 # turn off exceptions for the compilers that support it
6907 if [ "$PLATFORM_QWS" = "yes" ]; then
6908 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6909 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
6910 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6912 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6914 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6918 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6919 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6922 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6923 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6924 # Follow default behavior of configure.exe by overriding with "rtti".
6925 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6928 if [ "$CFG_ALSA" = "yes" ]; then
6929 QT_CONFIG="$QT_CONFIG alsa"
6932 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6933 QT_CONFIG="$QT_CONFIG pulseaudio"
6936 if [ "$CFG_COREWLAN" = "yes" ]; then
6937 QT_CONFIG="$QT_CONFIG corewlan"
6940 if [ "$CFG_ICU" = "yes" ]; then
6941 QT_CONFIG="$QT_CONFIG icu"
6944 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6945 QT_CONFIG="$QT_CONFIG force_asserts"
6949 # Some Qt modules are too advanced in C++ for some old compilers
6950 # Detect here the platforms where they are known to work.
6952 # See Qt documentation for more information on which features are
6953 # supported and on which compilers.
6955 canBuildQtXmlPatterns="yes"
6956 canBuildWebKit="$HAVE_STL"
6957 canBuildQtConcurrent="yes"
6959 canUseV8Snapshot="yes"
6961 # WebKit requires stdint.h
6962 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6963 if [ $? != "0" ]; then
6967 case "$XPLATFORM" in
6969 # PA-RISC's assembly is too limited
6970 # gcc 3.4 on that platform can't build QtXmlPatterns
6971 # the assembly it generates cannot be compiled
6973 # Check gcc's version
6974 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6978 canBuildQtXmlPatterns="no"
6982 canBuildQtXmlPatterns="no"
6986 unsupported/vxworks-*-g++*)
6989 unsupported/vxworks-*-dcc*)
6991 canBuildQtXmlPatterns="no"
6994 # Check gcc's version
6995 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7003 canBuildQtXmlPatterns="no"
7008 # Check the compiler version
7009 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7012 canBuildQtXmlPatterns="no"
7013 canBuildQtConcurrent="no"
7017 canBuildQtConcurrent="no"
7023 canBuildQtXmlPatterns="no"
7024 canBuildQtConcurrent="no"
7030 # Get the xlC version
7031 cat > xlcver.c <<EOF
7035 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7040 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7041 xlcver=`./xlcver 2>/dev/null`
7044 if [ "$OPT_VERBOSE" = "yes" ]; then
7045 if [ -n "$xlcver" ]; then
7046 echo Found IBM xlC version: $xlcver.
7048 echo Could not determine IBM xlC version, assuming oldest supported.
7055 canBuildQtXmlPatterns="no"
7056 canBuildQtConcurrent="no"
7060 canBuildQtConcurrent="no"
7066 canBuildQtConcurrent="no"
7070 if [ "$CFG_GUI" = "no" ]; then
7071 # WebKit requires QtGui
7075 if [ "$CFG_SHARED" = "no" ]; then
7077 echo "WARNING: Using static linking will disable the WebKit module."
7082 CFG_CONCURRENT="yes"
7083 if [ "$canBuildQtConcurrent" = "no" ]; then
7084 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7087 QT_CONFIG="$QT_CONFIG concurrent"
7090 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7091 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7094 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7095 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7096 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7097 CFG_XMLPATTERNS="no"
7099 # No longer needed after modularization
7100 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7101 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7103 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7106 # No longer needed after modularization
7107 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7108 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7110 # QT_CONFIG="$QT_CONFIG multimedia"
7113 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7114 QT_CONFIG="$QT_CONFIG audio-backend"
7117 if [ "$CFG_SVG" = "auto" ]; then
7121 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7122 echo "QtSvg requested, but it can't be built without QtGui"
7126 if [ "$CFG_SVG" = "yes" ]; then
7127 QT_CONFIG="$QT_CONFIG svg"
7129 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7132 if [ "$CFG_WEBKIT" != "no" ]; then
7133 CFG_WEBKIT="$canBuildWebKit"
7136 if [ "$CFG_WEBKIT" != "no" ]; then
7137 # No longer needed after modularization
7138 #QT_CONFIG="$QT_CONFIG webkit"
7139 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7140 if [ "$CFG_WEBKIT" = "debug" ]; then
7141 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7145 if [ "$CFG_SCRIPT" = "auto" ]; then
7149 # No longer needed after modularization
7150 #if [ "$CFG_SCRIPT" = "yes" ]; then
7151 # QT_CONFIG="$QT_CONFIG script"
7153 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7156 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7157 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7160 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7161 CFG_SCRIPTTOOLS="yes"
7162 elif [ "$CFG_SCRIPT" = "no" ]; then
7163 CFG_SCRIPTTOOLS="no"
7166 # No longer needed after modularization
7167 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7168 # QT_CONFIG="$QT_CONFIG scripttools"
7170 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7175 i386|x86_64|arm|mips|macosx) ;;
7176 *) canBuildV8="no";;
7179 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7180 echo "Error: V8 was requested, but is not supported on this platform."
7184 if [ "$CFG_V8" = "auto" ]; then
7185 CFG_V8="$canBuildV8"
7188 if [ "$CFG_V8" = "no" ]; then
7189 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7191 QT_CONFIG="$QT_CONFIG v8"
7192 # Detect snapshot support
7193 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7194 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7197 *) canUseV8Snapshot="no"
7201 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" == "arm" ]; then
7202 # QEMU crashes when building inside Scratchbox with an ARM target
7203 canUseV8Snapshot="no"
7206 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7207 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7209 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7210 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7213 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7214 QT_CONFIG="$QT_CONFIG v8snapshot"
7218 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7219 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7220 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7224 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7225 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7232 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7233 # No longer needed after modularization
7234 #QT_CONFIG="$QT_CONFIG declarative"
7235 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7236 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7239 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7242 if [ "$CFG_LOCATION" = "auto" ]; then
7243 CFG_LOCATION="$CFG_GUI"
7246 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7247 echo "QtLocation requested, but it can't be built without QtGui"
7251 #Disable QtLocation until ready
7254 if [ "$CFG_LOCATION" = "no" ]; then
7255 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7258 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7261 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7262 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7263 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7268 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7269 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7270 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7277 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7283 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7285 case "$COMPILER_VERSION" in
7287 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7288 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7289 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7292 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7293 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7294 QT_GCC_PATCH_VERSION=0
7304 #-------------------------------------------------------------------------------
7305 # part of configuration information goes into qconfig.h
7306 #-------------------------------------------------------------------------------
7308 case "$CFG_QCONFIG" in
7310 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7313 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7314 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7315 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7316 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7317 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7318 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7320 echo "#endif" >>"$tmpconfig"
7324 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7328 # define QT_EDITION $QT_EDITION
7331 /* Machine byte-order */
7332 #define Q_BIG_ENDIAN 4321
7333 #define Q_LITTLE_ENDIAN 1234
7336 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7337 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7338 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7339 #if defined(__BIG_ENDIAN__)
7340 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7341 #elif defined(__LITTLE_ENDIAN__)
7342 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7344 # error "Unable to determine byte order!"
7348 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7350 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7351 if [ "$CFG_ENDIAN" = "auto" ]; then
7352 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7353 #if defined(__BIG_ENDIAN__)
7354 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7355 #elif defined(__LITTLE_ENDIAN__)
7356 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7358 # error "Unable to determine byte order!"
7362 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7364 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7366 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7367 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7368 /* Non-IEEE double format */
7369 #define Q_DOUBLE_LITTLE "01234567"
7370 #define Q_DOUBLE_BIG "76543210"
7371 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7372 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7373 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7376 if [ "$CFG_ARMFPA" = "yes" ]; then
7377 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7378 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7379 #ifndef QT_BOOTSTRAPPED
7384 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7388 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7389 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7390 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7391 /* Machine Architecture */
7392 #ifndef QT_BOOTSTRAPPED
7393 # define QT_ARCH_${CFG_ARCH_STR}
7395 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7399 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7400 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7402 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7403 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7406 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7407 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7410 if [ "$PLATFORM_MAC" = "yes" ]; then
7411 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7412 #if defined(__LP64__)
7413 # define QT_POINTER_SIZE 8
7415 # define QT_POINTER_SIZE 4
7419 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7420 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7424 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7426 if [ "$CFG_DEV" = "yes" ]; then
7427 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7430 # Embedded compile time options
7431 if [ "$PLATFORM_QWS" = "yes" ]; then
7432 # Add QWS to config.h
7433 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7435 # Add excluded decorations to $QCONFIG_FLAGS
7436 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7437 for decor in $decors; do
7438 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7439 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7442 # Figure which embedded drivers which are turned off
7443 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7444 for ADRIVER in $CFG_GFX_ON; do
7445 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7448 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7449 # the um driver is currently not in the available list for external builds
7450 if [ "$CFG_DEV" = "no" ]; then
7451 CFG_KBD_OFF="$CFG_KBD_OFF um"
7453 for ADRIVER in $CFG_KBD_ON; do
7454 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7457 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7458 for ADRIVER in $CFG_MOUSE_ON; do
7459 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7462 for DRIVER in $CFG_GFX_OFF; do
7463 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7464 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7467 for DRIVER in $CFG_KBD_OFF; do
7468 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7469 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7472 for DRIVER in $CFG_MOUSE_OFF; do
7473 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7474 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7478 if [ "$PLATFORM_QPA" = "yes" ]; then
7479 # Add QPA to config.h
7480 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7483 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7484 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7487 # Add turned on SQL drivers
7488 for DRIVER in $CFG_SQL_AVAILABLE; do
7489 eval "VAL=\$CFG_SQL_$DRIVER"
7492 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7493 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7494 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7497 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7503 QMakeVar set sql-drivers "$SQL_DRIVERS"
7504 QMakeVar set sql-plugins "$SQL_PLUGINS"
7506 # Add other configuration options to the qconfig.h file
7507 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7508 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7509 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7510 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7511 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7512 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7513 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7514 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7516 # ATM we need this define to compile Qt. Remove later!
7517 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7519 # X11/Unix/Mac only configs
7520 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7521 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7522 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7523 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7524 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7525 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7526 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7527 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7528 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7529 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7530 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7531 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7532 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7533 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7534 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7536 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7537 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7538 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7539 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7540 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7541 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7542 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7543 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7544 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7545 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7546 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7547 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7548 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7550 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7551 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7552 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7553 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7554 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7555 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7556 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7557 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7559 # sort QCONFIG_FLAGS for neatness if we can
7560 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7561 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7563 if [ -n "$QCONFIG_FLAGS" ]; then
7564 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7565 #ifndef QT_BOOTSTRAPPED
7568 for cfg in $QCONFIG_FLAGS; do
7569 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7570 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7571 # figure out define logic, so we can output the correct
7572 # ifdefs to override the global defines in a project
7574 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7575 # QT_NO_option can be forcefully turned on by QT_option
7576 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7577 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7578 # QT_option can be forcefully turned off by QT_NO_option
7579 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7582 if [ -z $cfgdNeg ]; then
7583 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7590 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7591 #if defined($cfgd) && defined($cfgdNeg)
7593 #elif !defined($cfgd) && !defined($cfgdNeg)
7600 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7601 #endif // QT_BOOTSTRAPPED
7606 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7607 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7608 #define QT_VISIBILITY_AVAILABLE
7613 if [ -n "$QT_LIBINFIX" ]; then
7614 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7615 #define QT_LIBINFIX "$QT_LIBINFIX"
7620 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7621 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7622 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7624 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7625 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7626 chmod -w "$outpath/src/corelib/global/qconfig.h"
7627 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7628 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7632 #-------------------------------------------------------------------------------
7633 # save configuration into qconfig.pri
7634 #-------------------------------------------------------------------------------
7635 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7636 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7637 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7638 if [ "$CFG_DEBUG" = "yes" ]; then
7639 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7640 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7641 QT_CONFIG="$QT_CONFIG release"
7643 QT_CONFIG="$QT_CONFIG debug"
7644 elif [ "$CFG_DEBUG" = "no" ]; then
7645 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7646 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7647 QT_CONFIG="$QT_CONFIG debug"
7649 QT_CONFIG="$QT_CONFIG release"
7651 if [ "$CFG_STL" = "yes" ]; then
7652 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7654 if [ "$CFG_FRAMEWORK" = "no" ]; then
7655 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7657 QT_CONFIG="$QT_CONFIG qt_framework"
7658 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7660 if [ "$BUILD_ON_MAC" = "yes" ]; then
7661 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7663 if [ "$CFG_DEV" = "yes" ]; then
7664 QT_CONFIG="$QT_CONFIG private_tests"
7667 # Make the application arch follow the Qt arch for single arch builds.
7668 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7669 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7670 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7673 cat >>"$QTCONFIG.tmp" <<EOF
7675 CONFIG += $QTCONFIG_CONFIG
7677 QT_EDITION = $Edition
7678 QT_CONFIG += $QT_CONFIG
7681 QT_VERSION = $QT_VERSION
7682 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7683 QT_MINOR_VERSION = $QT_MINOR_VERSION
7684 QT_PATCH_VERSION = $QT_PATCH_VERSION
7687 QT_LIBINFIX = $QT_LIBINFIX
7688 QT_NAMESPACE = $QT_NAMESPACE
7689 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7692 if [ -n "$CFG_SYSROOT" ]; then
7693 echo "# sysroot" >>"$QTCONFIG.tmp"
7694 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7695 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7696 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7697 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7698 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7699 echo "}" >> "$QTCONFIG.tmp"
7700 echo >> "$QTCONFIG.tmp"
7702 if [ "$CFG_RPATH" = "yes" ]; then
7703 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7705 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7706 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7707 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7708 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7711 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7712 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7713 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7716 # replace qconfig.pri if it differs from the newly created temp file
7717 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7718 rm -f "$QTCONFIG.tmp"
7720 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7723 #-------------------------------------------------------------------------------
7724 # save configuration into qmodule.pri
7725 #-------------------------------------------------------------------------------
7726 QTMODULE="$outpath/mkspecs/qmodule.pri"
7728 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7730 # Ensure we can link to uninistalled libraries
7731 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7732 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7734 if [ -n "$QT_CFLAGS_PSQL" ]; then
7735 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7737 if [ -n "$QT_LFLAGS_PSQL" ]; then
7738 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7740 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7741 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7743 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7744 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7746 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7747 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7749 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7750 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7752 if [ -n "$QT_LFLAGS_ODBC" ]; then
7753 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7755 if [ -n "$QT_LFLAGS_TDS" ]; then
7756 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
7759 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7760 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
7763 #dump in the OPENSSL_LIBS info
7764 if [ '!' -z "$OPENSSL_LIBS" ]; then
7765 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
7766 elif [ "$CFG_OPENSSL" = "linked" ]; then
7767 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
7770 #dump in the SDK info
7771 if [ '!' -z "$CFG_SDK" ]; then
7772 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
7775 # mac gcc -Xarch support
7776 if [ "$CFG_MAC_XARCH" = "no" ]; then
7777 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
7781 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
7782 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7784 # replace qmodule.pri if it differs from the newly created temp file
7785 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
7786 rm -f "$QTMODULE.tmp"
7788 mv -f "$QTMODULE.tmp" "$QTMODULE"
7791 #-------------------------------------------------------------------------------
7792 # save configuration into .qmake.cache
7793 #-------------------------------------------------------------------------------
7795 CACHEFILE="$outpath/.qmake.cache"
7796 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7797 cat >>"$CACHEFILE.tmp" <<EOF
7799 QT_SOURCE_TREE = \$\$quote($relpath)
7800 QT_BUILD_TREE = \$\$quote($outpath)
7801 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7803 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7804 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7805 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7806 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7807 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7808 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7809 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7811 include(\$\$PWD/mkspecs/qmodule.pri)
7812 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
7813 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7814 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7818 #dump the qmake spec
7819 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7820 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7822 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7827 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7828 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7829 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7830 # don't need to worry about generated files
7831 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7832 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7834 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7836 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7837 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7840 # replace .qmake.cache if it differs from the newly created temp file
7841 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7842 rm -f "$CACHEFILE.tmp"
7844 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7847 #-------------------------------------------------------------------------------
7848 # give feedback on configuration
7849 #-------------------------------------------------------------------------------
7853 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7856 This target is using the GNU C++ compiler ($PLATFORM).
7858 Recent versions of this compiler automatically include code for
7859 exceptions, which increase both the size of the Qt libraries and
7860 the amount of memory taken by your applications.
7862 You may choose to re-run `basename $0` with the -no-exceptions
7863 option to compile Qt without exceptions. This is completely binary
7864 compatible, and existing applications will continue to work.
7872 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7875 This target is using the MIPSpro C++ compiler ($PLATFORM).
7877 You may choose to re-run `basename $0` with the -no-exceptions
7878 option to compile Qt without exceptions. This will make the
7879 size of the Qt library smaller and reduce the amount of memory
7880 taken by your applications.
7891 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7893 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7894 in debug mode will run out of memory on systems with 2GB or less.
7895 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7896 -no-webkit or -release to skip webkit debug.
7901 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7902 echo "Build type: $PLATFORM"
7904 echo "Building on: $PLATFORM"
7905 echo "Building for: $XPLATFORM"
7908 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7909 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7911 echo "Architecture: $CFG_ARCH"
7914 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7915 echo "Host architecture: $CFG_HOST_ARCH"
7918 if [ -n "$PLATFORM_NOTES" ]; then
7919 echo "Platform notes:"
7920 echo "$PLATFORM_NOTES"
7925 if [ "$OPT_VERBOSE" = "yes" ]; then
7926 echo $ECHO_N "qmake vars .......... $ECHO_C"
7927 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7928 echo "qmake switches ......... $QMAKE_SWITCHES"
7931 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7932 echo "Build .................. $CFG_BUILD_PARTS"
7933 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7934 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7935 echo "Debug .................. yes (combined)"
7936 if [ "$CFG_DEBUG" = "yes" ]; then
7937 echo "Default Link ........... debug"
7939 echo "Default Link ........... release"
7942 echo "Debug .................. $CFG_DEBUG"
7944 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7945 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7946 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7947 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7948 echo "QtGui module ........... $CFG_GUI"
7949 echo "QtScript module ........ $CFG_SCRIPT"
7950 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
7951 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
7952 echo "Phonon module .......... $CFG_PHONON"
7953 echo "Multimedia module ...... $CFG_MULTIMEDIA"
7954 echo "SVG module ............. $CFG_SVG"
7955 case "$CFG_WEBKIT" in
7956 yes) echo "WebKit module .......... yes" ;;
7957 debug) echo "WebKit module .......... yes (debug)" ;;
7958 no) echo "WebKit module .......... no" ;;
7960 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
7961 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7962 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7964 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7967 echo "V8 module .............. $CFG_V8"
7968 echo "Declarative module ..... $CFG_DECLARATIVE"
7969 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7970 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7972 echo "Location module ........ $CFG_LOCATION"
7973 echo "STL support ............ $CFG_STL"
7974 echo "PCH support ............ $CFG_PRECOMPILE"
7975 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7976 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7977 echo "AVX..................... ${CFG_AVX}"
7978 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7979 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7980 echo "NEON support ........... ${CFG_NEON}"
7982 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
7983 echo "getaddrinfo support .... $CFG_GETADDRINFO"
7984 echo "getifaddrs support ..... $CFG_GETIFADDRS"
7985 echo "Accessibility .......... $CFG_ACCESSIBILITY"
7986 echo "NIS support ............ $CFG_NIS"
7987 echo "CUPS support ........... $CFG_CUPS"
7988 echo "Iconv support .......... $CFG_ICONV"
7989 echo "Glib support ........... $CFG_GLIB"
7990 echo "GStreamer support ...... $CFG_GSTREAMER"
7991 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7992 echo "Large File support ..... $CFG_LARGEFILE"
7993 echo "GIF support ............ $CFG_GIF"
7994 if [ "$CFG_TIFF" = "no" ]; then
7995 echo "TIFF support ........... $CFG_TIFF"
7997 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
7999 if [ "$CFG_JPEG" = "no" ]; then
8000 echo "JPEG support ........... $CFG_JPEG"
8002 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8004 if [ "$CFG_PNG" = "no" ]; then
8005 echo "PNG support ............ $CFG_PNG"
8007 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8009 echo "zlib support ........... $CFG_ZLIB"
8010 echo "Session management ..... $CFG_SM"
8011 if [ "$PLATFORM_QWS" = "yes" ]; then
8012 echo "Embedded support ....... $CFG_EMBEDDED"
8013 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8014 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8016 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8018 # Normalize the decoration output first
8019 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8020 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8021 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8022 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8023 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8024 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8025 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8026 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8027 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8028 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8029 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8030 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8031 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8032 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8033 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8034 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8036 if [ "$CFG_OPENGL" = "desktop" ]; then
8037 echo "OpenGL support ......... yes (Desktop OpenGL)"
8038 elif [ "$CFG_OPENGL" = "es2" ]; then
8039 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8041 echo "OpenGL support ......... no"
8043 if [ "$CFG_EGL" != "no" ]; then
8044 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8045 echo "EGL support ............ yes <GLES/egl.h>"
8047 echo "EGL support ............ yes <EGL/egl.h>"
8050 if [ "$CFG_OPENVG" ]; then
8051 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8052 echo "OpenVG support ......... ShivaVG"
8054 echo "OpenVG support ......... $CFG_OPENVG"
8057 if [ "$PLATFORM_X11" = "yes" ]; then
8058 echo "NAS sound support ...... $CFG_NAS"
8059 echo "XShape support ......... $CFG_XSHAPE"
8060 echo "XVideo support ......... $CFG_XVIDEO"
8061 echo "XSync support .......... $CFG_XSYNC"
8062 echo "Xinerama support ....... $CFG_XINERAMA"
8063 echo "Xcursor support ........ $CFG_XCURSOR"
8064 echo "Xfixes support ......... $CFG_XFIXES"
8065 echo "Xrandr support ......... $CFG_XRANDR"
8066 echo "Xi support ............. $CFG_XINPUT"
8067 echo "MIT-SHM support ........ $CFG_MITSHM"
8068 echo "FontConfig support ..... $CFG_FONTCONFIG"
8069 echo "XKB Support ............ $CFG_XKB"
8070 echo "immodule support ....... $CFG_IM"
8071 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8073 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8074 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8075 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8076 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8077 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8078 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8079 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8080 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8081 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8084 if [ "$CFG_OPENSSL" = "yes" ]; then
8085 OPENSSL_LINKAGE="(run-time)"
8086 elif [ "$CFG_OPENSSL" = "linked" ]; then
8087 OPENSSL_LINKAGE="(linked)"
8089 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8090 echo "Alsa support ........... $CFG_ALSA"
8091 if [ "$PLATFORM_MAC" = "yes" ]; then
8092 echo "CoreWlan support ....... $CFG_COREWLAN"
8094 echo "libICU support ......... $CFG_ICU"
8095 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8096 echo "Xcb support ............ limited (old version)"
8098 echo "Xcb support ............ $CFG_XCB"
8100 echo "Xrender support ........ $CFG_XRENDER"
8101 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8102 echo "XInput2 support ........ $CFG_XINPUT2"
8106 # complain about not being able to use dynamic plugins if we are using a static build
8107 if [ "$CFG_SHARED" = "no" ]; then
8109 echo "WARNING: Using static linking will disable the use of dynamically"
8110 echo "loaded plugins. Make sure to import all needed static plugins,"
8111 echo "or compile needed modules into the library."
8114 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8116 echo "NOTE: When linking against OpenSSL, you can override the default"
8117 echo "library names through OPENSSL_LIBS."
8119 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8122 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8124 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8125 echo "if you want a pure debug build."
8130 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8135 #-------------------------------------------------------------------------------
8136 # build makefiles based on the configuration
8137 #-------------------------------------------------------------------------------
8139 echo "Finding project files. Please wait..."
8140 if [ "$CFG_NOPROCESS" != "yes" ]; then
8141 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8142 if [ -f "${relpath}/qtbase.pro" ]; then
8143 mkfile="${outpath}/Makefile"
8144 [ -f "$mkfile" ] && chmod +w "$mkfile"
8145 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8149 # .projects -> projects to process
8150 # .projects.1 -> qt and moc
8151 # .projects.2 -> subdirs and libs
8152 # .projects.3 -> the rest
8153 rm -f .projects .projects.1 .projects.2 .projects.3
8155 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8156 if [ -z "$AWK" ]; then
8157 for p in `echo $QMAKE_PROJECTS`; do
8158 echo "$p" >> .projects
8161 cat >projects.awk <<EOF
8167 first = "./.projects.1.tmp"
8168 second = "./.projects.2.tmp"
8169 third = "./.projects.3.tmp"
8174 if ( ! target_file )
8176 print input_file >target_file
8181 input_file = FILENAME
8186 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8189 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8190 target_file = second
8195 matched_target == 0 && /^(TEMPLATE.*=)/ {
8196 if ( \$3 == "subdirs" )
8197 target_file = second
8198 else if ( \$3 == "lib" )
8204 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8205 if ( \$0 ~ /plugin/ )
8208 target_file = second
8213 if ( ! target_file )
8215 print input_file >>target_file
8222 for p in `echo $QMAKE_PROJECTS`; do
8223 echo "$p" >> .projects.all
8226 # if you get errors about the length of the command line to awk, change the -l arg
8228 split -l 100 .projects.all .projects.all.
8229 for p in .projects.all.*; do
8230 "$AWK" -f projects.awk `cat $p`
8231 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8232 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8233 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8234 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8236 rm -f .projects.all* projects.awk
8238 [ -f .projects.1 ] && cat .projects.1 >>.projects
8239 [ -f .projects.2 ] && cat .projects.2 >>.projects
8240 rm -f .projects.1 .projects.2
8241 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8242 cat .projects.3 >>.projects
8246 # don't sort Qt and MOC in with the other project files
8247 # also work around a segfaulting uniq(1)
8248 if [ -f .sorted.projects.2 ]; then
8249 sort .sorted.projects.2 > .sorted.projects.2.new
8250 mv -f .sorted.projects.2.new .sorted.projects.2
8251 cat .sorted.projects.2 >> .sorted.projects.1
8253 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8254 rm -f .sorted.projects.2 .sorted.projects.1
8258 if [ -f .projects ]; then
8259 uniq .projects >.tmp
8260 mv -f .tmp .projects
8261 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8263 if [ -f .projects.3 ]; then
8264 uniq .projects.3 >.tmp
8265 mv -f .tmp .projects.3
8266 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8268 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8272 for part in $CFG_BUILD_PARTS; do
8274 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8275 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8276 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8277 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8282 if [ "$CFG_DEV" = "yes" ]; then
8283 PART_ROOTS="$PART_ROOTS tests"
8286 echo "Creating makefiles. Please wait..."
8287 for file in .projects .projects.3; do
8288 [ '!' -f "$file" ] && continue
8289 for a in `cat $file`; do
8291 for r in $PART_ROOTS; do
8292 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8297 [ "$IN_ROOT" = "no" ] && continue
8300 *winmain/winmain.pro)
8301 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8305 *examples/activeqt/*) continue ;;
8306 */qmake/qmake.pro) continue ;;
8307 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8308 *tools/mkv8snapshot/*)
8309 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8315 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8321 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8322 test -d "$dir" || mkdir -p "$dir"
8323 OUTDIR="$outpath/$dir"
8324 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8325 # fast configure - the makefile exists, skip it
8326 # since the makefile exists, it was generated by qmake, which means we
8327 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8329 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8332 QMAKE_SPEC_ARGS="-spec $SPEC"
8333 echo $ECHO_N " for $a$ECHO_C"
8335 QMAKE="$outpath/bin/qmake"
8336 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8337 if [ "$file" = ".projects.3" ]; then
8340 cat >"${OUTDIR}/Makefile" <<EOF
8341 # ${OUTDIR}/Makefile: generated by configure
8343 # WARNING: This makefile will be replaced with a real makefile.
8344 # All changes made to this file will be lost.
8346 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8348 cat >>"${OUTDIR}/Makefile" <<EOF
8350 all clean install qmake first Makefile: FORCE
8351 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8359 if [ "$OPT_VERBOSE" = "yes" ]; then
8360 echo " (`basename $SPEC`)"
8361 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8366 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8367 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8371 rm -f .projects .projects.3
8373 #-------------------------------------------------------------------------------
8374 # check for platforms that we don't yet know about
8375 #-------------------------------------------------------------------------------
8376 if [ "$CFG_ARCH" = "generic" ]; then
8379 NOTICE: Atomic operations are not yet supported for this
8382 Qt will use the 'generic' architecture instead, which uses a
8383 single pthread_mutex_t to protect all atomic operations. This
8384 implementation is the slow (but safe) fallback implementation
8385 for architectures Qt does not yet support.
8389 #-------------------------------------------------------------------------------
8390 # check if the user passed the -no-zlib option, which is no longer supported
8391 #-------------------------------------------------------------------------------
8392 if [ -n "$ZLIB_FORCED" ]; then
8393 which_zlib="supplied"
8394 if [ "$CFG_ZLIB" = "system" ]; then
8400 NOTICE: The -no-zlib option was supplied but is no longer
8403 Qt now requires zlib support in all builds, so the -no-zlib
8404 option was ignored. Qt will be built using the $which_zlib
8409 #-------------------------------------------------------------------------------
8410 # finally save the executed command to another script
8411 #-------------------------------------------------------------------------------
8412 if [ `basename $0` != "config.status" ]; then
8413 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8415 # add the system variables
8416 for varname in $SYSTEM_VARIABLES; do
8418 'if [ -n "\$'${varname}'" ]; then
8419 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8424 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8426 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8427 echo "#!/bin/sh" > "$outpath/config.status"
8428 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8429 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8430 echo "else" >> "$outpath/config.status"
8431 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8432 echo "fi" >> "$outpath/config.status"
8433 chmod +x "$outpath/config.status"
8436 if [ -n "$RPATH_MESSAGE" ]; then
8438 echo "$RPATH_MESSAGE"
8441 MAKE=`basename "$MAKE"`
8443 echo Qt is now configured for building. Just run \'$MAKE\'.
8444 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8445 echo Once everything is built, Qt is installed.
8446 echo You should not run \'$MAKE install\'.
8448 echo Once everything is built, you must run \'$MAKE install\'.
8449 echo Qt will be installed into $QT_INSTALL_PREFIX
8452 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.