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
709 CFG_DECLARATIVE_DEBUG=yes
710 CFG_WEBKIT=auto # (yes|no|auto|debug)
711 CFG_JAVASCRIPTCORE_JIT=auto
714 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
715 CFG_GFX_ON="linuxfb multiscreen"
716 CFG_GFX_PLUGIN_AVAILABLE=
719 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
720 CFG_KBD_ON="tty" #default, see QMakeVar above
721 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
722 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
724 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
725 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
726 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
727 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
729 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
730 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
731 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
732 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
737 CFG_KBD_PLUGIN_AVAILABLE=
740 CFG_MOUSE_PLUGIN_AVAILABLE=
745 CFG_DECORATION_AVAILABLE="styled windows default"
746 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
747 CFG_DECORATION_PLUGIN_AVAILABLE=
748 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=no
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
828 CFG_GRAPHICS_SYSTEM=default
838 # initalize variables used for installation
847 QT_INSTALL_TRANSLATIONS=
852 #flags for SQL drivers
860 QT_LFLAGS_ODBC="-lodbc"
863 # flags for libdbus-1
867 # flags for Glib (X11 only)
871 # flags for GStreamer (X11 only)
875 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
876 QT_CFLAGS_CONNSETTINGS=
877 QT_LIBS_CONNSETTINGS=
879 #-------------------------------------------------------------------------------
880 # check SQL drivers, mouse drivers and decorations available in this package
881 #-------------------------------------------------------------------------------
883 # opensource version removes some drivers, so force them to be off
889 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
890 for a in "$relpath/src/plugins/sqldrivers/"*; do
892 base_a=`basename "$a"`
893 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
894 eval "CFG_SQL_${base_a}=auto"
899 CFG_DECORATION_PLUGIN_AVAILABLE=
900 if [ -d "$relpath/src/plugins/decorations" ]; then
901 for a in "$relpath/src/plugins/decorations/"*; do
903 base_a=`basename "$a"`
904 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
909 CFG_KBD_PLUGIN_AVAILABLE=
910 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
911 for a in "$relpath/src/plugins/kbddrivers/"*; do
913 base_a=`basename "$a"`
914 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
919 CFG_MOUSE_PLUGIN_AVAILABLE=
920 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
921 for a in "$relpath/src/plugins/mousedrivers/"*; do
923 base_a=`basename "$a"`
924 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
929 CFG_GFX_PLUGIN_AVAILABLE=
930 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
931 for a in "$relpath/src/plugins/gfxdrivers/"*; do
933 base_a=`basename "$a"`
934 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
937 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
940 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
941 if [ -d "$relpath/src/plugins/imageformats" ]; then
942 for a in "$relpath/src/plugins/imageformats/"*; do
944 base_a=`basename "$a"`
945 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
950 #-------------------------------------------------------------------------------
951 # Set Default NaCl options
952 #-------------------------------------------------------------------------------
953 if [ "$CFG_EMBEDDED" = "nacl" ]; then
954 echo "Setting NaCl options:"
964 if [ `uname` = "Linux" ]; then
965 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
966 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
968 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
969 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
972 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
983 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
984 QT_CONFIG="$QT_CONFIG nacl"
987 #-------------------------------------------------------------------------------
988 # parse command line arguments
989 #-------------------------------------------------------------------------------
991 # parse the arguments, setting things to "yes" or "no"
992 while [ "$#" -gt 0 ]; do
996 #Autoconf style options
998 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
1002 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
1006 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
1007 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
1010 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1014 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1018 -no-*-*|-plugin-*-*|-qt-*-*)
1019 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1020 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1035 #Qt style no options
1037 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1040 #Qt style yes options
1041 -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|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-icu|-force-asserts)
1042 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1045 #Qt style options that pass an argument
1047 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1049 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1053 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1057 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1058 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1062 #Qt style complex options in one command
1063 -enable-*|-disable-*)
1064 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1065 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1067 #Qt Builtin/System style options
1068 -no-*|-system-*|-qt-*)
1069 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1070 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1072 #Options that cannot be generalized
1079 # this option may or may not be followed by an argument
1080 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1087 -embedded-lite|-qpa)
1089 # this option may or may not be followed by an argument
1090 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1103 # this option may or may not be followed by an argument
1104 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1113 # this option may or may not be followed by an argument
1114 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1122 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1123 # this option may or may not be followed by an argument
1124 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1133 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1137 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1145 VAR="graphicssystem"
1149 -runtimegraphicssystem)
1150 VAR="runtimegraphicssystem"
1161 if [ "$1" = "-D" ]; then
1165 VAL=`echo $1 | sed 's,-D,,'`
1170 # this option may or may not be followed by an argument
1171 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1180 if [ "$1" = "-I" ]; then
1184 VAL=`echo $1 | sed 's,-I,,'`
1189 if [ "$1" = "-L" ]; then
1193 VAL=`echo $1 | sed 's,-L,,'`
1198 if [ "$1" = "-R" ]; then
1202 VAL=`echo $1 | sed 's,-R,,'`
1207 VAL=`echo $1 | sed 's,-l,,'`
1211 if [ "$1" = "-F" ]; then
1215 VAL=`echo $1 | sed 's,-F,,'`
1220 if [ "$1" = "-fw" ]; then
1224 VAL=`echo $1 | sed 's,-fw,,'`
1232 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1239 if [ "$UNKNOWN_ARG" = "yes" ]; then
1240 echo "$1: unknown argument"
1251 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1252 CFG_QT3SUPPORT="$VAL"
1258 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1259 CFG_ACCESSIBILITY="$VAL"
1268 CFG_USE_GNUMAKE="$VAL"
1271 CFG_MYSQL_CONFIG="$VAL"
1274 QT_INSTALL_PREFIX="$VAL"
1277 QT_HOST_PREFIX="$VAL"
1280 QT_FORCE_PKGCONFIG=yes
1283 QT_INSTALL_DOCS="$VAL"
1286 QT_INSTALL_HEADERS="$VAL"
1289 QT_INSTALL_PLUGINS="$VAL"
1292 QT_INSTALL_IMPORTS="$VAL"
1295 QT_INSTALL_DATA="$VAL"
1298 QT_INSTALL_LIBS="$VAL"
1307 QT_INSTALL_TRANSLATIONS="$VAL"
1309 sysconfdir|settingsdir)
1310 QT_INSTALL_SETTINGS="$VAL"
1313 QT_INSTALL_EXAMPLES="$VAL"
1322 QT_INSTALL_BINS="$VAL"
1344 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1351 if [ "$VAL" = "little" ]; then
1352 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1353 elif [ "$VAL" = "big" ]; then
1354 CFG_ENDIAN="Q_BIG_ENDIAN"
1360 if [ "$VAL" = "little" ]; then
1361 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1362 elif [ "$VAL" = "big" ]; then
1363 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1369 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1376 CFG_QWS_DEPTHS="$VAL"
1379 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1380 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1381 [ "$VAL" = "es2" ]; then
1383 if [ "$VAL" = "es2" ]; then
1391 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1393 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1401 if [ "$PLATFORM_QWS" = "yes" ]; then
1402 echo "Error: Graphics System plugins are not supported on QWS."
1403 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1404 echo " rather than existing as a separate plugin."
1408 if [ "$VAL" = "opengl" ]; then
1409 CFG_GRAPHICS_SYSTEM="opengl"
1410 elif [ "$VAL" = "openvg" ]; then
1411 CFG_GRAPHICS_SYSTEM="openvg"
1412 elif [ "$VAL" = "raster" ]; then
1413 CFG_GRAPHICS_SYSTEM="raster"
1414 elif [ "$VAL" = "runtime" ]; then
1415 CFG_GRAPHICS_SYSTEM="runtime"
1421 runtimegraphicssystem)
1422 if [ "$VAL" != "runtime" ]; then
1423 CFG_RUNTIME_SYSTEM="$VAL"
1427 qvfb) # left for commandline compatibility, not documented
1428 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1429 if [ "$VAL" = "yes" ]; then
1430 QMakeVar add gfx-drivers qvfb
1431 QMakeVar add kbd-drivers qvfb
1432 QMakeVar add mouse-drivers qvfb
1433 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1434 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1435 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1442 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1445 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1454 if [ "$PLATFORM_MAC" = "yes" ]; then
1461 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1462 CFG_MAC_DWARF2="$VAL"
1468 # if this is a Mac then "windows" probably means
1469 # we are cross-compiling for MinGW
1470 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1471 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1480 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1481 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1487 # do nothing - Cocoa is the default.
1490 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1491 CFG_MAC_CARBON="$VAL"
1492 COMMANDLINE_MAC_CARBON="$VAL"
1498 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1499 CFG_MAC_HARFBUZZ="$VAL"
1506 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1507 CFG_FRAMEWORK="$VAL"
1513 if [ "$VAL" = "yes" ]; then
1515 QMakeVar add QMAKE_CFLAGS -pg
1516 QMakeVar add QMAKE_CXXFLAGS -pg
1517 QMakeVar add QMAKE_LFLAGS -pg
1518 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1523 exceptions|g++-exceptions)
1524 if [ "$VAL" = "no" ]; then
1526 elif [ "$VAL" = "yes" ]; then
1534 # keep compatibility with old platform names
1540 PLATFORM=hpux-acc-o64
1543 PLATFORM=hpux-acc-64
1546 PLATFORM=hpux-acc-64
1558 PLATFORM=reliant-cds-64
1561 PLATFORM=solaris-cc-64
1564 PLATFORM=unixware-cc
1567 PLATFORM=unixware-g++
1570 PLATFORM=unixware-cc
1573 PLATFORM=unixware-g++
1579 i386) NATIVE_64_ARCH="x86_64" ;;
1580 powerpc) NATIVE_64_ARCH="ppc64" ;;
1581 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1583 if [ ! -z "$NATIVE_64_ARCH" ]; then
1584 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1585 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1592 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1595 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1596 CFG_DEBUG_RELEASE="$VAL"
1602 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1603 CFG_RELEASE_QMAKE="$VAL"
1609 if [ "$VAL" = "yes" ]; then
1611 elif [ "$VAL" = "no" ]; then
1618 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1619 CFG_PREFIX_INSTALL="$VAL"
1627 developer-build|commercial|opensource|nokia-developer)
1628 # These switches have been dealt with already
1631 if [ "$VAL" = "yes" ]; then
1633 elif [ "$VAL" = "no" ]; then
1640 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1641 CFG_INCREMENTAL="$VAL"
1647 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1648 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1654 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1655 if [ "$VAL" = "no" ]; then
1656 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1657 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1658 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1664 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "no" ]; then
1678 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1686 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1693 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1700 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1707 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1714 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1721 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1728 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1735 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1742 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1743 CFG_PRECOMPILE="$VAL"
1748 separate-debug-info)
1749 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1750 CFG_SEPARATE_DEBUG_INFO="$VAL"
1751 elif [ "$VAL" = "nocopy" ] ; then
1752 CFG_SEPARATE_DEBUG_INFO="yes"
1753 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1759 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1760 CFG_REDUCE_EXPORTS="$VAL"
1766 if [ "$VAL" = "no" ]; then
1773 if [ "$VAL" = "no" ]; then
1780 if [ "$VAL" = "no" ]; then
1787 if [ "$VAL" = "no" ]; then
1794 if [ "$VAL" = "no" ]; then
1801 if [ "$VAL" = "no" ]; then
1808 if [ "$VAL" = "no" ]; then
1815 if [ "$VAL" = "no" ]; then
1822 if [ "$VAL" = "no" ]; then
1832 if [ "$VAL" = "no" ]; then
1839 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1840 CFG_REDUCE_RELOCATIONS="$VAL"
1846 [ "$VAL" = "qt" ] && VAL=yes
1847 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1848 CFG_QWS_FREETYPE="$VAL"
1854 [ "$VAL" = "qt" ] && VAL=yes
1855 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1860 # No longer supported:
1861 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1864 if [ "$VAL" = "system" ]; then
1871 [ "$VAL" = "yes" ] && VAL=qt
1872 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1879 [ "$VAL" = "yes" ] && VAL=qt
1880 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1887 [ "$VAL" = "yes" ] && VAL=qt
1888 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1895 [ "$VAL" = "yes" ] && VAL=qt
1896 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1903 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1910 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1917 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1924 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1931 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1938 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1945 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1946 CFG_FONTCONFIG="$VAL"
1952 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1959 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1966 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1973 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1980 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1987 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1994 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1995 CFG_GSTREAMER="$VAL"
2001 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2002 CFG_QGTKSTYLE="$VAL"
2008 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2011 if [ "$VAL" = "no" ]; then
2019 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
2021 elif [ "$VAL" = "runtime" ]; then
2028 if [ "$VAL" = "yes" ]; then
2035 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2042 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2043 CFG_LARGEFILE="$VAL"
2049 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2056 if [ "$VAL" = "yes" ]; then
2057 CFG_OPENSSL="linked"
2063 if [ "$VAL" = "yes" ]; then
2071 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2072 CFG_XMLPATTERNS="yes"
2074 if [ "$VAL" = "no" ]; then
2075 CFG_XMLPATTERNS="no"
2082 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2085 if [ "$VAL" = "no" ]; then
2093 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2094 CFG_SCRIPTTOOLS="yes"
2096 if [ "$VAL" = "no" ]; then
2097 CFG_SCRIPTTOOLS="no"
2104 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2107 if [ "$VAL" = "no" ]; then
2115 if [ "$VAL" = "yes" ]; then
2118 if [ "$VAL" = "no" ]; then
2126 if [ "$VAL" = "yes" ]; then
2127 CFG_DECLARATIVE="yes"
2129 if [ "$VAL" = "no" ]; then
2130 CFG_DECLARATIVE="no"
2137 if [ "$VAL" = "yes" ]; then
2138 CFG_DECLARATIVE_DEBUG="yes"
2140 if [ "$VAL" = "no" ]; then
2141 CFG_DECLARATIVE_DEBUG="no"
2148 [ "$VAL" = "auto" ] && VAL="yes"
2152 if [ "$VAL" = "yes" ]; then
2155 if [ "$VAL" = "no" ]; then
2163 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2164 CFG_JAVASCRIPTCORE_JIT="$VAL"
2170 if [ "$VAL" = "yes" ]; then
2171 OPT_CONFIRM_LICENSE="$VAL"
2177 if [ "$VAL" = "yes" ]; then
2183 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2184 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2185 # if autoconf style options were used, $VAL can be "yes" or "no"
2186 [ "$VAL" = "yes" ] && VAL=qt
2187 # now $VAL should be "no", "qt", or "plugin"... double-check
2188 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2191 # now $VAL is "no", "qt", or "plugin"
2193 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2194 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2196 # Grab the available values
2199 avail="$CFG_SQL_AVAILABLE"
2202 avail="$CFG_GFX_AVAILABLE"
2203 if [ "$OPT" = "plugin" ]; then
2204 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2208 avail="$CFG_DECORATION_AVAILABLE"
2209 if [ "$OPT" = "plugin" ]; then
2210 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2214 avail="$CFG_KBD_AVAILABLE"
2215 if [ "$OPT" = "plugin" ]; then
2216 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2220 avail="$CFG_MOUSE_AVAILABLE"
2221 if [ "$OPT" = "plugin" ]; then
2222 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2226 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2227 if [ "$OPT" != "plugin" ]; then
2228 # png is always built in
2234 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2238 # Check that that user's value is available.
2241 if [ "$VAL" = "$d" ]; then
2246 [ "$found" = yes ] || ERROR=yes
2248 if [ "$VAR" = "sql" ]; then
2249 # set the CFG_SQL_driver
2250 eval "CFG_SQL_$VAL=\$OPT"
2252 elif [ "$VAR" = "imageformat" ]; then
2253 [ "$OPT" = "qt" ] && OPT=yes
2254 VAL="`echo $VAL |tr a-z A-Z`"
2255 eval "CFG_$VAL=$OPT"
2259 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2260 if [ "$OPT" = "plugin" ]; then
2261 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2262 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2263 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2264 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2265 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2266 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2267 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2268 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2271 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2272 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2273 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2274 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2275 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2279 QMakeVar add "${VAR}s" "${VAL}"
2280 elif [ "$OPT" = "no" ]; then
2281 PLUG_VAR="${VAR}-plugin"
2282 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2283 IN_VAR="${VAR}-driver"
2287 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2288 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2289 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2290 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2291 QMakeVar del "${IN_VAR}s" "$VAL"
2292 QMakeVar del "${PLUG_VAR}s" "$VAL"
2294 if [ "$ERROR" = "yes" ]; then
2295 echo "$CURRENT_OPT: unknown argument"
2300 if [ "$VAL" = "yes" ]; then
2301 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2302 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2306 elif [ "$VAL" = "no" ]; then
2307 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2308 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2317 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2324 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2331 D_FLAGS="$D_FLAGS \"$VAL\""
2334 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2337 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2340 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2343 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2346 if [ "$PLATFORM_MAC" = "yes" ]; then
2347 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2348 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2354 if [ "$PLATFORM_MAC" = "yes" ]; then
2355 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2361 W_FLAGS="$W_FLAGS \"${VAL}\""
2367 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2374 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2375 CFG_PHONON_BACKEND="$VAL"
2381 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2382 CFG_MULTIMEDIA="$VAL"
2394 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2395 CFG_AUDIO_BACKEND="$VAL"
2401 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2408 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2409 CFG_FORCE_ASSERTS="$VAL"
2418 if [ "$UNKNOWN_OPT" = "yes" ]; then
2419 echo "${CURRENT_OPT}: invalid command-line switch"
2425 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2426 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2429 if [ "$CFG_GUI" = "no" ]; then
2430 echo "Warning: -no-gui will disable the qt3support library."
2434 #disable Qt3Support for Lighthouse
2435 if [ "$PLATFORM_QPA" = "yes" ]; then
2439 # update QT_CONFIG to show our current predefined configuration
2440 case "$CFG_QCONFIG" in
2441 minimal|small|medium|large|full)
2442 # these are a sequence of increasing functionality
2443 for c in minimal small medium large full; do
2444 QT_CONFIG="$QT_CONFIG $c-config"
2445 [ "$CFG_QCONFIG" = $c ] && break
2449 # not known to be sufficient for anything
2450 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2451 echo >&2 "Error: configuration file not found:"
2452 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2454 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2459 #-------------------------------------------------------------------------------
2460 # build tree initialization
2461 #-------------------------------------------------------------------------------
2463 # where to find which..
2464 unixtests="$relpath/config.tests/unix"
2465 mactests="$relpath/config.tests/mac"
2466 WHICH="$unixtests/which.test"
2468 PERL=`$WHICH perl 2>/dev/null`
2470 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2472 for e in gawk nawk awk; do
2473 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2480 PERL="/usr/bin/perl"
2481 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2485 ### skip this if the user just needs help...
2486 if [ "$OPT_HELP" != "yes" ]; then
2488 # is this a shadow build?
2489 if [ "$OPT_SHADOW" = "maybe" ]; then
2491 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2492 if [ -h "$outpath" ]; then
2493 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2499 if [ "$OPT_SHADOW" = "yes" ]; then
2500 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2501 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2502 echo >&2 "Cannot proceed."
2505 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2508 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2510 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2511 echo "Qt can be built in release mode with separate debug information, so"
2512 echo "-debug-and-release is not necessary anymore"
2516 if [ "$CFG_SILENT" = "yes" ]; then
2517 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2520 # if the source tree is different from the build tree,
2521 # symlink or copy part of the sources
2522 if [ "$OPT_SHADOW" = "yes" ]; then
2523 echo "Preparing build tree..."
2525 if [ -z "$PERL" ]; then
2527 echo "You need perl in your PATH to make a shadow build."
2528 echo "Cannot proceed."
2532 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2534 # symlink the qmake directory
2535 find "$relpath/qmake" | while read a; do
2536 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2537 if [ '!' -f "$my_a" ]; then
2538 if [ -d "$a" ]; then
2539 # directories are created...
2542 a_dir=`dirname "$my_a"`
2543 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2544 # ... and files are symlinked
2545 case `basename "$a"` in
2546 *.o|*.d|GNUmakefile*|qmake)
2557 # make a syncqt script that can be used in the shadow
2558 rm -f "$outpath/bin/syncqt"
2559 if [ -x "$relpath/bin/syncqt" ]; then
2560 mkdir -p "$outpath/bin"
2561 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2562 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2563 chmod 755 "$outpath/bin/syncqt"
2566 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2567 rm -f "$outpath/bin/$i"
2568 if [ -x "$relpath/bin/$i" ]; then
2569 mkdir -p "$outpath/bin"
2570 echo "#!/bin/sh" >"$outpath/bin/$i"
2571 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2572 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2573 chmod 755 "$outpath/bin/$i"
2577 # symlink the mkspecs directory
2578 mkdir -p "$outpath/mkspecs"
2579 rm -rf "$outpath"/mkspecs/*
2580 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2581 rm -f "$outpath/mkspecs/default"
2585 rm -rf "$outpath/mkspecs/$1"
2586 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2587 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2590 # Special case for mkspecs/features directory.
2591 # To be able to place .prf files into a shadow build directory,
2592 # we're creating links for files only. The directory structure is reproduced.
2593 ShadowMkspecs features
2595 # The modules dir is special, too.
2596 ShadowMkspecs modules
2598 # symlink the doc directory
2599 rm -rf "$outpath/doc"
2600 ln -s "$relpath/doc" "$outpath/doc"
2602 # make sure q3porting.xml can be found
2603 mkdir -p "$outpath/tools/porting/src"
2604 rm -f "$outpath/tools/porting/src/q3porting.xml"
2605 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2608 # symlink fonts to be able to run application from build directory
2609 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2610 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2611 mkdir -p "${outpath}/lib"
2612 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2616 if [ "$OPT_FAST" = "auto" ]; then
2617 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2624 # find a make command
2625 if [ -z "$MAKE" ]; then
2627 for mk in gmake make; do
2628 if "$WHICH" $mk >/dev/null 2>&1; then
2633 if [ -z "$MAKE" ]; then
2634 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2635 echo >&2 "Cannot proceed."
2638 # export MAKE, we need it later in the config.tests
2644 #-------------------------------------------------------------------------------
2645 # auto-detect all that hasn't been specified in the arguments
2646 #-------------------------------------------------------------------------------
2648 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2649 if [ "$CFG_EMBEDDED" != "no" ]; then
2650 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2652 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2653 if [ -z "$XPLATFORM" ]; then
2654 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2655 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2659 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2660 if [ -z "$XPLATFORM" ]; then
2661 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2662 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2666 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2667 if [ -z "$XPLATFORM" ]; then
2668 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2669 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2673 if [ -z "$PLATFORM" ]; then
2674 case "$UNAME_MACHINE" in
2676 PLATFORM=qws/linux-x86-g++
2679 PLATFORM=qws/linux-x86_64-g++
2682 PLATFORM=qws/linux-generic-g++
2686 if [ -z "$XPLATFORM" ]; then
2687 if [ "$CFG_EMBEDDED" = "auto" ]; then
2688 if [ -n "$CFG_ARCH" ]; then
2689 CFG_EMBEDDED=$CFG_ARCH
2691 case "$UNAME_MACHINE" in
2699 CFG_EMBEDDED=generic
2704 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2708 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2709 if [ -z "$XPLATFORM" ]; then
2710 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2711 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2715 if [ -z "$XPLATFORM" ]; then
2720 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2727 if [ -z "$PLATFORM" ]; then
2729 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2731 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2733 # PLATFORM=macx-xcode
2740 #PLATFORM=aix-g++-64
2742 #PLATFORM=aix-xlc-64
2744 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2754 # PLATFORM=dynix-g++
2760 PLATFORM=freebsd-g++
2762 - Also available for FreeBSD: freebsd-icc
2766 PLATFORM=openbsd-g++
2777 #PLATFORM=irix-cc-64
2779 - Also available for IRIX: irix-g++ irix-cc-64
2783 case "$UNAME_MACHINE" in
2785 #PLATFORM=hpuxi-acc-32
2786 PLATFORM=hpuxi-acc-64
2788 - Also available for HP-UXi: hpuxi-acc-32
2794 #PLATFORM=hpux-acc-64
2796 #PLATFORM=hpux-acc-o64
2798 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2807 - Also available for Tru64: tru64-g++
2811 case "$UNAME_MACHINE" in
2813 PLATFORM=linux-g++-64
2820 - Also available for Linux: linux-kcc linux-icc linux-cxx
2824 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2825 PLATFORM="solaris-g++"
2827 #PLATFORM=solaris-g++
2829 #PLATFORM=solaris-cc64
2832 - Also available for Solaris: solaris-g++ solaris-cc-64
2835 ReliantUNIX-*:*|SINIX-*:*)
2836 PLATFORM=reliant-cds
2837 #PLATFORM=reliant-cds-64
2839 - Also available for Reliant UNIX: reliant-cds-64
2849 #PLATFORM=unixware-g++
2850 PLATFORM=unixware-cc
2852 - Also available for OpenUNIX: unixware-g++
2856 #PLATFORM=unixware-g++
2857 PLATFORM=unixware-cc
2859 - Also available for UnixWare: unixware-g++
2866 - Also available for SCO OpenServer: sco-g++
2870 PLATFORM=unixware-g++
2873 PLATFORM=unsupported/qnx-g++
2876 if [ "$OPT_HELP" != "yes" ]; then
2878 for p in $PLATFORMS; do
2879 echo " $relconf $* -platform $p"
2882 echo " The build script does not currently recognize all" >&2
2883 echo " platforms supported by Qt." >&2
2884 echo " Rerun this script with a -platform option listed to" >&2
2885 echo " set the system/compiler combination you use." >&2
2892 if [ "$PLATFORM_QWS" = "yes" ]; then
2894 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2896 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2899 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2901 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2902 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2904 if [ -d "$PLATFORM" ]; then
2905 QMAKESPEC="$PLATFORM"
2907 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2909 if [ -d "$XPLATFORM" ]; then
2910 XQMAKESPEC="$XPLATFORM"
2912 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2914 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2915 QT_CROSS_COMPILE=yes
2916 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2919 if [ "$PLATFORM_MAC" = "yes" ]; then
2920 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2922 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2923 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2924 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2925 echo " built with 'macx-g++'" >&2
2931 # check specified platforms are supported
2932 if [ '!' -d "$QMAKESPEC" ]; then
2934 echo " The specified system/compiler is not supported:"
2938 echo " Please see the README file for a complete list."
2942 if [ '!' -d "$XQMAKESPEC" ]; then
2944 echo " The specified system/compiler is not supported:"
2948 echo " Please see the README file for a complete list."
2952 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2954 echo " The specified system/compiler port is not complete:"
2956 echo " $XQMAKESPEC/qplatformdefs.h"
2958 echo " Please contact qt-info@nokia.com."
2963 # now look at the configs and figure out what platform we are config'd for
2964 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2965 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2967 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2969 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2970 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2971 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2972 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2973 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2977 #-------------------------------------------------------------------------------
2978 # determine the system architecture
2979 #-------------------------------------------------------------------------------
2980 if [ "$OPT_VERBOSE" = "yes" ]; then
2981 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2984 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2985 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2987 echo "You have specified a target architecture with -embedded and -arch."
2988 echo "The two architectures you have specified are different, so we can"
2989 echo "not proceed. Either set both to be the same, or only use -embedded."
2995 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2996 case `basename "$XPLATFORM"` in
2999 echo "You are not licensed for Qt for `basename $XPLATFORM`."
3001 echo "Please contact qt-info@nokia.com to upgrade your license to"
3002 echo "include this platform, or install the Qt Open Source Edition"
3003 echo "if you intend to develop free software."
3009 if [ -z "${CFG_HOST_ARCH}" ]; then
3010 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
3012 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
3013 case "$CFG_HOST_ARCH" in
3018 if [ "$OPT_VERBOSE" = "yes" ]; then
3019 echo " GNU/Hurd ($CFG_HOST_ARCH)"
3023 CFG_HOST_ARCH=`uname -p`
3024 if [ "$OPT_VERBOSE" = "yes" ]; then
3025 echo " SGI ($CFG_HOST_ARCH)"
3029 case "$UNAME_MACHINE" in
3031 if [ "$OPT_VERBOSE" = "yes" ]; then
3032 echo " Sun SPARC (sparc)"
3039 if [ "$OPT_VERBOSE" = "yes" ]; then
3040 echo " 64-bit AMD 80x86 (x86_64)"
3042 CFG_HOST_ARCH=x86_64
3045 if [ "$OPT_VERBOSE" = "yes" ]; then
3046 echo " 32-bit Intel 80x86 (i386)"
3054 case "$UNAME_MACHINE" in
3056 if [ "$OPT_VERBOSE" = "yes" ]; then
3057 echo " 32-bit Apple PowerPC (powerpc)"
3061 if [ "$OPT_VERBOSE" = "yes" ]; then
3062 echo " 32-bit Intel 80x86 (i386)"
3066 CFG_HOST_ARCH=macosx
3069 if [ "$OPT_VERBOSE" = "yes" ]; then
3070 echo " 64-bit IBM PowerPC (powerpc)"
3072 CFG_HOST_ARCH=powerpc
3075 if [ "$OPT_VERBOSE" = "yes" ]; then
3076 echo " HP PA-RISC (parisc)"
3078 CFG_HOST_ARCH=parisc
3081 if [ "$OPT_VERBOSE" = "yes" ]; then
3082 echo " 32-bit Intel 80x86 (i386)"
3086 *:*:x86_64|*:*:amd64)
3087 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3088 if [ "$OPT_VERBOSE" = "yes" ]; then
3089 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3093 if [ "$OPT_VERBOSE" = "yes" ]; then
3094 echo " 64-bit AMD 80x86 (x86_64)"
3096 CFG_HOST_ARCH=x86_64
3100 if [ "$OPT_VERBOSE" = "yes" ]; then
3101 echo " 32-bit PowerPC (powerpc)"
3103 CFG_HOST_ARCH=powerpc
3106 if [ "$OPT_VERBOSE" = "yes" ]; then
3107 echo " 64-bit PowerPC (powerpc)"
3109 CFG_HOST_ARCH=powerpc
3112 if [ "$OPT_VERBOSE" = "yes" ]; then
3113 echo " IBM S/390 (s390)"
3118 if [ "$OPT_VERBOSE" = "yes" ]; then
3124 if [ "$OPT_VERBOSE" = "yes" ]; then
3125 echo " Linux on SPARC"
3130 case "$UNAME_MACHINE" in
3132 if [ "$OPT_VERBOSE" = "yes" ]; then
3133 echo " QNX on Intel 80x86 (i386)"
3140 if [ "$OPT_VERBOSE" = "yes" ]; then
3141 echo " Trying '$UNAME_MACHINE'..."
3143 CFG_HOST_ARCH="$UNAME_MACHINE"
3148 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3149 if [ -n "$CFG_ARCH" ]; then
3150 CFG_EMBEDDED=$CFG_ARCH
3153 case "$CFG_EMBEDDED" in
3176 CFG_ARCH="$CFG_EMBEDDED"
3179 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3180 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3181 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3182 CFG_ARCH=$CFG_HOST_ARCH
3189 # previously, armv6 was a different arch
3195 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3196 if [ "$OPT_VERBOSE" = "yes" ]; then
3197 echo " '$CFG_ARCH' is supported"
3200 if [ "$OPT_VERBOSE" = "yes" ]; then
3201 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3205 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3206 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3207 if [ "$OPT_VERBOSE" = "yes" ]; then
3208 echo " '$CFG_HOST_ARCH' is supported"
3211 if [ "$OPT_VERBOSE" = "yes" ]; then
3212 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3214 CFG_HOST_ARCH=generic
3218 if [ "$OPT_VERBOSE" = "yes" ]; then
3219 echo "System architecture: '$CFG_ARCH'"
3220 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3221 echo "Host architecture: '$CFG_HOST_ARCH'"
3225 #-------------------------------------------------------------------------------
3226 # tests that don't need qmake (must be run before displaying help)
3227 #-------------------------------------------------------------------------------
3229 # detect build style
3230 if [ "$CFG_DEBUG" = "auto" ]; then
3231 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3232 CFG_DEBUG_RELEASE=yes
3234 elif [ "$CFG_DEV" = "yes" ]; then
3235 CFG_DEBUG_RELEASE=no
3238 CFG_DEBUG_RELEASE=no
3242 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3243 QT_CONFIG="$QT_CONFIG build_all"
3246 if [ -z "$PKG_CONFIG" ]; then
3247 # See if PKG_CONFIG is set in the mkspec:
3248 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3250 if [ -z "$PKG_CONFIG" ]; then
3251 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3254 # Work out if we can use pkg-config
3255 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3256 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3258 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3259 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3260 echo >&2 "environment!"
3262 if [ -z "$PKG_CONFIG_PATH" ]; then
3264 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3265 echo >&2 "the host compiler's .pc files will be used. This is probably"
3266 echo >&2 "not what you want."
3268 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3270 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3271 echo >&2 "been set. This means your toolchain's .pc files must contain"
3272 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3273 echo >&2 "tests are failing, please check these files."
3278 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3279 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3280 echo >&2 "dependencies"
3286 if [ ! -n "$PKG_CONFIG" ]; then
3287 QT_CONFIG="$QT_CONFIG no-pkg-config"
3290 # process CFG_MAC_ARCHS
3291 if [ "$PLATFORM_MAC" = "yes" ]; then
3292 # check -arch arguments for validity.
3293 ALLOWED="x86 ppc x86_64 ppc64 i386"
3294 # Save the list so we can re-write it using only valid values
3295 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3297 for i in $CFG_MAC_ARCHS_IN
3299 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3300 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3303 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3304 # These are synonymous values
3305 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3306 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3307 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3309 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3310 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3315 # pass on $CFG_SDK to the configure tests.
3316 if [ '!' -z "$CFG_SDK" ]; then
3317 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3320 # find the default framework value
3321 if [ "$CFG_ARCH" = "macosx" ]; then
3322 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3323 CFG_FRAMEWORK="$CFG_SHARED"
3324 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3326 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3334 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3335 TEST_COMPILER="$CXX"
3337 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3338 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3339 if [ -z "$TEST_COMPILER" ]; then
3340 echo "ERROR: Cannot set the compiler for the configuration tests"
3345 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3346 TEST_COMPILER="nacl-gcc"
3350 if [ -n "$CFG_SYSROOT" ]; then
3351 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3352 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3353 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3355 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3359 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3361 # auto-detect precompiled header support
3362 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3363 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3365 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3370 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3372 echo "WARNING: Using universal binaries disables precompiled headers."
3377 #auto-detect DWARF2 on the mac
3378 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3379 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3386 # auto-detect support for -Xarch on the mac
3387 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3388 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3395 # don't autodetect support for separate debug info on objcopy when
3396 # cross-compiling as lots of toolchains seems to have problems with this
3397 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3398 CFG_SEPARATE_DEBUG_INFO="no"
3401 # auto-detect support for separate debug info in objcopy
3402 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3403 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3404 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3405 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3406 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3407 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3408 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3409 CFG_SEPARATE_DEBUG_INFO=no
3413 # binutils on HP-UX is buggy; default to no.
3414 CFG_SEPARATE_DEBUG_INFO=no
3417 CFG_SEPARATE_DEBUG_INFO=yes
3423 # auto-detect -fvisibility support
3424 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3425 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3426 CFG_REDUCE_EXPORTS=no
3428 CFG_REDUCE_EXPORTS=yes
3432 # detect the availability of the -Bsymbolic-functions linker optimization
3433 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3434 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3435 CFG_REDUCE_RELOCATIONS=no
3437 CFG_REDUCE_RELOCATIONS=yes
3441 # auto-detect GNU make support
3442 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3446 # If -opengl wasn't specified, don't try to auto-detect
3447 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3452 if [ "$PLATFORM_MAC" = "yes" ]; then
3453 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3458 # find the default framework value
3459 if [ "$CFG_ARCH" = "macosx" ]; then
3460 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3461 CFG_FRAMEWORK="$CFG_SHARED"
3462 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3464 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3472 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3473 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3474 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3475 # get the darwin version. 10.0.0 and up means snow leopard.
3476 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3477 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3479 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3484 # x11 tests are done after qmake is built
3487 #setup the build parts
3488 if [ -z "$CFG_BUILD_PARTS" ]; then
3489 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3491 # don't build tools by default when cross-compiling
3492 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3493 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3496 for nobuild in $CFG_NOBUILD_PARTS; do
3497 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3499 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3501 # echo "WARNING: libs is a required part of the build."
3503 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3506 #-------------------------------------------------------------------------------
3507 # post process QT_INSTALL_* variables
3508 #-------------------------------------------------------------------------------
3511 if [ -z "$QT_INSTALL_PREFIX" ]; then
3512 if [ "$CFG_DEV" = "yes" ]; then
3513 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3515 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3518 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3521 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3522 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3523 if [ "$PLATFORM_MAC" = "yes" ]; then
3524 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3527 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3530 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3533 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3534 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3535 if [ "$PLATFORM_MAC" = "yes" ]; then
3536 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3541 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3544 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3547 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3548 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3549 if [ "$PLATFORM_MAC" = "yes" ]; then
3550 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3551 QT_INSTALL_LIBS="/Libraries/Frameworks"
3555 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3557 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3560 if [ -z "$QT_INSTALL_BINS" ]; then #default
3561 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3562 if [ "$PLATFORM_MAC" = "yes" ]; then
3563 QT_INSTALL_BINS="/Developer/Applications/Qt"
3566 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3568 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3571 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3572 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3573 if [ "$PLATFORM_MAC" = "yes" ]; then
3574 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3577 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3579 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3582 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3583 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3584 if [ "$PLATFORM_MAC" = "yes" ]; then
3585 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3588 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3590 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3593 if [ -z "$QT_INSTALL_DATA" ]; then #default
3594 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3596 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3599 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3600 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3602 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3605 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3606 if [ "$PLATFORM_MAC" = "yes" ]; then
3607 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3609 QT_INSTALL_SETTINGS=/etc/xdg
3612 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3615 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3616 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3617 if [ "$PLATFORM_MAC" = "yes" ]; then
3618 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3621 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3623 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3625 #-------------------------------------------------------------------------------
3626 # help - interactive parts of the script _after_ this section please
3627 #-------------------------------------------------------------------------------
3629 # next, emit a usage message if something failed.
3630 if [ "$OPT_HELP" = "yes" ]; then
3631 [ "x$ERROR" = "xyes" ] && echo
3632 if [ "$CFG_NIS" = "no" ]; then
3639 if [ "$CFG_CUPS" = "no" ]; then
3646 if [ "$CFG_ICONV" = "no" ]; then
3653 if [ "$CFG_LARGEFILE" = "no" ]; then
3660 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3667 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3675 if [ "$CFG_XCB" = "no" ]; then
3683 if [ "$CFG_WAYLAND" = "no" ]; then
3690 if [ "$CFG_XINPUT2" = "no" ]; then
3699 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3700 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3701 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3702 [-release] [-debug] [-debug-and-release]
3703 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3704 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3705 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3706 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3707 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3708 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3709 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3710 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3711 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3712 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3713 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3714 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3715 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3716 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3717 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3718 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3719 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3720 [-no-openssl] [-openssl] [-openssl-linked]
3721 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3722 [-no-javascript-jit] [-javascript-jit]
3723 [-no-script] [-script] [-no-scripttools] [-scripttools]
3724 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3725 [-no-location] [-location]
3726 [additional platform specific options (see below)]
3729 Installation options:
3731 -qpa ................ This will enable the QPA build.
3732 QPA is a window system agnostic implementation of Qt.
3734 These are optional, but you may specify install directories.
3736 -prefix <dir> ...... This will install everything relative to <dir>
3737 (default $QT_INSTALL_PREFIX)
3739 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3742 -hostprefix [dir] .. Tools and libraries needed when developing
3743 applications are installed in [dir]. If [dir] is
3744 not given, the current build directory will be used.
3749 * -prefix-install .... Force a sandboxed "local" installation of
3750 Qt. This will install into
3751 $QT_INSTALL_PREFIX, if this option is
3752 disabled then some platforms will attempt a
3753 "system" install by placing default values to
3754 be placed in a system location other than
3757 You may use these to separate different parts of the install:
3759 -bindir <dir> ......... Executables will be installed to <dir>
3760 (default PREFIX/bin)
3761 -libdir <dir> ......... Libraries will be installed to <dir>
3762 (default PREFIX/lib)
3763 -docdir <dir> ......... Documentation will be installed to <dir>
3764 (default PREFIX/doc)
3765 -headerdir <dir> ...... Headers will be installed to <dir>
3766 (default PREFIX/include)
3767 -plugindir <dir> ...... Plugins will be installed to <dir>
3768 (default PREFIX/plugins)
3769 -importdir <dir> ...... Imports for QML will be installed to <dir>
3770 (default PREFIX/imports)
3771 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3773 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3774 (default PREFIX/translations)
3775 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3776 (default PREFIX/etc/settings)
3777 -examplesdir <dir> .... Examples will be installed to <dir>
3778 (default PREFIX/examples)
3782 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3783 that needs to be evaluated. If the evaluation succeeds, the feature is
3784 included. Here is a short explanation of each option:
3786 * -release ........... Compile and link Qt with debugging turned off.
3787 -debug ............. Compile and link Qt with debugging turned on.
3788 -debug-and-release . Compile and link two versions of Qt, with and without
3789 debugging turned on (Mac only).
3791 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3793 -opensource ........ Compile and link the Open-Source Edition of Qt.
3794 -commercial ........ Compile and link the Commercial Edition of Qt.
3797 * -shared ............ Create and use shared Qt libraries.
3798 -static ............ Create and use static Qt libraries.
3800 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3802 -fast .............. Configure Qt quickly by generating Makefiles only for
3803 library and subdirectory targets. All other Makefiles
3804 are created as wrappers, which will in turn run qmake.
3806 -no-largefile ...... Disables large file support.
3807 + -largefile ......... Enables Qt to access files larger than 4 GB.
3810 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3817 if [ "$CFG_DBUS" = "no" ]; then
3826 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3827 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3829 -no-accessibility .. Do not compile Accessibility support.
3830 * -accessibility ..... Compile Accessibility support.
3832 $SHN -no-stl ............ Do not compile STL support.
3833 $SHY -stl ............... Compile STL support.
3835 -no-sql-<driver> ... Disable SQL <driver> entirely.
3836 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3838 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3841 Possible values for <driver>:
3842 [ $CFG_SQL_AVAILABLE ]
3844 -system-sqlite ..... Use sqlite from the operating system.
3846 -no-qt3support ..... Disables the Qt 3 support functionality.
3847 * -qt3support ........ Enables the Qt 3 support functionality.
3849 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3850 + -xmlpatterns ....... Build the QtXmlPatterns module.
3851 QtXmlPatterns is built if a decent C++ compiler
3852 is used and exceptions are enabled.
3854 -no-multimedia ..... Do not build the QtMultimedia module.
3855 + -multimedia ........ Build the QtMultimedia module.
3857 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3858 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3860 -no-phonon ......... Do not build the Phonon module.
3861 + -phonon ............ Build the Phonon module.
3862 Phonon is built if a decent C++ compiler is used.
3863 -no-phonon-backend.. Do not build the platform phonon plugin.
3864 + -phonon-backend..... Build the platform phonon plugin.
3866 -no-svg ............ Do not build the SVG module.
3867 + -svg ............... Build the SVG module.
3869 -no-webkit ......... Do not build the WebKit module.
3870 + -webkit ............ Build the WebKit module.
3871 WebKit is built if a decent C++ compiler is used.
3872 -webkit-debug ...... Build the WebKit module with debug symbols.
3874 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3875 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3877 -no-script ......... Do not build the QtScript module.
3878 + -script ............ Build the QtScript module.
3880 -no-scripttools .... Do not build the QtScriptTools module.
3881 + -scripttools ....... Build the QtScriptTools module.
3883 -no-v8 ............. Do not build the V8 module.
3884 + -v8 ................ Build the V8 module.
3886 -no-declarative ..... Do not build the declarative module.
3887 + -declarative ....... Build the declarative module.
3889 -no-declarative-debug ..... Do not build the declarative debugging support.
3890 + -declarative-debug ....... Build the declarative debugging support.
3892 -no-location ....... Do not build the QtLocation module.
3893 + -location .......... Build the QtLocation module.
3895 -platform target ... The operating system and compiler you are building
3898 See the README file for a list of supported
3899 operating systems and compilers.
3902 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3904 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3905 raster - Software rasterizer
3906 opengl - Rendering via OpenGL, Experimental!
3907 openvg - Rendering via OpenVG, Experimental!
3914 -no-mmx ............ Do not compile with use of MMX instructions.
3915 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3916 -no-sse ............ Do not compile with use of SSE instructions.
3917 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3918 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3919 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3920 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3921 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3922 -no-avx ............ Do not compile with use of AVX instructions.
3923 -no-neon ........... Do not compile with use of NEON instructions.
3925 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3926 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3928 -D <string> ........ Add an explicit define to the preprocessor.
3929 -I <string> ........ Add an explicit include path.
3930 -L <string> ........ Add an explicit library path.
3932 -help, -h .......... Display this information.
3934 Third Party Libraries:
3936 -qt-zlib ........... Use the zlib bundled with Qt.
3937 + -system-zlib ....... Use zlib from the operating system.
3938 See http://www.gzip.org/zlib
3940 -no-gif ............ Do not compile GIF reading support.
3942 -no-libtiff ........ Do not compile TIFF support.
3943 -qt-libtiff ........ Use the libtiff bundled with Qt.
3944 + -system-libtiff .... Use libtiff from the operating system.
3945 See http://www.libtiff.org
3947 -no-libpng ......... Do not compile PNG support.
3948 -qt-libpng ......... Use the libpng bundled with Qt.
3949 + -system-libpng ..... Use libpng from the operating system.
3950 See http://www.libpng.org/pub/png
3952 -no-libmng ......... Do not compile MNG support.
3953 -qt-libmng ......... Use the libmng bundled with Qt.
3954 + -system-libmng ..... Use libmng from the operating system.
3955 See http://www.libmng.com
3957 -no-libjpeg ........ Do not compile JPEG support.
3958 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3959 + -system-libjpeg .... Use libjpeg from the operating system.
3960 See http://www.ijg.org
3962 -no-openssl ........ Do not compile support for OpenSSL.
3963 + -openssl ........... Enable run-time OpenSSL support.
3964 -openssl-linked .... Enabled linked OpenSSL support.
3966 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3971 -make <part> ....... Add part to the list of parts to be built at make time.
3972 ($QT_DEFAULT_BUILD_PARTS)
3973 -nomake <part> ..... Exclude part from the list of parts to be built.
3975 -R <string> ........ Add an explicit runtime library path to the Qt
3977 -l <string> ........ Add an explicit library.
3979 -no-rpath .......... Do not use the library install path as a runtime
3981 + -rpath ............. Link Qt libraries and executables using the library
3982 install path as a runtime library path. Equivalent
3983 to -R install_libpath
3985 -continue .......... Continue as far as possible if an error occurs.
3987 -verbose, -v ....... Print verbose information about each step of the
3990 -silent ............ Reduce the build output so that warnings and errors
3991 can be seen more easily.
3993 * -no-optimized-qmake ... Do not build qmake optimized.
3994 -optimized-qmake ...... Build qmake optimized.
3996 -no-gui ............ Don't build the Qt GUI library
3998 $NSN -no-nis ............ Do not compile NIS support.
3999 $NSY -nis ............... Compile NIS support.
4001 $CUN -no-cups ........... Do not compile CUPS support.
4002 $CUY -cups .............. Compile CUPS support.
4003 Requires cups/cups.h and libcups.so.2.
4005 $CIN -no-iconv .......... Do not compile support for iconv(3).
4006 $CIY -iconv ............. Compile support for iconv(3).
4008 $PHN -no-pch ............ Do not use precompiled header support.
4009 $PHY -pch ............... Use precompiled header support.
4011 $DBN -no-dbus ........... Do not compile the QtDBus module.
4012 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
4013 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
4015 -reduce-relocations ..... Reduce relocations in the libraries through extra
4016 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
4017 experimental; needs GNU ld >= 2.18).
4020 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
4021 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
4028 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
4036 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4040 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
4041 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
4043 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
4044 $XCBY -xcb ............... Compile Xcb support.
4046 $XWN -no-wayland......... Do not compile Wayland support.
4047 $XWY -wayland .......... Compile Wayland support.
4053 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
4057 $X2N -no-xinput2......... Do not compile XInput2 support.
4058 $X2Y -xinput2............ Compile XInput2 support.
4064 if [ "$PLATFORM_X11" = "yes" ]; then
4065 if [ "$CFG_SM" = "no" ]; then
4072 if [ "$CFG_XSHAPE" = "no" ]; then
4079 if [ "$CFG_XVIDEO" = "no" ]; then
4086 if [ "$CFG_XINERAMA" = "no" ]; then
4093 if [ "$CFG_FONTCONFIG" = "no" ]; then
4100 if [ "$CFG_XCURSOR" = "no" ]; then
4107 if [ "$CFG_XFIXES" = "no" ]; then
4114 if [ "$CFG_XRANDR" = "no" ]; then
4121 if [ "$CFG_XRENDER" = "no" ]; then
4128 if [ "$CFG_MITSHM" = "no" ]; then
4135 if [ "$CFG_XINPUT" = "no" ]; then
4142 if [ "$CFG_XKB" = "no" ]; then
4149 if [ "$CFG_IM" = "no" ]; then
4160 -no-gtkstyle ....... Do not build the GTK theme integration.
4161 + -gtkstyle .......... Build the GTK theme integration.
4163 * -no-nas-sound ...... Do not compile in NAS sound support.
4164 -system-nas-sound .. Use NAS libaudio from the operating system.
4165 See http://radscan.com/nas.html
4167 -egl ............... Use EGL instead of GLX to manage contexts.
4168 When building for desktop OpenGL, this option will
4169 make Qt use EGL to manage contexts rather than the
4170 GLX, which is the default. Note: For OpenGL ES, EGL
4173 -no-opengl ......... Do not support OpenGL.
4174 + -opengl <api> ...... Enable OpenGL support.
4175 With no parameter, this will auto-detect the "best"
4176 OpenGL API to use. If desktop OpenGL is available, it
4177 will be used. Use desktop or es2 for <api>
4178 to force the use of the Desktop OpenGL or
4179 OpenGL ES 2 APIs instead.
4181 -no-openvg ........ Do not support OpenVG.
4182 + -openvg ........... Enable OpenVG support.
4183 Requires EGL support, typically supplied by an OpenGL
4184 or other graphics implementation.
4186 $SMN -no-sm ............. Do not support X Session Management.
4187 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4189 $SHN -no-xshape ......... Do not compile XShape support.
4190 $SHY -xshape ............ Compile XShape support.
4191 Requires X11/extensions/shape.h.
4193 $XVN -no-xvideo ......... Do not compile XVideo support.
4194 $XVY -xvideo ............ Compile XVideo support.
4195 Requires X11/extensions/Xv.h & Xvlib.h.
4197 $SHN -no-xsync .......... Do not compile XSync support.
4198 $SHY -xsync ............. Compile XSync support.
4199 Requires X11/extensions/sync.h.
4201 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4202 $XAY -xinerama .......... Compile Xinerama support.
4203 Requires X11/extensions/Xinerama.h and libXinerama.
4204 By default, Xinerama support will be compiled if
4205 available and the shared libraries are dynamically
4208 $XCN -no-xcursor ........ Do not compile Xcursor support.
4209 $XCY -xcursor ........... Compile Xcursor support.
4210 Requires X11/Xcursor/Xcursor.h and libXcursor.
4211 By default, Xcursor support will be compiled if
4212 available and the shared libraries are dynamically
4215 $XFN -no-xfixes ......... Do not compile Xfixes support.
4216 $XFY -xfixes ............ Compile Xfixes support.
4217 Requires X11/extensions/Xfixes.h and libXfixes.
4218 By default, Xfixes support will be compiled if
4219 available and the shared libraries are dynamically
4222 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4223 $XZY -xrandr ............ Compile Xrandr support.
4224 Requires X11/extensions/Xrandr.h and libXrandr.
4226 $XRN -no-xrender ........ Do not compile Xrender support.
4227 $XRY -xrender ........... Compile Xrender support.
4228 Requires X11/extensions/Xrender.h and libXrender.
4230 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4231 $XMY -mitshm ............ Compile MIT-SHM support.
4232 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4234 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4235 $FCGY -fontconfig ........ Compile FontConfig support.
4236 Requires fontconfig/fontconfig.h, libfontconfig,
4237 freetype.h and libfreetype.
4239 $XIN -no-xinput ......... Do not compile Xinput support.
4240 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4241 which requires IRIX with wacom.h and libXi or
4242 XFree86 with X11/extensions/XInput.h and libXi.
4244 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4245 $XKY -xkb ............... Compile XKB support.
4250 if [ "$PLATFORM_MAC" = "yes" ]; then
4255 -Fstring ........... Add an explicit framework path.
4256 -fw string ......... Add an explicit framework.
4258 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4260 -carbon .............Build the Carbon version of Qt. 64-bit archs
4261 are not supported by carbon and will be built
4264 * -framework ......... Build Qt as a series of frameworks and
4265 link tools against those frameworks.
4266 -no-framework ...... Do not build Qt as a series of frameworks.
4268 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4269 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4271 -universal ......... Equivalent to -arch "ppc x86"
4273 -arch <arch> ....... Build Qt for <arch>
4274 Example values for <arch>: x86 ppc x86_64 ppc64
4275 Multiple -arch arguments can be specified.
4277 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4278 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4280 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4281 It is only available to Cocoa builds.
4282 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4283 QT_ENABLE_HARFBUZZ environment variable.
4288 if [ "$PLATFORM_QWS" = "yes" ]; then
4290 Qt for Embedded Linux:
4292 -embedded <arch> .... This will enable the embedded build, you must have a
4293 proper license for this switch to work.
4294 Example values for <arch>: arm mips x86 generic
4298 if [ "$PLATFORM_QPA" = "yes" ]; then
4304 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4307 -xplatform target ... The target platform when cross-compiling.
4309 -no-feature-<feature> Do not compile in <feature>.
4310 -feature-<feature> .. Compile in <feature>. The available features
4311 are described in src/corelib/global/qfeatures.txt
4313 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4314 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4316 The floating point format is usually autodetected by configure. Use this
4317 to override the detected value.
4319 -little-endian ...... Target platform is little endian (LSB first).
4320 -big-endian ......... Target platform is big endian (MSB first).
4322 -host-little-endian . Host platform is little endian (LSB first).
4323 -host-big-endian .... Host platform is big endian (MSB first).
4325 You only need to specify the endianness when
4326 cross-compiling, otherwise the host
4327 endianness will be used.
4329 -no-freetype ........ Do not compile in Freetype2 support.
4330 -qt-freetype ........ Use the libfreetype bundled with Qt.
4331 * -system-freetype .... Use libfreetype from the operating system.
4332 See http://www.freetype.org/
4334 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4335 default ($CFG_QCONFIG).
4337 -no-opengl .......... Do not support OpenGL.
4338 -opengl <api> ....... Enable OpenGL ES support
4339 With no parameter, this will attempt to auto-detect
4340 OpenGL ES 2, or regular desktop OpenGL.
4341 Use es2 for <api> to override auto-detection.
4345 if [ "$PLATFORM_QWS" = "yes" ]; then
4348 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4349 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4351 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4352 by default all available decorations are on.
4353 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4354 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4355 linked to at run time.
4356 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4357 -no-decoration-<style> ....Disable decoration <style> entirely.
4358 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4360 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4361 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4362 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4363 linked to at run time.
4364 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4365 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4366 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4368 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4369 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4371 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4373 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4375 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4376 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4378 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4379 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4380 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4382 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4383 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4384 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4386 -iwmmxt ............ Compile using the iWMMXt instruction set
4387 (available on some XScale CPUs).
4391 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4392 if [ "$CFG_GLIB" = "no" ]; then
4400 $GBN -no-glib ........... Do not compile Glib support.
4401 $GBY -glib .............. Compile Glib support.
4406 [ "x$ERROR" = "xyes" ] && exit 1
4411 # -----------------------------------------------------------------------------
4412 # LICENSING, INTERACTIVE PART
4413 # -----------------------------------------------------------------------------
4415 if [ "$PLATFORM_QWS" = "yes" ]; then
4416 Platform="Qt for Embedded Linux"
4417 elif [ "$PLATFORM_QPA" = "yes" ]; then
4418 Platform="Qt Lighthouse"
4419 elif [ "$PLATFORM_MAC" = "yes" ]; then
4420 Platform="Qt for Mac OS X"
4421 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4422 Platform="Qt for Windows"
4423 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4425 Platform="Qt for Linux/X11"
4429 echo "This is the $Platform ${EditionString} Edition."
4432 if [ "$Edition" = "NokiaInternalBuild" ]; then
4433 echo "Detected -nokia-developer option"
4434 echo "Nokia employees and agents are allowed to use this software under"
4435 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
4436 elif [ "$Edition" = "OpenSource" ]; then
4438 echo "You are licensed to use this software under the terms of"
4439 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4440 if [ -f "$relpath/LICENSE.GPL3" ]; then
4441 echo "You are also licensed to use this software under the terms of"
4442 echo "the GNU General Public License (GPL) versions 3."
4448 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4449 echo "You have already accepted the terms of the $LicenseType license."
4452 if [ -f "$relpath/LICENSE.GPL3" ]; then
4453 echo "Type '3' to view the GNU General Public License version 3."
4455 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4456 echo "Type 'yes' to accept this license offer."
4457 echo "Type 'no' to decline this license offer."
4459 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4463 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4465 elif [ "$acceptance" = "no" ]; then
4466 echo "You are not licensed to use this software."
4469 elif [ "$acceptance" = "3" ]; then
4470 more "$relpath/LICENSE.GPL3"
4471 elif [ "$acceptance" = "L" ]; then
4472 more "$relpath/LICENSE.LGPL"
4475 elif [ "$Edition" = "Preview" ]; then
4476 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4479 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4480 echo "You have already accepted the terms of the $LicenseType license."
4483 echo "You are licensed to use this software under the terms of"
4484 echo "the $TheLicense"
4486 echo "Type '?' to read the Preview License."
4487 echo "Type 'yes' to accept this license offer."
4488 echo "Type 'no' to decline this license offer."
4490 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4494 if [ "$acceptance" = "yes" ]; then
4496 elif [ "$acceptance" = "no" ] ;then
4497 echo "You are not licensed to use this software."
4500 elif [ "$acceptance" = "?" ]; then
4501 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4504 elif [ "$Edition" != "OpenSource" ]; then
4505 if [ -n "$ExpiryDate" ]; then
4506 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4507 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4508 Today=`date +%Y%m%d`
4509 if [ "$Today" -gt "$ExpiryDate" ]; then
4510 case "$LicenseType" in
4511 Commercial|Academic|Educational)
4512 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4514 echo "NOTICE NOTICE NOTICE NOTICE"
4516 echo " Your support and upgrade period has expired."
4518 echo " You are no longer licensed to use this version of Qt."
4519 echo " Please contact qt-info@nokia.com to renew your support"
4520 echo " and upgrades for this license."
4522 echo "NOTICE NOTICE NOTICE NOTICE"
4527 echo "WARNING WARNING WARNING WARNING"
4529 echo " Your support and upgrade period has expired."
4531 echo " You may continue to use your last licensed release"
4532 echo " of Qt under the terms of your existing license"
4533 echo " agreement. But you are not entitled to technical"
4534 echo " support, nor are you entitled to use any more recent"
4535 echo " Qt releases."
4537 echo " Please contact qt-info@nokia.com to renew your"
4538 echo " support and upgrades for this license."
4540 echo "WARNING WARNING WARNING WARNING"
4547 echo "NOTICE NOTICE NOTICE NOTICE"
4549 echo " Your Evaluation license has expired."
4551 echo " You are no longer licensed to use this software. Please"
4552 echo " contact qt-info@nokia.com to purchase license, or install"
4553 echo " the Qt Open Source Edition if you intend to develop free"
4556 echo "NOTICE NOTICE NOTICE NOTICE"
4563 TheLicense=`head -n 1 "$outpath/LICENSE"`
4565 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4566 echo "You have already accepted the terms of the $TheLicense."
4569 echo "You are licensed to use this software under the terms of"
4570 echo "the $TheLicense."
4572 echo "Type '?' to view the $TheLicense."
4573 echo "Type 'yes' to accept this license offer."
4574 echo "Type 'no' to decline this license offer."
4576 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4580 if [ "$acceptance" = "yes" ]; then
4582 elif [ "$acceptance" = "no" ]; then
4583 echo "You are not licensed to use this software."
4586 else [ "$acceptance" = "?" ]
4587 more "$outpath/LICENSE"
4592 # this should be moved somewhere else
4595 AIX_VERSION=`uname -v`
4596 if [ "$AIX_VERSION" -lt "5" ]; then
4597 QMakeVar add QMAKE_LIBS_X11 -lbind
4604 #-------------------------------------------------------------------------------
4605 # generate qconfig.cpp
4606 #-------------------------------------------------------------------------------
4607 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4609 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4610 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4611 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4612 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4613 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4614 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4615 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4616 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4617 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4618 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4619 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4620 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4621 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4623 TODAY=`date +%Y-%m-%d`
4624 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4626 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4627 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4629 /* Installation date */
4630 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4634 if [ ! -z "$QT_HOST_PREFIX" ]; then
4635 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4636 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4637 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4638 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4639 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4640 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4641 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4642 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4643 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4644 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4645 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4647 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4649 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4650 /* Installation Info */
4651 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4652 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4653 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4654 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4655 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4656 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4657 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4658 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4659 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4660 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4661 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4662 #else // QT_BOOTSTRAPPED
4666 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4667 /* Installation Info */
4668 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4669 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4670 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4671 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4672 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4673 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4674 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4675 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4676 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4677 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4678 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4681 if [ ! -z "$QT_HOST_PREFIX" ]; then
4682 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4683 #endif // QT_BOOTSTRAPPED
4688 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4689 /* strlen( "qt_lcnsxxxx" ) == 12 */
4690 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4691 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4692 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4693 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4694 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4695 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4696 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4697 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4698 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4699 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4700 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4701 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4702 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4705 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4706 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4707 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4709 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4710 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4711 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4714 # -----------------------------------------------------------------------------
4715 if [ "$LicenseType" = "Evaluation" ]; then
4716 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4717 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4718 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4721 if [ -n "$EVALKEY" ]; then
4722 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4723 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4724 /* Evaluation license key */
4725 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4727 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4731 # -----------------------------------------------------------------------------
4733 # -----------------------------------------------------------------------------
4736 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4738 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4739 if [ "$OPT_SHADOW" = "yes" ]; then
4740 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4741 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4742 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4747 # $2: optional transformation
4748 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4749 # is where the resulting variable is written to
4750 # Assumes that the optional transformation produces the same variable name for each hit
4751 setBootstrapVariable()
4753 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4759 valStart = index($0, "=") + 1
4762 if (substr($0, valStart - 2, 1) == "+") {
4766 variable = substr($0, 0, valStart - 2 - append)
4767 value = substr($0, valStart)
4768 gsub("[ \t]+", "", variable)
4769 gsub("^[ \t]+", "", value)
4770 gsub("[ \t]+$", "", value)
4772 if (append == 1 && length(combinedValue) > 0) {
4773 combinedValue = combinedValue " " value
4775 combinedValue = value
4779 if (length(combinedValue) > 0) {
4780 printf "%s = %s\n", variable, combinedValue
4786 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4787 echo "Creating qmake. Please wait..."
4790 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4791 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4792 if [ -f "$QCONFIG_H" ]; then
4793 OLD_QCONFIG_H=$QCONFIG_H
4794 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4797 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4798 # when building qmake, we use #defines for the install paths,
4799 # however they are real functions in the library
4800 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4801 mkdir -p "$outpath/src/corelib/global"
4802 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4803 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4806 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4808 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4809 rm -rf mkspecs/default
4810 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4812 for mkfile in GNUmakefile Makefile; do
4815 in_mkfile="${mkfile}.in"
4816 if [ "$mkfile" = "Makefile" ]; then
4817 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4818 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4820 in_mkfile="${mkfile}.unix"
4822 in_mkfile="$relpath/qmake/$in_mkfile"
4823 mkfile="$outpath/qmake/$mkfile"
4824 if [ -f "$mkfile" ]; then
4825 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4828 [ -f "$in_mkfile" ] || continue
4830 echo "########################################################################" > "$mkfile"
4831 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4832 echo "########################################################################" >> "$mkfile"
4835 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4836 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4837 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4839 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4840 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4843 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4844 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4845 if [ "$CFG_SILENT" = "yes" ]; then
4846 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4847 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4849 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4850 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4852 setBootstrapVariable QMAKE_CFLAGS
4853 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4854 setBootstrapVariable QMAKE_LFLAGS
4856 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4857 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4858 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4860 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4861 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4862 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4863 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4864 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4865 elif [ "$CFG_DEBUG" = "yes" ]; then
4866 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4867 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4868 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4869 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4872 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4873 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4874 for rpath in $RPATH_FLAGS; do
4875 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4878 if [ "$BUILD_ON_MAC" = "yes" ]; then
4879 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4880 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4881 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4882 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4883 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4884 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4885 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4886 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4887 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4888 X86_CFLAGS="-arch i386"
4889 X86_LFLAGS="-arch i386"
4890 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4891 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4892 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4894 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4895 PPC_CFLAGS="-arch ppc"
4896 PPC_LFLAGS="-arch ppc"
4897 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4898 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4899 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4901 if [ '!' -z "$CFG_SDK" ]; then
4902 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4903 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4904 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4905 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4906 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4909 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4910 if [ '!' -z "$D_FLAGS" ]; then
4911 for DEF in $D_FLAGS; do
4912 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4915 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4916 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4917 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4918 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4920 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4921 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4922 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4923 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4924 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4925 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4926 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4927 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4928 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4929 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4931 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4932 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4933 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4934 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4939 QMAKE_BUILD_ERROR=no
4940 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4941 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4942 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4943 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4946 #-------------------------------------------------------------------------------
4947 # tests that need qmake
4948 #-------------------------------------------------------------------------------
4950 # detect availability of float math.h functions
4951 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4952 CFG_USE_FLOATMATH=yes
4954 CFG_USE_FLOATMATH=no
4957 # detect mmx support
4958 if [ "${CFG_MMX}" = "auto" ]; then
4959 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4966 # detect 3dnow support
4967 if [ "${CFG_3DNOW}" = "auto" ]; then
4968 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4975 # detect sse support
4976 if [ "${CFG_SSE}" = "auto" ]; then
4977 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4984 # detect sse2 support
4985 if [ "${CFG_SSE2}" = "auto" ]; then
4986 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4993 # detect sse3 support
4994 if [ "${CFG_SSE3}" = "auto" ]; then
4995 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
5002 # detect ssse3 support
5003 if [ "${CFG_SSSE3}" = "auto" ]; then
5004 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
5011 # detect sse4.1 support
5012 if [ "${CFG_SSE4_1}" = "auto" ]; then
5013 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
5020 # detect sse4.2 support
5021 if [ "${CFG_SSE4_2}" = "auto" ]; then
5022 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
5029 # detect avx support
5030 if [ "${CFG_AVX}" = "auto" ]; then
5031 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
5038 # check iWMMXt support
5039 if [ "$CFG_IWMMXT" = "yes" ]; then
5040 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
5041 if [ $? != "0" ]; then
5042 echo "The iWMMXt functionality test failed!"
5043 echo " Please make sure your compiler supports iWMMXt intrinsics!"
5048 # detect neon support
5049 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
5050 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
5057 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
5060 if [ "$CFG_ZLIB" = "no" ]; then
5061 # Note: Qt no longer support builds without zlib
5062 # So we force a "no" to be "auto" here.
5063 # If you REALLY really need no zlib support, you can still disable
5064 # it by doing the following:
5065 # add "no-zlib" to mkspecs/qconfig.pri
5066 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
5068 # There's no guarantee that Qt will build under those conditions
5073 if [ "$CFG_ZLIB" = "auto" ]; then
5074 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
5081 if [ "$CFG_LARGEFILE" = "auto" ]; then
5082 #Large files should be enabled for all Linux systems
5086 # detect how jpeg should be built
5087 if [ "$CFG_JPEG" = "auto" ]; then
5088 if [ "$CFG_SHARED" = "yes" ]; then
5095 if [ "$CFG_LIBJPEG" = "auto" ]; then
5096 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
5103 # detect how gif should be built
5104 if [ "$CFG_GIF" = "auto" ]; then
5105 if [ "$CFG_SHARED" = "yes" ]; then
5112 # detect how tiff should be built
5113 if [ "$CFG_TIFF" = "auto" ]; then
5114 if [ "$CFG_SHARED" = "yes" ]; then
5122 if [ "$CFG_LIBTIFF" = "auto" ]; then
5123 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
5130 # detect how mng should be built
5131 if [ "$CFG_MNG" = "auto" ]; then
5132 if [ "$CFG_SHARED" = "yes" ]; then
5139 if [ "$CFG_LIBMNG" = "auto" ]; then
5140 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
5148 if [ "$CFG_LIBPNG" = "auto" ]; then
5149 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
5156 # detect accessibility
5157 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5158 CFG_ACCESSIBILITY=yes
5161 # auto-detect SQL-modules support
5162 for _SQLDR in $CFG_SQL_AVAILABLE; do
5165 if [ "$CFG_SQL_mysql" != "no" ]; then
5166 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5167 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5168 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5169 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5170 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5171 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5172 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5174 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5175 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5176 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5177 echo " You need MySql 4 or higher."
5178 echo " If you believe this message is in error you may use the continue"
5179 echo " switch (-continue) to $0 to continue."
5184 QT_LFLAGS_MYSQL_R=""
5188 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
5189 QMakeVar add CONFIG use_libmysqlclient_r
5190 if [ "$CFG_SQL_mysql" = "auto" ]; then
5191 CFG_SQL_mysql=plugin
5193 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5194 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
5195 if [ "$CFG_SQL_mysql" = "auto" ]; then
5196 CFG_SQL_mysql=plugin
5199 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5200 echo "MySQL support cannot be enabled due to functionality tests!"
5201 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5202 echo " If you believe this message is in error you may use the continue"
5203 echo " switch (-continue) to $0 to continue."
5208 QT_LFLAGS_MYSQL_R=""
5216 if [ "$CFG_SQL_psql" != "no" ]; then
5217 # Be careful not to use native pg_config when cross building.
5218 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5219 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5220 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5222 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5223 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5224 # But, respect PSQL_LIBS if set
5225 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5226 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
5227 if [ "$CFG_SQL_psql" = "auto" ]; then
5231 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5232 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5233 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5234 echo " If you believe this message is in error you may use the continue"
5235 echo " switch (-continue) to $0 to continue."
5246 if [ "$CFG_SQL_odbc" != "no" ]; then
5247 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
5248 if [ "$CFG_SQL_odbc" = "auto" ]; then
5252 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
5253 QT_LFLAGS_ODBC="-liodbc"
5254 if [ "$CFG_SQL_odbc" = "auto" ]; then
5258 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5259 echo "ODBC support cannot be enabled due to functionality tests!"
5260 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5261 echo " If you believe this message is in error you may use the continue"
5262 echo " switch (-continue) to $0 to continue."
5272 if [ "$CFG_SQL_oci" != "no" ]; then
5273 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
5274 if [ "$CFG_SQL_oci" = "auto" ]; then
5278 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5279 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5280 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5281 echo " If you believe this message is in error you may use the continue"
5282 echo " switch (-continue) to $0 to continue."
5291 if [ "$CFG_SQL_tds" != "no" ]; then
5292 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5293 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5294 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
5295 if [ "$CFG_SQL_tds" = "auto" ]; then
5299 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5300 echo "TDS support cannot be enabled due to functionality tests!"
5301 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5302 echo " If you believe this message is in error you may use the continue"
5303 echo " switch (-continue) to $0 to continue."
5312 if [ "$CFG_SQL_db2" != "no" ]; then
5313 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
5314 if [ "$CFG_SQL_db2" = "auto" ]; then
5318 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5319 echo "ODBC support cannot be enabled due to functionality tests!"
5320 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5321 echo " If you believe this message is in error you may use the continue"
5322 echo " switch (-continue) to $0 to continue."
5331 if [ "$CFG_SQL_ibase" != "no" ]; then
5332 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
5333 if [ "$CFG_SQL_ibase" = "auto" ]; then
5334 CFG_SQL_ibase=plugin
5337 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5338 echo "InterBase support cannot be enabled due to functionality tests!"
5339 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5340 echo " If you believe this message is in error you may use the continue"
5341 echo " switch (-continue) to $0 to continue."
5350 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5351 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
5352 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5353 CFG_SQL_sqlite2=plugin
5356 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5357 echo "SQLite2 support cannot be enabled due to functionality tests!"
5358 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5359 echo " If you believe this message is in error you may use the continue"
5360 echo " switch (-continue) to $0 to continue."
5369 if [ "$CFG_SQL_sqlite" != "no" ]; then
5370 SQLITE_AUTODETECT_FAILED="no"
5371 if [ "$CFG_SQLITE" = "system" ]; then
5372 if [ -n "$PKG_CONFIG" ]; then
5373 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5374 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5376 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
5377 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5378 CFG_SQL_sqlite=plugin
5380 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5382 SQLITE_AUTODETECT_FAILED="yes"
5385 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5386 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5387 CFG_SQL_sqlite=plugin
5390 SQLITE_AUTODETECT_FAILED="yes"
5394 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5395 echo "SQLite support cannot be enabled due to functionality tests!"
5396 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5397 echo " If you believe this message is in error you may use the continue"
5398 echo " switch (-continue) to $0 to continue."
5404 if [ "$OPT_VERBOSE" = "yes" ]; then
5405 echo "unknown SQL driver: $_SQLDR"
5411 # auto-detect NIS support
5412 if [ "$CFG_NIS" != "no" ]; then
5413 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
5416 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5417 echo "NIS support cannot be enabled due to functionality tests!"
5418 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5419 echo " If you believe this message is in error you may use the continue"
5420 echo " switch (-continue) to $0 to continue."
5428 # auto-detect CUPS support
5429 if [ "$CFG_CUPS" != "no" ]; then
5430 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
5433 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5434 echo "Cups support cannot be enabled due to functionality tests!"
5435 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5436 echo " If you believe this message is in error you may use the continue"
5437 echo " switch (-continue) to $0 to continue."
5445 # auto-detect iconv(3) support
5446 if [ "$CFG_ICONV" != "no" ]; then
5447 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5449 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
5451 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
5453 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
5456 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5457 echo "Iconv support cannot be enabled due to functionality tests!"
5458 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5459 echo " If you believe this message is in error you may use the continue"
5460 echo " switch (-continue) to $0 to continue."
5468 # auto-detect libdbus-1 support
5469 if [ "$CFG_DBUS" != "no" ]; then
5470 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5471 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5472 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5474 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
5475 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5476 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5477 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5479 if [ "$CFG_DBUS" = "auto" ]; then
5481 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5482 # CFG_DBUS is "yes" or "linked" here
5484 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5485 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5486 echo " If you believe this message is in error you may use the continue"
5487 echo " switch (-continue) to $0 to continue."
5493 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5494 CFG_MULTIMEDIA="$CFG_GUI"
5497 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5498 echo "QtMultimedia requested, but it can't be built without QtGui"
5502 # Generate a CRC of the namespace for using in constants for the Carbon port.
5503 # This should mean that you really *can* load two Qt's and have our custom
5504 # Carbon events work.
5505 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5506 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`
5509 # X11/QWS/Lighthouse
5510 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5512 # auto-detect Glib support
5513 if [ "$CFG_GLIB" != "no" ]; then
5514 if [ -n "$PKG_CONFIG" ]; then
5515 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5516 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5518 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
5520 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5521 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5523 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5524 echo "Glib support cannot be enabled due to functionality tests!"
5525 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5526 echo " If you believe this message is in error you may use the continue"
5527 echo " switch (-continue) to $0 to continue."
5535 if [ "$CFG_GUI" = "no" ]; then
5536 if [ "$CFG_PHONON" = "auto" ]; then
5539 if [ "$CFG_PHONON" != "no" ]; then
5540 echo "Phonon enabled, but GUI disabled."
5541 echo " You might need to either enable the GUI or disable Phonon"
5546 # Auto-detect GStreamer support (needed for Phonon)
5547 if [ "$CFG_PHONON" != "no" ]; then
5548 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5549 if [ -n "$PKG_CONFIG" ]; then
5550 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5551 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5553 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
5555 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5556 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5558 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5559 echo "Gstreamer support cannot be enabled due to functionality tests!"
5560 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5561 echo " If you believe this message is in error you may use the continue"
5562 echo " switch (-continue) to $0 to continue."
5568 elif [ "$CFG_GLIB" = "no" ]; then
5575 if [ "$CFG_PHONON" != "no" ]; then
5576 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5577 if [ "$CFG_GSTREAMER" = "yes" ]; then
5580 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5581 echo "Phonon support cannot be enabled due to functionality tests!"
5582 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5583 echo " If you believe this message is in error you may use the continue"
5584 echo " switch (-continue) to $0 to continue."
5595 # auto-detect icd support
5596 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5597 if [ -n "$PKG_CONFIG" ]; then
5598 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5599 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5601 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
5602 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5603 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5604 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5606 if [ "$CFG_ICD" = "auto" ]; then
5608 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5611 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5612 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5613 echo " If you believe this message is in error you may use the continue"
5614 echo " switch (-continue) to $0 to continue."
5618 elif [ "$CFG_GLIB" = "no" ]; then
5622 # auto-detect libicu support
5623 if [ "$CFG_ICU" != "no" ]; then
5624 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5625 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5627 if [ "$CFG_ICU" = "auto" ]; then
5629 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5632 echo "The ICU library support cannot be enabled."
5633 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5634 echo " If you believe this message is in error you may use the continue"
5635 echo " switch (-continue) to $0 to continue."
5641 # Auto-detect PulseAudio support
5642 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5643 if [ -n "$PKG_CONFIG" ]; then
5644 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5645 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5647 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
5649 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5650 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5652 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5653 echo "PulseAudio support cannot be enabled due to functionality tests!"
5654 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5655 echo " If you believe this message is in error you may use the continue"
5656 echo " switch (-continue) to $0 to continue."
5663 fi # X11/QWS/Lighthouse
5666 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5667 x11tests="$relpath/config.tests/x11"
5670 # work around broken X11 headers when using GCC 2.95 or later
5672 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5673 if [ $NOTYPE = "yes" ]; then
5674 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5675 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5678 # Check we actually have X11 :-)
5679 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5680 if [ $? != "0" ]; then
5681 echo "Basic XLib functionality test failed!"
5682 echo " You might need to modify the include and library search paths by editing"
5683 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5689 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5690 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5691 if [ "$CFG_GUI" = "no" ]; then
5692 if [ "$CFG_OPENGL" = "auto" ]; then
5695 if [ "$CFG_OPENGL" != "no" ]; then
5696 echo "OpenGL enabled, but GUI disabled."
5697 echo " You might need to either enable the GUI or disable OpenGL"
5701 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5702 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
5704 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
5706 if [ "$CFG_EGL" = "no" ]; then
5710 if [ "$CFG_OPENGL" = "yes" ]; then
5711 echo "All the OpenGL functionality tests failed!"
5712 echo " You might need to modify the include and library search paths by editing"
5713 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5714 echo " ${XQMAKESPEC}."
5721 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5722 if [ "$CFG_OPENGL" = "desktop" ]; then
5723 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5724 if [ $? != "0" ]; then
5725 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5732 elif [ "$CFG_OPENGL" = "es2" ]; then
5734 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5735 if [ $? != "0" ]; then
5736 echo "The OpenGL ES 2.0 functionality test failed!"
5737 echo " You might need to modify the include and library search paths by editing"
5738 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5739 echo " ${XQMAKESPEC}."
5742 elif [ "$CFG_OPENGL" = "desktop" ]; then
5743 # Desktop OpenGL support
5744 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5745 if [ $? != "0" ]; then
5746 echo "The OpenGL functionality test failed!"
5747 echo " You might need to modify the include and library search paths by editing"
5748 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5749 echo " ${XQMAKESPEC}."
5754 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5755 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5756 if [ $? != "0" ]; then
5757 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5765 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5766 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5767 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5768 CFG_GRAPHICS_SYSTEM=default
5770 fi # X11/MINGW OpenGL
5773 if [ "$PLATFORM_X11" = "yes" ]; then
5774 # auto-detect Xcursor support
5775 if [ "$CFG_XCURSOR" != "no" ]; then
5776 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
5777 if [ "$CFG_XCURSOR" != "runtime" ]; then
5781 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5782 echo "Xcursor support cannot be enabled due to functionality tests!"
5783 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5784 echo " If you believe this message is in error you may use the continue"
5785 echo " switch (-continue) to $0 to continue."
5793 # auto-detect Xfixes support
5794 if [ "$CFG_XFIXES" != "no" ]; then
5795 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5796 if [ "$CFG_XFIXES" != "runtime" ]; then
5800 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5801 echo "Xfixes support cannot be enabled due to functionality tests!"
5802 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5803 echo " If you believe this message is in error you may use the continue"
5804 echo " switch (-continue) to $0 to continue."
5812 # auto-detect Xrandr support (resize and rotate extension)
5813 if [ "$CFG_XRANDR" != "no" ]; then
5814 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
5815 if [ "$CFG_XRANDR" != "runtime" ]; then
5819 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5820 echo "Xrandr support cannot be enabled due to functionality tests!"
5821 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5822 echo " If you believe this message is in error you may use the continue"
5823 echo " switch (-continue) to $0 to continue."
5831 # auto-detect Xrender support
5832 if [ "$CFG_XRENDER" != "no" ]; then
5833 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
5836 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5837 echo "Xrender support cannot be enabled due to functionality tests!"
5838 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5839 echo " If you believe this message is in error you may use the continue"
5840 echo " switch (-continue) to $0 to continue."
5848 # Additional check to decide if WebKit support will be included
5849 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5850 echo "Warning: -no-xrender will disable the QtWebkit module."
5854 # auto-detect MIT-SHM support
5855 if [ "$CFG_MITSHM" != "no" ]; then
5856 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
5859 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5860 echo "MITSHM support cannot be enabled due to functionality tests!"
5861 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5862 echo " If you believe this message is in error you may use the continue"
5863 echo " switch (-continue) to $0 to continue."
5871 # auto-detect FontConfig support
5872 if [ "$CFG_FONTCONFIG" != "no" ]; then
5873 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5874 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5875 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5877 QT_CFLAGS_FONTCONFIG=
5878 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5880 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
5882 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5883 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5884 CFG_LIBFREETYPE=system
5886 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5887 echo "FontConfig support cannot be enabled due to functionality tests!"
5888 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5889 echo " If you believe this message is in error you may use the continue"
5890 echo " switch (-continue) to $0 to continue."
5898 # auto-detect Session Management support
5899 if [ "$CFG_SM" = "auto" ]; then
5900 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
5903 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5904 echo "Session Management support cannot be enabled due to functionality tests!"
5905 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5906 echo " If you believe this message is in error you may use the continue"
5907 echo " switch (-continue) to $0 to continue."
5915 # auto-detect SHAPE support
5916 if [ "$CFG_XSHAPE" != "no" ]; then
5917 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
5920 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5921 echo "XShape support cannot be enabled due to functionality tests!"
5922 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5923 echo " If you believe this message is in error you may use the continue"
5924 echo " switch (-continue) to $0 to continue."
5932 # auto-detect XVideo support
5933 if [ "$CFG_XVIDEO" != "no" ]; then
5934 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
5937 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5938 echo "XVideo support cannot be enabled due to functionality tests!"
5939 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5940 echo " If you believe this message is in error you may use the continue"
5941 echo " switch (-continue) to $0 to continue."
5949 # auto-detect XSync support
5950 if [ "$CFG_XSYNC" != "no" ]; then
5951 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
5954 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5955 echo "XSync support cannot be enabled due to functionality tests!"
5956 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5957 echo " If you believe this message is in error you may use the continue"
5958 echo " switch (-continue) to $0 to continue."
5966 # auto-detect Xinerama support
5967 if [ "$CFG_XINERAMA" != "no" ]; then
5968 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
5969 if [ "$CFG_XINERAMA" != "runtime" ]; then
5973 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5974 echo "Xinerama support cannot be enabled due to functionality tests!"
5975 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5976 echo " If you believe this message is in error you may use the continue"
5977 echo " switch (-continue) to $0 to continue."
5985 # auto-detect Xinput support
5986 if [ "$CFG_XINPUT" != "no" ]; then
5987 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
5988 if [ "$CFG_XINPUT" != "runtime" ]; then
5992 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5993 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5994 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5995 echo " If you believe this message is in error you may use the continue"
5996 echo " switch (-continue) to $0 to continue."
6004 # auto-detect XKB support
6005 if [ "$CFG_XKB" != "no" ]; then
6006 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
6009 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6010 echo "XKB support cannot be enabled due to functionality tests!"
6011 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6012 echo " If you believe this message is in error you may use the continue"
6013 echo " switch (-continue) to $0 to continue."
6021 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
6022 if [ -n "$PKG_CONFIG" ]; then
6023 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
6024 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
6026 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
6028 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
6029 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
6031 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6032 echo "Gtk theme support cannot be enabled due to functionality tests!"
6033 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6034 echo " If you believe this message is in error you may use the continue"
6035 echo " switch (-continue) to $0 to continue."
6041 elif [ "$CFG_GLIB" = "no" ]; then
6047 if [ "$PLATFORM_MAC" = "yes" ]; then
6048 if [ "$CFG_PHONON" != "no" ]; then
6049 # Always enable Phonon (unless it was explicitly disabled)
6053 if [ "$CFG_COREWLAN" = "auto" ]; then
6054 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
6063 if [ "$PLATFORM_QPA" = "yes" ]; then
6064 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6065 if [ "$CFG_ARCH" = "macosx" ]; then
6067 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
6068 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
6070 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
6073 if [ "$CFG_OPENGL" = "yes" ]; then
6074 echo "All the OpenGL functionality tests failed!"
6075 echo " You might need to modify the include and library search paths by editing"
6076 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6077 echo " ${XQMAKESPEC}."
6082 elif [ "$CFG_OPENGL" = "es2" ]; then
6084 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6085 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6086 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6087 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6088 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6089 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6090 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6091 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6094 "$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
6095 if [ $? != "0" ]; then
6096 echo "The OpenGL ES 2.0 functionality test failed!"
6097 echo " You might need to modify the include and library search paths by editing"
6098 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6099 echo " ${XQMAKESPEC}."
6102 elif [ "$CFG_OPENGL" = "desktop" ]; then
6103 # Desktop OpenGL support
6104 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6105 if [ $? != "0" ]; then
6106 echo "The OpenGL functionality test failed!"
6107 echo " You might need to modify the include and library search paths by editing"
6108 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6109 echo " ${XQMAKESPEC}."
6114 # auto-detect FontConfig support
6115 if [ "$CFG_FONTCONFIG" != "no" ]; then
6116 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6117 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6118 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6120 QT_CFLAGS_FONTCONFIG=
6121 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6123 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
6124 QT_CONFIG="$QT_CONFIG fontconfig"
6125 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6126 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6127 CFG_LIBFREETYPE=system
6132 # Save these for a check later
6133 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6134 ORIG_CFG_XCB="$CFG_XCB"
6136 if [ "$CFG_WAYLAND" != "no" ]; then
6137 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6138 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6139 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6140 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6141 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6143 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
6145 QT_CONFIG="$QT_CONFIG wayland"
6146 elif [ "$CFG_WAYLAND" = "yes" ]; then
6147 echo "The Wayland functionality test failed!"
6151 QMakeVar add DEFINES QT_NO_WAYLAND
6155 # Check we actually have X11 :-)
6156 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
6157 QT_CONFIG="$QT_CONFIG xlib"
6160 if [ "$CFG_XCB" != "no" ]; then
6161 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6163 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
6164 QT_CONFIG="$QT_CONFIG xcb-render"
6167 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
6169 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6172 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
6173 QT_CONFIG="$QT_CONFIG xcb-xlib"
6176 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6177 # auto-detect XInput2/Xinput support
6178 if [ "$CFG_XINPUT2" != "no" ]; then
6179 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
6183 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6184 echo "XInput2 support cannot be enabled due to functionality tests!"
6185 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6186 echo " If you believe this message is in error you may use the continue"
6187 echo " switch (-continue) to $0 to continue."
6196 if [ "$CFG_XCB" = "yes" ]; then
6197 echo "The XCB test failed!"
6198 echo " You might need to install dependency packages."
6199 echo " See src/plugins/platforms/xcb/README."
6203 QMakeVar add DEFINES QT_NO_XCB
6207 # Detect libxkbcommon
6208 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6209 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6210 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6211 if [ "$CFG_WAYLAND" = "yes" ]; then
6212 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6213 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6215 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6216 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6218 if [ "$CFG_WAYLAND" = "yes" ]; then
6219 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6221 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6224 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6225 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6226 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6227 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6228 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6229 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6230 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6233 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6234 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6235 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6236 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6239 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
6240 QT_CONFIG="$QT_CONFIG coreservices"
6242 QMakeVar add DEFINES QT_NO_CORESERVICES
6245 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6246 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6247 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6248 echo "No QPA platform plugin enabled!"
6249 echo " If you really want to build without a QPA platform plugin you must pass"
6250 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6251 echo " cannot run GUI applications."
6261 if [ "$PLATFORM_QWS" = "yes" ]; then
6263 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6264 if [ "$CFG_GUI" = "no" ]; then
6265 if [ "$CFG_OPENGL" = "auto" ]; then
6268 if [ "$CFG_OPENGL" != "no" ]; then
6269 echo "OpenGL enabled, but GUI disabled."
6270 echo " You might need to either enable the GUI or disable OpenGL"
6274 if [ "$CFG_OPENGL" = "yes" ]; then
6276 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
6279 elif [ "$CFG_OPENGL" = "es2" ]; then
6281 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6282 if [ $? != "0" ]; then
6283 echo "The OpenGL ES 2.0 functionality test failed!"
6284 echo " You might need to modify the include and library search paths by editing"
6285 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6286 echo " ${XQMAKESPEC}."
6290 elif [ "$CFG_OPENGL" = "desktop" ]; then
6291 # Desktop OpenGL support
6292 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6297 if [ "$PLATFORM_QWS" = "yes" ]; then
6300 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6301 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6302 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6303 if [ $? != "0" ]; then
6304 echo "The Ahi screen driver functionality test failed!"
6305 echo " You might need to modify the include and library search paths by editing"
6306 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6307 echo " ${XQMAKESPEC}."
6312 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6313 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6314 if [ $? != "0" ]; then
6315 echo "The SVGAlib screen driver functionality test failed!"
6316 echo " You might need to modify the include and library search paths by editing"
6317 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6318 echo " ${XQMAKESPEC}."
6323 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6324 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6325 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6326 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6327 elif directfb-config --version >/dev/null 2>&1; then
6328 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6329 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6332 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6333 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6334 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6335 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6338 "$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
6339 if [ $? != "0" ]; then
6340 echo "The DirectFB screen driver functionality test failed!"
6341 echo " You might need to modify the include and library search paths by editing"
6342 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6343 echo " ${XQMAKESPEC}."
6351 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6352 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6353 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6354 if [ $? != "0" ]; then
6355 echo "The tslib functionality test failed!"
6356 echo " You might need to modify the include and library search paths by editing"
6357 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6358 echo " ${XQMAKESPEC}."
6367 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6368 if [ $? != "0" ]; then
6369 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6376 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6377 if [ "$CFG_EGL" != "no" ]; then
6378 # detect EGL support
6379 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
6380 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6385 if [ "$EGL_VARIANT" = "none" ]; then
6386 if [ "$CFG_EGL" = "yes" ]; then
6387 echo "The EGL functionality test failed!"
6388 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6389 echo " You might need to modify the include and library search paths by editing"
6390 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6391 echo " ${XQMAKESPEC}."
6395 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6396 if [ "$CFG_OPENGL" = "es2" ]; then
6403 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6406 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6407 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6408 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6409 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6410 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
6411 CFG_LIBFREETYPE=system
6417 if [ "$CFG_ENDIAN" = "auto" ]; then
6418 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6419 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6420 elif [ "$PLATFORM_MAC" = "yes" ]; then
6423 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6425 if [ "$F" -eq 0 ]; then
6426 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6427 elif [ "$F" -eq 1 ]; then
6428 CFG_ENDIAN="Q_BIG_ENDIAN"
6431 echo "The target system byte order could not be detected!"
6432 echo "Turn on verbose messaging (-v) to see the final report."
6433 echo "You can use the -little-endian or -big-endian switch to"
6434 echo "$0 to continue."
6440 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6441 if [ "$PLATFORM_MAC" = "yes" ]; then
6444 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6446 if [ "$F" -eq 0 ]; then
6447 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6448 elif [ "$F" -eq 1 ]; then
6449 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6452 echo "The host system byte order could not be detected!"
6453 echo "Turn on verbose messaging (-v) to see the final report."
6454 echo "You can use the -host-little-endian or -host-big-endian switch to"
6455 echo "$0 to continue."
6461 if [ "$CFG_ARMFPA" != "auto" ]; then
6462 if [ "$CFG_ARMFPA" = "yes" ]; then
6463 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6464 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6466 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6469 CFG_DOUBLEFORMAT="normal"
6474 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6475 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6476 CFG_DOUBLEFORMAT=normal
6478 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6480 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6481 CFG_DOUBLEFORMAT=normal
6482 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6483 CFG_DOUBLEFORMAT=normal
6484 elif [ "$F" -eq 10 ]; then
6485 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6486 elif [ "$F" -eq 11 ]; then
6487 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6488 elif [ "$F" -eq 12 ]; then
6489 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6491 elif [ "$F" -eq 13 ]; then
6492 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6496 echo "The system floating point format could not be detected."
6497 echo "This may cause data to be generated in a wrong format"
6498 echo "Turn on verbose messaging (-v) to see the final report."
6499 # we do not fail on this since this is a new test, and if it fails,
6500 # the old behavior should be correct in most cases
6501 CFG_DOUBLEFORMAT=normal
6507 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6511 if [ "$CFG_STL" != "no" ]; then
6512 if [ "$HAVE_STL" = "yes" ]; then
6515 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6516 echo "STL support cannot be enabled due to functionality tests!"
6517 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6518 echo " If you believe this message is in error you may use the continue"
6519 echo " switch (-continue) to $0 to continue."
6527 # detect POSIX clock_gettime()
6528 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6529 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
6530 CFG_CLOCK_GETTIME=yes
6532 CFG_CLOCK_GETTIME=no
6536 # detect POSIX monotonic clocks
6537 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6538 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
6539 CFG_CLOCK_MONOTONIC=yes
6541 CFG_CLOCK_MONOTONIC=no
6543 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6544 CFG_CLOCK_MONOTONIC=no
6548 if [ "$CFG_MREMAP" = "auto" ]; then
6549 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6556 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6557 if [ "$CFG_GETADDRINFO" != "no" ]; then
6558 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6561 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6562 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6563 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6564 echo " If you believe this message is in error you may use the continue"
6565 echo " switch (-continue) to $0 to continue."
6573 # find if the platform provides inotify
6574 if [ "$CFG_INOTIFY" != "no" ]; then
6575 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6578 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6579 echo "inotify support cannot be enabled due to functionality tests!"
6580 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6581 echo " If you believe this message is in error you may use the continue"
6582 echo " switch (-continue) to $0 to continue."
6590 # find if the platform provides if_nametoindex (ipv6 interface name support)
6591 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6592 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
6595 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6596 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6597 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6598 echo " If you believe this message is in error you may use the continue"
6599 echo " switch (-continue) to $0 to continue."
6607 # find if the platform provides getifaddrs (network interface enumeration)
6608 if [ "$CFG_GETIFADDRS" != "no" ]; then
6609 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6612 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6613 echo "getifaddrs support cannot be enabled due to functionality tests!"
6614 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6615 echo " If you believe this message is in error you may use the continue"
6616 echo " switch (-continue) to $0 to continue."
6625 if [ "$CFG_OPENSSL" != "no" ]; then
6626 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
6627 if [ "$CFG_OPENSSL" = "auto" ]; then
6631 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6632 echo "OpenSSL support 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."
6643 # detect OpenVG support
6644 if [ "$CFG_OPENVG" != "no" ]; then
6645 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
6646 if [ "$CFG_OPENVG" = "auto" ]; then
6649 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
6650 if [ "$CFG_OPENVG" = "auto" ]; then
6653 CFG_OPENVG_ON_OPENGL=yes
6654 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
6655 if [ "$CFG_OPENVG" = "auto" ]; then
6658 CFG_OPENVG_LC_INCLUDES=yes
6659 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
6660 if [ "$CFG_OPENVG" = "auto" ]; then
6663 CFG_OPENVG_LC_INCLUDES=yes
6664 CFG_OPENVG_ON_OPENGL=yes
6666 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6667 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6668 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6669 echo " If you believe this message is in error you may use the continue"
6670 echo " switch (-continue) to $0 to continue."
6676 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
6677 CFG_OPENVG_SHIVA=yes
6681 # if openvg is disabled and the user specified graphicssystem vg, disable it...
6682 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
6683 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
6684 CFG_GRAPHICS_SYSTEM=default
6687 if [ -n "$CFG_RUNTIME_SYSTEM" -a "$CFG_GRAPHICS_SYSTEM" != "runtime" ] || [ "$CFG_RUNTIME_SYSTEM" = "runtime" ]; then
6688 echo "Argument to -runtimegraphicssystem is invalid so ignoring..."
6692 if [ "$CFG_PTMALLOC" != "no" ]; then
6693 # build ptmalloc, copy .a file to lib/
6694 echo "Building ptmalloc. Please wait..."
6695 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
6696 mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
6698 QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
6701 if [ "$CFG_ALSA" = "auto" ]; then
6702 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6709 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6710 if [ "$CFG_ARCH" = "arm" ]; then
6711 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6712 if [ $? != "0" ]; then
6713 CFG_JAVASCRIPTCORE_JIT=no
6716 case "$XPLATFORM" in
6718 CFG_JAVASCRIPTCORE_JIT=no
6724 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6725 QMakeVar set JAVASCRIPTCORE_JIT yes
6726 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6727 QMakeVar set JAVASCRIPTCORE_JIT no
6730 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6731 CFG_AUDIO_BACKEND=yes
6734 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6735 echo "Warning: largefile support cannot be disabled for win32."
6739 #-------------------------------------------------------------------------------
6740 # ask for all that hasn't been auto-detected or specified in the arguments
6741 #-------------------------------------------------------------------------------
6743 ### fix this: user input should be validated in a loop
6744 if [ "$PLATFORM_QWS" = "yes" ]; then
6745 PROMPT_FOR_DEPTHS="yes"
6747 PROMPT_FOR_DEPTHS="no"
6749 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6751 echo "Choose pixel-depths to support:"
6753 echo " 1. 1bpp, black/white"
6754 echo " 4. 4bpp, grayscale"
6755 echo " 8. 8bpp, paletted"
6756 echo " 12. 12bpp, rgb 4-4-4"
6757 echo " 15. 15bpp, rgb 5-5-5"
6758 echo " 16. 16bpp, rgb 5-6-5"
6759 echo " 18. 18bpp, rgb 6-6-6"
6760 echo " 24. 24bpp, rgb 8-8-8"
6761 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6762 echo " all. All supported depths"
6764 echo "Your choices (default 8,16,32):"
6766 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6767 CFG_QWS_DEPTHS=8,16,32
6770 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6771 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6772 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6774 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6776 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6777 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6782 # enable dwarf2 support on Mac
6783 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6784 QT_CONFIG="$QT_CONFIG dwarf2"
6787 # Set the default arch if there are no "-arch" arguments on the configure line
6788 # For "-carbon" builds: 32 bit x86/ppc.
6789 # For builds on snow leopard : compiler default (64-bit).
6790 # For builds on leopard : compiler default (32-bit).
6791 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6792 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6794 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6795 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6796 CFG_MAC_ARCHS=" x86"
6797 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6798 CFG_MAC_ARCHS=" ppc"
6800 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6803 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6806 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6809 # enable Cocoa and/or Carbon on Mac
6810 # -carbon on the command line disables Cocoa, except for 64-bit archs
6811 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6812 CFG_MAC_CARBON="YES"
6815 # check which archs are in use, enable cocoa if we find a 64-bit one
6816 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6817 CFG_MAC_COCOA="yes";
6818 CFG_MAC_CARBON="no";
6819 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6820 CFG_MAC_CARBON="yes";
6822 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6823 CFG_MAC_CARBON="yes";
6828 # select Carbon on 10.4 Tiger.
6829 if [ "$PLATFORM_MAC" = "yes" ]; then
6830 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6831 if [ "$VERSION" == 8 ]; then
6833 CFG_MAC_CARBON="yes";
6837 # select Carbon when using the 10.4u SDK
6838 if [ "$PLATFORM_MAC" = "yes" ]; then
6839 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6842 CFG_MAC_CARBON="yes";
6846 # but disable Cocoa if cross-building for mingw
6847 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6849 # disable Qt 3 support on VxWorks
6850 case "$XPLATFORM" in
6851 unsupported/vxworks*)
6856 # enable Qt 3 support functionality
6857 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6858 QT_CONFIG="$QT_CONFIG gui-qt3support"
6862 if [ "$CFG_PHONON" = "yes" ]; then
6863 # No longer needed after modularization
6864 #QT_CONFIG="$QT_CONFIG phonon"
6865 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6866 QT_CONFIG="$QT_CONFIG phonon-backend"
6869 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6872 # disable accessibility
6873 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6874 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6876 QT_CONFIG="$QT_CONFIG accessibility"
6879 # egl stuff does not belong in lighthouse, but rather in plugins
6880 if [ "$PLATFORM_QPA" = "yes" ]; then
6885 if [ "$CFG_EGL" = "no" ]; then
6886 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6888 QT_CONFIG="$QT_CONFIG egl"
6889 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6890 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6895 if [ "$CFG_OPENVG" = "no" ]; then
6896 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6898 QT_CONFIG="$QT_CONFIG openvg"
6899 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6900 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6902 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6903 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6905 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6906 QT_CONFIG="$QT_CONFIG shivavg"
6907 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6912 if [ "$CFG_OPENGL" = "no" ]; then
6913 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6915 QT_CONFIG="$QT_CONFIG opengl"
6918 if [ "$CFG_OPENGL" = "es2" ]; then
6919 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6922 if [ "$CFG_OPENGL" = "es2" ]; then
6923 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6924 QT_CONFIG="$QT_CONFIG opengles2"
6927 # safe execution environment
6928 if [ "$CFG_SXE" != "no" ]; then
6929 QT_CONFIG="$QT_CONFIG sxe"
6932 # build up the variables for output
6933 if [ "$CFG_DEBUG" = "yes" ]; then
6934 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6935 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6936 elif [ "$CFG_DEBUG" = "no" ]; then
6937 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6938 QMAKE_CONFIG="$QMAKE_CONFIG release"
6940 if [ "$CFG_SHARED" = "yes" ]; then
6941 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6942 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6943 elif [ "$CFG_SHARED" = "no" ]; then
6944 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6945 QMAKE_CONFIG="$QMAKE_CONFIG static"
6947 if [ "$PLATFORM_QWS" = "yes" ]; then
6948 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6949 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6950 QT_CONFIG="$QT_CONFIG embedded"
6951 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6953 if [ "$PLATFORM_QPA" = "yes" ]; then
6954 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6955 QT_CONFIG="$QT_CONFIG qpa"
6956 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6957 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6960 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6961 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6962 QT_CONFIG="$QT_CONFIG nacl pepper"
6963 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6966 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6967 # Do not set this here for Windows. Let qmake do it so
6968 # debug and release precompiled headers are kept separate.
6969 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6971 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6972 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6973 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6974 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6975 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6976 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6978 if [ "$CFG_STL" = "no" ]; then
6979 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6981 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6983 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6984 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6986 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6987 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6988 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6989 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6990 QMakeVar add QMAKE_CFLAGS -g
6991 QMakeVar add QMAKE_CXXFLAGS -g
6992 QT_CONFIG="$QT_CONFIG separate_debug_info"
6994 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6995 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6997 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6998 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6999 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
7000 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
7001 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
7002 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
7003 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
7004 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
7005 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
7006 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
7007 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
7008 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
7009 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
7010 QT_CONFIG="$QT_CONFIG clock-gettime"
7012 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
7013 QT_CONFIG="$QT_CONFIG clock-monotonic"
7015 if [ "$CFG_MREMAP" = "yes" ]; then
7016 QT_CONFIG="$QT_CONFIG mremap"
7018 if [ "$CFG_GETADDRINFO" = "yes" ]; then
7019 QT_CONFIG="$QT_CONFIG getaddrinfo"
7021 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
7022 QT_CONFIG="$QT_CONFIG ipv6ifname"
7024 if [ "$CFG_GETIFADDRS" = "yes" ]; then
7025 QT_CONFIG="$QT_CONFIG getifaddrs"
7027 if [ "$CFG_INOTIFY" = "yes" ]; then
7028 QT_CONFIG="$QT_CONFIG inotify"
7030 if [ "$CFG_LIBJPEG" = "no" ]; then
7032 elif [ "$CFG_LIBJPEG" = "system" ]; then
7033 QT_CONFIG="$QT_CONFIG system-jpeg"
7035 if [ "$CFG_JPEG" = "no" ]; then
7036 QT_CONFIG="$QT_CONFIG no-jpeg"
7037 elif [ "$CFG_JPEG" = "yes" ]; then
7038 QT_CONFIG="$QT_CONFIG jpeg"
7040 if [ "$CFG_LIBMNG" = "no" ]; then
7042 elif [ "$CFG_LIBMNG" = "system" ]; then
7043 QT_CONFIG="$QT_CONFIG system-mng"
7045 if [ "$CFG_MNG" = "no" ]; then
7046 QT_CONFIG="$QT_CONFIG no-mng"
7047 elif [ "$CFG_MNG" = "yes" ]; then
7048 QT_CONFIG="$QT_CONFIG mng"
7050 if [ "$CFG_LIBPNG" = "no" ]; then
7053 if [ "$CFG_LIBPNG" = "system" ]; then
7054 QT_CONFIG="$QT_CONFIG system-png"
7056 if [ "$CFG_PNG" = "no" ]; then
7057 QT_CONFIG="$QT_CONFIG no-png"
7058 elif [ "$CFG_PNG" = "yes" ]; then
7059 QT_CONFIG="$QT_CONFIG png"
7061 if [ "$CFG_GIF" = "no" ]; then
7062 QT_CONFIG="$QT_CONFIG no-gif"
7063 elif [ "$CFG_GIF" = "yes" ]; then
7064 QT_CONFIG="$QT_CONFIG gif"
7066 if [ "$CFG_LIBTIFF" = "no" ]; then
7068 elif [ "$CFG_LIBTIFF" = "system" ]; then
7069 QT_CONFIG="$QT_CONFIG system-tiff"
7071 if [ "$CFG_TIFF" = "no" ]; then
7072 QT_CONFIG="$QT_CONFIG no-tiff"
7073 elif [ "$CFG_TIFF" = "yes" ]; then
7074 QT_CONFIG="$QT_CONFIG tiff"
7076 if [ "$CFG_LIBFREETYPE" = "no" ]; then
7077 QT_CONFIG="$QT_CONFIG no-freetype"
7078 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
7079 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
7080 QT_CONFIG="$QT_CONFIG system-freetype"
7082 QT_CONFIG="$QT_CONFIG freetype"
7084 if [ "$CFG_GUI" = "auto" ]; then
7087 if [ "$CFG_GUI" = "no" ]; then
7088 QT_CONFIG="$QT_CONFIG no-gui"
7090 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7094 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7095 #On Mac we implicitly link against libz, so we
7096 #never use the 3rdparty stuff.
7097 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7099 if [ "$CFG_ZLIB" = "yes" ]; then
7100 QT_CONFIG="$QT_CONFIG zlib"
7101 elif [ "$CFG_ZLIB" = "system" ]; then
7102 QT_CONFIG="$QT_CONFIG system-zlib"
7105 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7106 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7107 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7108 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7109 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7110 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7111 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7112 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7113 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7114 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7115 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7116 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7117 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7118 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7119 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7121 if [ "$PLATFORM_X11" = "yes" ]; then
7122 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7124 # for some reason, the following libraries are not always built shared,
7125 # so *every* program/lib (including Qt) has to link against them
7126 if [ "$CFG_XSHAPE" = "yes" ]; then
7127 QT_CONFIG="$QT_CONFIG xshape"
7129 if [ "$CFG_XVIDEO" = "yes" ]; then
7130 QT_CONFIG="$QT_CONFIG xvideo"
7132 if [ "$CFG_XSYNC" = "yes" ]; then
7133 QT_CONFIG="$QT_CONFIG xsync"
7135 if [ "$CFG_XINERAMA" = "yes" ]; then
7136 QT_CONFIG="$QT_CONFIG xinerama"
7137 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7139 if [ "$CFG_XCURSOR" = "yes" ]; then
7140 QT_CONFIG="$QT_CONFIG xcursor"
7141 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7143 if [ "$CFG_XFIXES" = "yes" ]; then
7144 QT_CONFIG="$QT_CONFIG xfixes"
7145 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7147 if [ "$CFG_XRANDR" = "yes" ]; then
7148 QT_CONFIG="$QT_CONFIG xrandr"
7149 if [ "$CFG_XRENDER" != "yes" ]; then
7150 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7151 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7153 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7156 if [ "$CFG_XRENDER" = "yes" ]; then
7157 QT_CONFIG="$QT_CONFIG xrender"
7158 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7160 if [ "$CFG_MITSHM" = "yes" ]; then
7161 QT_CONFIG="$QT_CONFIG mitshm"
7163 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7164 QT_CONFIG="$QT_CONFIG fontconfig"
7166 if [ "$CFG_XINPUT" = "yes" ]; then
7167 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7169 if [ "$CFG_XINPUT" = "yes" ]; then
7170 QT_CONFIG="$QT_CONFIG xinput tablet"
7172 if [ "$CFG_XKB" = "yes" ]; then
7173 QT_CONFIG="$QT_CONFIG xkb"
7177 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7178 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7179 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7181 if [ "$CFG_ARCH" = "macosx" ]; then
7182 if [ "$CFG_RPATH" = "yes" ]; then
7183 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7185 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7186 if [ -n "$RPATH_FLAGS" ]; then
7188 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7192 elif [ "$CFG_RPATH" = "yes" ]; then
7193 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7197 if [ "$CFG_RPATH" = "yes" ]; then
7198 # set the default rpath to the library installation directory
7199 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7201 if [ -n "$RPATH_FLAGS" ]; then
7202 # add the user defined rpaths
7203 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7207 if [ '!' -z "$I_FLAGS" ]; then
7208 # add the user define include paths
7209 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7210 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7213 if [ '!' -z "$W_FLAGS" ]; then
7214 # add the user defined warning flags
7215 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7216 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7217 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7220 # turn off exceptions for the compilers that support it
7221 if [ "$PLATFORM_QWS" = "yes" ]; then
7222 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7223 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7224 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7226 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7228 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7232 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7233 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7236 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7237 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7238 # Follow default behavior of configure.exe by overriding with "rtti".
7239 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7242 if [ "$CFG_ALSA" = "yes" ]; then
7243 QT_CONFIG="$QT_CONFIG alsa"
7246 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7247 QT_CONFIG="$QT_CONFIG pulseaudio"
7250 if [ "$CFG_COREWLAN" = "yes" ]; then
7251 QT_CONFIG="$QT_CONFIG corewlan"
7254 if [ "$CFG_ICD" = "yes" ]; then
7255 QT_CONFIG="$QT_CONFIG icd"
7258 if [ "$CFG_ICU" = "yes" ]; then
7259 QT_CONFIG="$QT_CONFIG icu"
7262 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
7263 QT_CONFIG="$QT_CONFIG force_asserts"
7267 # Some Qt modules are too advanced in C++ for some old compilers
7268 # Detect here the platforms where they are known to work.
7270 # See Qt documentation for more information on which features are
7271 # supported and on which compilers.
7273 canBuildQtXmlPatterns="yes"
7274 canBuildWebKit="$HAVE_STL"
7275 canBuildQtConcurrent="yes"
7278 # WebKit requires stdint.h
7279 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7280 if [ $? != "0" ]; then
7284 case "$XPLATFORM" in
7286 # PA-RISC's assembly is too limited
7287 # gcc 3.4 on that platform can't build QtXmlPatterns
7288 # the assembly it generates cannot be compiled
7290 # Check gcc's version
7291 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7295 canBuildQtXmlPatterns="no"
7299 canBuildQtXmlPatterns="no"
7303 unsupported/vxworks-*-g++*)
7306 unsupported/vxworks-*-dcc*)
7308 canBuildQtXmlPatterns="no"
7311 # Check gcc's version
7312 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7320 canBuildQtXmlPatterns="no"
7325 # Check the compiler version
7326 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7329 canBuildQtXmlPatterns="no"
7330 canBuildQtConcurrent="no"
7334 canBuildQtConcurrent="no"
7340 canBuildQtXmlPatterns="no"
7341 canBuildQtConcurrent="no"
7347 # Get the xlC version
7348 cat > xlcver.c <<EOF
7352 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7357 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7358 xlcver=`./xlcver 2>/dev/null`
7361 if [ "$OPT_VERBOSE" = "yes" ]; then
7362 if [ -n "$xlcver" ]; then
7363 echo Found IBM xlC version: $xlcver.
7365 echo Could not determine IBM xlC version, assuming oldest supported.
7372 canBuildQtXmlPatterns="no"
7373 canBuildQtConcurrent="no"
7377 canBuildQtConcurrent="no"
7383 canBuildQtConcurrent="no"
7387 if [ "$CFG_GUI" = "no" ]; then
7388 # WebKit requires QtGui
7392 if [ "$CFG_SHARED" = "no" ]; then
7394 echo "WARNING: Using static linking will disable the WebKit module."
7399 CFG_CONCURRENT="yes"
7400 if [ "$canBuildQtConcurrent" = "no" ]; then
7401 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7404 QT_CONFIG="$QT_CONFIG concurrent"
7407 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7408 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7411 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7412 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7413 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7414 CFG_XMLPATTERNS="no"
7416 # No longer needed after modularization
7417 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7418 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7420 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7423 # No longer needed after modularization
7424 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7425 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7427 # QT_CONFIG="$QT_CONFIG multimedia"
7430 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7431 QT_CONFIG="$QT_CONFIG audio-backend"
7434 if [ "$CFG_SVG" = "auto" ]; then
7438 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7439 echo "QtSvg requested, but it can't be built without QtGui"
7443 if [ "$CFG_SVG" = "yes" ]; then
7444 QT_CONFIG="$QT_CONFIG svg"
7446 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7449 if [ "$CFG_WEBKIT" != "no" ]; then
7450 CFG_WEBKIT="$canBuildWebKit"
7453 if [ "$CFG_WEBKIT" != "no" ]; then
7454 # No longer needed after modularization
7455 #QT_CONFIG="$QT_CONFIG webkit"
7456 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7457 if [ "$CFG_WEBKIT" = "debug" ]; then
7458 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7462 if [ "$CFG_SCRIPT" = "auto" ]; then
7466 # No longer needed after modularization
7467 #if [ "$CFG_SCRIPT" = "yes" ]; then
7468 # QT_CONFIG="$QT_CONFIG script"
7470 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7473 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7474 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7477 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7478 CFG_SCRIPTTOOLS="yes"
7479 elif [ "$CFG_SCRIPT" = "no" ]; then
7480 CFG_SCRIPTTOOLS="no"
7483 # No longer needed after modularization
7484 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7485 # QT_CONFIG="$QT_CONFIG scripttools"
7487 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7492 i386|x86_64|arm|macosx) ;;
7493 *) canBuildV8="no";;
7496 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7497 echo "Error: V8 was requested, but is not supported on this platform."
7501 if [ "$CFG_V8" = "auto" ]; then
7502 CFG_V8="$canBuildV8"
7505 if [ "$CFG_V8" = "no" ]; then
7506 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7508 QT_CONFIG="$QT_CONFIG v8"
7511 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7512 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7513 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7517 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7518 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7525 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7526 # No longer needed after modularization
7527 #QT_CONFIG="$QT_CONFIG declarative"
7528 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7529 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7532 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7535 if [ "$CFG_LOCATION" = "auto" ]; then
7536 CFG_LOCATION="$CFG_GUI"
7539 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7540 echo "QtLocation requested, but it can't be built without QtGui"
7544 #Disable QtLocation until ready
7547 if [ "$CFG_LOCATION" = "no" ]; then
7548 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7551 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7554 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7555 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7556 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7561 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7562 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7563 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7570 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7573 # On Mac, set the minimum deployment target for the different architechtures
7574 # using the Xarch compiler option when supported (10.5 and up).
7575 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7576 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7577 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7578 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7579 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7580 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7582 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7583 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7584 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7585 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7586 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7588 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7589 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7590 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7591 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7592 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7594 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7595 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7596 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7597 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7598 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7605 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7607 case "$COMPILER_VERSION" in
7609 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7610 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7611 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7614 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7615 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7616 QT_GCC_PATCH_VERSION=0
7626 #-------------------------------------------------------------------------------
7627 # part of configuration information goes into qconfig.h
7628 #-------------------------------------------------------------------------------
7630 case "$CFG_QCONFIG" in
7632 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7635 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7636 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7637 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7638 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7639 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7640 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7642 echo "#endif" >>"$tmpconfig"
7646 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7650 # define QT_EDITION $QT_EDITION
7653 /* Machine byte-order */
7654 #define Q_BIG_ENDIAN 4321
7655 #define Q_LITTLE_ENDIAN 1234
7658 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7659 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7660 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7661 #if defined(__BIG_ENDIAN__)
7662 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7663 #elif defined(__LITTLE_ENDIAN__)
7664 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7666 # error "Unable to determine byte order!"
7670 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7672 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7673 if [ "$CFG_ENDIAN" = "auto" ]; then
7674 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7675 #if defined(__BIG_ENDIAN__)
7676 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7677 #elif defined(__LITTLE_ENDIAN__)
7678 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7680 # error "Unable to determine byte order!"
7684 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7686 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7688 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7689 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7690 /* Non-IEEE double format */
7691 #define Q_DOUBLE_LITTLE "01234567"
7692 #define Q_DOUBLE_BIG "76543210"
7693 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7694 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7695 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7698 if [ "$CFG_ARMFPA" = "yes" ]; then
7699 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7700 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7701 #ifndef QT_BOOTSTRAPPED
7706 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7710 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7711 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7712 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7713 /* Machine Architecture */
7714 #ifndef QT_BOOTSTRAPPED
7715 # define QT_ARCH_${CFG_ARCH_STR}
7717 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7721 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7722 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7724 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7725 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7728 # if both carbon and cocoa are specified, enable the autodetection code.
7729 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7730 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7731 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7732 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7735 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7736 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7739 if [ "$PLATFORM_MAC" = "yes" ]; then
7740 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7741 #if defined(__LP64__)
7742 # define QT_POINTER_SIZE 8
7744 # define QT_POINTER_SIZE 4
7748 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7749 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7753 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7755 if [ "$CFG_DEV" = "yes" ]; then
7756 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7759 # Embedded compile time options
7760 if [ "$PLATFORM_QWS" = "yes" ]; then
7761 # Add QWS to config.h
7762 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7764 # Add excluded decorations to $QCONFIG_FLAGS
7765 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7766 for decor in $decors; do
7767 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7768 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7771 # Figure which embedded drivers which are turned off
7772 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7773 for ADRIVER in $CFG_GFX_ON; do
7774 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7777 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7778 # the um driver is currently not in the available list for external builds
7779 if [ "$CFG_DEV" = "no" ]; then
7780 CFG_KBD_OFF="$CFG_KBD_OFF um"
7782 for ADRIVER in $CFG_KBD_ON; do
7783 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7786 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7787 for ADRIVER in $CFG_MOUSE_ON; do
7788 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7791 for DRIVER in $CFG_GFX_OFF; do
7792 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7793 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7796 for DRIVER in $CFG_KBD_OFF; do
7797 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7798 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7801 for DRIVER in $CFG_MOUSE_OFF; do
7802 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7803 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7807 if [ "$PLATFORM_QPA" = "yes" ]; then
7808 # Add QPA to config.h
7809 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7812 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7813 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7816 # Add turned on SQL drivers
7817 for DRIVER in $CFG_SQL_AVAILABLE; do
7818 eval "VAL=\$CFG_SQL_$DRIVER"
7821 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7822 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7823 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7826 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7832 QMakeVar set sql-drivers "$SQL_DRIVERS"
7833 QMakeVar set sql-plugins "$SQL_PLUGINS"
7835 # Add other configuration options to the qconfig.h file
7836 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7837 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7838 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7839 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7840 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7841 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7842 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7843 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7844 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7846 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
7847 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7848 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7849 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7850 [ "$CFG_GRAPHICS_SYSTEM" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RUNTIME"
7853 # ATM we need this define to compile Qt. Remove later!
7854 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7856 # X11/Unix/Mac only configs
7857 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7858 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7859 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7860 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7861 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7862 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7863 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7864 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7865 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7866 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7867 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7868 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7869 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7870 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7871 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7873 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7874 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7875 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7876 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7877 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7878 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7879 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7880 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7881 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7882 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7883 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7884 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7885 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7887 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7888 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7889 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7890 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7891 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7892 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7893 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7894 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7895 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
7897 # sort QCONFIG_FLAGS for neatness if we can
7898 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7899 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7901 if [ -n "$QCONFIG_FLAGS" ]; then
7902 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7903 #ifndef QT_BOOTSTRAPPED
7906 for cfg in $QCONFIG_FLAGS; do
7907 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7908 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7909 # figure out define logic, so we can output the correct
7910 # ifdefs to override the global defines in a project
7912 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7913 # QT_NO_option can be forcefully turned on by QT_option
7914 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7915 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7916 # QT_option can be forcefully turned off by QT_NO_option
7917 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7920 if [ -z $cfgdNeg ]; then
7921 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7928 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7929 #if defined($cfgd) && defined($cfgdNeg)
7931 #elif !defined($cfgd) && !defined($cfgdNeg)
7938 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7939 #endif // QT_BOOTSTRAPPED
7944 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7945 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7946 #define QT_VISIBILITY_AVAILABLE
7951 if [ -n "$QT_LIBINFIX" ]; then
7952 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7953 #define QT_LIBINFIX "$QT_LIBINFIX"
7958 if [ -n "$CFG_RUNTIME_SYSTEM" ]; then
7959 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7960 #define QT_DEFAULT_RUNTIME_SYSTEM "$CFG_RUNTIME_SYSTEM"
7965 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7966 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7967 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7969 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7970 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7971 chmod -w "$outpath/src/corelib/global/qconfig.h"
7972 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7973 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7977 #-------------------------------------------------------------------------------
7978 # save configuration into qconfig.pri
7979 #-------------------------------------------------------------------------------
7980 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7981 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7982 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7983 if [ "$CFG_DEBUG" = "yes" ]; then
7984 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7985 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7986 QT_CONFIG="$QT_CONFIG release"
7988 QT_CONFIG="$QT_CONFIG debug"
7989 elif [ "$CFG_DEBUG" = "no" ]; then
7990 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7991 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7992 QT_CONFIG="$QT_CONFIG debug"
7994 QT_CONFIG="$QT_CONFIG release"
7996 if [ "$CFG_STL" = "yes" ]; then
7997 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7999 if [ "$CFG_FRAMEWORK" = "no" ]; then
8000 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
8002 QT_CONFIG="$QT_CONFIG qt_framework"
8003 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
8005 if [ "$PLATFORM_MAC" = "yes" ]; then
8006 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
8008 if [ "$CFG_DEV" = "yes" ]; then
8009 QT_CONFIG="$QT_CONFIG private_tests"
8012 # Make the application arch follow the Qt arch for single arch builds.
8013 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
8014 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
8015 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
8018 cat >>"$QTCONFIG.tmp" <<EOF
8020 CONFIG += $QTCONFIG_CONFIG
8022 QT_EDITION = $Edition
8023 QT_CONFIG += $QT_CONFIG
8026 QT_VERSION = $QT_VERSION
8027 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
8028 QT_MINOR_VERSION = $QT_MINOR_VERSION
8029 QT_PATCH_VERSION = $QT_PATCH_VERSION
8032 QT_LIBINFIX = $QT_LIBINFIX
8033 QT_NAMESPACE = $QT_NAMESPACE
8034 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
8037 if [ -n "$CFG_SYSROOT" ]; then
8038 echo "# sysroot" >>"$QTCONFIG.tmp"
8039 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
8040 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
8041 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8042 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8043 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
8044 echo "}" >> "$QTCONFIG.tmp"
8045 echo >> "$QTCONFIG.tmp"
8047 if [ "$CFG_RPATH" = "yes" ]; then
8048 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
8050 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
8051 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
8052 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
8053 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
8056 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
8057 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
8058 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
8061 # replace qconfig.pri if it differs from the newly created temp file
8062 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
8063 rm -f "$QTCONFIG.tmp"
8065 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
8068 #-------------------------------------------------------------------------------
8069 # save configuration into qmodule.pri
8070 #-------------------------------------------------------------------------------
8071 QTMODULE="$outpath/mkspecs/qmodule.pri"
8073 # Ensure we can link to uninistalled libraries
8074 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
8075 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
8077 if [ -n "$QT_CFLAGS_PSQL" ]; then
8078 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
8080 if [ -n "$QT_LFLAGS_PSQL" ]; then
8081 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8083 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8084 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8086 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8087 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8089 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8090 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8092 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8093 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8095 if [ -n "$QT_LFLAGS_ODBC" ]; then
8096 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8098 if [ -n "$QT_LFLAGS_TDS" ]; then
8099 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8102 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8103 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8106 #dump in the OPENSSL_LIBS info
8107 if [ '!' -z "$OPENSSL_LIBS" ]; then
8108 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8109 elif [ "$CFG_OPENSSL" = "linked" ]; then
8110 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8113 #dump in the SDK info
8114 if [ '!' -z "$CFG_SDK" ]; then
8115 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8118 # mac gcc -Xarch support
8119 if [ "$CFG_MAC_XARCH" = "no" ]; then
8120 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8124 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8125 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8127 # replace qmodule.pri if it differs from the newly created temp file
8128 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8129 rm -f "$QTMODULE.tmp"
8131 mv -f "$QTMODULE.tmp" "$QTMODULE"
8134 #-------------------------------------------------------------------------------
8135 # save configuration into .qmake.cache
8136 #-------------------------------------------------------------------------------
8138 CACHEFILE="$outpath/.qmake.cache"
8139 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8140 cat >>"$CACHEFILE.tmp" <<EOF
8142 QT_SOURCE_TREE = \$\$quote($relpath)
8143 QT_BUILD_TREE = \$\$quote($outpath)
8144 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8146 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8147 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8148 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8149 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8150 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8151 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8152 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8154 include(\$\$PWD/mkspecs/qmodule.pri)
8155 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8156 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8157 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8161 #dump the qmake spec
8162 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8163 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8165 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8170 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8171 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8172 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8173 # don't need to worry about generated files
8174 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8175 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8177 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8179 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8180 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8183 # replace .qmake.cache if it differs from the newly created temp file
8184 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8185 rm -f "$CACHEFILE.tmp"
8187 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8190 #-------------------------------------------------------------------------------
8191 # give feedback on configuration
8192 #-------------------------------------------------------------------------------
8196 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8199 This target is using the GNU C++ compiler ($PLATFORM).
8201 Recent versions of this compiler automatically include code for
8202 exceptions, which increase both the size of the Qt libraries and
8203 the amount of memory taken by your applications.
8205 You may choose to re-run `basename $0` with the -no-exceptions
8206 option to compile Qt without exceptions. This is completely binary
8207 compatible, and existing applications will continue to work.
8215 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8218 This target is using the MIPSpro C++ compiler ($PLATFORM).
8220 You may choose to re-run `basename $0` with the -no-exceptions
8221 option to compile Qt without exceptions. This will make the
8222 size of the Qt library smaller and reduce the amount of memory
8223 taken by your applications.
8234 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8236 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8237 in debug mode will run out of memory on systems with 2GB or less.
8238 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8239 -no-webkit or -release to skip webkit debug.
8244 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8245 echo "Build type: $PLATFORM"
8247 echo "Building on: $PLATFORM"
8248 echo "Building for: $XPLATFORM"
8251 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8252 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8254 echo "Architecture: $CFG_ARCH"
8257 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8258 echo "Host architecture: $CFG_HOST_ARCH"
8261 if [ "$PLATFORM_MAC" = "yes" ]; then
8262 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8263 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8264 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8266 echo "Using framework: Cocoa"
8269 echo "Using framework: Carbon"
8273 if [ -n "$PLATFORM_NOTES" ]; then
8274 echo "Platform notes:"
8275 echo "$PLATFORM_NOTES"
8280 if [ "$OPT_VERBOSE" = "yes" ]; then
8281 echo $ECHO_N "qmake vars .......... $ECHO_C"
8282 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8283 echo "qmake switches ......... $QMAKE_SWITCHES"
8286 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8287 echo "Build .................. $CFG_BUILD_PARTS"
8288 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8289 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8290 echo "Debug .................. yes (combined)"
8291 if [ "$CFG_DEBUG" = "yes" ]; then
8292 echo "Default Link ........... debug"
8294 echo "Default Link ........... release"
8297 echo "Debug .................. $CFG_DEBUG"
8299 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
8300 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8301 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8302 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8303 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8304 echo "QtGui module ........... $CFG_GUI"
8305 echo "QtScript module ........ $CFG_SCRIPT"
8306 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8307 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8308 echo "Phonon module .......... $CFG_PHONON"
8309 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8310 echo "SVG module ............. $CFG_SVG"
8311 case "$CFG_WEBKIT" in
8312 yes) echo "WebKit module .......... yes" ;;
8313 debug) echo "WebKit module .......... yes (debug)" ;;
8314 no) echo "WebKit module .......... no" ;;
8316 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8317 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8318 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8320 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8323 echo "V8 module .............. $CFG_V8"
8324 echo "Declarative module ..... $CFG_DECLARATIVE"
8325 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8326 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8328 echo "Location module ........ $CFG_LOCATION"
8329 echo "STL support ............ $CFG_STL"
8330 echo "PCH support ............ $CFG_PRECOMPILE"
8331 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8332 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8333 echo "AVX..................... ${CFG_AVX}"
8334 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8335 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8336 echo "NEON support ........... ${CFG_NEON}"
8338 [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
8339 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8340 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8341 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8342 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8343 echo "NIS support ............ $CFG_NIS"
8344 echo "CUPS support ........... $CFG_CUPS"
8345 echo "Iconv support .......... $CFG_ICONV"
8346 echo "Glib support ........... $CFG_GLIB"
8347 echo "GStreamer support ...... $CFG_GSTREAMER"
8348 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8349 echo "Large File support ..... $CFG_LARGEFILE"
8350 echo "GIF support ............ $CFG_GIF"
8351 if [ "$CFG_TIFF" = "no" ]; then
8352 echo "TIFF support ........... $CFG_TIFF"
8354 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8356 if [ "$CFG_JPEG" = "no" ]; then
8357 echo "JPEG support ........... $CFG_JPEG"
8359 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8361 if [ "$CFG_PNG" = "no" ]; then
8362 echo "PNG support ............ $CFG_PNG"
8364 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8366 if [ "$CFG_MNG" = "no" ]; then
8367 echo "MNG support ............ $CFG_MNG"
8369 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8371 echo "zlib support ........... $CFG_ZLIB"
8372 echo "Session management ..... $CFG_SM"
8373 if [ "$PLATFORM_QWS" = "yes" ]; then
8374 echo "Embedded support ....... $CFG_EMBEDDED"
8375 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8376 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8378 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8380 # Normalize the decoration output first
8381 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8382 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8383 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8384 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8385 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8386 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8387 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8388 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8389 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8390 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8391 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8392 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8393 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8394 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8395 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8396 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8398 if [ "$CFG_OPENGL" = "desktop" ]; then
8399 echo "OpenGL support ......... yes (Desktop OpenGL)"
8400 elif [ "$CFG_OPENGL" = "es2" ]; then
8401 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8403 echo "OpenGL support ......... no"
8405 if [ "$CFG_EGL" != "no" ]; then
8406 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8407 echo "EGL support ............ yes <GLES/egl.h>"
8409 echo "EGL support ............ yes <EGL/egl.h>"
8412 if [ "$CFG_OPENVG" ]; then
8413 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8414 echo "OpenVG support ......... ShivaVG"
8416 echo "OpenVG support ......... $CFG_OPENVG"
8419 if [ "$PLATFORM_X11" = "yes" ]; then
8420 echo "NAS sound support ...... $CFG_NAS"
8421 echo "XShape support ......... $CFG_XSHAPE"
8422 echo "XVideo support ......... $CFG_XVIDEO"
8423 echo "XSync support .......... $CFG_XSYNC"
8424 echo "Xinerama support ....... $CFG_XINERAMA"
8425 echo "Xcursor support ........ $CFG_XCURSOR"
8426 echo "Xfixes support ......... $CFG_XFIXES"
8427 echo "Xrandr support ......... $CFG_XRANDR"
8428 echo "Xrender support ........ $CFG_XRENDER"
8429 echo "Xi support ............. $CFG_XINPUT"
8430 echo "MIT-SHM support ........ $CFG_MITSHM"
8431 echo "FontConfig support ..... $CFG_FONTCONFIG"
8432 echo "XKB Support ............ $CFG_XKB"
8433 echo "immodule support ....... $CFG_IM"
8434 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8436 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8437 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8438 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8439 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8440 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8441 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8442 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8443 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8444 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8447 if [ "$CFG_OPENSSL" = "yes" ]; then
8448 OPENSSL_LINKAGE="(run-time)"
8449 elif [ "$CFG_OPENSSL" = "linked" ]; then
8450 OPENSSL_LINKAGE="(linked)"
8452 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8453 echo "Alsa support ........... $CFG_ALSA"
8454 if [ "$PLATFORM_MAC" = "yes" ]; then
8455 echo "CoreWlan support ....... $CFG_COREWLAN"
8457 echo "ICD support ............ $CFG_ICD"
8458 echo "libICU support ......... $CFG_ICU"
8459 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8460 echo "Xcb support ............ limited (old version)"
8462 echo "Xcb support ............ $CFG_XCB"
8464 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8465 echo "XInput2 support ........ $CFG_XINPUT2"
8469 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC"
8471 # complain about not being able to use dynamic plugins if we are using a static build
8472 if [ "$CFG_SHARED" = "no" ]; then
8474 echo "WARNING: Using static linking will disable the use of dynamically"
8475 echo "loaded plugins. Make sure to import all needed static plugins,"
8476 echo "or compile needed modules into the library."
8479 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8481 echo "NOTE: When linking against OpenSSL, you can override the default"
8482 echo "library names through OPENSSL_LIBS."
8484 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8487 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8489 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8490 echo "if you want a pure debug build."
8495 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8500 #-------------------------------------------------------------------------------
8501 # build makefiles based on the configuration
8502 #-------------------------------------------------------------------------------
8504 echo "Finding project files. Please wait..."
8505 if [ "$CFG_NOPROCESS" != "yes" ]; then
8506 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8507 if [ -f "${relpath}/qtbase.pro" ]; then
8508 mkfile="${outpath}/Makefile"
8509 [ -f "$mkfile" ] && chmod +w "$mkfile"
8510 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8514 # .projects -> projects to process
8515 # .projects.1 -> qt and moc
8516 # .projects.2 -> subdirs and libs
8517 # .projects.3 -> the rest
8518 rm -f .projects .projects.1 .projects.2 .projects.3
8520 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8521 if [ -z "$AWK" ]; then
8522 for p in `echo $QMAKE_PROJECTS`; do
8523 echo "$p" >> .projects
8526 cat >projects.awk <<EOF
8532 first = "./.projects.1.tmp"
8533 second = "./.projects.2.tmp"
8534 third = "./.projects.3.tmp"
8539 if ( ! target_file )
8541 print input_file >target_file
8546 input_file = FILENAME
8551 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8554 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8555 target_file = second
8560 matched_target == 0 && /^(TEMPLATE.*=)/ {
8561 if ( \$3 == "subdirs" )
8562 target_file = second
8563 else if ( \$3 == "lib" )
8569 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8570 if ( \$0 ~ /plugin/ )
8573 target_file = second
8578 if ( ! target_file )
8580 print input_file >>target_file
8587 for p in `echo $QMAKE_PROJECTS`; do
8588 echo "$p" >> .projects.all
8591 # if you get errors about the length of the command line to awk, change the -l arg
8593 split -l 100 .projects.all .projects.all.
8594 for p in .projects.all.*; do
8595 "$AWK" -f projects.awk `cat $p`
8596 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8597 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8598 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8599 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8601 rm -f .projects.all* projects.awk
8603 [ -f .projects.1 ] && cat .projects.1 >>.projects
8604 [ -f .projects.2 ] && cat .projects.2 >>.projects
8605 rm -f .projects.1 .projects.2
8606 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8607 cat .projects.3 >>.projects
8611 # don't sort Qt and MOC in with the other project files
8612 # also work around a segfaulting uniq(1)
8613 if [ -f .sorted.projects.2 ]; then
8614 sort .sorted.projects.2 > .sorted.projects.2.new
8615 mv -f .sorted.projects.2.new .sorted.projects.2
8616 cat .sorted.projects.2 >> .sorted.projects.1
8618 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8619 rm -f .sorted.projects.2 .sorted.projects.1
8623 if [ -f .projects ]; then
8624 uniq .projects >.tmp
8625 mv -f .tmp .projects
8626 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8628 if [ -f .projects.3 ]; then
8629 uniq .projects.3 >.tmp
8630 mv -f .tmp .projects.3
8631 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8633 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8637 for part in $CFG_BUILD_PARTS; do
8639 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8640 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8641 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8642 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8647 if [ "$CFG_DEV" = "yes" ]; then
8648 PART_ROOTS="$PART_ROOTS tests"
8651 echo "Creating makefiles. Please wait..."
8652 for file in .projects .projects.3; do
8653 [ '!' -f "$file" ] && continue
8654 for a in `cat $file`; do
8656 for r in $PART_ROOTS; do
8657 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8662 [ "$IN_ROOT" = "no" ] && continue
8665 *winmain/winmain.pro)
8666 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8670 *examples/activeqt/*) continue ;;
8671 */qmake/qmake.pro) continue ;;
8672 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8673 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8679 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8680 test -d "$dir" || mkdir -p "$dir"
8681 OUTDIR="$outpath/$dir"
8682 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8683 # fast configure - the makefile exists, skip it
8684 # since the makefile exists, it was generated by qmake, which means we
8685 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8687 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8690 QMAKE_SPEC_ARGS="-spec $SPEC"
8691 echo $ECHO_N " for $a$ECHO_C"
8693 QMAKE="$outpath/bin/qmake"
8694 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8695 if [ "$file" = ".projects.3" ]; then
8698 cat >"${OUTDIR}/Makefile" <<EOF
8699 # ${OUTDIR}/Makefile: generated by configure
8701 # WARNING: This makefile will be replaced with a real makefile.
8702 # All changes made to this file will be lost.
8704 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8706 cat >>"${OUTDIR}/Makefile" <<EOF
8708 all clean install qmake first Makefile: FORCE
8709 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8717 if [ "$OPT_VERBOSE" = "yes" ]; then
8718 echo " (`basename $SPEC`)"
8719 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8724 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8725 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8729 rm -f .projects .projects.3
8731 #-------------------------------------------------------------------------------
8732 # check for platforms that we don't yet know about
8733 #-------------------------------------------------------------------------------
8734 if [ "$CFG_ARCH" = "generic" ]; then
8737 NOTICE: Atomic operations are not yet supported for this
8740 Qt will use the 'generic' architecture instead, which uses a
8741 single pthread_mutex_t to protect all atomic operations. This
8742 implementation is the slow (but safe) fallback implementation
8743 for architectures Qt does not yet support.
8747 #-------------------------------------------------------------------------------
8748 # check if the user passed the -no-zlib option, which is no longer supported
8749 #-------------------------------------------------------------------------------
8750 if [ -n "$ZLIB_FORCED" ]; then
8751 which_zlib="supplied"
8752 if [ "$CFG_ZLIB" = "system" ]; then
8758 NOTICE: The -no-zlib option was supplied but is no longer
8761 Qt now requires zlib support in all builds, so the -no-zlib
8762 option was ignored. Qt will be built using the $which_zlib
8767 #-------------------------------------------------------------------------------
8768 # finally save the executed command to another script
8769 #-------------------------------------------------------------------------------
8770 if [ `basename $0` != "config.status" ]; then
8771 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8773 # add the system variables
8774 for varname in $SYSTEM_VARIABLES; do
8776 'if [ -n "\$'${varname}'" ]; then
8777 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8782 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8784 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8785 echo "#!/bin/sh" > "$outpath/config.status"
8786 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8787 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8788 echo "else" >> "$outpath/config.status"
8789 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8790 echo "fi" >> "$outpath/config.status"
8791 chmod +x "$outpath/config.status"
8794 if [ -n "$RPATH_MESSAGE" ]; then
8796 echo "$RPATH_MESSAGE"
8799 MAKE=`basename "$MAKE"`
8801 echo Qt is now configured for building. Just run \'$MAKE\'.
8802 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8803 echo Once everything is built, Qt is installed.
8804 echo You should not run \'$MAKE install\'.
8806 echo Once everything is built, you must run \'$MAKE install\'.
8807 echo Qt will be installed into $QT_INSTALL_PREFIX
8810 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.