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
786 CFG_DOUBLEFORMAT=auto
790 CFG_CLOCK_GETTIME=auto
791 CFG_CLOCK_MONOTONIC=auto
800 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
805 COMMANDLINE_MAC_CARBON=no
808 CFG_PREFIX_INSTALL=yes
817 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
818 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
822 OPT_CONFIRM_LICENSE=no
836 # initalize variables used for installation
845 QT_INSTALL_TRANSLATIONS=
851 #flags for SQL drivers
859 QT_LFLAGS_ODBC="-lodbc"
862 # flags for libdbus-1
866 # flags for Glib (X11 only)
870 # flags for GStreamer (X11 only)
874 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
875 QT_CFLAGS_CONNSETTINGS=
876 QT_LIBS_CONNSETTINGS=
878 #-------------------------------------------------------------------------------
879 # check SQL drivers, mouse drivers and decorations available in this package
880 #-------------------------------------------------------------------------------
882 # opensource version removes some drivers, so force them to be off
888 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
889 for a in "$relpath/src/plugins/sqldrivers/"*; do
891 base_a=`basename "$a"`
892 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
893 eval "CFG_SQL_${base_a}=auto"
898 CFG_DECORATION_PLUGIN_AVAILABLE=
899 if [ -d "$relpath/src/plugins/decorations" ]; then
900 for a in "$relpath/src/plugins/decorations/"*; do
902 base_a=`basename "$a"`
903 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
908 CFG_KBD_PLUGIN_AVAILABLE=
909 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
910 for a in "$relpath/src/plugins/kbddrivers/"*; do
912 base_a=`basename "$a"`
913 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
918 CFG_MOUSE_PLUGIN_AVAILABLE=
919 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
920 for a in "$relpath/src/plugins/mousedrivers/"*; do
922 base_a=`basename "$a"`
923 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
928 CFG_GFX_PLUGIN_AVAILABLE=
929 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
930 for a in "$relpath/src/plugins/gfxdrivers/"*; do
932 base_a=`basename "$a"`
933 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
936 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
939 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
940 if [ -d "$relpath/src/plugins/imageformats" ]; then
941 for a in "$relpath/src/plugins/imageformats/"*; do
943 base_a=`basename "$a"`
944 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
949 #-------------------------------------------------------------------------------
950 # Set Default NaCl options
951 #-------------------------------------------------------------------------------
952 if [ "$CFG_EMBEDDED" = "nacl" ]; then
953 echo "Setting NaCl options:"
963 if [ `uname` = "Linux" ]; then
964 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
965 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
967 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
968 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
971 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
982 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
983 QT_CONFIG="$QT_CONFIG nacl"
986 #-------------------------------------------------------------------------------
987 # parse command line arguments
988 #-------------------------------------------------------------------------------
990 # parse the arguments, setting things to "yes" or "no"
991 while [ "$#" -gt 0 ]; do
995 #Autoconf style options
997 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1001 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1005 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1006 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1009 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1013 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1017 -no-*-*|-plugin-*-*|-qt-*-*)
1018 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1019 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1034 #Qt style no options
1036 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1039 #Qt style yes options
1040 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-wayland|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
1041 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1044 #Qt style options that pass an argument
1046 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1048 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1052 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1056 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1057 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1061 #Qt style complex options in one command
1062 -enable-*|-disable-*)
1063 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1064 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1066 #Qt Builtin/System style options
1067 -no-*|-system-*|-qt-*)
1068 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1069 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1071 #Options that cannot be generalized
1078 # this option may or may not be followed by an argument
1079 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1086 -embedded-lite|-qpa)
1088 # this option may or may not be followed by an argument
1089 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1102 # this option may or may not be followed by an argument
1103 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1112 # this option may or may not be followed by an argument
1113 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1121 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1122 # this option may or may not be followed by an argument
1123 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1132 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1136 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1150 if [ "$1" = "-D" ]; then
1154 VAL=`echo $1 | sed 's,-D,,'`
1159 # this option may or may not be followed by an argument
1160 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1169 if [ "$1" = "-I" ]; then
1173 VAL=`echo $1 | sed 's,-I,,'`
1178 if [ "$1" = "-L" ]; then
1182 VAL=`echo $1 | sed 's,-L,,'`
1187 if [ "$1" = "-R" ]; then
1191 VAL=`echo $1 | sed 's,-R,,'`
1196 VAL=`echo $1 | sed 's,-l,,'`
1200 if [ "$1" = "-F" ]; then
1204 VAL=`echo $1 | sed 's,-F,,'`
1209 if [ "$1" = "-fw" ]; then
1213 VAL=`echo $1 | sed 's,-fw,,'`
1221 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1228 if [ "$UNKNOWN_ARG" = "yes" ]; then
1229 echo "$1: unknown argument"
1240 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1241 CFG_QT3SUPPORT="$VAL"
1247 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1248 CFG_ACCESSIBILITY="$VAL"
1257 CFG_USE_GNUMAKE="$VAL"
1260 CFG_MYSQL_CONFIG="$VAL"
1263 QT_INSTALL_PREFIX="$VAL"
1266 QT_HOST_PREFIX="$VAL"
1269 QT_FORCE_PKGCONFIG=yes
1272 QT_INSTALL_DOCS="$VAL"
1275 QT_INSTALL_HEADERS="$VAL"
1278 QT_INSTALL_PLUGINS="$VAL"
1281 QT_INSTALL_IMPORTS="$VAL"
1284 QT_INSTALL_DATA="$VAL"
1287 QT_INSTALL_LIBS="$VAL"
1296 QT_INSTALL_TRANSLATIONS="$VAL"
1298 sysconfdir|settingsdir)
1299 QT_INSTALL_SETTINGS="$VAL"
1302 QT_INSTALL_EXAMPLES="$VAL"
1305 QT_INSTALL_TESTS="$VAL"
1314 QT_INSTALL_BINS="$VAL"
1336 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1343 if [ "$VAL" = "little" ]; then
1344 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1345 elif [ "$VAL" = "big" ]; then
1346 CFG_ENDIAN="Q_BIG_ENDIAN"
1352 if [ "$VAL" = "little" ]; then
1353 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1354 elif [ "$VAL" = "big" ]; then
1355 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1361 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1368 CFG_QWS_DEPTHS="$VAL"
1371 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1372 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1373 [ "$VAL" = "es2" ]; then
1375 if [ "$VAL" = "es2" ]; then
1383 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1385 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1392 qvfb) # left for commandline compatibility, not documented
1393 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1394 if [ "$VAL" = "yes" ]; then
1395 QMakeVar add gfx-drivers qvfb
1396 QMakeVar add kbd-drivers qvfb
1397 QMakeVar add mouse-drivers qvfb
1398 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1399 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1400 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1407 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1410 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1419 if [ "$PLATFORM_MAC" = "yes" ]; then
1426 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1427 CFG_MAC_DWARF2="$VAL"
1433 # if this is a Mac then "windows" probably means
1434 # we are cross-compiling for MinGW
1435 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1436 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1445 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1446 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1452 # do nothing - Cocoa is the default.
1455 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1456 CFG_MAC_CARBON="$VAL"
1457 COMMANDLINE_MAC_CARBON="$VAL"
1463 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1464 CFG_MAC_HARFBUZZ="$VAL"
1471 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1472 CFG_FRAMEWORK="$VAL"
1478 if [ "$VAL" = "yes" ]; then
1480 QMakeVar add QMAKE_CFLAGS -pg
1481 QMakeVar add QMAKE_CXXFLAGS -pg
1482 QMakeVar add QMAKE_LFLAGS -pg
1483 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1489 if [ "$VAL" = "yes" ]; then
1490 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1493 exceptions|g++-exceptions)
1494 if [ "$VAL" = "no" ]; then
1496 elif [ "$VAL" = "yes" ]; then
1504 # keep compatibility with old platform names
1510 PLATFORM=hpux-acc-o64
1513 PLATFORM=hpux-acc-64
1516 PLATFORM=hpux-acc-64
1528 PLATFORM=reliant-cds-64
1531 PLATFORM=solaris-cc-64
1534 PLATFORM=unixware-cc
1537 PLATFORM=unixware-g++
1540 PLATFORM=unixware-cc
1543 PLATFORM=unixware-g++
1549 i386) NATIVE_64_ARCH="x86_64" ;;
1550 powerpc) NATIVE_64_ARCH="ppc64" ;;
1551 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1553 if [ ! -z "$NATIVE_64_ARCH" ]; then
1554 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1555 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1562 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1565 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1566 CFG_DEBUG_RELEASE="$VAL"
1572 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1573 CFG_RELEASE_QMAKE="$VAL"
1579 if [ "$VAL" = "yes" ]; then
1581 elif [ "$VAL" = "no" ]; then
1588 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1589 CFG_PREFIX_INSTALL="$VAL"
1597 developer-build|commercial|opensource|nokia-developer)
1598 # These switches have been dealt with already
1601 if [ "$VAL" = "yes" ]; then
1603 elif [ "$VAL" = "no" ]; then
1610 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1611 CFG_INCREMENTAL="$VAL"
1617 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1618 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1624 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1625 if [ "$VAL" = "no" ]; then
1626 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1627 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1628 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1634 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1641 if [ "$VAL" = "no" ]; then
1648 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1656 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1663 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1670 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1684 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1691 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1698 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1705 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1712 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1713 CFG_PRECOMPILE="$VAL"
1718 separate-debug-info)
1719 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1720 CFG_SEPARATE_DEBUG_INFO="$VAL"
1721 elif [ "$VAL" = "nocopy" ] ; then
1722 CFG_SEPARATE_DEBUG_INFO="yes"
1723 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1729 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1730 CFG_REDUCE_EXPORTS="$VAL"
1736 if [ "$VAL" = "no" ]; then
1743 if [ "$VAL" = "no" ]; then
1750 if [ "$VAL" = "no" ]; then
1757 if [ "$VAL" = "no" ]; then
1764 if [ "$VAL" = "no" ]; then
1771 if [ "$VAL" = "no" ]; then
1778 if [ "$VAL" = "no" ]; then
1785 if [ "$VAL" = "no" ]; then
1792 if [ "$VAL" = "no" ]; then
1802 if [ "$VAL" = "no" ]; then
1809 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1810 CFG_REDUCE_RELOCATIONS="$VAL"
1816 [ "$VAL" = "qt" ] && VAL=yes
1817 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1818 CFG_QWS_FREETYPE="$VAL"
1824 [ "$VAL" = "qt" ] && VAL=yes
1825 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1830 # No longer supported:
1831 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1834 if [ "$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 [ "$VAL" = "yes" ] && VAL=qt
1866 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1873 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1880 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1887 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1894 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1901 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1908 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1915 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1916 CFG_FONTCONFIG="$VAL"
1922 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1929 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1936 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1943 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1950 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1957 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1965 CFG_GSTREAMER="$VAL"
1971 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1972 CFG_QGTKSTYLE="$VAL"
1978 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1981 if [ "$VAL" = "no" ]; then
1989 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1991 elif [ "$VAL" = "runtime" ]; then
1998 if [ "$VAL" = "yes" ]; then
2005 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2012 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2013 CFG_LARGEFILE="$VAL"
2019 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2026 if [ "$VAL" = "yes" ]; then
2027 CFG_OPENSSL="linked"
2033 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2034 CFG_XMLPATTERNS="yes"
2036 if [ "$VAL" = "no" ]; then
2037 CFG_XMLPATTERNS="no"
2044 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2047 if [ "$VAL" = "no" ]; then
2055 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2056 CFG_SCRIPTTOOLS="yes"
2058 if [ "$VAL" = "no" ]; then
2059 CFG_SCRIPTTOOLS="no"
2066 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2069 if [ "$VAL" = "no" ]; then
2077 if [ "$VAL" = "yes" ]; then
2080 if [ "$VAL" = "no" ]; then
2088 if [ "$VAL" = "yes" ]; then
2089 CFG_DECLARATIVE="yes"
2091 if [ "$VAL" = "no" ]; then
2092 CFG_DECLARATIVE="no"
2099 if [ "$VAL" = "yes" ]; then
2100 CFG_DECLARATIVE_DEBUG="yes"
2102 if [ "$VAL" = "no" ]; then
2103 CFG_DECLARATIVE_DEBUG="no"
2110 [ "$VAL" = "auto" ] && VAL="yes"
2114 if [ "$VAL" = "yes" ]; then
2117 if [ "$VAL" = "no" ]; then
2125 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2126 CFG_JAVASCRIPTCORE_JIT="$VAL"
2132 if [ "$VAL" = "yes" ]; then
2133 OPT_CONFIRM_LICENSE="$VAL"
2139 if [ "$VAL" = "yes" ]; then
2145 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2146 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2147 # if autoconf style options were used, $VAL can be "yes" or "no"
2148 [ "$VAL" = "yes" ] && VAL=qt
2149 # now $VAL should be "no", "qt", or "plugin"... double-check
2150 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2153 # now $VAL is "no", "qt", or "plugin"
2155 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2156 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2158 # Grab the available values
2161 avail="$CFG_SQL_AVAILABLE"
2164 avail="$CFG_GFX_AVAILABLE"
2165 if [ "$OPT" = "plugin" ]; then
2166 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2170 avail="$CFG_DECORATION_AVAILABLE"
2171 if [ "$OPT" = "plugin" ]; then
2172 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2176 avail="$CFG_KBD_AVAILABLE"
2177 if [ "$OPT" = "plugin" ]; then
2178 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2182 avail="$CFG_MOUSE_AVAILABLE"
2183 if [ "$OPT" = "plugin" ]; then
2184 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2188 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2189 if [ "$OPT" != "plugin" ]; then
2190 # png is always built in
2196 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2200 # Check that that user's value is available.
2203 if [ "$VAL" = "$d" ]; then
2208 [ "$found" = yes ] || ERROR=yes
2210 if [ "$VAR" = "sql" ]; then
2211 # set the CFG_SQL_driver
2212 eval "CFG_SQL_$VAL=\$OPT"
2214 elif [ "$VAR" = "imageformat" ]; then
2215 [ "$OPT" = "qt" ] && OPT=yes
2216 VAL="`echo $VAL |tr a-z A-Z`"
2217 eval "CFG_$VAL=$OPT"
2221 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2222 if [ "$OPT" = "plugin" ]; then
2223 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2224 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2225 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2226 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2227 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2228 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2229 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2230 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2233 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2234 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2235 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2236 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2237 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2241 QMakeVar add "${VAR}s" "${VAL}"
2242 elif [ "$OPT" = "no" ]; then
2243 PLUG_VAR="${VAR}-plugin"
2244 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2245 IN_VAR="${VAR}-driver"
2249 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2250 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2251 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2252 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2253 QMakeVar del "${IN_VAR}s" "$VAL"
2254 QMakeVar del "${PLUG_VAR}s" "$VAL"
2256 if [ "$ERROR" = "yes" ]; then
2257 echo "$CURRENT_OPT: unknown argument"
2262 if [ "$VAL" = "yes" ]; then
2263 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2264 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2268 elif [ "$VAL" = "no" ]; then
2269 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2270 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2279 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2286 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2293 D_FLAGS="$D_FLAGS \"$VAL\""
2296 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2299 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2302 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2305 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2308 if [ "$PLATFORM_MAC" = "yes" ]; then
2309 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2310 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2316 if [ "$PLATFORM_MAC" = "yes" ]; then
2317 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2323 W_FLAGS="$W_FLAGS \"${VAL}\""
2329 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2336 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2337 CFG_PHONON_BACKEND="$VAL"
2343 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2344 CFG_MULTIMEDIA="$VAL"
2356 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2357 CFG_AUDIO_BACKEND="$VAL"
2363 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2370 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2371 CFG_FORCE_ASSERTS="$VAL"
2380 if [ "$UNKNOWN_OPT" = "yes" ]; then
2381 echo "${CURRENT_OPT}: invalid command-line switch"
2387 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2388 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2391 if [ "$CFG_GUI" = "no" ]; then
2392 echo "Warning: -no-gui will disable the qt3support library."
2396 #disable Qt3Support for Lighthouse
2397 if [ "$PLATFORM_QPA" = "yes" ]; then
2401 # update QT_CONFIG to show our current predefined configuration
2402 case "$CFG_QCONFIG" in
2403 minimal|small|medium|large|full)
2404 # these are a sequence of increasing functionality
2405 for c in minimal small medium large full; do
2406 QT_CONFIG="$QT_CONFIG $c-config"
2407 [ "$CFG_QCONFIG" = $c ] && break
2411 # not known to be sufficient for anything
2412 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2413 echo >&2 "Error: configuration file not found:"
2414 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2416 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2421 #-------------------------------------------------------------------------------
2422 # build tree initialization
2423 #-------------------------------------------------------------------------------
2425 # where to find which..
2426 unixtests="$relpath/config.tests/unix"
2427 mactests="$relpath/config.tests/mac"
2428 WHICH="$unixtests/which.test"
2430 PERL=`$WHICH perl 2>/dev/null`
2432 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2434 for e in gawk nawk awk; do
2435 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2442 PERL="/usr/bin/perl"
2443 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2447 ### skip this if the user just needs help...
2448 if [ "$OPT_HELP" != "yes" ]; then
2450 # is this a shadow build?
2451 if [ "$OPT_SHADOW" = "maybe" ]; then
2453 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2454 if [ -h "$outpath" ]; then
2455 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2461 if [ "$OPT_SHADOW" = "yes" ]; then
2462 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2463 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2464 echo >&2 "Cannot proceed."
2467 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2470 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2472 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2473 echo "Qt can be built in release mode with separate debug information, so"
2474 echo "-debug-and-release is not necessary anymore"
2478 if [ "$CFG_SILENT" = "yes" ]; then
2479 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2482 # if the source tree is different from the build tree,
2483 # symlink or copy part of the sources
2484 if [ "$OPT_SHADOW" = "yes" ]; then
2485 echo "Preparing build tree..."
2487 if [ -z "$PERL" ]; then
2489 echo "You need perl in your PATH to make a shadow build."
2490 echo "Cannot proceed."
2494 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2496 # symlink the qmake directory
2497 find "$relpath/qmake" | while read a; do
2498 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2499 if [ '!' -f "$my_a" ]; then
2500 if [ -d "$a" ]; then
2501 # directories are created...
2504 a_dir=`dirname "$my_a"`
2505 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2506 # ... and files are symlinked
2507 case `basename "$a"` in
2508 *.o|*.d|GNUmakefile*|qmake)
2519 # make a syncqt script that can be used in the shadow
2520 rm -f "$outpath/bin/syncqt"
2521 if [ -x "$relpath/bin/syncqt" ]; then
2522 mkdir -p "$outpath/bin"
2523 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2524 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2525 chmod 755 "$outpath/bin/syncqt"
2528 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2529 rm -f "$outpath/bin/$i"
2530 if [ -x "$relpath/bin/$i" ]; then
2531 mkdir -p "$outpath/bin"
2532 echo "#!/bin/sh" >"$outpath/bin/$i"
2533 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2534 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2535 chmod 755 "$outpath/bin/$i"
2539 # symlink the mkspecs directory
2540 mkdir -p "$outpath/mkspecs"
2541 rm -rf "$outpath"/mkspecs/*
2542 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2543 rm -f "$outpath/mkspecs/default"
2547 rm -rf "$outpath/mkspecs/$1"
2548 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2549 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2552 # Special case for mkspecs/features directory.
2553 # To be able to place .prf files into a shadow build directory,
2554 # we're creating links for files only. The directory structure is reproduced.
2555 ShadowMkspecs features
2557 # The modules dir is special, too.
2558 ShadowMkspecs modules
2560 # symlink the doc directory
2561 rm -rf "$outpath/doc"
2562 ln -s "$relpath/doc" "$outpath/doc"
2564 # make sure q3porting.xml can be found
2565 mkdir -p "$outpath/tools/porting/src"
2566 rm -f "$outpath/tools/porting/src/q3porting.xml"
2567 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2570 # symlink fonts to be able to run application from build directory
2571 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2572 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2573 mkdir -p "${outpath}/lib"
2574 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2578 if [ "$OPT_FAST" = "auto" ]; then
2579 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2586 # find a make command
2587 if [ -z "$MAKE" ]; then
2589 for mk in gmake make; do
2590 if "$WHICH" $mk >/dev/null 2>&1; then
2595 if [ -z "$MAKE" ]; then
2596 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2597 echo >&2 "Cannot proceed."
2600 # export MAKE, we need it later in the config.tests
2606 #-------------------------------------------------------------------------------
2607 # auto-detect all that hasn't been specified in the arguments
2608 #-------------------------------------------------------------------------------
2610 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2611 if [ "$CFG_EMBEDDED" != "no" ]; then
2612 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2614 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2615 if [ -z "$XPLATFORM" ]; then
2616 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2617 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2621 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2622 if [ -z "$XPLATFORM" ]; then
2623 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2624 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2628 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2629 if [ -z "$XPLATFORM" ]; then
2630 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2631 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2635 if [ -z "$PLATFORM" ]; then
2636 case "$UNAME_MACHINE" in
2638 PLATFORM=qws/linux-x86-g++
2641 PLATFORM=qws/linux-x86_64-g++
2644 PLATFORM=qws/linux-generic-g++
2648 if [ -z "$XPLATFORM" ]; then
2649 if [ "$CFG_EMBEDDED" = "auto" ]; then
2650 if [ -n "$CFG_ARCH" ]; then
2651 CFG_EMBEDDED=$CFG_ARCH
2653 case "$UNAME_MACHINE" in
2661 CFG_EMBEDDED=generic
2666 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2670 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2671 if [ -z "$XPLATFORM" ]; then
2672 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2673 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2677 if [ -z "$XPLATFORM" ]; then
2682 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2689 if [ -z "$PLATFORM" ]; then
2691 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2693 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2695 # PLATFORM=macx-xcode
2702 #PLATFORM=aix-g++-64
2704 #PLATFORM=aix-xlc-64
2706 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2716 # PLATFORM=dynix-g++
2722 PLATFORM=freebsd-g++
2724 - Also available for FreeBSD: freebsd-icc
2728 PLATFORM=openbsd-g++
2739 #PLATFORM=irix-cc-64
2741 - Also available for IRIX: irix-g++ irix-cc-64
2745 case "$UNAME_MACHINE" in
2747 #PLATFORM=hpuxi-acc-32
2748 PLATFORM=hpuxi-acc-64
2750 - Also available for HP-UXi: hpuxi-acc-32
2756 #PLATFORM=hpux-acc-64
2758 #PLATFORM=hpux-acc-o64
2760 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2769 - Also available for Tru64: tru64-g++
2773 case "$UNAME_MACHINE" in
2775 PLATFORM=linux-g++-64
2782 - Also available for Linux: linux-kcc linux-icc linux-cxx
2786 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2787 PLATFORM="solaris-g++"
2789 #PLATFORM=solaris-g++
2791 #PLATFORM=solaris-cc64
2794 - Also available for Solaris: solaris-g++ solaris-cc-64
2797 ReliantUNIX-*:*|SINIX-*:*)
2798 PLATFORM=reliant-cds
2799 #PLATFORM=reliant-cds-64
2801 - Also available for Reliant UNIX: reliant-cds-64
2811 #PLATFORM=unixware-g++
2812 PLATFORM=unixware-cc
2814 - Also available for OpenUNIX: unixware-g++
2818 #PLATFORM=unixware-g++
2819 PLATFORM=unixware-cc
2821 - Also available for UnixWare: unixware-g++
2828 - Also available for SCO OpenServer: sco-g++
2832 PLATFORM=unixware-g++
2835 PLATFORM=unsupported/qnx-g++
2838 if [ "$OPT_HELP" != "yes" ]; then
2840 for p in $PLATFORMS; do
2841 echo " $relconf $* -platform $p"
2844 echo " The build script does not currently recognize all" >&2
2845 echo " platforms supported by Qt." >&2
2846 echo " Rerun this script with a -platform option listed to" >&2
2847 echo " set the system/compiler combination you use." >&2
2854 if [ "$PLATFORM_QWS" = "yes" ]; then
2856 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2858 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2861 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2863 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2864 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2866 if [ -d "$PLATFORM" ]; then
2867 QMAKESPEC="$PLATFORM"
2869 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2871 if [ -d "$XPLATFORM" ]; then
2872 XQMAKESPEC="$XPLATFORM"
2874 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2876 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2877 QT_CROSS_COMPILE=yes
2878 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2881 if [ "$PLATFORM_MAC" = "yes" ]; then
2882 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2884 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2885 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2886 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2887 echo " built with 'macx-g++'" >&2
2893 # check specified platforms are supported
2894 if [ '!' -d "$QMAKESPEC" ]; then
2896 echo " The specified system/compiler is not supported:"
2900 echo " Please see the README file for a complete list."
2904 if [ '!' -d "$XQMAKESPEC" ]; then
2906 echo " The specified system/compiler is not supported:"
2910 echo " Please see the README file for a complete list."
2914 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2916 echo " The specified system/compiler port is not complete:"
2918 echo " $XQMAKESPEC/qplatformdefs.h"
2920 echo " Please contact qt-info@nokia.com."
2925 # now look at the configs and figure out what platform we are config'd for
2926 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2927 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2929 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2931 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2932 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2933 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2934 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2935 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2939 #-------------------------------------------------------------------------------
2940 # determine the system architecture
2941 #-------------------------------------------------------------------------------
2942 if [ "$OPT_VERBOSE" = "yes" ]; then
2943 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2946 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2947 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2949 echo "You have specified a target architecture with -embedded and -arch."
2950 echo "The two architectures you have specified are different, so we can"
2951 echo "not proceed. Either set both to be the same, or only use -embedded."
2957 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2958 case `basename "$XPLATFORM"` in
2961 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2963 echo "Please contact qt-info@nokia.com to upgrade your license to"
2964 echo "include this platform, or install the Qt Open Source Edition"
2965 echo "if you intend to develop free software."
2971 if [ -z "${CFG_HOST_ARCH}" ]; then
2972 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2974 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2975 case "$CFG_HOST_ARCH" in
2980 if [ "$OPT_VERBOSE" = "yes" ]; then
2981 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2985 CFG_HOST_ARCH=`uname -p`
2986 if [ "$OPT_VERBOSE" = "yes" ]; then
2987 echo " SGI ($CFG_HOST_ARCH)"
2991 case "$UNAME_MACHINE" in
2993 if [ "$OPT_VERBOSE" = "yes" ]; then
2994 echo " Sun SPARC (sparc)"
3001 if [ "$OPT_VERBOSE" = "yes" ]; then
3002 echo " 64-bit AMD 80x86 (x86_64)"
3004 CFG_HOST_ARCH=x86_64
3007 if [ "$OPT_VERBOSE" = "yes" ]; then
3008 echo " 32-bit Intel 80x86 (i386)"
3016 case "$UNAME_MACHINE" in
3018 if [ "$OPT_VERBOSE" = "yes" ]; then
3019 echo " 32-bit Apple PowerPC (powerpc)"
3023 if [ "$OPT_VERBOSE" = "yes" ]; then
3024 echo " 32-bit Intel 80x86 (i386)"
3028 CFG_HOST_ARCH=macosx
3031 if [ "$OPT_VERBOSE" = "yes" ]; then
3032 echo " 64-bit IBM PowerPC (powerpc)"
3034 CFG_HOST_ARCH=powerpc
3037 if [ "$OPT_VERBOSE" = "yes" ]; then
3038 echo " HP PA-RISC (parisc)"
3040 CFG_HOST_ARCH=parisc
3043 if [ "$OPT_VERBOSE" = "yes" ]; then
3044 echo " 32-bit Intel 80x86 (i386)"
3048 *:*:x86_64|*:*:amd64)
3049 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3050 if [ "$OPT_VERBOSE" = "yes" ]; then
3051 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3055 if [ "$OPT_VERBOSE" = "yes" ]; then
3056 echo " 64-bit AMD 80x86 (x86_64)"
3058 CFG_HOST_ARCH=x86_64
3062 if [ "$OPT_VERBOSE" = "yes" ]; then
3063 echo " 32-bit PowerPC (powerpc)"
3065 CFG_HOST_ARCH=powerpc
3068 if [ "$OPT_VERBOSE" = "yes" ]; then
3069 echo " 64-bit PowerPC (powerpc)"
3071 CFG_HOST_ARCH=powerpc
3074 if [ "$OPT_VERBOSE" = "yes" ]; then
3075 echo " IBM S/390 (s390)"
3080 if [ "$OPT_VERBOSE" = "yes" ]; then
3086 if [ "$OPT_VERBOSE" = "yes" ]; then
3087 echo " Linux on SPARC"
3092 case "$UNAME_MACHINE" in
3094 if [ "$OPT_VERBOSE" = "yes" ]; then
3095 echo " QNX on Intel 80x86 (i386)"
3102 if [ "$OPT_VERBOSE" = "yes" ]; then
3103 echo " Trying '$UNAME_MACHINE'..."
3105 CFG_HOST_ARCH="$UNAME_MACHINE"
3110 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3111 if [ -n "$CFG_ARCH" ]; then
3112 CFG_EMBEDDED=$CFG_ARCH
3115 case "$CFG_EMBEDDED" in
3138 CFG_ARCH="$CFG_EMBEDDED"
3141 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3142 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3143 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3144 CFG_ARCH=$CFG_HOST_ARCH
3151 # previously, armv6 was a different arch
3157 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3158 if [ "$OPT_VERBOSE" = "yes" ]; then
3159 echo " '$CFG_ARCH' is supported"
3162 if [ "$OPT_VERBOSE" = "yes" ]; then
3163 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3167 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3168 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3169 if [ "$OPT_VERBOSE" = "yes" ]; then
3170 echo " '$CFG_HOST_ARCH' is supported"
3173 if [ "$OPT_VERBOSE" = "yes" ]; then
3174 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3176 CFG_HOST_ARCH=generic
3180 if [ "$OPT_VERBOSE" = "yes" ]; then
3181 echo "System architecture: '$CFG_ARCH'"
3182 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3183 echo "Host architecture: '$CFG_HOST_ARCH'"
3187 #-------------------------------------------------------------------------------
3188 # tests that don't need qmake (must be run before displaying help)
3189 #-------------------------------------------------------------------------------
3191 # detect build style
3192 if [ "$CFG_DEBUG" = "auto" ]; then
3193 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3194 CFG_DEBUG_RELEASE=yes
3196 elif [ "$CFG_DEV" = "yes" ]; then
3197 CFG_DEBUG_RELEASE=no
3200 CFG_DEBUG_RELEASE=no
3204 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3205 QT_CONFIG="$QT_CONFIG build_all"
3208 if [ -z "$PKG_CONFIG" ]; then
3209 # See if PKG_CONFIG is set in the mkspec:
3210 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3212 if [ -z "$PKG_CONFIG" ]; then
3213 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3216 # Work out if we can use pkg-config
3217 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3218 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3220 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3221 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3222 echo >&2 "environment!"
3224 if [ -z "$PKG_CONFIG_PATH" ]; then
3226 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3227 echo >&2 "the host compiler's .pc files will be used. This is probably"
3228 echo >&2 "not what you want."
3230 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3232 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3233 echo >&2 "been set. This means your toolchain's .pc files must contain"
3234 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3235 echo >&2 "tests are failing, please check these files."
3240 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3241 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3242 echo >&2 "dependencies"
3248 if [ ! -n "$PKG_CONFIG" ]; then
3249 QT_CONFIG="$QT_CONFIG no-pkg-config"
3252 # process CFG_MAC_ARCHS
3253 if [ "$PLATFORM_MAC" = "yes" ]; then
3254 # check -arch arguments for validity.
3255 ALLOWED="x86 ppc x86_64 ppc64 i386"
3256 # Save the list so we can re-write it using only valid values
3257 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3259 for i in $CFG_MAC_ARCHS_IN
3261 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3262 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3265 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3266 # These are synonymous values
3267 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3268 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3269 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3271 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3272 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3277 # pass on $CFG_SDK to the configure tests.
3278 if [ '!' -z "$CFG_SDK" ]; then
3279 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3282 # find the default framework value
3283 if [ "$CFG_ARCH" = "macosx" ]; then
3284 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3285 CFG_FRAMEWORK="$CFG_SHARED"
3286 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3288 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3296 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3297 TEST_COMPILER="$CXX"
3299 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3300 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3301 if [ -z "$TEST_COMPILER" ]; then
3302 echo "ERROR: Cannot set the compiler for the configuration tests"
3307 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3308 TEST_COMPILER="nacl-gcc"
3312 if [ -n "$CFG_SYSROOT" ]; then
3313 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3314 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3315 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3317 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3321 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3323 # auto-detect precompiled header support
3324 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3325 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3327 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3332 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3334 echo "WARNING: Using universal binaries disables precompiled headers."
3339 #auto-detect DWARF2 on the mac
3340 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3341 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3348 # auto-detect support for -Xarch on the mac
3349 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3350 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3357 # don't autodetect support for separate debug info on objcopy when
3358 # cross-compiling as lots of toolchains seems to have problems with this
3359 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3360 CFG_SEPARATE_DEBUG_INFO="no"
3363 # auto-detect support for separate debug info in objcopy
3364 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3365 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3366 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3367 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3368 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3369 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3370 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3371 CFG_SEPARATE_DEBUG_INFO=no
3375 # binutils on HP-UX is buggy; default to no.
3376 CFG_SEPARATE_DEBUG_INFO=no
3379 CFG_SEPARATE_DEBUG_INFO=yes
3385 # auto-detect -fvisibility support
3386 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3387 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3388 CFG_REDUCE_EXPORTS=no
3390 CFG_REDUCE_EXPORTS=yes
3394 # detect the availability of the -Bsymbolic-functions linker optimization
3395 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3396 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3397 CFG_REDUCE_RELOCATIONS=no
3399 CFG_REDUCE_RELOCATIONS=yes
3403 # auto-detect GNU make support
3404 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3408 # If -opengl wasn't specified, don't try to auto-detect
3409 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3414 if [ "$PLATFORM_MAC" = "yes" ]; then
3415 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3420 # find the default framework value
3421 if [ "$CFG_ARCH" = "macosx" ]; then
3422 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3423 CFG_FRAMEWORK="$CFG_SHARED"
3424 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3426 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3434 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3435 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3436 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3437 # get the darwin version. 10.0.0 and up means snow leopard.
3438 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3439 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3441 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3446 # x11 tests are done after qmake is built
3449 #setup the build parts
3450 if [ -z "$CFG_BUILD_PARTS" ]; then
3451 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3453 # don't build tools by default when cross-compiling
3454 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3455 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3458 for nobuild in $CFG_NOBUILD_PARTS; do
3459 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3461 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3463 # echo "WARNING: libs is a required part of the build."
3465 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3468 #-------------------------------------------------------------------------------
3469 # post process QT_INSTALL_* variables
3470 #-------------------------------------------------------------------------------
3472 if [ -z "$QT_INSTALL_PREFIX" ]; then
3473 if [ "$CFG_DEV" = "yes" ]; then
3474 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3476 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3479 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3481 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3482 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3483 if [ "$PLATFORM_MAC" = "yes" ]; then
3484 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3487 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3490 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3492 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3493 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3494 if [ "$PLATFORM_MAC" = "yes" ]; then
3495 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3500 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3503 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3505 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3506 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3507 if [ "$PLATFORM_MAC" = "yes" ]; then
3508 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3509 QT_INSTALL_LIBS="/Libraries/Frameworks"
3513 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3515 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3517 if [ -z "$QT_INSTALL_BINS" ]; then #default
3518 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3519 if [ "$PLATFORM_MAC" = "yes" ]; then
3520 QT_INSTALL_BINS="/Developer/Applications/Qt"
3523 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3525 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3527 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3528 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3529 if [ "$PLATFORM_MAC" = "yes" ]; then
3530 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3533 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3535 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3537 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3538 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3539 if [ "$PLATFORM_MAC" = "yes" ]; then
3540 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3543 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3545 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3547 if [ -z "$QT_INSTALL_DATA" ]; then #default
3548 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3550 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3552 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3553 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3555 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3557 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3558 if [ "$PLATFORM_MAC" = "yes" ]; then
3559 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3561 QT_INSTALL_SETTINGS=/etc/xdg
3564 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3566 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3567 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3568 if [ "$PLATFORM_MAC" = "yes" ]; then
3569 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3572 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3574 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3577 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3578 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3579 if [ "$PLATFORM_MAC" = "yes" ]; then
3580 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3583 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3585 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3587 #-------------------------------------------------------------------------------
3588 # help - interactive parts of the script _after_ this section please
3589 #-------------------------------------------------------------------------------
3591 # next, emit a usage message if something failed.
3592 if [ "$OPT_HELP" = "yes" ]; then
3593 [ "x$ERROR" = "xyes" ] && echo
3594 if [ "$CFG_NIS" = "no" ]; then
3601 if [ "$CFG_CUPS" = "no" ]; then
3608 if [ "$CFG_ICONV" = "no" ]; then
3615 if [ "$CFG_LARGEFILE" = "no" ]; then
3622 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3629 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3637 if [ "$CFG_XCB" = "no" ]; then
3645 if [ "$CFG_WAYLAND" = "no" ]; then
3652 if [ "$CFG_XINPUT2" = "no" ]; then
3661 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3662 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3663 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3664 [-release] [-debug] [-debug-and-release]
3665 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3666 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3667 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3668 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3669 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3670 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3671 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3672 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3673 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3674 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3675 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3676 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3677 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3678 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3679 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3680 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3681 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3682 [-no-openssl] [-openssl] [-openssl-linked]
3683 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3684 [-no-javascript-jit] [-javascript-jit]
3685 [-no-script] [-script] [-no-scripttools] [-scripttools]
3686 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3687 [-no-location] [-location]
3688 [additional platform specific options (see below)]
3691 Installation options:
3693 -qpa ................ This will enable the QPA build.
3694 QPA is a window system agnostic implementation of Qt.
3696 These are optional, but you may specify install directories.
3698 -prefix <dir> ...... This will install everything relative to <dir>
3699 (default $QT_INSTALL_PREFIX)
3701 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3704 -hostprefix [dir] .. Tools and libraries needed when developing
3705 applications are installed in [dir]. If [dir] is
3706 not given, the current build directory will be used.
3711 * -prefix-install .... Force a sandboxed "local" installation of
3712 Qt. This will install into
3713 $QT_INSTALL_PREFIX, if this option is
3714 disabled then some platforms will attempt a
3715 "system" install by placing default values to
3716 be placed in a system location other than
3719 You may use these to separate different parts of the install:
3721 -bindir <dir> ......... Executables will be installed to <dir>
3722 (default PREFIX/bin)
3723 -libdir <dir> ......... Libraries will be installed to <dir>
3724 (default PREFIX/lib)
3725 -docdir <dir> ......... Documentation will be installed to <dir>
3726 (default PREFIX/doc)
3727 -headerdir <dir> ...... Headers will be installed to <dir>
3728 (default PREFIX/include)
3729 -plugindir <dir> ...... Plugins will be installed to <dir>
3730 (default PREFIX/plugins)
3731 -importdir <dir> ...... Imports for QML will be installed to <dir>
3732 (default PREFIX/imports)
3733 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3735 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3736 (default PREFIX/translations)
3737 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3738 (default PREFIX/etc/settings)
3739 -examplesdir <dir> .... Examples will be installed to <dir>
3740 (default PREFIX/examples)
3741 -testsdir <dir> ....... Tests will be installed to <dir>
3742 (default PREFIX/tests)
3746 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3747 that needs to be evaluated. If the evaluation succeeds, the feature is
3748 included. Here is a short explanation of each option:
3750 * -release ........... Compile and link Qt with debugging turned off.
3751 -debug ............. Compile and link Qt with debugging turned on.
3752 -debug-and-release . Compile and link two versions of Qt, with and without
3753 debugging turned on (Mac only).
3755 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3757 -opensource ........ Compile and link the Open-Source Edition of Qt.
3758 -commercial ........ Compile and link the Commercial Edition of Qt.
3761 * -shared ............ Create and use shared Qt libraries.
3762 -static ............ Create and use static Qt libraries.
3764 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3766 -fast .............. Configure Qt quickly by generating Makefiles only for
3767 library and subdirectory targets. All other Makefiles
3768 are created as wrappers, which will in turn run qmake.
3770 -no-largefile ...... Disables large file support.
3771 + -largefile ......... Enables Qt to access files larger than 4 GB.
3774 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3781 if [ "$CFG_DBUS" = "no" ]; then
3790 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3791 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3793 -no-accessibility .. Do not compile Accessibility support.
3794 * -accessibility ..... Compile Accessibility support.
3796 $SHN -no-stl ............ Do not compile STL support.
3797 $SHY -stl ............... Compile STL support.
3799 -no-sql-<driver> ... Disable SQL <driver> entirely.
3800 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3802 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3805 Possible values for <driver>:
3806 [ $CFG_SQL_AVAILABLE ]
3808 -system-sqlite ..... Use sqlite from the operating system.
3810 -no-qt3support ..... Disables the Qt 3 support functionality.
3811 * -qt3support ........ Enables the Qt 3 support functionality.
3813 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3814 + -xmlpatterns ....... Build the QtXmlPatterns module.
3815 QtXmlPatterns is built if a decent C++ compiler
3816 is used and exceptions are enabled.
3818 -no-multimedia ..... Do not build the QtMultimedia module.
3819 + -multimedia ........ Build the QtMultimedia module.
3821 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3822 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3824 -no-phonon ......... Do not build the Phonon module.
3825 + -phonon ............ Build the Phonon module.
3826 Phonon is built if a decent C++ compiler is used.
3827 -no-phonon-backend.. Do not build the platform phonon plugin.
3828 + -phonon-backend..... Build the platform phonon plugin.
3830 -no-svg ............ Do not build the SVG module.
3831 + -svg ............... Build the SVG module.
3833 -no-webkit ......... Do not build the WebKit module.
3834 + -webkit ............ Build the WebKit module.
3835 WebKit is built if a decent C++ compiler is used.
3836 -webkit-debug ...... Build the WebKit module with debug symbols.
3838 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3839 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3841 -no-script ......... Do not build the QtScript module.
3842 + -script ............ Build the QtScript module.
3844 -no-scripttools .... Do not build the QtScriptTools module.
3845 + -scripttools ....... Build the QtScriptTools module.
3847 -no-v8 ............. Do not build the V8 module.
3848 + -v8 ................ Build the V8 module.
3850 -no-declarative ..... Do not build the declarative module.
3851 + -declarative ....... Build the declarative module.
3853 -no-declarative-debug ..... Do not build the declarative debugging support.
3854 + -declarative-debug ....... Build the declarative debugging support.
3856 -no-location ....... Do not build the QtLocation module.
3857 + -location .......... Build the QtLocation module.
3859 -platform target ... The operating system and compiler you are building
3862 See the README file for a list of supported
3863 operating systems and compilers.
3866 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3868 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3869 raster - Software rasterizer
3870 opengl - Rendering via OpenGL, Experimental!
3871 openvg - Rendering via OpenVG, Experimental!
3878 -no-mmx ............ Do not compile with use of MMX instructions.
3879 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3880 -no-sse ............ Do not compile with use of SSE instructions.
3881 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3882 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3883 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3884 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3885 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3886 -no-avx ............ Do not compile with use of AVX instructions.
3887 -no-neon ........... Do not compile with use of NEON instructions.
3889 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3890 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3892 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3894 -D <string> ........ Add an explicit define to the preprocessor.
3895 -I <string> ........ Add an explicit include path.
3896 -L <string> ........ Add an explicit library path.
3898 -help, -h .......... Display this information.
3900 Third Party Libraries:
3902 -qt-zlib ........... Use the zlib bundled with Qt.
3903 + -system-zlib ....... Use zlib from the operating system.
3904 See http://www.gzip.org/zlib
3906 -no-gif ............ Do not compile GIF reading support.
3908 -no-libtiff ........ Do not compile TIFF support.
3909 -qt-libtiff ........ Use the libtiff bundled with Qt.
3910 + -system-libtiff .... Use libtiff from the operating system.
3911 See http://www.libtiff.org
3913 -no-libpng ......... Do not compile PNG support.
3914 -qt-libpng ......... Use the libpng bundled with Qt.
3915 + -system-libpng ..... Use libpng from the operating system.
3916 See http://www.libpng.org/pub/png
3918 -no-libmng ......... Do not compile MNG support.
3919 -qt-libmng ......... Use the libmng bundled with Qt.
3920 + -system-libmng ..... Use libmng from the operating system.
3921 See http://www.libmng.com
3923 -no-libjpeg ........ Do not compile JPEG support.
3924 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3925 + -system-libjpeg .... Use libjpeg from the operating system.
3926 See http://www.ijg.org
3928 -no-openssl ........ Do not compile support for OpenSSL.
3929 + -openssl ........... Enable run-time OpenSSL support.
3930 -openssl-linked .... Enabled linked OpenSSL support.
3934 -make <part> ....... Add part to the list of parts to be built at make time.
3935 ($QT_DEFAULT_BUILD_PARTS)
3936 -nomake <part> ..... Exclude part from the list of parts to be built.
3938 -R <string> ........ Add an explicit runtime library path to the Qt
3940 -l <string> ........ Add an explicit library.
3942 -no-rpath .......... Do not use the library install path as a runtime
3944 + -rpath ............. Link Qt libraries and executables using the library
3945 install path as a runtime library path. Equivalent
3946 to -R install_libpath
3948 -continue .......... Continue as far as possible if an error occurs.
3950 -verbose, -v ....... Print verbose information about each step of the
3953 -silent ............ Reduce the build output so that warnings and errors
3954 can be seen more easily.
3956 * -no-optimized-qmake ... Do not build qmake optimized.
3957 -optimized-qmake ...... Build qmake optimized.
3959 -no-gui ............ Don't build the Qt GUI library
3961 $NSN -no-nis ............ Do not compile NIS support.
3962 $NSY -nis ............... Compile NIS support.
3964 $CUN -no-cups ........... Do not compile CUPS support.
3965 $CUY -cups .............. Compile CUPS support.
3966 Requires cups/cups.h and libcups.so.2.
3968 $CIN -no-iconv .......... Do not compile support for iconv(3).
3969 $CIY -iconv ............. Compile support for iconv(3).
3971 $PHN -no-pch ............ Do not use precompiled header support.
3972 $PHY -pch ............... Use precompiled header support.
3974 $DBN -no-dbus ........... Do not compile the QtDBus module.
3975 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3976 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3978 -reduce-relocations ..... Reduce relocations in the libraries through extra
3979 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3980 experimental; needs GNU ld >= 2.18).
3982 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3986 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3987 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3994 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4002 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4006 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4007 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4009 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
4010 $XCBY -xcb ............... Compile Xcb support.
4012 $XWN -no-wayland......... Do not compile Wayland support.
4013 $XWY -wayland .......... Compile Wayland support.
4019 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4023 $X2N -no-xinput2......... Do not compile XInput2 support.
4024 $X2Y -xinput2............ Compile XInput2 support.
4030 if [ "$PLATFORM_X11" = "yes" ]; then
4031 if [ "$CFG_SM" = "no" ]; then
4038 if [ "$CFG_XSHAPE" = "no" ]; then
4045 if [ "$CFG_XVIDEO" = "no" ]; then
4052 if [ "$CFG_XINERAMA" = "no" ]; then
4059 if [ "$CFG_FONTCONFIG" = "no" ]; then
4066 if [ "$CFG_XCURSOR" = "no" ]; then
4073 if [ "$CFG_XFIXES" = "no" ]; then
4080 if [ "$CFG_XRANDR" = "no" ]; then
4087 if [ "$CFG_XRENDER" = "no" ]; then
4094 if [ "$CFG_MITSHM" = "no" ]; then
4101 if [ "$CFG_XINPUT" = "no" ]; then
4108 if [ "$CFG_XKB" = "no" ]; then
4115 if [ "$CFG_IM" = "no" ]; then
4126 -no-gtkstyle ....... Do not build the GTK theme integration.
4127 + -gtkstyle .......... Build the GTK theme integration.
4129 * -no-nas-sound ...... Do not compile in NAS sound support.
4130 -system-nas-sound .. Use NAS libaudio from the operating system.
4131 See http://radscan.com/nas.html
4133 -egl ............... Use EGL instead of GLX to manage contexts.
4134 When building for desktop OpenGL, this option will
4135 make Qt use EGL to manage contexts rather than the
4136 GLX, which is the default. Note: For OpenGL ES, EGL
4139 -no-opengl ......... Do not support OpenGL.
4140 + -opengl <api> ...... Enable OpenGL support.
4141 With no parameter, this will auto-detect the "best"
4142 OpenGL API to use. If desktop OpenGL is available, it
4143 will be used. Use desktop or es2 for <api>
4144 to force the use of the Desktop OpenGL or
4145 OpenGL ES 2 APIs instead.
4147 -no-openvg ........ Do not support OpenVG.
4148 + -openvg ........... Enable OpenVG support.
4149 Requires EGL support, typically supplied by an OpenGL
4150 or other graphics implementation.
4152 $SMN -no-sm ............. Do not support X Session Management.
4153 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4155 $SHN -no-xshape ......... Do not compile XShape support.
4156 $SHY -xshape ............ Compile XShape support.
4157 Requires X11/extensions/shape.h.
4159 $XVN -no-xvideo ......... Do not compile XVideo support.
4160 $XVY -xvideo ............ Compile XVideo support.
4161 Requires X11/extensions/Xv.h & Xvlib.h.
4163 $SHN -no-xsync .......... Do not compile XSync support.
4164 $SHY -xsync ............. Compile XSync support.
4165 Requires X11/extensions/sync.h.
4167 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4168 $XAY -xinerama .......... Compile Xinerama support.
4169 Requires X11/extensions/Xinerama.h and libXinerama.
4170 By default, Xinerama support will be compiled if
4171 available and the shared libraries are dynamically
4174 $XCN -no-xcursor ........ Do not compile Xcursor support.
4175 $XCY -xcursor ........... Compile Xcursor support.
4176 Requires X11/Xcursor/Xcursor.h and libXcursor.
4177 By default, Xcursor support will be compiled if
4178 available and the shared libraries are dynamically
4181 $XFN -no-xfixes ......... Do not compile Xfixes support.
4182 $XFY -xfixes ............ Compile Xfixes support.
4183 Requires X11/extensions/Xfixes.h and libXfixes.
4184 By default, Xfixes support will be compiled if
4185 available and the shared libraries are dynamically
4188 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4189 $XZY -xrandr ............ Compile Xrandr support.
4190 Requires X11/extensions/Xrandr.h and libXrandr.
4192 $XRN -no-xrender ........ Do not compile Xrender support.
4193 $XRY -xrender ........... Compile Xrender support.
4194 Requires X11/extensions/Xrender.h and libXrender.
4196 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4197 $XMY -mitshm ............ Compile MIT-SHM support.
4198 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4200 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4201 $FCGY -fontconfig ........ Compile FontConfig support.
4202 Requires fontconfig/fontconfig.h, libfontconfig,
4203 freetype.h and libfreetype.
4205 $XIN -no-xinput ......... Do not compile Xinput support.
4206 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4207 which requires IRIX with wacom.h and libXi or
4208 XFree86 with X11/extensions/XInput.h and libXi.
4210 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4211 $XKY -xkb ............... Compile XKB support.
4216 if [ "$PLATFORM_MAC" = "yes" ]; then
4221 -Fstring ........... Add an explicit framework path.
4222 -fw string ......... Add an explicit framework.
4224 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4226 -carbon .............Build the Carbon version of Qt. 64-bit archs
4227 are not supported by carbon and will be built
4230 * -framework ......... Build Qt as a series of frameworks and
4231 link tools against those frameworks.
4232 -no-framework ...... Do not build Qt as a series of frameworks.
4234 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4235 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4237 -universal ......... Equivalent to -arch "ppc x86"
4239 -arch <arch> ....... Build Qt for <arch>
4240 Example values for <arch>: x86 ppc x86_64 ppc64
4241 Multiple -arch arguments can be specified.
4243 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4244 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4246 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4247 It is only available to Cocoa builds.
4248 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4249 QT_ENABLE_HARFBUZZ environment variable.
4254 if [ "$PLATFORM_QWS" = "yes" ]; then
4256 Qt for Embedded Linux:
4258 -embedded <arch> .... This will enable the embedded build, you must have a
4259 proper license for this switch to work.
4260 Example values for <arch>: arm mips x86 generic
4264 if [ "$PLATFORM_QPA" = "yes" ]; then
4270 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4273 -xplatform target ... The target platform when cross-compiling.
4275 -no-feature-<feature> Do not compile in <feature>.
4276 -feature-<feature> .. Compile in <feature>. The available features
4277 are described in src/corelib/global/qfeatures.txt
4279 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4280 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4282 The floating point format is usually autodetected by configure. Use this
4283 to override the detected value.
4285 -little-endian ...... Target platform is little endian (LSB first).
4286 -big-endian ......... Target platform is big endian (MSB first).
4288 -host-little-endian . Host platform is little endian (LSB first).
4289 -host-big-endian .... Host platform is big endian (MSB first).
4291 You only need to specify the endianness when
4292 cross-compiling, otherwise the host
4293 endianness will be used.
4295 -no-freetype ........ Do not compile in Freetype2 support.
4296 -qt-freetype ........ Use the libfreetype bundled with Qt.
4297 * -system-freetype .... Use libfreetype from the operating system.
4298 See http://www.freetype.org/
4300 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4301 default ($CFG_QCONFIG).
4303 -no-opengl .......... Do not support OpenGL.
4304 -opengl <api> ....... Enable OpenGL ES support
4305 With no parameter, this will attempt to auto-detect
4306 OpenGL ES 2, or regular desktop OpenGL.
4307 Use es2 for <api> to override auto-detection.
4311 if [ "$PLATFORM_QWS" = "yes" ]; then
4314 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4315 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4317 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4318 by default all available decorations are on.
4319 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4320 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4321 linked to at run time.
4322 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4323 -no-decoration-<style> ....Disable decoration <style> entirely.
4324 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4326 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4327 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4328 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4329 linked to at run time.
4330 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4331 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4332 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4334 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4335 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4337 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4339 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4341 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4342 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4344 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4345 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4346 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4348 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4349 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4350 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4352 -iwmmxt ............ Compile using the iWMMXt instruction set
4353 (available on some XScale CPUs).
4357 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4358 if [ "$CFG_GLIB" = "no" ]; then
4366 $GBN -no-glib ........... Do not compile Glib support.
4367 $GBY -glib .............. Compile Glib support.
4372 [ "x$ERROR" = "xyes" ] && exit 1
4377 # -----------------------------------------------------------------------------
4378 # LICENSING, INTERACTIVE PART
4379 # -----------------------------------------------------------------------------
4381 if [ "$PLATFORM_QWS" = "yes" ]; then
4382 Platform="Qt for Embedded Linux"
4383 elif [ "$PLATFORM_QPA" = "yes" ]; then
4384 Platform="Qt Lighthouse"
4385 elif [ "$PLATFORM_MAC" = "yes" ]; then
4386 Platform="Qt for Mac OS X"
4387 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4388 Platform="Qt for Windows"
4389 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4391 Platform="Qt for Linux/X11"
4395 echo "This is the $Platform ${EditionString} Edition."
4398 if [ "$Edition" = "NokiaInternalBuild" ]; then
4399 echo "Detected -nokia-developer option"
4400 echo "Nokia employees and agents are allowed to use this software under"
4401 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4402 elif [ "$Edition" = "OpenSource" ]; then
4404 echo "You are licensed to use this software under the terms of"
4405 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4406 if [ -f "$relpath/LICENSE.GPL3" ]; then
4407 echo "You are also licensed to use this software under the terms of"
4408 echo "the GNU General Public License (GPL) versions 3."
4414 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4415 echo "You have already accepted the terms of the $LicenseType license."
4418 if [ -f "$relpath/LICENSE.GPL3" ]; then
4419 echo "Type '3' to view the GNU General Public License version 3."
4421 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4422 echo "Type 'yes' to accept this license offer."
4423 echo "Type 'no' to decline this license offer."
4425 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4429 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4431 elif [ "$acceptance" = "no" ]; then
4432 echo "You are not licensed to use this software."
4435 elif [ "$acceptance" = "3" ]; then
4436 more "$relpath/LICENSE.GPL3"
4437 elif [ "$acceptance" = "L" ]; then
4438 more "$relpath/LICENSE.LGPL"
4441 elif [ "$Edition" = "Preview" ]; then
4442 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4445 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4446 echo "You have already accepted the terms of the $LicenseType license."
4449 echo "You are licensed to use this software under the terms of"
4450 echo "the $TheLicense"
4452 echo "Type '?' to read the Preview License."
4453 echo "Type 'yes' to accept this license offer."
4454 echo "Type 'no' to decline this license offer."
4456 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4460 if [ "$acceptance" = "yes" ]; then
4462 elif [ "$acceptance" = "no" ] ;then
4463 echo "You are not licensed to use this software."
4466 elif [ "$acceptance" = "?" ]; then
4467 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4470 elif [ "$Edition" != "OpenSource" ]; then
4471 if [ -n "$ExpiryDate" ]; then
4472 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4473 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4474 Today=`date +%Y%m%d`
4475 if [ "$Today" -gt "$ExpiryDate" ]; then
4476 case "$LicenseType" in
4477 Commercial|Academic|Educational)
4478 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4480 echo "NOTICE NOTICE NOTICE NOTICE"
4482 echo " Your support and upgrade period has expired."
4484 echo " You are no longer licensed to use this version of Qt."
4485 echo " Please contact qt-info@nokia.com to renew your support"
4486 echo " and upgrades for this license."
4488 echo "NOTICE NOTICE NOTICE NOTICE"
4493 echo "WARNING WARNING WARNING WARNING"
4495 echo " Your support and upgrade period has expired."
4497 echo " You may continue to use your last licensed release"
4498 echo " of Qt under the terms of your existing license"
4499 echo " agreement. But you are not entitled to technical"
4500 echo " support, nor are you entitled to use any more recent"
4501 echo " Qt releases."
4503 echo " Please contact qt-info@nokia.com to renew your"
4504 echo " support and upgrades for this license."
4506 echo "WARNING WARNING WARNING WARNING"
4513 echo "NOTICE NOTICE NOTICE NOTICE"
4515 echo " Your Evaluation license has expired."
4517 echo " You are no longer licensed to use this software. Please"
4518 echo " contact qt-info@nokia.com to purchase license, or install"
4519 echo " the Qt Open Source Edition if you intend to develop free"
4522 echo "NOTICE NOTICE NOTICE NOTICE"
4529 TheLicense=`head -n 1 "$outpath/LICENSE"`
4531 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4532 echo "You have already accepted the terms of the $TheLicense."
4535 echo "You are licensed to use this software under the terms of"
4536 echo "the $TheLicense."
4538 echo "Type '?' to view the $TheLicense."
4539 echo "Type 'yes' to accept this license offer."
4540 echo "Type 'no' to decline this license offer."
4542 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4546 if [ "$acceptance" = "yes" ]; then
4548 elif [ "$acceptance" = "no" ]; then
4549 echo "You are not licensed to use this software."
4552 else [ "$acceptance" = "?" ]
4553 more "$outpath/LICENSE"
4558 # this should be moved somewhere else
4561 AIX_VERSION=`uname -v`
4562 if [ "$AIX_VERSION" -lt "5" ]; then
4563 QMakeVar add QMAKE_LIBS_X11 -lbind
4570 #-------------------------------------------------------------------------------
4571 # generate qconfig.cpp
4572 #-------------------------------------------------------------------------------
4573 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4575 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4576 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4577 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4578 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4579 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4580 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4581 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4582 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4583 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4584 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4585 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4586 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4587 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4588 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4590 TODAY=`date +%Y-%m-%d`
4591 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4593 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4594 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4596 /* Installation date */
4597 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4601 if [ ! -z "$QT_HOST_PREFIX" ]; then
4602 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4603 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4604 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4605 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4606 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4607 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4608 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4609 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4610 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4611 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4612 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4613 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4615 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4617 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4618 /* Installation Info */
4619 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4620 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4621 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4622 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4623 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4624 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4625 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4626 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4627 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4628 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4629 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4630 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4631 #else // QT_BOOTSTRAPPED
4635 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4636 /* Installation Info */
4637 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4638 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4639 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4640 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4641 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4642 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4643 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4644 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4645 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4646 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4647 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4648 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4651 if [ ! -z "$QT_HOST_PREFIX" ]; then
4652 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4653 #endif // QT_BOOTSTRAPPED
4658 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4659 /* strlen( "qt_lcnsxxxx" ) == 12 */
4660 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4661 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4662 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4663 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4664 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4665 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4666 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4667 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4668 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4669 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4670 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4671 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4672 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4673 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4676 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4677 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4678 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4680 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4681 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4682 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4685 # -----------------------------------------------------------------------------
4686 if [ "$LicenseType" = "Evaluation" ]; then
4687 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4688 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4689 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4692 if [ -n "$EVALKEY" ]; then
4693 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4694 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4695 /* Evaluation license key */
4696 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4698 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4702 # -----------------------------------------------------------------------------
4704 # -----------------------------------------------------------------------------
4707 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4709 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4710 if [ "$OPT_SHADOW" = "yes" ]; then
4711 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4712 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4713 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4718 # $2: optional transformation
4719 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4720 # is where the resulting variable is written to
4721 # Assumes that the optional transformation produces the same variable name for each hit
4722 setBootstrapVariable()
4724 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4730 valStart = index($0, "=") + 1
4733 if (substr($0, valStart - 2, 1) == "+") {
4737 variable = substr($0, 0, valStart - 2 - append)
4738 value = substr($0, valStart)
4739 gsub("[ \t]+", "", variable)
4740 gsub("^[ \t]+", "", value)
4741 gsub("[ \t]+$", "", value)
4743 if (append == 1 && length(combinedValue) > 0) {
4744 combinedValue = combinedValue " " value
4746 combinedValue = value
4750 if (length(combinedValue) > 0) {
4751 printf "%s = %s\n", variable, combinedValue
4757 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4758 echo "Creating qmake. Please wait..."
4761 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4762 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4763 if [ -f "$QCONFIG_H" ]; then
4764 OLD_QCONFIG_H=$QCONFIG_H
4765 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4768 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4769 # when building qmake, we use #defines for the install paths,
4770 # however they are real functions in the library
4771 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4772 mkdir -p "$outpath/src/corelib/global"
4773 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4774 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4777 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4779 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4780 rm -rf mkspecs/default
4781 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4783 for mkfile in GNUmakefile Makefile; do
4786 in_mkfile="${mkfile}.in"
4787 if [ "$mkfile" = "Makefile" ]; then
4788 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4789 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4791 in_mkfile="${mkfile}.unix"
4793 in_mkfile="$relpath/qmake/$in_mkfile"
4794 mkfile="$outpath/qmake/$mkfile"
4795 if [ -f "$mkfile" ]; then
4796 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4799 [ -f "$in_mkfile" ] || continue
4801 echo "########################################################################" > "$mkfile"
4802 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4803 echo "########################################################################" >> "$mkfile"
4806 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4807 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4808 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4810 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4811 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4814 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4815 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4816 if [ "$CFG_SILENT" = "yes" ]; then
4817 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4818 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4820 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4821 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4823 setBootstrapVariable QMAKE_CFLAGS
4824 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4825 setBootstrapVariable QMAKE_LFLAGS
4827 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4828 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4829 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4831 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4832 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4833 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4834 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4835 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4836 elif [ "$CFG_DEBUG" = "yes" ]; then
4837 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4838 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4839 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4840 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4843 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4844 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4845 for rpath in $RPATH_FLAGS; do
4846 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4849 if [ "$BUILD_ON_MAC" = "yes" ]; then
4850 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4851 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4852 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4853 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4854 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4855 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4856 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4857 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4858 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4859 X86_CFLAGS="-arch i386"
4860 X86_LFLAGS="-arch i386"
4861 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4862 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4863 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4865 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4866 PPC_CFLAGS="-arch ppc"
4867 PPC_LFLAGS="-arch ppc"
4868 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4869 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4870 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4872 if [ '!' -z "$CFG_SDK" ]; then
4873 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4874 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4875 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4876 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4877 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4880 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4881 if [ '!' -z "$D_FLAGS" ]; then
4882 for DEF in $D_FLAGS; do
4883 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4886 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4887 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4888 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4889 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4891 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4892 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4893 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4894 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4895 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4896 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4897 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4898 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4899 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4900 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4902 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4903 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4904 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4905 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4910 QMAKE_BUILD_ERROR=no
4911 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4912 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4913 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4914 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4917 #-------------------------------------------------------------------------------
4918 # tests that need qmake
4919 #-------------------------------------------------------------------------------
4921 # detect availability of float math.h functions
4922 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4923 CFG_USE_FLOATMATH=yes
4925 CFG_USE_FLOATMATH=no
4928 # detect mmx support
4929 if [ "${CFG_MMX}" = "auto" ]; then
4930 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4937 # detect 3dnow support
4938 if [ "${CFG_3DNOW}" = "auto" ]; then
4939 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4946 # detect sse support
4947 if [ "${CFG_SSE}" = "auto" ]; then
4948 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4955 # detect sse2 support
4956 if [ "${CFG_SSE2}" = "auto" ]; then
4957 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4964 # detect sse3 support
4965 if [ "${CFG_SSE3}" = "auto" ]; then
4966 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4973 # detect ssse3 support
4974 if [ "${CFG_SSSE3}" = "auto" ]; then
4975 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4982 # detect sse4.1 support
4983 if [ "${CFG_SSE4_1}" = "auto" ]; then
4984 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
4991 # detect sse4.2 support
4992 if [ "${CFG_SSE4_2}" = "auto" ]; then
4993 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
5000 # detect avx support
5001 if [ "${CFG_AVX}" = "auto" ]; then
5002 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5009 # check iWMMXt support
5010 if [ "$CFG_IWMMXT" = "yes" ]; then
5011 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5012 if [ $? != "0" ]; then
5013 echo "The iWMMXt functionality test failed!"
5014 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5019 # detect neon support
5020 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5021 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
5028 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5031 if [ "$CFG_ZLIB" = "no" ]; then
5032 # Note: Qt no longer support builds without zlib
5033 # So we force a "no" to be "auto" here.
5034 # If you REALLY really need no zlib support, you can still disable
5035 # it by doing the following:
5036 # add "no-zlib" to mkspecs/qconfig.pri
5037 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5039 # There's no guarantee that Qt will build under those conditions
5044 if [ "$CFG_ZLIB" = "auto" ]; then
5045 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
5052 if [ "$CFG_LARGEFILE" = "auto" ]; then
5053 #Large files should be enabled for all Linux systems
5057 # detect how jpeg should be built
5058 if [ "$CFG_JPEG" = "auto" ]; then
5059 if [ "$CFG_SHARED" = "yes" ]; then
5066 if [ "$CFG_LIBJPEG" = "auto" ]; then
5067 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
5074 # detect how gif should be built
5075 if [ "$CFG_GIF" = "auto" ]; then
5076 if [ "$CFG_SHARED" = "yes" ]; then
5083 # detect how tiff should be built
5084 if [ "$CFG_TIFF" = "auto" ]; then
5085 if [ "$CFG_SHARED" = "yes" ]; then
5093 if [ "$CFG_LIBTIFF" = "auto" ]; then
5094 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
5101 # detect how mng should be built
5102 if [ "$CFG_MNG" = "auto" ]; then
5103 if [ "$CFG_SHARED" = "yes" ]; then
5110 if [ "$CFG_LIBMNG" = "auto" ]; then
5111 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
5119 if [ "$CFG_LIBPNG" = "auto" ]; then
5120 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
5127 # detect accessibility
5128 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5129 CFG_ACCESSIBILITY=yes
5132 # auto-detect SQL-modules support
5133 for _SQLDR in $CFG_SQL_AVAILABLE; do
5136 if [ "$CFG_SQL_mysql" != "no" ]; then
5137 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5138 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5139 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5140 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5141 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5142 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5143 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5145 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5146 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5147 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5148 echo " You need MySql 4 or higher."
5149 echo " If you believe this message is in error you may use the continue"
5150 echo " switch (-continue) to $0 to continue."
5155 QT_LFLAGS_MYSQL_R=""
5159 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
5160 QMakeVar add CONFIG use_libmysqlclient_r
5161 if [ "$CFG_SQL_mysql" = "auto" ]; then
5162 CFG_SQL_mysql=plugin
5164 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5165 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
5166 if [ "$CFG_SQL_mysql" = "auto" ]; then
5167 CFG_SQL_mysql=plugin
5170 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5171 echo "MySQL support cannot be enabled due to functionality tests!"
5172 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5173 echo " If you believe this message is in error you may use the continue"
5174 echo " switch (-continue) to $0 to continue."
5179 QT_LFLAGS_MYSQL_R=""
5187 if [ "$CFG_SQL_psql" != "no" ]; then
5188 # Be careful not to use native pg_config when cross building.
5189 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5190 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5191 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5193 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5194 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5195 # But, respect PSQL_LIBS if set
5196 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5197 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
5198 if [ "$CFG_SQL_psql" = "auto" ]; then
5202 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5203 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5204 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5205 echo " If you believe this message is in error you may use the continue"
5206 echo " switch (-continue) to $0 to continue."
5217 if [ "$CFG_SQL_odbc" != "no" ]; then
5218 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
5219 if [ "$CFG_SQL_odbc" = "auto" ]; then
5223 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
5224 QT_LFLAGS_ODBC="-liodbc"
5225 if [ "$CFG_SQL_odbc" = "auto" ]; then
5229 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5230 echo "ODBC support cannot be enabled due to functionality tests!"
5231 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5232 echo " If you believe this message is in error you may use the continue"
5233 echo " switch (-continue) to $0 to continue."
5243 if [ "$CFG_SQL_oci" != "no" ]; then
5244 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
5245 if [ "$CFG_SQL_oci" = "auto" ]; then
5249 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5250 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5251 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5252 echo " If you believe this message is in error you may use the continue"
5253 echo " switch (-continue) to $0 to continue."
5262 if [ "$CFG_SQL_tds" != "no" ]; then
5263 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5264 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5265 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
5266 if [ "$CFG_SQL_tds" = "auto" ]; then
5270 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5271 echo "TDS support cannot be enabled due to functionality tests!"
5272 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5273 echo " If you believe this message is in error you may use the continue"
5274 echo " switch (-continue) to $0 to continue."
5283 if [ "$CFG_SQL_db2" != "no" ]; then
5284 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
5285 if [ "$CFG_SQL_db2" = "auto" ]; then
5289 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5290 echo "ODBC support cannot be enabled due to functionality tests!"
5291 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5292 echo " If you believe this message is in error you may use the continue"
5293 echo " switch (-continue) to $0 to continue."
5302 if [ "$CFG_SQL_ibase" != "no" ]; then
5303 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
5304 if [ "$CFG_SQL_ibase" = "auto" ]; then
5305 CFG_SQL_ibase=plugin
5308 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5309 echo "InterBase support cannot be enabled due to functionality tests!"
5310 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5311 echo " If you believe this message is in error you may use the continue"
5312 echo " switch (-continue) to $0 to continue."
5321 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5322 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
5323 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5324 CFG_SQL_sqlite2=plugin
5327 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5328 echo "SQLite2 support cannot be enabled due to functionality tests!"
5329 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5330 echo " If you believe this message is in error you may use the continue"
5331 echo " switch (-continue) to $0 to continue."
5340 if [ "$CFG_SQL_sqlite" != "no" ]; then
5341 SQLITE_AUTODETECT_FAILED="no"
5342 if [ "$CFG_SQLITE" = "system" ]; then
5343 if [ -n "$PKG_CONFIG" ]; then
5344 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5345 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5347 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
5348 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5349 CFG_SQL_sqlite=plugin
5351 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5353 SQLITE_AUTODETECT_FAILED="yes"
5356 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5357 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5358 CFG_SQL_sqlite=plugin
5361 SQLITE_AUTODETECT_FAILED="yes"
5365 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5366 echo "SQLite support cannot be enabled due to functionality tests!"
5367 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5368 echo " If you believe this message is in error you may use the continue"
5369 echo " switch (-continue) to $0 to continue."
5375 if [ "$OPT_VERBOSE" = "yes" ]; then
5376 echo "unknown SQL driver: $_SQLDR"
5382 # auto-detect NIS support
5383 if [ "$CFG_NIS" != "no" ]; then
5384 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
5387 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5388 echo "NIS support cannot be enabled due to functionality tests!"
5389 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5390 echo " If you believe this message is in error you may use the continue"
5391 echo " switch (-continue) to $0 to continue."
5399 # auto-detect CUPS support
5400 if [ "$CFG_CUPS" != "no" ]; then
5401 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
5404 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5405 echo "Cups support cannot be enabled due to functionality tests!"
5406 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5407 echo " If you believe this message is in error you may use the continue"
5408 echo " switch (-continue) to $0 to continue."
5416 # auto-detect iconv(3) support
5417 if [ "$CFG_ICONV" != "no" ]; then
5418 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5420 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
5422 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
5424 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
5427 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5428 echo "Iconv support cannot be enabled due to functionality tests!"
5429 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5430 echo " If you believe this message is in error you may use the continue"
5431 echo " switch (-continue) to $0 to continue."
5439 # auto-detect libdbus-1 support
5440 if [ "$CFG_DBUS" != "no" ]; then
5441 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5442 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5443 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5445 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
5446 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5447 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5448 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5450 if [ "$CFG_DBUS" = "auto" ]; then
5452 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5453 # CFG_DBUS is "yes" or "linked" here
5455 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5456 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5457 echo " If you believe this message is in error you may use the continue"
5458 echo " switch (-continue) to $0 to continue."
5464 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5465 CFG_MULTIMEDIA="$CFG_GUI"
5468 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5469 echo "QtMultimedia requested, but it can't be built without QtGui"
5473 # Generate a CRC of the namespace for using in constants for the Carbon port.
5474 # This should mean that you really *can* load two Qt's and have our custom
5475 # Carbon events work.
5476 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5477 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`
5480 # X11/QWS/Lighthouse
5481 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5483 # auto-detect Glib support
5484 if [ "$CFG_GLIB" != "no" ]; then
5485 if [ -n "$PKG_CONFIG" ]; then
5486 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5487 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5489 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
5491 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5492 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5494 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5495 echo "Glib support cannot be enabled due to functionality tests!"
5496 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5497 echo " If you believe this message is in error you may use the continue"
5498 echo " switch (-continue) to $0 to continue."
5506 if [ "$CFG_GUI" = "no" ]; then
5507 if [ "$CFG_PHONON" = "auto" ]; then
5510 if [ "$CFG_PHONON" != "no" ]; then
5511 echo "Phonon enabled, but GUI disabled."
5512 echo " You might need to either enable the GUI or disable Phonon"
5517 # Auto-detect GStreamer support (needed for Phonon)
5518 if [ "$CFG_PHONON" != "no" ]; then
5519 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5520 if [ -n "$PKG_CONFIG" ]; then
5521 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5522 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5524 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
5526 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5527 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5529 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5530 echo "Gstreamer support cannot be enabled due to functionality tests!"
5531 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5532 echo " If you believe this message is in error you may use the continue"
5533 echo " switch (-continue) to $0 to continue."
5539 elif [ "$CFG_GLIB" = "no" ]; then
5546 if [ "$CFG_PHONON" != "no" ]; then
5547 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5548 if [ "$CFG_GSTREAMER" = "yes" ]; then
5551 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5552 echo "Phonon support cannot be enabled due to functionality tests!"
5553 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5554 echo " If you believe this message is in error you may use the continue"
5555 echo " switch (-continue) to $0 to continue."
5566 # auto-detect icd support
5567 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5568 if [ -n "$PKG_CONFIG" ]; then
5569 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5570 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5572 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
5573 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5574 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5575 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5577 if [ "$CFG_ICD" = "auto" ]; then
5579 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5582 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5583 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5584 echo " If you believe this message is in error you may use the continue"
5585 echo " switch (-continue) to $0 to continue."
5589 elif [ "$CFG_GLIB" = "no" ]; then
5593 # auto-detect libicu support
5594 if [ "$CFG_ICU" != "no" ]; then
5595 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5596 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5598 if [ "$CFG_ICU" = "auto" ]; then
5600 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5603 echo "The ICU library support cannot be enabled."
5604 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5605 echo " If you believe this message is in error you may use the continue"
5606 echo " switch (-continue) to $0 to continue."
5612 # Auto-detect PulseAudio support
5613 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5614 if [ -n "$PKG_CONFIG" ]; then
5615 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5616 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5618 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
5620 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5621 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5623 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5624 echo "PulseAudio support cannot be enabled due to functionality tests!"
5625 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5626 echo " If you believe this message is in error you may use the continue"
5627 echo " switch (-continue) to $0 to continue."
5634 fi # X11/QWS/Lighthouse
5637 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5638 x11tests="$relpath/config.tests/x11"
5641 # work around broken X11 headers when using GCC 2.95 or later
5643 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5644 if [ $NOTYPE = "yes" ]; then
5645 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5646 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5649 # Check we actually have X11 :-)
5650 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5651 if [ $? != "0" ]; then
5652 echo "Basic XLib functionality test failed!"
5653 echo " You might need to modify the include and library search paths by editing"
5654 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5660 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5661 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5662 if [ "$CFG_GUI" = "no" ]; then
5663 if [ "$CFG_OPENGL" = "auto" ]; then
5666 if [ "$CFG_OPENGL" != "no" ]; then
5667 echo "OpenGL enabled, but GUI disabled."
5668 echo " You might need to either enable the GUI or disable OpenGL"
5672 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5673 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
5675 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
5677 if [ "$CFG_EGL" = "no" ]; then
5681 if [ "$CFG_OPENGL" = "yes" ]; then
5682 echo "All the OpenGL functionality tests failed!"
5683 echo " You might need to modify the include and library search paths by editing"
5684 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5685 echo " ${XQMAKESPEC}."
5692 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5693 if [ "$CFG_OPENGL" = "desktop" ]; then
5694 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5695 if [ $? != "0" ]; then
5696 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5703 elif [ "$CFG_OPENGL" = "es2" ]; then
5705 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5706 if [ $? != "0" ]; then
5707 echo "The OpenGL ES 2.0 functionality test failed!"
5708 echo " You might need to modify the include and library search paths by editing"
5709 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5710 echo " ${XQMAKESPEC}."
5713 elif [ "$CFG_OPENGL" = "desktop" ]; then
5714 # Desktop OpenGL support
5715 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5716 if [ $? != "0" ]; then
5717 echo "The OpenGL functionality test failed!"
5718 echo " You might need to modify the include and library search paths by editing"
5719 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5720 echo " ${XQMAKESPEC}."
5725 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5726 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5727 if [ $? != "0" ]; then
5728 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5735 fi # X11/MINGW OpenGL
5738 if [ "$PLATFORM_X11" = "yes" ]; then
5739 # auto-detect Xcursor support
5740 if [ "$CFG_XCURSOR" != "no" ]; then
5741 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
5742 if [ "$CFG_XCURSOR" != "runtime" ]; then
5746 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5747 echo "Xcursor support cannot be enabled due to functionality tests!"
5748 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5749 echo " If you believe this message is in error you may use the continue"
5750 echo " switch (-continue) to $0 to continue."
5758 # auto-detect Xfixes support
5759 if [ "$CFG_XFIXES" != "no" ]; then
5760 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5761 if [ "$CFG_XFIXES" != "runtime" ]; then
5765 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5766 echo "Xfixes support cannot be enabled due to functionality tests!"
5767 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5768 echo " If you believe this message is in error you may use the continue"
5769 echo " switch (-continue) to $0 to continue."
5777 # auto-detect Xrandr support (resize and rotate extension)
5778 if [ "$CFG_XRANDR" != "no" ]; then
5779 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
5780 if [ "$CFG_XRANDR" != "runtime" ]; then
5784 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5785 echo "Xrandr support cannot be enabled due to functionality tests!"
5786 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5787 echo " If you believe this message is in error you may use the continue"
5788 echo " switch (-continue) to $0 to continue."
5796 # auto-detect Xrender support
5797 if [ "$CFG_XRENDER" != "no" ]; then
5798 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
5801 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5802 echo "Xrender support cannot be enabled due to functionality tests!"
5803 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5804 echo " If you believe this message is in error you may use the continue"
5805 echo " switch (-continue) to $0 to continue."
5813 # Additional check to decide if WebKit support will be included
5814 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5815 echo "Warning: -no-xrender will disable the QtWebkit module."
5819 # auto-detect MIT-SHM support
5820 if [ "$CFG_MITSHM" != "no" ]; then
5821 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
5824 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5825 echo "MITSHM support cannot be enabled due to functionality tests!"
5826 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5827 echo " If you believe this message is in error you may use the continue"
5828 echo " switch (-continue) to $0 to continue."
5836 # auto-detect FontConfig support
5837 if [ "$CFG_FONTCONFIG" != "no" ]; then
5838 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5839 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5840 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5842 QT_CFLAGS_FONTCONFIG=
5843 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5845 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
5847 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5848 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5849 CFG_LIBFREETYPE=system
5851 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5852 echo "FontConfig support cannot be enabled due to functionality tests!"
5853 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5854 echo " If you believe this message is in error you may use the continue"
5855 echo " switch (-continue) to $0 to continue."
5863 # auto-detect Session Management support
5864 if [ "$CFG_SM" = "auto" ]; then
5865 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
5868 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5869 echo "Session Management support cannot be enabled due to functionality tests!"
5870 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5871 echo " If you believe this message is in error you may use the continue"
5872 echo " switch (-continue) to $0 to continue."
5880 # auto-detect SHAPE support
5881 if [ "$CFG_XSHAPE" != "no" ]; then
5882 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
5885 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5886 echo "XShape support cannot be enabled due to functionality tests!"
5887 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5888 echo " If you believe this message is in error you may use the continue"
5889 echo " switch (-continue) to $0 to continue."
5897 # auto-detect XVideo support
5898 if [ "$CFG_XVIDEO" != "no" ]; then
5899 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
5902 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5903 echo "XVideo support cannot be enabled due to functionality tests!"
5904 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5905 echo " If you believe this message is in error you may use the continue"
5906 echo " switch (-continue) to $0 to continue."
5914 # auto-detect XSync support
5915 if [ "$CFG_XSYNC" != "no" ]; then
5916 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
5919 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5920 echo "XSync support cannot be enabled due to functionality tests!"
5921 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5922 echo " If you believe this message is in error you may use the continue"
5923 echo " switch (-continue) to $0 to continue."
5931 # auto-detect Xinerama support
5932 if [ "$CFG_XINERAMA" != "no" ]; then
5933 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
5934 if [ "$CFG_XINERAMA" != "runtime" ]; then
5938 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5939 echo "Xinerama support cannot be enabled due to functionality tests!"
5940 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5941 echo " If you believe this message is in error you may use the continue"
5942 echo " switch (-continue) to $0 to continue."
5950 # auto-detect Xinput support
5951 if [ "$CFG_XINPUT" != "no" ]; then
5952 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
5953 if [ "$CFG_XINPUT" != "runtime" ]; then
5957 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5958 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5959 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5960 echo " If you believe this message is in error you may use the continue"
5961 echo " switch (-continue) to $0 to continue."
5969 # auto-detect XKB support
5970 if [ "$CFG_XKB" != "no" ]; then
5971 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
5974 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5975 echo "XKB support cannot be enabled due to functionality tests!"
5976 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5977 echo " If you believe this message is in error you may use the continue"
5978 echo " switch (-continue) to $0 to continue."
5986 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5987 if [ -n "$PKG_CONFIG" ]; then
5988 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5989 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5991 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5993 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5994 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5996 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5997 echo "Gtk theme support cannot be enabled due to functionality tests!"
5998 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5999 echo " If you believe this message is in error you may use the continue"
6000 echo " switch (-continue) to $0 to continue."
6006 elif [ "$CFG_GLIB" = "no" ]; then
6012 if [ "$PLATFORM_MAC" = "yes" ]; then
6013 if [ "$CFG_PHONON" != "no" ]; then
6014 # Always enable Phonon (unless it was explicitly disabled)
6018 if [ "$CFG_COREWLAN" = "auto" ]; then
6019 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
6028 if [ "$PLATFORM_QPA" = "yes" ]; then
6029 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6030 if [ "$CFG_ARCH" = "macosx" ]; then
6032 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6033 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
6035 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
6038 if [ "$CFG_OPENGL" = "yes" ]; then
6039 echo "All the OpenGL functionality tests failed!"
6040 echo " You might need to modify the include and library search paths by editing"
6041 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6042 echo " ${XQMAKESPEC}."
6047 elif [ "$CFG_OPENGL" = "es2" ]; then
6049 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6050 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6051 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6052 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6053 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6054 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6055 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6056 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6059 "$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
6060 if [ $? != "0" ]; then
6061 echo "The OpenGL ES 2.0 functionality test failed!"
6062 echo " You might need to modify the include and library search paths by editing"
6063 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6064 echo " ${XQMAKESPEC}."
6067 elif [ "$CFG_OPENGL" = "desktop" ]; then
6068 # Desktop OpenGL support
6069 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6070 if [ $? != "0" ]; then
6071 echo "The OpenGL functionality test failed!"
6072 echo " You might need to modify the include and library search paths by editing"
6073 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6074 echo " ${XQMAKESPEC}."
6079 # auto-detect FontConfig support
6080 if [ "$CFG_FONTCONFIG" != "no" ]; then
6081 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6082 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6083 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6085 QT_CFLAGS_FONTCONFIG=
6086 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6088 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
6089 QT_CONFIG="$QT_CONFIG fontconfig"
6090 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6091 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6092 CFG_LIBFREETYPE=system
6097 # Save these for a check later
6098 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6099 ORIG_CFG_XCB="$CFG_XCB"
6101 if [ "$CFG_WAYLAND" != "no" ]; then
6102 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6103 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6104 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6105 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6106 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6108 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
6110 QT_CONFIG="$QT_CONFIG wayland"
6111 elif [ "$CFG_WAYLAND" = "yes" ]; then
6112 echo "The Wayland functionality test failed!"
6116 QMakeVar add DEFINES QT_NO_WAYLAND
6120 # Check we actually have X11 :-)
6121 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
6122 QT_CONFIG="$QT_CONFIG xlib"
6125 if [ "$CFG_XCB" != "no" ]; then
6126 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6128 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
6129 QT_CONFIG="$QT_CONFIG xcb-render"
6132 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
6134 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6137 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
6138 QT_CONFIG="$QT_CONFIG xcb-xlib"
6141 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6142 # auto-detect XInput2/Xinput support
6143 if [ "$CFG_XINPUT2" != "no" ]; then
6144 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
6148 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6149 echo "XInput2 support cannot be enabled due to functionality tests!"
6150 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6151 echo " If you believe this message is in error you may use the continue"
6152 echo " switch (-continue) to $0 to continue."
6161 if [ "$CFG_XCB" = "yes" ]; then
6162 echo "The XCB test failed!"
6163 echo " You might need to install dependency packages."
6164 echo " See src/plugins/platforms/xcb/README."
6168 QMakeVar add DEFINES QT_NO_XCB
6172 # Detect libxkbcommon
6173 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6174 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6175 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6176 if [ "$CFG_WAYLAND" = "yes" ]; then
6177 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6178 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6180 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6181 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6183 if [ "$CFG_WAYLAND" = "yes" ]; then
6184 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6186 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6189 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6190 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6191 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6192 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6193 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6194 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6195 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6198 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6199 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6200 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6201 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6204 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
6205 QT_CONFIG="$QT_CONFIG coreservices"
6207 QMakeVar add DEFINES QT_NO_CORESERVICES
6210 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6211 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6212 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6213 echo "No QPA platform plugin enabled!"
6214 echo " If you really want to build without a QPA platform plugin you must pass"
6215 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6216 echo " cannot run GUI applications."
6226 if [ "$PLATFORM_QWS" = "yes" ]; then
6228 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6229 if [ "$CFG_GUI" = "no" ]; then
6230 if [ "$CFG_OPENGL" = "auto" ]; then
6233 if [ "$CFG_OPENGL" != "no" ]; then
6234 echo "OpenGL enabled, but GUI disabled."
6235 echo " You might need to either enable the GUI or disable OpenGL"
6239 if [ "$CFG_OPENGL" = "yes" ]; then
6241 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
6244 elif [ "$CFG_OPENGL" = "es2" ]; then
6246 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6247 if [ $? != "0" ]; then
6248 echo "The OpenGL ES 2.0 functionality test failed!"
6249 echo " You might need to modify the include and library search paths by editing"
6250 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6251 echo " ${XQMAKESPEC}."
6255 elif [ "$CFG_OPENGL" = "desktop" ]; then
6256 # Desktop OpenGL support
6257 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6262 if [ "$PLATFORM_QWS" = "yes" ]; then
6265 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6266 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6267 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6268 if [ $? != "0" ]; then
6269 echo "The Ahi screen driver functionality test failed!"
6270 echo " You might need to modify the include and library search paths by editing"
6271 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6272 echo " ${XQMAKESPEC}."
6277 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6278 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6279 if [ $? != "0" ]; then
6280 echo "The SVGAlib screen driver functionality test failed!"
6281 echo " You might need to modify the include and library search paths by editing"
6282 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6283 echo " ${XQMAKESPEC}."
6288 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6289 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6290 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6291 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6292 elif directfb-config --version >/dev/null 2>&1; then
6293 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6294 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6297 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6298 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6299 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6300 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6303 "$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
6304 if [ $? != "0" ]; then
6305 echo "The DirectFB screen driver functionality test failed!"
6306 echo " You might need to modify the include and library search paths by editing"
6307 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6308 echo " ${XQMAKESPEC}."
6316 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6317 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6318 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6319 if [ $? != "0" ]; then
6320 echo "The tslib functionality test failed!"
6321 echo " You might need to modify the include and library search paths by editing"
6322 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6323 echo " ${XQMAKESPEC}."
6332 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6333 if [ $? != "0" ]; then
6334 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6341 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6342 if [ "$CFG_EGL" != "no" ]; then
6343 # detect EGL support
6344 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
6345 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6350 if [ "$EGL_VARIANT" = "none" ]; then
6351 if [ "$CFG_EGL" = "yes" ]; then
6352 echo "The EGL functionality test failed!"
6353 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6354 echo " You might need to modify the include and library search paths by editing"
6355 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6356 echo " ${XQMAKESPEC}."
6360 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6361 if [ "$CFG_OPENGL" = "es2" ]; then
6368 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6371 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6372 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6373 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6374 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6375 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
6376 CFG_LIBFREETYPE=system
6382 if [ "$CFG_ENDIAN" = "auto" ]; then
6383 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6384 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6385 elif [ "$PLATFORM_MAC" = "yes" ]; then
6388 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6390 if [ "$F" -eq 0 ]; then
6391 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6392 elif [ "$F" -eq 1 ]; then
6393 CFG_ENDIAN="Q_BIG_ENDIAN"
6396 echo "The target system byte order could not be detected!"
6397 echo "Turn on verbose messaging (-v) to see the final report."
6398 echo "You can use the -little-endian or -big-endian switch to"
6399 echo "$0 to continue."
6405 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6406 if [ "$PLATFORM_MAC" = "yes" ]; then
6409 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6411 if [ "$F" -eq 0 ]; then
6412 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6413 elif [ "$F" -eq 1 ]; then
6414 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6417 echo "The host system byte order could not be detected!"
6418 echo "Turn on verbose messaging (-v) to see the final report."
6419 echo "You can use the -host-little-endian or -host-big-endian switch to"
6420 echo "$0 to continue."
6426 if [ "$CFG_ARMFPA" != "auto" ]; then
6427 if [ "$CFG_ARMFPA" = "yes" ]; then
6428 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6429 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6431 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6434 CFG_DOUBLEFORMAT="normal"
6439 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6440 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6441 CFG_DOUBLEFORMAT=normal
6443 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6445 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6446 CFG_DOUBLEFORMAT=normal
6447 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6448 CFG_DOUBLEFORMAT=normal
6449 elif [ "$F" -eq 10 ]; then
6450 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6451 elif [ "$F" -eq 11 ]; then
6452 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6453 elif [ "$F" -eq 12 ]; then
6454 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6456 elif [ "$F" -eq 13 ]; then
6457 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6461 echo "The system floating point format could not be detected."
6462 echo "This may cause data to be generated in a wrong format"
6463 echo "Turn on verbose messaging (-v) to see the final report."
6464 # we do not fail on this since this is a new test, and if it fails,
6465 # the old behavior should be correct in most cases
6466 CFG_DOUBLEFORMAT=normal
6472 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6476 if [ "$CFG_STL" != "no" ]; then
6477 if [ "$HAVE_STL" = "yes" ]; then
6480 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6481 echo "STL support cannot be enabled due to functionality tests!"
6482 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6483 echo " If you believe this message is in error you may use the continue"
6484 echo " switch (-continue) to $0 to continue."
6492 # detect POSIX clock_gettime()
6493 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6494 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
6495 CFG_CLOCK_GETTIME=yes
6497 CFG_CLOCK_GETTIME=no
6501 # detect POSIX monotonic clocks
6502 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6503 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
6504 CFG_CLOCK_MONOTONIC=yes
6506 CFG_CLOCK_MONOTONIC=no
6508 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6509 CFG_CLOCK_MONOTONIC=no
6513 if [ "$CFG_MREMAP" = "auto" ]; then
6514 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6521 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6522 if [ "$CFG_GETADDRINFO" != "no" ]; then
6523 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6526 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6527 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6528 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6529 echo " If you believe this message is in error you may use the continue"
6530 echo " switch (-continue) to $0 to continue."
6538 # find if the platform provides inotify
6539 if [ "$CFG_INOTIFY" != "no" ]; then
6540 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6543 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6544 echo "inotify support cannot be enabled due to functionality tests!"
6545 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6546 echo " If you believe this message is in error you may use the continue"
6547 echo " switch (-continue) to $0 to continue."
6555 # find if the platform provides if_nametoindex (ipv6 interface name support)
6556 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6557 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
6560 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6561 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6562 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6563 echo " If you believe this message is in error you may use the continue"
6564 echo " switch (-continue) to $0 to continue."
6572 # find if the platform provides getifaddrs (network interface enumeration)
6573 if [ "$CFG_GETIFADDRS" != "no" ]; then
6574 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6577 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6578 echo "getifaddrs support cannot be enabled due to functionality tests!"
6579 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6580 echo " If you believe this message is in error you may use the continue"
6581 echo " switch (-continue) to $0 to continue."
6590 if [ "$CFG_OPENSSL" != "no" ]; then
6591 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
6592 if [ "$CFG_OPENSSL" = "auto" ]; then
6596 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6597 echo "OpenSSL support cannot be enabled due to functionality tests!"
6598 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6599 echo " If you believe this message is in error you may use the continue"
6600 echo " switch (-continue) to $0 to continue."
6608 # detect OpenVG support
6609 if [ "$CFG_OPENVG" != "no" ]; then
6610 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
6611 if [ "$CFG_OPENVG" = "auto" ]; then
6614 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
6615 if [ "$CFG_OPENVG" = "auto" ]; then
6618 CFG_OPENVG_ON_OPENGL=yes
6619 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
6620 if [ "$CFG_OPENVG" = "auto" ]; then
6623 CFG_OPENVG_LC_INCLUDES=yes
6624 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
6625 if [ "$CFG_OPENVG" = "auto" ]; then
6628 CFG_OPENVG_LC_INCLUDES=yes
6629 CFG_OPENVG_ON_OPENGL=yes
6631 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6632 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6633 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6634 echo " If you believe this message is in error you may use the continue"
6635 echo " switch (-continue) to $0 to continue."
6641 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
6642 CFG_OPENVG_SHIVA=yes
6646 if [ "$CFG_ALSA" = "auto" ]; then
6647 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6654 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6655 if [ "$CFG_ARCH" = "arm" ]; then
6656 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6657 if [ $? != "0" ]; then
6658 CFG_JAVASCRIPTCORE_JIT=no
6661 case "$XPLATFORM" in
6663 CFG_JAVASCRIPTCORE_JIT=no
6669 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6670 QMakeVar set JAVASCRIPTCORE_JIT yes
6671 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6672 QMakeVar set JAVASCRIPTCORE_JIT no
6675 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6676 CFG_AUDIO_BACKEND=yes
6679 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6680 echo "Warning: largefile support cannot be disabled for win32."
6684 #-------------------------------------------------------------------------------
6685 # ask for all that hasn't been auto-detected or specified in the arguments
6686 #-------------------------------------------------------------------------------
6688 ### fix this: user input should be validated in a loop
6689 if [ "$PLATFORM_QWS" = "yes" ]; then
6690 PROMPT_FOR_DEPTHS="yes"
6692 PROMPT_FOR_DEPTHS="no"
6694 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6696 echo "Choose pixel-depths to support:"
6698 echo " 1. 1bpp, black/white"
6699 echo " 4. 4bpp, grayscale"
6700 echo " 8. 8bpp, paletted"
6701 echo " 12. 12bpp, rgb 4-4-4"
6702 echo " 15. 15bpp, rgb 5-5-5"
6703 echo " 16. 16bpp, rgb 5-6-5"
6704 echo " 18. 18bpp, rgb 6-6-6"
6705 echo " 24. 24bpp, rgb 8-8-8"
6706 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6707 echo " all. All supported depths"
6709 echo "Your choices (default 8,16,32):"
6711 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6712 CFG_QWS_DEPTHS=8,16,32
6715 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6716 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6717 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6719 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6721 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6722 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6727 # enable dwarf2 support on Mac
6728 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6729 QT_CONFIG="$QT_CONFIG dwarf2"
6732 # Set the default arch if there are no "-arch" arguments on the configure line
6733 # For "-carbon" builds: 32 bit x86/ppc.
6734 # For builds on snow leopard : compiler default (64-bit).
6735 # For builds on leopard : compiler default (32-bit).
6736 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6737 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6739 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6740 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6741 CFG_MAC_ARCHS=" x86"
6742 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6743 CFG_MAC_ARCHS=" ppc"
6745 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6748 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6751 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6754 # enable Cocoa and/or Carbon on Mac
6755 # -carbon on the command line disables Cocoa, except for 64-bit archs
6756 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6757 CFG_MAC_CARBON="YES"
6760 # check which archs are in use, enable cocoa if we find a 64-bit one
6761 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6762 CFG_MAC_COCOA="yes";
6763 CFG_MAC_CARBON="no";
6764 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6765 CFG_MAC_CARBON="yes";
6767 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6768 CFG_MAC_CARBON="yes";
6773 # select Carbon on 10.4 Tiger.
6774 if [ "$PLATFORM_MAC" = "yes" ]; then
6775 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6776 if [ "$VERSION" == 8 ]; then
6778 CFG_MAC_CARBON="yes";
6782 # select Carbon when using the 10.4u SDK
6783 if [ "$PLATFORM_MAC" = "yes" ]; then
6784 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6787 CFG_MAC_CARBON="yes";
6791 # but disable Cocoa if cross-building for mingw
6792 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6794 # disable Qt 3 support on VxWorks
6795 case "$XPLATFORM" in
6796 unsupported/vxworks*)
6801 # enable Qt 3 support functionality
6802 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6803 QT_CONFIG="$QT_CONFIG gui-qt3support"
6807 if [ "$CFG_PHONON" = "yes" ]; then
6808 # No longer needed after modularization
6809 #QT_CONFIG="$QT_CONFIG phonon"
6810 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6811 QT_CONFIG="$QT_CONFIG phonon-backend"
6814 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6817 # disable accessibility
6818 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6819 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6821 QT_CONFIG="$QT_CONFIG accessibility"
6824 # egl stuff does not belong in lighthouse, but rather in plugins
6825 if [ "$PLATFORM_QPA" = "yes" ]; then
6830 if [ "$CFG_EGL" = "no" ]; then
6831 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6833 QT_CONFIG="$QT_CONFIG egl"
6834 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6835 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6840 if [ "$CFG_OPENVG" = "no" ]; then
6841 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6843 QT_CONFIG="$QT_CONFIG openvg"
6844 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6845 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6847 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6848 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6850 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6851 QT_CONFIG="$QT_CONFIG shivavg"
6852 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6857 if [ "$CFG_OPENGL" = "no" ]; then
6858 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6860 QT_CONFIG="$QT_CONFIG opengl"
6863 if [ "$CFG_OPENGL" = "es2" ]; then
6864 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6867 if [ "$CFG_OPENGL" = "es2" ]; then
6868 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6869 QT_CONFIG="$QT_CONFIG opengles2"
6872 # safe execution environment
6873 if [ "$CFG_SXE" != "no" ]; then
6874 QT_CONFIG="$QT_CONFIG sxe"
6877 # build up the variables for output
6878 if [ "$CFG_DEBUG" = "yes" ]; then
6879 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6880 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6881 elif [ "$CFG_DEBUG" = "no" ]; then
6882 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6883 QMAKE_CONFIG="$QMAKE_CONFIG release"
6885 if [ "$CFG_SHARED" = "yes" ]; then
6886 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6887 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6888 elif [ "$CFG_SHARED" = "no" ]; then
6889 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6890 QMAKE_CONFIG="$QMAKE_CONFIG static"
6892 if [ "$PLATFORM_QWS" = "yes" ]; then
6893 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6894 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6895 QT_CONFIG="$QT_CONFIG embedded"
6896 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6898 if [ "$PLATFORM_QPA" = "yes" ]; then
6899 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6900 QT_CONFIG="$QT_CONFIG qpa"
6901 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6902 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6905 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6906 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6907 QT_CONFIG="$QT_CONFIG nacl pepper"
6908 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6911 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6912 # Do not set this here for Windows. Let qmake do it so
6913 # debug and release precompiled headers are kept separate.
6914 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6916 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6917 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6918 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6919 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6920 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6921 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6923 if [ "$CFG_STL" = "no" ]; then
6924 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6926 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6928 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6929 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6931 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6932 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6933 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6934 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6935 QMakeVar add QMAKE_CFLAGS -g
6936 QMakeVar add QMAKE_CXXFLAGS -g
6937 QT_CONFIG="$QT_CONFIG separate_debug_info"
6939 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6940 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6942 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6943 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6944 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6945 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6946 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6947 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6948 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6949 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6950 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6951 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6952 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6953 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6954 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6955 QT_CONFIG="$QT_CONFIG clock-gettime"
6957 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6958 QT_CONFIG="$QT_CONFIG clock-monotonic"
6960 if [ "$CFG_MREMAP" = "yes" ]; then
6961 QT_CONFIG="$QT_CONFIG mremap"
6963 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6964 QT_CONFIG="$QT_CONFIG getaddrinfo"
6966 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6967 QT_CONFIG="$QT_CONFIG ipv6ifname"
6969 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6970 QT_CONFIG="$QT_CONFIG getifaddrs"
6972 if [ "$CFG_INOTIFY" = "yes" ]; then
6973 QT_CONFIG="$QT_CONFIG inotify"
6975 if [ "$CFG_LIBJPEG" = "no" ]; then
6977 elif [ "$CFG_LIBJPEG" = "system" ]; then
6978 QT_CONFIG="$QT_CONFIG system-jpeg"
6980 if [ "$CFG_JPEG" = "no" ]; then
6981 QT_CONFIG="$QT_CONFIG no-jpeg"
6982 elif [ "$CFG_JPEG" = "yes" ]; then
6983 QT_CONFIG="$QT_CONFIG jpeg"
6985 if [ "$CFG_LIBMNG" = "no" ]; then
6987 elif [ "$CFG_LIBMNG" = "system" ]; then
6988 QT_CONFIG="$QT_CONFIG system-mng"
6990 if [ "$CFG_MNG" = "no" ]; then
6991 QT_CONFIG="$QT_CONFIG no-mng"
6992 elif [ "$CFG_MNG" = "yes" ]; then
6993 QT_CONFIG="$QT_CONFIG mng"
6995 if [ "$CFG_LIBPNG" = "no" ]; then
6998 if [ "$CFG_LIBPNG" = "system" ]; then
6999 QT_CONFIG="$QT_CONFIG system-png"
7001 if [ "$CFG_PNG" = "no" ]; then
7002 QT_CONFIG="$QT_CONFIG no-png"
7003 elif [ "$CFG_PNG" = "yes" ]; then
7004 QT_CONFIG="$QT_CONFIG png"
7006 if [ "$CFG_GIF" = "no" ]; then
7007 QT_CONFIG="$QT_CONFIG no-gif"
7008 elif [ "$CFG_GIF" = "yes" ]; then
7009 QT_CONFIG="$QT_CONFIG gif"
7011 if [ "$CFG_LIBTIFF" = "no" ]; then
7013 elif [ "$CFG_LIBTIFF" = "system" ]; then
7014 QT_CONFIG="$QT_CONFIG system-tiff"
7016 if [ "$CFG_TIFF" = "no" ]; then
7017 QT_CONFIG="$QT_CONFIG no-tiff"
7018 elif [ "$CFG_TIFF" = "yes" ]; then
7019 QT_CONFIG="$QT_CONFIG tiff"
7021 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7022 QT_CONFIG="$QT_CONFIG no-freetype"
7023 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7024 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7025 QT_CONFIG="$QT_CONFIG system-freetype"
7027 QT_CONFIG="$QT_CONFIG freetype"
7029 if [ "$CFG_GUI" = "auto" ]; then
7032 if [ "$CFG_GUI" = "no" ]; then
7033 QT_CONFIG="$QT_CONFIG no-gui"
7035 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7039 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7040 #On Mac we implicitly link against libz, so we
7041 #never use the 3rdparty stuff.
7042 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7044 if [ "$CFG_ZLIB" = "yes" ]; then
7045 QT_CONFIG="$QT_CONFIG zlib"
7046 elif [ "$CFG_ZLIB" = "system" ]; then
7047 QT_CONFIG="$QT_CONFIG system-zlib"
7050 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7051 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7052 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7053 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7054 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7055 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7056 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7057 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7058 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7059 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7060 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7061 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7062 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7063 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7064 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7066 if [ "$PLATFORM_X11" = "yes" ]; then
7067 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7069 # for some reason, the following libraries are not always built shared,
7070 # so *every* program/lib (including Qt) has to link against them
7071 if [ "$CFG_XSHAPE" = "yes" ]; then
7072 QT_CONFIG="$QT_CONFIG xshape"
7074 if [ "$CFG_XVIDEO" = "yes" ]; then
7075 QT_CONFIG="$QT_CONFIG xvideo"
7077 if [ "$CFG_XSYNC" = "yes" ]; then
7078 QT_CONFIG="$QT_CONFIG xsync"
7080 if [ "$CFG_XINERAMA" = "yes" ]; then
7081 QT_CONFIG="$QT_CONFIG xinerama"
7082 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7084 if [ "$CFG_XCURSOR" = "yes" ]; then
7085 QT_CONFIG="$QT_CONFIG xcursor"
7086 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7088 if [ "$CFG_XFIXES" = "yes" ]; then
7089 QT_CONFIG="$QT_CONFIG xfixes"
7090 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7092 if [ "$CFG_XRANDR" = "yes" ]; then
7093 QT_CONFIG="$QT_CONFIG xrandr"
7094 if [ "$CFG_XRENDER" != "yes" ]; then
7095 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7096 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7098 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7101 if [ "$CFG_XRENDER" = "yes" ]; then
7102 QT_CONFIG="$QT_CONFIG xrender"
7103 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7105 if [ "$CFG_MITSHM" = "yes" ]; then
7106 QT_CONFIG="$QT_CONFIG mitshm"
7108 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7109 QT_CONFIG="$QT_CONFIG fontconfig"
7111 if [ "$CFG_XINPUT" = "yes" ]; then
7112 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7114 if [ "$CFG_XINPUT" = "yes" ]; then
7115 QT_CONFIG="$QT_CONFIG xinput tablet"
7117 if [ "$CFG_XKB" = "yes" ]; then
7118 QT_CONFIG="$QT_CONFIG xkb"
7122 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7123 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7124 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7126 if [ "$CFG_ARCH" = "macosx" ]; then
7127 if [ "$CFG_RPATH" = "yes" ]; then
7128 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7130 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7131 if [ -n "$RPATH_FLAGS" ]; then
7133 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7137 elif [ "$CFG_RPATH" = "yes" ]; then
7138 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7142 if [ "$CFG_RPATH" = "yes" ]; then
7143 # set the default rpath to the library installation directory
7144 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7146 if [ -n "$RPATH_FLAGS" ]; then
7147 # add the user defined rpaths
7148 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7152 if [ '!' -z "$I_FLAGS" ]; then
7153 # add the user define include paths
7154 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7155 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7158 if [ '!' -z "$W_FLAGS" ]; then
7159 # add the user defined warning flags
7160 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7161 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7162 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7165 # turn off exceptions for the compilers that support it
7166 if [ "$PLATFORM_QWS" = "yes" ]; then
7167 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7168 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7169 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7171 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7173 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7177 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7178 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7181 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7182 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7183 # Follow default behavior of configure.exe by overriding with "rtti".
7184 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7187 if [ "$CFG_ALSA" = "yes" ]; then
7188 QT_CONFIG="$QT_CONFIG alsa"
7191 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7192 QT_CONFIG="$QT_CONFIG pulseaudio"
7195 if [ "$CFG_COREWLAN" = "yes" ]; then
7196 QT_CONFIG="$QT_CONFIG corewlan"
7199 if [ "$CFG_ICD" = "yes" ]; then
7200 QT_CONFIG="$QT_CONFIG icd"
7203 if [ "$CFG_ICU" = "yes" ]; then
7204 QT_CONFIG="$QT_CONFIG icu"
7207 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
7208 QT_CONFIG="$QT_CONFIG force_asserts"
7212 # Some Qt modules are too advanced in C++ for some old compilers
7213 # Detect here the platforms where they are known to work.
7215 # See Qt documentation for more information on which features are
7216 # supported and on which compilers.
7218 canBuildQtXmlPatterns="yes"
7219 canBuildWebKit="$HAVE_STL"
7220 canBuildQtConcurrent="yes"
7222 canUseV8Snapshot="yes"
7224 # WebKit requires stdint.h
7225 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7226 if [ $? != "0" ]; then
7230 case "$XPLATFORM" in
7232 # PA-RISC's assembly is too limited
7233 # gcc 3.4 on that platform can't build QtXmlPatterns
7234 # the assembly it generates cannot be compiled
7236 # Check gcc's version
7237 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7241 canBuildQtXmlPatterns="no"
7245 canBuildQtXmlPatterns="no"
7249 unsupported/vxworks-*-g++*)
7252 unsupported/vxworks-*-dcc*)
7254 canBuildQtXmlPatterns="no"
7257 # Check gcc's version
7258 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7266 canBuildQtXmlPatterns="no"
7271 # Check the compiler version
7272 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7275 canBuildQtXmlPatterns="no"
7276 canBuildQtConcurrent="no"
7280 canBuildQtConcurrent="no"
7286 canBuildQtXmlPatterns="no"
7287 canBuildQtConcurrent="no"
7293 # Get the xlC version
7294 cat > xlcver.c <<EOF
7298 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7303 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7304 xlcver=`./xlcver 2>/dev/null`
7307 if [ "$OPT_VERBOSE" = "yes" ]; then
7308 if [ -n "$xlcver" ]; then
7309 echo Found IBM xlC version: $xlcver.
7311 echo Could not determine IBM xlC version, assuming oldest supported.
7318 canBuildQtXmlPatterns="no"
7319 canBuildQtConcurrent="no"
7323 canBuildQtConcurrent="no"
7329 canBuildQtConcurrent="no"
7333 if [ "$CFG_GUI" = "no" ]; then
7334 # WebKit requires QtGui
7338 if [ "$CFG_SHARED" = "no" ]; then
7340 echo "WARNING: Using static linking will disable the WebKit module."
7345 CFG_CONCURRENT="yes"
7346 if [ "$canBuildQtConcurrent" = "no" ]; then
7347 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7350 QT_CONFIG="$QT_CONFIG concurrent"
7353 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7354 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7357 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7358 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7359 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7360 CFG_XMLPATTERNS="no"
7362 # No longer needed after modularization
7363 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7364 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7366 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7369 # No longer needed after modularization
7370 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7371 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7373 # QT_CONFIG="$QT_CONFIG multimedia"
7376 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7377 QT_CONFIG="$QT_CONFIG audio-backend"
7380 if [ "$CFG_SVG" = "auto" ]; then
7384 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7385 echo "QtSvg requested, but it can't be built without QtGui"
7389 if [ "$CFG_SVG" = "yes" ]; then
7390 QT_CONFIG="$QT_CONFIG svg"
7392 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7395 if [ "$CFG_WEBKIT" != "no" ]; then
7396 CFG_WEBKIT="$canBuildWebKit"
7399 if [ "$CFG_WEBKIT" != "no" ]; then
7400 # No longer needed after modularization
7401 #QT_CONFIG="$QT_CONFIG webkit"
7402 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7403 if [ "$CFG_WEBKIT" = "debug" ]; then
7404 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7408 if [ "$CFG_SCRIPT" = "auto" ]; then
7412 # No longer needed after modularization
7413 #if [ "$CFG_SCRIPT" = "yes" ]; then
7414 # QT_CONFIG="$QT_CONFIG script"
7416 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7419 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7420 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7423 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7424 CFG_SCRIPTTOOLS="yes"
7425 elif [ "$CFG_SCRIPT" = "no" ]; then
7426 CFG_SCRIPTTOOLS="no"
7429 # No longer needed after modularization
7430 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7431 # QT_CONFIG="$QT_CONFIG scripttools"
7433 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7438 i386|x86_64|arm|mips|macosx) ;;
7439 *) canBuildV8="no";;
7442 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7443 echo "Error: V8 was requested, but is not supported on this platform."
7447 if [ "$CFG_V8" = "auto" ]; then
7448 CFG_V8="$canBuildV8"
7451 if [ "$CFG_V8" = "no" ]; then
7452 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7454 QT_CONFIG="$QT_CONFIG v8"
7455 # Detect snapshot support
7456 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7457 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7460 *) canUseV8Snapshot="no"
7464 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7465 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7467 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7468 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7471 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7472 QT_CONFIG="$QT_CONFIG v8snapshot"
7476 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7477 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7478 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7482 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7483 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7490 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7491 # No longer needed after modularization
7492 #QT_CONFIG="$QT_CONFIG declarative"
7493 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7494 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7497 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7500 if [ "$CFG_LOCATION" = "auto" ]; then
7501 CFG_LOCATION="$CFG_GUI"
7504 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7505 echo "QtLocation requested, but it can't be built without QtGui"
7509 #Disable QtLocation until ready
7512 if [ "$CFG_LOCATION" = "no" ]; then
7513 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7516 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7519 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7520 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7521 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7526 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7527 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7528 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7535 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7538 # On Mac, set the minimum deployment target for the different architechtures
7539 # using the Xarch compiler option when supported (10.5 and up).
7540 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7541 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7542 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7543 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7544 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7545 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7547 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7548 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7549 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7550 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7551 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7553 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7554 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7555 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7556 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7557 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7559 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7560 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7561 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7562 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7563 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7570 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7572 case "$COMPILER_VERSION" in
7574 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7575 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7576 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7579 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7580 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7581 QT_GCC_PATCH_VERSION=0
7591 #-------------------------------------------------------------------------------
7592 # part of configuration information goes into qconfig.h
7593 #-------------------------------------------------------------------------------
7595 case "$CFG_QCONFIG" in
7597 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7600 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7601 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7602 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7603 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7604 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7605 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7607 echo "#endif" >>"$tmpconfig"
7611 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7615 # define QT_EDITION $QT_EDITION
7618 /* Machine byte-order */
7619 #define Q_BIG_ENDIAN 4321
7620 #define Q_LITTLE_ENDIAN 1234
7623 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7624 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7625 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7626 #if defined(__BIG_ENDIAN__)
7627 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7628 #elif defined(__LITTLE_ENDIAN__)
7629 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7631 # error "Unable to determine byte order!"
7635 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7637 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7638 if [ "$CFG_ENDIAN" = "auto" ]; then
7639 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7640 #if defined(__BIG_ENDIAN__)
7641 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7642 #elif defined(__LITTLE_ENDIAN__)
7643 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7645 # error "Unable to determine byte order!"
7649 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7651 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7653 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7654 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7655 /* Non-IEEE double format */
7656 #define Q_DOUBLE_LITTLE "01234567"
7657 #define Q_DOUBLE_BIG "76543210"
7658 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7659 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7660 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7663 if [ "$CFG_ARMFPA" = "yes" ]; then
7664 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7665 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7666 #ifndef QT_BOOTSTRAPPED
7671 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7675 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7676 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7677 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7678 /* Machine Architecture */
7679 #ifndef QT_BOOTSTRAPPED
7680 # define QT_ARCH_${CFG_ARCH_STR}
7682 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7686 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7687 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7689 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7690 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7693 # if both carbon and cocoa are specified, enable the autodetection code.
7694 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7695 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7696 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7697 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7700 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7701 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7704 if [ "$PLATFORM_MAC" = "yes" ]; then
7705 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7706 #if defined(__LP64__)
7707 # define QT_POINTER_SIZE 8
7709 # define QT_POINTER_SIZE 4
7713 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7714 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7718 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7720 if [ "$CFG_DEV" = "yes" ]; then
7721 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7724 # Embedded compile time options
7725 if [ "$PLATFORM_QWS" = "yes" ]; then
7726 # Add QWS to config.h
7727 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7729 # Add excluded decorations to $QCONFIG_FLAGS
7730 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7731 for decor in $decors; do
7732 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7733 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7736 # Figure which embedded drivers which are turned off
7737 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7738 for ADRIVER in $CFG_GFX_ON; do
7739 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7742 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7743 # the um driver is currently not in the available list for external builds
7744 if [ "$CFG_DEV" = "no" ]; then
7745 CFG_KBD_OFF="$CFG_KBD_OFF um"
7747 for ADRIVER in $CFG_KBD_ON; do
7748 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7751 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7752 for ADRIVER in $CFG_MOUSE_ON; do
7753 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7756 for DRIVER in $CFG_GFX_OFF; do
7757 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7758 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7761 for DRIVER in $CFG_KBD_OFF; do
7762 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7763 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7766 for DRIVER in $CFG_MOUSE_OFF; do
7767 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7768 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7772 if [ "$PLATFORM_QPA" = "yes" ]; then
7773 # Add QPA to config.h
7774 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7777 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7778 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7781 # Add turned on SQL drivers
7782 for DRIVER in $CFG_SQL_AVAILABLE; do
7783 eval "VAL=\$CFG_SQL_$DRIVER"
7786 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7787 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7788 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7791 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7797 QMakeVar set sql-drivers "$SQL_DRIVERS"
7798 QMakeVar set sql-plugins "$SQL_PLUGINS"
7800 # Add other configuration options to the qconfig.h file
7801 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7802 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7803 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7804 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7805 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7806 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7807 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7808 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7809 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7811 # ATM we need this define to compile Qt. Remove later!
7812 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7814 # X11/Unix/Mac only configs
7815 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7816 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7817 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7818 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7819 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7820 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7821 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7822 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7823 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7824 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7825 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7826 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7827 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7828 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7829 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7831 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7832 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7833 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7834 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7835 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7836 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7837 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7838 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7839 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7840 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7841 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7842 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7843 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7845 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7846 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7847 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7848 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7849 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7850 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7851 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7852 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7853 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
7855 # sort QCONFIG_FLAGS for neatness if we can
7856 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7857 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7859 if [ -n "$QCONFIG_FLAGS" ]; then
7860 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7861 #ifndef QT_BOOTSTRAPPED
7864 for cfg in $QCONFIG_FLAGS; do
7865 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7866 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7867 # figure out define logic, so we can output the correct
7868 # ifdefs to override the global defines in a project
7870 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7871 # QT_NO_option can be forcefully turned on by QT_option
7872 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7873 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7874 # QT_option can be forcefully turned off by QT_NO_option
7875 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7878 if [ -z $cfgdNeg ]; then
7879 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7886 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7887 #if defined($cfgd) && defined($cfgdNeg)
7889 #elif !defined($cfgd) && !defined($cfgdNeg)
7896 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7897 #endif // QT_BOOTSTRAPPED
7902 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7903 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7904 #define QT_VISIBILITY_AVAILABLE
7909 if [ -n "$QT_LIBINFIX" ]; then
7910 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7911 #define QT_LIBINFIX "$QT_LIBINFIX"
7916 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7917 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7918 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7920 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7921 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7922 chmod -w "$outpath/src/corelib/global/qconfig.h"
7923 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7924 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7928 #-------------------------------------------------------------------------------
7929 # save configuration into qconfig.pri
7930 #-------------------------------------------------------------------------------
7931 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7932 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7933 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7934 if [ "$CFG_DEBUG" = "yes" ]; then
7935 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7936 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7937 QT_CONFIG="$QT_CONFIG release"
7939 QT_CONFIG="$QT_CONFIG debug"
7940 elif [ "$CFG_DEBUG" = "no" ]; then
7941 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7942 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7943 QT_CONFIG="$QT_CONFIG debug"
7945 QT_CONFIG="$QT_CONFIG release"
7947 if [ "$CFG_STL" = "yes" ]; then
7948 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7950 if [ "$CFG_FRAMEWORK" = "no" ]; then
7951 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7953 QT_CONFIG="$QT_CONFIG qt_framework"
7954 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7956 if [ "$PLATFORM_MAC" = "yes" ]; then
7957 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7959 if [ "$CFG_DEV" = "yes" ]; then
7960 QT_CONFIG="$QT_CONFIG private_tests"
7963 # Make the application arch follow the Qt arch for single arch builds.
7964 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7965 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7966 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7969 cat >>"$QTCONFIG.tmp" <<EOF
7971 CONFIG += $QTCONFIG_CONFIG
7973 QT_EDITION = $Edition
7974 QT_CONFIG += $QT_CONFIG
7977 QT_VERSION = $QT_VERSION
7978 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7979 QT_MINOR_VERSION = $QT_MINOR_VERSION
7980 QT_PATCH_VERSION = $QT_PATCH_VERSION
7983 QT_LIBINFIX = $QT_LIBINFIX
7984 QT_NAMESPACE = $QT_NAMESPACE
7985 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7988 if [ -n "$CFG_SYSROOT" ]; then
7989 echo "# sysroot" >>"$QTCONFIG.tmp"
7990 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7991 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7992 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7993 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7994 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7995 echo "}" >> "$QTCONFIG.tmp"
7996 echo >> "$QTCONFIG.tmp"
7998 if [ "$CFG_RPATH" = "yes" ]; then
7999 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8001 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8002 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8003 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8004 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8007 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8008 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
8009 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8012 # replace qconfig.pri if it differs from the newly created temp file
8013 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8014 rm -f "$QTCONFIG.tmp"
8016 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8019 #-------------------------------------------------------------------------------
8020 # save configuration into qmodule.pri
8021 #-------------------------------------------------------------------------------
8022 QTMODULE="$outpath/mkspecs/qmodule.pri"
8024 # Ensure we can link to uninistalled libraries
8025 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8026 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8028 if [ -n "$QT_CFLAGS_PSQL" ]; then
8029 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8031 if [ -n "$QT_LFLAGS_PSQL" ]; then
8032 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8034 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8035 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8037 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8038 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8040 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8041 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8043 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8044 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8046 if [ -n "$QT_LFLAGS_ODBC" ]; then
8047 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8049 if [ -n "$QT_LFLAGS_TDS" ]; then
8050 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8053 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8054 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8057 #dump in the OPENSSL_LIBS info
8058 if [ '!' -z "$OPENSSL_LIBS" ]; then
8059 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8060 elif [ "$CFG_OPENSSL" = "linked" ]; then
8061 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8064 #dump in the SDK info
8065 if [ '!' -z "$CFG_SDK" ]; then
8066 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8069 # mac gcc -Xarch support
8070 if [ "$CFG_MAC_XARCH" = "no" ]; then
8071 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8075 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8076 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8078 # replace qmodule.pri if it differs from the newly created temp file
8079 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8080 rm -f "$QTMODULE.tmp"
8082 mv -f "$QTMODULE.tmp" "$QTMODULE"
8085 #-------------------------------------------------------------------------------
8086 # save configuration into .qmake.cache
8087 #-------------------------------------------------------------------------------
8089 CACHEFILE="$outpath/.qmake.cache"
8090 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8091 cat >>"$CACHEFILE.tmp" <<EOF
8093 QT_SOURCE_TREE = \$\$quote($relpath)
8094 QT_BUILD_TREE = \$\$quote($outpath)
8095 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8097 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8098 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8099 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8100 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8101 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8102 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8103 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8105 include(\$\$PWD/mkspecs/qmodule.pri)
8106 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8107 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8108 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8112 #dump the qmake spec
8113 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8114 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8116 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8121 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8122 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8123 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8124 # don't need to worry about generated files
8125 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8126 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8128 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8130 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8131 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8134 # replace .qmake.cache if it differs from the newly created temp file
8135 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8136 rm -f "$CACHEFILE.tmp"
8138 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8141 #-------------------------------------------------------------------------------
8142 # give feedback on configuration
8143 #-------------------------------------------------------------------------------
8147 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8150 This target is using the GNU C++ compiler ($PLATFORM).
8152 Recent versions of this compiler automatically include code for
8153 exceptions, which increase both the size of the Qt libraries and
8154 the amount of memory taken by your applications.
8156 You may choose to re-run `basename $0` with the -no-exceptions
8157 option to compile Qt without exceptions. This is completely binary
8158 compatible, and existing applications will continue to work.
8166 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8169 This target is using the MIPSpro C++ compiler ($PLATFORM).
8171 You may choose to re-run `basename $0` with the -no-exceptions
8172 option to compile Qt without exceptions. This will make the
8173 size of the Qt library smaller and reduce the amount of memory
8174 taken by your applications.
8185 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8187 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8188 in debug mode will run out of memory on systems with 2GB or less.
8189 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8190 -no-webkit or -release to skip webkit debug.
8195 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8196 echo "Build type: $PLATFORM"
8198 echo "Building on: $PLATFORM"
8199 echo "Building for: $XPLATFORM"
8202 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8203 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8205 echo "Architecture: $CFG_ARCH"
8208 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8209 echo "Host architecture: $CFG_HOST_ARCH"
8212 if [ "$PLATFORM_MAC" = "yes" ]; then
8213 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8214 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8215 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8217 echo "Using framework: Cocoa"
8220 echo "Using framework: Carbon"
8224 if [ -n "$PLATFORM_NOTES" ]; then
8225 echo "Platform notes:"
8226 echo "$PLATFORM_NOTES"
8231 if [ "$OPT_VERBOSE" = "yes" ]; then
8232 echo $ECHO_N "qmake vars .......... $ECHO_C"
8233 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8234 echo "qmake switches ......... $QMAKE_SWITCHES"
8237 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8238 echo "Build .................. $CFG_BUILD_PARTS"
8239 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8240 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8241 echo "Debug .................. yes (combined)"
8242 if [ "$CFG_DEBUG" = "yes" ]; then
8243 echo "Default Link ........... debug"
8245 echo "Default Link ........... release"
8248 echo "Debug .................. $CFG_DEBUG"
8250 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8251 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8252 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8253 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8254 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8255 echo "QtGui module ........... $CFG_GUI"
8256 echo "QtScript module ........ $CFG_SCRIPT"
8257 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8258 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8259 echo "Phonon module .......... $CFG_PHONON"
8260 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8261 echo "SVG module ............. $CFG_SVG"
8262 case "$CFG_WEBKIT" in
8263 yes) echo "WebKit module .......... yes" ;;
8264 debug) echo "WebKit module .......... yes (debug)" ;;
8265 no) echo "WebKit module .......... no" ;;
8267 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8268 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8269 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8271 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8274 echo "V8 module .............. $CFG_V8"
8275 echo "Declarative module ..... $CFG_DECLARATIVE"
8276 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8277 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8279 echo "Location module ........ $CFG_LOCATION"
8280 echo "STL support ............ $CFG_STL"
8281 echo "PCH support ............ $CFG_PRECOMPILE"
8282 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8283 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8284 echo "AVX..................... ${CFG_AVX}"
8285 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8286 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8287 echo "NEON support ........... ${CFG_NEON}"
8289 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8290 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8291 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8292 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8293 echo "NIS support ............ $CFG_NIS"
8294 echo "CUPS support ........... $CFG_CUPS"
8295 echo "Iconv support .......... $CFG_ICONV"
8296 echo "Glib support ........... $CFG_GLIB"
8297 echo "GStreamer support ...... $CFG_GSTREAMER"
8298 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8299 echo "Large File support ..... $CFG_LARGEFILE"
8300 echo "GIF support ............ $CFG_GIF"
8301 if [ "$CFG_TIFF" = "no" ]; then
8302 echo "TIFF support ........... $CFG_TIFF"
8304 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8306 if [ "$CFG_JPEG" = "no" ]; then
8307 echo "JPEG support ........... $CFG_JPEG"
8309 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8311 if [ "$CFG_PNG" = "no" ]; then
8312 echo "PNG support ............ $CFG_PNG"
8314 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8316 if [ "$CFG_MNG" = "no" ]; then
8317 echo "MNG support ............ $CFG_MNG"
8319 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8321 echo "zlib support ........... $CFG_ZLIB"
8322 echo "Session management ..... $CFG_SM"
8323 if [ "$PLATFORM_QWS" = "yes" ]; then
8324 echo "Embedded support ....... $CFG_EMBEDDED"
8325 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8326 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8328 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8330 # Normalize the decoration output first
8331 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8332 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8333 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8334 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8335 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8336 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8337 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8338 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8339 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8340 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8341 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8342 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8343 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8344 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8345 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8346 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8348 if [ "$CFG_OPENGL" = "desktop" ]; then
8349 echo "OpenGL support ......... yes (Desktop OpenGL)"
8350 elif [ "$CFG_OPENGL" = "es2" ]; then
8351 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8353 echo "OpenGL support ......... no"
8355 if [ "$CFG_EGL" != "no" ]; then
8356 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8357 echo "EGL support ............ yes <GLES/egl.h>"
8359 echo "EGL support ............ yes <EGL/egl.h>"
8362 if [ "$CFG_OPENVG" ]; then
8363 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8364 echo "OpenVG support ......... ShivaVG"
8366 echo "OpenVG support ......... $CFG_OPENVG"
8369 if [ "$PLATFORM_X11" = "yes" ]; then
8370 echo "NAS sound support ...... $CFG_NAS"
8371 echo "XShape support ......... $CFG_XSHAPE"
8372 echo "XVideo support ......... $CFG_XVIDEO"
8373 echo "XSync support .......... $CFG_XSYNC"
8374 echo "Xinerama support ....... $CFG_XINERAMA"
8375 echo "Xcursor support ........ $CFG_XCURSOR"
8376 echo "Xfixes support ......... $CFG_XFIXES"
8377 echo "Xrandr support ......... $CFG_XRANDR"
8378 echo "Xrender support ........ $CFG_XRENDER"
8379 echo "Xi support ............. $CFG_XINPUT"
8380 echo "MIT-SHM support ........ $CFG_MITSHM"
8381 echo "FontConfig support ..... $CFG_FONTCONFIG"
8382 echo "XKB Support ............ $CFG_XKB"
8383 echo "immodule support ....... $CFG_IM"
8384 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8386 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8387 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8388 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8389 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8390 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8391 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8392 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8393 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8394 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8397 if [ "$CFG_OPENSSL" = "yes" ]; then
8398 OPENSSL_LINKAGE="(run-time)"
8399 elif [ "$CFG_OPENSSL" = "linked" ]; then
8400 OPENSSL_LINKAGE="(linked)"
8402 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8403 echo "Alsa support ........... $CFG_ALSA"
8404 if [ "$PLATFORM_MAC" = "yes" ]; then
8405 echo "CoreWlan support ....... $CFG_COREWLAN"
8407 echo "ICD support ............ $CFG_ICD"
8408 echo "libICU support ......... $CFG_ICU"
8409 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8410 echo "Xcb support ............ limited (old version)"
8412 echo "Xcb support ............ $CFG_XCB"
8414 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8415 echo "XInput2 support ........ $CFG_XINPUT2"
8419 # complain about not being able to use dynamic plugins if we are using a static build
8420 if [ "$CFG_SHARED" = "no" ]; then
8422 echo "WARNING: Using static linking will disable the use of dynamically"
8423 echo "loaded plugins. Make sure to import all needed static plugins,"
8424 echo "or compile needed modules into the library."
8427 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8429 echo "NOTE: When linking against OpenSSL, you can override the default"
8430 echo "library names through OPENSSL_LIBS."
8432 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8435 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8437 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8438 echo "if you want a pure debug build."
8443 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8448 #-------------------------------------------------------------------------------
8449 # build makefiles based on the configuration
8450 #-------------------------------------------------------------------------------
8452 echo "Finding project files. Please wait..."
8453 if [ "$CFG_NOPROCESS" != "yes" ]; then
8454 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8455 if [ -f "${relpath}/qtbase.pro" ]; then
8456 mkfile="${outpath}/Makefile"
8457 [ -f "$mkfile" ] && chmod +w "$mkfile"
8458 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8462 # .projects -> projects to process
8463 # .projects.1 -> qt and moc
8464 # .projects.2 -> subdirs and libs
8465 # .projects.3 -> the rest
8466 rm -f .projects .projects.1 .projects.2 .projects.3
8468 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8469 if [ -z "$AWK" ]; then
8470 for p in `echo $QMAKE_PROJECTS`; do
8471 echo "$p" >> .projects
8474 cat >projects.awk <<EOF
8480 first = "./.projects.1.tmp"
8481 second = "./.projects.2.tmp"
8482 third = "./.projects.3.tmp"
8487 if ( ! target_file )
8489 print input_file >target_file
8494 input_file = FILENAME
8499 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8502 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8503 target_file = second
8508 matched_target == 0 && /^(TEMPLATE.*=)/ {
8509 if ( \$3 == "subdirs" )
8510 target_file = second
8511 else if ( \$3 == "lib" )
8517 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8518 if ( \$0 ~ /plugin/ )
8521 target_file = second
8526 if ( ! target_file )
8528 print input_file >>target_file
8535 for p in `echo $QMAKE_PROJECTS`; do
8536 echo "$p" >> .projects.all
8539 # if you get errors about the length of the command line to awk, change the -l arg
8541 split -l 100 .projects.all .projects.all.
8542 for p in .projects.all.*; do
8543 "$AWK" -f projects.awk `cat $p`
8544 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8545 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8546 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8547 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8549 rm -f .projects.all* projects.awk
8551 [ -f .projects.1 ] && cat .projects.1 >>.projects
8552 [ -f .projects.2 ] && cat .projects.2 >>.projects
8553 rm -f .projects.1 .projects.2
8554 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8555 cat .projects.3 >>.projects
8559 # don't sort Qt and MOC in with the other project files
8560 # also work around a segfaulting uniq(1)
8561 if [ -f .sorted.projects.2 ]; then
8562 sort .sorted.projects.2 > .sorted.projects.2.new
8563 mv -f .sorted.projects.2.new .sorted.projects.2
8564 cat .sorted.projects.2 >> .sorted.projects.1
8566 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8567 rm -f .sorted.projects.2 .sorted.projects.1
8571 if [ -f .projects ]; then
8572 uniq .projects >.tmp
8573 mv -f .tmp .projects
8574 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8576 if [ -f .projects.3 ]; then
8577 uniq .projects.3 >.tmp
8578 mv -f .tmp .projects.3
8579 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8581 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8585 for part in $CFG_BUILD_PARTS; do
8587 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8588 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8589 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8590 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8595 if [ "$CFG_DEV" = "yes" ]; then
8596 PART_ROOTS="$PART_ROOTS tests"
8599 echo "Creating makefiles. Please wait..."
8600 for file in .projects .projects.3; do
8601 [ '!' -f "$file" ] && continue
8602 for a in `cat $file`; do
8604 for r in $PART_ROOTS; do
8605 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8610 [ "$IN_ROOT" = "no" ] && continue
8613 *winmain/winmain.pro)
8614 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8618 *examples/activeqt/*) continue ;;
8619 */qmake/qmake.pro) continue ;;
8620 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8621 *tools/mkv8snapshot/*)
8622 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8628 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8634 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8635 test -d "$dir" || mkdir -p "$dir"
8636 OUTDIR="$outpath/$dir"
8637 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8638 # fast configure - the makefile exists, skip it
8639 # since the makefile exists, it was generated by qmake, which means we
8640 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8642 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8645 QMAKE_SPEC_ARGS="-spec $SPEC"
8646 echo $ECHO_N " for $a$ECHO_C"
8648 QMAKE="$outpath/bin/qmake"
8649 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8650 if [ "$file" = ".projects.3" ]; then
8653 cat >"${OUTDIR}/Makefile" <<EOF
8654 # ${OUTDIR}/Makefile: generated by configure
8656 # WARNING: This makefile will be replaced with a real makefile.
8657 # All changes made to this file will be lost.
8659 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8661 cat >>"${OUTDIR}/Makefile" <<EOF
8663 all clean install qmake first Makefile: FORCE
8664 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8672 if [ "$OPT_VERBOSE" = "yes" ]; then
8673 echo " (`basename $SPEC`)"
8674 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8679 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8680 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8684 rm -f .projects .projects.3
8686 #-------------------------------------------------------------------------------
8687 # check for platforms that we don't yet know about
8688 #-------------------------------------------------------------------------------
8689 if [ "$CFG_ARCH" = "generic" ]; then
8692 NOTICE: Atomic operations are not yet supported for this
8695 Qt will use the 'generic' architecture instead, which uses a
8696 single pthread_mutex_t to protect all atomic operations. This
8697 implementation is the slow (but safe) fallback implementation
8698 for architectures Qt does not yet support.
8702 #-------------------------------------------------------------------------------
8703 # check if the user passed the -no-zlib option, which is no longer supported
8704 #-------------------------------------------------------------------------------
8705 if [ -n "$ZLIB_FORCED" ]; then
8706 which_zlib="supplied"
8707 if [ "$CFG_ZLIB" = "system" ]; then
8713 NOTICE: The -no-zlib option was supplied but is no longer
8716 Qt now requires zlib support in all builds, so the -no-zlib
8717 option was ignored. Qt will be built using the $which_zlib
8722 #-------------------------------------------------------------------------------
8723 # finally save the executed command to another script
8724 #-------------------------------------------------------------------------------
8725 if [ `basename $0` != "config.status" ]; then
8726 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8728 # add the system variables
8729 for varname in $SYSTEM_VARIABLES; do
8731 'if [ -n "\$'${varname}'" ]; then
8732 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8737 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8739 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8740 echo "#!/bin/sh" > "$outpath/config.status"
8741 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8742 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8743 echo "else" >> "$outpath/config.status"
8744 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8745 echo "fi" >> "$outpath/config.status"
8746 chmod +x "$outpath/config.status"
8749 if [ -n "$RPATH_MESSAGE" ]; then
8751 echo "$RPATH_MESSAGE"
8754 MAKE=`basename "$MAKE"`
8756 echo Qt is now configured for building. Just run \'$MAKE\'.
8757 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8758 echo Once everything is built, Qt is installed.
8759 echo You should not run \'$MAKE install\'.
8761 echo Once everything is built, you must run \'$MAKE install\'.
8762 echo Qt will be installed into $QT_INSTALL_PREFIX
8765 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.