2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## 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
197 #-----------------------------------------------------------------------------
198 # Qt version detection
199 #-----------------------------------------------------------------------------
200 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
204 if [ -n "$QT_VERSION" ]; then
205 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
206 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
207 if [ -n "$MAJOR" ]; then
208 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
209 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
210 QT_MAJOR_VERSION="$MAJOR"
211 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
212 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
215 if [ -z "$QT_MAJOR_VERSION" ]; then
216 echo "Cannot process version from qglobal.h: $QT_VERSION"
217 echo "Cannot proceed."
221 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
222 if [ -z "$QT_PACKAGEDATE" ]; then
223 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
224 echo "Cannot proceed"
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
235 EditionString=Commercial
239 # parse the arguments, setting things to "yes" or "no"
240 while [ "$#" -gt 0 ]; do
244 #Autoconf style options
246 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
250 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
254 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
255 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
258 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
263 # this option may or may not be followed by an argument
264 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
273 # this option may or may not be followed by an argument
274 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
287 -h|help|--help|-help)
288 if [ "$VAL" = "yes" ]; then
290 COMMERCIAL_USER="no" #doesn't matter we will display the help
293 COMMERCIAL_USER="no" #doesn't matter we will display the help
297 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
301 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
308 if [ "$UNKNOWN_ARG" = "yes" ]; then
325 if [ "$PLATFORM_QPA" != "no" ]; then
326 if [ "$PLATFORM_QPA" = "maybe" ]; then
333 echo "No license exists to enable Qt QPA. Disabling."
338 echo "Using NaCl at $VAL."
350 COMMERCIAL_USER="yes"
364 if [ "$COMMERCIAL_USER" = "ask" ]; then
366 echo "Which edition of Qt do you want to use ?"
368 echo "Type 'c' if you want to use the Commercial Edition."
369 echo "Type 'o' if you want to use the Open Source Edition."
373 if [ "$commercial" = "c" ]; then
374 COMMERCIAL_USER="yes"
376 elif [ "$commercial" = "o" ]; then
383 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
384 # Commercial preview release
385 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
388 QT_EDITION="QT_EDITION_DESKTOP"
389 LicenseType="Technology Preview"
390 elif [ $COMMERCIAL_USER = "yes" ]; then
391 # one of commercial editions
392 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
393 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
394 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
396 # read in the license file
397 if [ -f "$LICENSE_FILE" ]; then
398 . "$LICENSE_FILE" >/dev/null 2>&1
399 if [ -z "$LicenseKeyExt" ]; then
401 echo "You are using an old license file."
403 echo "Please install the license file supplied by Nokia,"
404 echo "or install the Qt Open Source Edition if you intend to"
405 echo "develop free software."
408 if [ -z "$Licensee" ]; then
410 echo "Invalid license key. Please check the license key."
414 if [ -z "$LicenseKeyExt" ]; then
416 echo $ECHO_N "Please enter your license key: $ECHO_C"
418 Licensee="Unknown user"
423 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
424 && LicenseValid="yes" \
426 if [ "$LicenseValid" != "yes" ]; then
428 echo "Invalid license key. Please check the license key."
431 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
432 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
433 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
434 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
436 # determine which edition we are licensed to use
437 case "$LicenseTypeCode" in
439 LicenseType="Commercial"
443 QT_EDITION="QT_EDITION_UNIVERSAL"
446 Edition="FullFramework"
447 EditionString="Full Framework"
448 QT_EDITION="QT_EDITION_DESKTOP"
451 Edition="GUIFramework"
452 EditionString="GUI Framework"
453 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
458 LicenseType="Evaluation"
459 QMakeVar add DEFINES QT_EVAL
463 QT_EDITION="QT_EDITION_EVALUATION"
468 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
470 echo "Invalid license key. Please check the license key."
474 # verify that we are licensed to use Qt on this platform
476 case "$PlatformCode" in
479 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
483 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
486 ### EMBEDDED_QPA logic missing ###
487 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
488 X9,* | XC,* | XU,* | XW,* | XM,*)
490 LICENSE_EXTENSION="-ALLOS"
492 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
493 # Qt for Embedded Linux
494 LICENSE_EXTENSION="-EMBEDDED"
496 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
498 LICENSE_EXTENSION="-EMBEDDED"
500 FM,*,no | LM,yes,* | ZM,no,no)
502 LICENSE_EXTENSION="-DESKTOP"
506 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
507 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
509 echo "You are not licensed for the $Platform platform."
511 echo "Please contact qt-info@nokia.com to upgrade your license to"
512 echo "include the $Platform platform, or install the Qt Open Source Edition"
513 echo "if you intend to develop free software."
518 if test -r "$relpath/.LICENSE"; then
519 # Generic, non-final license
521 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
526 *TECHNOLOGY?PREVIEW*)
533 echo >&2 "Invalid license files; cannot continue"
538 EditionString="$Edition"
539 QT_EDITION="QT_EDITION_DESKTOP"
542 case "$LicenseFeatureCode" in
545 case "$LicenseType" in
547 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
550 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
556 case "$LicenseType" in
558 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
561 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
567 echo "Invalid license key. Please check the license key."
571 case "$LicenseFeatureCode" in
579 if [ '!' -f "$outpath/LICENSE" ]; then
580 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
581 echo "this software has disappeared."
583 echo "Sorry, you are not licensed to use this software."
584 echo "Try re-installing."
588 elif [ $COMMERCIAL_USER = "no" ]; then
589 # Open Source edition - may only be used under the terms of the GPL or LGPL.
590 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
591 Licensee="Open Source"
593 EditionString="Open Source"
594 QT_EDITION="QT_EDITION_OPENSOURCE"
597 #-------------------------------------------------------------------------------
598 # initalize variables
599 #-------------------------------------------------------------------------------
601 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
602 for varname in $SYSTEM_VARIABLES; do
603 qmakevarname="${varname}"
604 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
605 if [ "${varname}" = "LDFLAGS" ]; then
606 qmakevarname="LFLAGS"
607 elif [ "${varname}" = "LD" ]; then
611 'if [ -n "\$'${varname}'" ]; then
612 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
616 # Use CC/CXX to run config.tests
617 mkdir -p "$outpath/config.tests"
618 rm -f "$outpath/config.tests/.qmake.cache"
619 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
621 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
622 QMakeVar add decorations "default windows styled"
623 QMakeVar add mouse-drivers "pc"
624 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
625 QMakeVar add gfx-drivers "linuxfb"
626 QMakeVar add mouse-drivers "linuxtp"
628 QMakeVar add kbd-drivers "tty"
630 if [ "$CFG_DEV" = "yes" ]; then
631 QMakeVar add kbd-drivers "um"
634 # QTDIR may be set and point to an old or system-wide Qt installation
637 # the minimum version of libdbus-1 that we require:
638 MIN_DBUS_1_VERSION=0.93
640 # initalize internal variables
641 CFG_CONFIGURE_EXIT_ON_ERROR=yes
643 CFG_EXCEPTIONS=unspecified
644 CFG_GUI=auto # (yes|no|auto)
645 CFG_SCRIPT=auto # (yes|no|auto)
646 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
647 CFG_XMLPATTERNS=auto # (yes|no|auto)
675 CFG_OPENVG_LC_INCLUDES=no
676 CFG_OPENVG_SHIVA=auto
677 CFG_OPENVG_ON_OPENGL=auto
679 CFG_EGL_GLES_INCLUDES=no
682 CFG_QWS_FREETYPE=auto
685 QT_DEFAULT_BUILD_PARTS="libs examples tests"
690 CFG_PHONON_BACKEND=yes
692 CFG_AUDIO_BACKEND=auto
697 CFG_DECLARATIVE_DEBUG=yes
698 CFG_WEBKIT=auto # (yes|no|auto|debug)
699 CFG_JAVASCRIPTCORE_JIT=auto
702 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
703 CFG_GFX_ON="linuxfb multiscreen"
704 CFG_GFX_PLUGIN_AVAILABLE=
707 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
708 CFG_KBD_ON="tty" #default, see QMakeVar above
709 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
710 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
712 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
713 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
714 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
715 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
717 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
718 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
719 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
720 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
725 CFG_KBD_PLUGIN_AVAILABLE=
728 CFG_MOUSE_PLUGIN_AVAILABLE=
733 CFG_DECORATION_AVAILABLE="styled windows default"
734 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
735 CFG_DECORATION_PLUGIN_AVAILABLE=
736 CFG_DECORATION_PLUGIN=
754 CFG_SEPARATE_DEBUG_INFO=no
755 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
756 CFG_REDUCE_EXPORTS=auto
766 CFG_REDUCE_RELOCATIONS=auto
769 CFG_ACCESSIBILITY=auto
772 CFG_DOUBLEFORMAT=auto
776 CFG_CLOCK_GETTIME=auto
777 CFG_CLOCK_MONOTONIC=auto
786 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
791 CFG_PREFIX_INSTALL=yes
800 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
801 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
805 OPT_CONFIRM_LICENSE=no
819 # initalize variables used for installation
828 QT_INSTALL_TRANSLATIONS=
834 #flags for SQL drivers
842 QT_LFLAGS_ODBC="-lodbc"
845 # flags for libdbus-1
849 # flags for Glib (X11 only)
853 # flags for GStreamer (X11 only)
857 #-------------------------------------------------------------------------------
858 # check SQL drivers, mouse drivers and decorations available in this package
859 #-------------------------------------------------------------------------------
861 # opensource version removes some drivers, so force them to be off
867 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
868 for a in "$relpath/src/plugins/sqldrivers/"*; do
870 base_a=`basename "$a"`
871 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
872 eval "CFG_SQL_${base_a}=auto"
877 CFG_DECORATION_PLUGIN_AVAILABLE=
878 if [ -d "$relpath/src/plugins/decorations" ]; then
879 for a in "$relpath/src/plugins/decorations/"*; do
881 base_a=`basename "$a"`
882 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
887 CFG_KBD_PLUGIN_AVAILABLE=
888 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
889 for a in "$relpath/src/plugins/kbddrivers/"*; do
891 base_a=`basename "$a"`
892 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
897 CFG_MOUSE_PLUGIN_AVAILABLE=
898 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
899 for a in "$relpath/src/plugins/mousedrivers/"*; do
901 base_a=`basename "$a"`
902 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
907 CFG_GFX_PLUGIN_AVAILABLE=
908 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
909 for a in "$relpath/src/plugins/gfxdrivers/"*; do
911 base_a=`basename "$a"`
912 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
915 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
918 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
919 if [ -d "$relpath/src/plugins/imageformats" ]; then
920 for a in "$relpath/src/plugins/imageformats/"*; do
922 base_a=`basename "$a"`
923 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
928 #-------------------------------------------------------------------------------
929 # Set Default NaCl options
930 #-------------------------------------------------------------------------------
931 if [ "$CFG_EMBEDDED" = "nacl" ]; then
932 echo "Setting NaCl options:"
942 if [ `uname` = "Linux" ]; then
943 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
944 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
946 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
947 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
950 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
961 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
962 QT_CONFIG="$QT_CONFIG nacl"
965 #-------------------------------------------------------------------------------
966 # parse command line arguments
967 #-------------------------------------------------------------------------------
969 # parse the arguments, setting things to "yes" or "no"
970 while [ "$#" -gt 0 ]; do
974 #Autoconf style options
976 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
980 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
984 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
985 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
988 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
992 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
996 -no-*-*|-plugin-*-*|-qt-*-*)
997 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
998 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1013 #Qt style no options
1015 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1018 #Qt style yes options
1019 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-wayland|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
1020 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1023 #Qt style options that pass an argument
1025 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1027 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1031 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1035 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1036 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1040 #Qt style complex options in one command
1041 -enable-*|-disable-*)
1042 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1043 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1045 #Qt Builtin/System style options
1046 -no-*|-system-*|-qt-*)
1047 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1048 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1050 #Options that cannot be generalized
1057 # this option may or may not be followed by an argument
1058 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1065 -embedded-lite|-qpa)
1067 # this option may or may not be followed by an argument
1068 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1081 # this option may or may not be followed by an argument
1082 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1091 # this option may or may not be followed by an argument
1092 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1100 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1101 # this option may or may not be followed by an argument
1102 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1111 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1115 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1129 if [ "$1" = "-D" ]; then
1133 VAL=`echo $1 | sed 's,-D,,'`
1138 # this option may or may not be followed by an argument
1139 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1148 if [ "$1" = "-I" ]; then
1152 VAL=`echo $1 | sed 's,-I,,'`
1157 if [ "$1" = "-L" ]; then
1161 VAL=`echo $1 | sed 's,-L,,'`
1166 if [ "$1" = "-R" ]; then
1170 VAL=`echo $1 | sed 's,-R,,'`
1175 VAL=`echo $1 | sed 's,-l,,'`
1179 if [ "$1" = "-F" ]; then
1183 VAL=`echo $1 | sed 's,-F,,'`
1188 if [ "$1" = "-fw" ]; then
1192 VAL=`echo $1 | sed 's,-fw,,'`
1200 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1207 if [ "$UNKNOWN_ARG" = "yes" ]; then
1208 echo "$1: unknown argument"
1219 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1220 CFG_ACCESSIBILITY="$VAL"
1229 CFG_USE_GNUMAKE="$VAL"
1232 CFG_MYSQL_CONFIG="$VAL"
1235 QT_INSTALL_PREFIX="$VAL"
1238 QT_HOST_PREFIX="$VAL"
1241 QT_FORCE_PKGCONFIG=yes
1244 QT_INSTALL_DOCS="$VAL"
1247 QT_INSTALL_HEADERS="$VAL"
1250 QT_INSTALL_PLUGINS="$VAL"
1253 QT_INSTALL_IMPORTS="$VAL"
1256 QT_INSTALL_DATA="$VAL"
1259 QT_INSTALL_LIBS="$VAL"
1268 QT_INSTALL_TRANSLATIONS="$VAL"
1270 sysconfdir|settingsdir)
1271 QT_INSTALL_SETTINGS="$VAL"
1274 QT_INSTALL_EXAMPLES="$VAL"
1277 QT_INSTALL_TESTS="$VAL"
1286 QT_INSTALL_BINS="$VAL"
1308 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1315 if [ "$VAL" = "little" ]; then
1316 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1317 elif [ "$VAL" = "big" ]; then
1318 CFG_ENDIAN="Q_BIG_ENDIAN"
1324 if [ "$VAL" = "little" ]; then
1325 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1326 elif [ "$VAL" = "big" ]; then
1327 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1333 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1340 CFG_QWS_DEPTHS="$VAL"
1343 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1344 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1345 [ "$VAL" = "es2" ]; then
1347 if [ "$VAL" = "es2" ]; then
1355 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1357 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1364 qvfb) # left for commandline compatibility, not documented
1365 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1366 if [ "$VAL" = "yes" ]; then
1367 QMakeVar add gfx-drivers qvfb
1368 QMakeVar add kbd-drivers qvfb
1369 QMakeVar add mouse-drivers qvfb
1370 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1371 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1372 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1379 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1382 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1391 if [ "$PLATFORM_MAC" = "yes" ]; then
1398 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1399 CFG_MAC_DWARF2="$VAL"
1405 # if this is a Mac then "windows" probably means
1406 # we are cross-compiling for MinGW
1407 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1408 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1417 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1418 CFG_MAC_HARFBUZZ="$VAL"
1425 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1426 CFG_FRAMEWORK="$VAL"
1432 if [ "$VAL" = "yes" ]; then
1434 QMakeVar add QMAKE_CFLAGS -pg
1435 QMakeVar add QMAKE_CXXFLAGS -pg
1436 QMakeVar add QMAKE_LFLAGS -pg
1437 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1443 if [ "$VAL" = "yes" ]; then
1444 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1447 exceptions|g++-exceptions)
1448 if [ "$VAL" = "no" ]; then
1450 elif [ "$VAL" = "yes" ]; then
1458 # keep compatibility with old platform names
1464 PLATFORM=hpux-acc-o64
1467 PLATFORM=hpux-acc-64
1470 PLATFORM=hpux-acc-64
1482 PLATFORM=reliant-cds-64
1485 PLATFORM=solaris-cc-64
1488 PLATFORM=unixware-cc
1491 PLATFORM=unixware-g++
1494 PLATFORM=unixware-cc
1497 PLATFORM=unixware-g++
1503 i386) NATIVE_64_ARCH="x86_64" ;;
1504 powerpc) NATIVE_64_ARCH="ppc64" ;;
1505 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1507 if [ ! -z "$NATIVE_64_ARCH" ]; then
1508 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1515 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1518 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1519 CFG_DEBUG_RELEASE="$VAL"
1525 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1526 CFG_RELEASE_QMAKE="$VAL"
1532 if [ "$VAL" = "yes" ]; then
1534 elif [ "$VAL" = "no" ]; then
1541 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1542 CFG_PREFIX_INSTALL="$VAL"
1550 developer-build|commercial|opensource)
1551 # These switches have been dealt with already
1554 if [ "$VAL" = "yes" ]; then
1556 elif [ "$VAL" = "no" ]; then
1563 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1564 CFG_INCREMENTAL="$VAL"
1570 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1571 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1577 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1578 if [ "$VAL" = "no" ]; then
1579 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1580 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1581 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1587 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1594 if [ "$VAL" = "no" ]; then
1601 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1609 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1616 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1623 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1630 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1637 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1644 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1651 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1658 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1665 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1666 CFG_PRECOMPILE="$VAL"
1671 separate-debug-info)
1672 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1673 CFG_SEPARATE_DEBUG_INFO="$VAL"
1674 elif [ "$VAL" = "nocopy" ] ; then
1675 CFG_SEPARATE_DEBUG_INFO="yes"
1676 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1682 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1683 CFG_REDUCE_EXPORTS="$VAL"
1689 if [ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "no" ]; then
1703 if [ "$VAL" = "no" ]; then
1710 if [ "$VAL" = "no" ]; then
1717 if [ "$VAL" = "no" ]; then
1724 if [ "$VAL" = "no" ]; then
1731 if [ "$VAL" = "no" ]; then
1738 if [ "$VAL" = "no" ]; then
1745 if [ "$VAL" = "no" ]; then
1755 if [ "$VAL" = "no" ]; then
1762 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1763 CFG_REDUCE_RELOCATIONS="$VAL"
1769 [ "$VAL" = "qt" ] && VAL=yes
1770 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1771 CFG_QWS_FREETYPE="$VAL"
1777 [ "$VAL" = "qt" ] && VAL=yes
1778 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1783 # No longer supported:
1784 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1787 if [ "$VAL" = "system" ]; then
1794 [ "$VAL" = "yes" ] && VAL=qt
1795 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1802 [ "$VAL" = "yes" ] && VAL=qt
1803 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1810 [ "$VAL" = "yes" ] && VAL=qt
1811 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1818 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1825 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1832 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1839 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1846 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1853 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1860 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1861 CFG_FONTCONFIG="$VAL"
1867 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1874 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1881 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1888 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1895 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1902 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1909 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1910 CFG_GSTREAMER="$VAL"
1916 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1917 CFG_QGTKSTYLE="$VAL"
1923 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1926 if [ "$VAL" = "no" ]; then
1934 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1936 elif [ "$VAL" = "runtime" ]; then
1943 if [ "$VAL" = "yes" ]; then
1950 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1958 CFG_LARGEFILE="$VAL"
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1971 if [ "$VAL" = "yes" ]; then
1972 CFG_OPENSSL="linked"
1978 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1979 CFG_XMLPATTERNS="yes"
1981 if [ "$VAL" = "no" ]; then
1982 CFG_XMLPATTERNS="no"
1989 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1992 if [ "$VAL" = "no" ]; then
2000 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2001 CFG_SCRIPTTOOLS="yes"
2003 if [ "$VAL" = "no" ]; then
2004 CFG_SCRIPTTOOLS="no"
2011 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2014 if [ "$VAL" = "no" ]; then
2022 if [ "$VAL" = "yes" ]; then
2025 if [ "$VAL" = "no" ]; then
2033 if [ "$VAL" = "yes" ]; then
2034 CFG_DECLARATIVE="yes"
2036 if [ "$VAL" = "no" ]; then
2037 CFG_DECLARATIVE="no"
2044 if [ "$VAL" = "yes" ]; then
2045 CFG_DECLARATIVE_DEBUG="yes"
2047 if [ "$VAL" = "no" ]; then
2048 CFG_DECLARATIVE_DEBUG="no"
2055 [ "$VAL" = "auto" ] && VAL="yes"
2059 if [ "$VAL" = "yes" ]; then
2062 if [ "$VAL" = "no" ]; then
2070 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2071 CFG_JAVASCRIPTCORE_JIT="$VAL"
2077 if [ "$VAL" = "yes" ]; then
2078 OPT_CONFIRM_LICENSE="$VAL"
2084 if [ "$VAL" = "yes" ]; then
2090 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2091 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2092 # if autoconf style options were used, $VAL can be "yes" or "no"
2093 [ "$VAL" = "yes" ] && VAL=qt
2094 # now $VAL should be "no", "qt", or "plugin"... double-check
2095 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2098 # now $VAL is "no", "qt", or "plugin"
2100 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2101 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2103 # Grab the available values
2106 avail="$CFG_SQL_AVAILABLE"
2109 avail="$CFG_GFX_AVAILABLE"
2110 if [ "$OPT" = "plugin" ]; then
2111 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2115 avail="$CFG_DECORATION_AVAILABLE"
2116 if [ "$OPT" = "plugin" ]; then
2117 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2121 avail="$CFG_KBD_AVAILABLE"
2122 if [ "$OPT" = "plugin" ]; then
2123 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2127 avail="$CFG_MOUSE_AVAILABLE"
2128 if [ "$OPT" = "plugin" ]; then
2129 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2133 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2134 if [ "$OPT" != "plugin" ]; then
2135 # png is always built in
2141 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2145 # Check that that user's value is available.
2148 if [ "$VAL" = "$d" ]; then
2153 [ "$found" = yes ] || ERROR=yes
2155 if [ "$VAR" = "sql" ]; then
2156 # set the CFG_SQL_driver
2157 eval "CFG_SQL_$VAL=\$OPT"
2159 elif [ "$VAR" = "imageformat" ]; then
2160 [ "$OPT" = "qt" ] && OPT=yes
2161 VAL="`echo $VAL |tr a-z A-Z`"
2162 eval "CFG_$VAL=$OPT"
2166 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2167 if [ "$OPT" = "plugin" ]; then
2168 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2169 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2170 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2171 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2172 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2173 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2174 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2175 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2178 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2179 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2180 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2181 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2182 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2186 QMakeVar add "${VAR}s" "${VAL}"
2187 elif [ "$OPT" = "no" ]; then
2188 PLUG_VAR="${VAR}-plugin"
2189 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2190 IN_VAR="${VAR}-driver"
2194 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2195 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2196 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2197 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2198 QMakeVar del "${IN_VAR}s" "$VAL"
2199 QMakeVar del "${PLUG_VAR}s" "$VAL"
2201 if [ "$ERROR" = "yes" ]; then
2202 echo "$CURRENT_OPT: unknown argument"
2207 if [ "$VAL" = "yes" ]; then
2208 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2209 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2213 elif [ "$VAL" = "no" ]; then
2214 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2215 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2224 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2231 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2238 D_FLAGS="$D_FLAGS \"$VAL\""
2241 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2244 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2247 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2250 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2253 if [ "$PLATFORM_MAC" = "yes" ]; then
2254 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2255 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2261 if [ "$PLATFORM_MAC" = "yes" ]; then
2262 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2268 W_FLAGS="$W_FLAGS \"${VAL}\""
2274 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2281 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2282 CFG_PHONON_BACKEND="$VAL"
2288 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2289 CFG_MULTIMEDIA="$VAL"
2301 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2302 CFG_AUDIO_BACKEND="$VAL"
2308 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2315 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2316 CFG_FORCE_ASSERTS="$VAL"
2322 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2332 if [ "$UNKNOWN_OPT" = "yes" ]; then
2333 echo "${CURRENT_OPT}: invalid command-line switch"
2339 # update QT_CONFIG to show our current predefined configuration
2340 case "$CFG_QCONFIG" in
2341 minimal|small|medium|large|full)
2342 # these are a sequence of increasing functionality
2343 for c in minimal small medium large full; do
2344 QT_CONFIG="$QT_CONFIG $c-config"
2345 [ "$CFG_QCONFIG" = $c ] && break
2349 # not known to be sufficient for anything
2350 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2351 echo >&2 "Error: configuration file not found:"
2352 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2354 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2359 #-------------------------------------------------------------------------------
2360 # build tree initialization
2361 #-------------------------------------------------------------------------------
2363 # where to find which..
2364 unixtests="$relpath/config.tests/unix"
2365 mactests="$relpath/config.tests/mac"
2366 WHICH="$unixtests/which.test"
2368 PERL=`$WHICH perl 2>/dev/null`
2370 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2372 for e in gawk nawk awk; do
2373 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2380 PERL="/usr/bin/perl"
2381 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2385 ### skip this if the user just needs help...
2386 if [ "$OPT_HELP" != "yes" ]; then
2388 # is this a shadow build?
2389 if [ "$OPT_SHADOW" = "maybe" ]; then
2391 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2392 if [ -h "$outpath" ]; then
2393 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2399 if [ "$OPT_SHADOW" = "yes" ]; then
2400 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2401 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2402 echo >&2 "Cannot proceed."
2405 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2408 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2410 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2411 echo "Qt can be built in release mode with separate debug information, so"
2412 echo "-debug-and-release is not necessary anymore"
2416 if [ "$CFG_SILENT" = "yes" ]; then
2417 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2420 # if the source tree is different from the build tree,
2421 # symlink or copy part of the sources
2422 if [ "$OPT_SHADOW" = "yes" ]; then
2423 echo "Preparing build tree..."
2425 if [ -z "$PERL" ]; then
2427 echo "You need perl in your PATH to make a shadow build."
2428 echo "Cannot proceed."
2432 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2434 # symlink the qmake directory
2435 find "$relpath/qmake" | while read a; do
2436 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2437 if [ '!' -f "$my_a" ]; then
2438 if [ -d "$a" ]; then
2439 # directories are created...
2442 a_dir=`dirname "$my_a"`
2443 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2444 # ... and files are symlinked
2445 case `basename "$a"` in
2446 *.o|*.d|GNUmakefile*|qmake)
2457 # make a syncqt script that can be used in the shadow
2458 rm -f "$outpath/bin/syncqt"
2459 if [ -x "$relpath/bin/syncqt" ]; then
2460 mkdir -p "$outpath/bin"
2461 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2462 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2463 chmod 755 "$outpath/bin/syncqt"
2466 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2467 rm -f "$outpath/bin/$i"
2468 if [ -x "$relpath/bin/$i" ]; then
2469 mkdir -p "$outpath/bin"
2470 echo "#!/bin/sh" >"$outpath/bin/$i"
2471 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2472 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2473 chmod 755 "$outpath/bin/$i"
2477 # symlink the mkspecs directory
2478 mkdir -p "$outpath/mkspecs"
2479 rm -rf "$outpath"/mkspecs/*
2480 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2481 rm -f "$outpath/mkspecs/default"
2485 rm -rf "$outpath/mkspecs/$1"
2486 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2487 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2490 # Special case for mkspecs/features directory.
2491 # To be able to place .prf files into a shadow build directory,
2492 # we're creating links for files only. The directory structure is reproduced.
2493 ShadowMkspecs features
2495 # The modules dir is special, too.
2496 ShadowMkspecs modules
2498 # symlink the doc directory
2499 rm -rf "$outpath/doc"
2500 ln -s "$relpath/doc" "$outpath/doc"
2502 # make sure q3porting.xml can be found
2503 mkdir -p "$outpath/tools/porting/src"
2504 rm -f "$outpath/tools/porting/src/q3porting.xml"
2505 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2508 # symlink fonts to be able to run application from build directory
2509 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2510 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2511 mkdir -p "${outpath}/lib"
2512 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2516 if [ "$OPT_FAST" = "auto" ]; then
2517 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2524 # find a make command
2525 if [ -z "$MAKE" ]; then
2527 for mk in gmake make; do
2528 if "$WHICH" $mk >/dev/null 2>&1; then
2533 if [ -z "$MAKE" ]; then
2534 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2535 echo >&2 "Cannot proceed."
2538 # export MAKE, we need it later in the config.tests
2544 #-------------------------------------------------------------------------------
2545 # auto-detect all that hasn't been specified in the arguments
2546 #-------------------------------------------------------------------------------
2548 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2549 if [ "$CFG_EMBEDDED" != "no" ]; then
2550 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2552 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2553 if [ -z "$XPLATFORM" ]; then
2554 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2555 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2559 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2560 if [ -z "$XPLATFORM" ]; then
2561 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2562 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2566 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2567 if [ -z "$XPLATFORM" ]; then
2568 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2569 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2573 if [ -z "$PLATFORM" ]; then
2574 case "$UNAME_MACHINE" in
2576 PLATFORM=qws/linux-x86-g++
2579 PLATFORM=qws/linux-x86_64-g++
2582 PLATFORM=qws/linux-generic-g++
2586 if [ -z "$XPLATFORM" ]; then
2587 if [ "$CFG_EMBEDDED" = "auto" ]; then
2588 if [ -n "$CFG_ARCH" ]; then
2589 CFG_EMBEDDED=$CFG_ARCH
2591 case "$UNAME_MACHINE" in
2599 CFG_EMBEDDED=generic
2604 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2608 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2609 if [ -z "$XPLATFORM" ]; then
2610 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2611 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2615 if [ -z "$XPLATFORM" ]; then
2620 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2627 if [ -z "$PLATFORM" ]; then
2629 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2631 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2633 # PLATFORM=macx-xcode
2640 #PLATFORM=aix-g++-64
2642 #PLATFORM=aix-xlc-64
2644 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2654 # PLATFORM=dynix-g++
2660 PLATFORM=freebsd-g++
2662 - Also available for FreeBSD: freebsd-icc
2666 PLATFORM=openbsd-g++
2677 #PLATFORM=irix-cc-64
2679 - Also available for IRIX: irix-g++ irix-cc-64
2683 case "$UNAME_MACHINE" in
2685 #PLATFORM=hpuxi-acc-32
2686 PLATFORM=hpuxi-acc-64
2688 - Also available for HP-UXi: hpuxi-acc-32
2694 #PLATFORM=hpux-acc-64
2696 #PLATFORM=hpux-acc-o64
2698 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2707 - Also available for Tru64: tru64-g++
2711 case "$UNAME_MACHINE" in
2713 PLATFORM=linux-g++-64
2720 - Also available for Linux: linux-kcc linux-icc linux-cxx
2724 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2725 PLATFORM="solaris-g++"
2727 #PLATFORM=solaris-g++
2729 #PLATFORM=solaris-cc64
2732 - Also available for Solaris: solaris-g++ solaris-cc-64
2735 ReliantUNIX-*:*|SINIX-*:*)
2736 PLATFORM=reliant-cds
2737 #PLATFORM=reliant-cds-64
2739 - Also available for Reliant UNIX: reliant-cds-64
2749 #PLATFORM=unixware-g++
2750 PLATFORM=unixware-cc
2752 - Also available for OpenUNIX: unixware-g++
2756 #PLATFORM=unixware-g++
2757 PLATFORM=unixware-cc
2759 - Also available for UnixWare: unixware-g++
2766 - Also available for SCO OpenServer: sco-g++
2770 PLATFORM=unixware-g++
2773 PLATFORM=unsupported/qnx-g++
2776 if [ "$OPT_HELP" != "yes" ]; then
2778 for p in $PLATFORMS; do
2779 echo " $relconf $* -platform $p"
2782 echo " The build script does not currently recognize all" >&2
2783 echo " platforms supported by Qt." >&2
2784 echo " Rerun this script with a -platform option listed to" >&2
2785 echo " set the system/compiler combination you use." >&2
2792 if [ "$PLATFORM_QWS" = "yes" ]; then
2794 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2796 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2799 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2801 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2802 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2804 if [ -d "$PLATFORM" ]; then
2805 QMAKESPEC="$PLATFORM"
2807 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2809 if [ -d "$XPLATFORM" ]; then
2810 XQMAKESPEC="$XPLATFORM"
2812 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2814 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2815 QT_CROSS_COMPILE=yes
2816 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2819 if [ "$PLATFORM_MAC" = "yes" ]; then
2820 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2822 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2823 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2824 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2825 echo " built with 'macx-g++'" >&2
2831 # check specified platforms are supported
2832 if [ '!' -d "$QMAKESPEC" ]; then
2834 echo " The specified system/compiler is not supported:"
2838 echo " Please see the README file for a complete list."
2842 if [ '!' -d "$XQMAKESPEC" ]; then
2844 echo " The specified system/compiler is not supported:"
2848 echo " Please see the README file for a complete list."
2852 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2854 echo " The specified system/compiler port is not complete:"
2856 echo " $XQMAKESPEC/qplatformdefs.h"
2858 echo " Please contact qt-info@nokia.com."
2863 # now look at the configs and figure out what platform we are config'd for
2864 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2865 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2867 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2869 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2870 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2871 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2872 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2873 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2877 #-------------------------------------------------------------------------------
2878 # determine the system architecture
2879 #-------------------------------------------------------------------------------
2880 if [ "$OPT_VERBOSE" = "yes" ]; then
2881 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2884 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2885 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2887 echo "You have specified a target architecture with -embedded and -arch."
2888 echo "The two architectures you have specified are different, so we can"
2889 echo "not proceed. Either set both to be the same, or only use -embedded."
2895 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2896 case `basename "$XPLATFORM"` in
2899 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2901 echo "Please contact qt-info@nokia.com to upgrade your license to"
2902 echo "include this platform, or install the Qt Open Source Edition"
2903 echo "if you intend to develop free software."
2909 if [ -z "${CFG_HOST_ARCH}" ]; then
2910 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2912 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2913 case "$CFG_HOST_ARCH" in
2918 if [ "$OPT_VERBOSE" = "yes" ]; then
2919 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2923 CFG_HOST_ARCH=`uname -p`
2924 if [ "$OPT_VERBOSE" = "yes" ]; then
2925 echo " SGI ($CFG_HOST_ARCH)"
2929 case "$UNAME_MACHINE" in
2931 if [ "$OPT_VERBOSE" = "yes" ]; then
2932 echo " Sun SPARC (sparc)"
2939 if [ "$OPT_VERBOSE" = "yes" ]; then
2940 echo " 64-bit AMD 80x86 (x86_64)"
2942 CFG_HOST_ARCH=x86_64
2945 if [ "$OPT_VERBOSE" = "yes" ]; then
2946 echo " 32-bit Intel 80x86 (i386)"
2954 if [ "$OPT_VERBOSE" = "yes" ]; then
2955 echo " 64-bit IBM PowerPC (powerpc)"
2957 CFG_HOST_ARCH=powerpc
2960 if [ "$OPT_VERBOSE" = "yes" ]; then
2961 echo " HP PA-RISC (parisc)"
2963 CFG_HOST_ARCH=parisc
2966 if [ "$OPT_VERBOSE" = "yes" ]; then
2967 echo " 32-bit Intel 80x86 (i386)"
2971 *:*:x86_64|*:*:amd64)
2972 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2973 if [ "$OPT_VERBOSE" = "yes" ]; then
2974 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2978 if [ "$OPT_VERBOSE" = "yes" ]; then
2979 echo " 64-bit AMD 80x86 (x86_64)"
2981 CFG_HOST_ARCH=x86_64
2985 if [ "$OPT_VERBOSE" = "yes" ]; then
2986 echo " 32-bit PowerPC (powerpc)"
2988 CFG_HOST_ARCH=powerpc
2991 if [ "$OPT_VERBOSE" = "yes" ]; then
2992 echo " 64-bit PowerPC (powerpc)"
2994 CFG_HOST_ARCH=powerpc
2997 if [ "$OPT_VERBOSE" = "yes" ]; then
2998 echo " IBM S/390 (s390)"
3003 if [ "$OPT_VERBOSE" = "yes" ]; then
3009 if [ "$OPT_VERBOSE" = "yes" ]; then
3010 echo " Linux on SPARC"
3015 case "$UNAME_MACHINE" in
3017 if [ "$OPT_VERBOSE" = "yes" ]; then
3018 echo " QNX on Intel 80x86 (i386)"
3025 if [ "$OPT_VERBOSE" = "yes" ]; then
3026 echo " Trying '$UNAME_MACHINE'..."
3028 CFG_HOST_ARCH="$UNAME_MACHINE"
3033 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3034 if [ -n "$CFG_ARCH" ]; then
3035 CFG_EMBEDDED=$CFG_ARCH
3038 case "$CFG_EMBEDDED" in
3061 CFG_ARCH="$CFG_EMBEDDED"
3064 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3065 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3066 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3067 CFG_ARCH=$CFG_HOST_ARCH
3074 # previously, armv6 was a different arch
3080 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3081 if [ "$OPT_VERBOSE" = "yes" ]; then
3082 echo " '$CFG_ARCH' is supported"
3085 if [ "$OPT_VERBOSE" = "yes" ]; then
3086 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3090 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3091 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3092 if [ "$OPT_VERBOSE" = "yes" ]; then
3093 echo " '$CFG_HOST_ARCH' is supported"
3096 if [ "$OPT_VERBOSE" = "yes" ]; then
3097 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3099 CFG_HOST_ARCH=generic
3103 if [ "$OPT_VERBOSE" = "yes" ]; then
3104 echo "System architecture: '$CFG_ARCH'"
3105 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3106 echo "Host architecture: '$CFG_HOST_ARCH'"
3110 #-------------------------------------------------------------------------------
3111 # tests that don't need qmake (must be run before displaying help)
3112 #-------------------------------------------------------------------------------
3114 # detect build style
3115 if [ "$CFG_DEBUG" = "auto" ]; then
3116 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
3117 CFG_DEBUG_RELEASE=yes
3119 elif [ "$CFG_DEV" = "yes" ]; then
3120 CFG_DEBUG_RELEASE=no
3123 CFG_DEBUG_RELEASE=no
3127 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3128 QT_CONFIG="$QT_CONFIG build_all"
3131 if [ -z "$PKG_CONFIG" ]; then
3132 # See if PKG_CONFIG is set in the mkspec:
3133 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3135 if [ -z "$PKG_CONFIG" ]; then
3136 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3139 # Work out if we can use pkg-config
3140 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3141 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3143 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3144 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3145 echo >&2 "environment!"
3147 if [ -z "$PKG_CONFIG_PATH" ]; then
3149 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3150 echo >&2 "the host compiler's .pc files will be used. This is probably"
3151 echo >&2 "not what you want."
3153 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3155 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3156 echo >&2 "been set. This means your toolchain's .pc files must contain"
3157 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3158 echo >&2 "tests are failing, please check these files."
3163 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3164 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3165 echo >&2 "dependencies"
3171 if [ ! -n "$PKG_CONFIG" ]; then
3172 QT_CONFIG="$QT_CONFIG no-pkg-config"
3175 # pass on $CFG_SDK to the configure tests.
3176 if [ '!' -z "$CFG_SDK" ]; then
3177 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3180 # find the default framework value
3181 if [ "$PLATFORM_MAC" = "yes" ]; then
3182 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3183 CFG_FRAMEWORK="$CFG_SHARED"
3184 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3186 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3194 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3195 TEST_COMPILER="$CXX"
3197 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3198 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3199 if [ -z "$TEST_COMPILER" ]; then
3200 echo "ERROR: Cannot set the compiler for the configuration tests"
3205 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3206 TEST_COMPILER="nacl-gcc"
3210 if [ -n "$CFG_SYSROOT" ]; then
3211 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3212 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3213 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3215 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3219 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3221 # auto-detect precompiled header support
3222 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3223 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3230 #auto-detect DWARF2 on the mac
3231 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3232 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3239 # don't autodetect support for separate debug info on objcopy when
3240 # cross-compiling as lots of toolchains seems to have problems with this
3241 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3242 CFG_SEPARATE_DEBUG_INFO="no"
3245 # auto-detect support for separate debug info in objcopy
3246 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3247 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3248 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3249 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3250 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3251 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3252 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3253 CFG_SEPARATE_DEBUG_INFO=no
3257 # binutils on HP-UX is buggy; default to no.
3258 CFG_SEPARATE_DEBUG_INFO=no
3261 CFG_SEPARATE_DEBUG_INFO=yes
3267 # auto-detect -fvisibility support
3268 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3269 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3270 CFG_REDUCE_EXPORTS=no
3272 CFG_REDUCE_EXPORTS=yes
3276 # detect the availability of the -Bsymbolic-functions linker optimization
3277 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3278 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3279 CFG_REDUCE_RELOCATIONS=no
3281 CFG_REDUCE_RELOCATIONS=yes
3285 # auto-detect GNU make support
3286 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3290 # If -opengl wasn't specified, don't try to auto-detect
3291 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3296 if [ "$PLATFORM_MAC" = "yes" ]; then
3297 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3302 # find the default framework value
3303 if [ "$PLATFORM_MAC" = "yes" ]; then
3304 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3305 CFG_FRAMEWORK="$CFG_SHARED"
3306 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3308 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3316 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3317 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3318 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3319 # get the darwin version. 10.0.0 and up means snow leopard.
3320 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3321 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3323 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3328 # x11 tests are done after qmake is built
3331 #setup the build parts
3332 if [ -z "$CFG_BUILD_PARTS" ]; then
3333 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3335 # don't build tools by default when cross-compiling
3336 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3337 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3340 for nobuild in $CFG_NOBUILD_PARTS; do
3341 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3343 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3345 # echo "WARNING: libs is a required part of the build."
3347 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3350 #-------------------------------------------------------------------------------
3351 # post process QT_INSTALL_* variables
3352 #-------------------------------------------------------------------------------
3354 if [ -z "$QT_INSTALL_PREFIX" ]; then
3355 if [ "$CFG_DEV" = "yes" ]; then
3356 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3358 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3361 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3363 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3364 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3365 if [ "$PLATFORM_MAC" = "yes" ]; then
3366 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3369 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3372 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3374 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3375 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3376 if [ "$PLATFORM_MAC" = "yes" ]; then
3377 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3382 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3385 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3387 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3388 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3389 if [ "$PLATFORM_MAC" = "yes" ]; then
3390 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3391 QT_INSTALL_LIBS="/Libraries/Frameworks"
3395 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3397 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3399 if [ -z "$QT_INSTALL_BINS" ]; then #default
3400 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3401 if [ "$PLATFORM_MAC" = "yes" ]; then
3402 QT_INSTALL_BINS="/Developer/Applications/Qt"
3405 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3407 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3409 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3410 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3411 if [ "$PLATFORM_MAC" = "yes" ]; then
3412 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3415 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3417 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3419 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3420 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3421 if [ "$PLATFORM_MAC" = "yes" ]; then
3422 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3425 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3427 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3429 if [ -z "$QT_INSTALL_DATA" ]; then #default
3430 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3432 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3434 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3435 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3437 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3439 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3440 if [ "$PLATFORM_MAC" = "yes" ]; then
3441 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3443 QT_INSTALL_SETTINGS=/etc/xdg
3446 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3448 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3449 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3450 if [ "$PLATFORM_MAC" = "yes" ]; then
3451 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3454 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3456 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3459 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3460 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3461 if [ "$PLATFORM_MAC" = "yes" ]; then
3462 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3465 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3467 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3469 #-------------------------------------------------------------------------------
3470 # help - interactive parts of the script _after_ this section please
3471 #-------------------------------------------------------------------------------
3473 # next, emit a usage message if something failed.
3474 if [ "$OPT_HELP" = "yes" ]; then
3475 [ "x$ERROR" = "xyes" ] && echo
3476 if [ "$CFG_NIS" = "no" ]; then
3483 if [ "$CFG_CUPS" = "no" ]; then
3490 if [ "$CFG_ICONV" = "no" ]; then
3497 if [ "$CFG_LARGEFILE" = "no" ]; then
3504 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3511 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3519 if [ "$CFG_XCB" = "no" ]; then
3527 if [ "$CFG_WAYLAND" = "no" ]; then
3534 if [ "$CFG_XINPUT2" = "no" ]; then
3543 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3544 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3545 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3546 [-release] [-debug] [-debug-and-release]
3547 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3548 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3549 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3550 [-plugin-sql-<driver>] [-system-sqlite]
3551 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3552 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3553 [-no-libpng] [-qt-libpng] [-system-libpng]
3554 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3555 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3556 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3557 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3558 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3559 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3560 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3561 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3562 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3563 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3564 [-no-openssl] [-openssl] [-openssl-linked]
3565 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3566 [-no-javascript-jit] [-javascript-jit]
3567 [-no-script] [-script] [-no-scripttools] [-scripttools]
3568 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3569 [-no-location] [-location]
3570 [-qt-pcre] [-system-pcre]
3571 [additional platform specific options (see below)]
3574 Installation options:
3576 -qpa ................ This will enable the QPA build.
3577 QPA is a window system agnostic implementation of Qt.
3579 These are optional, but you may specify install directories.
3581 -prefix <dir> ...... This will install everything relative to <dir>
3582 (default $QT_INSTALL_PREFIX)
3584 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3587 -hostprefix [dir] .. Tools and libraries needed when developing
3588 applications are installed in [dir]. If [dir] is
3589 not given, the current build directory will be used.
3594 * -prefix-install .... Force a sandboxed "local" installation of
3595 Qt. This will install into
3596 $QT_INSTALL_PREFIX, if this option is
3597 disabled then some platforms will attempt a
3598 "system" install by placing default values to
3599 be placed in a system location other than
3602 You may use these to separate different parts of the install:
3604 -bindir <dir> ......... Executables will be installed to <dir>
3605 (default PREFIX/bin)
3606 -libdir <dir> ......... Libraries will be installed to <dir>
3607 (default PREFIX/lib)
3608 -docdir <dir> ......... Documentation will be installed to <dir>
3609 (default PREFIX/doc)
3610 -headerdir <dir> ...... Headers will be installed to <dir>
3611 (default PREFIX/include)
3612 -plugindir <dir> ...... Plugins will be installed to <dir>
3613 (default PREFIX/plugins)
3614 -importdir <dir> ...... Imports for QML will be installed to <dir>
3615 (default PREFIX/imports)
3616 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3618 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3619 (default PREFIX/translations)
3620 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3621 (default PREFIX/etc/settings)
3622 -examplesdir <dir> .... Examples will be installed to <dir>
3623 (default PREFIX/examples)
3624 -testsdir <dir> ....... Tests will be installed to <dir>
3625 (default PREFIX/tests)
3629 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3630 that needs to be evaluated. If the evaluation succeeds, the feature is
3631 included. Here is a short explanation of each option:
3633 * -release ........... Compile and link Qt with debugging turned off.
3634 -debug ............. Compile and link Qt with debugging turned on.
3635 -debug-and-release . Compile and link two versions of Qt, with and without
3636 debugging turned on (Mac only).
3638 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3640 -opensource ........ Compile and link the Open-Source Edition of Qt.
3641 -commercial ........ Compile and link the Commercial Edition of Qt.
3644 * -shared ............ Create and use shared Qt libraries.
3645 -static ............ Create and use static Qt libraries.
3647 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3649 -fast .............. Configure Qt quickly by generating Makefiles only for
3650 library and subdirectory targets. All other Makefiles
3651 are created as wrappers, which will in turn run qmake.
3653 -no-largefile ...... Disables large file support.
3654 + -largefile ......... Enables Qt to access files larger than 4 GB.
3657 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3664 if [ "$CFG_DBUS" = "no" ]; then
3673 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3674 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3676 -no-accessibility .. Do not compile Accessibility support.
3677 * -accessibility ..... Compile Accessibility support.
3679 $SHN -no-stl ............ Do not compile STL support.
3680 $SHY -stl ............... Compile STL support.
3682 -no-sql-<driver> ... Disable SQL <driver> entirely.
3683 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3685 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3688 Possible values for <driver>:
3689 [ $CFG_SQL_AVAILABLE ]
3691 -system-sqlite ..... Use sqlite from the operating system.
3693 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3694 + -xmlpatterns ....... Build the QtXmlPatterns module.
3695 QtXmlPatterns is built if a decent C++ compiler
3696 is used and exceptions are enabled.
3698 -no-multimedia ..... Do not build the QtMultimedia module.
3699 + -multimedia ........ Build the QtMultimedia module.
3701 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3702 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3704 -no-phonon ......... Do not build the Phonon module.
3705 + -phonon ............ Build the Phonon module.
3706 Phonon is built if a decent C++ compiler is used.
3707 -no-phonon-backend.. Do not build the platform phonon plugin.
3708 + -phonon-backend..... Build the platform phonon plugin.
3710 -no-svg ............ Do not build the SVG module.
3711 + -svg ............... Build the SVG module.
3713 -no-webkit ......... Do not build the WebKit module.
3714 + -webkit ............ Build the WebKit module.
3715 WebKit is built if a decent C++ compiler is used.
3716 -webkit-debug ...... Build the WebKit module with debug symbols.
3718 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3719 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3721 -no-script ......... Do not build the QtScript module.
3722 + -script ............ Build the QtScript module.
3724 -no-scripttools .... Do not build the QtScriptTools module.
3725 + -scripttools ....... Build the QtScriptTools module.
3727 -no-v8 ............. Do not build the V8 module.
3728 + -v8 ................ Build the V8 module.
3730 -no-declarative ..... Do not build the declarative module.
3731 + -declarative ....... Build the declarative module.
3733 -no-declarative-debug ..... Do not build the declarative debugging support.
3734 + -declarative-debug ....... Build the declarative debugging support.
3736 -no-location ....... Do not build the QtLocation module.
3737 + -location .......... Build the QtLocation module.
3739 -platform target ... The operating system and compiler you are building
3742 See the README file for a list of supported
3743 operating systems and compilers.
3746 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3748 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3749 raster - Software rasterizer
3750 opengl - Rendering via OpenGL, Experimental!
3751 openvg - Rendering via OpenVG, Experimental!
3758 -no-mmx ............ Do not compile with use of MMX instructions.
3759 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3760 -no-sse ............ Do not compile with use of SSE instructions.
3761 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3762 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3763 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3764 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3765 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3766 -no-avx ............ Do not compile with use of AVX instructions.
3767 -no-neon ........... Do not compile with use of NEON instructions.
3769 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3770 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3772 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3774 -D <string> ........ Add an explicit define to the preprocessor.
3775 -I <string> ........ Add an explicit include path.
3776 -L <string> ........ Add an explicit library path.
3778 -help, -h .......... Display this information.
3780 Third Party Libraries:
3782 -qt-zlib ........... Use the zlib bundled with Qt.
3783 + -system-zlib ....... Use zlib from the operating system.
3784 See http://www.gzip.org/zlib
3786 -no-gif ............ Do not compile GIF reading support.
3788 -no-libtiff ........ Do not compile TIFF support.
3789 -qt-libtiff ........ Use the libtiff bundled with Qt.
3790 + -system-libtiff .... Use libtiff from the operating system.
3791 See http://www.libtiff.org
3793 -no-libpng ......... Do not compile PNG support.
3794 -qt-libpng ......... Use the libpng bundled with Qt.
3795 + -system-libpng ..... Use libpng from the operating system.
3796 See http://www.libpng.org/pub/png
3798 -no-libjpeg ........ Do not compile JPEG support.
3799 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3800 + -system-libjpeg .... Use libjpeg from the operating system.
3801 See http://www.ijg.org
3803 -no-openssl ........ Do not compile support for OpenSSL.
3804 + -openssl ........... Enable run-time OpenSSL support.
3805 -openssl-linked .... Enabled linked OpenSSL support.
3807 -qt-pcre ........... Use the PCRE library bundled with Qt.
3808 + -system-pcre ....... Use the PCRE library from the operating system.
3812 -make <part> ....... Add part to the list of parts to be built at make time.
3813 ($QT_DEFAULT_BUILD_PARTS)
3814 -nomake <part> ..... Exclude part from the list of parts to be built.
3816 -R <string> ........ Add an explicit runtime library path to the Qt
3818 -l <string> ........ Add an explicit library.
3820 -no-rpath .......... Do not use the library install path as a runtime
3822 + -rpath ............. Link Qt libraries and executables using the library
3823 install path as a runtime library path. Equivalent
3824 to -R install_libpath
3826 -continue .......... Continue as far as possible if an error occurs.
3828 -verbose, -v ....... Print verbose information about each step of the
3831 -silent ............ Reduce the build output so that warnings and errors
3832 can be seen more easily.
3834 * -no-optimized-qmake ... Do not build qmake optimized.
3835 -optimized-qmake ...... Build qmake optimized.
3837 -no-gui ............ Don't build the Qt GUI library
3839 $NSN -no-nis ............ Do not compile NIS support.
3840 $NSY -nis ............... Compile NIS support.
3842 $CUN -no-cups ........... Do not compile CUPS support.
3843 $CUY -cups .............. Compile CUPS support.
3844 Requires cups/cups.h and libcups.so.2.
3846 $CIN -no-iconv .......... Do not compile support for iconv(3).
3847 $CIY -iconv ............. Compile support for iconv(3).
3849 $PHN -no-pch ............ Do not use precompiled header support.
3850 $PHY -pch ............... Use precompiled header support.
3852 $DBN -no-dbus ........... Do not compile the QtDBus module.
3853 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3854 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3856 -reduce-relocations ..... Reduce relocations in the libraries through extra
3857 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3858 experimental; needs GNU ld >= 2.18).
3860 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3864 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3865 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3872 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3880 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3884 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3885 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3887 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3888 $XCBY -xcb ............... Compile Xcb support.
3890 $XWN -no-wayland......... Do not compile Wayland support.
3891 $XWY -wayland .......... Compile Wayland support.
3897 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3901 $X2N -no-xinput2......... Do not compile XInput2 support.
3902 $X2Y -xinput2............ Compile XInput2 support.
3908 if [ "$PLATFORM_X11" = "yes" ]; then
3909 if [ "$CFG_SM" = "no" ]; then
3916 if [ "$CFG_XSHAPE" = "no" ]; then
3923 if [ "$CFG_XVIDEO" = "no" ]; then
3930 if [ "$CFG_XINERAMA" = "no" ]; then
3937 if [ "$CFG_FONTCONFIG" = "no" ]; then
3944 if [ "$CFG_XCURSOR" = "no" ]; then
3951 if [ "$CFG_XFIXES" = "no" ]; then
3958 if [ "$CFG_XRANDR" = "no" ]; then
3965 if [ "$CFG_XRENDER" = "no" ]; then
3972 if [ "$CFG_MITSHM" = "no" ]; then
3979 if [ "$CFG_XINPUT" = "no" ]; then
3986 if [ "$CFG_XKB" = "no" ]; then
3993 if [ "$CFG_IM" = "no" ]; then
4004 -no-gtkstyle ....... Do not build the GTK theme integration.
4005 + -gtkstyle .......... Build the GTK theme integration.
4007 * -no-nas-sound ...... Do not compile in NAS sound support.
4008 -system-nas-sound .. Use NAS libaudio from the operating system.
4009 See http://radscan.com/nas.html
4011 -egl ............... Use EGL instead of GLX to manage contexts.
4012 When building for desktop OpenGL, this option will
4013 make Qt use EGL to manage contexts rather than the
4014 GLX, which is the default. Note: For OpenGL ES, EGL
4017 -no-opengl ......... Do not support OpenGL.
4018 + -opengl <api> ...... Enable OpenGL support.
4019 With no parameter, this will auto-detect the "best"
4020 OpenGL API to use. If desktop OpenGL is available, it
4021 will be used. Use desktop or es2 for <api>
4022 to force the use of the Desktop OpenGL or
4023 OpenGL ES 2 APIs instead.
4025 -no-openvg ........ Do not support OpenVG.
4026 + -openvg ........... Enable OpenVG support.
4027 Requires EGL support, typically supplied by an OpenGL
4028 or other graphics implementation.
4030 $SMN -no-sm ............. Do not support X Session Management.
4031 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4033 $SHN -no-xshape ......... Do not compile XShape support.
4034 $SHY -xshape ............ Compile XShape support.
4035 Requires X11/extensions/shape.h.
4037 $XVN -no-xvideo ......... Do not compile XVideo support.
4038 $XVY -xvideo ............ Compile XVideo support.
4039 Requires X11/extensions/Xv.h & Xvlib.h.
4041 $SHN -no-xsync .......... Do not compile XSync support.
4042 $SHY -xsync ............. Compile XSync support.
4043 Requires X11/extensions/sync.h.
4045 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4046 $XAY -xinerama .......... Compile Xinerama support.
4047 Requires X11/extensions/Xinerama.h and libXinerama.
4048 By default, Xinerama support will be compiled if
4049 available and the shared libraries are dynamically
4052 $XCN -no-xcursor ........ Do not compile Xcursor support.
4053 $XCY -xcursor ........... Compile Xcursor support.
4054 Requires X11/Xcursor/Xcursor.h and libXcursor.
4055 By default, Xcursor support will be compiled if
4056 available and the shared libraries are dynamically
4059 $XFN -no-xfixes ......... Do not compile Xfixes support.
4060 $XFY -xfixes ............ Compile Xfixes support.
4061 Requires X11/extensions/Xfixes.h and libXfixes.
4062 By default, Xfixes support will be compiled if
4063 available and the shared libraries are dynamically
4066 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4067 $XZY -xrandr ............ Compile Xrandr support.
4068 Requires X11/extensions/Xrandr.h and libXrandr.
4070 $XRN -no-xrender ........ Do not compile Xrender support.
4071 $XRY -xrender ........... Compile Xrender support.
4072 Requires X11/extensions/Xrender.h and libXrender.
4074 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4075 $XMY -mitshm ............ Compile MIT-SHM support.
4076 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4078 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4079 $FCGY -fontconfig ........ Compile FontConfig support.
4080 Requires fontconfig/fontconfig.h, libfontconfig,
4081 freetype.h and libfreetype.
4083 $XIN -no-xinput ......... Do not compile Xinput support.
4084 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4085 which requires IRIX with wacom.h and libXi or
4086 XFree86 with X11/extensions/XInput.h and libXi.
4088 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4089 $XKY -xkb ............... Compile XKB support.
4094 if [ "$BUILD_ON_MAC" = "yes" ]; then
4099 -Fstring ........... Add an explicit framework path.
4100 -fw string ......... Add an explicit framework.
4102 * -framework ......... Build Qt as a series of frameworks and
4103 link tools against those frameworks.
4104 -no-framework ...... Do not build Qt as a series of frameworks.
4106 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4107 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4109 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
4110 Only one arch value can be specified.
4112 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4113 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4115 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4116 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4117 QT_ENABLE_HARFBUZZ environment variable.
4122 if [ "$PLATFORM_QWS" = "yes" ]; then
4124 Qt for Embedded Linux:
4126 -embedded <arch> .... This will enable the embedded build, you must have a
4127 proper license for this switch to work.
4128 Example values for <arch>: arm mips x86 generic
4132 if [ "$PLATFORM_QPA" = "yes" ]; then
4138 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4141 -xplatform target ... The target platform when cross-compiling.
4143 -no-feature-<feature> Do not compile in <feature>.
4144 -feature-<feature> .. Compile in <feature>. The available features
4145 are described in src/corelib/global/qfeatures.txt
4147 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4148 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4150 The floating point format is usually autodetected by configure. Use this
4151 to override the detected value.
4153 -little-endian ...... Target platform is little endian (LSB first).
4154 -big-endian ......... Target platform is big endian (MSB first).
4156 -host-little-endian . Host platform is little endian (LSB first).
4157 -host-big-endian .... Host platform is big endian (MSB first).
4159 You only need to specify the endianness when
4160 cross-compiling, otherwise the host
4161 endianness will be used.
4163 -no-freetype ........ Do not compile in Freetype2 support.
4164 -qt-freetype ........ Use the libfreetype bundled with Qt.
4165 * -system-freetype .... Use libfreetype from the operating system.
4166 See http://www.freetype.org/
4168 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4169 default ($CFG_QCONFIG).
4171 -no-opengl .......... Do not support OpenGL.
4172 -opengl <api> ....... Enable OpenGL ES support
4173 With no parameter, this will attempt to auto-detect
4174 OpenGL ES 2, or regular desktop OpenGL.
4175 Use es2 for <api> to override auto-detection.
4179 if [ "$PLATFORM_QWS" = "yes" ]; then
4182 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4183 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4185 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4186 by default all available decorations are on.
4187 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4188 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4189 linked to at run time.
4190 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4191 -no-decoration-<style> ....Disable decoration <style> entirely.
4192 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4194 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4195 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4196 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4197 linked to at run time.
4198 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4199 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4200 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4202 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4203 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4205 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4207 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4209 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4210 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4212 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4213 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4214 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4216 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4217 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4218 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4220 -iwmmxt ............ Compile using the iWMMXt instruction set
4221 (available on some XScale CPUs).
4225 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4226 if [ "$CFG_GLIB" = "no" ]; then
4234 $GBN -no-glib ........... Do not compile Glib support.
4235 $GBY -glib .............. Compile Glib support.
4240 [ "x$ERROR" = "xyes" ] && exit 1
4245 # -----------------------------------------------------------------------------
4246 # LICENSING, INTERACTIVE PART
4247 # -----------------------------------------------------------------------------
4249 if [ "$PLATFORM_QWS" = "yes" ]; then
4250 Platform="Qt for Embedded Linux"
4251 elif [ "$PLATFORM_QPA" = "yes" ]; then
4252 Platform="Qt Lighthouse"
4253 elif [ "$PLATFORM_MAC" = "yes" ]; then
4254 Platform="Qt for Mac OS X"
4255 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4256 Platform="Qt for Windows"
4257 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4259 Platform="Qt for Linux/X11"
4263 echo "This is the $Platform ${EditionString} Edition."
4266 if [ "$Edition" = "OpenSource" ]; then
4268 echo "You are licensed to use this software under the terms of"
4269 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4270 if [ -f "$relpath/LICENSE.GPL3" ]; then
4271 echo "You are also licensed to use this software under the terms of"
4272 echo "the GNU General Public License (GPL) versions 3."
4278 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4279 echo "You have already accepted the terms of the $LicenseType license."
4282 if [ -f "$relpath/LICENSE.GPL3" ]; then
4283 echo "Type '3' to view the GNU General Public License version 3."
4285 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4286 echo "Type 'yes' to accept this license offer."
4287 echo "Type 'no' to decline this license offer."
4289 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4293 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4295 elif [ "$acceptance" = "no" ]; then
4296 echo "You are not licensed to use this software."
4299 elif [ "$acceptance" = "3" ]; then
4300 more "$relpath/LICENSE.GPL3"
4301 elif [ "$acceptance" = "L" ]; then
4302 more "$relpath/LICENSE.LGPL"
4305 elif [ "$Edition" = "Preview" ]; then
4306 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4309 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4310 echo "You have already accepted the terms of the $LicenseType license."
4313 echo "You are licensed to use this software under the terms of"
4314 echo "the $TheLicense"
4316 echo "Type '?' to read the Preview License."
4317 echo "Type 'yes' to accept this license offer."
4318 echo "Type 'no' to decline this license offer."
4320 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4324 if [ "$acceptance" = "yes" ]; then
4326 elif [ "$acceptance" = "no" ] ;then
4327 echo "You are not licensed to use this software."
4330 elif [ "$acceptance" = "?" ]; then
4331 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4334 elif [ "$Edition" != "OpenSource" ]; then
4335 if [ -n "$ExpiryDate" ]; then
4336 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4337 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4338 Today=`date +%Y%m%d`
4339 if [ "$Today" -gt "$ExpiryDate" ]; then
4340 case "$LicenseType" in
4341 Commercial|Academic|Educational)
4342 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4344 echo "NOTICE NOTICE NOTICE NOTICE"
4346 echo " Your support and upgrade period has expired."
4348 echo " You are no longer licensed to use this version of Qt."
4349 echo " Please contact qt-info@nokia.com to renew your support"
4350 echo " and upgrades for this license."
4352 echo "NOTICE NOTICE NOTICE NOTICE"
4357 echo "WARNING WARNING WARNING WARNING"
4359 echo " Your support and upgrade period has expired."
4361 echo " You may continue to use your last licensed release"
4362 echo " of Qt under the terms of your existing license"
4363 echo " agreement. But you are not entitled to technical"
4364 echo " support, nor are you entitled to use any more recent"
4365 echo " Qt releases."
4367 echo " Please contact qt-info@nokia.com to renew your"
4368 echo " support and upgrades for this license."
4370 echo "WARNING WARNING WARNING WARNING"
4377 echo "NOTICE NOTICE NOTICE NOTICE"
4379 echo " Your Evaluation license has expired."
4381 echo " You are no longer licensed to use this software. Please"
4382 echo " contact qt-info@nokia.com to purchase license, or install"
4383 echo " the Qt Open Source Edition if you intend to develop free"
4386 echo "NOTICE NOTICE NOTICE NOTICE"
4393 TheLicense=`head -n 1 "$outpath/LICENSE"`
4395 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4396 echo "You have already accepted the terms of the $TheLicense."
4399 echo "You are licensed to use this software under the terms of"
4400 echo "the $TheLicense."
4402 echo "Type '?' to view the $TheLicense."
4403 echo "Type 'yes' to accept this license offer."
4404 echo "Type 'no' to decline this license offer."
4406 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4410 if [ "$acceptance" = "yes" ]; then
4412 elif [ "$acceptance" = "no" ]; then
4413 echo "You are not licensed to use this software."
4416 else [ "$acceptance" = "?" ]
4417 more "$outpath/LICENSE"
4422 # this should be moved somewhere else
4425 AIX_VERSION=`uname -v`
4426 if [ "$AIX_VERSION" -lt "5" ]; then
4427 QMakeVar add QMAKE_LIBS_X11 -lbind
4434 #-------------------------------------------------------------------------------
4435 # generate qconfig.cpp
4436 #-------------------------------------------------------------------------------
4437 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4439 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4440 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4441 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4442 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4443 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4444 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4445 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4446 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4447 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4448 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4449 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4450 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4451 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4452 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4454 TODAY=`date +%Y-%m-%d`
4455 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4457 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4458 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4460 /* Installation date */
4461 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4465 if [ ! -z "$QT_HOST_PREFIX" ]; then
4466 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4467 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4468 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4469 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4470 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4471 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4472 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4473 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4474 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4475 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4476 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4477 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4479 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4481 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4482 /* Installation Info */
4483 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4484 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4485 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4486 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4487 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4488 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4489 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4490 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4491 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4492 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4493 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4494 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4495 #else // QT_BOOTSTRAPPED
4499 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4500 /* Installation Info */
4501 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4502 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4503 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4504 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4505 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4506 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4507 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4508 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4509 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4510 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4511 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4512 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4515 if [ ! -z "$QT_HOST_PREFIX" ]; then
4516 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4517 #endif // QT_BOOTSTRAPPED
4522 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4523 /* strlen( "qt_lcnsxxxx" ) == 12 */
4524 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4525 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4526 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4527 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4528 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4529 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4530 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4531 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4532 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4533 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4534 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4535 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4536 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4537 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4540 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4541 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4542 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4544 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4545 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4546 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4549 # -----------------------------------------------------------------------------
4550 if [ "$LicenseType" = "Evaluation" ]; then
4551 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4552 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4553 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4556 if [ -n "$EVALKEY" ]; then
4557 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4558 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4559 /* Evaluation license key */
4560 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4562 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4566 # -----------------------------------------------------------------------------
4568 # -----------------------------------------------------------------------------
4571 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4573 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4574 if [ "$OPT_SHADOW" = "yes" ]; then
4575 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4576 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4577 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4582 # $2: optional transformation
4583 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4584 # is where the resulting variable is written to
4585 # Assumes that the optional transformation produces the same variable name for each hit
4586 setBootstrapVariable()
4588 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4594 valStart = index($0, "=") + 1
4597 if (substr($0, valStart - 2, 1) == "+") {
4601 variable = substr($0, 0, valStart - 2 - append)
4602 value = substr($0, valStart)
4603 gsub("[ \t]+", "", variable)
4604 gsub("^[ \t]+", "", value)
4605 gsub("[ \t]+$", "", value)
4607 if (append == 1 && length(combinedValue) > 0) {
4608 combinedValue = combinedValue " " value
4610 combinedValue = value
4614 if (length(combinedValue) > 0) {
4615 printf "%s = %s\n", variable, combinedValue
4621 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4622 echo "Creating qmake. Please wait..."
4625 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4626 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4627 if [ -f "$QCONFIG_H" ]; then
4628 OLD_QCONFIG_H=$QCONFIG_H
4629 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4632 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4633 # when building qmake, we use #defines for the install paths,
4634 # however they are real functions in the library
4635 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4636 mkdir -p "$outpath/src/corelib/global"
4637 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4638 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4641 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4643 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4644 rm -rf mkspecs/default
4645 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4647 for mkfile in GNUmakefile Makefile; do
4650 in_mkfile="${mkfile}.in"
4651 if [ "$mkfile" = "Makefile" ]; then
4652 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4653 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4655 in_mkfile="${mkfile}.unix"
4657 in_mkfile="$relpath/qmake/$in_mkfile"
4658 mkfile="$outpath/qmake/$mkfile"
4659 if [ -f "$mkfile" ]; then
4660 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4663 [ -f "$in_mkfile" ] || continue
4665 echo "########################################################################" > "$mkfile"
4666 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4667 echo "########################################################################" >> "$mkfile"
4670 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4671 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4672 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4674 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4675 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4678 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4679 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4680 if [ "$CFG_SILENT" = "yes" ]; then
4681 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4682 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4684 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4685 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4687 setBootstrapVariable QMAKE_CFLAGS
4688 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4689 setBootstrapVariable QMAKE_LFLAGS
4691 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4692 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4693 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4695 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4696 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4697 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4698 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4699 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4700 elif [ "$CFG_DEBUG" = "yes" ]; then
4701 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4702 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4703 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4704 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4707 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4708 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4709 for rpath in $RPATH_FLAGS; do
4710 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4713 if [ "$BUILD_ON_MAC" = "yes" ]; then
4714 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4715 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4716 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4717 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4718 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4719 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4720 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4721 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4722 if [ '!' -z "$CFG_SDK" ]; then
4723 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4724 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4725 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4726 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4727 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4730 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4731 if [ '!' -z "$D_FLAGS" ]; then
4732 for DEF in $D_FLAGS; do
4733 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4736 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4737 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4738 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4739 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4741 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4742 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4743 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4744 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4745 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4746 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4747 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4748 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4749 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4750 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4752 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4753 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4754 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4755 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4760 QMAKE_BUILD_ERROR=no
4761 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4762 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4763 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4764 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4767 #-------------------------------------------------------------------------------
4768 # tests that need qmake
4769 #-------------------------------------------------------------------------------
4771 # detect availability of float math.h functions
4772 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4773 CFG_USE_FLOATMATH=yes
4775 CFG_USE_FLOATMATH=no
4778 # detect mmx support
4779 if [ "${CFG_MMX}" = "auto" ]; then
4780 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4787 # detect 3dnow support
4788 if [ "${CFG_3DNOW}" = "auto" ]; then
4789 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4796 # detect sse support
4797 if [ "${CFG_SSE}" = "auto" ]; then
4798 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4805 # detect sse2 support
4806 if [ "${CFG_SSE2}" = "auto" ]; then
4807 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4814 # detect sse3 support
4815 if [ "${CFG_SSE3}" = "auto" ]; then
4816 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4823 # detect ssse3 support
4824 if [ "${CFG_SSSE3}" = "auto" ]; then
4825 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4832 # detect sse4.1 support
4833 if [ "${CFG_SSE4_1}" = "auto" ]; then
4834 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
4841 # detect sse4.2 support
4842 if [ "${CFG_SSE4_2}" = "auto" ]; then
4843 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
4850 # detect avx support
4851 if [ "${CFG_AVX}" = "auto" ]; then
4852 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4859 # check iWMMXt support
4860 if [ "$CFG_IWMMXT" = "yes" ]; then
4861 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4862 if [ $? != "0" ]; then
4863 echo "The iWMMXt functionality test failed!"
4864 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4869 # detect neon support
4870 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4871 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
4878 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4881 if [ "$CFG_ZLIB" = "no" ]; then
4882 # Note: Qt no longer support builds without zlib
4883 # So we force a "no" to be "auto" here.
4884 # If you REALLY really need no zlib support, you can still disable
4885 # it by doing the following:
4886 # add "no-zlib" to mkspecs/qconfig.pri
4887 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4889 # There's no guarantee that Qt will build under those conditions
4894 if [ "$CFG_ZLIB" = "auto" ]; then
4895 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
4902 if [ "$CFG_LARGEFILE" = "auto" ]; then
4903 #Large files should be enabled for all Linux systems
4907 # detect how jpeg should be built
4908 if [ "$CFG_JPEG" = "auto" ]; then
4909 if [ "$CFG_SHARED" = "yes" ]; then
4916 if [ "$CFG_LIBJPEG" = "auto" ]; then
4917 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
4924 # detect how gif should be built
4925 if [ "$CFG_GIF" = "auto" ]; then
4926 if [ "$CFG_SHARED" = "yes" ]; then
4933 # detect how tiff should be built
4934 if [ "$CFG_TIFF" = "auto" ]; then
4935 if [ "$CFG_SHARED" = "yes" ]; then
4943 if [ "$CFG_LIBTIFF" = "auto" ]; then
4944 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
4952 if [ "$CFG_LIBPNG" = "auto" ]; then
4953 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
4960 # detect accessibility
4961 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4962 CFG_ACCESSIBILITY=yes
4965 # auto-detect SQL-modules support
4966 for _SQLDR in $CFG_SQL_AVAILABLE; do
4969 if [ "$CFG_SQL_mysql" != "no" ]; then
4970 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4971 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4972 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4973 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4974 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4975 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4976 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4978 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4979 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4980 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4981 echo " You need MySql 4 or higher."
4982 echo " If you believe this message is in error you may use the continue"
4983 echo " switch (-continue) to $0 to continue."
4988 QT_LFLAGS_MYSQL_R=""
4992 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
4993 QMakeVar add CONFIG use_libmysqlclient_r
4994 if [ "$CFG_SQL_mysql" = "auto" ]; then
4995 CFG_SQL_mysql=plugin
4997 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4998 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
4999 if [ "$CFG_SQL_mysql" = "auto" ]; then
5000 CFG_SQL_mysql=plugin
5003 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5004 echo "MySQL support cannot be enabled due to functionality tests!"
5005 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5006 echo " If you believe this message is in error you may use the continue"
5007 echo " switch (-continue) to $0 to continue."
5012 QT_LFLAGS_MYSQL_R=""
5020 if [ "$CFG_SQL_psql" != "no" ]; then
5021 # Be careful not to use native pg_config when cross building.
5022 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5023 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5024 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5026 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5027 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5028 # But, respect PSQL_LIBS if set
5029 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5030 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
5031 if [ "$CFG_SQL_psql" = "auto" ]; then
5035 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5036 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5037 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5038 echo " If you believe this message is in error you may use the continue"
5039 echo " switch (-continue) to $0 to continue."
5050 if [ "$CFG_SQL_odbc" != "no" ]; then
5051 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
5052 if [ "$CFG_SQL_odbc" = "auto" ]; then
5056 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
5057 QT_LFLAGS_ODBC="-liodbc"
5058 if [ "$CFG_SQL_odbc" = "auto" ]; then
5062 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5063 echo "ODBC support cannot be enabled due to functionality tests!"
5064 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5065 echo " If you believe this message is in error you may use the continue"
5066 echo " switch (-continue) to $0 to continue."
5076 if [ "$CFG_SQL_oci" != "no" ]; then
5077 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
5078 if [ "$CFG_SQL_oci" = "auto" ]; then
5082 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5083 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5084 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5085 echo " If you believe this message is in error you may use the continue"
5086 echo " switch (-continue) to $0 to continue."
5095 if [ "$CFG_SQL_tds" != "no" ]; then
5096 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5097 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5098 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
5099 if [ "$CFG_SQL_tds" = "auto" ]; then
5103 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5104 echo "TDS support cannot be enabled due to functionality tests!"
5105 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5106 echo " If you believe this message is in error you may use the continue"
5107 echo " switch (-continue) to $0 to continue."
5116 if [ "$CFG_SQL_db2" != "no" ]; then
5117 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
5118 if [ "$CFG_SQL_db2" = "auto" ]; then
5122 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5123 echo "ODBC support cannot be enabled due to functionality tests!"
5124 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5125 echo " If you believe this message is in error you may use the continue"
5126 echo " switch (-continue) to $0 to continue."
5135 if [ "$CFG_SQL_ibase" != "no" ]; then
5136 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
5137 if [ "$CFG_SQL_ibase" = "auto" ]; then
5138 CFG_SQL_ibase=plugin
5141 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5142 echo "InterBase support cannot be enabled due to functionality tests!"
5143 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5144 echo " If you believe this message is in error you may use the continue"
5145 echo " switch (-continue) to $0 to continue."
5154 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5155 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
5156 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5157 CFG_SQL_sqlite2=plugin
5160 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5161 echo "SQLite2 support cannot be enabled due to functionality tests!"
5162 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5163 echo " If you believe this message is in error you may use the continue"
5164 echo " switch (-continue) to $0 to continue."
5173 if [ "$CFG_SQL_sqlite" != "no" ]; then
5174 SQLITE_AUTODETECT_FAILED="no"
5175 if [ "$CFG_SQLITE" = "system" ]; then
5176 if [ -n "$PKG_CONFIG" ]; then
5177 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5178 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5180 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
5181 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5182 CFG_SQL_sqlite=plugin
5184 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5186 SQLITE_AUTODETECT_FAILED="yes"
5189 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5190 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5191 CFG_SQL_sqlite=plugin
5194 SQLITE_AUTODETECT_FAILED="yes"
5198 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5199 echo "SQLite support cannot be enabled due to functionality tests!"
5200 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5201 echo " If you believe this message is in error you may use the continue"
5202 echo " switch (-continue) to $0 to continue."
5208 if [ "$OPT_VERBOSE" = "yes" ]; then
5209 echo "unknown SQL driver: $_SQLDR"
5215 # auto-detect NIS support
5216 if [ "$CFG_NIS" != "no" ]; then
5217 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
5220 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5221 echo "NIS support cannot be enabled due to functionality tests!"
5222 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5223 echo " If you believe this message is in error you may use the continue"
5224 echo " switch (-continue) to $0 to continue."
5232 # auto-detect CUPS support
5233 if [ "$CFG_CUPS" != "no" ]; then
5234 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
5237 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5238 echo "Cups support cannot be enabled due to functionality tests!"
5239 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5240 echo " If you believe this message is in error you may use the continue"
5241 echo " switch (-continue) to $0 to continue."
5249 # auto-detect iconv(3) support
5250 if [ "$CFG_ICONV" != "no" ]; then
5251 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5253 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
5255 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
5257 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
5260 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5261 echo "Iconv support cannot be enabled due to functionality tests!"
5262 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5263 echo " If you believe this message is in error you may use the continue"
5264 echo " switch (-continue) to $0 to continue."
5272 # auto-detect libdbus-1 support
5273 if [ "$CFG_DBUS" != "no" ]; then
5274 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5275 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5276 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5278 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
5279 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5280 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5281 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5283 if [ "$CFG_DBUS" = "auto" ]; then
5285 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5286 # CFG_DBUS is "yes" or "linked" here
5288 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5289 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5290 echo " If you believe this message is in error you may use the continue"
5291 echo " switch (-continue) to $0 to continue."
5297 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5298 CFG_MULTIMEDIA="$CFG_GUI"
5301 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5302 echo "QtMultimedia requested, but it can't be built without QtGui"
5306 # X11/QWS/Lighthouse
5307 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5309 # auto-detect Glib support
5310 if [ "$CFG_GLIB" != "no" ]; then
5311 if [ -n "$PKG_CONFIG" ]; then
5312 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5313 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5315 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
5317 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5318 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5320 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5321 echo "Glib support cannot be enabled due to functionality tests!"
5322 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5323 echo " If you believe this message is in error you may use the continue"
5324 echo " switch (-continue) to $0 to continue."
5332 if [ "$CFG_GUI" = "no" ]; then
5333 if [ "$CFG_PHONON" = "auto" ]; then
5336 if [ "$CFG_PHONON" != "no" ]; then
5337 echo "Phonon enabled, but GUI disabled."
5338 echo " You might need to either enable the GUI or disable Phonon"
5343 # Auto-detect GStreamer support (needed for Phonon)
5344 if [ "$CFG_PHONON" != "no" ]; then
5345 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5346 if [ -n "$PKG_CONFIG" ]; then
5347 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5348 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5350 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
5352 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5353 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5355 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5356 echo "Gstreamer support cannot be enabled due to functionality tests!"
5357 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5358 echo " If you believe this message is in error you may use the continue"
5359 echo " switch (-continue) to $0 to continue."
5365 elif [ "$CFG_GLIB" = "no" ]; then
5372 if [ "$CFG_PHONON" != "no" ]; then
5373 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5374 if [ "$CFG_GSTREAMER" = "yes" ]; then
5377 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5378 echo "Phonon support cannot be enabled due to functionality tests!"
5379 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5380 echo " If you believe this message is in error you may use the continue"
5381 echo " switch (-continue) to $0 to continue."
5392 # auto-detect libicu support
5393 if [ "$CFG_ICU" != "no" ]; then
5394 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5395 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5397 if [ "$CFG_ICU" = "auto" ]; then
5399 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5402 echo "The ICU library support cannot be enabled."
5403 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5404 echo " If you believe this message is in error you may use the continue"
5405 echo " switch (-continue) to $0 to continue."
5411 # Auto-detect PulseAudio support
5412 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5413 if [ -n "$PKG_CONFIG" ]; then
5414 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5415 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5417 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
5419 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5420 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5422 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5423 echo "PulseAudio support cannot be enabled due to functionality tests!"
5424 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5425 echo " If you believe this message is in error you may use the continue"
5426 echo " switch (-continue) to $0 to continue."
5433 fi # X11/QWS/Lighthouse
5436 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5437 x11tests="$relpath/config.tests/x11"
5440 # work around broken X11 headers when using GCC 2.95 or later
5442 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5443 if [ $NOTYPE = "yes" ]; then
5444 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5445 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5448 # Check we actually have X11 :-)
5449 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5450 if [ $? != "0" ]; then
5451 echo "Basic XLib functionality test failed!"
5452 echo " You might need to modify the include and library search paths by editing"
5453 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5459 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5460 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5461 if [ "$CFG_GUI" = "no" ]; then
5462 if [ "$CFG_OPENGL" = "auto" ]; then
5465 if [ "$CFG_OPENGL" != "no" ]; then
5466 echo "OpenGL enabled, but GUI disabled."
5467 echo " You might need to either enable the GUI or disable OpenGL"
5471 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5472 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
5474 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
5476 if [ "$CFG_EGL" = "no" ]; then
5480 if [ "$CFG_OPENGL" = "yes" ]; then
5481 echo "All the OpenGL functionality tests failed!"
5482 echo " You might need to modify the include and library search paths by editing"
5483 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5484 echo " ${XQMAKESPEC}."
5491 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5492 if [ "$CFG_OPENGL" = "desktop" ]; then
5493 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5494 if [ $? != "0" ]; then
5495 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5502 elif [ "$CFG_OPENGL" = "es2" ]; then
5504 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5505 if [ $? != "0" ]; then
5506 echo "The OpenGL ES 2.0 functionality test failed!"
5507 echo " You might need to modify the include and library search paths by editing"
5508 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5509 echo " ${XQMAKESPEC}."
5512 elif [ "$CFG_OPENGL" = "desktop" ]; then
5513 # Desktop OpenGL support
5514 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5515 if [ $? != "0" ]; then
5516 echo "The OpenGL functionality test failed!"
5517 echo " You might need to modify the include and library search paths by editing"
5518 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5519 echo " ${XQMAKESPEC}."
5524 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5525 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5526 if [ $? != "0" ]; then
5527 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5534 fi # X11/MINGW OpenGL
5537 if [ "$PLATFORM_X11" = "yes" ]; then
5538 # auto-detect Xcursor support
5539 if [ "$CFG_XCURSOR" != "no" ]; then
5540 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
5541 if [ "$CFG_XCURSOR" != "runtime" ]; then
5545 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5546 echo "Xcursor support cannot be enabled due to functionality tests!"
5547 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5548 echo " If you believe this message is in error you may use the continue"
5549 echo " switch (-continue) to $0 to continue."
5557 # auto-detect Xfixes support
5558 if [ "$CFG_XFIXES" != "no" ]; then
5559 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5560 if [ "$CFG_XFIXES" != "runtime" ]; then
5564 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5565 echo "Xfixes support cannot be enabled due to functionality tests!"
5566 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5567 echo " If you believe this message is in error you may use the continue"
5568 echo " switch (-continue) to $0 to continue."
5576 # auto-detect Xrandr support (resize and rotate extension)
5577 if [ "$CFG_XRANDR" != "no" ]; then
5578 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
5579 if [ "$CFG_XRANDR" != "runtime" ]; then
5583 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5584 echo "Xrandr support cannot be enabled due to functionality tests!"
5585 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5586 echo " If you believe this message is in error you may use the continue"
5587 echo " switch (-continue) to $0 to continue."
5595 # auto-detect Xrender support
5596 if [ "$CFG_XRENDER" != "no" ]; then
5597 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
5600 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5601 echo "Xrender support cannot be enabled due to functionality tests!"
5602 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5603 echo " If you believe this message is in error you may use the continue"
5604 echo " switch (-continue) to $0 to continue."
5612 # Additional check to decide if WebKit support will be included
5613 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5614 echo "Warning: -no-xrender will disable the QtWebkit module."
5618 # auto-detect MIT-SHM support
5619 if [ "$CFG_MITSHM" != "no" ]; then
5620 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
5623 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5624 echo "MITSHM support cannot be enabled due to functionality tests!"
5625 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5626 echo " If you believe this message is in error you may use the continue"
5627 echo " switch (-continue) to $0 to continue."
5635 # auto-detect FontConfig support
5636 if [ "$CFG_FONTCONFIG" != "no" ]; then
5637 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5638 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5639 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5641 QT_CFLAGS_FONTCONFIG=
5642 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5644 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
5646 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5647 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5648 CFG_LIBFREETYPE=system
5650 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5651 echo "FontConfig support cannot be enabled due to functionality tests!"
5652 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5653 echo " If you believe this message is in error you may use the continue"
5654 echo " switch (-continue) to $0 to continue."
5662 # auto-detect Session Management support
5663 if [ "$CFG_SM" = "auto" ]; then
5664 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
5667 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5668 echo "Session Management support cannot be enabled due to functionality tests!"
5669 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5670 echo " If you believe this message is in error you may use the continue"
5671 echo " switch (-continue) to $0 to continue."
5679 # auto-detect SHAPE support
5680 if [ "$CFG_XSHAPE" != "no" ]; then
5681 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
5684 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5685 echo "XShape support cannot be enabled due to functionality tests!"
5686 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5687 echo " If you believe this message is in error you may use the continue"
5688 echo " switch (-continue) to $0 to continue."
5696 # auto-detect XVideo support
5697 if [ "$CFG_XVIDEO" != "no" ]; then
5698 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
5701 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5702 echo "XVideo support cannot be enabled due to functionality tests!"
5703 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5704 echo " If you believe this message is in error you may use the continue"
5705 echo " switch (-continue) to $0 to continue."
5713 # auto-detect XSync support
5714 if [ "$CFG_XSYNC" != "no" ]; then
5715 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
5718 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5719 echo "XSync support cannot be enabled due to functionality tests!"
5720 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5721 echo " If you believe this message is in error you may use the continue"
5722 echo " switch (-continue) to $0 to continue."
5730 # auto-detect Xinerama support
5731 if [ "$CFG_XINERAMA" != "no" ]; then
5732 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
5733 if [ "$CFG_XINERAMA" != "runtime" ]; then
5737 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5738 echo "Xinerama support cannot be enabled due to functionality tests!"
5739 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5740 echo " If you believe this message is in error you may use the continue"
5741 echo " switch (-continue) to $0 to continue."
5749 # auto-detect Xinput support
5750 if [ "$CFG_XINPUT" != "no" ]; then
5751 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
5752 if [ "$CFG_XINPUT" != "runtime" ]; then
5756 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5757 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5758 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5759 echo " If you believe this message is in error you may use the continue"
5760 echo " switch (-continue) to $0 to continue."
5768 # auto-detect XKB support
5769 if [ "$CFG_XKB" != "no" ]; then
5770 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
5773 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5774 echo "XKB support cannot be enabled due to functionality tests!"
5775 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5776 echo " If you believe this message is in error you may use the continue"
5777 echo " switch (-continue) to $0 to continue."
5785 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5786 if [ -n "$PKG_CONFIG" ]; then
5787 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5788 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5790 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5792 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5793 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5795 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5796 echo "Gtk theme support cannot be enabled due to functionality tests!"
5797 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5798 echo " If you believe this message is in error you may use the continue"
5799 echo " switch (-continue) to $0 to continue."
5805 elif [ "$CFG_GLIB" = "no" ]; then
5811 if [ "$PLATFORM_MAC" = "yes" ]; then
5812 if [ "$CFG_PHONON" != "no" ]; then
5813 # Always enable Phonon (unless it was explicitly disabled)
5817 if [ "$CFG_COREWLAN" = "auto" ]; then
5818 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
5827 if [ "$PLATFORM_QPA" = "yes" ]; then
5828 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5829 if [ "$PLATFORM_MAC" = "yes" ]; then
5831 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5832 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
5834 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
5837 if [ "$CFG_OPENGL" = "yes" ]; then
5838 echo "All the OpenGL functionality tests failed!"
5839 echo " You might need to modify the include and library search paths by editing"
5840 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5841 echo " ${XQMAKESPEC}."
5846 elif [ "$CFG_OPENGL" = "es2" ]; then
5848 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5849 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
5850 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
5851 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5852 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5853 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5854 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5855 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5858 "$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
5859 if [ $? != "0" ]; then
5860 echo "The OpenGL ES 2.0 functionality test failed!"
5861 echo " You might need to modify the include and library search paths by editing"
5862 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5863 echo " ${XQMAKESPEC}."
5866 elif [ "$CFG_OPENGL" = "desktop" ]; then
5867 # Desktop OpenGL support
5868 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5869 if [ $? != "0" ]; then
5870 echo "The OpenGL functionality test failed!"
5871 echo " You might need to modify the include and library search paths by editing"
5872 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5873 echo " ${XQMAKESPEC}."
5878 # auto-detect FontConfig support
5879 if [ "$CFG_FONTCONFIG" != "no" ]; then
5880 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5881 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5882 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5884 QT_CFLAGS_FONTCONFIG=
5885 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5887 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
5888 QT_CONFIG="$QT_CONFIG fontconfig"
5889 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5890 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5891 CFG_LIBFREETYPE=system
5896 # Save these for a check later
5897 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5898 ORIG_CFG_XCB="$CFG_XCB"
5900 if [ "$CFG_WAYLAND" != "no" ]; then
5901 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5902 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5903 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5904 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
5905 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
5907 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
5909 QT_CONFIG="$QT_CONFIG wayland"
5910 elif [ "$CFG_WAYLAND" = "yes" ]; then
5911 echo "The Wayland functionality test failed!"
5915 QMakeVar add DEFINES QT_NO_WAYLAND
5919 # Check we actually have X11 :-)
5920 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
5921 QT_CONFIG="$QT_CONFIG xlib"
5924 # auto-detect Xrender support
5925 if [ "$CFG_XRENDER" != "no" ]; then
5926 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
5928 QT_CONFIG="$QT_CONFIG xrender"
5930 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5931 echo "Xrender support cannot be enabled due to functionality tests!"
5932 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5933 echo " If you believe this message is in error you may use the continue"
5934 echo " switch (-continue) to $0 to continue."
5942 if [ "$CFG_XCB" != "no" ]; then
5943 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
5945 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
5946 QT_CONFIG="$QT_CONFIG xcb-render"
5949 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
5951 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5954 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
5955 QT_CONFIG="$QT_CONFIG xcb-xlib"
5958 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5959 # auto-detect XInput2/Xinput support
5960 if [ "$CFG_XINPUT2" != "no" ]; then
5961 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
5965 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5966 echo "XInput2 support cannot be enabled due to functionality tests!"
5967 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5968 echo " If you believe this message is in error you may use the continue"
5969 echo " switch (-continue) to $0 to continue."
5978 if [ "$CFG_XCB" = "yes" ]; then
5979 echo "The XCB test failed!"
5980 echo " You might need to install dependency packages."
5981 echo " See src/plugins/platforms/xcb/README."
5985 QMakeVar add DEFINES QT_NO_XCB
5989 # Detect libxkbcommon
5990 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5991 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5992 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5993 if [ "$CFG_WAYLAND" = "yes" ]; then
5994 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5995 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5997 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5998 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6000 if [ "$CFG_WAYLAND" = "yes" ]; then
6001 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6003 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6006 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6007 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6008 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6009 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6010 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6011 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6012 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6015 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6016 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6017 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6018 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6021 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
6022 QT_CONFIG="$QT_CONFIG coreservices"
6024 QMakeVar add DEFINES QT_NO_CORESERVICES
6027 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
6028 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6029 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6030 echo "No QPA platform plugin enabled!"
6031 echo " If you really want to build without a QPA platform plugin you must pass"
6032 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6033 echo " cannot run GUI applications."
6043 if [ "$PLATFORM_QWS" = "yes" ]; then
6045 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6046 if [ "$CFG_GUI" = "no" ]; then
6047 if [ "$CFG_OPENGL" = "auto" ]; then
6050 if [ "$CFG_OPENGL" != "no" ]; then
6051 echo "OpenGL enabled, but GUI disabled."
6052 echo " You might need to either enable the GUI or disable OpenGL"
6056 if [ "$CFG_OPENGL" = "yes" ]; then
6058 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
6061 elif [ "$CFG_OPENGL" = "es2" ]; then
6063 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6064 if [ $? != "0" ]; then
6065 echo "The OpenGL ES 2.0 functionality test failed!"
6066 echo " You might need to modify the include and library search paths by editing"
6067 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6068 echo " ${XQMAKESPEC}."
6072 elif [ "$CFG_OPENGL" = "desktop" ]; then
6073 # Desktop OpenGL support
6074 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6079 if [ "$PLATFORM_QWS" = "yes" ]; then
6082 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6083 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6084 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6085 if [ $? != "0" ]; then
6086 echo "The Ahi screen driver functionality test failed!"
6087 echo " You might need to modify the include and library search paths by editing"
6088 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6089 echo " ${XQMAKESPEC}."
6094 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6095 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6096 if [ $? != "0" ]; then
6097 echo "The SVGAlib screen driver functionality test failed!"
6098 echo " You might need to modify the include and library search paths by editing"
6099 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6100 echo " ${XQMAKESPEC}."
6105 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6106 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6107 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6108 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6109 elif directfb-config --version >/dev/null 2>&1; then
6110 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6111 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6114 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6115 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6116 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6117 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6120 "$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
6121 if [ $? != "0" ]; then
6122 echo "The DirectFB screen driver functionality test failed!"
6123 echo " You might need to modify the include and library search paths by editing"
6124 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6125 echo " ${XQMAKESPEC}."
6133 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6134 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6135 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6136 if [ $? != "0" ]; then
6137 echo "The tslib functionality test failed!"
6138 echo " You might need to modify the include and library search paths by editing"
6139 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6140 echo " ${XQMAKESPEC}."
6149 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6150 if [ $? != "0" ]; then
6151 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6158 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6159 if [ "$CFG_EGL" != "no" ]; then
6160 # detect EGL support
6161 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
6162 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6167 if [ "$EGL_VARIANT" = "none" ]; then
6168 if [ "$CFG_EGL" = "yes" ]; then
6169 echo "The EGL functionality test failed!"
6170 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6171 echo " You might need to modify the include and library search paths by editing"
6172 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6173 echo " ${XQMAKESPEC}."
6177 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6178 if [ "$CFG_OPENGL" = "es2" ]; then
6185 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6188 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6189 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6190 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6191 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6192 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
6193 CFG_LIBFREETYPE=system
6199 if [ "$CFG_ENDIAN" = "auto" ]; then
6200 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6201 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6202 elif [ "$PLATFORM_MAC" = "yes" ]; then
6205 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6207 if [ "$F" -eq 0 ]; then
6208 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6209 elif [ "$F" -eq 1 ]; then
6210 CFG_ENDIAN="Q_BIG_ENDIAN"
6213 echo "The target system byte order could not be detected!"
6214 echo "Turn on verbose messaging (-v) to see the final report."
6215 echo "You can use the -little-endian or -big-endian switch to"
6216 echo "$0 to continue."
6222 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6223 if [ "$PLATFORM_MAC" = "yes" ]; then
6226 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6228 if [ "$F" -eq 0 ]; then
6229 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6230 elif [ "$F" -eq 1 ]; then
6231 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6234 echo "The host system byte order could not be detected!"
6235 echo "Turn on verbose messaging (-v) to see the final report."
6236 echo "You can use the -host-little-endian or -host-big-endian switch to"
6237 echo "$0 to continue."
6243 if [ "$CFG_ARMFPA" != "auto" ]; then
6244 if [ "$CFG_ARMFPA" = "yes" ]; then
6245 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6246 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6248 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6251 CFG_DOUBLEFORMAT="normal"
6256 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6257 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6258 CFG_DOUBLEFORMAT=normal
6260 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6262 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6263 CFG_DOUBLEFORMAT=normal
6264 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6265 CFG_DOUBLEFORMAT=normal
6266 elif [ "$F" -eq 10 ]; then
6267 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6268 elif [ "$F" -eq 11 ]; then
6269 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6270 elif [ "$F" -eq 12 ]; then
6271 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6273 elif [ "$F" -eq 13 ]; then
6274 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6278 echo "The system floating point format could not be detected."
6279 echo "This may cause data to be generated in a wrong format"
6280 echo "Turn on verbose messaging (-v) to see the final report."
6281 # we do not fail on this since this is a new test, and if it fails,
6282 # the old behavior should be correct in most cases
6283 CFG_DOUBLEFORMAT=normal
6289 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6293 if [ "$CFG_STL" != "no" ]; then
6294 if [ "$HAVE_STL" = "yes" ]; then
6297 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6298 echo "STL support cannot be enabled due to functionality tests!"
6299 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6300 echo " If you believe this message is in error you may use the continue"
6301 echo " switch (-continue) to $0 to continue."
6309 # detect POSIX clock_gettime()
6310 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6311 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
6312 CFG_CLOCK_GETTIME=yes
6314 CFG_CLOCK_GETTIME=no
6318 # detect POSIX monotonic clocks
6319 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6320 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
6321 CFG_CLOCK_MONOTONIC=yes
6323 CFG_CLOCK_MONOTONIC=no
6325 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6326 CFG_CLOCK_MONOTONIC=no
6330 if [ "$CFG_MREMAP" = "auto" ]; then
6331 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6338 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6339 if [ "$CFG_GETADDRINFO" != "no" ]; then
6340 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6343 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6344 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6345 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6346 echo " If you believe this message is in error you may use the continue"
6347 echo " switch (-continue) to $0 to continue."
6355 # find if the platform provides inotify
6356 if [ "$CFG_INOTIFY" != "no" ]; then
6357 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6360 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6361 echo "inotify support cannot be enabled due to functionality tests!"
6362 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6363 echo " If you believe this message is in error you may use the continue"
6364 echo " switch (-continue) to $0 to continue."
6372 # find if the platform provides if_nametoindex (ipv6 interface name support)
6373 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6374 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
6377 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6378 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6379 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6380 echo " If you believe this message is in error you may use the continue"
6381 echo " switch (-continue) to $0 to continue."
6389 # find if the platform provides getifaddrs (network interface enumeration)
6390 if [ "$CFG_GETIFADDRS" != "no" ]; then
6391 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6394 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6395 echo "getifaddrs support cannot be enabled due to functionality tests!"
6396 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6397 echo " If you believe this message is in error you may use the continue"
6398 echo " switch (-continue) to $0 to continue."
6407 if [ "$CFG_OPENSSL" != "no" ]; then
6408 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
6409 if [ "$CFG_OPENSSL" = "auto" ]; then
6413 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6414 echo "OpenSSL support cannot be enabled due to functionality tests!"
6415 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6416 echo " If you believe this message is in error you may use the continue"
6417 echo " switch (-continue) to $0 to continue."
6426 if [ "$CFG_PCRE" != "qt" ]; then
6427 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
6430 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6431 echo "PCRE support cannot be enabled due to functionality tests!"
6432 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6433 echo " If you believe this message is in error you may use the continue"
6434 echo " switch (-continue) to $0 to continue."
6442 # detect OpenVG support
6443 if [ "$CFG_OPENVG" != "no" ]; then
6444 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
6445 if [ "$CFG_OPENVG" = "auto" ]; then
6448 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
6449 if [ "$CFG_OPENVG" = "auto" ]; then
6452 CFG_OPENVG_ON_OPENGL=yes
6453 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
6454 if [ "$CFG_OPENVG" = "auto" ]; then
6457 CFG_OPENVG_LC_INCLUDES=yes
6458 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
6459 if [ "$CFG_OPENVG" = "auto" ]; then
6462 CFG_OPENVG_LC_INCLUDES=yes
6463 CFG_OPENVG_ON_OPENGL=yes
6465 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6466 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6467 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6468 echo " If you believe this message is in error you may use the continue"
6469 echo " switch (-continue) to $0 to continue."
6475 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
6476 CFG_OPENVG_SHIVA=yes
6480 if [ "$CFG_ALSA" = "auto" ]; then
6481 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6488 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6489 if [ "$CFG_ARCH" = "arm" ]; then
6490 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6491 if [ $? != "0" ]; then
6492 CFG_JAVASCRIPTCORE_JIT=no
6495 case "$XPLATFORM" in
6497 CFG_JAVASCRIPTCORE_JIT=no
6503 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6504 QMakeVar set JAVASCRIPTCORE_JIT yes
6505 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6506 QMakeVar set JAVASCRIPTCORE_JIT no
6509 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6510 CFG_AUDIO_BACKEND=yes
6513 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6514 echo "Warning: largefile support cannot be disabled for win32."
6518 #-------------------------------------------------------------------------------
6519 # ask for all that hasn't been auto-detected or specified in the arguments
6520 #-------------------------------------------------------------------------------
6522 ### fix this: user input should be validated in a loop
6523 if [ "$PLATFORM_QWS" = "yes" ]; then
6524 PROMPT_FOR_DEPTHS="yes"
6526 PROMPT_FOR_DEPTHS="no"
6528 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6530 echo "Choose pixel-depths to support:"
6532 echo " 1. 1bpp, black/white"
6533 echo " 4. 4bpp, grayscale"
6534 echo " 8. 8bpp, paletted"
6535 echo " 12. 12bpp, rgb 4-4-4"
6536 echo " 15. 15bpp, rgb 5-5-5"
6537 echo " 16. 16bpp, rgb 5-6-5"
6538 echo " 18. 18bpp, rgb 6-6-6"
6539 echo " 24. 24bpp, rgb 8-8-8"
6540 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6541 echo " all. All supported depths"
6543 echo "Your choices (default 8,16,32):"
6545 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6546 CFG_QWS_DEPTHS=8,16,32
6549 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6550 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6551 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6553 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6555 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6556 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6561 # enable dwarf2 support on Mac
6562 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6563 QT_CONFIG="$QT_CONFIG dwarf2"
6566 # Set the default arch if there are no "-arch" arguments on the configure line
6567 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6568 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6569 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6570 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6573 if [ "$CFG_PHONON" = "yes" ]; then
6574 # No longer needed after modularization
6575 #QT_CONFIG="$QT_CONFIG phonon"
6576 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6577 QT_CONFIG="$QT_CONFIG phonon-backend"
6580 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6583 # disable accessibility
6584 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6585 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6587 QT_CONFIG="$QT_CONFIG accessibility"
6590 # egl stuff does not belong in lighthouse, but rather in plugins
6591 if [ "$PLATFORM_QPA" = "yes" ]; then
6596 if [ "$CFG_EGL" = "no" ]; then
6597 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6599 QT_CONFIG="$QT_CONFIG egl"
6600 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6601 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6606 if [ "$CFG_OPENVG" = "no" ]; then
6607 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6609 QT_CONFIG="$QT_CONFIG openvg"
6610 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6611 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6613 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6614 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6616 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6617 QT_CONFIG="$QT_CONFIG shivavg"
6618 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6623 if [ "$CFG_OPENGL" = "no" ]; then
6624 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6626 QT_CONFIG="$QT_CONFIG opengl"
6629 if [ "$CFG_OPENGL" = "es2" ]; then
6630 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6633 if [ "$CFG_OPENGL" = "es2" ]; then
6634 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6635 QT_CONFIG="$QT_CONFIG opengles2"
6638 # safe execution environment
6639 if [ "$CFG_SXE" != "no" ]; then
6640 QT_CONFIG="$QT_CONFIG sxe"
6643 # build up the variables for output
6644 if [ "$CFG_DEBUG" = "yes" ]; then
6645 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6646 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6647 elif [ "$CFG_DEBUG" = "no" ]; then
6648 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6649 QMAKE_CONFIG="$QMAKE_CONFIG release"
6651 if [ "$CFG_SHARED" = "yes" ]; then
6652 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6653 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6654 elif [ "$CFG_SHARED" = "no" ]; then
6655 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6656 QMAKE_CONFIG="$QMAKE_CONFIG static"
6658 if [ "$PLATFORM_QWS" = "yes" ]; then
6659 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6660 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6661 QT_CONFIG="$QT_CONFIG embedded"
6662 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6664 if [ "$PLATFORM_QPA" = "yes" ]; then
6665 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6666 QT_CONFIG="$QT_CONFIG qpa"
6667 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6668 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6671 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6672 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6673 QT_CONFIG="$QT_CONFIG nacl pepper"
6674 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6677 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6678 # Do not set this here for Windows. Let qmake do it so
6679 # debug and release precompiled headers are kept separate.
6680 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6682 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6683 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6684 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6685 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6686 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6687 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6689 if [ "$CFG_STL" = "no" ]; then
6690 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6692 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6694 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6695 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6697 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6698 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6699 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6700 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6701 QMakeVar add QMAKE_CFLAGS -g
6702 QMakeVar add QMAKE_CXXFLAGS -g
6703 QT_CONFIG="$QT_CONFIG separate_debug_info"
6705 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6706 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6708 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6709 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6710 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6711 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6712 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6713 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6714 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6715 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6716 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6717 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6718 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6719 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6720 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6721 QT_CONFIG="$QT_CONFIG clock-gettime"
6723 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6724 QT_CONFIG="$QT_CONFIG clock-monotonic"
6726 if [ "$CFG_MREMAP" = "yes" ]; then
6727 QT_CONFIG="$QT_CONFIG mremap"
6729 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6730 QT_CONFIG="$QT_CONFIG getaddrinfo"
6732 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6733 QT_CONFIG="$QT_CONFIG ipv6ifname"
6735 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6736 QT_CONFIG="$QT_CONFIG getifaddrs"
6738 if [ "$CFG_INOTIFY" = "yes" ]; then
6739 QT_CONFIG="$QT_CONFIG inotify"
6741 if [ "$CFG_LIBJPEG" = "no" ]; then
6743 elif [ "$CFG_LIBJPEG" = "system" ]; then
6744 QT_CONFIG="$QT_CONFIG system-jpeg"
6746 if [ "$CFG_JPEG" = "no" ]; then
6747 QT_CONFIG="$QT_CONFIG no-jpeg"
6748 elif [ "$CFG_JPEG" = "yes" ]; then
6749 QT_CONFIG="$QT_CONFIG jpeg"
6751 if [ "$CFG_LIBPNG" = "no" ]; then
6754 if [ "$CFG_LIBPNG" = "system" ]; then
6755 QT_CONFIG="$QT_CONFIG system-png"
6757 if [ "$CFG_PNG" = "no" ]; then
6758 QT_CONFIG="$QT_CONFIG no-png"
6759 elif [ "$CFG_PNG" = "yes" ]; then
6760 QT_CONFIG="$QT_CONFIG png"
6762 if [ "$CFG_GIF" = "no" ]; then
6763 QT_CONFIG="$QT_CONFIG no-gif"
6764 elif [ "$CFG_GIF" = "yes" ]; then
6765 QT_CONFIG="$QT_CONFIG gif"
6767 if [ "$CFG_LIBTIFF" = "no" ]; then
6769 elif [ "$CFG_LIBTIFF" = "system" ]; then
6770 QT_CONFIG="$QT_CONFIG system-tiff"
6772 if [ "$CFG_TIFF" = "no" ]; then
6773 QT_CONFIG="$QT_CONFIG no-tiff"
6774 elif [ "$CFG_TIFF" = "yes" ]; then
6775 QT_CONFIG="$QT_CONFIG tiff"
6777 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6778 QT_CONFIG="$QT_CONFIG no-freetype"
6779 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6780 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6781 QT_CONFIG="$QT_CONFIG system-freetype"
6783 QT_CONFIG="$QT_CONFIG freetype"
6785 if [ "$CFG_GUI" = "auto" ]; then
6788 if [ "$CFG_GUI" = "no" ]; then
6789 QT_CONFIG="$QT_CONFIG no-gui"
6791 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6795 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6796 #On Mac we implicitly link against libz, so we
6797 #never use the 3rdparty stuff.
6798 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6800 if [ "$CFG_ZLIB" = "yes" ]; then
6801 QT_CONFIG="$QT_CONFIG zlib"
6802 elif [ "$CFG_ZLIB" = "system" ]; then
6803 QT_CONFIG="$QT_CONFIG system-zlib"
6806 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6807 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6808 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6809 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6810 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6811 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6812 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6813 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6814 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6815 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6816 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6817 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6818 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6819 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6820 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6822 if [ "$PLATFORM_X11" = "yes" ]; then
6823 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6825 # for some reason, the following libraries are not always built shared,
6826 # so *every* program/lib (including Qt) has to link against them
6827 if [ "$CFG_XSHAPE" = "yes" ]; then
6828 QT_CONFIG="$QT_CONFIG xshape"
6830 if [ "$CFG_XVIDEO" = "yes" ]; then
6831 QT_CONFIG="$QT_CONFIG xvideo"
6833 if [ "$CFG_XSYNC" = "yes" ]; then
6834 QT_CONFIG="$QT_CONFIG xsync"
6836 if [ "$CFG_XINERAMA" = "yes" ]; then
6837 QT_CONFIG="$QT_CONFIG xinerama"
6838 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6840 if [ "$CFG_XCURSOR" = "yes" ]; then
6841 QT_CONFIG="$QT_CONFIG xcursor"
6842 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6844 if [ "$CFG_XFIXES" = "yes" ]; then
6845 QT_CONFIG="$QT_CONFIG xfixes"
6846 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6848 if [ "$CFG_XRANDR" = "yes" ]; then
6849 QT_CONFIG="$QT_CONFIG xrandr"
6850 if [ "$CFG_XRENDER" != "yes" ]; then
6851 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6852 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6854 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6857 if [ "$CFG_XRENDER" = "yes" ]; then
6858 QT_CONFIG="$QT_CONFIG xrender"
6859 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6861 if [ "$CFG_MITSHM" = "yes" ]; then
6862 QT_CONFIG="$QT_CONFIG mitshm"
6864 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6865 QT_CONFIG="$QT_CONFIG fontconfig"
6867 if [ "$CFG_XINPUT" = "yes" ]; then
6868 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6870 if [ "$CFG_XINPUT" = "yes" ]; then
6871 QT_CONFIG="$QT_CONFIG xinput tablet"
6873 if [ "$CFG_XKB" = "yes" ]; then
6874 QT_CONFIG="$QT_CONFIG xkb"
6878 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6879 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6880 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6882 if [ "$PLATFORM_MAC" = "yes" ]; then
6883 if [ "$CFG_RPATH" = "yes" ]; then
6884 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6886 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
6887 if [ -n "$RPATH_FLAGS" ]; then
6889 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6893 elif [ "$CFG_RPATH" = "yes" ]; then
6894 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6898 if [ "$CFG_RPATH" = "yes" ]; then
6899 # set the default rpath to the library installation directory
6900 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6902 if [ -n "$RPATH_FLAGS" ]; then
6903 # add the user defined rpaths
6904 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6908 if [ '!' -z "$I_FLAGS" ]; then
6909 # add the user define include paths
6910 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6911 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6914 if [ '!' -z "$W_FLAGS" ]; then
6915 # add the user defined warning flags
6916 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6917 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6918 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6921 # turn off exceptions for the compilers that support it
6922 if [ "$PLATFORM_QWS" = "yes" ]; then
6923 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6924 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
6925 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6927 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6929 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6933 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6934 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6937 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6938 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6939 # Follow default behavior of configure.exe by overriding with "rtti".
6940 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6943 if [ "$CFG_ALSA" = "yes" ]; then
6944 QT_CONFIG="$QT_CONFIG alsa"
6947 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6948 QT_CONFIG="$QT_CONFIG pulseaudio"
6951 if [ "$CFG_COREWLAN" = "yes" ]; then
6952 QT_CONFIG="$QT_CONFIG corewlan"
6955 if [ "$CFG_ICU" = "yes" ]; then
6956 QT_CONFIG="$QT_CONFIG icu"
6959 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6960 QT_CONFIG="$QT_CONFIG force_asserts"
6963 if [ "$CFG_PCRE" = "qt" ]; then
6964 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6968 # Some Qt modules are too advanced in C++ for some old compilers
6969 # Detect here the platforms where they are known to work.
6971 # See Qt documentation for more information on which features are
6972 # supported and on which compilers.
6974 canBuildQtXmlPatterns="yes"
6975 canBuildWebKit="$HAVE_STL"
6976 canBuildQtConcurrent="yes"
6978 canUseV8Snapshot="yes"
6980 # WebKit requires stdint.h
6981 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6982 if [ $? != "0" ]; then
6986 case "$XPLATFORM" in
6988 # PA-RISC's assembly is too limited
6989 # gcc 3.4 on that platform can't build QtXmlPatterns
6990 # the assembly it generates cannot be compiled
6992 # Check gcc's version
6993 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6997 canBuildQtXmlPatterns="no"
7001 canBuildQtXmlPatterns="no"
7005 unsupported/vxworks-*-g++*)
7008 unsupported/vxworks-*-dcc*)
7010 canBuildQtXmlPatterns="no"
7013 # Check gcc's version
7014 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7022 canBuildQtXmlPatterns="no"
7027 # Check the compiler version
7028 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7031 canBuildQtXmlPatterns="no"
7032 canBuildQtConcurrent="no"
7036 canBuildQtConcurrent="no"
7042 canBuildQtXmlPatterns="no"
7043 canBuildQtConcurrent="no"
7049 # Get the xlC version
7050 cat > xlcver.c <<EOF
7054 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7059 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7060 xlcver=`./xlcver 2>/dev/null`
7063 if [ "$OPT_VERBOSE" = "yes" ]; then
7064 if [ -n "$xlcver" ]; then
7065 echo Found IBM xlC version: $xlcver.
7067 echo Could not determine IBM xlC version, assuming oldest supported.
7074 canBuildQtXmlPatterns="no"
7075 canBuildQtConcurrent="no"
7079 canBuildQtConcurrent="no"
7085 canBuildQtConcurrent="no"
7089 if [ "$CFG_GUI" = "no" ]; then
7090 # WebKit requires QtGui
7094 if [ "$CFG_SHARED" = "no" ]; then
7096 echo "WARNING: Using static linking will disable the WebKit module."
7101 CFG_CONCURRENT="yes"
7102 if [ "$canBuildQtConcurrent" = "no" ]; then
7103 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7106 QT_CONFIG="$QT_CONFIG concurrent"
7109 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7110 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7113 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7114 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7115 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7116 CFG_XMLPATTERNS="no"
7118 # No longer needed after modularization
7119 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7120 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7122 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7125 # No longer needed after modularization
7126 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7127 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7129 # QT_CONFIG="$QT_CONFIG multimedia"
7132 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7133 QT_CONFIG="$QT_CONFIG audio-backend"
7136 if [ "$CFG_SVG" = "auto" ]; then
7140 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7141 echo "QtSvg requested, but it can't be built without QtGui"
7145 if [ "$CFG_SVG" = "yes" ]; then
7146 QT_CONFIG="$QT_CONFIG svg"
7148 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7151 if [ "$CFG_WEBKIT" != "no" ]; then
7152 CFG_WEBKIT="$canBuildWebKit"
7155 if [ "$CFG_WEBKIT" != "no" ]; then
7156 # No longer needed after modularization
7157 #QT_CONFIG="$QT_CONFIG webkit"
7158 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7159 if [ "$CFG_WEBKIT" = "debug" ]; then
7160 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7164 if [ "$CFG_SCRIPT" = "auto" ]; then
7168 # No longer needed after modularization
7169 #if [ "$CFG_SCRIPT" = "yes" ]; then
7170 # QT_CONFIG="$QT_CONFIG script"
7172 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7175 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7176 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7179 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7180 CFG_SCRIPTTOOLS="yes"
7181 elif [ "$CFG_SCRIPT" = "no" ]; then
7182 CFG_SCRIPTTOOLS="no"
7185 # No longer needed after modularization
7186 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7187 # QT_CONFIG="$QT_CONFIG scripttools"
7189 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7194 i386|x86_64|arm|mips) ;;
7195 *) canBuildV8="no";;
7198 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7199 echo "Error: V8 was requested, but is not supported on this platform."
7203 if [ "$CFG_V8" = "auto" ]; then
7204 CFG_V8="$canBuildV8"
7207 if [ "$CFG_V8" = "no" ]; then
7208 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7210 QT_CONFIG="$QT_CONFIG v8"
7211 # Detect snapshot support
7212 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7213 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7216 *) canUseV8Snapshot="no"
7220 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" == "arm" ]; then
7221 # QEMU crashes when building inside Scratchbox with an ARM target
7222 canUseV8Snapshot="no"
7225 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7226 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7228 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7229 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7232 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7233 QT_CONFIG="$QT_CONFIG v8snapshot"
7237 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7238 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7239 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7243 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7244 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7251 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7252 # No longer needed after modularization
7253 #QT_CONFIG="$QT_CONFIG declarative"
7254 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7255 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7258 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7261 if [ "$CFG_LOCATION" = "auto" ]; then
7262 CFG_LOCATION="$CFG_GUI"
7265 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7266 echo "QtLocation requested, but it can't be built without QtGui"
7270 #Disable QtLocation until ready
7273 if [ "$CFG_LOCATION" = "no" ]; then
7274 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7277 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7280 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7281 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7282 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7287 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7288 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7289 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7296 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7302 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7304 case "$COMPILER_VERSION" in
7306 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7307 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7308 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7311 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7312 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7313 QT_GCC_PATCH_VERSION=0
7323 #-------------------------------------------------------------------------------
7324 # part of configuration information goes into qconfig.h
7325 #-------------------------------------------------------------------------------
7327 case "$CFG_QCONFIG" in
7329 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7332 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7333 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7334 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7335 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7336 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7337 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7339 echo "#endif" >>"$tmpconfig"
7343 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7347 # define QT_EDITION $QT_EDITION
7350 /* Machine byte-order */
7351 #define Q_BIG_ENDIAN 4321
7352 #define Q_LITTLE_ENDIAN 1234
7355 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7356 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7357 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7358 #if defined(__BIG_ENDIAN__)
7359 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7360 #elif defined(__LITTLE_ENDIAN__)
7361 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7363 # error "Unable to determine byte order!"
7367 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7369 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7370 if [ "$CFG_ENDIAN" = "auto" ]; then
7371 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7372 #if defined(__BIG_ENDIAN__)
7373 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7374 #elif defined(__LITTLE_ENDIAN__)
7375 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7377 # error "Unable to determine byte order!"
7381 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7383 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7385 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7386 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7387 /* Non-IEEE double format */
7388 #define Q_DOUBLE_LITTLE "01234567"
7389 #define Q_DOUBLE_BIG "76543210"
7390 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7391 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7392 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7395 if [ "$CFG_ARMFPA" = "yes" ]; then
7396 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7397 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7398 #ifndef QT_BOOTSTRAPPED
7403 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7407 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7408 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7409 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7410 /* Machine Architecture */
7411 #ifndef QT_BOOTSTRAPPED
7412 # define QT_ARCH_${CFG_ARCH_STR}
7414 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7418 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7419 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7421 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7422 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7425 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7426 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7429 if [ "$PLATFORM_MAC" = "yes" ]; then
7430 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7431 #if defined(__LP64__)
7432 # define QT_POINTER_SIZE 8
7434 # define QT_POINTER_SIZE 4
7438 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7439 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7443 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7445 if [ "$CFG_DEV" = "yes" ]; then
7446 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7449 # Embedded compile time options
7450 if [ "$PLATFORM_QWS" = "yes" ]; then
7451 # Add QWS to config.h
7452 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7454 # Add excluded decorations to $QCONFIG_FLAGS
7455 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7456 for decor in $decors; do
7457 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7458 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7461 # Figure which embedded drivers which are turned off
7462 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7463 for ADRIVER in $CFG_GFX_ON; do
7464 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7467 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7468 # the um driver is currently not in the available list for external builds
7469 if [ "$CFG_DEV" = "no" ]; then
7470 CFG_KBD_OFF="$CFG_KBD_OFF um"
7472 for ADRIVER in $CFG_KBD_ON; do
7473 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7476 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7477 for ADRIVER in $CFG_MOUSE_ON; do
7478 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7481 for DRIVER in $CFG_GFX_OFF; do
7482 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7483 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7486 for DRIVER in $CFG_KBD_OFF; do
7487 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7488 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7491 for DRIVER in $CFG_MOUSE_OFF; do
7492 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7493 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7497 if [ "$PLATFORM_QPA" = "yes" ]; then
7498 # Add QPA to config.h
7499 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7502 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7503 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7506 # Add turned on SQL drivers
7507 for DRIVER in $CFG_SQL_AVAILABLE; do
7508 eval "VAL=\$CFG_SQL_$DRIVER"
7511 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7512 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7513 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7516 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7522 QMakeVar set sql-drivers "$SQL_DRIVERS"
7523 QMakeVar set sql-plugins "$SQL_PLUGINS"
7525 # Add other configuration options to the qconfig.h file
7526 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7527 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7528 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7529 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7530 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7531 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7532 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7533 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7535 # ATM we need this define to compile Qt. Remove later!
7536 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7538 # X11/Unix/Mac only configs
7539 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7540 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7541 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7542 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7543 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7544 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7545 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7546 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7547 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7548 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7549 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7550 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7551 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7552 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7553 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7555 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7556 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7557 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7558 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7559 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7560 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7561 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7562 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7563 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7564 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7565 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7566 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7567 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7569 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7570 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7571 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7572 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7573 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7574 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7575 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7576 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7578 # sort QCONFIG_FLAGS for neatness if we can
7579 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7580 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7582 if [ -n "$QCONFIG_FLAGS" ]; then
7583 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7584 #ifndef QT_BOOTSTRAPPED
7587 for cfg in $QCONFIG_FLAGS; do
7588 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7589 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7590 # figure out define logic, so we can output the correct
7591 # ifdefs to override the global defines in a project
7593 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7594 # QT_NO_option can be forcefully turned on by QT_option
7595 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7596 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7597 # QT_option can be forcefully turned off by QT_NO_option
7598 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7601 if [ -z $cfgdNeg ]; then
7602 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7609 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7610 #if defined($cfgd) && defined($cfgdNeg)
7612 #elif !defined($cfgd) && !defined($cfgdNeg)
7619 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7620 #endif // QT_BOOTSTRAPPED
7625 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7626 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7627 #define QT_VISIBILITY_AVAILABLE
7632 if [ -n "$QT_LIBINFIX" ]; then
7633 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7634 #define QT_LIBINFIX "$QT_LIBINFIX"
7639 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7640 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7641 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7643 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7644 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7645 chmod -w "$outpath/src/corelib/global/qconfig.h"
7646 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7647 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7651 #-------------------------------------------------------------------------------
7652 # save configuration into qconfig.pri
7653 #-------------------------------------------------------------------------------
7654 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7655 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7656 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7657 if [ "$CFG_DEBUG" = "yes" ]; then
7658 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7659 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7660 QT_CONFIG="$QT_CONFIG release"
7662 QT_CONFIG="$QT_CONFIG debug"
7663 elif [ "$CFG_DEBUG" = "no" ]; then
7664 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7665 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7666 QT_CONFIG="$QT_CONFIG debug"
7668 QT_CONFIG="$QT_CONFIG release"
7670 if [ "$CFG_STL" = "yes" ]; then
7671 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7673 if [ "$CFG_FRAMEWORK" = "no" ]; then
7674 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7676 QT_CONFIG="$QT_CONFIG qt_framework"
7677 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7679 if [ "$BUILD_ON_MAC" = "yes" ]; then
7680 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7682 if [ "$CFG_DEV" = "yes" ]; then
7683 QT_CONFIG="$QT_CONFIG private_tests"
7686 # Make the application arch follow the Qt arch for single arch builds.
7687 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7688 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7689 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7692 cat >>"$QTCONFIG.tmp" <<EOF
7694 CONFIG += $QTCONFIG_CONFIG
7696 QT_EDITION = $Edition
7697 QT_CONFIG += $QT_CONFIG
7700 QT_VERSION = $QT_VERSION
7701 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7702 QT_MINOR_VERSION = $QT_MINOR_VERSION
7703 QT_PATCH_VERSION = $QT_PATCH_VERSION
7706 QT_LIBINFIX = $QT_LIBINFIX
7707 QT_NAMESPACE = $QT_NAMESPACE
7708 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7711 if [ -n "$CFG_SYSROOT" ]; then
7712 echo "# sysroot" >>"$QTCONFIG.tmp"
7713 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7714 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7715 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7716 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7717 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7718 echo "}" >> "$QTCONFIG.tmp"
7719 echo >> "$QTCONFIG.tmp"
7721 if [ "$CFG_RPATH" = "yes" ]; then
7722 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7724 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7725 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7726 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7727 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7730 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7731 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7732 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7735 # replace qconfig.pri if it differs from the newly created temp file
7736 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7737 rm -f "$QTCONFIG.tmp"
7739 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7742 #-------------------------------------------------------------------------------
7743 # save configuration into qmodule.pri
7744 #-------------------------------------------------------------------------------
7745 QTMODULE="$outpath/mkspecs/qmodule.pri"
7747 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7749 # Ensure we can link to uninistalled libraries
7750 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7751 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7753 if [ -n "$QT_CFLAGS_PSQL" ]; then
7754 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7756 if [ -n "$QT_LFLAGS_PSQL" ]; then
7757 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7759 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7760 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7762 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7763 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7765 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7766 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7768 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7769 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7771 if [ -n "$QT_LFLAGS_ODBC" ]; then
7772 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7774 if [ -n "$QT_LFLAGS_TDS" ]; then
7775 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
7778 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7779 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
7782 #dump in the OPENSSL_LIBS info
7783 if [ '!' -z "$OPENSSL_LIBS" ]; then
7784 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
7785 elif [ "$CFG_OPENSSL" = "linked" ]; then
7786 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
7789 #dump in the SDK info
7790 if [ '!' -z "$CFG_SDK" ]; then
7791 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
7794 # mac gcc -Xarch support
7795 if [ "$CFG_MAC_XARCH" = "no" ]; then
7796 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
7800 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
7801 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7803 # replace qmodule.pri if it differs from the newly created temp file
7804 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
7805 rm -f "$QTMODULE.tmp"
7807 mv -f "$QTMODULE.tmp" "$QTMODULE"
7810 #-------------------------------------------------------------------------------
7811 # save configuration into .qmake.cache
7812 #-------------------------------------------------------------------------------
7814 CACHEFILE="$outpath/.qmake.cache"
7815 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7816 cat >>"$CACHEFILE.tmp" <<EOF
7818 QT_SOURCE_TREE = \$\$quote($relpath)
7819 QT_BUILD_TREE = \$\$quote($outpath)
7820 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7822 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7823 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7824 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7825 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7826 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7827 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7828 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7830 include(\$\$PWD/mkspecs/qmodule.pri)
7831 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
7832 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7833 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7837 #dump the qmake spec
7838 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7839 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7841 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7846 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7847 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7848 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7849 # don't need to worry about generated files
7850 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7851 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7853 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7855 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7856 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7859 # replace .qmake.cache if it differs from the newly created temp file
7860 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7861 rm -f "$CACHEFILE.tmp"
7863 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7866 #-------------------------------------------------------------------------------
7867 # give feedback on configuration
7868 #-------------------------------------------------------------------------------
7872 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7875 This target is using the GNU C++ compiler ($PLATFORM).
7877 Recent versions of this compiler automatically include code for
7878 exceptions, which increase both the size of the Qt libraries and
7879 the amount of memory taken by your applications.
7881 You may choose to re-run `basename $0` with the -no-exceptions
7882 option to compile Qt without exceptions. This is completely binary
7883 compatible, and existing applications will continue to work.
7891 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7894 This target is using the MIPSpro C++ compiler ($PLATFORM).
7896 You may choose to re-run `basename $0` with the -no-exceptions
7897 option to compile Qt without exceptions. This will make the
7898 size of the Qt library smaller and reduce the amount of memory
7899 taken by your applications.
7910 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7912 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7913 in debug mode will run out of memory on systems with 2GB or less.
7914 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7915 -no-webkit or -release to skip webkit debug.
7920 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7921 echo "Build type: $PLATFORM"
7923 echo "Building on: $PLATFORM"
7924 echo "Building for: $XPLATFORM"
7927 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7928 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7930 echo "Architecture: $CFG_ARCH"
7933 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7934 echo "Host architecture: $CFG_HOST_ARCH"
7937 if [ -n "$PLATFORM_NOTES" ]; then
7938 echo "Platform notes:"
7939 echo "$PLATFORM_NOTES"
7944 if [ "$OPT_VERBOSE" = "yes" ]; then
7945 echo $ECHO_N "qmake vars .......... $ECHO_C"
7946 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7947 echo "qmake switches ......... $QMAKE_SWITCHES"
7950 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7951 echo "Build .................. $CFG_BUILD_PARTS"
7952 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7953 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7954 echo "Debug .................. yes (combined)"
7955 if [ "$CFG_DEBUG" = "yes" ]; then
7956 echo "Default Link ........... debug"
7958 echo "Default Link ........... release"
7961 echo "Debug .................. $CFG_DEBUG"
7963 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7964 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7965 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7966 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7967 echo "QtGui module ........... $CFG_GUI"
7968 echo "QtScript module ........ $CFG_SCRIPT"
7969 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
7970 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
7971 echo "Phonon module .......... $CFG_PHONON"
7972 echo "Multimedia module ...... $CFG_MULTIMEDIA"
7973 echo "SVG module ............. $CFG_SVG"
7974 case "$CFG_WEBKIT" in
7975 yes) echo "WebKit module .......... yes" ;;
7976 debug) echo "WebKit module .......... yes (debug)" ;;
7977 no) echo "WebKit module .......... no" ;;
7979 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
7980 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7981 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7983 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7986 echo "V8 module .............. $CFG_V8"
7987 echo "Declarative module ..... $CFG_DECLARATIVE"
7988 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7989 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7991 echo "Location module ........ $CFG_LOCATION"
7992 echo "STL support ............ $CFG_STL"
7993 echo "PCH support ............ $CFG_PRECOMPILE"
7994 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7995 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7996 echo "AVX..................... ${CFG_AVX}"
7997 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7998 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7999 echo "NEON support ........... ${CFG_NEON}"
8001 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8002 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8003 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8004 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8005 echo "NIS support ............ $CFG_NIS"
8006 echo "CUPS support ........... $CFG_CUPS"
8007 echo "Iconv support .......... $CFG_ICONV"
8008 echo "Glib support ........... $CFG_GLIB"
8009 echo "GStreamer support ...... $CFG_GSTREAMER"
8010 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8011 echo "Large File support ..... $CFG_LARGEFILE"
8012 echo "GIF support ............ $CFG_GIF"
8013 if [ "$CFG_TIFF" = "no" ]; then
8014 echo "TIFF support ........... $CFG_TIFF"
8016 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8018 if [ "$CFG_JPEG" = "no" ]; then
8019 echo "JPEG support ........... $CFG_JPEG"
8021 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8023 if [ "$CFG_PNG" = "no" ]; then
8024 echo "PNG support ............ $CFG_PNG"
8026 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8028 echo "zlib support ........... $CFG_ZLIB"
8029 echo "Session management ..... $CFG_SM"
8030 if [ "$PLATFORM_QWS" = "yes" ]; then
8031 echo "Embedded support ....... $CFG_EMBEDDED"
8032 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8033 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8035 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8037 # Normalize the decoration output first
8038 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8039 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8040 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8041 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8042 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8043 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8044 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8045 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8046 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8047 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8048 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8049 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8050 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8051 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8052 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8053 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8055 if [ "$CFG_OPENGL" = "desktop" ]; then
8056 echo "OpenGL support ......... yes (Desktop OpenGL)"
8057 elif [ "$CFG_OPENGL" = "es2" ]; then
8058 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8060 echo "OpenGL support ......... no"
8062 if [ "$CFG_EGL" != "no" ]; then
8063 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8064 echo "EGL support ............ yes <GLES/egl.h>"
8066 echo "EGL support ............ yes <EGL/egl.h>"
8069 if [ "$CFG_OPENVG" ]; then
8070 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8071 echo "OpenVG support ......... ShivaVG"
8073 echo "OpenVG support ......... $CFG_OPENVG"
8076 if [ "$PLATFORM_X11" = "yes" ]; then
8077 echo "NAS sound support ...... $CFG_NAS"
8078 echo "XShape support ......... $CFG_XSHAPE"
8079 echo "XVideo support ......... $CFG_XVIDEO"
8080 echo "XSync support .......... $CFG_XSYNC"
8081 echo "Xinerama support ....... $CFG_XINERAMA"
8082 echo "Xcursor support ........ $CFG_XCURSOR"
8083 echo "Xfixes support ......... $CFG_XFIXES"
8084 echo "Xrandr support ......... $CFG_XRANDR"
8085 echo "Xi support ............. $CFG_XINPUT"
8086 echo "MIT-SHM support ........ $CFG_MITSHM"
8087 echo "FontConfig support ..... $CFG_FONTCONFIG"
8088 echo "XKB Support ............ $CFG_XKB"
8089 echo "immodule support ....... $CFG_IM"
8090 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8092 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8093 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8094 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8095 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8096 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8097 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8098 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8099 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8100 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8103 if [ "$CFG_OPENSSL" = "yes" ]; then
8104 OPENSSL_LINKAGE="(run-time)"
8105 elif [ "$CFG_OPENSSL" = "linked" ]; then
8106 OPENSSL_LINKAGE="(linked)"
8108 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8109 echo "Alsa support ........... $CFG_ALSA"
8110 if [ "$PLATFORM_MAC" = "yes" ]; then
8111 echo "CoreWlan support ....... $CFG_COREWLAN"
8113 echo "libICU support ......... $CFG_ICU"
8114 echo "PCRE support ........... $CFG_PCRE"
8115 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8116 echo "Xcb support ............ limited (old version)"
8118 echo "Xcb support ............ $CFG_XCB"
8120 echo "Xrender support ........ $CFG_XRENDER"
8121 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8122 echo "XInput2 support ........ $CFG_XINPUT2"
8126 # complain about not being able to use dynamic plugins if we are using a static build
8127 if [ "$CFG_SHARED" = "no" ]; then
8129 echo "WARNING: Using static linking will disable the use of dynamically"
8130 echo "loaded plugins. Make sure to import all needed static plugins,"
8131 echo "or compile needed modules into the library."
8134 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8136 echo "NOTE: When linking against OpenSSL, you can override the default"
8137 echo "library names through OPENSSL_LIBS."
8139 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8142 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8144 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8145 echo "if you want a pure debug build."
8150 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8155 #-------------------------------------------------------------------------------
8156 # build makefiles based on the configuration
8157 #-------------------------------------------------------------------------------
8159 echo "Finding project files. Please wait..."
8160 if [ "$CFG_NOPROCESS" != "yes" ]; then
8161 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8162 if [ -f "${relpath}/qtbase.pro" ]; then
8163 mkfile="${outpath}/Makefile"
8164 [ -f "$mkfile" ] && chmod +w "$mkfile"
8165 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8169 # .projects -> projects to process
8170 # .projects.1 -> qt and moc
8171 # .projects.2 -> subdirs and libs
8172 # .projects.3 -> the rest
8173 rm -f .projects .projects.1 .projects.2 .projects.3
8175 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8176 if [ -z "$AWK" ]; then
8177 for p in `echo $QMAKE_PROJECTS`; do
8178 echo "$p" >> .projects
8181 cat >projects.awk <<EOF
8187 first = "./.projects.1.tmp"
8188 second = "./.projects.2.tmp"
8189 third = "./.projects.3.tmp"
8194 if ( ! target_file )
8196 print input_file >target_file
8201 input_file = FILENAME
8206 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8209 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8210 target_file = second
8215 matched_target == 0 && /^(TEMPLATE.*=)/ {
8216 if ( \$3 == "subdirs" )
8217 target_file = second
8218 else if ( \$3 == "lib" )
8224 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8225 if ( \$0 ~ /plugin/ )
8228 target_file = second
8233 if ( ! target_file )
8235 print input_file >>target_file
8242 for p in `echo $QMAKE_PROJECTS`; do
8243 echo "$p" >> .projects.all
8246 # if you get errors about the length of the command line to awk, change the -l arg
8248 split -l 100 .projects.all .projects.all.
8249 for p in .projects.all.*; do
8250 "$AWK" -f projects.awk `cat $p`
8251 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8252 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8253 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8254 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8256 rm -f .projects.all* projects.awk
8258 [ -f .projects.1 ] && cat .projects.1 >>.projects
8259 [ -f .projects.2 ] && cat .projects.2 >>.projects
8260 rm -f .projects.1 .projects.2
8261 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8262 cat .projects.3 >>.projects
8266 # don't sort Qt and MOC in with the other project files
8267 # also work around a segfaulting uniq(1)
8268 if [ -f .sorted.projects.2 ]; then
8269 sort .sorted.projects.2 > .sorted.projects.2.new
8270 mv -f .sorted.projects.2.new .sorted.projects.2
8271 cat .sorted.projects.2 >> .sorted.projects.1
8273 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8274 rm -f .sorted.projects.2 .sorted.projects.1
8278 if [ -f .projects ]; then
8279 uniq .projects >.tmp
8280 mv -f .tmp .projects
8281 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8283 if [ -f .projects.3 ]; then
8284 uniq .projects.3 >.tmp
8285 mv -f .tmp .projects.3
8286 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8288 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8292 for part in $CFG_BUILD_PARTS; do
8294 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8295 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8296 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8297 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8302 if [ "$CFG_DEV" = "yes" ]; then
8303 PART_ROOTS="$PART_ROOTS tests"
8306 echo "Creating makefiles. Please wait..."
8307 for file in .projects .projects.3; do
8308 [ '!' -f "$file" ] && continue
8309 for a in `cat $file`; do
8311 for r in $PART_ROOTS; do
8312 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8317 [ "$IN_ROOT" = "no" ] && continue
8320 *winmain/winmain.pro)
8321 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8325 *examples/activeqt/*) continue ;;
8326 */qmake/qmake.pro) continue ;;
8327 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8328 *tools/mkv8snapshot/*)
8329 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8335 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8341 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8342 test -d "$dir" || mkdir -p "$dir"
8343 OUTDIR="$outpath/$dir"
8344 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8345 # fast configure - the makefile exists, skip it
8346 # since the makefile exists, it was generated by qmake, which means we
8347 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8349 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8352 QMAKE_SPEC_ARGS="-spec $SPEC"
8353 echo $ECHO_N " for $a$ECHO_C"
8355 QMAKE="$outpath/bin/qmake"
8356 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8357 if [ "$file" = ".projects.3" ]; then
8360 cat >"${OUTDIR}/Makefile" <<EOF
8361 # ${OUTDIR}/Makefile: generated by configure
8363 # WARNING: This makefile will be replaced with a real makefile.
8364 # All changes made to this file will be lost.
8366 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8368 cat >>"${OUTDIR}/Makefile" <<EOF
8370 all clean install qmake first Makefile: FORCE
8371 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8379 if [ "$OPT_VERBOSE" = "yes" ]; then
8380 echo " (`basename $SPEC`)"
8381 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8386 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8387 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8391 rm -f .projects .projects.3
8393 #-------------------------------------------------------------------------------
8394 # check for platforms that we don't yet know about
8395 #-------------------------------------------------------------------------------
8396 if [ "$CFG_ARCH" = "generic" ]; then
8399 NOTICE: Atomic operations are not yet supported for this
8402 Qt will use the 'generic' architecture instead, which uses a
8403 single pthread_mutex_t to protect all atomic operations. This
8404 implementation is the slow (but safe) fallback implementation
8405 for architectures Qt does not yet support.
8409 #-------------------------------------------------------------------------------
8410 # check if the user passed the -no-zlib option, which is no longer supported
8411 #-------------------------------------------------------------------------------
8412 if [ -n "$ZLIB_FORCED" ]; then
8413 which_zlib="supplied"
8414 if [ "$CFG_ZLIB" = "system" ]; then
8420 NOTICE: The -no-zlib option was supplied but is no longer
8423 Qt now requires zlib support in all builds, so the -no-zlib
8424 option was ignored. Qt will be built using the $which_zlib
8429 #-------------------------------------------------------------------------------
8430 # finally save the executed command to another script
8431 #-------------------------------------------------------------------------------
8432 if [ `basename $0` != "config.status" ]; then
8433 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8435 # add the system variables
8436 for varname in $SYSTEM_VARIABLES; do
8438 'if [ -n "\$'${varname}'" ]; then
8439 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8444 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8446 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8447 echo "#!/bin/sh" > "$outpath/config.status"
8448 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8449 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8450 echo "else" >> "$outpath/config.status"
8451 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8452 echo "fi" >> "$outpath/config.status"
8453 chmod +x "$outpath/config.status"
8456 if [ -n "$RPATH_MESSAGE" ]; then
8458 echo "$RPATH_MESSAGE"
8461 MAKE=`basename "$MAKE"`
8463 echo Qt is now configured for building. Just run \'$MAKE\'.
8464 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8465 echo Once everything is built, Qt is installed.
8466 echo You should not run \'$MAKE install\'.
8468 echo Once everything is built, you must run \'$MAKE install\'.
8469 echo Qt will be installed into $QT_INSTALL_PREFIX
8472 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.