2 #############################################################################
4 ## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
5 ## All rights reserved.
6 ## Contact: Nokia Corporation (qt-info@nokia.com)
8 ## This file is the build configuration utility of the Qt Toolkit.
10 ## $QT_BEGIN_LICENSE:LGPL$
11 ## GNU Lesser General Public License Usage
12 ## This file may be used under the terms of the GNU Lesser General Public
13 ## License version 2.1 as published by the Free Software Foundation and
14 ## appearing in the file LICENSE.LGPL included in the packaging of this
15 ## file. Please review the following information to ensure the GNU Lesser
16 ## General Public License version 2.1 requirements will be met:
17 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ## In addition, as a special exception, Nokia gives you certain additional
20 ## rights. These rights are described in the Nokia Qt LGPL Exception
21 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
23 ## GNU General Public License Usage
24 ## Alternatively, this file may be used under the terms of the GNU General
25 ## Public License version 3.0 as published by the Free Software Foundation
26 ## and appearing in the file LICENSE.GPL included in the packaging of this
27 ## file. Please review the following information to ensure the GNU General
28 ## Public License version 3.0 requirements will be met:
29 ## http://www.gnu.org/copyleft/gpl.html.
32 ## Alternatively, this file may be used in accordance with the terms and
33 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
131 # relies on $QMAKESPEC being set correctly. parses include statements in
132 # qmake.conf and prints out the expanded file
139 getQMakeConf1 "$tmpSPEC/qmake.conf"
142 # relies on $TEST_COMPILER being set correctly
143 compilerSupportsFlag()
145 cat >conftest.cpp <<EOF
146 int main() { return 0; }
148 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
150 rm -f conftest.cpp conftest.o
154 # relies on $TEST_COMPILER being set correctly
160 safe_flag=`shellEscape "$flag"`
161 lflags=$lflags,$safe_flag
163 compilerSupportsFlag "$lflags" >/dev/null 2>&1
166 #-------------------------------------------------------------------------------
167 # operating system detection
168 #-------------------------------------------------------------------------------
170 # need that throughout the script
171 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
172 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
173 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
174 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
176 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
177 if echo '\c' | grep '\c' >/dev/null; then
183 #-------------------------------------------------------------------------------
184 # window system detection
185 #-------------------------------------------------------------------------------
192 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
196 #-----------------------------------------------------------------------------
197 # Qt version detection
198 #-----------------------------------------------------------------------------
199 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
203 if [ -n "$QT_VERSION" ]; then
204 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
205 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
206 if [ -n "$MAJOR" ]; then
207 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
208 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
209 QT_MAJOR_VERSION="$MAJOR"
210 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
211 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
214 if [ -z "$QT_MAJOR_VERSION" ]; then
215 echo "Cannot process version from qglobal.h: $QT_VERSION"
216 echo "Cannot proceed."
220 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
221 if [ -z "$QT_PACKAGEDATE" ]; then
222 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
223 echo "Cannot proceed"
227 #-------------------------------------------------------------------------------
229 #-------------------------------------------------------------------------------
235 EditionString=Commercial
239 # parse the arguments, setting things to "yes" or "no"
240 while [ "$#" -gt 0 ]; do
244 #Autoconf style options
246 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
250 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
254 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
255 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
258 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
263 # this option may or may not be followed by an argument
264 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
273 # this option may or may not be followed by an argument
274 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
287 -h|help|--help|-help)
288 if [ "$VAL" = "yes" ]; then
290 COMMERCIAL_USER="no" #doesn't matter we will display the help
293 COMMERCIAL_USER="no" #doesn't matter we will display the help
297 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
301 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
308 if [ "$UNKNOWN_ARG" = "yes" ]; then
325 if [ "$PLATFORM_QPA" != "no" ]; then
326 if [ "$PLATFORM_QPA" = "maybe" ]; then
333 echo "No license exists to enable Qt QPA. Disabling."
338 echo "Using NaCl at $VAL."
355 COMMERCIAL_USER="yes"
369 if [ "$COMMERCIAL_USER" = "ask" ]; then
371 echo "Which edition of Qt do you want to use ?"
373 echo "Type 'c' if you want to use the Commercial Edition."
374 echo "Type 'o' if you want to use the Open Source Edition."
378 if [ "$commercial" = "c" ]; then
379 COMMERCIAL_USER="yes"
381 elif [ "$commercial" = "o" ]; then
388 if [ "$CFG_NOKIA" = "yes" ]; then
390 Edition="NokiaInternalBuild"
391 EditionString="Nokia Internal Build"
392 QT_EDITION="QT_EDITION_OPENSOURCE"
393 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
394 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
395 # Commercial preview release
396 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
399 QT_EDITION="QT_EDITION_DESKTOP"
400 LicenseType="Technology Preview"
401 elif [ $COMMERCIAL_USER = "yes" ]; then
402 # one of commercial editions
403 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
404 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
405 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
407 # read in the license file
408 if [ -f "$LICENSE_FILE" ]; then
409 . "$LICENSE_FILE" >/dev/null 2>&1
410 if [ -z "$LicenseKeyExt" ]; then
412 echo "You are using an old license file."
414 echo "Please install the license file supplied by Nokia,"
415 echo "or install the Qt Open Source Edition if you intend to"
416 echo "develop free software."
419 if [ -z "$Licensee" ]; then
421 echo "Invalid license key. Please check the license key."
425 if [ -z "$LicenseKeyExt" ]; then
427 echo $ECHO_N "Please enter your license key: $ECHO_C"
429 Licensee="Unknown user"
434 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
435 && LicenseValid="yes" \
437 if [ "$LicenseValid" != "yes" ]; then
439 echo "Invalid license key. Please check the license key."
442 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
443 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
444 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
445 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
447 # determine which edition we are licensed to use
448 case "$LicenseTypeCode" in
450 LicenseType="Commercial"
454 QT_EDITION="QT_EDITION_UNIVERSAL"
457 Edition="FullFramework"
458 EditionString="Full Framework"
459 QT_EDITION="QT_EDITION_DESKTOP"
462 Edition="GUIFramework"
463 EditionString="GUI Framework"
464 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
469 LicenseType="Evaluation"
470 QMakeVar add DEFINES QT_EVAL
474 QT_EDITION="QT_EDITION_EVALUATION"
479 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
481 echo "Invalid license key. Please check the license key."
485 # verify that we are licensed to use Qt on this platform
487 case "$PlatformCode" in
490 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
494 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
497 ### EMBEDDED_QPA logic missing ###
498 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
499 X9,* | XC,* | XU,* | XW,* | XM,*)
501 LICENSE_EXTENSION="-ALLOS"
503 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
504 # Qt for Embedded Linux
505 LICENSE_EXTENSION="-EMBEDDED"
507 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
509 LICENSE_EXTENSION="-EMBEDDED"
511 FM,*,no | LM,yes,* | ZM,no,no)
513 LICENSE_EXTENSION="-DESKTOP"
517 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
518 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
520 echo "You are not licensed for the $Platform platform."
522 echo "Please contact qt-info@nokia.com to upgrade your license to"
523 echo "include the $Platform platform, or install the Qt Open Source Edition"
524 echo "if you intend to develop free software."
529 if test -r "$relpath/.LICENSE"; then
530 # Generic, non-final license
532 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
537 *TECHNOLOGY?PREVIEW*)
544 echo >&2 "Invalid license files; cannot continue"
549 EditionString="$Edition"
550 QT_EDITION="QT_EDITION_DESKTOP"
553 case "$LicenseFeatureCode" in
556 case "$LicenseType" in
558 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
561 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
567 case "$LicenseType" in
569 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
572 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
578 echo "Invalid license key. Please check the license key."
582 case "$LicenseFeatureCode" in
590 if [ '!' -f "$outpath/LICENSE" ]; then
591 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
592 echo "this software has disappeared."
594 echo "Sorry, you are not licensed to use this software."
595 echo "Try re-installing."
599 elif [ $COMMERCIAL_USER = "no" ]; then
600 # Open Source edition - may only be used under the terms of the GPL or LGPL.
601 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
602 Licensee="Open Source"
604 EditionString="Open Source"
605 QT_EDITION="QT_EDITION_OPENSOURCE"
608 #-------------------------------------------------------------------------------
609 # initalize variables
610 #-------------------------------------------------------------------------------
612 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
613 for varname in $SYSTEM_VARIABLES; do
614 qmakevarname="${varname}"
615 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
616 if [ "${varname}" = "LDFLAGS" ]; then
617 qmakevarname="LFLAGS"
618 elif [ "${varname}" = "LD" ]; then
622 'if [ -n "\$'${varname}'" ]; then
623 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
627 # Use CC/CXX to run config.tests
628 mkdir -p "$outpath/config.tests"
629 rm -f "$outpath/config.tests/.qmake.cache"
630 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
632 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
633 QMakeVar add decorations "default windows styled"
634 QMakeVar add mouse-drivers "pc"
635 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
636 QMakeVar add gfx-drivers "linuxfb"
637 QMakeVar add mouse-drivers "linuxtp"
639 QMakeVar add kbd-drivers "tty"
641 if [ "$CFG_DEV" = "yes" ]; then
642 QMakeVar add kbd-drivers "um"
645 # QTDIR may be set and point to an old or system-wide Qt installation
648 # the minimum version of libdbus-1 that we require:
649 MIN_DBUS_1_VERSION=0.93
651 # initalize internal variables
652 CFG_CONFIGURE_EXIT_ON_ERROR=yes
654 CFG_EXCEPTIONS=unspecified
655 CFG_GUI=auto # (yes|no|auto)
656 CFG_SCRIPT=auto # (yes|no|auto)
657 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
658 CFG_XMLPATTERNS=auto # (yes|no|auto)
688 CFG_OPENVG_LC_INCLUDES=no
689 CFG_OPENVG_SHIVA=auto
690 CFG_OPENVG_ON_OPENGL=auto
692 CFG_EGL_GLES_INCLUDES=no
695 CFG_QWS_FREETYPE=auto
698 QT_DEFAULT_BUILD_PARTS="libs examples tests"
703 CFG_PHONON_BACKEND=yes
705 CFG_AUDIO_BACKEND=auto
710 CFG_DECLARATIVE_DEBUG=yes
711 CFG_WEBKIT=auto # (yes|no|auto|debug)
712 CFG_JAVASCRIPTCORE_JIT=auto
715 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
716 CFG_GFX_ON="linuxfb multiscreen"
717 CFG_GFX_PLUGIN_AVAILABLE=
720 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
721 CFG_KBD_ON="tty" #default, see QMakeVar above
722 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
723 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
725 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
726 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
727 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
728 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
730 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
731 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
732 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
733 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
738 CFG_KBD_PLUGIN_AVAILABLE=
741 CFG_MOUSE_PLUGIN_AVAILABLE=
746 CFG_DECORATION_AVAILABLE="styled windows default"
747 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
748 CFG_DECORATION_PLUGIN_AVAILABLE=
749 CFG_DECORATION_PLUGIN=
767 CFG_SEPARATE_DEBUG_INFO=no
768 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
769 CFG_REDUCE_EXPORTS=auto
779 CFG_REDUCE_RELOCATIONS=auto
782 CFG_ACCESSIBILITY=auto
785 CFG_DOUBLEFORMAT=auto
789 CFG_CLOCK_GETTIME=auto
790 CFG_CLOCK_MONOTONIC=auto
799 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
804 COMMANDLINE_MAC_CARBON=no
807 CFG_PREFIX_INSTALL=yes
816 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
817 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
821 OPT_CONFIRM_LICENSE=no
835 # initalize variables used for installation
844 QT_INSTALL_TRANSLATIONS=
850 #flags for SQL drivers
858 QT_LFLAGS_ODBC="-lodbc"
861 # flags for libdbus-1
865 # flags for Glib (X11 only)
869 # flags for GStreamer (X11 only)
873 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
874 QT_CFLAGS_CONNSETTINGS=
875 QT_LIBS_CONNSETTINGS=
877 #-------------------------------------------------------------------------------
878 # check SQL drivers, mouse drivers and decorations available in this package
879 #-------------------------------------------------------------------------------
881 # opensource version removes some drivers, so force them to be off
887 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
888 for a in "$relpath/src/plugins/sqldrivers/"*; do
890 base_a=`basename "$a"`
891 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
892 eval "CFG_SQL_${base_a}=auto"
897 CFG_DECORATION_PLUGIN_AVAILABLE=
898 if [ -d "$relpath/src/plugins/decorations" ]; then
899 for a in "$relpath/src/plugins/decorations/"*; do
901 base_a=`basename "$a"`
902 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
907 CFG_KBD_PLUGIN_AVAILABLE=
908 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
909 for a in "$relpath/src/plugins/kbddrivers/"*; do
911 base_a=`basename "$a"`
912 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
917 CFG_MOUSE_PLUGIN_AVAILABLE=
918 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
919 for a in "$relpath/src/plugins/mousedrivers/"*; do
921 base_a=`basename "$a"`
922 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
927 CFG_GFX_PLUGIN_AVAILABLE=
928 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
929 for a in "$relpath/src/plugins/gfxdrivers/"*; do
931 base_a=`basename "$a"`
932 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
935 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
938 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
939 if [ -d "$relpath/src/plugins/imageformats" ]; then
940 for a in "$relpath/src/plugins/imageformats/"*; do
942 base_a=`basename "$a"`
943 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
948 #-------------------------------------------------------------------------------
949 # Set Default NaCl options
950 #-------------------------------------------------------------------------------
951 if [ "$CFG_EMBEDDED" = "nacl" ]; then
952 echo "Setting NaCl options:"
962 if [ `uname` = "Linux" ]; then
963 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
964 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
966 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
967 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
970 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
981 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
982 QT_CONFIG="$QT_CONFIG nacl"
985 #-------------------------------------------------------------------------------
986 # parse command line arguments
987 #-------------------------------------------------------------------------------
989 # parse the arguments, setting things to "yes" or "no"
990 while [ "$#" -gt 0 ]; do
994 #Autoconf style options
996 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1000 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1004 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1005 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1008 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1012 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1016 -no-*-*|-plugin-*-*|-qt-*-*)
1017 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1018 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1033 #Qt style no options
1035 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1038 #Qt style yes options
1039 -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|-cocoa|-carbon|-universal|-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)
1040 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1043 #Qt style options that pass an argument
1045 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1047 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1051 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1055 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1056 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1060 #Qt style complex options in one command
1061 -enable-*|-disable-*)
1062 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1063 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1065 #Qt Builtin/System style options
1066 -no-*|-system-*|-qt-*)
1067 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1068 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1070 #Options that cannot be generalized
1077 # this option may or may not be followed by an argument
1078 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1085 -embedded-lite|-qpa)
1087 # this option may or may not be followed by an argument
1088 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
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 # this option may or may not be followed by an argument
1112 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1120 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1121 # this option may or may not be followed by an argument
1122 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1131 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1135 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1149 if [ "$1" = "-D" ]; then
1153 VAL=`echo $1 | sed 's,-D,,'`
1158 # this option may or may not be followed by an argument
1159 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1168 if [ "$1" = "-I" ]; then
1172 VAL=`echo $1 | sed 's,-I,,'`
1177 if [ "$1" = "-L" ]; then
1181 VAL=`echo $1 | sed 's,-L,,'`
1186 if [ "$1" = "-R" ]; then
1190 VAL=`echo $1 | sed 's,-R,,'`
1195 VAL=`echo $1 | sed 's,-l,,'`
1199 if [ "$1" = "-F" ]; then
1203 VAL=`echo $1 | sed 's,-F,,'`
1208 if [ "$1" = "-fw" ]; then
1212 VAL=`echo $1 | sed 's,-fw,,'`
1220 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1227 if [ "$UNKNOWN_ARG" = "yes" ]; then
1228 echo "$1: unknown argument"
1239 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1240 CFG_ACCESSIBILITY="$VAL"
1249 CFG_USE_GNUMAKE="$VAL"
1252 CFG_MYSQL_CONFIG="$VAL"
1255 QT_INSTALL_PREFIX="$VAL"
1258 QT_HOST_PREFIX="$VAL"
1261 QT_FORCE_PKGCONFIG=yes
1264 QT_INSTALL_DOCS="$VAL"
1267 QT_INSTALL_HEADERS="$VAL"
1270 QT_INSTALL_PLUGINS="$VAL"
1273 QT_INSTALL_IMPORTS="$VAL"
1276 QT_INSTALL_DATA="$VAL"
1279 QT_INSTALL_LIBS="$VAL"
1288 QT_INSTALL_TRANSLATIONS="$VAL"
1290 sysconfdir|settingsdir)
1291 QT_INSTALL_SETTINGS="$VAL"
1294 QT_INSTALL_EXAMPLES="$VAL"
1297 QT_INSTALL_TESTS="$VAL"
1306 QT_INSTALL_BINS="$VAL"
1328 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1335 if [ "$VAL" = "little" ]; then
1336 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1337 elif [ "$VAL" = "big" ]; then
1338 CFG_ENDIAN="Q_BIG_ENDIAN"
1344 if [ "$VAL" = "little" ]; then
1345 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1346 elif [ "$VAL" = "big" ]; then
1347 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1353 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1360 CFG_QWS_DEPTHS="$VAL"
1363 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1364 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1365 [ "$VAL" = "es2" ]; then
1367 if [ "$VAL" = "es2" ]; then
1375 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1377 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1384 qvfb) # left for commandline compatibility, not documented
1385 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1386 if [ "$VAL" = "yes" ]; then
1387 QMakeVar add gfx-drivers qvfb
1388 QMakeVar add kbd-drivers qvfb
1389 QMakeVar add mouse-drivers qvfb
1390 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1391 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1392 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1399 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1402 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1411 if [ "$PLATFORM_MAC" = "yes" ]; then
1418 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1419 CFG_MAC_DWARF2="$VAL"
1425 # if this is a Mac then "windows" probably means
1426 # we are cross-compiling for MinGW
1427 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1428 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1437 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1438 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1444 # do nothing - Cocoa is the default.
1447 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1448 CFG_MAC_CARBON="$VAL"
1449 COMMANDLINE_MAC_CARBON="$VAL"
1455 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1456 CFG_MAC_HARFBUZZ="$VAL"
1463 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1464 CFG_FRAMEWORK="$VAL"
1470 if [ "$VAL" = "yes" ]; then
1472 QMakeVar add QMAKE_CFLAGS -pg
1473 QMakeVar add QMAKE_CXXFLAGS -pg
1474 QMakeVar add QMAKE_LFLAGS -pg
1475 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1481 if [ "$VAL" = "yes" ]; then
1482 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1485 exceptions|g++-exceptions)
1486 if [ "$VAL" = "no" ]; then
1488 elif [ "$VAL" = "yes" ]; then
1496 # keep compatibility with old platform names
1502 PLATFORM=hpux-acc-o64
1505 PLATFORM=hpux-acc-64
1508 PLATFORM=hpux-acc-64
1520 PLATFORM=reliant-cds-64
1523 PLATFORM=solaris-cc-64
1526 PLATFORM=unixware-cc
1529 PLATFORM=unixware-g++
1532 PLATFORM=unixware-cc
1535 PLATFORM=unixware-g++
1541 i386) NATIVE_64_ARCH="x86_64" ;;
1542 powerpc) NATIVE_64_ARCH="ppc64" ;;
1543 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1545 if [ ! -z "$NATIVE_64_ARCH" ]; then
1546 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1547 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1554 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1557 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1558 CFG_DEBUG_RELEASE="$VAL"
1564 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1565 CFG_RELEASE_QMAKE="$VAL"
1571 if [ "$VAL" = "yes" ]; then
1573 elif [ "$VAL" = "no" ]; then
1580 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1581 CFG_PREFIX_INSTALL="$VAL"
1589 developer-build|commercial|opensource|nokia-developer)
1590 # These switches have been dealt with already
1593 if [ "$VAL" = "yes" ]; then
1595 elif [ "$VAL" = "no" ]; then
1602 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1603 CFG_INCREMENTAL="$VAL"
1609 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1610 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1616 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1617 if [ "$VAL" = "no" ]; then
1618 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1619 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1620 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1626 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1633 if [ "$VAL" = "no" ]; then
1640 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1648 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1655 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1662 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1669 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1676 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1683 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1690 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1697 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1704 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1705 CFG_PRECOMPILE="$VAL"
1710 separate-debug-info)
1711 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1712 CFG_SEPARATE_DEBUG_INFO="$VAL"
1713 elif [ "$VAL" = "nocopy" ] ; then
1714 CFG_SEPARATE_DEBUG_INFO="yes"
1715 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1721 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1722 CFG_REDUCE_EXPORTS="$VAL"
1728 if [ "$VAL" = "no" ]; then
1735 if [ "$VAL" = "no" ]; then
1742 if [ "$VAL" = "no" ]; then
1749 if [ "$VAL" = "no" ]; then
1756 if [ "$VAL" = "no" ]; then
1763 if [ "$VAL" = "no" ]; then
1770 if [ "$VAL" = "no" ]; then
1777 if [ "$VAL" = "no" ]; then
1784 if [ "$VAL" = "no" ]; then
1794 if [ "$VAL" = "no" ]; then
1801 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1802 CFG_REDUCE_RELOCATIONS="$VAL"
1808 [ "$VAL" = "qt" ] && VAL=yes
1809 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1810 CFG_QWS_FREETYPE="$VAL"
1816 [ "$VAL" = "qt" ] && VAL=yes
1817 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1822 # No longer supported:
1823 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1826 if [ "$VAL" = "system" ]; then
1833 [ "$VAL" = "yes" ] && VAL=qt
1834 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1841 [ "$VAL" = "yes" ] && VAL=qt
1842 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1849 [ "$VAL" = "yes" ] && VAL=qt
1850 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1857 [ "$VAL" = "yes" ] && VAL=qt
1858 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1865 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1872 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1879 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1886 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1893 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1900 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1907 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1908 CFG_FONTCONFIG="$VAL"
1914 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1921 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1928 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1935 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1942 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1949 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1956 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1957 CFG_GSTREAMER="$VAL"
1963 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1964 CFG_QGTKSTYLE="$VAL"
1970 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1973 if [ "$VAL" = "no" ]; then
1981 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1983 elif [ "$VAL" = "runtime" ]; then
1990 if [ "$VAL" = "yes" ]; then
1997 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2004 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2005 CFG_LARGEFILE="$VAL"
2011 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2018 if [ "$VAL" = "yes" ]; then
2019 CFG_OPENSSL="linked"
2025 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2026 CFG_XMLPATTERNS="yes"
2028 if [ "$VAL" = "no" ]; then
2029 CFG_XMLPATTERNS="no"
2036 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2039 if [ "$VAL" = "no" ]; then
2047 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2048 CFG_SCRIPTTOOLS="yes"
2050 if [ "$VAL" = "no" ]; then
2051 CFG_SCRIPTTOOLS="no"
2058 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2061 if [ "$VAL" = "no" ]; then
2069 if [ "$VAL" = "yes" ]; then
2072 if [ "$VAL" = "no" ]; then
2080 if [ "$VAL" = "yes" ]; then
2081 CFG_DECLARATIVE="yes"
2083 if [ "$VAL" = "no" ]; then
2084 CFG_DECLARATIVE="no"
2091 if [ "$VAL" = "yes" ]; then
2092 CFG_DECLARATIVE_DEBUG="yes"
2094 if [ "$VAL" = "no" ]; then
2095 CFG_DECLARATIVE_DEBUG="no"
2102 [ "$VAL" = "auto" ] && VAL="yes"
2106 if [ "$VAL" = "yes" ]; then
2109 if [ "$VAL" = "no" ]; then
2117 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2118 CFG_JAVASCRIPTCORE_JIT="$VAL"
2124 if [ "$VAL" = "yes" ]; then
2125 OPT_CONFIRM_LICENSE="$VAL"
2131 if [ "$VAL" = "yes" ]; then
2137 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2138 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2139 # if autoconf style options were used, $VAL can be "yes" or "no"
2140 [ "$VAL" = "yes" ] && VAL=qt
2141 # now $VAL should be "no", "qt", or "plugin"... double-check
2142 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2145 # now $VAL is "no", "qt", or "plugin"
2147 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2148 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2150 # Grab the available values
2153 avail="$CFG_SQL_AVAILABLE"
2156 avail="$CFG_GFX_AVAILABLE"
2157 if [ "$OPT" = "plugin" ]; then
2158 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2162 avail="$CFG_DECORATION_AVAILABLE"
2163 if [ "$OPT" = "plugin" ]; then
2164 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2168 avail="$CFG_KBD_AVAILABLE"
2169 if [ "$OPT" = "plugin" ]; then
2170 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2174 avail="$CFG_MOUSE_AVAILABLE"
2175 if [ "$OPT" = "plugin" ]; then
2176 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2180 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2181 if [ "$OPT" != "plugin" ]; then
2182 # png is always built in
2188 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2192 # Check that that user's value is available.
2195 if [ "$VAL" = "$d" ]; then
2200 [ "$found" = yes ] || ERROR=yes
2202 if [ "$VAR" = "sql" ]; then
2203 # set the CFG_SQL_driver
2204 eval "CFG_SQL_$VAL=\$OPT"
2206 elif [ "$VAR" = "imageformat" ]; then
2207 [ "$OPT" = "qt" ] && OPT=yes
2208 VAL="`echo $VAL |tr a-z A-Z`"
2209 eval "CFG_$VAL=$OPT"
2213 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2214 if [ "$OPT" = "plugin" ]; then
2215 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2216 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2217 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2218 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2219 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2220 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2221 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2222 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2225 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2226 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2227 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2228 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2229 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2233 QMakeVar add "${VAR}s" "${VAL}"
2234 elif [ "$OPT" = "no" ]; then
2235 PLUG_VAR="${VAR}-plugin"
2236 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2237 IN_VAR="${VAR}-driver"
2241 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2242 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2243 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2244 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2245 QMakeVar del "${IN_VAR}s" "$VAL"
2246 QMakeVar del "${PLUG_VAR}s" "$VAL"
2248 if [ "$ERROR" = "yes" ]; then
2249 echo "$CURRENT_OPT: unknown argument"
2254 if [ "$VAL" = "yes" ]; then
2255 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2256 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2260 elif [ "$VAL" = "no" ]; then
2261 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2262 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2271 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2278 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2285 D_FLAGS="$D_FLAGS \"$VAL\""
2288 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2291 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2294 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2297 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2300 if [ "$PLATFORM_MAC" = "yes" ]; then
2301 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2302 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2308 if [ "$PLATFORM_MAC" = "yes" ]; then
2309 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2315 W_FLAGS="$W_FLAGS \"${VAL}\""
2321 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2328 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2329 CFG_PHONON_BACKEND="$VAL"
2335 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2336 CFG_MULTIMEDIA="$VAL"
2348 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2349 CFG_AUDIO_BACKEND="$VAL"
2355 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2362 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2363 CFG_FORCE_ASSERTS="$VAL"
2372 if [ "$UNKNOWN_OPT" = "yes" ]; then
2373 echo "${CURRENT_OPT}: invalid command-line switch"
2379 # update QT_CONFIG to show our current predefined configuration
2380 case "$CFG_QCONFIG" in
2381 minimal|small|medium|large|full)
2382 # these are a sequence of increasing functionality
2383 for c in minimal small medium large full; do
2384 QT_CONFIG="$QT_CONFIG $c-config"
2385 [ "$CFG_QCONFIG" = $c ] && break
2389 # not known to be sufficient for anything
2390 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2391 echo >&2 "Error: configuration file not found:"
2392 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2394 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2399 #-------------------------------------------------------------------------------
2400 # build tree initialization
2401 #-------------------------------------------------------------------------------
2403 # where to find which..
2404 unixtests="$relpath/config.tests/unix"
2405 mactests="$relpath/config.tests/mac"
2406 WHICH="$unixtests/which.test"
2408 PERL=`$WHICH perl 2>/dev/null`
2410 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2412 for e in gawk nawk awk; do
2413 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2420 PERL="/usr/bin/perl"
2421 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2425 ### skip this if the user just needs help...
2426 if [ "$OPT_HELP" != "yes" ]; then
2428 # is this a shadow build?
2429 if [ "$OPT_SHADOW" = "maybe" ]; then
2431 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2432 if [ -h "$outpath" ]; then
2433 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2439 if [ "$OPT_SHADOW" = "yes" ]; then
2440 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2441 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2442 echo >&2 "Cannot proceed."
2445 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2448 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2450 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2451 echo "Qt can be built in release mode with separate debug information, so"
2452 echo "-debug-and-release is not necessary anymore"
2456 if [ "$CFG_SILENT" = "yes" ]; then
2457 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2460 # if the source tree is different from the build tree,
2461 # symlink or copy part of the sources
2462 if [ "$OPT_SHADOW" = "yes" ]; then
2463 echo "Preparing build tree..."
2465 if [ -z "$PERL" ]; then
2467 echo "You need perl in your PATH to make a shadow build."
2468 echo "Cannot proceed."
2472 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2474 # symlink the qmake directory
2475 find "$relpath/qmake" | while read a; do
2476 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2477 if [ '!' -f "$my_a" ]; then
2478 if [ -d "$a" ]; then
2479 # directories are created...
2482 a_dir=`dirname "$my_a"`
2483 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2484 # ... and files are symlinked
2485 case `basename "$a"` in
2486 *.o|*.d|GNUmakefile*|qmake)
2497 # make a syncqt script that can be used in the shadow
2498 rm -f "$outpath/bin/syncqt"
2499 if [ -x "$relpath/bin/syncqt" ]; then
2500 mkdir -p "$outpath/bin"
2501 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2502 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2503 chmod 755 "$outpath/bin/syncqt"
2506 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2507 rm -f "$outpath/bin/$i"
2508 if [ -x "$relpath/bin/$i" ]; then
2509 mkdir -p "$outpath/bin"
2510 echo "#!/bin/sh" >"$outpath/bin/$i"
2511 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2512 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2513 chmod 755 "$outpath/bin/$i"
2517 # symlink the mkspecs directory
2518 mkdir -p "$outpath/mkspecs"
2519 rm -rf "$outpath"/mkspecs/*
2520 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2521 rm -f "$outpath/mkspecs/default"
2525 rm -rf "$outpath/mkspecs/$1"
2526 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2527 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2530 # Special case for mkspecs/features directory.
2531 # To be able to place .prf files into a shadow build directory,
2532 # we're creating links for files only. The directory structure is reproduced.
2533 ShadowMkspecs features
2535 # The modules dir is special, too.
2536 ShadowMkspecs modules
2538 # symlink the doc directory
2539 rm -rf "$outpath/doc"
2540 ln -s "$relpath/doc" "$outpath/doc"
2542 # make sure q3porting.xml can be found
2543 mkdir -p "$outpath/tools/porting/src"
2544 rm -f "$outpath/tools/porting/src/q3porting.xml"
2545 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2548 # symlink fonts to be able to run application from build directory
2549 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2550 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2551 mkdir -p "${outpath}/lib"
2552 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2556 if [ "$OPT_FAST" = "auto" ]; then
2557 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2564 # find a make command
2565 if [ -z "$MAKE" ]; then
2567 for mk in gmake make; do
2568 if "$WHICH" $mk >/dev/null 2>&1; then
2573 if [ -z "$MAKE" ]; then
2574 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2575 echo >&2 "Cannot proceed."
2578 # export MAKE, we need it later in the config.tests
2584 #-------------------------------------------------------------------------------
2585 # auto-detect all that hasn't been specified in the arguments
2586 #-------------------------------------------------------------------------------
2588 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2589 if [ "$CFG_EMBEDDED" != "no" ]; then
2590 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2592 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2593 if [ -z "$XPLATFORM" ]; then
2594 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2595 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2599 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2600 if [ -z "$XPLATFORM" ]; then
2601 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2602 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2606 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2607 if [ -z "$XPLATFORM" ]; then
2608 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2609 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2613 if [ -z "$PLATFORM" ]; then
2614 case "$UNAME_MACHINE" in
2616 PLATFORM=qws/linux-x86-g++
2619 PLATFORM=qws/linux-x86_64-g++
2622 PLATFORM=qws/linux-generic-g++
2626 if [ -z "$XPLATFORM" ]; then
2627 if [ "$CFG_EMBEDDED" = "auto" ]; then
2628 if [ -n "$CFG_ARCH" ]; then
2629 CFG_EMBEDDED=$CFG_ARCH
2631 case "$UNAME_MACHINE" in
2639 CFG_EMBEDDED=generic
2644 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2648 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2649 if [ -z "$XPLATFORM" ]; then
2650 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2651 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2655 if [ -z "$XPLATFORM" ]; then
2660 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2667 if [ -z "$PLATFORM" ]; then
2669 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2671 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2673 # PLATFORM=macx-xcode
2680 #PLATFORM=aix-g++-64
2682 #PLATFORM=aix-xlc-64
2684 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2694 # PLATFORM=dynix-g++
2700 PLATFORM=freebsd-g++
2702 - Also available for FreeBSD: freebsd-icc
2706 PLATFORM=openbsd-g++
2717 #PLATFORM=irix-cc-64
2719 - Also available for IRIX: irix-g++ irix-cc-64
2723 case "$UNAME_MACHINE" in
2725 #PLATFORM=hpuxi-acc-32
2726 PLATFORM=hpuxi-acc-64
2728 - Also available for HP-UXi: hpuxi-acc-32
2734 #PLATFORM=hpux-acc-64
2736 #PLATFORM=hpux-acc-o64
2738 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2747 - Also available for Tru64: tru64-g++
2751 case "$UNAME_MACHINE" in
2753 PLATFORM=linux-g++-64
2760 - Also available for Linux: linux-kcc linux-icc linux-cxx
2764 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2765 PLATFORM="solaris-g++"
2767 #PLATFORM=solaris-g++
2769 #PLATFORM=solaris-cc64
2772 - Also available for Solaris: solaris-g++ solaris-cc-64
2775 ReliantUNIX-*:*|SINIX-*:*)
2776 PLATFORM=reliant-cds
2777 #PLATFORM=reliant-cds-64
2779 - Also available for Reliant UNIX: reliant-cds-64
2789 #PLATFORM=unixware-g++
2790 PLATFORM=unixware-cc
2792 - Also available for OpenUNIX: unixware-g++
2796 #PLATFORM=unixware-g++
2797 PLATFORM=unixware-cc
2799 - Also available for UnixWare: unixware-g++
2806 - Also available for SCO OpenServer: sco-g++
2810 PLATFORM=unixware-g++
2813 PLATFORM=unsupported/qnx-g++
2816 if [ "$OPT_HELP" != "yes" ]; then
2818 for p in $PLATFORMS; do
2819 echo " $relconf $* -platform $p"
2822 echo " The build script does not currently recognize all" >&2
2823 echo " platforms supported by Qt." >&2
2824 echo " Rerun this script with a -platform option listed to" >&2
2825 echo " set the system/compiler combination you use." >&2
2832 if [ "$PLATFORM_QWS" = "yes" ]; then
2834 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2836 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2839 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2841 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2842 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2844 if [ -d "$PLATFORM" ]; then
2845 QMAKESPEC="$PLATFORM"
2847 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2849 if [ -d "$XPLATFORM" ]; then
2850 XQMAKESPEC="$XPLATFORM"
2852 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2854 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2855 QT_CROSS_COMPILE=yes
2856 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2859 if [ "$PLATFORM_MAC" = "yes" ]; then
2860 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2862 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2863 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2864 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2865 echo " built with 'macx-g++'" >&2
2871 # check specified platforms are supported
2872 if [ '!' -d "$QMAKESPEC" ]; then
2874 echo " The specified system/compiler is not supported:"
2878 echo " Please see the README file for a complete list."
2882 if [ '!' -d "$XQMAKESPEC" ]; then
2884 echo " The specified system/compiler is not supported:"
2888 echo " Please see the README file for a complete list."
2892 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2894 echo " The specified system/compiler port is not complete:"
2896 echo " $XQMAKESPEC/qplatformdefs.h"
2898 echo " Please contact qt-info@nokia.com."
2903 # now look at the configs and figure out what platform we are config'd for
2904 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2905 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2907 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2909 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2910 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2911 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2912 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2913 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2917 #-------------------------------------------------------------------------------
2918 # determine the system architecture
2919 #-------------------------------------------------------------------------------
2920 if [ "$OPT_VERBOSE" = "yes" ]; then
2921 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2924 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2925 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2927 echo "You have specified a target architecture with -embedded and -arch."
2928 echo "The two architectures you have specified are different, so we can"
2929 echo "not proceed. Either set both to be the same, or only use -embedded."
2935 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2936 case `basename "$XPLATFORM"` in
2939 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2941 echo "Please contact qt-info@nokia.com to upgrade your license to"
2942 echo "include this platform, or install the Qt Open Source Edition"
2943 echo "if you intend to develop free software."
2949 if [ -z "${CFG_HOST_ARCH}" ]; then
2950 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2952 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2953 case "$CFG_HOST_ARCH" in
2958 if [ "$OPT_VERBOSE" = "yes" ]; then
2959 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2963 CFG_HOST_ARCH=`uname -p`
2964 if [ "$OPT_VERBOSE" = "yes" ]; then
2965 echo " SGI ($CFG_HOST_ARCH)"
2969 case "$UNAME_MACHINE" in
2971 if [ "$OPT_VERBOSE" = "yes" ]; then
2972 echo " Sun SPARC (sparc)"
2979 if [ "$OPT_VERBOSE" = "yes" ]; then
2980 echo " 64-bit AMD 80x86 (x86_64)"
2982 CFG_HOST_ARCH=x86_64
2985 if [ "$OPT_VERBOSE" = "yes" ]; then
2986 echo " 32-bit Intel 80x86 (i386)"
2994 case "$UNAME_MACHINE" in
2996 if [ "$OPT_VERBOSE" = "yes" ]; then
2997 echo " 32-bit Apple PowerPC (powerpc)"
3001 if [ "$OPT_VERBOSE" = "yes" ]; then
3002 echo " 32-bit Intel 80x86 (i386)"
3006 CFG_HOST_ARCH=macosx
3009 if [ "$OPT_VERBOSE" = "yes" ]; then
3010 echo " 64-bit IBM PowerPC (powerpc)"
3012 CFG_HOST_ARCH=powerpc
3015 if [ "$OPT_VERBOSE" = "yes" ]; then
3016 echo " HP PA-RISC (parisc)"
3018 CFG_HOST_ARCH=parisc
3021 if [ "$OPT_VERBOSE" = "yes" ]; then
3022 echo " 32-bit Intel 80x86 (i386)"
3026 *:*:x86_64|*:*:amd64)
3027 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3028 if [ "$OPT_VERBOSE" = "yes" ]; then
3029 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3033 if [ "$OPT_VERBOSE" = "yes" ]; then
3034 echo " 64-bit AMD 80x86 (x86_64)"
3036 CFG_HOST_ARCH=x86_64
3040 if [ "$OPT_VERBOSE" = "yes" ]; then
3041 echo " 32-bit PowerPC (powerpc)"
3043 CFG_HOST_ARCH=powerpc
3046 if [ "$OPT_VERBOSE" = "yes" ]; then
3047 echo " 64-bit PowerPC (powerpc)"
3049 CFG_HOST_ARCH=powerpc
3052 if [ "$OPT_VERBOSE" = "yes" ]; then
3053 echo " IBM S/390 (s390)"
3058 if [ "$OPT_VERBOSE" = "yes" ]; then
3064 if [ "$OPT_VERBOSE" = "yes" ]; then
3065 echo " Linux on SPARC"
3070 case "$UNAME_MACHINE" in
3072 if [ "$OPT_VERBOSE" = "yes" ]; then
3073 echo " QNX on Intel 80x86 (i386)"
3080 if [ "$OPT_VERBOSE" = "yes" ]; then
3081 echo " Trying '$UNAME_MACHINE'..."
3083 CFG_HOST_ARCH="$UNAME_MACHINE"
3088 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3089 if [ -n "$CFG_ARCH" ]; then
3090 CFG_EMBEDDED=$CFG_ARCH
3093 case "$CFG_EMBEDDED" in
3116 CFG_ARCH="$CFG_EMBEDDED"
3119 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3120 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3121 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3122 CFG_ARCH=$CFG_HOST_ARCH
3129 # previously, armv6 was a different arch
3135 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3136 if [ "$OPT_VERBOSE" = "yes" ]; then
3137 echo " '$CFG_ARCH' is supported"
3140 if [ "$OPT_VERBOSE" = "yes" ]; then
3141 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3145 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3146 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3147 if [ "$OPT_VERBOSE" = "yes" ]; then
3148 echo " '$CFG_HOST_ARCH' is supported"
3151 if [ "$OPT_VERBOSE" = "yes" ]; then
3152 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3154 CFG_HOST_ARCH=generic
3158 if [ "$OPT_VERBOSE" = "yes" ]; then
3159 echo "System architecture: '$CFG_ARCH'"
3160 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3161 echo "Host architecture: '$CFG_HOST_ARCH'"
3165 #-------------------------------------------------------------------------------
3166 # tests that don't need qmake (must be run before displaying help)
3167 #-------------------------------------------------------------------------------
3169 # detect build style
3170 if [ "$CFG_DEBUG" = "auto" ]; then
3171 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3172 CFG_DEBUG_RELEASE=yes
3174 elif [ "$CFG_DEV" = "yes" ]; then
3175 CFG_DEBUG_RELEASE=no
3178 CFG_DEBUG_RELEASE=no
3182 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3183 QT_CONFIG="$QT_CONFIG build_all"
3186 if [ -z "$PKG_CONFIG" ]; then
3187 # See if PKG_CONFIG is set in the mkspec:
3188 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3190 if [ -z "$PKG_CONFIG" ]; then
3191 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3194 # Work out if we can use pkg-config
3195 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3196 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3198 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3199 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3200 echo >&2 "environment!"
3202 if [ -z "$PKG_CONFIG_PATH" ]; then
3204 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3205 echo >&2 "the host compiler's .pc files will be used. This is probably"
3206 echo >&2 "not what you want."
3208 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3210 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3211 echo >&2 "been set. This means your toolchain's .pc files must contain"
3212 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3213 echo >&2 "tests are failing, please check these files."
3218 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3219 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3220 echo >&2 "dependencies"
3226 if [ ! -n "$PKG_CONFIG" ]; then
3227 QT_CONFIG="$QT_CONFIG no-pkg-config"
3230 # process CFG_MAC_ARCHS
3231 if [ "$PLATFORM_MAC" = "yes" ]; then
3232 # check -arch arguments for validity.
3233 ALLOWED="x86 ppc x86_64 ppc64 i386"
3234 # Save the list so we can re-write it using only valid values
3235 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3237 for i in $CFG_MAC_ARCHS_IN
3239 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3240 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3243 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3244 # These are synonymous values
3245 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3246 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3247 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3249 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3250 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3255 # pass on $CFG_SDK to the configure tests.
3256 if [ '!' -z "$CFG_SDK" ]; then
3257 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3260 # find the default framework value
3261 if [ "$CFG_ARCH" = "macosx" ]; then
3262 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3263 CFG_FRAMEWORK="$CFG_SHARED"
3264 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3266 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3274 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3275 TEST_COMPILER="$CXX"
3277 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3278 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3279 if [ -z "$TEST_COMPILER" ]; then
3280 echo "ERROR: Cannot set the compiler for the configuration tests"
3285 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3286 TEST_COMPILER="nacl-gcc"
3290 if [ -n "$CFG_SYSROOT" ]; then
3291 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3292 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3293 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3295 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3299 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3301 # auto-detect precompiled header support
3302 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3303 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3305 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3310 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3312 echo "WARNING: Using universal binaries disables precompiled headers."
3317 #auto-detect DWARF2 on the mac
3318 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3319 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3326 # auto-detect support for -Xarch on the mac
3327 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3328 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3335 # don't autodetect support for separate debug info on objcopy when
3336 # cross-compiling as lots of toolchains seems to have problems with this
3337 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3338 CFG_SEPARATE_DEBUG_INFO="no"
3341 # auto-detect support for separate debug info in objcopy
3342 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3343 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3344 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3345 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3346 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3347 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3348 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3349 CFG_SEPARATE_DEBUG_INFO=no
3353 # binutils on HP-UX is buggy; default to no.
3354 CFG_SEPARATE_DEBUG_INFO=no
3357 CFG_SEPARATE_DEBUG_INFO=yes
3363 # auto-detect -fvisibility support
3364 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3365 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3366 CFG_REDUCE_EXPORTS=no
3368 CFG_REDUCE_EXPORTS=yes
3372 # detect the availability of the -Bsymbolic-functions linker optimization
3373 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3374 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3375 CFG_REDUCE_RELOCATIONS=no
3377 CFG_REDUCE_RELOCATIONS=yes
3381 # auto-detect GNU make support
3382 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3386 # If -opengl wasn't specified, don't try to auto-detect
3387 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3392 if [ "$PLATFORM_MAC" = "yes" ]; then
3393 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3398 # find the default framework value
3399 if [ "$CFG_ARCH" = "macosx" ]; then
3400 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3401 CFG_FRAMEWORK="$CFG_SHARED"
3402 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3404 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3412 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3413 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3414 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3415 # get the darwin version. 10.0.0 and up means snow leopard.
3416 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3417 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3419 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3424 # x11 tests are done after qmake is built
3427 #setup the build parts
3428 if [ -z "$CFG_BUILD_PARTS" ]; then
3429 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3431 # don't build tools by default when cross-compiling
3432 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3433 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3436 for nobuild in $CFG_NOBUILD_PARTS; do
3437 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3439 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3441 # echo "WARNING: libs is a required part of the build."
3443 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3446 #-------------------------------------------------------------------------------
3447 # post process QT_INSTALL_* variables
3448 #-------------------------------------------------------------------------------
3450 if [ -z "$QT_INSTALL_PREFIX" ]; then
3451 if [ "$CFG_DEV" = "yes" ]; then
3452 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3454 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3457 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3459 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3460 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3461 if [ "$PLATFORM_MAC" = "yes" ]; then
3462 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3465 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3468 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3470 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3471 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3472 if [ "$PLATFORM_MAC" = "yes" ]; then
3473 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3478 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3481 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3483 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3484 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3485 if [ "$PLATFORM_MAC" = "yes" ]; then
3486 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3487 QT_INSTALL_LIBS="/Libraries/Frameworks"
3491 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3493 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3495 if [ -z "$QT_INSTALL_BINS" ]; then #default
3496 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3497 if [ "$PLATFORM_MAC" = "yes" ]; then
3498 QT_INSTALL_BINS="/Developer/Applications/Qt"
3501 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3503 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3505 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3506 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3507 if [ "$PLATFORM_MAC" = "yes" ]; then
3508 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3511 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3513 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3515 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3516 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3517 if [ "$PLATFORM_MAC" = "yes" ]; then
3518 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3521 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3523 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3525 if [ -z "$QT_INSTALL_DATA" ]; then #default
3526 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3528 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3530 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3531 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3533 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3535 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3536 if [ "$PLATFORM_MAC" = "yes" ]; then
3537 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3539 QT_INSTALL_SETTINGS=/etc/xdg
3542 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3544 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3545 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3546 if [ "$PLATFORM_MAC" = "yes" ]; then
3547 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3550 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3552 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3555 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3556 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3557 if [ "$PLATFORM_MAC" = "yes" ]; then
3558 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3561 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3563 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3565 #-------------------------------------------------------------------------------
3566 # help - interactive parts of the script _after_ this section please
3567 #-------------------------------------------------------------------------------
3569 # next, emit a usage message if something failed.
3570 if [ "$OPT_HELP" = "yes" ]; then
3571 [ "x$ERROR" = "xyes" ] && echo
3572 if [ "$CFG_NIS" = "no" ]; then
3579 if [ "$CFG_CUPS" = "no" ]; then
3586 if [ "$CFG_ICONV" = "no" ]; then
3593 if [ "$CFG_LARGEFILE" = "no" ]; then
3600 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3607 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3615 if [ "$CFG_XCB" = "no" ]; then
3623 if [ "$CFG_WAYLAND" = "no" ]; then
3630 if [ "$CFG_XINPUT2" = "no" ]; then
3639 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3640 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3641 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3642 [-release] [-debug] [-debug-and-release]
3643 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3644 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3645 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3646 [-plugin-sql-<driver>] [-system-sqlite]
3647 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3648 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3649 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3650 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3651 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3652 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3653 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3654 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3655 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3656 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3657 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3658 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3659 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3660 [-no-openssl] [-openssl] [-openssl-linked]
3661 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3662 [-no-javascript-jit] [-javascript-jit]
3663 [-no-script] [-script] [-no-scripttools] [-scripttools]
3664 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3665 [-no-location] [-location]
3666 [additional platform specific options (see below)]
3669 Installation options:
3671 -qpa ................ This will enable the QPA build.
3672 QPA is a window system agnostic implementation of Qt.
3674 These are optional, but you may specify install directories.
3676 -prefix <dir> ...... This will install everything relative to <dir>
3677 (default $QT_INSTALL_PREFIX)
3679 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3682 -hostprefix [dir] .. Tools and libraries needed when developing
3683 applications are installed in [dir]. If [dir] is
3684 not given, the current build directory will be used.
3689 * -prefix-install .... Force a sandboxed "local" installation of
3690 Qt. This will install into
3691 $QT_INSTALL_PREFIX, if this option is
3692 disabled then some platforms will attempt a
3693 "system" install by placing default values to
3694 be placed in a system location other than
3697 You may use these to separate different parts of the install:
3699 -bindir <dir> ......... Executables will be installed to <dir>
3700 (default PREFIX/bin)
3701 -libdir <dir> ......... Libraries will be installed to <dir>
3702 (default PREFIX/lib)
3703 -docdir <dir> ......... Documentation will be installed to <dir>
3704 (default PREFIX/doc)
3705 -headerdir <dir> ...... Headers will be installed to <dir>
3706 (default PREFIX/include)
3707 -plugindir <dir> ...... Plugins will be installed to <dir>
3708 (default PREFIX/plugins)
3709 -importdir <dir> ...... Imports for QML will be installed to <dir>
3710 (default PREFIX/imports)
3711 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3713 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3714 (default PREFIX/translations)
3715 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3716 (default PREFIX/etc/settings)
3717 -examplesdir <dir> .... Examples will be installed to <dir>
3718 (default PREFIX/examples)
3719 -testsdir <dir> ....... Tests will be installed to <dir>
3720 (default PREFIX/tests)
3724 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3725 that needs to be evaluated. If the evaluation succeeds, the feature is
3726 included. Here is a short explanation of each option:
3728 * -release ........... Compile and link Qt with debugging turned off.
3729 -debug ............. Compile and link Qt with debugging turned on.
3730 -debug-and-release . Compile and link two versions of Qt, with and without
3731 debugging turned on (Mac only).
3733 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3735 -opensource ........ Compile and link the Open-Source Edition of Qt.
3736 -commercial ........ Compile and link the Commercial Edition of Qt.
3739 * -shared ............ Create and use shared Qt libraries.
3740 -static ............ Create and use static Qt libraries.
3742 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3744 -fast .............. Configure Qt quickly by generating Makefiles only for
3745 library and subdirectory targets. All other Makefiles
3746 are created as wrappers, which will in turn run qmake.
3748 -no-largefile ...... Disables large file support.
3749 + -largefile ......... Enables Qt to access files larger than 4 GB.
3752 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3759 if [ "$CFG_DBUS" = "no" ]; then
3768 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3769 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3771 -no-accessibility .. Do not compile Accessibility support.
3772 * -accessibility ..... Compile Accessibility support.
3774 $SHN -no-stl ............ Do not compile STL support.
3775 $SHY -stl ............... Compile STL support.
3777 -no-sql-<driver> ... Disable SQL <driver> entirely.
3778 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3780 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3783 Possible values for <driver>:
3784 [ $CFG_SQL_AVAILABLE ]
3786 -system-sqlite ..... Use sqlite from the operating system.
3788 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3789 + -xmlpatterns ....... Build the QtXmlPatterns module.
3790 QtXmlPatterns is built if a decent C++ compiler
3791 is used and exceptions are enabled.
3793 -no-multimedia ..... Do not build the QtMultimedia module.
3794 + -multimedia ........ Build the QtMultimedia module.
3796 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3797 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3799 -no-phonon ......... Do not build the Phonon module.
3800 + -phonon ............ Build the Phonon module.
3801 Phonon is built if a decent C++ compiler is used.
3802 -no-phonon-backend.. Do not build the platform phonon plugin.
3803 + -phonon-backend..... Build the platform phonon plugin.
3805 -no-svg ............ Do not build the SVG module.
3806 + -svg ............... Build the SVG module.
3808 -no-webkit ......... Do not build the WebKit module.
3809 + -webkit ............ Build the WebKit module.
3810 WebKit is built if a decent C++ compiler is used.
3811 -webkit-debug ...... Build the WebKit module with debug symbols.
3813 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3814 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3816 -no-script ......... Do not build the QtScript module.
3817 + -script ............ Build the QtScript module.
3819 -no-scripttools .... Do not build the QtScriptTools module.
3820 + -scripttools ....... Build the QtScriptTools module.
3822 -no-v8 ............. Do not build the V8 module.
3823 + -v8 ................ Build the V8 module.
3825 -no-declarative ..... Do not build the declarative module.
3826 + -declarative ....... Build the declarative module.
3828 -no-declarative-debug ..... Do not build the declarative debugging support.
3829 + -declarative-debug ....... Build the declarative debugging support.
3831 -no-location ....... Do not build the QtLocation module.
3832 + -location .......... Build the QtLocation module.
3834 -platform target ... The operating system and compiler you are building
3837 See the README file for a list of supported
3838 operating systems and compilers.
3841 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3843 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3844 raster - Software rasterizer
3845 opengl - Rendering via OpenGL, Experimental!
3846 openvg - Rendering via OpenVG, Experimental!
3853 -no-mmx ............ Do not compile with use of MMX instructions.
3854 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3855 -no-sse ............ Do not compile with use of SSE instructions.
3856 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3857 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3858 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3859 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3860 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3861 -no-avx ............ Do not compile with use of AVX instructions.
3862 -no-neon ........... Do not compile with use of NEON instructions.
3864 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3865 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3867 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3869 -D <string> ........ Add an explicit define to the preprocessor.
3870 -I <string> ........ Add an explicit include path.
3871 -L <string> ........ Add an explicit library path.
3873 -help, -h .......... Display this information.
3875 Third Party Libraries:
3877 -qt-zlib ........... Use the zlib bundled with Qt.
3878 + -system-zlib ....... Use zlib from the operating system.
3879 See http://www.gzip.org/zlib
3881 -no-gif ............ Do not compile GIF reading support.
3883 -no-libtiff ........ Do not compile TIFF support.
3884 -qt-libtiff ........ Use the libtiff bundled with Qt.
3885 + -system-libtiff .... Use libtiff from the operating system.
3886 See http://www.libtiff.org
3888 -no-libpng ......... Do not compile PNG support.
3889 -qt-libpng ......... Use the libpng bundled with Qt.
3890 + -system-libpng ..... Use libpng from the operating system.
3891 See http://www.libpng.org/pub/png
3893 -no-libmng ......... Do not compile MNG support.
3894 -qt-libmng ......... Use the libmng bundled with Qt.
3895 + -system-libmng ..... Use libmng from the operating system.
3896 See http://www.libmng.com
3898 -no-libjpeg ........ Do not compile JPEG support.
3899 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3900 + -system-libjpeg .... Use libjpeg from the operating system.
3901 See http://www.ijg.org
3903 -no-openssl ........ Do not compile support for OpenSSL.
3904 + -openssl ........... Enable run-time OpenSSL support.
3905 -openssl-linked .... Enabled linked OpenSSL support.
3909 -make <part> ....... Add part to the list of parts to be built at make time.
3910 ($QT_DEFAULT_BUILD_PARTS)
3911 -nomake <part> ..... Exclude part from the list of parts to be built.
3913 -R <string> ........ Add an explicit runtime library path to the Qt
3915 -l <string> ........ Add an explicit library.
3917 -no-rpath .......... Do not use the library install path as a runtime
3919 + -rpath ............. Link Qt libraries and executables using the library
3920 install path as a runtime library path. Equivalent
3921 to -R install_libpath
3923 -continue .......... Continue as far as possible if an error occurs.
3925 -verbose, -v ....... Print verbose information about each step of the
3928 -silent ............ Reduce the build output so that warnings and errors
3929 can be seen more easily.
3931 * -no-optimized-qmake ... Do not build qmake optimized.
3932 -optimized-qmake ...... Build qmake optimized.
3934 -no-gui ............ Don't build the Qt GUI library
3936 $NSN -no-nis ............ Do not compile NIS support.
3937 $NSY -nis ............... Compile NIS support.
3939 $CUN -no-cups ........... Do not compile CUPS support.
3940 $CUY -cups .............. Compile CUPS support.
3941 Requires cups/cups.h and libcups.so.2.
3943 $CIN -no-iconv .......... Do not compile support for iconv(3).
3944 $CIY -iconv ............. Compile support for iconv(3).
3946 $PHN -no-pch ............ Do not use precompiled header support.
3947 $PHY -pch ............... Use precompiled header support.
3949 $DBN -no-dbus ........... Do not compile the QtDBus module.
3950 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3951 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3953 -reduce-relocations ..... Reduce relocations in the libraries through extra
3954 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3955 experimental; needs GNU ld >= 2.18).
3957 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3961 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3962 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3969 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3977 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3981 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3982 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3984 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3985 $XCBY -xcb ............... Compile Xcb support.
3987 $XWN -no-wayland......... Do not compile Wayland support.
3988 $XWY -wayland .......... Compile Wayland support.
3994 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3998 $X2N -no-xinput2......... Do not compile XInput2 support.
3999 $X2Y -xinput2............ Compile XInput2 support.
4005 if [ "$PLATFORM_X11" = "yes" ]; then
4006 if [ "$CFG_SM" = "no" ]; then
4013 if [ "$CFG_XSHAPE" = "no" ]; then
4020 if [ "$CFG_XVIDEO" = "no" ]; then
4027 if [ "$CFG_XINERAMA" = "no" ]; then
4034 if [ "$CFG_FONTCONFIG" = "no" ]; then
4041 if [ "$CFG_XCURSOR" = "no" ]; then
4048 if [ "$CFG_XFIXES" = "no" ]; then
4055 if [ "$CFG_XRANDR" = "no" ]; then
4062 if [ "$CFG_XRENDER" = "no" ]; then
4069 if [ "$CFG_MITSHM" = "no" ]; then
4076 if [ "$CFG_XINPUT" = "no" ]; then
4083 if [ "$CFG_XKB" = "no" ]; then
4090 if [ "$CFG_IM" = "no" ]; then
4101 -no-gtkstyle ....... Do not build the GTK theme integration.
4102 + -gtkstyle .......... Build the GTK theme integration.
4104 * -no-nas-sound ...... Do not compile in NAS sound support.
4105 -system-nas-sound .. Use NAS libaudio from the operating system.
4106 See http://radscan.com/nas.html
4108 -egl ............... Use EGL instead of GLX to manage contexts.
4109 When building for desktop OpenGL, this option will
4110 make Qt use EGL to manage contexts rather than the
4111 GLX, which is the default. Note: For OpenGL ES, EGL
4114 -no-opengl ......... Do not support OpenGL.
4115 + -opengl <api> ...... Enable OpenGL support.
4116 With no parameter, this will auto-detect the "best"
4117 OpenGL API to use. If desktop OpenGL is available, it
4118 will be used. Use desktop or es2 for <api>
4119 to force the use of the Desktop OpenGL or
4120 OpenGL ES 2 APIs instead.
4122 -no-openvg ........ Do not support OpenVG.
4123 + -openvg ........... Enable OpenVG support.
4124 Requires EGL support, typically supplied by an OpenGL
4125 or other graphics implementation.
4127 $SMN -no-sm ............. Do not support X Session Management.
4128 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4130 $SHN -no-xshape ......... Do not compile XShape support.
4131 $SHY -xshape ............ Compile XShape support.
4132 Requires X11/extensions/shape.h.
4134 $XVN -no-xvideo ......... Do not compile XVideo support.
4135 $XVY -xvideo ............ Compile XVideo support.
4136 Requires X11/extensions/Xv.h & Xvlib.h.
4138 $SHN -no-xsync .......... Do not compile XSync support.
4139 $SHY -xsync ............. Compile XSync support.
4140 Requires X11/extensions/sync.h.
4142 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4143 $XAY -xinerama .......... Compile Xinerama support.
4144 Requires X11/extensions/Xinerama.h and libXinerama.
4145 By default, Xinerama support will be compiled if
4146 available and the shared libraries are dynamically
4149 $XCN -no-xcursor ........ Do not compile Xcursor support.
4150 $XCY -xcursor ........... Compile Xcursor support.
4151 Requires X11/Xcursor/Xcursor.h and libXcursor.
4152 By default, Xcursor support will be compiled if
4153 available and the shared libraries are dynamically
4156 $XFN -no-xfixes ......... Do not compile Xfixes support.
4157 $XFY -xfixes ............ Compile Xfixes support.
4158 Requires X11/extensions/Xfixes.h and libXfixes.
4159 By default, Xfixes support will be compiled if
4160 available and the shared libraries are dynamically
4163 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4164 $XZY -xrandr ............ Compile Xrandr support.
4165 Requires X11/extensions/Xrandr.h and libXrandr.
4167 $XRN -no-xrender ........ Do not compile Xrender support.
4168 $XRY -xrender ........... Compile Xrender support.
4169 Requires X11/extensions/Xrender.h and libXrender.
4171 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4172 $XMY -mitshm ............ Compile MIT-SHM support.
4173 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4175 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4176 $FCGY -fontconfig ........ Compile FontConfig support.
4177 Requires fontconfig/fontconfig.h, libfontconfig,
4178 freetype.h and libfreetype.
4180 $XIN -no-xinput ......... Do not compile Xinput support.
4181 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4182 which requires IRIX with wacom.h and libXi or
4183 XFree86 with X11/extensions/XInput.h and libXi.
4185 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4186 $XKY -xkb ............... Compile XKB support.
4191 if [ "$PLATFORM_MAC" = "yes" ]; then
4196 -Fstring ........... Add an explicit framework path.
4197 -fw string ......... Add an explicit framework.
4199 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4201 -carbon .............Build the Carbon version of Qt. 64-bit archs
4202 are not supported by carbon and will be built
4205 * -framework ......... Build Qt as a series of frameworks and
4206 link tools against those frameworks.
4207 -no-framework ...... Do not build Qt as a series of frameworks.
4209 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4210 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4212 -universal ......... Equivalent to -arch "ppc x86"
4214 -arch <arch> ....... Build Qt for <arch>
4215 Example values for <arch>: x86 ppc x86_64 ppc64
4216 Multiple -arch arguments can be specified.
4218 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4219 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4221 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4222 It is only available to Cocoa builds.
4223 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4224 QT_ENABLE_HARFBUZZ environment variable.
4229 if [ "$PLATFORM_QWS" = "yes" ]; then
4231 Qt for Embedded Linux:
4233 -embedded <arch> .... This will enable the embedded build, you must have a
4234 proper license for this switch to work.
4235 Example values for <arch>: arm mips x86 generic
4239 if [ "$PLATFORM_QPA" = "yes" ]; then
4245 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4248 -xplatform target ... The target platform when cross-compiling.
4250 -no-feature-<feature> Do not compile in <feature>.
4251 -feature-<feature> .. Compile in <feature>. The available features
4252 are described in src/corelib/global/qfeatures.txt
4254 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4255 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4257 The floating point format is usually autodetected by configure. Use this
4258 to override the detected value.
4260 -little-endian ...... Target platform is little endian (LSB first).
4261 -big-endian ......... Target platform is big endian (MSB first).
4263 -host-little-endian . Host platform is little endian (LSB first).
4264 -host-big-endian .... Host platform is big endian (MSB first).
4266 You only need to specify the endianness when
4267 cross-compiling, otherwise the host
4268 endianness will be used.
4270 -no-freetype ........ Do not compile in Freetype2 support.
4271 -qt-freetype ........ Use the libfreetype bundled with Qt.
4272 * -system-freetype .... Use libfreetype from the operating system.
4273 See http://www.freetype.org/
4275 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4276 default ($CFG_QCONFIG).
4278 -no-opengl .......... Do not support OpenGL.
4279 -opengl <api> ....... Enable OpenGL ES support
4280 With no parameter, this will attempt to auto-detect
4281 OpenGL ES 2, or regular desktop OpenGL.
4282 Use es2 for <api> to override auto-detection.
4286 if [ "$PLATFORM_QWS" = "yes" ]; then
4289 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4290 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4292 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4293 by default all available decorations are on.
4294 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4295 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4296 linked to at run time.
4297 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4298 -no-decoration-<style> ....Disable decoration <style> entirely.
4299 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4301 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4302 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4303 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4304 linked to at run time.
4305 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4306 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4307 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4309 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4310 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4312 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4314 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4316 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4317 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4319 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4320 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4321 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4323 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4324 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4325 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4327 -iwmmxt ............ Compile using the iWMMXt instruction set
4328 (available on some XScale CPUs).
4332 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4333 if [ "$CFG_GLIB" = "no" ]; then
4341 $GBN -no-glib ........... Do not compile Glib support.
4342 $GBY -glib .............. Compile Glib support.
4347 [ "x$ERROR" = "xyes" ] && exit 1
4352 # -----------------------------------------------------------------------------
4353 # LICENSING, INTERACTIVE PART
4354 # -----------------------------------------------------------------------------
4356 if [ "$PLATFORM_QWS" = "yes" ]; then
4357 Platform="Qt for Embedded Linux"
4358 elif [ "$PLATFORM_QPA" = "yes" ]; then
4359 Platform="Qt Lighthouse"
4360 elif [ "$PLATFORM_MAC" = "yes" ]; then
4361 Platform="Qt for Mac OS X"
4362 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4363 Platform="Qt for Windows"
4364 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4366 Platform="Qt for Linux/X11"
4370 echo "This is the $Platform ${EditionString} Edition."
4373 if [ "$Edition" = "NokiaInternalBuild" ]; then
4374 echo "Detected -nokia-developer option"
4375 echo "Nokia employees and agents are allowed to use this software under"
4376 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4377 elif [ "$Edition" = "OpenSource" ]; then
4379 echo "You are licensed to use this software under the terms of"
4380 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4381 if [ -f "$relpath/LICENSE.GPL3" ]; then
4382 echo "You are also licensed to use this software under the terms of"
4383 echo "the GNU General Public License (GPL) versions 3."
4389 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4390 echo "You have already accepted the terms of the $LicenseType license."
4393 if [ -f "$relpath/LICENSE.GPL3" ]; then
4394 echo "Type '3' to view the GNU General Public License version 3."
4396 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4397 echo "Type 'yes' to accept this license offer."
4398 echo "Type 'no' to decline this license offer."
4400 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4404 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4406 elif [ "$acceptance" = "no" ]; then
4407 echo "You are not licensed to use this software."
4410 elif [ "$acceptance" = "3" ]; then
4411 more "$relpath/LICENSE.GPL3"
4412 elif [ "$acceptance" = "L" ]; then
4413 more "$relpath/LICENSE.LGPL"
4416 elif [ "$Edition" = "Preview" ]; then
4417 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4420 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4421 echo "You have already accepted the terms of the $LicenseType license."
4424 echo "You are licensed to use this software under the terms of"
4425 echo "the $TheLicense"
4427 echo "Type '?' to read the Preview License."
4428 echo "Type 'yes' to accept this license offer."
4429 echo "Type 'no' to decline this license offer."
4431 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4435 if [ "$acceptance" = "yes" ]; then
4437 elif [ "$acceptance" = "no" ] ;then
4438 echo "You are not licensed to use this software."
4441 elif [ "$acceptance" = "?" ]; then
4442 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4445 elif [ "$Edition" != "OpenSource" ]; then
4446 if [ -n "$ExpiryDate" ]; then
4447 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4448 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4449 Today=`date +%Y%m%d`
4450 if [ "$Today" -gt "$ExpiryDate" ]; then
4451 case "$LicenseType" in
4452 Commercial|Academic|Educational)
4453 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4455 echo "NOTICE NOTICE NOTICE NOTICE"
4457 echo " Your support and upgrade period has expired."
4459 echo " You are no longer licensed to use this version of Qt."
4460 echo " Please contact qt-info@nokia.com to renew your support"
4461 echo " and upgrades for this license."
4463 echo "NOTICE NOTICE NOTICE NOTICE"
4468 echo "WARNING WARNING WARNING WARNING"
4470 echo " Your support and upgrade period has expired."
4472 echo " You may continue to use your last licensed release"
4473 echo " of Qt under the terms of your existing license"
4474 echo " agreement. But you are not entitled to technical"
4475 echo " support, nor are you entitled to use any more recent"
4476 echo " Qt releases."
4478 echo " Please contact qt-info@nokia.com to renew your"
4479 echo " support and upgrades for this license."
4481 echo "WARNING WARNING WARNING WARNING"
4488 echo "NOTICE NOTICE NOTICE NOTICE"
4490 echo " Your Evaluation license has expired."
4492 echo " You are no longer licensed to use this software. Please"
4493 echo " contact qt-info@nokia.com to purchase license, or install"
4494 echo " the Qt Open Source Edition if you intend to develop free"
4497 echo "NOTICE NOTICE NOTICE NOTICE"
4504 TheLicense=`head -n 1 "$outpath/LICENSE"`
4506 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4507 echo "You have already accepted the terms of the $TheLicense."
4510 echo "You are licensed to use this software under the terms of"
4511 echo "the $TheLicense."
4513 echo "Type '?' to view the $TheLicense."
4514 echo "Type 'yes' to accept this license offer."
4515 echo "Type 'no' to decline this license offer."
4517 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4521 if [ "$acceptance" = "yes" ]; then
4523 elif [ "$acceptance" = "no" ]; then
4524 echo "You are not licensed to use this software."
4527 else [ "$acceptance" = "?" ]
4528 more "$outpath/LICENSE"
4533 # this should be moved somewhere else
4536 AIX_VERSION=`uname -v`
4537 if [ "$AIX_VERSION" -lt "5" ]; then
4538 QMakeVar add QMAKE_LIBS_X11 -lbind
4545 #-------------------------------------------------------------------------------
4546 # generate qconfig.cpp
4547 #-------------------------------------------------------------------------------
4548 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4550 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4551 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4552 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4553 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4554 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4555 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4556 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4557 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4558 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4559 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4560 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4561 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4562 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4563 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4565 TODAY=`date +%Y-%m-%d`
4566 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4568 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4569 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4571 /* Installation date */
4572 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4576 if [ ! -z "$QT_HOST_PREFIX" ]; then
4577 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4578 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4579 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4580 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4581 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4582 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4583 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4584 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4585 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4586 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4587 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4588 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4590 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4592 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4593 /* Installation Info */
4594 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4595 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4596 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4597 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4598 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4599 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4600 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4601 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4602 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4603 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4604 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4605 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4606 #else // QT_BOOTSTRAPPED
4610 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4611 /* Installation Info */
4612 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4613 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4614 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4615 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4616 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4617 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4618 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4619 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4620 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4621 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4622 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4623 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4626 if [ ! -z "$QT_HOST_PREFIX" ]; then
4627 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4628 #endif // QT_BOOTSTRAPPED
4633 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4634 /* strlen( "qt_lcnsxxxx" ) == 12 */
4635 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4636 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4637 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4638 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4639 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4640 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4641 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4642 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4643 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4644 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4645 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4646 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4647 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4648 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4651 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4652 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4653 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4655 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4656 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4657 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4660 # -----------------------------------------------------------------------------
4661 if [ "$LicenseType" = "Evaluation" ]; then
4662 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4663 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4664 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4667 if [ -n "$EVALKEY" ]; then
4668 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4669 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4670 /* Evaluation license key */
4671 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4673 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4677 # -----------------------------------------------------------------------------
4679 # -----------------------------------------------------------------------------
4682 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4684 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4685 if [ "$OPT_SHADOW" = "yes" ]; then
4686 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4687 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4688 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4693 # $2: optional transformation
4694 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4695 # is where the resulting variable is written to
4696 # Assumes that the optional transformation produces the same variable name for each hit
4697 setBootstrapVariable()
4699 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4705 valStart = index($0, "=") + 1
4708 if (substr($0, valStart - 2, 1) == "+") {
4712 variable = substr($0, 0, valStart - 2 - append)
4713 value = substr($0, valStart)
4714 gsub("[ \t]+", "", variable)
4715 gsub("^[ \t]+", "", value)
4716 gsub("[ \t]+$", "", value)
4718 if (append == 1 && length(combinedValue) > 0) {
4719 combinedValue = combinedValue " " value
4721 combinedValue = value
4725 if (length(combinedValue) > 0) {
4726 printf "%s = %s\n", variable, combinedValue
4732 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4733 echo "Creating qmake. Please wait..."
4736 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4737 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4738 if [ -f "$QCONFIG_H" ]; then
4739 OLD_QCONFIG_H=$QCONFIG_H
4740 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4743 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4744 # when building qmake, we use #defines for the install paths,
4745 # however they are real functions in the library
4746 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4747 mkdir -p "$outpath/src/corelib/global"
4748 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4749 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4752 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4754 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4755 rm -rf mkspecs/default
4756 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4758 for mkfile in GNUmakefile Makefile; do
4761 in_mkfile="${mkfile}.in"
4762 if [ "$mkfile" = "Makefile" ]; then
4763 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4764 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4766 in_mkfile="${mkfile}.unix"
4768 in_mkfile="$relpath/qmake/$in_mkfile"
4769 mkfile="$outpath/qmake/$mkfile"
4770 if [ -f "$mkfile" ]; then
4771 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4774 [ -f "$in_mkfile" ] || continue
4776 echo "########################################################################" > "$mkfile"
4777 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4778 echo "########################################################################" >> "$mkfile"
4781 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4782 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4783 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4785 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4786 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4789 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4790 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4791 if [ "$CFG_SILENT" = "yes" ]; then
4792 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4793 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4795 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4796 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4798 setBootstrapVariable QMAKE_CFLAGS
4799 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4800 setBootstrapVariable QMAKE_LFLAGS
4802 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4803 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4804 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4806 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4807 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4808 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4809 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4810 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4811 elif [ "$CFG_DEBUG" = "yes" ]; then
4812 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4813 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4814 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4815 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4818 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4819 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4820 for rpath in $RPATH_FLAGS; do
4821 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4824 if [ "$BUILD_ON_MAC" = "yes" ]; then
4825 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4826 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4827 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4828 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4829 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4830 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4831 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4832 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4833 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4834 X86_CFLAGS="-arch i386"
4835 X86_LFLAGS="-arch i386"
4836 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4837 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4838 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4840 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4841 PPC_CFLAGS="-arch ppc"
4842 PPC_LFLAGS="-arch ppc"
4843 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4844 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4845 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4847 if [ '!' -z "$CFG_SDK" ]; then
4848 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4849 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4850 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4851 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4852 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4855 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4856 if [ '!' -z "$D_FLAGS" ]; then
4857 for DEF in $D_FLAGS; do
4858 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4861 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4862 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4863 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4864 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4866 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4867 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4868 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4869 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4870 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4871 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4872 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4873 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4874 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4875 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4877 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4878 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4879 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4880 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4885 QMAKE_BUILD_ERROR=no
4886 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4887 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4888 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4889 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4892 #-------------------------------------------------------------------------------
4893 # tests that need qmake
4894 #-------------------------------------------------------------------------------
4896 # detect availability of float math.h functions
4897 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4898 CFG_USE_FLOATMATH=yes
4900 CFG_USE_FLOATMATH=no
4903 # detect mmx support
4904 if [ "${CFG_MMX}" = "auto" ]; then
4905 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4912 # detect 3dnow support
4913 if [ "${CFG_3DNOW}" = "auto" ]; then
4914 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4921 # detect sse support
4922 if [ "${CFG_SSE}" = "auto" ]; then
4923 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4930 # detect sse2 support
4931 if [ "${CFG_SSE2}" = "auto" ]; then
4932 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4939 # detect sse3 support
4940 if [ "${CFG_SSE3}" = "auto" ]; then
4941 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4948 # detect ssse3 support
4949 if [ "${CFG_SSSE3}" = "auto" ]; then
4950 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4957 # detect sse4.1 support
4958 if [ "${CFG_SSE4_1}" = "auto" ]; then
4959 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
4966 # detect sse4.2 support
4967 if [ "${CFG_SSE4_2}" = "auto" ]; then
4968 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
4975 # detect avx support
4976 if [ "${CFG_AVX}" = "auto" ]; then
4977 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4984 # check iWMMXt support
4985 if [ "$CFG_IWMMXT" = "yes" ]; then
4986 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4987 if [ $? != "0" ]; then
4988 echo "The iWMMXt functionality test failed!"
4989 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4994 # detect neon support
4995 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4996 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
5003 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5006 if [ "$CFG_ZLIB" = "no" ]; then
5007 # Note: Qt no longer support builds without zlib
5008 # So we force a "no" to be "auto" here.
5009 # If you REALLY really need no zlib support, you can still disable
5010 # it by doing the following:
5011 # add "no-zlib" to mkspecs/qconfig.pri
5012 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5014 # There's no guarantee that Qt will build under those conditions
5019 if [ "$CFG_ZLIB" = "auto" ]; then
5020 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
5027 if [ "$CFG_LARGEFILE" = "auto" ]; then
5028 #Large files should be enabled for all Linux systems
5032 # detect how jpeg should be built
5033 if [ "$CFG_JPEG" = "auto" ]; then
5034 if [ "$CFG_SHARED" = "yes" ]; then
5041 if [ "$CFG_LIBJPEG" = "auto" ]; then
5042 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
5049 # detect how gif should be built
5050 if [ "$CFG_GIF" = "auto" ]; then
5051 if [ "$CFG_SHARED" = "yes" ]; then
5058 # detect how tiff should be built
5059 if [ "$CFG_TIFF" = "auto" ]; then
5060 if [ "$CFG_SHARED" = "yes" ]; then
5068 if [ "$CFG_LIBTIFF" = "auto" ]; then
5069 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
5076 # detect how mng should be built
5077 if [ "$CFG_MNG" = "auto" ]; then
5078 if [ "$CFG_SHARED" = "yes" ]; then
5085 if [ "$CFG_LIBMNG" = "auto" ]; then
5086 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libmng "libmng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5094 if [ "$CFG_LIBPNG" = "auto" ]; then
5095 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
5102 # detect accessibility
5103 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5104 CFG_ACCESSIBILITY=yes
5107 # auto-detect SQL-modules support
5108 for _SQLDR in $CFG_SQL_AVAILABLE; do
5111 if [ "$CFG_SQL_mysql" != "no" ]; then
5112 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5113 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5114 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5115 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5116 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5117 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5118 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5120 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5121 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5122 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5123 echo " You need MySql 4 or higher."
5124 echo " If you believe this message is in error you may use the continue"
5125 echo " switch (-continue) to $0 to continue."
5130 QT_LFLAGS_MYSQL_R=""
5134 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
5135 QMakeVar add CONFIG use_libmysqlclient_r
5136 if [ "$CFG_SQL_mysql" = "auto" ]; then
5137 CFG_SQL_mysql=plugin
5139 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5140 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
5141 if [ "$CFG_SQL_mysql" = "auto" ]; then
5142 CFG_SQL_mysql=plugin
5145 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5146 echo "MySQL support cannot be enabled due to functionality tests!"
5147 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5148 echo " If you believe this message is in error you may use the continue"
5149 echo " switch (-continue) to $0 to continue."
5154 QT_LFLAGS_MYSQL_R=""
5162 if [ "$CFG_SQL_psql" != "no" ]; then
5163 # Be careful not to use native pg_config when cross building.
5164 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5165 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5166 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5168 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5169 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5170 # But, respect PSQL_LIBS if set
5171 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5172 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
5173 if [ "$CFG_SQL_psql" = "auto" ]; then
5177 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5178 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5179 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5180 echo " If you believe this message is in error you may use the continue"
5181 echo " switch (-continue) to $0 to continue."
5192 if [ "$CFG_SQL_odbc" != "no" ]; then
5193 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
5194 if [ "$CFG_SQL_odbc" = "auto" ]; then
5198 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
5199 QT_LFLAGS_ODBC="-liodbc"
5200 if [ "$CFG_SQL_odbc" = "auto" ]; then
5204 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5205 echo "ODBC support cannot be enabled due to functionality tests!"
5206 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5207 echo " If you believe this message is in error you may use the continue"
5208 echo " switch (-continue) to $0 to continue."
5218 if [ "$CFG_SQL_oci" != "no" ]; then
5219 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
5220 if [ "$CFG_SQL_oci" = "auto" ]; then
5224 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5225 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5226 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5227 echo " If you believe this message is in error you may use the continue"
5228 echo " switch (-continue) to $0 to continue."
5237 if [ "$CFG_SQL_tds" != "no" ]; then
5238 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5239 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5240 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
5241 if [ "$CFG_SQL_tds" = "auto" ]; then
5245 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5246 echo "TDS support cannot be enabled due to functionality tests!"
5247 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5248 echo " If you believe this message is in error you may use the continue"
5249 echo " switch (-continue) to $0 to continue."
5258 if [ "$CFG_SQL_db2" != "no" ]; then
5259 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
5260 if [ "$CFG_SQL_db2" = "auto" ]; then
5264 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5265 echo "ODBC support cannot be enabled due to functionality tests!"
5266 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5267 echo " If you believe this message is in error you may use the continue"
5268 echo " switch (-continue) to $0 to continue."
5277 if [ "$CFG_SQL_ibase" != "no" ]; then
5278 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
5279 if [ "$CFG_SQL_ibase" = "auto" ]; then
5280 CFG_SQL_ibase=plugin
5283 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5284 echo "InterBase support cannot be enabled due to functionality tests!"
5285 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5286 echo " If you believe this message is in error you may use the continue"
5287 echo " switch (-continue) to $0 to continue."
5296 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5297 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
5298 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5299 CFG_SQL_sqlite2=plugin
5302 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5303 echo "SQLite2 support cannot be enabled due to functionality tests!"
5304 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5305 echo " If you believe this message is in error you may use the continue"
5306 echo " switch (-continue) to $0 to continue."
5315 if [ "$CFG_SQL_sqlite" != "no" ]; then
5316 SQLITE_AUTODETECT_FAILED="no"
5317 if [ "$CFG_SQLITE" = "system" ]; then
5318 if [ -n "$PKG_CONFIG" ]; then
5319 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5320 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5322 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
5323 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5324 CFG_SQL_sqlite=plugin
5326 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5328 SQLITE_AUTODETECT_FAILED="yes"
5331 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5332 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5333 CFG_SQL_sqlite=plugin
5336 SQLITE_AUTODETECT_FAILED="yes"
5340 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5341 echo "SQLite support cannot be enabled due to functionality tests!"
5342 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5343 echo " If you believe this message is in error you may use the continue"
5344 echo " switch (-continue) to $0 to continue."
5350 if [ "$OPT_VERBOSE" = "yes" ]; then
5351 echo "unknown SQL driver: $_SQLDR"
5357 # auto-detect NIS support
5358 if [ "$CFG_NIS" != "no" ]; then
5359 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
5362 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5363 echo "NIS support cannot be enabled due to functionality tests!"
5364 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5365 echo " If you believe this message is in error you may use the continue"
5366 echo " switch (-continue) to $0 to continue."
5374 # auto-detect CUPS support
5375 if [ "$CFG_CUPS" != "no" ]; then
5376 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
5379 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5380 echo "Cups support cannot be enabled due to functionality tests!"
5381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5382 echo " If you believe this message is in error you may use the continue"
5383 echo " switch (-continue) to $0 to continue."
5391 # auto-detect iconv(3) support
5392 if [ "$CFG_ICONV" != "no" ]; then
5393 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5395 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
5397 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
5399 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
5402 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5403 echo "Iconv support cannot be enabled due to functionality tests!"
5404 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5405 echo " If you believe this message is in error you may use the continue"
5406 echo " switch (-continue) to $0 to continue."
5414 # auto-detect libdbus-1 support
5415 if [ "$CFG_DBUS" != "no" ]; then
5416 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5417 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5418 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5420 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
5421 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5422 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5423 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5425 if [ "$CFG_DBUS" = "auto" ]; then
5427 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5428 # CFG_DBUS is "yes" or "linked" here
5430 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5431 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5432 echo " If you believe this message is in error you may use the continue"
5433 echo " switch (-continue) to $0 to continue."
5439 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5440 CFG_MULTIMEDIA="$CFG_GUI"
5443 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5444 echo "QtMultimedia requested, but it can't be built without QtGui"
5448 # Generate a CRC of the namespace for using in constants for the Carbon port.
5449 # This should mean that you really *can* load two Qt's and have our custom
5450 # Carbon events work.
5451 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5452 QT_NAMESPACE_MAC_CRC=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS $I_FLAGS $l_FLAGS`
5455 # X11/QWS/Lighthouse
5456 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5458 # auto-detect Glib support
5459 if [ "$CFG_GLIB" != "no" ]; then
5460 if [ -n "$PKG_CONFIG" ]; then
5461 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5462 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5464 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
5466 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5467 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5469 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5470 echo "Glib support cannot be enabled due to functionality tests!"
5471 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5472 echo " If you believe this message is in error you may use the continue"
5473 echo " switch (-continue) to $0 to continue."
5481 if [ "$CFG_GUI" = "no" ]; then
5482 if [ "$CFG_PHONON" = "auto" ]; then
5485 if [ "$CFG_PHONON" != "no" ]; then
5486 echo "Phonon enabled, but GUI disabled."
5487 echo " You might need to either enable the GUI or disable Phonon"
5492 # Auto-detect GStreamer support (needed for Phonon)
5493 if [ "$CFG_PHONON" != "no" ]; then
5494 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5495 if [ -n "$PKG_CONFIG" ]; then
5496 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5497 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5499 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
5501 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5502 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5504 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5505 echo "Gstreamer support cannot be enabled due to functionality tests!"
5506 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5507 echo " If you believe this message is in error you may use the continue"
5508 echo " switch (-continue) to $0 to continue."
5514 elif [ "$CFG_GLIB" = "no" ]; then
5521 if [ "$CFG_PHONON" != "no" ]; then
5522 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5523 if [ "$CFG_GSTREAMER" = "yes" ]; then
5526 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5527 echo "Phonon support cannot be enabled due to functionality tests!"
5528 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5529 echo " If you believe this message is in error you may use the continue"
5530 echo " switch (-continue) to $0 to continue."
5541 # auto-detect icd support
5542 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5543 if [ -n "$PKG_CONFIG" ]; then
5544 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5545 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5547 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icd "ICD" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_CONNSETTINGS $QT_LIBS_CONNSETTINGS; then
5548 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5549 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5550 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5552 if [ "$CFG_ICD" = "auto" ]; then
5554 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5557 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5558 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5559 echo " If you believe this message is in error you may use the continue"
5560 echo " switch (-continue) to $0 to continue."
5564 elif [ "$CFG_GLIB" = "no" ]; then
5568 # auto-detect libicu support
5569 if [ "$CFG_ICU" != "no" ]; then
5570 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5571 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5573 if [ "$CFG_ICU" = "auto" ]; then
5575 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5578 echo "The ICU library support cannot be enabled."
5579 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5580 echo " If you believe this message is in error you may use the continue"
5581 echo " switch (-continue) to $0 to continue."
5587 # Auto-detect PulseAudio support
5588 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5589 if [ -n "$PKG_CONFIG" ]; then
5590 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5591 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5593 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
5595 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5596 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5598 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5599 echo "PulseAudio support cannot be enabled due to functionality tests!"
5600 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5601 echo " If you believe this message is in error you may use the continue"
5602 echo " switch (-continue) to $0 to continue."
5609 fi # X11/QWS/Lighthouse
5612 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5613 x11tests="$relpath/config.tests/x11"
5616 # work around broken X11 headers when using GCC 2.95 or later
5618 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5619 if [ $NOTYPE = "yes" ]; then
5620 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5621 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5624 # Check we actually have X11 :-)
5625 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5626 if [ $? != "0" ]; then
5627 echo "Basic XLib functionality test failed!"
5628 echo " You might need to modify the include and library search paths by editing"
5629 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5635 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5636 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5637 if [ "$CFG_GUI" = "no" ]; then
5638 if [ "$CFG_OPENGL" = "auto" ]; then
5641 if [ "$CFG_OPENGL" != "no" ]; then
5642 echo "OpenGL enabled, but GUI disabled."
5643 echo " You might need to either enable the GUI or disable OpenGL"
5647 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5648 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
5650 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
5652 if [ "$CFG_EGL" = "no" ]; then
5656 if [ "$CFG_OPENGL" = "yes" ]; then
5657 echo "All the OpenGL functionality tests failed!"
5658 echo " You might need to modify the include and library search paths by editing"
5659 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5660 echo " ${XQMAKESPEC}."
5667 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5668 if [ "$CFG_OPENGL" = "desktop" ]; then
5669 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5670 if [ $? != "0" ]; then
5671 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5678 elif [ "$CFG_OPENGL" = "es2" ]; then
5680 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5681 if [ $? != "0" ]; then
5682 echo "The OpenGL ES 2.0 functionality test failed!"
5683 echo " You might need to modify the include and library search paths by editing"
5684 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5685 echo " ${XQMAKESPEC}."
5688 elif [ "$CFG_OPENGL" = "desktop" ]; then
5689 # Desktop OpenGL support
5690 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5691 if [ $? != "0" ]; then
5692 echo "The OpenGL functionality test failed!"
5693 echo " You might need to modify the include and library search paths by editing"
5694 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5695 echo " ${XQMAKESPEC}."
5700 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5701 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5702 if [ $? != "0" ]; then
5703 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5710 fi # X11/MINGW OpenGL
5713 if [ "$PLATFORM_X11" = "yes" ]; then
5714 # auto-detect Xcursor support
5715 if [ "$CFG_XCURSOR" != "no" ]; then
5716 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
5717 if [ "$CFG_XCURSOR" != "runtime" ]; then
5721 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5722 echo "Xcursor support cannot be enabled due to functionality tests!"
5723 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5724 echo " If you believe this message is in error you may use the continue"
5725 echo " switch (-continue) to $0 to continue."
5733 # auto-detect Xfixes support
5734 if [ "$CFG_XFIXES" != "no" ]; then
5735 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5736 if [ "$CFG_XFIXES" != "runtime" ]; then
5740 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5741 echo "Xfixes support cannot be enabled due to functionality tests!"
5742 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5743 echo " If you believe this message is in error you may use the continue"
5744 echo " switch (-continue) to $0 to continue."
5752 # auto-detect Xrandr support (resize and rotate extension)
5753 if [ "$CFG_XRANDR" != "no" ]; then
5754 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
5755 if [ "$CFG_XRANDR" != "runtime" ]; then
5759 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5760 echo "Xrandr support cannot be enabled due to functionality tests!"
5761 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5762 echo " If you believe this message is in error you may use the continue"
5763 echo " switch (-continue) to $0 to continue."
5771 # auto-detect Xrender support
5772 if [ "$CFG_XRENDER" != "no" ]; then
5773 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
5776 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5777 echo "Xrender support cannot be enabled due to functionality tests!"
5778 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5779 echo " If you believe this message is in error you may use the continue"
5780 echo " switch (-continue) to $0 to continue."
5788 # Additional check to decide if WebKit support will be included
5789 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5790 echo "Warning: -no-xrender will disable the QtWebkit module."
5794 # auto-detect MIT-SHM support
5795 if [ "$CFG_MITSHM" != "no" ]; then
5796 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
5799 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5800 echo "MITSHM support cannot be enabled due to functionality tests!"
5801 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5802 echo " If you believe this message is in error you may use the continue"
5803 echo " switch (-continue) to $0 to continue."
5811 # auto-detect FontConfig support
5812 if [ "$CFG_FONTCONFIG" != "no" ]; then
5813 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5814 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5815 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5817 QT_CFLAGS_FONTCONFIG=
5818 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5820 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
5822 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5823 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5824 CFG_LIBFREETYPE=system
5826 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5827 echo "FontConfig support cannot be enabled due to functionality tests!"
5828 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5829 echo " If you believe this message is in error you may use the continue"
5830 echo " switch (-continue) to $0 to continue."
5838 # auto-detect Session Management support
5839 if [ "$CFG_SM" = "auto" ]; then
5840 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
5843 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5844 echo "Session Management support cannot be enabled due to functionality tests!"
5845 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5846 echo " If you believe this message is in error you may use the continue"
5847 echo " switch (-continue) to $0 to continue."
5855 # auto-detect SHAPE support
5856 if [ "$CFG_XSHAPE" != "no" ]; then
5857 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
5860 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5861 echo "XShape support cannot be enabled due to functionality tests!"
5862 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5863 echo " If you believe this message is in error you may use the continue"
5864 echo " switch (-continue) to $0 to continue."
5872 # auto-detect XVideo support
5873 if [ "$CFG_XVIDEO" != "no" ]; then
5874 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
5877 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5878 echo "XVideo support cannot be enabled due to functionality tests!"
5879 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5880 echo " If you believe this message is in error you may use the continue"
5881 echo " switch (-continue) to $0 to continue."
5889 # auto-detect XSync support
5890 if [ "$CFG_XSYNC" != "no" ]; then
5891 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
5894 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5895 echo "XSync support cannot be enabled due to functionality tests!"
5896 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5897 echo " If you believe this message is in error you may use the continue"
5898 echo " switch (-continue) to $0 to continue."
5906 # auto-detect Xinerama support
5907 if [ "$CFG_XINERAMA" != "no" ]; then
5908 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
5909 if [ "$CFG_XINERAMA" != "runtime" ]; then
5913 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5914 echo "Xinerama support cannot be enabled due to functionality tests!"
5915 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5916 echo " If you believe this message is in error you may use the continue"
5917 echo " switch (-continue) to $0 to continue."
5925 # auto-detect Xinput support
5926 if [ "$CFG_XINPUT" != "no" ]; then
5927 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
5928 if [ "$CFG_XINPUT" != "runtime" ]; then
5932 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5933 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5934 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5935 echo " If you believe this message is in error you may use the continue"
5936 echo " switch (-continue) to $0 to continue."
5944 # auto-detect XKB support
5945 if [ "$CFG_XKB" != "no" ]; then
5946 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
5949 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5950 echo "XKB support cannot be enabled due to functionality tests!"
5951 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5952 echo " If you believe this message is in error you may use the continue"
5953 echo " switch (-continue) to $0 to continue."
5961 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5962 if [ -n "$PKG_CONFIG" ]; then
5963 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5964 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5966 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5968 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5969 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5971 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5972 echo "Gtk theme support cannot be enabled due to functionality tests!"
5973 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5974 echo " If you believe this message is in error you may use the continue"
5975 echo " switch (-continue) to $0 to continue."
5981 elif [ "$CFG_GLIB" = "no" ]; then
5987 if [ "$PLATFORM_MAC" = "yes" ]; then
5988 if [ "$CFG_PHONON" != "no" ]; then
5989 # Always enable Phonon (unless it was explicitly disabled)
5993 if [ "$CFG_COREWLAN" = "auto" ]; then
5994 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
6003 if [ "$PLATFORM_QPA" = "yes" ]; then
6004 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6005 if [ "$CFG_ARCH" = "macosx" ]; then
6007 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6008 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
6010 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
6013 if [ "$CFG_OPENGL" = "yes" ]; then
6014 echo "All the OpenGL functionality tests failed!"
6015 echo " You might need to modify the include and library search paths by editing"
6016 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6017 echo " ${XQMAKESPEC}."
6022 elif [ "$CFG_OPENGL" = "es2" ]; then
6024 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6025 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6026 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6027 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6028 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6029 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6030 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6031 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6034 "$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
6035 if [ $? != "0" ]; then
6036 echo "The OpenGL ES 2.0 functionality test failed!"
6037 echo " You might need to modify the include and library search paths by editing"
6038 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6039 echo " ${XQMAKESPEC}."
6042 elif [ "$CFG_OPENGL" = "desktop" ]; then
6043 # Desktop OpenGL support
6044 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6045 if [ $? != "0" ]; then
6046 echo "The OpenGL functionality test failed!"
6047 echo " You might need to modify the include and library search paths by editing"
6048 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6049 echo " ${XQMAKESPEC}."
6054 # auto-detect FontConfig support
6055 if [ "$CFG_FONTCONFIG" != "no" ]; then
6056 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6057 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6058 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6060 QT_CFLAGS_FONTCONFIG=
6061 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6063 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
6064 QT_CONFIG="$QT_CONFIG fontconfig"
6065 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6066 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6067 CFG_LIBFREETYPE=system
6072 # Save these for a check later
6073 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6074 ORIG_CFG_XCB="$CFG_XCB"
6076 if [ "$CFG_WAYLAND" != "no" ]; then
6077 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6078 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6079 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6080 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6081 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6083 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
6085 QT_CONFIG="$QT_CONFIG wayland"
6086 elif [ "$CFG_WAYLAND" = "yes" ]; then
6087 echo "The Wayland functionality test failed!"
6091 QMakeVar add DEFINES QT_NO_WAYLAND
6095 # Check we actually have X11 :-)
6096 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
6097 QT_CONFIG="$QT_CONFIG xlib"
6100 if [ "$CFG_XCB" != "no" ]; then
6101 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6103 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
6104 QT_CONFIG="$QT_CONFIG xcb-render"
6107 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
6109 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6112 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
6113 QT_CONFIG="$QT_CONFIG xcb-xlib"
6116 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6117 # auto-detect XInput2/Xinput support
6118 if [ "$CFG_XINPUT2" != "no" ]; then
6119 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
6123 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6124 echo "XInput2 support cannot be enabled due to functionality tests!"
6125 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6126 echo " If you believe this message is in error you may use the continue"
6127 echo " switch (-continue) to $0 to continue."
6136 if [ "$CFG_XCB" = "yes" ]; then
6137 echo "The XCB test failed!"
6138 echo " You might need to install dependency packages."
6139 echo " See src/plugins/platforms/xcb/README."
6143 QMakeVar add DEFINES QT_NO_XCB
6147 # Detect libxkbcommon
6148 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6149 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6150 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6151 if [ "$CFG_WAYLAND" = "yes" ]; then
6152 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6153 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6155 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6156 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6158 if [ "$CFG_WAYLAND" = "yes" ]; then
6159 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6161 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6164 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6165 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6166 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6167 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6168 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6169 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6170 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6173 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6174 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6175 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6176 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6179 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
6180 QT_CONFIG="$QT_CONFIG coreservices"
6182 QMakeVar add DEFINES QT_NO_CORESERVICES
6185 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6186 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6187 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6188 echo "No QPA platform plugin enabled!"
6189 echo " If you really want to build without a QPA platform plugin you must pass"
6190 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6191 echo " cannot run GUI applications."
6201 if [ "$PLATFORM_QWS" = "yes" ]; then
6203 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6204 if [ "$CFG_GUI" = "no" ]; then
6205 if [ "$CFG_OPENGL" = "auto" ]; then
6208 if [ "$CFG_OPENGL" != "no" ]; then
6209 echo "OpenGL enabled, but GUI disabled."
6210 echo " You might need to either enable the GUI or disable OpenGL"
6214 if [ "$CFG_OPENGL" = "yes" ]; then
6216 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
6219 elif [ "$CFG_OPENGL" = "es2" ]; then
6221 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6222 if [ $? != "0" ]; then
6223 echo "The OpenGL ES 2.0 functionality test failed!"
6224 echo " You might need to modify the include and library search paths by editing"
6225 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6226 echo " ${XQMAKESPEC}."
6230 elif [ "$CFG_OPENGL" = "desktop" ]; then
6231 # Desktop OpenGL support
6232 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6237 if [ "$PLATFORM_QWS" = "yes" ]; then
6240 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6241 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6242 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6243 if [ $? != "0" ]; then
6244 echo "The Ahi screen driver functionality test failed!"
6245 echo " You might need to modify the include and library search paths by editing"
6246 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6247 echo " ${XQMAKESPEC}."
6252 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6253 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6254 if [ $? != "0" ]; then
6255 echo "The SVGAlib screen driver functionality test failed!"
6256 echo " You might need to modify the include and library search paths by editing"
6257 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6258 echo " ${XQMAKESPEC}."
6263 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6264 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6265 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6266 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6267 elif directfb-config --version >/dev/null 2>&1; then
6268 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6269 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6272 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6273 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6274 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6275 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6278 "$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
6279 if [ $? != "0" ]; then
6280 echo "The DirectFB screen driver functionality test failed!"
6281 echo " You might need to modify the include and library search paths by editing"
6282 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6283 echo " ${XQMAKESPEC}."
6291 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6292 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6293 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6294 if [ $? != "0" ]; then
6295 echo "The tslib functionality test failed!"
6296 echo " You might need to modify the include and library search paths by editing"
6297 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6298 echo " ${XQMAKESPEC}."
6307 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6308 if [ $? != "0" ]; then
6309 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6316 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6317 if [ "$CFG_EGL" != "no" ]; then
6318 # detect EGL support
6319 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
6320 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6325 if [ "$EGL_VARIANT" = "none" ]; then
6326 if [ "$CFG_EGL" = "yes" ]; then
6327 echo "The EGL functionality test failed!"
6328 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6329 echo " You might need to modify the include and library search paths by editing"
6330 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6331 echo " ${XQMAKESPEC}."
6335 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6336 if [ "$CFG_OPENGL" = "es2" ]; then
6343 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6346 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6347 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6348 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6349 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6350 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
6351 CFG_LIBFREETYPE=system
6357 if [ "$CFG_ENDIAN" = "auto" ]; then
6358 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6359 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6360 elif [ "$PLATFORM_MAC" = "yes" ]; then
6363 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6365 if [ "$F" -eq 0 ]; then
6366 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6367 elif [ "$F" -eq 1 ]; then
6368 CFG_ENDIAN="Q_BIG_ENDIAN"
6371 echo "The target system byte order could not be detected!"
6372 echo "Turn on verbose messaging (-v) to see the final report."
6373 echo "You can use the -little-endian or -big-endian switch to"
6374 echo "$0 to continue."
6380 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6381 if [ "$PLATFORM_MAC" = "yes" ]; then
6384 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6386 if [ "$F" -eq 0 ]; then
6387 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6388 elif [ "$F" -eq 1 ]; then
6389 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6392 echo "The host system byte order could not be detected!"
6393 echo "Turn on verbose messaging (-v) to see the final report."
6394 echo "You can use the -host-little-endian or -host-big-endian switch to"
6395 echo "$0 to continue."
6401 if [ "$CFG_ARMFPA" != "auto" ]; then
6402 if [ "$CFG_ARMFPA" = "yes" ]; then
6403 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6404 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6406 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6409 CFG_DOUBLEFORMAT="normal"
6414 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6415 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6416 CFG_DOUBLEFORMAT=normal
6418 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6420 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6421 CFG_DOUBLEFORMAT=normal
6422 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6423 CFG_DOUBLEFORMAT=normal
6424 elif [ "$F" -eq 10 ]; then
6425 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6426 elif [ "$F" -eq 11 ]; then
6427 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6428 elif [ "$F" -eq 12 ]; then
6429 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6431 elif [ "$F" -eq 13 ]; then
6432 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6436 echo "The system floating point format could not be detected."
6437 echo "This may cause data to be generated in a wrong format"
6438 echo "Turn on verbose messaging (-v) to see the final report."
6439 # we do not fail on this since this is a new test, and if it fails,
6440 # the old behavior should be correct in most cases
6441 CFG_DOUBLEFORMAT=normal
6447 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6451 if [ "$CFG_STL" != "no" ]; then
6452 if [ "$HAVE_STL" = "yes" ]; then
6455 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6456 echo "STL support cannot be enabled due to functionality tests!"
6457 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6458 echo " If you believe this message is in error you may use the continue"
6459 echo " switch (-continue) to $0 to continue."
6467 # detect POSIX clock_gettime()
6468 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6469 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
6470 CFG_CLOCK_GETTIME=yes
6472 CFG_CLOCK_GETTIME=no
6476 # detect POSIX monotonic clocks
6477 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6478 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
6479 CFG_CLOCK_MONOTONIC=yes
6481 CFG_CLOCK_MONOTONIC=no
6483 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6484 CFG_CLOCK_MONOTONIC=no
6488 if [ "$CFG_MREMAP" = "auto" ]; then
6489 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6496 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6497 if [ "$CFG_GETADDRINFO" != "no" ]; then
6498 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6501 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6502 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6503 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6504 echo " If you believe this message is in error you may use the continue"
6505 echo " switch (-continue) to $0 to continue."
6513 # find if the platform provides inotify
6514 if [ "$CFG_INOTIFY" != "no" ]; then
6515 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6518 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6519 echo "inotify support cannot be enabled due to functionality tests!"
6520 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6521 echo " If you believe this message is in error you may use the continue"
6522 echo " switch (-continue) to $0 to continue."
6530 # find if the platform provides if_nametoindex (ipv6 interface name support)
6531 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6532 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
6535 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6536 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6537 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6538 echo " If you believe this message is in error you may use the continue"
6539 echo " switch (-continue) to $0 to continue."
6547 # find if the platform provides getifaddrs (network interface enumeration)
6548 if [ "$CFG_GETIFADDRS" != "no" ]; then
6549 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6552 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6553 echo "getifaddrs support cannot be enabled due to functionality tests!"
6554 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6555 echo " If you believe this message is in error you may use the continue"
6556 echo " switch (-continue) to $0 to continue."
6565 if [ "$CFG_OPENSSL" != "no" ]; then
6566 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
6567 if [ "$CFG_OPENSSL" = "auto" ]; then
6571 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6572 echo "OpenSSL support cannot be enabled due to functionality tests!"
6573 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6574 echo " If you believe this message is in error you may use the continue"
6575 echo " switch (-continue) to $0 to continue."
6583 # detect OpenVG support
6584 if [ "$CFG_OPENVG" != "no" ]; then
6585 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
6586 if [ "$CFG_OPENVG" = "auto" ]; then
6589 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
6590 if [ "$CFG_OPENVG" = "auto" ]; then
6593 CFG_OPENVG_ON_OPENGL=yes
6594 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
6595 if [ "$CFG_OPENVG" = "auto" ]; then
6598 CFG_OPENVG_LC_INCLUDES=yes
6599 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
6600 if [ "$CFG_OPENVG" = "auto" ]; then
6603 CFG_OPENVG_LC_INCLUDES=yes
6604 CFG_OPENVG_ON_OPENGL=yes
6606 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6607 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6608 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6609 echo " If you believe this message is in error you may use the continue"
6610 echo " switch (-continue) to $0 to continue."
6616 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
6617 CFG_OPENVG_SHIVA=yes
6621 if [ "$CFG_ALSA" = "auto" ]; then
6622 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6629 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6630 if [ "$CFG_ARCH" = "arm" ]; then
6631 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6632 if [ $? != "0" ]; then
6633 CFG_JAVASCRIPTCORE_JIT=no
6636 case "$XPLATFORM" in
6638 CFG_JAVASCRIPTCORE_JIT=no
6644 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6645 QMakeVar set JAVASCRIPTCORE_JIT yes
6646 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6647 QMakeVar set JAVASCRIPTCORE_JIT no
6650 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6651 CFG_AUDIO_BACKEND=yes
6654 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6655 echo "Warning: largefile support cannot be disabled for win32."
6659 #-------------------------------------------------------------------------------
6660 # ask for all that hasn't been auto-detected or specified in the arguments
6661 #-------------------------------------------------------------------------------
6663 ### fix this: user input should be validated in a loop
6664 if [ "$PLATFORM_QWS" = "yes" ]; then
6665 PROMPT_FOR_DEPTHS="yes"
6667 PROMPT_FOR_DEPTHS="no"
6669 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6671 echo "Choose pixel-depths to support:"
6673 echo " 1. 1bpp, black/white"
6674 echo " 4. 4bpp, grayscale"
6675 echo " 8. 8bpp, paletted"
6676 echo " 12. 12bpp, rgb 4-4-4"
6677 echo " 15. 15bpp, rgb 5-5-5"
6678 echo " 16. 16bpp, rgb 5-6-5"
6679 echo " 18. 18bpp, rgb 6-6-6"
6680 echo " 24. 24bpp, rgb 8-8-8"
6681 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6682 echo " all. All supported depths"
6684 echo "Your choices (default 8,16,32):"
6686 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6687 CFG_QWS_DEPTHS=8,16,32
6690 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6691 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6692 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6694 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6696 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6697 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6702 # enable dwarf2 support on Mac
6703 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6704 QT_CONFIG="$QT_CONFIG dwarf2"
6707 # Set the default arch if there are no "-arch" arguments on the configure line
6708 # For "-carbon" builds: 32 bit x86/ppc.
6709 # For builds on snow leopard : compiler default (64-bit).
6710 # For builds on leopard : compiler default (32-bit).
6711 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6712 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6714 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6715 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6716 CFG_MAC_ARCHS=" x86"
6717 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6718 CFG_MAC_ARCHS=" ppc"
6720 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6723 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6726 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6729 # enable Cocoa and/or Carbon on Mac
6730 # -carbon on the command line disables Cocoa, except for 64-bit archs
6731 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6732 CFG_MAC_CARBON="YES"
6735 # check which archs are in use, enable cocoa if we find a 64-bit one
6736 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6737 CFG_MAC_COCOA="yes";
6738 CFG_MAC_CARBON="no";
6739 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6740 CFG_MAC_CARBON="yes";
6742 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6743 CFG_MAC_CARBON="yes";
6748 # select Carbon on 10.4 Tiger.
6749 if [ "$PLATFORM_MAC" = "yes" ]; then
6750 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6751 if [ "$VERSION" == 8 ]; then
6753 CFG_MAC_CARBON="yes";
6757 # select Carbon when using the 10.4u SDK
6758 if [ "$PLATFORM_MAC" = "yes" ]; then
6759 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6762 CFG_MAC_CARBON="yes";
6766 # but disable Cocoa if cross-building for mingw
6767 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6770 if [ "$CFG_PHONON" = "yes" ]; then
6771 # No longer needed after modularization
6772 #QT_CONFIG="$QT_CONFIG phonon"
6773 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6774 QT_CONFIG="$QT_CONFIG phonon-backend"
6777 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6780 # disable accessibility
6781 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6782 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6784 QT_CONFIG="$QT_CONFIG accessibility"
6787 # egl stuff does not belong in lighthouse, but rather in plugins
6788 if [ "$PLATFORM_QPA" = "yes" ]; then
6793 if [ "$CFG_EGL" = "no" ]; then
6794 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6796 QT_CONFIG="$QT_CONFIG egl"
6797 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6798 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6803 if [ "$CFG_OPENVG" = "no" ]; then
6804 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6806 QT_CONFIG="$QT_CONFIG openvg"
6807 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6808 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6810 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6811 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6813 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6814 QT_CONFIG="$QT_CONFIG shivavg"
6815 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6820 if [ "$CFG_OPENGL" = "no" ]; then
6821 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6823 QT_CONFIG="$QT_CONFIG opengl"
6826 if [ "$CFG_OPENGL" = "es2" ]; then
6827 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6830 if [ "$CFG_OPENGL" = "es2" ]; then
6831 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6832 QT_CONFIG="$QT_CONFIG opengles2"
6835 # safe execution environment
6836 if [ "$CFG_SXE" != "no" ]; then
6837 QT_CONFIG="$QT_CONFIG sxe"
6840 # build up the variables for output
6841 if [ "$CFG_DEBUG" = "yes" ]; then
6842 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6843 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6844 elif [ "$CFG_DEBUG" = "no" ]; then
6845 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6846 QMAKE_CONFIG="$QMAKE_CONFIG release"
6848 if [ "$CFG_SHARED" = "yes" ]; then
6849 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6850 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6851 elif [ "$CFG_SHARED" = "no" ]; then
6852 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6853 QMAKE_CONFIG="$QMAKE_CONFIG static"
6855 if [ "$PLATFORM_QWS" = "yes" ]; then
6856 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6857 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6858 QT_CONFIG="$QT_CONFIG embedded"
6859 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6861 if [ "$PLATFORM_QPA" = "yes" ]; then
6862 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6863 QT_CONFIG="$QT_CONFIG qpa"
6864 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6865 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6868 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6869 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6870 QT_CONFIG="$QT_CONFIG nacl pepper"
6871 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6874 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6875 # Do not set this here for Windows. Let qmake do it so
6876 # debug and release precompiled headers are kept separate.
6877 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6879 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6880 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6881 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6882 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6883 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6884 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6886 if [ "$CFG_STL" = "no" ]; then
6887 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6889 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6891 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6892 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6894 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6895 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6896 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6897 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6898 QMakeVar add QMAKE_CFLAGS -g
6899 QMakeVar add QMAKE_CXXFLAGS -g
6900 QT_CONFIG="$QT_CONFIG separate_debug_info"
6902 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6903 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6905 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6906 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6907 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6908 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6909 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6910 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6911 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6912 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6913 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6914 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6915 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6916 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6917 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6918 QT_CONFIG="$QT_CONFIG clock-gettime"
6920 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6921 QT_CONFIG="$QT_CONFIG clock-monotonic"
6923 if [ "$CFG_MREMAP" = "yes" ]; then
6924 QT_CONFIG="$QT_CONFIG mremap"
6926 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6927 QT_CONFIG="$QT_CONFIG getaddrinfo"
6929 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6930 QT_CONFIG="$QT_CONFIG ipv6ifname"
6932 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6933 QT_CONFIG="$QT_CONFIG getifaddrs"
6935 if [ "$CFG_INOTIFY" = "yes" ]; then
6936 QT_CONFIG="$QT_CONFIG inotify"
6938 if [ "$CFG_LIBJPEG" = "no" ]; then
6940 elif [ "$CFG_LIBJPEG" = "system" ]; then
6941 QT_CONFIG="$QT_CONFIG system-jpeg"
6943 if [ "$CFG_JPEG" = "no" ]; then
6944 QT_CONFIG="$QT_CONFIG no-jpeg"
6945 elif [ "$CFG_JPEG" = "yes" ]; then
6946 QT_CONFIG="$QT_CONFIG jpeg"
6948 if [ "$CFG_LIBMNG" = "no" ]; then
6950 elif [ "$CFG_LIBMNG" = "system" ]; then
6951 QT_CONFIG="$QT_CONFIG system-mng"
6953 if [ "$CFG_MNG" = "no" ]; then
6954 QT_CONFIG="$QT_CONFIG no-mng"
6955 elif [ "$CFG_MNG" = "yes" ]; then
6956 QT_CONFIG="$QT_CONFIG mng"
6958 if [ "$CFG_LIBPNG" = "no" ]; then
6961 if [ "$CFG_LIBPNG" = "system" ]; then
6962 QT_CONFIG="$QT_CONFIG system-png"
6964 if [ "$CFG_PNG" = "no" ]; then
6965 QT_CONFIG="$QT_CONFIG no-png"
6966 elif [ "$CFG_PNG" = "yes" ]; then
6967 QT_CONFIG="$QT_CONFIG png"
6969 if [ "$CFG_GIF" = "no" ]; then
6970 QT_CONFIG="$QT_CONFIG no-gif"
6971 elif [ "$CFG_GIF" = "yes" ]; then
6972 QT_CONFIG="$QT_CONFIG gif"
6974 if [ "$CFG_LIBTIFF" = "no" ]; then
6976 elif [ "$CFG_LIBTIFF" = "system" ]; then
6977 QT_CONFIG="$QT_CONFIG system-tiff"
6979 if [ "$CFG_TIFF" = "no" ]; then
6980 QT_CONFIG="$QT_CONFIG no-tiff"
6981 elif [ "$CFG_TIFF" = "yes" ]; then
6982 QT_CONFIG="$QT_CONFIG tiff"
6984 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6985 QT_CONFIG="$QT_CONFIG no-freetype"
6986 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6987 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6988 QT_CONFIG="$QT_CONFIG system-freetype"
6990 QT_CONFIG="$QT_CONFIG freetype"
6992 if [ "$CFG_GUI" = "auto" ]; then
6995 if [ "$CFG_GUI" = "no" ]; then
6996 QT_CONFIG="$QT_CONFIG no-gui"
6998 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7002 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7003 #On Mac we implicitly link against libz, so we
7004 #never use the 3rdparty stuff.
7005 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7007 if [ "$CFG_ZLIB" = "yes" ]; then
7008 QT_CONFIG="$QT_CONFIG zlib"
7009 elif [ "$CFG_ZLIB" = "system" ]; then
7010 QT_CONFIG="$QT_CONFIG system-zlib"
7013 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7014 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7015 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7016 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7017 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7018 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7019 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7020 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7021 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7022 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7023 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7024 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7025 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7026 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7027 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7029 if [ "$PLATFORM_X11" = "yes" ]; then
7030 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7032 # for some reason, the following libraries are not always built shared,
7033 # so *every* program/lib (including Qt) has to link against them
7034 if [ "$CFG_XSHAPE" = "yes" ]; then
7035 QT_CONFIG="$QT_CONFIG xshape"
7037 if [ "$CFG_XVIDEO" = "yes" ]; then
7038 QT_CONFIG="$QT_CONFIG xvideo"
7040 if [ "$CFG_XSYNC" = "yes" ]; then
7041 QT_CONFIG="$QT_CONFIG xsync"
7043 if [ "$CFG_XINERAMA" = "yes" ]; then
7044 QT_CONFIG="$QT_CONFIG xinerama"
7045 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7047 if [ "$CFG_XCURSOR" = "yes" ]; then
7048 QT_CONFIG="$QT_CONFIG xcursor"
7049 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7051 if [ "$CFG_XFIXES" = "yes" ]; then
7052 QT_CONFIG="$QT_CONFIG xfixes"
7053 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7055 if [ "$CFG_XRANDR" = "yes" ]; then
7056 QT_CONFIG="$QT_CONFIG xrandr"
7057 if [ "$CFG_XRENDER" != "yes" ]; then
7058 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7059 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7061 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7064 if [ "$CFG_XRENDER" = "yes" ]; then
7065 QT_CONFIG="$QT_CONFIG xrender"
7066 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7068 if [ "$CFG_MITSHM" = "yes" ]; then
7069 QT_CONFIG="$QT_CONFIG mitshm"
7071 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7072 QT_CONFIG="$QT_CONFIG fontconfig"
7074 if [ "$CFG_XINPUT" = "yes" ]; then
7075 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7077 if [ "$CFG_XINPUT" = "yes" ]; then
7078 QT_CONFIG="$QT_CONFIG xinput tablet"
7080 if [ "$CFG_XKB" = "yes" ]; then
7081 QT_CONFIG="$QT_CONFIG xkb"
7085 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7086 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7087 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7089 if [ "$CFG_ARCH" = "macosx" ]; then
7090 if [ "$CFG_RPATH" = "yes" ]; then
7091 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7093 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7094 if [ -n "$RPATH_FLAGS" ]; then
7096 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7100 elif [ "$CFG_RPATH" = "yes" ]; then
7101 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7105 if [ "$CFG_RPATH" = "yes" ]; then
7106 # set the default rpath to the library installation directory
7107 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7109 if [ -n "$RPATH_FLAGS" ]; then
7110 # add the user defined rpaths
7111 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7115 if [ '!' -z "$I_FLAGS" ]; then
7116 # add the user define include paths
7117 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7118 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7121 if [ '!' -z "$W_FLAGS" ]; then
7122 # add the user defined warning flags
7123 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7124 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7125 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7128 # turn off exceptions for the compilers that support it
7129 if [ "$PLATFORM_QWS" = "yes" ]; then
7130 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7131 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7132 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7134 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7136 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7140 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7141 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7144 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7145 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7146 # Follow default behavior of configure.exe by overriding with "rtti".
7147 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7150 if [ "$CFG_ALSA" = "yes" ]; then
7151 QT_CONFIG="$QT_CONFIG alsa"
7154 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7155 QT_CONFIG="$QT_CONFIG pulseaudio"
7158 if [ "$CFG_COREWLAN" = "yes" ]; then
7159 QT_CONFIG="$QT_CONFIG corewlan"
7162 if [ "$CFG_ICD" = "yes" ]; then
7163 QT_CONFIG="$QT_CONFIG icd"
7166 if [ "$CFG_ICU" = "yes" ]; then
7167 QT_CONFIG="$QT_CONFIG icu"
7170 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
7171 QT_CONFIG="$QT_CONFIG force_asserts"
7175 # Some Qt modules are too advanced in C++ for some old compilers
7176 # Detect here the platforms where they are known to work.
7178 # See Qt documentation for more information on which features are
7179 # supported and on which compilers.
7181 canBuildQtXmlPatterns="yes"
7182 canBuildWebKit="$HAVE_STL"
7183 canBuildQtConcurrent="yes"
7185 canUseV8Snapshot="yes"
7187 # WebKit requires stdint.h
7188 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7189 if [ $? != "0" ]; then
7193 case "$XPLATFORM" in
7195 # PA-RISC's assembly is too limited
7196 # gcc 3.4 on that platform can't build QtXmlPatterns
7197 # the assembly it generates cannot be compiled
7199 # Check gcc's version
7200 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7204 canBuildQtXmlPatterns="no"
7208 canBuildQtXmlPatterns="no"
7212 unsupported/vxworks-*-g++*)
7215 unsupported/vxworks-*-dcc*)
7217 canBuildQtXmlPatterns="no"
7220 # Check gcc's version
7221 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7229 canBuildQtXmlPatterns="no"
7234 # Check the compiler version
7235 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7238 canBuildQtXmlPatterns="no"
7239 canBuildQtConcurrent="no"
7243 canBuildQtConcurrent="no"
7249 canBuildQtXmlPatterns="no"
7250 canBuildQtConcurrent="no"
7256 # Get the xlC version
7257 cat > xlcver.c <<EOF
7261 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7266 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7267 xlcver=`./xlcver 2>/dev/null`
7270 if [ "$OPT_VERBOSE" = "yes" ]; then
7271 if [ -n "$xlcver" ]; then
7272 echo Found IBM xlC version: $xlcver.
7274 echo Could not determine IBM xlC version, assuming oldest supported.
7281 canBuildQtXmlPatterns="no"
7282 canBuildQtConcurrent="no"
7286 canBuildQtConcurrent="no"
7292 canBuildQtConcurrent="no"
7296 if [ "$CFG_GUI" = "no" ]; then
7297 # WebKit requires QtGui
7301 if [ "$CFG_SHARED" = "no" ]; then
7303 echo "WARNING: Using static linking will disable the WebKit module."
7308 CFG_CONCURRENT="yes"
7309 if [ "$canBuildQtConcurrent" = "no" ]; then
7310 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7313 QT_CONFIG="$QT_CONFIG concurrent"
7316 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7317 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7320 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7321 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7322 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7323 CFG_XMLPATTERNS="no"
7325 # No longer needed after modularization
7326 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7327 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7329 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7332 # No longer needed after modularization
7333 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7334 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7336 # QT_CONFIG="$QT_CONFIG multimedia"
7339 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7340 QT_CONFIG="$QT_CONFIG audio-backend"
7343 if [ "$CFG_SVG" = "auto" ]; then
7347 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7348 echo "QtSvg requested, but it can't be built without QtGui"
7352 if [ "$CFG_SVG" = "yes" ]; then
7353 QT_CONFIG="$QT_CONFIG svg"
7355 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7358 if [ "$CFG_WEBKIT" != "no" ]; then
7359 CFG_WEBKIT="$canBuildWebKit"
7362 if [ "$CFG_WEBKIT" != "no" ]; then
7363 # No longer needed after modularization
7364 #QT_CONFIG="$QT_CONFIG webkit"
7365 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7366 if [ "$CFG_WEBKIT" = "debug" ]; then
7367 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7371 if [ "$CFG_SCRIPT" = "auto" ]; then
7375 # No longer needed after modularization
7376 #if [ "$CFG_SCRIPT" = "yes" ]; then
7377 # QT_CONFIG="$QT_CONFIG script"
7379 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7382 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7383 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7386 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7387 CFG_SCRIPTTOOLS="yes"
7388 elif [ "$CFG_SCRIPT" = "no" ]; then
7389 CFG_SCRIPTTOOLS="no"
7392 # No longer needed after modularization
7393 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7394 # QT_CONFIG="$QT_CONFIG scripttools"
7396 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7401 i386|x86_64|arm|mips|macosx) ;;
7402 *) canBuildV8="no";;
7405 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7406 echo "Error: V8 was requested, but is not supported on this platform."
7410 if [ "$CFG_V8" = "auto" ]; then
7411 CFG_V8="$canBuildV8"
7414 if [ "$CFG_V8" = "no" ]; then
7415 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7417 QT_CONFIG="$QT_CONFIG v8"
7418 # Detect snapshot support
7419 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7420 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7423 *) canUseV8Snapshot="no"
7427 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7428 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7430 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7431 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7434 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7435 QT_CONFIG="$QT_CONFIG v8snapshot"
7439 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7440 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7441 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7445 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7446 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7453 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7454 # No longer needed after modularization
7455 #QT_CONFIG="$QT_CONFIG declarative"
7456 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7457 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7460 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7463 if [ "$CFG_LOCATION" = "auto" ]; then
7464 CFG_LOCATION="$CFG_GUI"
7467 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7468 echo "QtLocation requested, but it can't be built without QtGui"
7472 #Disable QtLocation until ready
7475 if [ "$CFG_LOCATION" = "no" ]; then
7476 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7479 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7482 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7483 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7484 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7489 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7490 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7491 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7498 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7501 # On Mac, set the minimum deployment target for the different architechtures
7502 # using the Xarch compiler option when supported (10.5 and up).
7503 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7504 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7505 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7506 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7507 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7508 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7510 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7511 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7512 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7513 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7514 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7516 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7517 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7518 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7519 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7520 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7522 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7523 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7524 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7525 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7526 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7533 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7535 case "$COMPILER_VERSION" in
7537 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7538 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7539 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7542 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7543 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7544 QT_GCC_PATCH_VERSION=0
7554 #-------------------------------------------------------------------------------
7555 # part of configuration information goes into qconfig.h
7556 #-------------------------------------------------------------------------------
7558 case "$CFG_QCONFIG" in
7560 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7563 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7564 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7565 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7566 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7567 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7568 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7570 echo "#endif" >>"$tmpconfig"
7574 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7578 # define QT_EDITION $QT_EDITION
7581 /* Machine byte-order */
7582 #define Q_BIG_ENDIAN 4321
7583 #define Q_LITTLE_ENDIAN 1234
7586 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7587 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7588 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7589 #if defined(__BIG_ENDIAN__)
7590 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7591 #elif defined(__LITTLE_ENDIAN__)
7592 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7594 # error "Unable to determine byte order!"
7598 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7600 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7601 if [ "$CFG_ENDIAN" = "auto" ]; then
7602 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7603 #if defined(__BIG_ENDIAN__)
7604 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7605 #elif defined(__LITTLE_ENDIAN__)
7606 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7608 # error "Unable to determine byte order!"
7612 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7614 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7616 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7617 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7618 /* Non-IEEE double format */
7619 #define Q_DOUBLE_LITTLE "01234567"
7620 #define Q_DOUBLE_BIG "76543210"
7621 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7622 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7623 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7626 if [ "$CFG_ARMFPA" = "yes" ]; then
7627 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7628 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7629 #ifndef QT_BOOTSTRAPPED
7634 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7638 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7639 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7640 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7641 /* Machine Architecture */
7642 #ifndef QT_BOOTSTRAPPED
7643 # define QT_ARCH_${CFG_ARCH_STR}
7645 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7649 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7650 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7652 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7653 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7656 # if both carbon and cocoa are specified, enable the autodetection code.
7657 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7658 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7659 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7660 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7663 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7664 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7667 if [ "$PLATFORM_MAC" = "yes" ]; then
7668 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7669 #if defined(__LP64__)
7670 # define QT_POINTER_SIZE 8
7672 # define QT_POINTER_SIZE 4
7676 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7677 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7681 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7683 if [ "$CFG_DEV" = "yes" ]; then
7684 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7687 # Embedded compile time options
7688 if [ "$PLATFORM_QWS" = "yes" ]; then
7689 # Add QWS to config.h
7690 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7692 # Add excluded decorations to $QCONFIG_FLAGS
7693 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7694 for decor in $decors; do
7695 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7696 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7699 # Figure which embedded drivers which are turned off
7700 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7701 for ADRIVER in $CFG_GFX_ON; do
7702 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7705 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7706 # the um driver is currently not in the available list for external builds
7707 if [ "$CFG_DEV" = "no" ]; then
7708 CFG_KBD_OFF="$CFG_KBD_OFF um"
7710 for ADRIVER in $CFG_KBD_ON; do
7711 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7714 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7715 for ADRIVER in $CFG_MOUSE_ON; do
7716 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7719 for DRIVER in $CFG_GFX_OFF; do
7720 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7721 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7724 for DRIVER in $CFG_KBD_OFF; do
7725 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7726 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7729 for DRIVER in $CFG_MOUSE_OFF; do
7730 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7731 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7735 if [ "$PLATFORM_QPA" = "yes" ]; then
7736 # Add QPA to config.h
7737 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7740 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7741 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7744 # Add turned on SQL drivers
7745 for DRIVER in $CFG_SQL_AVAILABLE; do
7746 eval "VAL=\$CFG_SQL_$DRIVER"
7749 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7750 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7751 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7754 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7760 QMakeVar set sql-drivers "$SQL_DRIVERS"
7761 QMakeVar set sql-plugins "$SQL_PLUGINS"
7763 # Add other configuration options to the qconfig.h file
7764 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7765 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7766 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7767 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7768 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7769 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7770 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7771 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7772 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7774 # ATM we need this define to compile Qt. Remove later!
7775 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7777 # X11/Unix/Mac only configs
7778 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7779 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7780 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7781 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7782 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7783 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7784 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7785 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7786 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7787 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7788 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7789 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7790 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7791 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7792 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7794 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7795 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7796 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7797 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7798 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7799 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7800 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7801 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7802 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7803 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7804 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7805 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7806 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7808 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7809 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7810 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7811 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7812 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7813 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7814 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7815 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7816 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
7818 # sort QCONFIG_FLAGS for neatness if we can
7819 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7820 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7822 if [ -n "$QCONFIG_FLAGS" ]; then
7823 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7824 #ifndef QT_BOOTSTRAPPED
7827 for cfg in $QCONFIG_FLAGS; do
7828 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7829 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7830 # figure out define logic, so we can output the correct
7831 # ifdefs to override the global defines in a project
7833 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7834 # QT_NO_option can be forcefully turned on by QT_option
7835 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7836 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7837 # QT_option can be forcefully turned off by QT_NO_option
7838 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7841 if [ -z $cfgdNeg ]; then
7842 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7849 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7850 #if defined($cfgd) && defined($cfgdNeg)
7852 #elif !defined($cfgd) && !defined($cfgdNeg)
7859 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7860 #endif // QT_BOOTSTRAPPED
7865 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7866 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7867 #define QT_VISIBILITY_AVAILABLE
7872 if [ -n "$QT_LIBINFIX" ]; then
7873 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7874 #define QT_LIBINFIX "$QT_LIBINFIX"
7879 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7880 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7881 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7883 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7884 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7885 chmod -w "$outpath/src/corelib/global/qconfig.h"
7886 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7887 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7891 #-------------------------------------------------------------------------------
7892 # save configuration into qconfig.pri
7893 #-------------------------------------------------------------------------------
7894 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7895 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7896 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7897 if [ "$CFG_DEBUG" = "yes" ]; then
7898 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7899 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7900 QT_CONFIG="$QT_CONFIG release"
7902 QT_CONFIG="$QT_CONFIG debug"
7903 elif [ "$CFG_DEBUG" = "no" ]; then
7904 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7905 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7906 QT_CONFIG="$QT_CONFIG debug"
7908 QT_CONFIG="$QT_CONFIG release"
7910 if [ "$CFG_STL" = "yes" ]; then
7911 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7913 if [ "$CFG_FRAMEWORK" = "no" ]; then
7914 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7916 QT_CONFIG="$QT_CONFIG qt_framework"
7917 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7919 if [ "$PLATFORM_MAC" = "yes" ]; then
7920 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7922 if [ "$CFG_DEV" = "yes" ]; then
7923 QT_CONFIG="$QT_CONFIG private_tests"
7926 # Make the application arch follow the Qt arch for single arch builds.
7927 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7928 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7929 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7932 cat >>"$QTCONFIG.tmp" <<EOF
7934 CONFIG += $QTCONFIG_CONFIG
7936 QT_EDITION = $Edition
7937 QT_CONFIG += $QT_CONFIG
7940 QT_VERSION = $QT_VERSION
7941 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7942 QT_MINOR_VERSION = $QT_MINOR_VERSION
7943 QT_PATCH_VERSION = $QT_PATCH_VERSION
7946 QT_LIBINFIX = $QT_LIBINFIX
7947 QT_NAMESPACE = $QT_NAMESPACE
7948 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7951 if [ -n "$CFG_SYSROOT" ]; then
7952 echo "# sysroot" >>"$QTCONFIG.tmp"
7953 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7954 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7955 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7956 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7957 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7958 echo "}" >> "$QTCONFIG.tmp"
7959 echo >> "$QTCONFIG.tmp"
7961 if [ "$CFG_RPATH" = "yes" ]; then
7962 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7964 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7965 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7966 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7967 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7970 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7971 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7972 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7975 # replace qconfig.pri if it differs from the newly created temp file
7976 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7977 rm -f "$QTCONFIG.tmp"
7979 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7982 #-------------------------------------------------------------------------------
7983 # save configuration into qmodule.pri
7984 #-------------------------------------------------------------------------------
7985 QTMODULE="$outpath/mkspecs/qmodule.pri"
7987 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7989 # Ensure we can link to uninistalled libraries
7990 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7991 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7993 if [ -n "$QT_CFLAGS_PSQL" ]; then
7994 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7996 if [ -n "$QT_LFLAGS_PSQL" ]; then
7997 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7999 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8000 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8002 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8003 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8005 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8006 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8008 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8009 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8011 if [ -n "$QT_LFLAGS_ODBC" ]; then
8012 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8014 if [ -n "$QT_LFLAGS_TDS" ]; then
8015 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8018 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8019 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8022 #dump in the OPENSSL_LIBS info
8023 if [ '!' -z "$OPENSSL_LIBS" ]; then
8024 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8025 elif [ "$CFG_OPENSSL" = "linked" ]; then
8026 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8029 #dump in the SDK info
8030 if [ '!' -z "$CFG_SDK" ]; then
8031 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8034 # mac gcc -Xarch support
8035 if [ "$CFG_MAC_XARCH" = "no" ]; then
8036 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8040 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8041 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8043 # replace qmodule.pri if it differs from the newly created temp file
8044 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8045 rm -f "$QTMODULE.tmp"
8047 mv -f "$QTMODULE.tmp" "$QTMODULE"
8050 #-------------------------------------------------------------------------------
8051 # save configuration into .qmake.cache
8052 #-------------------------------------------------------------------------------
8054 CACHEFILE="$outpath/.qmake.cache"
8055 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8056 cat >>"$CACHEFILE.tmp" <<EOF
8058 QT_SOURCE_TREE = \$\$quote($relpath)
8059 QT_BUILD_TREE = \$\$quote($outpath)
8060 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8062 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8063 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8064 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8065 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8066 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8067 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8068 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8070 include(\$\$PWD/mkspecs/qmodule.pri)
8071 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8072 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8073 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8077 #dump the qmake spec
8078 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8079 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8081 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8086 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8087 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8088 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8089 # don't need to worry about generated files
8090 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8091 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8093 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8095 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8096 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8099 # replace .qmake.cache if it differs from the newly created temp file
8100 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8101 rm -f "$CACHEFILE.tmp"
8103 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8106 #-------------------------------------------------------------------------------
8107 # give feedback on configuration
8108 #-------------------------------------------------------------------------------
8112 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8115 This target is using the GNU C++ compiler ($PLATFORM).
8117 Recent versions of this compiler automatically include code for
8118 exceptions, which increase both the size of the Qt libraries and
8119 the amount of memory taken by your applications.
8121 You may choose to re-run `basename $0` with the -no-exceptions
8122 option to compile Qt without exceptions. This is completely binary
8123 compatible, and existing applications will continue to work.
8131 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8134 This target is using the MIPSpro C++ compiler ($PLATFORM).
8136 You may choose to re-run `basename $0` with the -no-exceptions
8137 option to compile Qt without exceptions. This will make the
8138 size of the Qt library smaller and reduce the amount of memory
8139 taken by your applications.
8150 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8152 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8153 in debug mode will run out of memory on systems with 2GB or less.
8154 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8155 -no-webkit or -release to skip webkit debug.
8160 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8161 echo "Build type: $PLATFORM"
8163 echo "Building on: $PLATFORM"
8164 echo "Building for: $XPLATFORM"
8167 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8168 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8170 echo "Architecture: $CFG_ARCH"
8173 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8174 echo "Host architecture: $CFG_HOST_ARCH"
8177 if [ "$PLATFORM_MAC" = "yes" ]; then
8178 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8179 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8180 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8182 echo "Using framework: Cocoa"
8185 echo "Using framework: Carbon"
8189 if [ -n "$PLATFORM_NOTES" ]; then
8190 echo "Platform notes:"
8191 echo "$PLATFORM_NOTES"
8196 if [ "$OPT_VERBOSE" = "yes" ]; then
8197 echo $ECHO_N "qmake vars .......... $ECHO_C"
8198 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8199 echo "qmake switches ......... $QMAKE_SWITCHES"
8202 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8203 echo "Build .................. $CFG_BUILD_PARTS"
8204 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8205 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8206 echo "Debug .................. yes (combined)"
8207 if [ "$CFG_DEBUG" = "yes" ]; then
8208 echo "Default Link ........... debug"
8210 echo "Default Link ........... release"
8213 echo "Debug .................. $CFG_DEBUG"
8215 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8216 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8217 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8218 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8219 echo "QtGui module ........... $CFG_GUI"
8220 echo "QtScript module ........ $CFG_SCRIPT"
8221 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8222 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8223 echo "Phonon module .......... $CFG_PHONON"
8224 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8225 echo "SVG module ............. $CFG_SVG"
8226 case "$CFG_WEBKIT" in
8227 yes) echo "WebKit module .......... yes" ;;
8228 debug) echo "WebKit module .......... yes (debug)" ;;
8229 no) echo "WebKit module .......... no" ;;
8231 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8232 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8233 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8235 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8238 echo "V8 module .............. $CFG_V8"
8239 echo "Declarative module ..... $CFG_DECLARATIVE"
8240 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8241 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8243 echo "Location module ........ $CFG_LOCATION"
8244 echo "STL support ............ $CFG_STL"
8245 echo "PCH support ............ $CFG_PRECOMPILE"
8246 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8247 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8248 echo "AVX..................... ${CFG_AVX}"
8249 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8250 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8251 echo "NEON support ........... ${CFG_NEON}"
8253 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8254 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8255 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8256 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8257 echo "NIS support ............ $CFG_NIS"
8258 echo "CUPS support ........... $CFG_CUPS"
8259 echo "Iconv support .......... $CFG_ICONV"
8260 echo "Glib support ........... $CFG_GLIB"
8261 echo "GStreamer support ...... $CFG_GSTREAMER"
8262 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8263 echo "Large File support ..... $CFG_LARGEFILE"
8264 echo "GIF support ............ $CFG_GIF"
8265 if [ "$CFG_TIFF" = "no" ]; then
8266 echo "TIFF support ........... $CFG_TIFF"
8268 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8270 if [ "$CFG_JPEG" = "no" ]; then
8271 echo "JPEG support ........... $CFG_JPEG"
8273 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8275 if [ "$CFG_PNG" = "no" ]; then
8276 echo "PNG support ............ $CFG_PNG"
8278 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8280 if [ "$CFG_MNG" = "no" ]; then
8281 echo "MNG support ............ $CFG_MNG"
8283 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8285 echo "zlib support ........... $CFG_ZLIB"
8286 echo "Session management ..... $CFG_SM"
8287 if [ "$PLATFORM_QWS" = "yes" ]; then
8288 echo "Embedded support ....... $CFG_EMBEDDED"
8289 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8290 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8292 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8294 # Normalize the decoration output first
8295 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8296 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8297 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8298 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8299 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8300 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8301 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8302 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8303 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8304 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8305 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8306 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8307 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8308 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8309 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8310 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8312 if [ "$CFG_OPENGL" = "desktop" ]; then
8313 echo "OpenGL support ......... yes (Desktop OpenGL)"
8314 elif [ "$CFG_OPENGL" = "es2" ]; then
8315 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8317 echo "OpenGL support ......... no"
8319 if [ "$CFG_EGL" != "no" ]; then
8320 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8321 echo "EGL support ............ yes <GLES/egl.h>"
8323 echo "EGL support ............ yes <EGL/egl.h>"
8326 if [ "$CFG_OPENVG" ]; then
8327 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8328 echo "OpenVG support ......... ShivaVG"
8330 echo "OpenVG support ......... $CFG_OPENVG"
8333 if [ "$PLATFORM_X11" = "yes" ]; then
8334 echo "NAS sound support ...... $CFG_NAS"
8335 echo "XShape support ......... $CFG_XSHAPE"
8336 echo "XVideo support ......... $CFG_XVIDEO"
8337 echo "XSync support .......... $CFG_XSYNC"
8338 echo "Xinerama support ....... $CFG_XINERAMA"
8339 echo "Xcursor support ........ $CFG_XCURSOR"
8340 echo "Xfixes support ......... $CFG_XFIXES"
8341 echo "Xrandr support ......... $CFG_XRANDR"
8342 echo "Xrender support ........ $CFG_XRENDER"
8343 echo "Xi support ............. $CFG_XINPUT"
8344 echo "MIT-SHM support ........ $CFG_MITSHM"
8345 echo "FontConfig support ..... $CFG_FONTCONFIG"
8346 echo "XKB Support ............ $CFG_XKB"
8347 echo "immodule support ....... $CFG_IM"
8348 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8350 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8351 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8352 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8353 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8354 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8355 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8356 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8357 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8358 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8361 if [ "$CFG_OPENSSL" = "yes" ]; then
8362 OPENSSL_LINKAGE="(run-time)"
8363 elif [ "$CFG_OPENSSL" = "linked" ]; then
8364 OPENSSL_LINKAGE="(linked)"
8366 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8367 echo "Alsa support ........... $CFG_ALSA"
8368 if [ "$PLATFORM_MAC" = "yes" ]; then
8369 echo "CoreWlan support ....... $CFG_COREWLAN"
8371 echo "ICD support ............ $CFG_ICD"
8372 echo "libICU support ......... $CFG_ICU"
8373 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8374 echo "Xcb support ............ limited (old version)"
8376 echo "Xcb support ............ $CFG_XCB"
8378 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8379 echo "XInput2 support ........ $CFG_XINPUT2"
8383 # complain about not being able to use dynamic plugins if we are using a static build
8384 if [ "$CFG_SHARED" = "no" ]; then
8386 echo "WARNING: Using static linking will disable the use of dynamically"
8387 echo "loaded plugins. Make sure to import all needed static plugins,"
8388 echo "or compile needed modules into the library."
8391 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8393 echo "NOTE: When linking against OpenSSL, you can override the default"
8394 echo "library names through OPENSSL_LIBS."
8396 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8399 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8401 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8402 echo "if you want a pure debug build."
8407 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8412 #-------------------------------------------------------------------------------
8413 # build makefiles based on the configuration
8414 #-------------------------------------------------------------------------------
8416 echo "Finding project files. Please wait..."
8417 if [ "$CFG_NOPROCESS" != "yes" ]; then
8418 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8419 if [ -f "${relpath}/qtbase.pro" ]; then
8420 mkfile="${outpath}/Makefile"
8421 [ -f "$mkfile" ] && chmod +w "$mkfile"
8422 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8426 # .projects -> projects to process
8427 # .projects.1 -> qt and moc
8428 # .projects.2 -> subdirs and libs
8429 # .projects.3 -> the rest
8430 rm -f .projects .projects.1 .projects.2 .projects.3
8432 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8433 if [ -z "$AWK" ]; then
8434 for p in `echo $QMAKE_PROJECTS`; do
8435 echo "$p" >> .projects
8438 cat >projects.awk <<EOF
8444 first = "./.projects.1.tmp"
8445 second = "./.projects.2.tmp"
8446 third = "./.projects.3.tmp"
8451 if ( ! target_file )
8453 print input_file >target_file
8458 input_file = FILENAME
8463 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8466 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8467 target_file = second
8472 matched_target == 0 && /^(TEMPLATE.*=)/ {
8473 if ( \$3 == "subdirs" )
8474 target_file = second
8475 else if ( \$3 == "lib" )
8481 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8482 if ( \$0 ~ /plugin/ )
8485 target_file = second
8490 if ( ! target_file )
8492 print input_file >>target_file
8499 for p in `echo $QMAKE_PROJECTS`; do
8500 echo "$p" >> .projects.all
8503 # if you get errors about the length of the command line to awk, change the -l arg
8505 split -l 100 .projects.all .projects.all.
8506 for p in .projects.all.*; do
8507 "$AWK" -f projects.awk `cat $p`
8508 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8509 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8510 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8511 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8513 rm -f .projects.all* projects.awk
8515 [ -f .projects.1 ] && cat .projects.1 >>.projects
8516 [ -f .projects.2 ] && cat .projects.2 >>.projects
8517 rm -f .projects.1 .projects.2
8518 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8519 cat .projects.3 >>.projects
8523 # don't sort Qt and MOC in with the other project files
8524 # also work around a segfaulting uniq(1)
8525 if [ -f .sorted.projects.2 ]; then
8526 sort .sorted.projects.2 > .sorted.projects.2.new
8527 mv -f .sorted.projects.2.new .sorted.projects.2
8528 cat .sorted.projects.2 >> .sorted.projects.1
8530 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8531 rm -f .sorted.projects.2 .sorted.projects.1
8535 if [ -f .projects ]; then
8536 uniq .projects >.tmp
8537 mv -f .tmp .projects
8538 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8540 if [ -f .projects.3 ]; then
8541 uniq .projects.3 >.tmp
8542 mv -f .tmp .projects.3
8543 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8545 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8549 for part in $CFG_BUILD_PARTS; do
8551 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8552 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8553 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8554 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8559 if [ "$CFG_DEV" = "yes" ]; then
8560 PART_ROOTS="$PART_ROOTS tests"
8563 echo "Creating makefiles. Please wait..."
8564 for file in .projects .projects.3; do
8565 [ '!' -f "$file" ] && continue
8566 for a in `cat $file`; do
8568 for r in $PART_ROOTS; do
8569 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8574 [ "$IN_ROOT" = "no" ] && continue
8577 *winmain/winmain.pro)
8578 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8582 *examples/activeqt/*) continue ;;
8583 */qmake/qmake.pro) continue ;;
8584 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8585 *tools/mkv8snapshot/*)
8586 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8592 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8598 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8599 test -d "$dir" || mkdir -p "$dir"
8600 OUTDIR="$outpath/$dir"
8601 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8602 # fast configure - the makefile exists, skip it
8603 # since the makefile exists, it was generated by qmake, which means we
8604 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8606 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8609 QMAKE_SPEC_ARGS="-spec $SPEC"
8610 echo $ECHO_N " for $a$ECHO_C"
8612 QMAKE="$outpath/bin/qmake"
8613 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8614 if [ "$file" = ".projects.3" ]; then
8617 cat >"${OUTDIR}/Makefile" <<EOF
8618 # ${OUTDIR}/Makefile: generated by configure
8620 # WARNING: This makefile will be replaced with a real makefile.
8621 # All changes made to this file will be lost.
8623 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8625 cat >>"${OUTDIR}/Makefile" <<EOF
8627 all clean install qmake first Makefile: FORCE
8628 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8636 if [ "$OPT_VERBOSE" = "yes" ]; then
8637 echo " (`basename $SPEC`)"
8638 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8643 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8644 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8648 rm -f .projects .projects.3
8650 #-------------------------------------------------------------------------------
8651 # check for platforms that we don't yet know about
8652 #-------------------------------------------------------------------------------
8653 if [ "$CFG_ARCH" = "generic" ]; then
8656 NOTICE: Atomic operations are not yet supported for this
8659 Qt will use the 'generic' architecture instead, which uses a
8660 single pthread_mutex_t to protect all atomic operations. This
8661 implementation is the slow (but safe) fallback implementation
8662 for architectures Qt does not yet support.
8666 #-------------------------------------------------------------------------------
8667 # check if the user passed the -no-zlib option, which is no longer supported
8668 #-------------------------------------------------------------------------------
8669 if [ -n "$ZLIB_FORCED" ]; then
8670 which_zlib="supplied"
8671 if [ "$CFG_ZLIB" = "system" ]; then
8677 NOTICE: The -no-zlib option was supplied but is no longer
8680 Qt now requires zlib support in all builds, so the -no-zlib
8681 option was ignored. Qt will be built using the $which_zlib
8686 #-------------------------------------------------------------------------------
8687 # finally save the executed command to another script
8688 #-------------------------------------------------------------------------------
8689 if [ `basename $0` != "config.status" ]; then
8690 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8692 # add the system variables
8693 for varname in $SYSTEM_VARIABLES; do
8695 'if [ -n "\$'${varname}'" ]; then
8696 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8701 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8703 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8704 echo "#!/bin/sh" > "$outpath/config.status"
8705 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8706 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8707 echo "else" >> "$outpath/config.status"
8708 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8709 echo "fi" >> "$outpath/config.status"
8710 chmod +x "$outpath/config.status"
8713 if [ -n "$RPATH_MESSAGE" ]; then
8715 echo "$RPATH_MESSAGE"
8718 MAKE=`basename "$MAKE"`
8720 echo Qt is now configured for building. Just run \'$MAKE\'.
8721 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8722 echo Once everything is built, Qt is installed.
8723 echo You should not run \'$MAKE install\'.
8725 echo Once everything is built, you must run \'$MAKE install\'.
8726 echo Qt will be installed into $QT_INSTALL_PREFIX
8729 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.