2 #############################################################################
4 ## Copyright (C) 2012 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 #-------------------------------------------------------------------------------
234 EditionString=Commercial
238 # parse the arguments, setting things to "yes" or "no"
239 while [ "$#" -gt 0 ]; do
243 #Autoconf style options
245 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
249 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
253 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
254 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
257 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
262 # this option may or may not be followed by an argument
263 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
272 # this option may or may not be followed by an argument
273 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
286 -h|help|--help|-help)
287 if [ "$VAL" = "yes" ]; then
289 COMMERCIAL_USER="no" #doesn't matter we will display the help
292 COMMERCIAL_USER="no" #doesn't matter we will display the help
296 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
300 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
307 if [ "$UNKNOWN_ARG" = "yes" ]; then
324 if [ "$PLATFORM_QPA" != "no" ]; then
325 if [ "$PLATFORM_QPA" = "maybe" ]; then
332 echo "No license exists to enable Qt QPA. Disabling."
337 echo "Using NaCl at $VAL."
349 COMMERCIAL_USER="yes"
363 if [ "$COMMERCIAL_USER" = "ask" ]; then
365 echo "Which edition of Qt do you want to use ?"
367 echo "Type 'c' if you want to use the Commercial Edition."
368 echo "Type 'o' if you want to use the Open Source Edition."
372 if [ "$commercial" = "c" ]; then
373 COMMERCIAL_USER="yes"
375 elif [ "$commercial" = "o" ]; then
382 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
383 # Commercial preview release
384 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
387 QT_EDITION="QT_EDITION_DESKTOP"
388 LicenseType="Technology Preview"
389 elif [ $COMMERCIAL_USER = "yes" ]; then
390 # one of commercial editions
391 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
392 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
393 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
395 # read in the license file
396 if [ -f "$LICENSE_FILE" ]; then
397 . "$LICENSE_FILE" >/dev/null 2>&1
398 if [ -z "$LicenseKeyExt" ]; then
400 echo "You are using an old license file."
402 echo "Please install the license file supplied by Nokia,"
403 echo "or install the Qt Open Source Edition if you intend to"
404 echo "develop free software."
407 if [ -z "$Licensee" ]; then
409 echo "Invalid license key. Please check the license key."
413 if [ -z "$LicenseKeyExt" ]; then
415 echo $ECHO_N "Please enter your license key: $ECHO_C"
417 Licensee="Unknown user"
422 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
423 && LicenseValid="yes" \
425 if [ "$LicenseValid" != "yes" ]; then
427 echo "Invalid license key. Please check the license key."
430 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
431 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
432 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
433 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
435 # determine which edition we are licensed to use
436 case "$LicenseTypeCode" in
438 LicenseType="Commercial"
442 QT_EDITION="QT_EDITION_UNIVERSAL"
445 Edition="FullFramework"
446 EditionString="Full Framework"
447 QT_EDITION="QT_EDITION_DESKTOP"
450 Edition="GUIFramework"
451 EditionString="GUI Framework"
452 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
457 LicenseType="Evaluation"
458 QMakeVar add DEFINES QT_EVAL
462 QT_EDITION="QT_EDITION_EVALUATION"
467 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
469 echo "Invalid license key. Please check the license key."
473 # verify that we are licensed to use Qt on this platform
475 case "$PlatformCode" in
478 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
482 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
485 ### EMBEDDED_QPA logic missing ###
486 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
487 X9,* | XC,* | XU,* | XW,* | XM,*)
489 LICENSE_EXTENSION="-ALLOS"
491 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
492 # Qt for Embedded Linux
493 LICENSE_EXTENSION="-EMBEDDED"
495 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
497 LICENSE_EXTENSION="-EMBEDDED"
499 FM,*,no | LM,yes,* | ZM,no,no)
501 LICENSE_EXTENSION="-DESKTOP"
505 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
506 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
508 echo "You are not licensed for the $Platform platform."
510 echo "Please contact qt-info@nokia.com to upgrade your license to"
511 echo "include the $Platform platform, or install the Qt Open Source Edition"
512 echo "if you intend to develop free software."
517 if test -r "$relpath/.LICENSE"; then
518 # Generic, non-final license
520 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
525 *TECHNOLOGY?PREVIEW*)
532 echo >&2 "Invalid license files; cannot continue"
537 EditionString="$Edition"
538 QT_EDITION="QT_EDITION_DESKTOP"
541 case "$LicenseFeatureCode" in
544 case "$LicenseType" in
546 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
549 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
555 case "$LicenseType" in
557 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
560 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
566 echo "Invalid license key. Please check the license key."
570 case "$LicenseFeatureCode" in
578 if [ '!' -f "$outpath/LICENSE" ]; then
579 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
580 echo "this software has disappeared."
582 echo "Sorry, you are not licensed to use this software."
583 echo "Try re-installing."
587 elif [ $COMMERCIAL_USER = "no" ]; then
588 # Open Source edition - may only be used under the terms of the GPL or LGPL.
589 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
590 Licensee="Open Source"
592 EditionString="Open Source"
593 QT_EDITION="QT_EDITION_OPENSOURCE"
596 #-------------------------------------------------------------------------------
597 # initalize variables
598 #-------------------------------------------------------------------------------
600 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
601 for varname in $SYSTEM_VARIABLES; do
602 qmakevarname="${varname}"
603 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
604 if [ "${varname}" = "LDFLAGS" ]; then
605 qmakevarname="LFLAGS"
606 elif [ "${varname}" = "LD" ]; then
610 'if [ -n "\$'${varname}'" ]; then
611 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
615 # Use CC/CXX to run config.tests
616 mkdir -p "$outpath/config.tests"
617 rm -f "$outpath/config.tests/.qmake.cache"
618 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
620 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
621 QMakeVar add decorations "default windows styled"
622 QMakeVar add mouse-drivers "pc"
623 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
624 QMakeVar add gfx-drivers "linuxfb"
625 QMakeVar add mouse-drivers "linuxtp"
627 QMakeVar add kbd-drivers "tty"
629 if [ "$CFG_DEV" = "yes" ]; then
630 QMakeVar add kbd-drivers "um"
633 # QTDIR may be set and point to an old or system-wide Qt installation
636 # the minimum version of libdbus-1 that we require:
637 MIN_DBUS_1_VERSION=0.93
639 # initalize internal variables
640 CFG_CONFIGURE_EXIT_ON_ERROR=yes
642 CFG_EXCEPTIONS=unspecified
643 CFG_GUI=auto # (yes|no|auto)
644 CFG_SCRIPT=auto # (yes|no|auto)
645 CFG_SCRIPTTOOLS=auto # (yes|no|auto)
646 CFG_XMLPATTERNS=auto # (yes|no|auto)
676 CFG_OPENVG_LC_INCLUDES=no
677 CFG_OPENVG_SHIVA=auto
678 CFG_OPENVG_ON_OPENGL=auto
680 CFG_EGL_GLES_INCLUDES=no
683 CFG_QWS_FREETYPE=auto
686 QT_DEFAULT_BUILD_PARTS="libs examples tests"
691 CFG_PHONON_BACKEND=yes
693 CFG_AUDIO_BACKEND=auto
698 CFG_DECLARATIVE_DEBUG=yes
699 CFG_WEBKIT=auto # (yes|no|auto|debug)
700 CFG_JAVASCRIPTCORE_JIT=auto
703 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
704 CFG_GFX_ON="linuxfb multiscreen"
705 CFG_GFX_PLUGIN_AVAILABLE=
708 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
709 CFG_KBD_ON="tty" #default, see QMakeVar above
710 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
711 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
713 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
714 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
715 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
716 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
718 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
719 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
720 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
721 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
726 CFG_KBD_PLUGIN_AVAILABLE=
729 CFG_MOUSE_PLUGIN_AVAILABLE=
734 CFG_DECORATION_AVAILABLE="styled windows default"
735 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
736 CFG_DECORATION_PLUGIN_AVAILABLE=
737 CFG_DECORATION_PLUGIN=
755 CFG_SEPARATE_DEBUG_INFO=no
756 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
757 CFG_REDUCE_EXPORTS=auto
767 CFG_REDUCE_RELOCATIONS=auto
770 CFG_ACCESSIBILITY=auto
773 CFG_DOUBLEFORMAT=auto
777 CFG_CLOCK_GETTIME=auto
778 CFG_CLOCK_MONOTONIC=auto
787 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
792 COMMANDLINE_MAC_CARBON=no
795 CFG_PREFIX_INSTALL=yes
804 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
805 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
809 OPT_CONFIRM_LICENSE=no
823 # initalize variables used for installation
832 QT_INSTALL_TRANSLATIONS=
838 #flags for SQL drivers
846 QT_LFLAGS_ODBC="-lodbc"
849 # flags for libdbus-1
853 # flags for Glib (X11 only)
857 # flags for GStreamer (X11 only)
861 # flags for libconnsettings0 (used for Maemo ICD bearer management plugin)
862 QT_CFLAGS_CONNSETTINGS=
863 QT_LIBS_CONNSETTINGS=
865 #-------------------------------------------------------------------------------
866 # check SQL drivers, mouse drivers and decorations available in this package
867 #-------------------------------------------------------------------------------
869 # opensource version removes some drivers, so force them to be off
875 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
876 for a in "$relpath/src/plugins/sqldrivers/"*; do
878 base_a=`basename "$a"`
879 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
880 eval "CFG_SQL_${base_a}=auto"
885 CFG_DECORATION_PLUGIN_AVAILABLE=
886 if [ -d "$relpath/src/plugins/decorations" ]; then
887 for a in "$relpath/src/plugins/decorations/"*; do
889 base_a=`basename "$a"`
890 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
895 CFG_KBD_PLUGIN_AVAILABLE=
896 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
897 for a in "$relpath/src/plugins/kbddrivers/"*; do
899 base_a=`basename "$a"`
900 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
905 CFG_MOUSE_PLUGIN_AVAILABLE=
906 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
907 for a in "$relpath/src/plugins/mousedrivers/"*; do
909 base_a=`basename "$a"`
910 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
915 CFG_GFX_PLUGIN_AVAILABLE=
916 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
917 for a in "$relpath/src/plugins/gfxdrivers/"*; do
919 base_a=`basename "$a"`
920 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
923 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
926 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
927 if [ -d "$relpath/src/plugins/imageformats" ]; then
928 for a in "$relpath/src/plugins/imageformats/"*; do
930 base_a=`basename "$a"`
931 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
936 #-------------------------------------------------------------------------------
937 # Set Default NaCl options
938 #-------------------------------------------------------------------------------
939 if [ "$CFG_EMBEDDED" = "nacl" ]; then
940 echo "Setting NaCl options:"
950 if [ `uname` = "Linux" ]; then
951 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
952 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
954 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
955 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
958 echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
969 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
970 QT_CONFIG="$QT_CONFIG nacl"
973 #-------------------------------------------------------------------------------
974 # parse command line arguments
975 #-------------------------------------------------------------------------------
977 # parse the arguments, setting things to "yes" or "no"
978 while [ "$#" -gt 0 ]; do
982 #Autoconf style options
984 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
988 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
992 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
993 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
996 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
1000 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
1004 -no-*-*|-plugin-*-*|-qt-*-*)
1005 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1006 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
1021 #Qt style no options
1023 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
1026 #Qt style yes options
1027 -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-xinput2|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-xcb|-wayland|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-v8|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
1028 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1031 #Qt style options that pass an argument
1033 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
1035 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1039 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1043 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1044 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1048 #Qt style complex options in one command
1049 -enable-*|-disable-*)
1050 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1051 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1053 #Qt Builtin/System style options
1054 -no-*|-system-*|-qt-*)
1055 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1056 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1058 #Options that cannot be generalized
1065 # this option may or may not be followed by an argument
1066 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1073 -embedded-lite|-qpa)
1075 # this option may or may not be followed by an argument
1076 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1089 # this option may or may not be followed by an argument
1090 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1099 # this option may or may not be followed by an argument
1100 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1108 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1109 # this option may or may not be followed by an argument
1110 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1119 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1123 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1137 if [ "$1" = "-D" ]; then
1141 VAL=`echo $1 | sed 's,-D,,'`
1146 # this option may or may not be followed by an argument
1147 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1156 if [ "$1" = "-I" ]; then
1160 VAL=`echo $1 | sed 's,-I,,'`
1165 if [ "$1" = "-L" ]; then
1169 VAL=`echo $1 | sed 's,-L,,'`
1174 if [ "$1" = "-R" ]; then
1178 VAL=`echo $1 | sed 's,-R,,'`
1183 VAL=`echo $1 | sed 's,-l,,'`
1187 if [ "$1" = "-F" ]; then
1191 VAL=`echo $1 | sed 's,-F,,'`
1196 if [ "$1" = "-fw" ]; then
1200 VAL=`echo $1 | sed 's,-fw,,'`
1208 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1215 if [ "$UNKNOWN_ARG" = "yes" ]; then
1216 echo "$1: unknown argument"
1227 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1228 CFG_ACCESSIBILITY="$VAL"
1237 CFG_USE_GNUMAKE="$VAL"
1240 CFG_MYSQL_CONFIG="$VAL"
1243 QT_INSTALL_PREFIX="$VAL"
1246 QT_HOST_PREFIX="$VAL"
1249 QT_FORCE_PKGCONFIG=yes
1252 QT_INSTALL_DOCS="$VAL"
1255 QT_INSTALL_HEADERS="$VAL"
1258 QT_INSTALL_PLUGINS="$VAL"
1261 QT_INSTALL_IMPORTS="$VAL"
1264 QT_INSTALL_DATA="$VAL"
1267 QT_INSTALL_LIBS="$VAL"
1276 QT_INSTALL_TRANSLATIONS="$VAL"
1278 sysconfdir|settingsdir)
1279 QT_INSTALL_SETTINGS="$VAL"
1282 QT_INSTALL_EXAMPLES="$VAL"
1285 QT_INSTALL_TESTS="$VAL"
1294 QT_INSTALL_BINS="$VAL"
1316 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1323 if [ "$VAL" = "little" ]; then
1324 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1325 elif [ "$VAL" = "big" ]; then
1326 CFG_ENDIAN="Q_BIG_ENDIAN"
1332 if [ "$VAL" = "little" ]; then
1333 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1334 elif [ "$VAL" = "big" ]; then
1335 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1341 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1348 CFG_QWS_DEPTHS="$VAL"
1351 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1352 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1353 [ "$VAL" = "es2" ]; then
1355 if [ "$VAL" = "es2" ]; then
1363 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1365 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1372 qvfb) # left for commandline compatibility, not documented
1373 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1374 if [ "$VAL" = "yes" ]; then
1375 QMakeVar add gfx-drivers qvfb
1376 QMakeVar add kbd-drivers qvfb
1377 QMakeVar add mouse-drivers qvfb
1378 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1379 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1380 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1387 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1390 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1399 if [ "$PLATFORM_MAC" = "yes" ]; then
1406 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1407 CFG_MAC_DWARF2="$VAL"
1413 # if this is a Mac then "windows" probably means
1414 # we are cross-compiling for MinGW
1415 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1416 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1425 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1426 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
1432 # do nothing - Cocoa is the default.
1435 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1436 CFG_MAC_CARBON="$VAL"
1437 COMMANDLINE_MAC_CARBON="$VAL"
1443 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_CARBON" != "yes" ] && [ "$VAL" = "yes" ]; then
1444 CFG_MAC_HARFBUZZ="$VAL"
1451 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1452 CFG_FRAMEWORK="$VAL"
1458 if [ "$VAL" = "yes" ]; then
1460 QMakeVar add QMAKE_CFLAGS -pg
1461 QMakeVar add QMAKE_CXXFLAGS -pg
1462 QMakeVar add QMAKE_LFLAGS -pg
1463 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1469 if [ "$VAL" = "yes" ]; then
1470 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1473 exceptions|g++-exceptions)
1474 if [ "$VAL" = "no" ]; then
1476 elif [ "$VAL" = "yes" ]; then
1484 # keep compatibility with old platform names
1490 PLATFORM=hpux-acc-o64
1493 PLATFORM=hpux-acc-64
1496 PLATFORM=hpux-acc-64
1508 PLATFORM=reliant-cds-64
1511 PLATFORM=solaris-cc-64
1514 PLATFORM=unixware-cc
1517 PLATFORM=unixware-g++
1520 PLATFORM=unixware-cc
1523 PLATFORM=unixware-g++
1529 i386) NATIVE_64_ARCH="x86_64" ;;
1530 powerpc) NATIVE_64_ARCH="ppc64" ;;
1531 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1533 if [ ! -z "$NATIVE_64_ARCH" ]; then
1534 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1535 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1542 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1545 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1546 CFG_DEBUG_RELEASE="$VAL"
1552 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1553 CFG_RELEASE_QMAKE="$VAL"
1559 if [ "$VAL" = "yes" ]; then
1561 elif [ "$VAL" = "no" ]; then
1568 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1569 CFG_PREFIX_INSTALL="$VAL"
1577 developer-build|commercial|opensource)
1578 # These switches have been dealt with already
1581 if [ "$VAL" = "yes" ]; then
1583 elif [ "$VAL" = "no" ]; then
1590 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1591 CFG_INCREMENTAL="$VAL"
1597 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1598 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1604 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1605 if [ "$VAL" = "no" ]; then
1606 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1607 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1608 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1614 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1621 if [ "$VAL" = "no" ]; then
1628 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1636 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1643 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1650 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1657 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1664 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1678 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1685 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1692 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1693 CFG_PRECOMPILE="$VAL"
1698 separate-debug-info)
1699 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1700 CFG_SEPARATE_DEBUG_INFO="$VAL"
1701 elif [ "$VAL" = "nocopy" ] ; then
1702 CFG_SEPARATE_DEBUG_INFO="yes"
1703 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1709 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1710 CFG_REDUCE_EXPORTS="$VAL"
1716 if [ "$VAL" = "no" ]; then
1723 if [ "$VAL" = "no" ]; then
1730 if [ "$VAL" = "no" ]; then
1737 if [ "$VAL" = "no" ]; then
1744 if [ "$VAL" = "no" ]; then
1751 if [ "$VAL" = "no" ]; then
1758 if [ "$VAL" = "no" ]; then
1765 if [ "$VAL" = "no" ]; then
1772 if [ "$VAL" = "no" ]; then
1782 if [ "$VAL" = "no" ]; then
1789 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1790 CFG_REDUCE_RELOCATIONS="$VAL"
1796 [ "$VAL" = "qt" ] && VAL=yes
1797 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1798 CFG_QWS_FREETYPE="$VAL"
1804 [ "$VAL" = "qt" ] && VAL=yes
1805 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1810 # No longer supported:
1811 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1814 if [ "$VAL" = "system" ]; then
1821 [ "$VAL" = "yes" ] && VAL=qt
1822 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1829 [ "$VAL" = "yes" ] && VAL=qt
1830 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1837 [ "$VAL" = "yes" ] && VAL=qt
1838 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1845 [ "$VAL" = "yes" ] && VAL=qt
1846 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1853 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1860 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1867 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1874 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1881 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1888 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1895 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1896 CFG_FONTCONFIG="$VAL"
1902 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1909 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1916 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1923 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1930 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1937 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1944 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1945 CFG_GSTREAMER="$VAL"
1951 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1952 CFG_QGTKSTYLE="$VAL"
1958 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1961 if [ "$VAL" = "no" ]; then
1969 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1971 elif [ "$VAL" = "runtime" ]; then
1978 if [ "$VAL" = "yes" ]; then
1985 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1992 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1993 CFG_LARGEFILE="$VAL"
1999 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2006 if [ "$VAL" = "yes" ]; then
2007 CFG_OPENSSL="linked"
2013 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2014 CFG_XMLPATTERNS="yes"
2016 if [ "$VAL" = "no" ]; then
2017 CFG_XMLPATTERNS="no"
2024 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2027 if [ "$VAL" = "no" ]; then
2035 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2036 CFG_SCRIPTTOOLS="yes"
2038 if [ "$VAL" = "no" ]; then
2039 CFG_SCRIPTTOOLS="no"
2046 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
2049 if [ "$VAL" = "no" ]; then
2057 if [ "$VAL" = "yes" ]; then
2060 if [ "$VAL" = "no" ]; then
2068 if [ "$VAL" = "yes" ]; then
2069 CFG_DECLARATIVE="yes"
2071 if [ "$VAL" = "no" ]; then
2072 CFG_DECLARATIVE="no"
2079 if [ "$VAL" = "yes" ]; then
2080 CFG_DECLARATIVE_DEBUG="yes"
2082 if [ "$VAL" = "no" ]; then
2083 CFG_DECLARATIVE_DEBUG="no"
2090 [ "$VAL" = "auto" ] && VAL="yes"
2094 if [ "$VAL" = "yes" ]; then
2097 if [ "$VAL" = "no" ]; then
2105 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
2106 CFG_JAVASCRIPTCORE_JIT="$VAL"
2112 if [ "$VAL" = "yes" ]; then
2113 OPT_CONFIRM_LICENSE="$VAL"
2119 if [ "$VAL" = "yes" ]; then
2125 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
2126 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
2127 # if autoconf style options were used, $VAL can be "yes" or "no"
2128 [ "$VAL" = "yes" ] && VAL=qt
2129 # now $VAL should be "no", "qt", or "plugin"... double-check
2130 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
2133 # now $VAL is "no", "qt", or "plugin"
2135 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
2136 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
2138 # Grab the available values
2141 avail="$CFG_SQL_AVAILABLE"
2144 avail="$CFG_GFX_AVAILABLE"
2145 if [ "$OPT" = "plugin" ]; then
2146 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2150 avail="$CFG_DECORATION_AVAILABLE"
2151 if [ "$OPT" = "plugin" ]; then
2152 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2156 avail="$CFG_KBD_AVAILABLE"
2157 if [ "$OPT" = "plugin" ]; then
2158 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2162 avail="$CFG_MOUSE_AVAILABLE"
2163 if [ "$OPT" = "plugin" ]; then
2164 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2168 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2169 if [ "$OPT" != "plugin" ]; then
2170 # png is always built in
2176 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2180 # Check that that user's value is available.
2183 if [ "$VAL" = "$d" ]; then
2188 [ "$found" = yes ] || ERROR=yes
2190 if [ "$VAR" = "sql" ]; then
2191 # set the CFG_SQL_driver
2192 eval "CFG_SQL_$VAL=\$OPT"
2194 elif [ "$VAR" = "imageformat" ]; then
2195 [ "$OPT" = "qt" ] && OPT=yes
2196 VAL="`echo $VAL |tr a-z A-Z`"
2197 eval "CFG_$VAL=$OPT"
2201 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2202 if [ "$OPT" = "plugin" ]; then
2203 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2204 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2205 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2206 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2207 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2208 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2209 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2210 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2213 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2214 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2215 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2216 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2217 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2221 QMakeVar add "${VAR}s" "${VAL}"
2222 elif [ "$OPT" = "no" ]; then
2223 PLUG_VAR="${VAR}-plugin"
2224 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2225 IN_VAR="${VAR}-driver"
2229 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2230 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2231 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2232 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2233 QMakeVar del "${IN_VAR}s" "$VAL"
2234 QMakeVar del "${PLUG_VAR}s" "$VAL"
2236 if [ "$ERROR" = "yes" ]; then
2237 echo "$CURRENT_OPT: unknown argument"
2242 if [ "$VAL" = "yes" ]; then
2243 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2244 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2248 elif [ "$VAL" = "no" ]; then
2249 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2250 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2259 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2266 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2273 D_FLAGS="$D_FLAGS \"$VAL\""
2276 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2279 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2282 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2285 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2288 if [ "$PLATFORM_MAC" = "yes" ]; then
2289 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2290 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2296 if [ "$PLATFORM_MAC" = "yes" ]; then
2297 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2303 W_FLAGS="$W_FLAGS \"${VAL}\""
2309 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2316 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2317 CFG_PHONON_BACKEND="$VAL"
2323 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2324 CFG_MULTIMEDIA="$VAL"
2336 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2337 CFG_AUDIO_BACKEND="$VAL"
2343 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2350 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2351 CFG_FORCE_ASSERTS="$VAL"
2360 if [ "$UNKNOWN_OPT" = "yes" ]; then
2361 echo "${CURRENT_OPT}: invalid command-line switch"
2367 # update QT_CONFIG to show our current predefined configuration
2368 case "$CFG_QCONFIG" in
2369 minimal|small|medium|large|full)
2370 # these are a sequence of increasing functionality
2371 for c in minimal small medium large full; do
2372 QT_CONFIG="$QT_CONFIG $c-config"
2373 [ "$CFG_QCONFIG" = $c ] && break
2377 # not known to be sufficient for anything
2378 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2379 echo >&2 "Error: configuration file not found:"
2380 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2382 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2387 #-------------------------------------------------------------------------------
2388 # build tree initialization
2389 #-------------------------------------------------------------------------------
2391 # where to find which..
2392 unixtests="$relpath/config.tests/unix"
2393 mactests="$relpath/config.tests/mac"
2394 WHICH="$unixtests/which.test"
2396 PERL=`$WHICH perl 2>/dev/null`
2398 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2400 for e in gawk nawk awk; do
2401 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2408 PERL="/usr/bin/perl"
2409 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2413 ### skip this if the user just needs help...
2414 if [ "$OPT_HELP" != "yes" ]; then
2416 # is this a shadow build?
2417 if [ "$OPT_SHADOW" = "maybe" ]; then
2419 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2420 if [ -h "$outpath" ]; then
2421 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2427 if [ "$OPT_SHADOW" = "yes" ]; then
2428 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2429 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2430 echo >&2 "Cannot proceed."
2433 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2436 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2438 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2439 echo "Qt can be built in release mode with separate debug information, so"
2440 echo "-debug-and-release is not necessary anymore"
2444 if [ "$CFG_SILENT" = "yes" ]; then
2445 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2448 # if the source tree is different from the build tree,
2449 # symlink or copy part of the sources
2450 if [ "$OPT_SHADOW" = "yes" ]; then
2451 echo "Preparing build tree..."
2453 if [ -z "$PERL" ]; then
2455 echo "You need perl in your PATH to make a shadow build."
2456 echo "Cannot proceed."
2460 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2462 # symlink the qmake directory
2463 find "$relpath/qmake" | while read a; do
2464 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2465 if [ '!' -f "$my_a" ]; then
2466 if [ -d "$a" ]; then
2467 # directories are created...
2470 a_dir=`dirname "$my_a"`
2471 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2472 # ... and files are symlinked
2473 case `basename "$a"` in
2474 *.o|*.d|GNUmakefile*|qmake)
2485 # make a syncqt script that can be used in the shadow
2486 rm -f "$outpath/bin/syncqt"
2487 if [ -x "$relpath/bin/syncqt" ]; then
2488 mkdir -p "$outpath/bin"
2489 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2490 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"$relpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2491 chmod 755 "$outpath/bin/syncqt"
2494 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2495 rm -f "$outpath/bin/$i"
2496 if [ -x "$relpath/bin/$i" ]; then
2497 mkdir -p "$outpath/bin"
2498 echo "#!/bin/sh" >"$outpath/bin/$i"
2499 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2500 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2501 chmod 755 "$outpath/bin/$i"
2505 # symlink the mkspecs directory
2506 mkdir -p "$outpath/mkspecs"
2507 rm -rf "$outpath"/mkspecs/*
2508 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2509 rm -f "$outpath/mkspecs/default"
2513 rm -rf "$outpath/mkspecs/$1"
2514 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2515 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2518 # Special case for mkspecs/features directory.
2519 # To be able to place .prf files into a shadow build directory,
2520 # we're creating links for files only. The directory structure is reproduced.
2521 ShadowMkspecs features
2523 # The modules dir is special, too.
2524 ShadowMkspecs modules
2526 # symlink the doc directory
2527 rm -rf "$outpath/doc"
2528 ln -s "$relpath/doc" "$outpath/doc"
2530 # make sure q3porting.xml can be found
2531 mkdir -p "$outpath/tools/porting/src"
2532 rm -f "$outpath/tools/porting/src/q3porting.xml"
2533 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2536 # symlink fonts to be able to run application from build directory
2537 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2538 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2539 mkdir -p "${outpath}/lib"
2540 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2544 if [ "$OPT_FAST" = "auto" ]; then
2545 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2552 # find a make command
2553 if [ -z "$MAKE" ]; then
2555 for mk in gmake make; do
2556 if "$WHICH" $mk >/dev/null 2>&1; then
2561 if [ -z "$MAKE" ]; then
2562 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2563 echo >&2 "Cannot proceed."
2566 # export MAKE, we need it later in the config.tests
2572 #-------------------------------------------------------------------------------
2573 # auto-detect all that hasn't been specified in the arguments
2574 #-------------------------------------------------------------------------------
2576 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2577 if [ "$CFG_EMBEDDED" != "no" ]; then
2578 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2580 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2581 if [ -z "$XPLATFORM" ]; then
2582 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2583 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2587 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2588 if [ -z "$XPLATFORM" ]; then
2589 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2590 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2594 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2595 if [ -z "$XPLATFORM" ]; then
2596 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2597 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2601 if [ -z "$PLATFORM" ]; then
2602 case "$UNAME_MACHINE" in
2604 PLATFORM=qws/linux-x86-g++
2607 PLATFORM=qws/linux-x86_64-g++
2610 PLATFORM=qws/linux-generic-g++
2614 if [ -z "$XPLATFORM" ]; then
2615 if [ "$CFG_EMBEDDED" = "auto" ]; then
2616 if [ -n "$CFG_ARCH" ]; then
2617 CFG_EMBEDDED=$CFG_ARCH
2619 case "$UNAME_MACHINE" in
2627 CFG_EMBEDDED=generic
2632 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2636 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2637 if [ -z "$XPLATFORM" ]; then
2638 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2639 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2643 if [ -z "$XPLATFORM" ]; then
2648 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2655 if [ -z "$PLATFORM" ]; then
2657 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2659 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2661 # PLATFORM=macx-xcode
2668 #PLATFORM=aix-g++-64
2670 #PLATFORM=aix-xlc-64
2672 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2682 # PLATFORM=dynix-g++
2688 PLATFORM=freebsd-g++
2690 - Also available for FreeBSD: freebsd-icc
2694 PLATFORM=openbsd-g++
2705 #PLATFORM=irix-cc-64
2707 - Also available for IRIX: irix-g++ irix-cc-64
2711 case "$UNAME_MACHINE" in
2713 #PLATFORM=hpuxi-acc-32
2714 PLATFORM=hpuxi-acc-64
2716 - Also available for HP-UXi: hpuxi-acc-32
2722 #PLATFORM=hpux-acc-64
2724 #PLATFORM=hpux-acc-o64
2726 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2735 - Also available for Tru64: tru64-g++
2739 case "$UNAME_MACHINE" in
2741 PLATFORM=linux-g++-64
2748 - Also available for Linux: linux-kcc linux-icc linux-cxx
2752 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2753 PLATFORM="solaris-g++"
2755 #PLATFORM=solaris-g++
2757 #PLATFORM=solaris-cc64
2760 - Also available for Solaris: solaris-g++ solaris-cc-64
2763 ReliantUNIX-*:*|SINIX-*:*)
2764 PLATFORM=reliant-cds
2765 #PLATFORM=reliant-cds-64
2767 - Also available for Reliant UNIX: reliant-cds-64
2777 #PLATFORM=unixware-g++
2778 PLATFORM=unixware-cc
2780 - Also available for OpenUNIX: unixware-g++
2784 #PLATFORM=unixware-g++
2785 PLATFORM=unixware-cc
2787 - Also available for UnixWare: unixware-g++
2794 - Also available for SCO OpenServer: sco-g++
2798 PLATFORM=unixware-g++
2801 PLATFORM=unsupported/qnx-g++
2804 if [ "$OPT_HELP" != "yes" ]; then
2806 for p in $PLATFORMS; do
2807 echo " $relconf $* -platform $p"
2810 echo " The build script does not currently recognize all" >&2
2811 echo " platforms supported by Qt." >&2
2812 echo " Rerun this script with a -platform option listed to" >&2
2813 echo " set the system/compiler combination you use." >&2
2820 if [ "$PLATFORM_QWS" = "yes" ]; then
2822 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2824 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2827 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2829 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2830 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2832 if [ -d "$PLATFORM" ]; then
2833 QMAKESPEC="$PLATFORM"
2835 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2837 if [ -d "$XPLATFORM" ]; then
2838 XQMAKESPEC="$XPLATFORM"
2840 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2842 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2843 QT_CROSS_COMPILE=yes
2844 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2847 if [ "$PLATFORM_MAC" = "yes" ]; then
2848 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2850 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2851 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2852 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2853 echo " built with 'macx-g++'" >&2
2859 # check specified platforms are supported
2860 if [ '!' -d "$QMAKESPEC" ]; then
2862 echo " The specified system/compiler is not supported:"
2866 echo " Please see the README file for a complete list."
2870 if [ '!' -d "$XQMAKESPEC" ]; then
2872 echo " The specified system/compiler is not supported:"
2876 echo " Please see the README file for a complete list."
2880 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2882 echo " The specified system/compiler port is not complete:"
2884 echo " $XQMAKESPEC/qplatformdefs.h"
2886 echo " Please contact qt-info@nokia.com."
2891 # now look at the configs and figure out what platform we are config'd for
2892 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2893 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2895 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2897 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2898 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2899 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2900 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2901 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2905 #-------------------------------------------------------------------------------
2906 # determine the system architecture
2907 #-------------------------------------------------------------------------------
2908 if [ "$OPT_VERBOSE" = "yes" ]; then
2909 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2912 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2913 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2915 echo "You have specified a target architecture with -embedded and -arch."
2916 echo "The two architectures you have specified are different, so we can"
2917 echo "not proceed. Either set both to be the same, or only use -embedded."
2923 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2924 case `basename "$XPLATFORM"` in
2927 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2929 echo "Please contact qt-info@nokia.com to upgrade your license to"
2930 echo "include this platform, or install the Qt Open Source Edition"
2931 echo "if you intend to develop free software."
2937 if [ -z "${CFG_HOST_ARCH}" ]; then
2938 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2940 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2941 case "$CFG_HOST_ARCH" in
2946 if [ "$OPT_VERBOSE" = "yes" ]; then
2947 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2951 CFG_HOST_ARCH=`uname -p`
2952 if [ "$OPT_VERBOSE" = "yes" ]; then
2953 echo " SGI ($CFG_HOST_ARCH)"
2957 case "$UNAME_MACHINE" in
2959 if [ "$OPT_VERBOSE" = "yes" ]; then
2960 echo " Sun SPARC (sparc)"
2967 if [ "$OPT_VERBOSE" = "yes" ]; then
2968 echo " 64-bit AMD 80x86 (x86_64)"
2970 CFG_HOST_ARCH=x86_64
2973 if [ "$OPT_VERBOSE" = "yes" ]; then
2974 echo " 32-bit Intel 80x86 (i386)"
2982 case "$UNAME_MACHINE" in
2984 if [ "$OPT_VERBOSE" = "yes" ]; then
2985 echo " 32-bit Apple PowerPC (powerpc)"
2989 if [ "$OPT_VERBOSE" = "yes" ]; then
2990 echo " 32-bit Intel 80x86 (i386)"
2994 CFG_HOST_ARCH=macosx
2997 if [ "$OPT_VERBOSE" = "yes" ]; then
2998 echo " 64-bit IBM PowerPC (powerpc)"
3000 CFG_HOST_ARCH=powerpc
3003 if [ "$OPT_VERBOSE" = "yes" ]; then
3004 echo " HP PA-RISC (parisc)"
3006 CFG_HOST_ARCH=parisc
3009 if [ "$OPT_VERBOSE" = "yes" ]; then
3010 echo " 32-bit Intel 80x86 (i386)"
3014 *:*:x86_64|*:*:amd64)
3015 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
3016 if [ "$OPT_VERBOSE" = "yes" ]; then
3017 echo " 32 bit on 64-bit AMD 80x86 (i386)"
3021 if [ "$OPT_VERBOSE" = "yes" ]; then
3022 echo " 64-bit AMD 80x86 (x86_64)"
3024 CFG_HOST_ARCH=x86_64
3028 if [ "$OPT_VERBOSE" = "yes" ]; then
3029 echo " 32-bit PowerPC (powerpc)"
3031 CFG_HOST_ARCH=powerpc
3034 if [ "$OPT_VERBOSE" = "yes" ]; then
3035 echo " 64-bit PowerPC (powerpc)"
3037 CFG_HOST_ARCH=powerpc
3040 if [ "$OPT_VERBOSE" = "yes" ]; then
3041 echo " IBM S/390 (s390)"
3046 if [ "$OPT_VERBOSE" = "yes" ]; then
3052 if [ "$OPT_VERBOSE" = "yes" ]; then
3053 echo " Linux on SPARC"
3058 case "$UNAME_MACHINE" in
3060 if [ "$OPT_VERBOSE" = "yes" ]; then
3061 echo " QNX on Intel 80x86 (i386)"
3068 if [ "$OPT_VERBOSE" = "yes" ]; then
3069 echo " Trying '$UNAME_MACHINE'..."
3071 CFG_HOST_ARCH="$UNAME_MACHINE"
3076 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
3077 if [ -n "$CFG_ARCH" ]; then
3078 CFG_EMBEDDED=$CFG_ARCH
3081 case "$CFG_EMBEDDED" in
3104 CFG_ARCH="$CFG_EMBEDDED"
3107 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3108 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
3109 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
3110 CFG_ARCH=$CFG_HOST_ARCH
3117 # previously, armv6 was a different arch
3123 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
3124 if [ "$OPT_VERBOSE" = "yes" ]; then
3125 echo " '$CFG_ARCH' is supported"
3128 if [ "$OPT_VERBOSE" = "yes" ]; then
3129 echo " '$CFG_ARCH' is unsupported, using 'generic'"
3133 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
3134 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
3135 if [ "$OPT_VERBOSE" = "yes" ]; then
3136 echo " '$CFG_HOST_ARCH' is supported"
3139 if [ "$OPT_VERBOSE" = "yes" ]; then
3140 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
3142 CFG_HOST_ARCH=generic
3146 if [ "$OPT_VERBOSE" = "yes" ]; then
3147 echo "System architecture: '$CFG_ARCH'"
3148 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3149 echo "Host architecture: '$CFG_HOST_ARCH'"
3153 #-------------------------------------------------------------------------------
3154 # tests that don't need qmake (must be run before displaying help)
3155 #-------------------------------------------------------------------------------
3157 # detect build style
3158 if [ "$CFG_DEBUG" = "auto" ]; then
3159 if [ "$CFG_ARCH" = "macosx" -o "$XPLATFORM_MINGW" = "yes" ]; then
3160 CFG_DEBUG_RELEASE=yes
3162 elif [ "$CFG_DEV" = "yes" ]; then
3163 CFG_DEBUG_RELEASE=no
3166 CFG_DEBUG_RELEASE=no
3170 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
3171 QT_CONFIG="$QT_CONFIG build_all"
3174 if [ -z "$PKG_CONFIG" ]; then
3175 # See if PKG_CONFIG is set in the mkspec:
3176 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3178 if [ -z "$PKG_CONFIG" ]; then
3179 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3182 # Work out if we can use pkg-config
3183 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3184 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3186 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3187 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3188 echo >&2 "environment!"
3190 if [ -z "$PKG_CONFIG_PATH" ]; then
3192 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3193 echo >&2 "the host compiler's .pc files will be used. This is probably"
3194 echo >&2 "not what you want."
3196 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3198 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3199 echo >&2 "been set. This means your toolchain's .pc files must contain"
3200 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3201 echo >&2 "tests are failing, please check these files."
3206 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3207 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3208 echo >&2 "dependencies"
3214 if [ ! -n "$PKG_CONFIG" ]; then
3215 QT_CONFIG="$QT_CONFIG no-pkg-config"
3218 # process CFG_MAC_ARCHS
3219 if [ "$PLATFORM_MAC" = "yes" ]; then
3220 # check -arch arguments for validity.
3221 ALLOWED="x86 ppc x86_64 ppc64 i386"
3222 # Save the list so we can re-write it using only valid values
3223 CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
3225 for i in $CFG_MAC_ARCHS_IN
3227 if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
3228 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
3231 if [ "$i" = "i386" -o "$i" = "x86" ]; then
3232 # These are synonymous values
3233 # CFG_MAC_ARCHS requires x86 while GCC requires i386
3234 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
3235 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
3237 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
3238 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
3243 # pass on $CFG_SDK to the configure tests.
3244 if [ '!' -z "$CFG_SDK" ]; then
3245 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3248 # find the default framework value
3249 if [ "$CFG_ARCH" = "macosx" ]; then
3250 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3251 CFG_FRAMEWORK="$CFG_SHARED"
3252 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3254 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3262 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3263 TEST_COMPILER="$CXX"
3265 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3266 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3267 if [ -z "$TEST_COMPILER" ]; then
3268 echo "ERROR: Cannot set the compiler for the configuration tests"
3273 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3274 TEST_COMPILER="nacl-gcc"
3278 if [ -n "$CFG_SYSROOT" ]; then
3279 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3280 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3281 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3283 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3287 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3289 # auto-detect precompiled header support
3290 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3291 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3293 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3298 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
3300 echo "WARNING: Using universal binaries disables precompiled headers."
3305 #auto-detect DWARF2 on the mac
3306 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3307 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3314 # auto-detect support for -Xarch on the mac
3315 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
3316 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3323 # don't autodetect support for separate debug info on objcopy when
3324 # cross-compiling as lots of toolchains seems to have problems with this
3325 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3326 CFG_SEPARATE_DEBUG_INFO="no"
3329 # auto-detect support for separate debug info in objcopy
3330 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3331 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3332 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3333 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3334 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3335 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3336 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3337 CFG_SEPARATE_DEBUG_INFO=no
3341 # binutils on HP-UX is buggy; default to no.
3342 CFG_SEPARATE_DEBUG_INFO=no
3345 CFG_SEPARATE_DEBUG_INFO=yes
3351 # auto-detect -fvisibility support
3352 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3353 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3354 CFG_REDUCE_EXPORTS=no
3356 CFG_REDUCE_EXPORTS=yes
3360 # detect the availability of the -Bsymbolic-functions linker optimization
3361 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3362 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3363 CFG_REDUCE_RELOCATIONS=no
3365 CFG_REDUCE_RELOCATIONS=yes
3369 # auto-detect GNU make support
3370 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3374 # If -opengl wasn't specified, don't try to auto-detect
3375 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3380 if [ "$PLATFORM_MAC" = "yes" ]; then
3381 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3386 # find the default framework value
3387 if [ "$CFG_ARCH" = "macosx" ]; then
3388 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3389 CFG_FRAMEWORK="$CFG_SHARED"
3390 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3392 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3400 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3401 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3402 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3403 # get the darwin version. 10.0.0 and up means snow leopard.
3404 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3405 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3407 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3412 # x11 tests are done after qmake is built
3415 #setup the build parts
3416 if [ -z "$CFG_BUILD_PARTS" ]; then
3417 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3419 # don't build tools by default when cross-compiling
3420 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3421 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3424 for nobuild in $CFG_NOBUILD_PARTS; do
3425 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3427 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3429 # echo "WARNING: libs is a required part of the build."
3431 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3434 #-------------------------------------------------------------------------------
3435 # post process QT_INSTALL_* variables
3436 #-------------------------------------------------------------------------------
3438 if [ -z "$QT_INSTALL_PREFIX" ]; then
3439 if [ "$CFG_DEV" = "yes" ]; then
3440 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3442 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3445 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3447 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3448 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3449 if [ "$PLATFORM_MAC" = "yes" ]; then
3450 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3453 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3456 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3458 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3459 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3460 if [ "$PLATFORM_MAC" = "yes" ]; then
3461 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3466 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3469 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3471 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3472 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3473 if [ "$PLATFORM_MAC" = "yes" ]; then
3474 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3475 QT_INSTALL_LIBS="/Libraries/Frameworks"
3479 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3481 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3483 if [ -z "$QT_INSTALL_BINS" ]; then #default
3484 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3485 if [ "$PLATFORM_MAC" = "yes" ]; then
3486 QT_INSTALL_BINS="/Developer/Applications/Qt"
3489 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3491 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3493 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3494 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3495 if [ "$PLATFORM_MAC" = "yes" ]; then
3496 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3499 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3501 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3503 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3504 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3505 if [ "$PLATFORM_MAC" = "yes" ]; then
3506 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3509 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3511 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3513 if [ -z "$QT_INSTALL_DATA" ]; then #default
3514 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3516 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3518 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3519 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3521 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3523 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3524 if [ "$PLATFORM_MAC" = "yes" ]; then
3525 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3527 QT_INSTALL_SETTINGS=/etc/xdg
3530 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3532 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3533 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3534 if [ "$PLATFORM_MAC" = "yes" ]; then
3535 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3538 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3540 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3543 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3544 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3545 if [ "$PLATFORM_MAC" = "yes" ]; then
3546 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3549 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3551 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3553 #-------------------------------------------------------------------------------
3554 # help - interactive parts of the script _after_ this section please
3555 #-------------------------------------------------------------------------------
3557 # next, emit a usage message if something failed.
3558 if [ "$OPT_HELP" = "yes" ]; then
3559 [ "x$ERROR" = "xyes" ] && echo
3560 if [ "$CFG_NIS" = "no" ]; then
3567 if [ "$CFG_CUPS" = "no" ]; then
3574 if [ "$CFG_ICONV" = "no" ]; then
3581 if [ "$CFG_LARGEFILE" = "no" ]; then
3588 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3595 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3603 if [ "$CFG_XCB" = "no" ]; then
3611 if [ "$CFG_WAYLAND" = "no" ]; then
3618 if [ "$CFG_XINPUT2" = "no" ]; then
3627 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3628 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3629 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3630 [-release] [-debug] [-debug-and-release]
3631 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3632 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3633 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3634 [-plugin-sql-<driver>] [-system-sqlite]
3635 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3636 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3637 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3638 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3639 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3640 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3641 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3642 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3643 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3644 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3645 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3646 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3647 [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
3648 [-no-openssl] [-openssl] [-openssl-linked]
3649 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug]
3650 [-no-javascript-jit] [-javascript-jit]
3651 [-no-script] [-script] [-no-scripttools] [-scripttools]
3652 [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug]
3653 [-no-location] [-location]
3654 [additional platform specific options (see below)]
3657 Installation options:
3659 -qpa ................ This will enable the QPA build.
3660 QPA is a window system agnostic implementation of Qt.
3662 These are optional, but you may specify install directories.
3664 -prefix <dir> ...... This will install everything relative to <dir>
3665 (default $QT_INSTALL_PREFIX)
3667 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3670 -hostprefix [dir] .. Tools and libraries needed when developing
3671 applications are installed in [dir]. If [dir] is
3672 not given, the current build directory will be used.
3677 * -prefix-install .... Force a sandboxed "local" installation of
3678 Qt. This will install into
3679 $QT_INSTALL_PREFIX, if this option is
3680 disabled then some platforms will attempt a
3681 "system" install by placing default values to
3682 be placed in a system location other than
3685 You may use these to separate different parts of the install:
3687 -bindir <dir> ......... Executables will be installed to <dir>
3688 (default PREFIX/bin)
3689 -libdir <dir> ......... Libraries will be installed to <dir>
3690 (default PREFIX/lib)
3691 -docdir <dir> ......... Documentation will be installed to <dir>
3692 (default PREFIX/doc)
3693 -headerdir <dir> ...... Headers will be installed to <dir>
3694 (default PREFIX/include)
3695 -plugindir <dir> ...... Plugins will be installed to <dir>
3696 (default PREFIX/plugins)
3697 -importdir <dir> ...... Imports for QML will be installed to <dir>
3698 (default PREFIX/imports)
3699 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3701 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3702 (default PREFIX/translations)
3703 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3704 (default PREFIX/etc/settings)
3705 -examplesdir <dir> .... Examples will be installed to <dir>
3706 (default PREFIX/examples)
3707 -testsdir <dir> ....... Tests will be installed to <dir>
3708 (default PREFIX/tests)
3712 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3713 that needs to be evaluated. If the evaluation succeeds, the feature is
3714 included. Here is a short explanation of each option:
3716 * -release ........... Compile and link Qt with debugging turned off.
3717 -debug ............. Compile and link Qt with debugging turned on.
3718 -debug-and-release . Compile and link two versions of Qt, with and without
3719 debugging turned on (Mac only).
3721 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3723 -opensource ........ Compile and link the Open-Source Edition of Qt.
3724 -commercial ........ Compile and link the Commercial Edition of Qt.
3727 * -shared ............ Create and use shared Qt libraries.
3728 -static ............ Create and use static Qt libraries.
3730 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3732 -fast .............. Configure Qt quickly by generating Makefiles only for
3733 library and subdirectory targets. All other Makefiles
3734 are created as wrappers, which will in turn run qmake.
3736 -no-largefile ...... Disables large file support.
3737 + -largefile ......... Enables Qt to access files larger than 4 GB.
3740 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3747 if [ "$CFG_DBUS" = "no" ]; then
3756 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3757 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3759 -no-accessibility .. Do not compile Accessibility support.
3760 * -accessibility ..... Compile Accessibility support.
3762 $SHN -no-stl ............ Do not compile STL support.
3763 $SHY -stl ............... Compile STL support.
3765 -no-sql-<driver> ... Disable SQL <driver> entirely.
3766 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3768 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3771 Possible values for <driver>:
3772 [ $CFG_SQL_AVAILABLE ]
3774 -system-sqlite ..... Use sqlite from the operating system.
3776 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3777 + -xmlpatterns ....... Build the QtXmlPatterns module.
3778 QtXmlPatterns is built if a decent C++ compiler
3779 is used and exceptions are enabled.
3781 -no-multimedia ..... Do not build the QtMultimedia module.
3782 + -multimedia ........ Build the QtMultimedia module.
3784 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3785 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3787 -no-phonon ......... Do not build the Phonon module.
3788 + -phonon ............ Build the Phonon module.
3789 Phonon is built if a decent C++ compiler is used.
3790 -no-phonon-backend.. Do not build the platform phonon plugin.
3791 + -phonon-backend..... Build the platform phonon plugin.
3793 -no-svg ............ Do not build the SVG module.
3794 + -svg ............... Build the SVG module.
3796 -no-webkit ......... Do not build the WebKit module.
3797 + -webkit ............ Build the WebKit module.
3798 WebKit is built if a decent C++ compiler is used.
3799 -webkit-debug ...... Build the WebKit module with debug symbols.
3801 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3802 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3804 -no-script ......... Do not build the QtScript module.
3805 + -script ............ Build the QtScript module.
3807 -no-scripttools .... Do not build the QtScriptTools module.
3808 + -scripttools ....... Build the QtScriptTools module.
3810 -no-v8 ............. Do not build the V8 module.
3811 + -v8 ................ Build the V8 module.
3813 -no-declarative ..... Do not build the declarative module.
3814 + -declarative ....... Build the declarative module.
3816 -no-declarative-debug ..... Do not build the declarative debugging support.
3817 + -declarative-debug ....... Build the declarative debugging support.
3819 -no-location ....... Do not build the QtLocation module.
3820 + -location .......... Build the QtLocation module.
3822 -platform target ... The operating system and compiler you are building
3825 See the README file for a list of supported
3826 operating systems and compilers.
3829 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3831 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3832 raster - Software rasterizer
3833 opengl - Rendering via OpenGL, Experimental!
3834 openvg - Rendering via OpenVG, Experimental!
3841 -no-mmx ............ Do not compile with use of MMX instructions.
3842 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3843 -no-sse ............ Do not compile with use of SSE instructions.
3844 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3845 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3846 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3847 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3848 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3849 -no-avx ............ Do not compile with use of AVX instructions.
3850 -no-neon ........... Do not compile with use of NEON instructions.
3852 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3853 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3855 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3857 -D <string> ........ Add an explicit define to the preprocessor.
3858 -I <string> ........ Add an explicit include path.
3859 -L <string> ........ Add an explicit library path.
3861 -help, -h .......... Display this information.
3863 Third Party Libraries:
3865 -qt-zlib ........... Use the zlib bundled with Qt.
3866 + -system-zlib ....... Use zlib from the operating system.
3867 See http://www.gzip.org/zlib
3869 -no-gif ............ Do not compile GIF reading support.
3871 -no-libtiff ........ Do not compile TIFF support.
3872 -qt-libtiff ........ Use the libtiff bundled with Qt.
3873 + -system-libtiff .... Use libtiff from the operating system.
3874 See http://www.libtiff.org
3876 -no-libpng ......... Do not compile PNG support.
3877 -qt-libpng ......... Use the libpng bundled with Qt.
3878 + -system-libpng ..... Use libpng from the operating system.
3879 See http://www.libpng.org/pub/png
3881 -no-libmng ......... Do not compile MNG support.
3882 -qt-libmng ......... Use the libmng bundled with Qt.
3883 + -system-libmng ..... Use libmng from the operating system.
3884 See http://www.libmng.com
3886 -no-libjpeg ........ Do not compile JPEG support.
3887 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3888 + -system-libjpeg .... Use libjpeg from the operating system.
3889 See http://www.ijg.org
3891 -no-openssl ........ Do not compile support for OpenSSL.
3892 + -openssl ........... Enable run-time OpenSSL support.
3893 -openssl-linked .... Enabled linked OpenSSL support.
3897 -make <part> ....... Add part to the list of parts to be built at make time.
3898 ($QT_DEFAULT_BUILD_PARTS)
3899 -nomake <part> ..... Exclude part from the list of parts to be built.
3901 -R <string> ........ Add an explicit runtime library path to the Qt
3903 -l <string> ........ Add an explicit library.
3905 -no-rpath .......... Do not use the library install path as a runtime
3907 + -rpath ............. Link Qt libraries and executables using the library
3908 install path as a runtime library path. Equivalent
3909 to -R install_libpath
3911 -continue .......... Continue as far as possible if an error occurs.
3913 -verbose, -v ....... Print verbose information about each step of the
3916 -silent ............ Reduce the build output so that warnings and errors
3917 can be seen more easily.
3919 * -no-optimized-qmake ... Do not build qmake optimized.
3920 -optimized-qmake ...... Build qmake optimized.
3922 -no-gui ............ Don't build the Qt GUI library
3924 $NSN -no-nis ............ Do not compile NIS support.
3925 $NSY -nis ............... Compile NIS support.
3927 $CUN -no-cups ........... Do not compile CUPS support.
3928 $CUY -cups .............. Compile CUPS support.
3929 Requires cups/cups.h and libcups.so.2.
3931 $CIN -no-iconv .......... Do not compile support for iconv(3).
3932 $CIY -iconv ............. Compile support for iconv(3).
3934 $PHN -no-pch ............ Do not use precompiled header support.
3935 $PHY -pch ............... Use precompiled header support.
3937 $DBN -no-dbus ........... Do not compile the QtDBus module.
3938 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3939 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3941 -reduce-relocations ..... Reduce relocations in the libraries through extra
3942 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3943 experimental; needs GNU ld >= 2.18).
3945 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3949 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3950 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3957 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3965 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3969 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3970 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3972 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3973 $XCBY -xcb ............... Compile Xcb support.
3975 $XWN -no-wayland......... Do not compile Wayland support.
3976 $XWY -wayland .......... Compile Wayland support.
3982 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3986 $X2N -no-xinput2......... Do not compile XInput2 support.
3987 $X2Y -xinput2............ Compile XInput2 support.
3993 if [ "$PLATFORM_X11" = "yes" ]; then
3994 if [ "$CFG_SM" = "no" ]; then
4001 if [ "$CFG_XSHAPE" = "no" ]; then
4008 if [ "$CFG_XVIDEO" = "no" ]; then
4015 if [ "$CFG_XINERAMA" = "no" ]; then
4022 if [ "$CFG_FONTCONFIG" = "no" ]; then
4029 if [ "$CFG_XCURSOR" = "no" ]; then
4036 if [ "$CFG_XFIXES" = "no" ]; then
4043 if [ "$CFG_XRANDR" = "no" ]; then
4050 if [ "$CFG_XRENDER" = "no" ]; then
4057 if [ "$CFG_MITSHM" = "no" ]; then
4064 if [ "$CFG_XINPUT" = "no" ]; then
4071 if [ "$CFG_XKB" = "no" ]; then
4078 if [ "$CFG_IM" = "no" ]; then
4089 -no-gtkstyle ....... Do not build the GTK theme integration.
4090 + -gtkstyle .......... Build the GTK theme integration.
4092 * -no-nas-sound ...... Do not compile in NAS sound support.
4093 -system-nas-sound .. Use NAS libaudio from the operating system.
4094 See http://radscan.com/nas.html
4096 -egl ............... Use EGL instead of GLX to manage contexts.
4097 When building for desktop OpenGL, this option will
4098 make Qt use EGL to manage contexts rather than the
4099 GLX, which is the default. Note: For OpenGL ES, EGL
4102 -no-opengl ......... Do not support OpenGL.
4103 + -opengl <api> ...... Enable OpenGL support.
4104 With no parameter, this will auto-detect the "best"
4105 OpenGL API to use. If desktop OpenGL is available, it
4106 will be used. Use desktop or es2 for <api>
4107 to force the use of the Desktop OpenGL or
4108 OpenGL ES 2 APIs instead.
4110 -no-openvg ........ Do not support OpenVG.
4111 + -openvg ........... Enable OpenVG support.
4112 Requires EGL support, typically supplied by an OpenGL
4113 or other graphics implementation.
4115 $SMN -no-sm ............. Do not support X Session Management.
4116 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
4118 $SHN -no-xshape ......... Do not compile XShape support.
4119 $SHY -xshape ............ Compile XShape support.
4120 Requires X11/extensions/shape.h.
4122 $XVN -no-xvideo ......... Do not compile XVideo support.
4123 $XVY -xvideo ............ Compile XVideo support.
4124 Requires X11/extensions/Xv.h & Xvlib.h.
4126 $SHN -no-xsync .......... Do not compile XSync support.
4127 $SHY -xsync ............. Compile XSync support.
4128 Requires X11/extensions/sync.h.
4130 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
4131 $XAY -xinerama .......... Compile Xinerama support.
4132 Requires X11/extensions/Xinerama.h and libXinerama.
4133 By default, Xinerama support will be compiled if
4134 available and the shared libraries are dynamically
4137 $XCN -no-xcursor ........ Do not compile Xcursor support.
4138 $XCY -xcursor ........... Compile Xcursor support.
4139 Requires X11/Xcursor/Xcursor.h and libXcursor.
4140 By default, Xcursor support will be compiled if
4141 available and the shared libraries are dynamically
4144 $XFN -no-xfixes ......... Do not compile Xfixes support.
4145 $XFY -xfixes ............ Compile Xfixes support.
4146 Requires X11/extensions/Xfixes.h and libXfixes.
4147 By default, Xfixes support will be compiled if
4148 available and the shared libraries are dynamically
4151 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
4152 $XZY -xrandr ............ Compile Xrandr support.
4153 Requires X11/extensions/Xrandr.h and libXrandr.
4155 $XRN -no-xrender ........ Do not compile Xrender support.
4156 $XRY -xrender ........... Compile Xrender support.
4157 Requires X11/extensions/Xrender.h and libXrender.
4159 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
4160 $XMY -mitshm ............ Compile MIT-SHM support.
4161 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
4163 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
4164 $FCGY -fontconfig ........ Compile FontConfig support.
4165 Requires fontconfig/fontconfig.h, libfontconfig,
4166 freetype.h and libfreetype.
4168 $XIN -no-xinput ......... Do not compile Xinput support.
4169 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
4170 which requires IRIX with wacom.h and libXi or
4171 XFree86 with X11/extensions/XInput.h and libXi.
4173 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
4174 $XKY -xkb ............... Compile XKB support.
4179 if [ "$PLATFORM_MAC" = "yes" ]; then
4184 -Fstring ........... Add an explicit framework path.
4185 -fw string ......... Add an explicit framework.
4187 -cocoa ............. [Deprecated] Cocoa is now enabled by default.
4189 -carbon .............Build the Carbon version of Qt. 64-bit archs
4190 are not supported by carbon and will be built
4193 * -framework ......... Build Qt as a series of frameworks and
4194 link tools against those frameworks.
4195 -no-framework ...... Do not build Qt as a series of frameworks.
4197 * -dwarf2 ............ Enable dwarf2 debugging symbols.
4198 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
4200 -universal ......... Equivalent to -arch "ppc x86"
4202 -arch <arch> ....... Build Qt for <arch>
4203 Example values for <arch>: x86 ppc x86_64 ppc64
4204 Multiple -arch arguments can be specified.
4206 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
4207 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
4209 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
4210 It is only available to Cocoa builds.
4211 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
4212 QT_ENABLE_HARFBUZZ environment variable.
4217 if [ "$PLATFORM_QWS" = "yes" ]; then
4219 Qt for Embedded Linux:
4221 -embedded <arch> .... This will enable the embedded build, you must have a
4222 proper license for this switch to work.
4223 Example values for <arch>: arm mips x86 generic
4227 if [ "$PLATFORM_QPA" = "yes" ]; then
4233 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4236 -xplatform target ... The target platform when cross-compiling.
4238 -no-feature-<feature> Do not compile in <feature>.
4239 -feature-<feature> .. Compile in <feature>. The available features
4240 are described in src/corelib/global/qfeatures.txt
4242 -armfpa ............. Target platform uses the ARM-FPA floating point format.
4243 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
4245 The floating point format is usually autodetected by configure. Use this
4246 to override the detected value.
4248 -little-endian ...... Target platform is little endian (LSB first).
4249 -big-endian ......... Target platform is big endian (MSB first).
4251 -host-little-endian . Host platform is little endian (LSB first).
4252 -host-big-endian .... Host platform is big endian (MSB first).
4254 You only need to specify the endianness when
4255 cross-compiling, otherwise the host
4256 endianness will be used.
4258 -no-freetype ........ Do not compile in Freetype2 support.
4259 -qt-freetype ........ Use the libfreetype bundled with Qt.
4260 * -system-freetype .... Use libfreetype from the operating system.
4261 See http://www.freetype.org/
4263 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
4264 default ($CFG_QCONFIG).
4266 -no-opengl .......... Do not support OpenGL.
4267 -opengl <api> ....... Enable OpenGL ES support
4268 With no parameter, this will attempt to auto-detect
4269 OpenGL ES 2, or regular desktop OpenGL.
4270 Use es2 for <api> to override auto-detection.
4274 if [ "$PLATFORM_QWS" = "yes" ]; then
4277 -depths <list> ...... Comma-separated list of supported bit-per-pixel
4278 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
4280 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
4281 by default all available decorations are on.
4282 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4283 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
4284 linked to at run time.
4285 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
4286 -no-decoration-<style> ....Disable decoration <style> entirely.
4287 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
4289 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
4290 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4291 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4292 linked to at run time.
4293 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4294 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4295 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4297 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4298 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4300 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4302 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4304 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4305 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4307 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4308 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4309 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4311 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4312 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4313 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4315 -iwmmxt ............ Compile using the iWMMXt instruction set
4316 (available on some XScale CPUs).
4320 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4321 if [ "$CFG_GLIB" = "no" ]; then
4329 $GBN -no-glib ........... Do not compile Glib support.
4330 $GBY -glib .............. Compile Glib support.
4335 [ "x$ERROR" = "xyes" ] && exit 1
4340 # -----------------------------------------------------------------------------
4341 # LICENSING, INTERACTIVE PART
4342 # -----------------------------------------------------------------------------
4344 if [ "$PLATFORM_QWS" = "yes" ]; then
4345 Platform="Qt for Embedded Linux"
4346 elif [ "$PLATFORM_QPA" = "yes" ]; then
4347 Platform="Qt Lighthouse"
4348 elif [ "$PLATFORM_MAC" = "yes" ]; then
4349 Platform="Qt for Mac OS X"
4350 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4351 Platform="Qt for Windows"
4352 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4354 Platform="Qt for Linux/X11"
4358 echo "This is the $Platform ${EditionString} Edition."
4361 if [ "$Edition" = "OpenSource" ]; then
4363 echo "You are licensed to use this software under the terms of"
4364 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4365 if [ -f "$relpath/LICENSE.GPL3" ]; then
4366 echo "You are also licensed to use this software under the terms of"
4367 echo "the GNU General Public License (GPL) versions 3."
4373 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4374 echo "You have already accepted the terms of the $LicenseType license."
4377 if [ -f "$relpath/LICENSE.GPL3" ]; then
4378 echo "Type '3' to view the GNU General Public License version 3."
4380 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4381 echo "Type 'yes' to accept this license offer."
4382 echo "Type 'no' to decline this license offer."
4384 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4388 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4390 elif [ "$acceptance" = "no" ]; then
4391 echo "You are not licensed to use this software."
4394 elif [ "$acceptance" = "3" ]; then
4395 more "$relpath/LICENSE.GPL3"
4396 elif [ "$acceptance" = "L" ]; then
4397 more "$relpath/LICENSE.LGPL"
4400 elif [ "$Edition" = "Preview" ]; then
4401 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4404 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4405 echo "You have already accepted the terms of the $LicenseType license."
4408 echo "You are licensed to use this software under the terms of"
4409 echo "the $TheLicense"
4411 echo "Type '?' to read the Preview License."
4412 echo "Type 'yes' to accept this license offer."
4413 echo "Type 'no' to decline this license offer."
4415 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4419 if [ "$acceptance" = "yes" ]; then
4421 elif [ "$acceptance" = "no" ] ;then
4422 echo "You are not licensed to use this software."
4425 elif [ "$acceptance" = "?" ]; then
4426 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4429 elif [ "$Edition" != "OpenSource" ]; then
4430 if [ -n "$ExpiryDate" ]; then
4431 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4432 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4433 Today=`date +%Y%m%d`
4434 if [ "$Today" -gt "$ExpiryDate" ]; then
4435 case "$LicenseType" in
4436 Commercial|Academic|Educational)
4437 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4439 echo "NOTICE NOTICE NOTICE NOTICE"
4441 echo " Your support and upgrade period has expired."
4443 echo " You are no longer licensed to use this version of Qt."
4444 echo " Please contact qt-info@nokia.com to renew your support"
4445 echo " and upgrades for this license."
4447 echo "NOTICE NOTICE NOTICE NOTICE"
4452 echo "WARNING WARNING WARNING WARNING"
4454 echo " Your support and upgrade period has expired."
4456 echo " You may continue to use your last licensed release"
4457 echo " of Qt under the terms of your existing license"
4458 echo " agreement. But you are not entitled to technical"
4459 echo " support, nor are you entitled to use any more recent"
4460 echo " Qt releases."
4462 echo " Please contact qt-info@nokia.com to renew your"
4463 echo " support and upgrades for this license."
4465 echo "WARNING WARNING WARNING WARNING"
4472 echo "NOTICE NOTICE NOTICE NOTICE"
4474 echo " Your Evaluation license has expired."
4476 echo " You are no longer licensed to use this software. Please"
4477 echo " contact qt-info@nokia.com to purchase license, or install"
4478 echo " the Qt Open Source Edition if you intend to develop free"
4481 echo "NOTICE NOTICE NOTICE NOTICE"
4488 TheLicense=`head -n 1 "$outpath/LICENSE"`
4490 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4491 echo "You have already accepted the terms of the $TheLicense."
4494 echo "You are licensed to use this software under the terms of"
4495 echo "the $TheLicense."
4497 echo "Type '?' to view the $TheLicense."
4498 echo "Type 'yes' to accept this license offer."
4499 echo "Type 'no' to decline this license offer."
4501 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4505 if [ "$acceptance" = "yes" ]; then
4507 elif [ "$acceptance" = "no" ]; then
4508 echo "You are not licensed to use this software."
4511 else [ "$acceptance" = "?" ]
4512 more "$outpath/LICENSE"
4517 # this should be moved somewhere else
4520 AIX_VERSION=`uname -v`
4521 if [ "$AIX_VERSION" -lt "5" ]; then
4522 QMakeVar add QMAKE_LIBS_X11 -lbind
4529 #-------------------------------------------------------------------------------
4530 # generate qconfig.cpp
4531 #-------------------------------------------------------------------------------
4532 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4534 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4535 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4536 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4537 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4538 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4539 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4540 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4541 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4542 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4543 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4544 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4545 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4546 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4547 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4549 TODAY=`date +%Y-%m-%d`
4550 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4552 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4553 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4555 /* Installation date */
4556 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4560 if [ ! -z "$QT_HOST_PREFIX" ]; then
4561 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4562 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4563 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4564 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4565 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4566 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4567 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4568 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4569 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4570 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4571 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4572 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4574 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4576 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4577 /* Installation Info */
4578 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4579 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4580 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4581 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4582 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4583 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4584 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4585 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4586 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4587 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4588 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4589 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4590 #else // QT_BOOTSTRAPPED
4594 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4595 /* Installation Info */
4596 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4597 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4598 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4599 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4600 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4601 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4602 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4603 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4604 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4605 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4606 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4607 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4610 if [ ! -z "$QT_HOST_PREFIX" ]; then
4611 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4612 #endif // QT_BOOTSTRAPPED
4617 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4618 /* strlen( "qt_lcnsxxxx" ) == 12 */
4619 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4620 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4621 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4622 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4623 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4624 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4625 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4626 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4627 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4628 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4629 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4630 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4631 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4632 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4635 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4636 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4637 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4639 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4640 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4641 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4644 # -----------------------------------------------------------------------------
4645 if [ "$LicenseType" = "Evaluation" ]; then
4646 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4647 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4648 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4651 if [ -n "$EVALKEY" ]; then
4652 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4653 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4654 /* Evaluation license key */
4655 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4657 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4661 # -----------------------------------------------------------------------------
4663 # -----------------------------------------------------------------------------
4666 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4668 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4669 if [ "$OPT_SHADOW" = "yes" ]; then
4670 "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4671 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4672 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4677 # $2: optional transformation
4678 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4679 # is where the resulting variable is written to
4680 # Assumes that the optional transformation produces the same variable name for each hit
4681 setBootstrapVariable()
4683 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4689 valStart = index($0, "=") + 1
4692 if (substr($0, valStart - 2, 1) == "+") {
4696 variable = substr($0, 0, valStart - 2 - append)
4697 value = substr($0, valStart)
4698 gsub("[ \t]+", "", variable)
4699 gsub("^[ \t]+", "", value)
4700 gsub("[ \t]+$", "", value)
4702 if (append == 1 && length(combinedValue) > 0) {
4703 combinedValue = combinedValue " " value
4705 combinedValue = value
4709 if (length(combinedValue) > 0) {
4710 printf "%s = %s\n", variable, combinedValue
4716 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4717 echo "Creating qmake. Please wait..."
4720 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4721 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4722 if [ -f "$QCONFIG_H" ]; then
4723 OLD_QCONFIG_H=$QCONFIG_H
4724 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4727 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4728 # when building qmake, we use #defines for the install paths,
4729 # however they are real functions in the library
4730 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4731 mkdir -p "$outpath/src/corelib/global"
4732 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4733 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4736 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4738 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4739 rm -rf mkspecs/default
4740 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4742 for mkfile in GNUmakefile Makefile; do
4745 in_mkfile="${mkfile}.in"
4746 if [ "$mkfile" = "Makefile" ]; then
4747 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4748 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4750 in_mkfile="${mkfile}.unix"
4752 in_mkfile="$relpath/qmake/$in_mkfile"
4753 mkfile="$outpath/qmake/$mkfile"
4754 if [ -f "$mkfile" ]; then
4755 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4758 [ -f "$in_mkfile" ] || continue
4760 echo "########################################################################" > "$mkfile"
4761 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4762 echo "########################################################################" >> "$mkfile"
4765 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4766 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4767 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4769 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4770 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4773 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4774 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4775 if [ "$CFG_SILENT" = "yes" ]; then
4776 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4777 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4779 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4780 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4782 setBootstrapVariable QMAKE_CFLAGS
4783 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4784 setBootstrapVariable QMAKE_LFLAGS
4786 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4787 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4788 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4790 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4791 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4792 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4793 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4794 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4795 elif [ "$CFG_DEBUG" = "yes" ]; then
4796 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4797 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4798 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4799 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4802 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4803 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4804 for rpath in $RPATH_FLAGS; do
4805 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4808 if [ "$BUILD_ON_MAC" = "yes" ]; then
4809 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4810 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4811 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4812 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4813 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4814 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4815 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4816 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4817 if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
4818 X86_CFLAGS="-arch i386"
4819 X86_LFLAGS="-arch i386"
4820 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
4821 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
4822 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
4824 if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
4825 PPC_CFLAGS="-arch ppc"
4826 PPC_LFLAGS="-arch ppc"
4827 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
4828 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4829 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
4831 if [ '!' -z "$CFG_SDK" ]; then
4832 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4833 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4834 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4835 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4836 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4839 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4840 if [ '!' -z "$D_FLAGS" ]; then
4841 for DEF in $D_FLAGS; do
4842 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4845 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4846 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4847 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4848 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4850 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4851 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4852 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4853 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4854 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4855 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4856 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4857 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4858 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4859 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4861 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4862 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4863 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4864 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4869 QMAKE_BUILD_ERROR=no
4870 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4871 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4872 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4873 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4876 #-------------------------------------------------------------------------------
4877 # tests that need qmake
4878 #-------------------------------------------------------------------------------
4880 # detect availability of float math.h functions
4881 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4882 CFG_USE_FLOATMATH=yes
4884 CFG_USE_FLOATMATH=no
4887 # detect mmx support
4888 if [ "${CFG_MMX}" = "auto" ]; then
4889 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4896 # detect 3dnow support
4897 if [ "${CFG_3DNOW}" = "auto" ]; then
4898 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4905 # detect sse support
4906 if [ "${CFG_SSE}" = "auto" ]; then
4907 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4914 # detect sse2 support
4915 if [ "${CFG_SSE2}" = "auto" ]; then
4916 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4923 # detect sse3 support
4924 if [ "${CFG_SSE3}" = "auto" ]; then
4925 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4932 # detect ssse3 support
4933 if [ "${CFG_SSSE3}" = "auto" ]; then
4934 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4941 # detect sse4.1 support
4942 if [ "${CFG_SSE4_1}" = "auto" ]; then
4943 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
4950 # detect sse4.2 support
4951 if [ "${CFG_SSE4_2}" = "auto" ]; then
4952 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
4959 # detect avx support
4960 if [ "${CFG_AVX}" = "auto" ]; then
4961 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4968 # check iWMMXt support
4969 if [ "$CFG_IWMMXT" = "yes" ]; then
4970 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4971 if [ $? != "0" ]; then
4972 echo "The iWMMXt functionality test failed!"
4973 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4978 # detect neon support
4979 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4980 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
4987 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4990 if [ "$CFG_ZLIB" = "no" ]; then
4991 # Note: Qt no longer support builds without zlib
4992 # So we force a "no" to be "auto" here.
4993 # If you REALLY really need no zlib support, you can still disable
4994 # it by doing the following:
4995 # add "no-zlib" to mkspecs/qconfig.pri
4996 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4998 # There's no guarantee that Qt will build under those conditions
5003 if [ "$CFG_ZLIB" = "auto" ]; then
5004 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
5011 if [ "$CFG_LARGEFILE" = "auto" ]; then
5012 #Large files should be enabled for all Linux systems
5016 # detect how jpeg should be built
5017 if [ "$CFG_JPEG" = "auto" ]; then
5018 if [ "$CFG_SHARED" = "yes" ]; then
5025 if [ "$CFG_LIBJPEG" = "auto" ]; then
5026 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
5033 # detect how gif should be built
5034 if [ "$CFG_GIF" = "auto" ]; then
5035 if [ "$CFG_SHARED" = "yes" ]; then
5042 # detect how tiff should be built
5043 if [ "$CFG_TIFF" = "auto" ]; then
5044 if [ "$CFG_SHARED" = "yes" ]; then
5052 if [ "$CFG_LIBTIFF" = "auto" ]; then
5053 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
5060 # detect how mng should be built
5061 if [ "$CFG_MNG" = "auto" ]; then
5062 if [ "$CFG_SHARED" = "yes" ]; then
5069 if [ "$CFG_LIBMNG" = "auto" ]; then
5070 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
5078 if [ "$CFG_LIBPNG" = "auto" ]; then
5079 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
5086 # detect accessibility
5087 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
5088 CFG_ACCESSIBILITY=yes
5091 # auto-detect SQL-modules support
5092 for _SQLDR in $CFG_SQL_AVAILABLE; do
5095 if [ "$CFG_SQL_mysql" != "no" ]; then
5096 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
5097 if [ -x "$CFG_MYSQL_CONFIG" ]; then
5098 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
5099 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
5100 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
5101 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
5102 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
5104 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
5105 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5106 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
5107 echo " You need MySql 4 or higher."
5108 echo " If you believe this message is in error you may use the continue"
5109 echo " switch (-continue) to $0 to continue."
5114 QT_LFLAGS_MYSQL_R=""
5118 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
5119 QMakeVar add CONFIG use_libmysqlclient_r
5120 if [ "$CFG_SQL_mysql" = "auto" ]; then
5121 CFG_SQL_mysql=plugin
5123 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
5124 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
5125 if [ "$CFG_SQL_mysql" = "auto" ]; then
5126 CFG_SQL_mysql=plugin
5129 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5130 echo "MySQL support cannot be enabled due to functionality tests!"
5131 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5132 echo " If you believe this message is in error you may use the continue"
5133 echo " switch (-continue) to $0 to continue."
5138 QT_LFLAGS_MYSQL_R=""
5146 if [ "$CFG_SQL_psql" != "no" ]; then
5147 # Be careful not to use native pg_config when cross building.
5148 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
5149 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
5150 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
5152 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
5153 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
5154 # But, respect PSQL_LIBS if set
5155 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
5156 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
5157 if [ "$CFG_SQL_psql" = "auto" ]; then
5161 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5162 echo "PostgreSQL support cannot be enabled due to functionality tests!"
5163 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5164 echo " If you believe this message is in error you may use the continue"
5165 echo " switch (-continue) to $0 to continue."
5176 if [ "$CFG_SQL_odbc" != "no" ]; then
5177 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
5178 if [ "$CFG_SQL_odbc" = "auto" ]; then
5182 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
5183 QT_LFLAGS_ODBC="-liodbc"
5184 if [ "$CFG_SQL_odbc" = "auto" ]; then
5188 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5189 echo "ODBC support cannot be enabled due to functionality tests!"
5190 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5191 echo " If you believe this message is in error you may use the continue"
5192 echo " switch (-continue) to $0 to continue."
5202 if [ "$CFG_SQL_oci" != "no" ]; then
5203 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
5204 if [ "$CFG_SQL_oci" = "auto" ]; then
5208 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5209 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
5210 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5211 echo " If you believe this message is in error you may use the continue"
5212 echo " switch (-continue) to $0 to continue."
5221 if [ "$CFG_SQL_tds" != "no" ]; then
5222 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
5223 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
5224 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
5225 if [ "$CFG_SQL_tds" = "auto" ]; then
5229 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5230 echo "TDS support cannot be enabled due to functionality tests!"
5231 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5232 echo " If you believe this message is in error you may use the continue"
5233 echo " switch (-continue) to $0 to continue."
5242 if [ "$CFG_SQL_db2" != "no" ]; then
5243 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
5244 if [ "$CFG_SQL_db2" = "auto" ]; then
5248 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5249 echo "ODBC support cannot be enabled due to functionality tests!"
5250 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5251 echo " If you believe this message is in error you may use the continue"
5252 echo " switch (-continue) to $0 to continue."
5261 if [ "$CFG_SQL_ibase" != "no" ]; then
5262 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
5263 if [ "$CFG_SQL_ibase" = "auto" ]; then
5264 CFG_SQL_ibase=plugin
5267 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5268 echo "InterBase support cannot be enabled due to functionality tests!"
5269 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5270 echo " If you believe this message is in error you may use the continue"
5271 echo " switch (-continue) to $0 to continue."
5280 if [ "$CFG_SQL_sqlite2" != "no" ]; then
5281 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
5282 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
5283 CFG_SQL_sqlite2=plugin
5286 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5287 echo "SQLite2 support cannot be enabled due to functionality tests!"
5288 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5289 echo " If you believe this message is in error you may use the continue"
5290 echo " switch (-continue) to $0 to continue."
5299 if [ "$CFG_SQL_sqlite" != "no" ]; then
5300 SQLITE_AUTODETECT_FAILED="no"
5301 if [ "$CFG_SQLITE" = "system" ]; then
5302 if [ -n "$PKG_CONFIG" ]; then
5303 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
5304 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
5306 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
5307 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5308 CFG_SQL_sqlite=plugin
5310 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
5312 SQLITE_AUTODETECT_FAILED="yes"
5315 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
5316 if [ "$CFG_SQL_sqlite" = "auto" ]; then
5317 CFG_SQL_sqlite=plugin
5320 SQLITE_AUTODETECT_FAILED="yes"
5324 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5325 echo "SQLite support cannot be enabled due to functionality tests!"
5326 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5327 echo " If you believe this message is in error you may use the continue"
5328 echo " switch (-continue) to $0 to continue."
5334 if [ "$OPT_VERBOSE" = "yes" ]; then
5335 echo "unknown SQL driver: $_SQLDR"
5341 # auto-detect NIS support
5342 if [ "$CFG_NIS" != "no" ]; then
5343 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
5346 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5347 echo "NIS support cannot be enabled due to functionality tests!"
5348 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5349 echo " If you believe this message is in error you may use the continue"
5350 echo " switch (-continue) to $0 to continue."
5358 # auto-detect CUPS support
5359 if [ "$CFG_CUPS" != "no" ]; then
5360 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
5363 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5364 echo "Cups support cannot be enabled due to functionality tests!"
5365 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5366 echo " If you believe this message is in error you may use the continue"
5367 echo " switch (-continue) to $0 to continue."
5375 # auto-detect iconv(3) support
5376 if [ "$CFG_ICONV" != "no" ]; then
5377 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5379 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
5381 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
5383 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
5386 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5387 echo "Iconv support cannot be enabled due to functionality tests!"
5388 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5389 echo " If you believe this message is in error you may use the continue"
5390 echo " switch (-continue) to $0 to continue."
5398 # auto-detect libdbus-1 support
5399 if [ "$CFG_DBUS" != "no" ]; then
5400 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5401 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5402 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5404 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
5405 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5406 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5407 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5409 if [ "$CFG_DBUS" = "auto" ]; then
5411 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5412 # CFG_DBUS is "yes" or "linked" here
5414 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5415 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5416 echo " If you believe this message is in error you may use the continue"
5417 echo " switch (-continue) to $0 to continue."
5423 if [ "$CFG_MULTIMEDIA" = "auto" ]; then
5424 CFG_MULTIMEDIA="$CFG_GUI"
5427 if [ "$CFG_MULTIMEDIA" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
5428 echo "QtMultimedia requested, but it can't be built without QtGui"
5432 # Generate a CRC of the namespace for using in constants for the Carbon port.
5433 # This should mean that you really *can* load two Qt's and have our custom
5434 # Carbon events work.
5435 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
5436 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`
5439 # X11/QWS/Lighthouse
5440 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5442 # auto-detect Glib support
5443 if [ "$CFG_GLIB" != "no" ]; then
5444 if [ -n "$PKG_CONFIG" ]; then
5445 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5446 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5448 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
5450 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5451 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5453 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5454 echo "Glib support cannot be enabled due to functionality tests!"
5455 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5456 echo " If you believe this message is in error you may use the continue"
5457 echo " switch (-continue) to $0 to continue."
5465 if [ "$CFG_GUI" = "no" ]; then
5466 if [ "$CFG_PHONON" = "auto" ]; then
5469 if [ "$CFG_PHONON" != "no" ]; then
5470 echo "Phonon enabled, but GUI disabled."
5471 echo " You might need to either enable the GUI or disable Phonon"
5476 # Auto-detect GStreamer support (needed for Phonon)
5477 if [ "$CFG_PHONON" != "no" ]; then
5478 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5479 if [ -n "$PKG_CONFIG" ]; then
5480 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5481 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5483 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
5485 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5486 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5488 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5489 echo "Gstreamer support cannot be enabled due to functionality tests!"
5490 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5491 echo " If you believe this message is in error you may use the continue"
5492 echo " switch (-continue) to $0 to continue."
5498 elif [ "$CFG_GLIB" = "no" ]; then
5505 if [ "$CFG_PHONON" != "no" ]; then
5506 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5507 if [ "$CFG_GSTREAMER" = "yes" ]; then
5510 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5511 echo "Phonon support cannot be enabled due to functionality tests!"
5512 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5513 echo " If you believe this message is in error you may use the continue"
5514 echo " switch (-continue) to $0 to continue."
5525 # auto-detect icd support
5526 if [ "$CFG_GLIB" = "yes" -a "$CFG_ICD" != "no" ]; then
5527 if [ -n "$PKG_CONFIG" ]; then
5528 QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null`
5529 QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null`
5531 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
5532 [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes
5533 QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS"
5534 QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS"
5536 if [ "$CFG_ICD" = "auto" ]; then
5538 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5541 echo "The ICD Bearer Management plugin cannot be enabled because connsettings was not found."
5542 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5543 echo " If you believe this message is in error you may use the continue"
5544 echo " switch (-continue) to $0 to continue."
5548 elif [ "$CFG_GLIB" = "no" ]; then
5552 # auto-detect libicu support
5553 if [ "$CFG_ICU" != "no" ]; then
5554 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5555 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5557 if [ "$CFG_ICU" = "auto" ]; then
5559 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5562 echo "The ICU library support cannot be enabled."
5563 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5564 echo " If you believe this message is in error you may use the continue"
5565 echo " switch (-continue) to $0 to continue."
5571 # Auto-detect PulseAudio support
5572 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5573 if [ -n "$PKG_CONFIG" ]; then
5574 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5575 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5577 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
5579 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5580 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5582 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5583 echo "PulseAudio support cannot be enabled due to functionality tests!"
5584 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5585 echo " If you believe this message is in error you may use the continue"
5586 echo " switch (-continue) to $0 to continue."
5593 fi # X11/QWS/Lighthouse
5596 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5597 x11tests="$relpath/config.tests/x11"
5600 # work around broken X11 headers when using GCC 2.95 or later
5602 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5603 if [ $NOTYPE = "yes" ]; then
5604 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5605 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5608 # Check we actually have X11 :-)
5609 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5610 if [ $? != "0" ]; then
5611 echo "Basic XLib functionality test failed!"
5612 echo " You might need to modify the include and library search paths by editing"
5613 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5619 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5620 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5621 if [ "$CFG_GUI" = "no" ]; then
5622 if [ "$CFG_OPENGL" = "auto" ]; then
5625 if [ "$CFG_OPENGL" != "no" ]; then
5626 echo "OpenGL enabled, but GUI disabled."
5627 echo " You might need to either enable the GUI or disable OpenGL"
5631 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5632 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
5634 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
5636 if [ "$CFG_EGL" = "no" ]; then
5640 if [ "$CFG_OPENGL" = "yes" ]; then
5641 echo "All the OpenGL functionality tests failed!"
5642 echo " You might need to modify the include and library search paths by editing"
5643 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5644 echo " ${XQMAKESPEC}."
5651 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5652 if [ "$CFG_OPENGL" = "desktop" ]; then
5653 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5654 if [ $? != "0" ]; then
5655 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5662 elif [ "$CFG_OPENGL" = "es2" ]; then
5664 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5665 if [ $? != "0" ]; then
5666 echo "The OpenGL ES 2.0 functionality test failed!"
5667 echo " You might need to modify the include and library search paths by editing"
5668 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5669 echo " ${XQMAKESPEC}."
5672 elif [ "$CFG_OPENGL" = "desktop" ]; then
5673 # Desktop OpenGL support
5674 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5675 if [ $? != "0" ]; then
5676 echo "The OpenGL functionality test failed!"
5677 echo " You might need to modify the include and library search paths by editing"
5678 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5679 echo " ${XQMAKESPEC}."
5684 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5685 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5686 if [ $? != "0" ]; then
5687 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5694 fi # X11/MINGW OpenGL
5697 if [ "$PLATFORM_X11" = "yes" ]; then
5698 # auto-detect Xcursor support
5699 if [ "$CFG_XCURSOR" != "no" ]; then
5700 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
5701 if [ "$CFG_XCURSOR" != "runtime" ]; then
5705 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5706 echo "Xcursor support cannot be enabled due to functionality tests!"
5707 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5708 echo " If you believe this message is in error you may use the continue"
5709 echo " switch (-continue) to $0 to continue."
5717 # auto-detect Xfixes support
5718 if [ "$CFG_XFIXES" != "no" ]; then
5719 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5720 if [ "$CFG_XFIXES" != "runtime" ]; then
5724 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5725 echo "Xfixes support cannot be enabled due to functionality tests!"
5726 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5727 echo " If you believe this message is in error you may use the continue"
5728 echo " switch (-continue) to $0 to continue."
5736 # auto-detect Xrandr support (resize and rotate extension)
5737 if [ "$CFG_XRANDR" != "no" ]; then
5738 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
5739 if [ "$CFG_XRANDR" != "runtime" ]; then
5743 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5744 echo "Xrandr support cannot be enabled due to functionality tests!"
5745 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5746 echo " If you believe this message is in error you may use the continue"
5747 echo " switch (-continue) to $0 to continue."
5755 # auto-detect Xrender support
5756 if [ "$CFG_XRENDER" != "no" ]; then
5757 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
5760 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5761 echo "Xrender support cannot be enabled due to functionality tests!"
5762 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5763 echo " If you believe this message is in error you may use the continue"
5764 echo " switch (-continue) to $0 to continue."
5772 # Additional check to decide if WebKit support will be included
5773 if [ "$CFG_XRENDER" = "no" ] && [ "$CFG_WEBKIT" != "no" ]; then
5774 echo "Warning: -no-xrender will disable the QtWebkit module."
5778 # auto-detect MIT-SHM support
5779 if [ "$CFG_MITSHM" != "no" ]; then
5780 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
5783 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5784 echo "MITSHM support cannot be enabled due to functionality tests!"
5785 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5786 echo " If you believe this message is in error you may use the continue"
5787 echo " switch (-continue) to $0 to continue."
5795 # auto-detect FontConfig support
5796 if [ "$CFG_FONTCONFIG" != "no" ]; then
5797 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5798 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5799 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5801 QT_CFLAGS_FONTCONFIG=
5802 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5804 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
5806 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5807 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5808 CFG_LIBFREETYPE=system
5810 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5811 echo "FontConfig support cannot be enabled due to functionality tests!"
5812 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5813 echo " If you believe this message is in error you may use the continue"
5814 echo " switch (-continue) to $0 to continue."
5822 # auto-detect Session Management support
5823 if [ "$CFG_SM" = "auto" ]; then
5824 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
5827 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5828 echo "Session Management support cannot be enabled due to functionality tests!"
5829 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5830 echo " If you believe this message is in error you may use the continue"
5831 echo " switch (-continue) to $0 to continue."
5839 # auto-detect SHAPE support
5840 if [ "$CFG_XSHAPE" != "no" ]; then
5841 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
5844 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5845 echo "XShape support cannot be enabled due to functionality tests!"
5846 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5847 echo " If you believe this message is in error you may use the continue"
5848 echo " switch (-continue) to $0 to continue."
5856 # auto-detect XVideo support
5857 if [ "$CFG_XVIDEO" != "no" ]; then
5858 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
5861 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5862 echo "XVideo support cannot be enabled due to functionality tests!"
5863 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5864 echo " If you believe this message is in error you may use the continue"
5865 echo " switch (-continue) to $0 to continue."
5873 # auto-detect XSync support
5874 if [ "$CFG_XSYNC" != "no" ]; then
5875 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
5878 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5879 echo "XSync support cannot be enabled due to functionality tests!"
5880 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5881 echo " If you believe this message is in error you may use the continue"
5882 echo " switch (-continue) to $0 to continue."
5890 # auto-detect Xinerama support
5891 if [ "$CFG_XINERAMA" != "no" ]; then
5892 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
5893 if [ "$CFG_XINERAMA" != "runtime" ]; then
5897 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5898 echo "Xinerama support cannot be enabled due to functionality tests!"
5899 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5900 echo " If you believe this message is in error you may use the continue"
5901 echo " switch (-continue) to $0 to continue."
5909 # auto-detect Xinput support
5910 if [ "$CFG_XINPUT" != "no" ]; then
5911 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
5912 if [ "$CFG_XINPUT" != "runtime" ]; then
5916 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5917 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5918 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5919 echo " If you believe this message is in error you may use the continue"
5920 echo " switch (-continue) to $0 to continue."
5928 # auto-detect XKB support
5929 if [ "$CFG_XKB" != "no" ]; then
5930 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
5933 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5934 echo "XKB support cannot be enabled due to functionality tests!"
5935 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5936 echo " If you believe this message is in error you may use the continue"
5937 echo " switch (-continue) to $0 to continue."
5945 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5946 if [ -n "$PKG_CONFIG" ]; then
5947 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5948 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5950 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5952 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5953 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5955 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5956 echo "Gtk theme support cannot be enabled due to functionality tests!"
5957 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5958 echo " If you believe this message is in error you may use the continue"
5959 echo " switch (-continue) to $0 to continue."
5965 elif [ "$CFG_GLIB" = "no" ]; then
5971 if [ "$PLATFORM_MAC" = "yes" ]; then
5972 if [ "$CFG_PHONON" != "no" ]; then
5973 # Always enable Phonon (unless it was explicitly disabled)
5977 if [ "$CFG_COREWLAN" = "auto" ]; then
5978 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
5987 if [ "$PLATFORM_QPA" = "yes" ]; then
5988 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5989 if [ "$CFG_ARCH" = "macosx" ]; then
5991 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5992 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
5994 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
5997 if [ "$CFG_OPENGL" = "yes" ]; then
5998 echo "All the OpenGL functionality tests failed!"
5999 echo " You might need to modify the include and library search paths by editing"
6000 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6001 echo " ${XQMAKESPEC}."
6006 elif [ "$CFG_OPENGL" = "es2" ]; then
6008 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
6009 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
6010 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
6011 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
6012 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
6013 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
6014 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
6015 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
6018 "$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
6019 if [ $? != "0" ]; then
6020 echo "The OpenGL ES 2.0 functionality test failed!"
6021 echo " You might need to modify the include and library search paths by editing"
6022 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
6023 echo " ${XQMAKESPEC}."
6026 elif [ "$CFG_OPENGL" = "desktop" ]; then
6027 # Desktop OpenGL support
6028 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
6029 if [ $? != "0" ]; then
6030 echo "The OpenGL functionality test failed!"
6031 echo " You might need to modify the include and library search paths by editing"
6032 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6033 echo " ${XQMAKESPEC}."
6038 # auto-detect FontConfig support
6039 if [ "$CFG_FONTCONFIG" != "no" ]; then
6040 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
6041 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
6042 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
6044 QT_CFLAGS_FONTCONFIG=
6045 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
6047 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
6048 QT_CONFIG="$QT_CONFIG fontconfig"
6049 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
6050 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
6051 CFG_LIBFREETYPE=system
6056 # Save these for a check later
6057 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
6058 ORIG_CFG_XCB="$CFG_XCB"
6060 if [ "$CFG_WAYLAND" != "no" ]; then
6061 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
6062 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
6063 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
6064 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
6065 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
6067 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
6069 QT_CONFIG="$QT_CONFIG wayland"
6070 elif [ "$CFG_WAYLAND" = "yes" ]; then
6071 echo "The Wayland functionality test failed!"
6075 QMakeVar add DEFINES QT_NO_WAYLAND
6079 # Check we actually have X11 :-)
6080 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
6081 QT_CONFIG="$QT_CONFIG xlib"
6084 # auto-detect Xrender support
6085 if [ "$CFG_XRENDER" != "no" ]; then
6086 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
6088 QT_CONFIG="$QT_CONFIG xrender"
6090 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6091 echo "Xrender support cannot be enabled due to functionality tests!"
6092 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6093 echo " If you believe this message is in error you may use the continue"
6094 echo " switch (-continue) to $0 to continue."
6102 if [ "$CFG_XCB" != "no" ]; then
6103 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6105 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
6106 QT_CONFIG="$QT_CONFIG xcb-render"
6109 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
6111 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6114 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
6115 QT_CONFIG="$QT_CONFIG xcb-xlib"
6118 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6119 # auto-detect XInput2/Xinput support
6120 if [ "$CFG_XINPUT2" != "no" ]; then
6121 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
6125 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6126 echo "XInput2 support cannot be enabled due to functionality tests!"
6127 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6128 echo " If you believe this message is in error you may use the continue"
6129 echo " switch (-continue) to $0 to continue."
6138 if [ "$CFG_XCB" = "yes" ]; then
6139 echo "The XCB test failed!"
6140 echo " You might need to install dependency packages."
6141 echo " See src/plugins/platforms/xcb/README."
6145 QMakeVar add DEFINES QT_NO_XCB
6149 # Detect libxkbcommon
6150 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6151 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6152 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6153 if [ "$CFG_WAYLAND" = "yes" ]; then
6154 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6155 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6157 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6158 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6160 if [ "$CFG_WAYLAND" = "yes" ]; then
6161 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6163 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6166 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6167 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6168 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6169 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6170 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6171 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6172 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6175 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6176 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6177 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6178 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6181 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
6182 QT_CONFIG="$QT_CONFIG coreservices"
6184 QMakeVar add DEFINES QT_NO_CORESERVICES
6187 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6188 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6189 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6190 echo "No QPA platform plugin enabled!"
6191 echo " If you really want to build without a QPA platform plugin you must pass"
6192 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6193 echo " cannot run GUI applications."
6203 if [ "$PLATFORM_QWS" = "yes" ]; then
6205 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6206 if [ "$CFG_GUI" = "no" ]; then
6207 if [ "$CFG_OPENGL" = "auto" ]; then
6210 if [ "$CFG_OPENGL" != "no" ]; then
6211 echo "OpenGL enabled, but GUI disabled."
6212 echo " You might need to either enable the GUI or disable OpenGL"
6216 if [ "$CFG_OPENGL" = "yes" ]; then
6218 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
6221 elif [ "$CFG_OPENGL" = "es2" ]; then
6223 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6224 if [ $? != "0" ]; then
6225 echo "The OpenGL ES 2.0 functionality test failed!"
6226 echo " You might need to modify the include and library search paths by editing"
6227 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6228 echo " ${XQMAKESPEC}."
6232 elif [ "$CFG_OPENGL" = "desktop" ]; then
6233 # Desktop OpenGL support
6234 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6239 if [ "$PLATFORM_QWS" = "yes" ]; then
6242 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6243 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6244 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6245 if [ $? != "0" ]; then
6246 echo "The Ahi screen driver functionality test failed!"
6247 echo " You might need to modify the include and library search paths by editing"
6248 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6249 echo " ${XQMAKESPEC}."
6254 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6255 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6256 if [ $? != "0" ]; then
6257 echo "The SVGAlib screen driver functionality test failed!"
6258 echo " You might need to modify the include and library search paths by editing"
6259 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6260 echo " ${XQMAKESPEC}."
6265 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6266 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6267 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6268 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6269 elif directfb-config --version >/dev/null 2>&1; then
6270 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6271 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6274 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6275 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6276 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6277 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6280 "$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
6281 if [ $? != "0" ]; then
6282 echo "The DirectFB screen driver functionality test failed!"
6283 echo " You might need to modify the include and library search paths by editing"
6284 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6285 echo " ${XQMAKESPEC}."
6293 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6294 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6295 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6296 if [ $? != "0" ]; then
6297 echo "The tslib functionality test failed!"
6298 echo " You might need to modify the include and library search paths by editing"
6299 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6300 echo " ${XQMAKESPEC}."
6309 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6310 if [ $? != "0" ]; then
6311 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6318 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6319 if [ "$CFG_EGL" != "no" ]; then
6320 # detect EGL support
6321 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
6322 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6327 if [ "$EGL_VARIANT" = "none" ]; then
6328 if [ "$CFG_EGL" = "yes" ]; then
6329 echo "The EGL functionality test failed!"
6330 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6331 echo " You might need to modify the include and library search paths by editing"
6332 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6333 echo " ${XQMAKESPEC}."
6337 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6338 if [ "$CFG_OPENGL" = "es2" ]; then
6345 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6348 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6349 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6350 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6351 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6352 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
6353 CFG_LIBFREETYPE=system
6359 if [ "$CFG_ENDIAN" = "auto" ]; then
6360 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6361 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6362 elif [ "$PLATFORM_MAC" = "yes" ]; then
6365 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6367 if [ "$F" -eq 0 ]; then
6368 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6369 elif [ "$F" -eq 1 ]; then
6370 CFG_ENDIAN="Q_BIG_ENDIAN"
6373 echo "The target system byte order could not be detected!"
6374 echo "Turn on verbose messaging (-v) to see the final report."
6375 echo "You can use the -little-endian or -big-endian switch to"
6376 echo "$0 to continue."
6382 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6383 if [ "$PLATFORM_MAC" = "yes" ]; then
6386 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6388 if [ "$F" -eq 0 ]; then
6389 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6390 elif [ "$F" -eq 1 ]; then
6391 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6394 echo "The host system byte order could not be detected!"
6395 echo "Turn on verbose messaging (-v) to see the final report."
6396 echo "You can use the -host-little-endian or -host-big-endian switch to"
6397 echo "$0 to continue."
6403 if [ "$CFG_ARMFPA" != "auto" ]; then
6404 if [ "$CFG_ARMFPA" = "yes" ]; then
6405 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6406 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6408 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6411 CFG_DOUBLEFORMAT="normal"
6416 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6417 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6418 CFG_DOUBLEFORMAT=normal
6420 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6422 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6423 CFG_DOUBLEFORMAT=normal
6424 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6425 CFG_DOUBLEFORMAT=normal
6426 elif [ "$F" -eq 10 ]; then
6427 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6428 elif [ "$F" -eq 11 ]; then
6429 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6430 elif [ "$F" -eq 12 ]; then
6431 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6433 elif [ "$F" -eq 13 ]; then
6434 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6438 echo "The system floating point format could not be detected."
6439 echo "This may cause data to be generated in a wrong format"
6440 echo "Turn on verbose messaging (-v) to see the final report."
6441 # we do not fail on this since this is a new test, and if it fails,
6442 # the old behavior should be correct in most cases
6443 CFG_DOUBLEFORMAT=normal
6449 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6453 if [ "$CFG_STL" != "no" ]; then
6454 if [ "$HAVE_STL" = "yes" ]; then
6457 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6458 echo "STL support cannot be enabled due to functionality tests!"
6459 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6460 echo " If you believe this message is in error you may use the continue"
6461 echo " switch (-continue) to $0 to continue."
6469 # detect POSIX clock_gettime()
6470 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6471 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
6472 CFG_CLOCK_GETTIME=yes
6474 CFG_CLOCK_GETTIME=no
6478 # detect POSIX monotonic clocks
6479 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6480 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
6481 CFG_CLOCK_MONOTONIC=yes
6483 CFG_CLOCK_MONOTONIC=no
6485 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6486 CFG_CLOCK_MONOTONIC=no
6490 if [ "$CFG_MREMAP" = "auto" ]; then
6491 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6498 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6499 if [ "$CFG_GETADDRINFO" != "no" ]; then
6500 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6503 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6504 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6505 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6506 echo " If you believe this message is in error you may use the continue"
6507 echo " switch (-continue) to $0 to continue."
6515 # find if the platform provides inotify
6516 if [ "$CFG_INOTIFY" != "no" ]; then
6517 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6520 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6521 echo "inotify support cannot be enabled due to functionality tests!"
6522 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6523 echo " If you believe this message is in error you may use the continue"
6524 echo " switch (-continue) to $0 to continue."
6532 # find if the platform provides if_nametoindex (ipv6 interface name support)
6533 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6534 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
6537 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6538 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6539 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6540 echo " If you believe this message is in error you may use the continue"
6541 echo " switch (-continue) to $0 to continue."
6549 # find if the platform provides getifaddrs (network interface enumeration)
6550 if [ "$CFG_GETIFADDRS" != "no" ]; then
6551 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6554 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6555 echo "getifaddrs support cannot be enabled due to functionality tests!"
6556 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6557 echo " If you believe this message is in error you may use the continue"
6558 echo " switch (-continue) to $0 to continue."
6567 if [ "$CFG_OPENSSL" != "no" ]; then
6568 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
6569 if [ "$CFG_OPENSSL" = "auto" ]; then
6573 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6574 echo "OpenSSL support cannot be enabled due to functionality tests!"
6575 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6576 echo " If you believe this message is in error you may use the continue"
6577 echo " switch (-continue) to $0 to continue."
6585 # detect OpenVG support
6586 if [ "$CFG_OPENVG" != "no" ]; then
6587 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
6588 if [ "$CFG_OPENVG" = "auto" ]; then
6591 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
6592 if [ "$CFG_OPENVG" = "auto" ]; then
6595 CFG_OPENVG_ON_OPENGL=yes
6596 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
6597 if [ "$CFG_OPENVG" = "auto" ]; then
6600 CFG_OPENVG_LC_INCLUDES=yes
6601 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
6602 if [ "$CFG_OPENVG" = "auto" ]; then
6605 CFG_OPENVG_LC_INCLUDES=yes
6606 CFG_OPENVG_ON_OPENGL=yes
6608 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6609 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6610 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6611 echo " If you believe this message is in error you may use the continue"
6612 echo " switch (-continue) to $0 to continue."
6618 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
6619 CFG_OPENVG_SHIVA=yes
6623 if [ "$CFG_ALSA" = "auto" ]; then
6624 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6631 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6632 if [ "$CFG_ARCH" = "arm" ]; then
6633 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6634 if [ $? != "0" ]; then
6635 CFG_JAVASCRIPTCORE_JIT=no
6638 case "$XPLATFORM" in
6640 CFG_JAVASCRIPTCORE_JIT=no
6646 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6647 QMakeVar set JAVASCRIPTCORE_JIT yes
6648 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6649 QMakeVar set JAVASCRIPTCORE_JIT no
6652 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6653 CFG_AUDIO_BACKEND=yes
6656 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6657 echo "Warning: largefile support cannot be disabled for win32."
6661 #-------------------------------------------------------------------------------
6662 # ask for all that hasn't been auto-detected or specified in the arguments
6663 #-------------------------------------------------------------------------------
6665 ### fix this: user input should be validated in a loop
6666 if [ "$PLATFORM_QWS" = "yes" ]; then
6667 PROMPT_FOR_DEPTHS="yes"
6669 PROMPT_FOR_DEPTHS="no"
6671 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6673 echo "Choose pixel-depths to support:"
6675 echo " 1. 1bpp, black/white"
6676 echo " 4. 4bpp, grayscale"
6677 echo " 8. 8bpp, paletted"
6678 echo " 12. 12bpp, rgb 4-4-4"
6679 echo " 15. 15bpp, rgb 5-5-5"
6680 echo " 16. 16bpp, rgb 5-6-5"
6681 echo " 18. 18bpp, rgb 6-6-6"
6682 echo " 24. 24bpp, rgb 8-8-8"
6683 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6684 echo " all. All supported depths"
6686 echo "Your choices (default 8,16,32):"
6688 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6689 CFG_QWS_DEPTHS=8,16,32
6692 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6693 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6694 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6696 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6698 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6699 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6704 # enable dwarf2 support on Mac
6705 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6706 QT_CONFIG="$QT_CONFIG dwarf2"
6709 # Set the default arch if there are no "-arch" arguments on the configure line
6710 # For "-carbon" builds: 32 bit x86/ppc.
6711 # For builds on snow leopard : compiler default (64-bit).
6712 # For builds on leopard : compiler default (32-bit).
6713 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6714 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6716 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6717 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6718 CFG_MAC_ARCHS=" x86"
6719 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6720 CFG_MAC_ARCHS=" ppc"
6722 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6725 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6728 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6731 # enable Cocoa and/or Carbon on Mac
6732 # -carbon on the command line disables Cocoa, except for 64-bit archs
6733 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6734 CFG_MAC_CARBON="YES"
6737 # check which archs are in use, enable cocoa if we find a 64-bit one
6738 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6739 CFG_MAC_COCOA="yes";
6740 CFG_MAC_CARBON="no";
6741 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6742 CFG_MAC_CARBON="yes";
6744 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6745 CFG_MAC_CARBON="yes";
6750 # select Carbon on 10.4 Tiger.
6751 if [ "$PLATFORM_MAC" = "yes" ]; then
6752 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6753 if [ "$VERSION" == 8 ]; then
6755 CFG_MAC_CARBON="yes";
6759 # select Carbon when using the 10.4u SDK
6760 if [ "$PLATFORM_MAC" = "yes" ]; then
6761 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6764 CFG_MAC_CARBON="yes";
6768 # but disable Cocoa if cross-building for mingw
6769 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6772 if [ "$CFG_PHONON" = "yes" ]; then
6773 # No longer needed after modularization
6774 #QT_CONFIG="$QT_CONFIG phonon"
6775 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6776 QT_CONFIG="$QT_CONFIG phonon-backend"
6779 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6782 # disable accessibility
6783 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6784 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6786 QT_CONFIG="$QT_CONFIG accessibility"
6789 # egl stuff does not belong in lighthouse, but rather in plugins
6790 if [ "$PLATFORM_QPA" = "yes" ]; then
6795 if [ "$CFG_EGL" = "no" ]; then
6796 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6798 QT_CONFIG="$QT_CONFIG egl"
6799 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6800 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6805 if [ "$CFG_OPENVG" = "no" ]; then
6806 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6808 QT_CONFIG="$QT_CONFIG openvg"
6809 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6810 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6812 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6813 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6815 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6816 QT_CONFIG="$QT_CONFIG shivavg"
6817 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6822 if [ "$CFG_OPENGL" = "no" ]; then
6823 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6825 QT_CONFIG="$QT_CONFIG opengl"
6828 if [ "$CFG_OPENGL" = "es2" ]; then
6829 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6832 if [ "$CFG_OPENGL" = "es2" ]; then
6833 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6834 QT_CONFIG="$QT_CONFIG opengles2"
6837 # safe execution environment
6838 if [ "$CFG_SXE" != "no" ]; then
6839 QT_CONFIG="$QT_CONFIG sxe"
6842 # build up the variables for output
6843 if [ "$CFG_DEBUG" = "yes" ]; then
6844 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6845 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6846 elif [ "$CFG_DEBUG" = "no" ]; then
6847 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6848 QMAKE_CONFIG="$QMAKE_CONFIG release"
6850 if [ "$CFG_SHARED" = "yes" ]; then
6851 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6852 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6853 elif [ "$CFG_SHARED" = "no" ]; then
6854 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6855 QMAKE_CONFIG="$QMAKE_CONFIG static"
6857 if [ "$PLATFORM_QWS" = "yes" ]; then
6858 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6859 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6860 QT_CONFIG="$QT_CONFIG embedded"
6861 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6863 if [ "$PLATFORM_QPA" = "yes" ]; then
6864 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6865 QT_CONFIG="$QT_CONFIG qpa"
6866 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6867 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6870 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6871 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6872 QT_CONFIG="$QT_CONFIG nacl pepper"
6873 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6876 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6877 # Do not set this here for Windows. Let qmake do it so
6878 # debug and release precompiled headers are kept separate.
6879 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6881 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6882 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6883 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6884 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6885 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6886 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6888 if [ "$CFG_STL" = "no" ]; then
6889 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6891 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6893 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6894 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6896 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6897 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6898 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6899 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6900 QMakeVar add QMAKE_CFLAGS -g
6901 QMakeVar add QMAKE_CXXFLAGS -g
6902 QT_CONFIG="$QT_CONFIG separate_debug_info"
6904 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6905 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6907 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6908 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6909 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6910 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6911 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6912 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6913 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6914 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6915 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6916 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6917 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6918 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6919 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6920 QT_CONFIG="$QT_CONFIG clock-gettime"
6922 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6923 QT_CONFIG="$QT_CONFIG clock-monotonic"
6925 if [ "$CFG_MREMAP" = "yes" ]; then
6926 QT_CONFIG="$QT_CONFIG mremap"
6928 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6929 QT_CONFIG="$QT_CONFIG getaddrinfo"
6931 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6932 QT_CONFIG="$QT_CONFIG ipv6ifname"
6934 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6935 QT_CONFIG="$QT_CONFIG getifaddrs"
6937 if [ "$CFG_INOTIFY" = "yes" ]; then
6938 QT_CONFIG="$QT_CONFIG inotify"
6940 if [ "$CFG_LIBJPEG" = "no" ]; then
6942 elif [ "$CFG_LIBJPEG" = "system" ]; then
6943 QT_CONFIG="$QT_CONFIG system-jpeg"
6945 if [ "$CFG_JPEG" = "no" ]; then
6946 QT_CONFIG="$QT_CONFIG no-jpeg"
6947 elif [ "$CFG_JPEG" = "yes" ]; then
6948 QT_CONFIG="$QT_CONFIG jpeg"
6950 if [ "$CFG_LIBMNG" = "no" ]; then
6952 elif [ "$CFG_LIBMNG" = "system" ]; then
6953 QT_CONFIG="$QT_CONFIG system-mng"
6955 if [ "$CFG_MNG" = "no" ]; then
6956 QT_CONFIG="$QT_CONFIG no-mng"
6957 elif [ "$CFG_MNG" = "yes" ]; then
6958 QT_CONFIG="$QT_CONFIG mng"
6960 if [ "$CFG_LIBPNG" = "no" ]; then
6963 if [ "$CFG_LIBPNG" = "system" ]; then
6964 QT_CONFIG="$QT_CONFIG system-png"
6966 if [ "$CFG_PNG" = "no" ]; then
6967 QT_CONFIG="$QT_CONFIG no-png"
6968 elif [ "$CFG_PNG" = "yes" ]; then
6969 QT_CONFIG="$QT_CONFIG png"
6971 if [ "$CFG_GIF" = "no" ]; then
6972 QT_CONFIG="$QT_CONFIG no-gif"
6973 elif [ "$CFG_GIF" = "yes" ]; then
6974 QT_CONFIG="$QT_CONFIG gif"
6976 if [ "$CFG_LIBTIFF" = "no" ]; then
6978 elif [ "$CFG_LIBTIFF" = "system" ]; then
6979 QT_CONFIG="$QT_CONFIG system-tiff"
6981 if [ "$CFG_TIFF" = "no" ]; then
6982 QT_CONFIG="$QT_CONFIG no-tiff"
6983 elif [ "$CFG_TIFF" = "yes" ]; then
6984 QT_CONFIG="$QT_CONFIG tiff"
6986 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6987 QT_CONFIG="$QT_CONFIG no-freetype"
6988 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6989 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6990 QT_CONFIG="$QT_CONFIG system-freetype"
6992 QT_CONFIG="$QT_CONFIG freetype"
6994 if [ "$CFG_GUI" = "auto" ]; then
6997 if [ "$CFG_GUI" = "no" ]; then
6998 QT_CONFIG="$QT_CONFIG no-gui"
7000 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
7004 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7005 #On Mac we implicitly link against libz, so we
7006 #never use the 3rdparty stuff.
7007 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
7009 if [ "$CFG_ZLIB" = "yes" ]; then
7010 QT_CONFIG="$QT_CONFIG zlib"
7011 elif [ "$CFG_ZLIB" = "system" ]; then
7012 QT_CONFIG="$QT_CONFIG system-zlib"
7015 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
7016 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
7017 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7018 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7019 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7020 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7021 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7022 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7023 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7024 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7025 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7026 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7027 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7028 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7029 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7031 if [ "$PLATFORM_X11" = "yes" ]; then
7032 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7034 # for some reason, the following libraries are not always built shared,
7035 # so *every* program/lib (including Qt) has to link against them
7036 if [ "$CFG_XSHAPE" = "yes" ]; then
7037 QT_CONFIG="$QT_CONFIG xshape"
7039 if [ "$CFG_XVIDEO" = "yes" ]; then
7040 QT_CONFIG="$QT_CONFIG xvideo"
7042 if [ "$CFG_XSYNC" = "yes" ]; then
7043 QT_CONFIG="$QT_CONFIG xsync"
7045 if [ "$CFG_XINERAMA" = "yes" ]; then
7046 QT_CONFIG="$QT_CONFIG xinerama"
7047 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7049 if [ "$CFG_XCURSOR" = "yes" ]; then
7050 QT_CONFIG="$QT_CONFIG xcursor"
7051 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7053 if [ "$CFG_XFIXES" = "yes" ]; then
7054 QT_CONFIG="$QT_CONFIG xfixes"
7055 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7057 if [ "$CFG_XRANDR" = "yes" ]; then
7058 QT_CONFIG="$QT_CONFIG xrandr"
7059 if [ "$CFG_XRENDER" != "yes" ]; then
7060 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7061 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7063 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7066 if [ "$CFG_XRENDER" = "yes" ]; then
7067 QT_CONFIG="$QT_CONFIG xrender"
7068 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7070 if [ "$CFG_MITSHM" = "yes" ]; then
7071 QT_CONFIG="$QT_CONFIG mitshm"
7073 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7074 QT_CONFIG="$QT_CONFIG fontconfig"
7076 if [ "$CFG_XINPUT" = "yes" ]; then
7077 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7079 if [ "$CFG_XINPUT" = "yes" ]; then
7080 QT_CONFIG="$QT_CONFIG xinput tablet"
7082 if [ "$CFG_XKB" = "yes" ]; then
7083 QT_CONFIG="$QT_CONFIG xkb"
7087 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7088 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7089 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7091 if [ "$CFG_ARCH" = "macosx" ]; then
7092 if [ "$CFG_RPATH" = "yes" ]; then
7093 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7095 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7096 if [ -n "$RPATH_FLAGS" ]; then
7098 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7102 elif [ "$CFG_RPATH" = "yes" ]; then
7103 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7107 if [ "$CFG_RPATH" = "yes" ]; then
7108 # set the default rpath to the library installation directory
7109 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7111 if [ -n "$RPATH_FLAGS" ]; then
7112 # add the user defined rpaths
7113 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7117 if [ '!' -z "$I_FLAGS" ]; then
7118 # add the user define include paths
7119 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7120 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7123 if [ '!' -z "$W_FLAGS" ]; then
7124 # add the user defined warning flags
7125 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7126 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7127 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7130 # turn off exceptions for the compilers that support it
7131 if [ "$PLATFORM_QWS" = "yes" ]; then
7132 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7133 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7134 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7136 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7138 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7142 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7143 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7146 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7147 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7148 # Follow default behavior of configure.exe by overriding with "rtti".
7149 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7152 if [ "$CFG_ALSA" = "yes" ]; then
7153 QT_CONFIG="$QT_CONFIG alsa"
7156 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7157 QT_CONFIG="$QT_CONFIG pulseaudio"
7160 if [ "$CFG_COREWLAN" = "yes" ]; then
7161 QT_CONFIG="$QT_CONFIG corewlan"
7164 if [ "$CFG_ICD" = "yes" ]; then
7165 QT_CONFIG="$QT_CONFIG icd"
7168 if [ "$CFG_ICU" = "yes" ]; then
7169 QT_CONFIG="$QT_CONFIG icu"
7172 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
7173 QT_CONFIG="$QT_CONFIG force_asserts"
7177 # Some Qt modules are too advanced in C++ for some old compilers
7178 # Detect here the platforms where they are known to work.
7180 # See Qt documentation for more information on which features are
7181 # supported and on which compilers.
7183 canBuildQtXmlPatterns="yes"
7184 canBuildWebKit="$HAVE_STL"
7185 canBuildQtConcurrent="yes"
7187 canUseV8Snapshot="yes"
7189 # WebKit requires stdint.h
7190 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7191 if [ $? != "0" ]; then
7195 case "$XPLATFORM" in
7197 # PA-RISC's assembly is too limited
7198 # gcc 3.4 on that platform can't build QtXmlPatterns
7199 # the assembly it generates cannot be compiled
7201 # Check gcc's version
7202 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7206 canBuildQtXmlPatterns="no"
7210 canBuildQtXmlPatterns="no"
7214 unsupported/vxworks-*-g++*)
7217 unsupported/vxworks-*-dcc*)
7219 canBuildQtXmlPatterns="no"
7222 # Check gcc's version
7223 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7231 canBuildQtXmlPatterns="no"
7236 # Check the compiler version
7237 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7240 canBuildQtXmlPatterns="no"
7241 canBuildQtConcurrent="no"
7245 canBuildQtConcurrent="no"
7251 canBuildQtXmlPatterns="no"
7252 canBuildQtConcurrent="no"
7258 # Get the xlC version
7259 cat > xlcver.c <<EOF
7263 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7268 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7269 xlcver=`./xlcver 2>/dev/null`
7272 if [ "$OPT_VERBOSE" = "yes" ]; then
7273 if [ -n "$xlcver" ]; then
7274 echo Found IBM xlC version: $xlcver.
7276 echo Could not determine IBM xlC version, assuming oldest supported.
7283 canBuildQtXmlPatterns="no"
7284 canBuildQtConcurrent="no"
7288 canBuildQtConcurrent="no"
7294 canBuildQtConcurrent="no"
7298 if [ "$CFG_GUI" = "no" ]; then
7299 # WebKit requires QtGui
7303 if [ "$CFG_SHARED" = "no" ]; then
7305 echo "WARNING: Using static linking will disable the WebKit module."
7310 CFG_CONCURRENT="yes"
7311 if [ "$canBuildQtConcurrent" = "no" ]; then
7312 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7315 QT_CONFIG="$QT_CONFIG concurrent"
7318 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7319 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7322 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7323 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7324 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7325 CFG_XMLPATTERNS="no"
7327 # No longer needed after modularization
7328 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7329 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7331 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7334 # No longer needed after modularization
7335 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7336 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7338 # QT_CONFIG="$QT_CONFIG multimedia"
7341 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7342 QT_CONFIG="$QT_CONFIG audio-backend"
7345 if [ "$CFG_SVG" = "auto" ]; then
7349 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7350 echo "QtSvg requested, but it can't be built without QtGui"
7354 if [ "$CFG_SVG" = "yes" ]; then
7355 QT_CONFIG="$QT_CONFIG svg"
7357 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7360 if [ "$CFG_WEBKIT" != "no" ]; then
7361 CFG_WEBKIT="$canBuildWebKit"
7364 if [ "$CFG_WEBKIT" != "no" ]; then
7365 # No longer needed after modularization
7366 #QT_CONFIG="$QT_CONFIG webkit"
7367 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7368 if [ "$CFG_WEBKIT" = "debug" ]; then
7369 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7373 if [ "$CFG_SCRIPT" = "auto" ]; then
7377 # No longer needed after modularization
7378 #if [ "$CFG_SCRIPT" = "yes" ]; then
7379 # QT_CONFIG="$QT_CONFIG script"
7381 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7384 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7385 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7388 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7389 CFG_SCRIPTTOOLS="yes"
7390 elif [ "$CFG_SCRIPT" = "no" ]; then
7391 CFG_SCRIPTTOOLS="no"
7394 # No longer needed after modularization
7395 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7396 # QT_CONFIG="$QT_CONFIG scripttools"
7398 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7403 i386|x86_64|arm|mips|macosx) ;;
7404 *) canBuildV8="no";;
7407 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7408 echo "Error: V8 was requested, but is not supported on this platform."
7412 if [ "$CFG_V8" = "auto" ]; then
7413 CFG_V8="$canBuildV8"
7416 if [ "$CFG_V8" = "no" ]; then
7417 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7419 QT_CONFIG="$QT_CONFIG v8"
7420 # Detect snapshot support
7421 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7422 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7425 *) canUseV8Snapshot="no"
7429 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7430 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7432 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7433 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7436 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7437 QT_CONFIG="$QT_CONFIG v8snapshot"
7441 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7442 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7443 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7447 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7448 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7455 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7456 # No longer needed after modularization
7457 #QT_CONFIG="$QT_CONFIG declarative"
7458 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7459 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7462 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7465 if [ "$CFG_LOCATION" = "auto" ]; then
7466 CFG_LOCATION="$CFG_GUI"
7469 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7470 echo "QtLocation requested, but it can't be built without QtGui"
7474 #Disable QtLocation until ready
7477 if [ "$CFG_LOCATION" = "no" ]; then
7478 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7481 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7484 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7485 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7486 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7491 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7492 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7493 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7500 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7503 # On Mac, set the minimum deployment target for the different architechtures
7504 # using the Xarch compiler option when supported (10.5 and up).
7505 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7506 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7507 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7508 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7509 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7510 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7512 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7513 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7514 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7515 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7516 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7518 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7519 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7520 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7521 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7522 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7524 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7525 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7526 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7527 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7528 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7535 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7537 case "$COMPILER_VERSION" in
7539 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7540 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7541 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7544 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7545 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7546 QT_GCC_PATCH_VERSION=0
7556 #-------------------------------------------------------------------------------
7557 # part of configuration information goes into qconfig.h
7558 #-------------------------------------------------------------------------------
7560 case "$CFG_QCONFIG" in
7562 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7565 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7566 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7567 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7568 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7569 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7570 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7572 echo "#endif" >>"$tmpconfig"
7576 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7580 # define QT_EDITION $QT_EDITION
7583 /* Machine byte-order */
7584 #define Q_BIG_ENDIAN 4321
7585 #define Q_LITTLE_ENDIAN 1234
7588 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7589 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7590 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7591 #if defined(__BIG_ENDIAN__)
7592 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7593 #elif defined(__LITTLE_ENDIAN__)
7594 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7596 # error "Unable to determine byte order!"
7600 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7602 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7603 if [ "$CFG_ENDIAN" = "auto" ]; then
7604 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7605 #if defined(__BIG_ENDIAN__)
7606 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7607 #elif defined(__LITTLE_ENDIAN__)
7608 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7610 # error "Unable to determine byte order!"
7614 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7616 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7618 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7619 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7620 /* Non-IEEE double format */
7621 #define Q_DOUBLE_LITTLE "01234567"
7622 #define Q_DOUBLE_BIG "76543210"
7623 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7624 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7625 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7628 if [ "$CFG_ARMFPA" = "yes" ]; then
7629 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7630 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7631 #ifndef QT_BOOTSTRAPPED
7636 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7640 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7641 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7642 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7643 /* Machine Architecture */
7644 #ifndef QT_BOOTSTRAPPED
7645 # define QT_ARCH_${CFG_ARCH_STR}
7647 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7651 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7652 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7654 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7655 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7658 # if both carbon and cocoa are specified, enable the autodetection code.
7659 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7660 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7661 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7662 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7665 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7666 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7669 if [ "$PLATFORM_MAC" = "yes" ]; then
7670 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7671 #if defined(__LP64__)
7672 # define QT_POINTER_SIZE 8
7674 # define QT_POINTER_SIZE 4
7678 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7679 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7683 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7685 if [ "$CFG_DEV" = "yes" ]; then
7686 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7689 # Embedded compile time options
7690 if [ "$PLATFORM_QWS" = "yes" ]; then
7691 # Add QWS to config.h
7692 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7694 # Add excluded decorations to $QCONFIG_FLAGS
7695 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7696 for decor in $decors; do
7697 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7698 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7701 # Figure which embedded drivers which are turned off
7702 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7703 for ADRIVER in $CFG_GFX_ON; do
7704 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7707 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7708 # the um driver is currently not in the available list for external builds
7709 if [ "$CFG_DEV" = "no" ]; then
7710 CFG_KBD_OFF="$CFG_KBD_OFF um"
7712 for ADRIVER in $CFG_KBD_ON; do
7713 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7716 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7717 for ADRIVER in $CFG_MOUSE_ON; do
7718 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7721 for DRIVER in $CFG_GFX_OFF; do
7722 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7723 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7726 for DRIVER in $CFG_KBD_OFF; do
7727 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7728 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7731 for DRIVER in $CFG_MOUSE_OFF; do
7732 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7733 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7737 if [ "$PLATFORM_QPA" = "yes" ]; then
7738 # Add QPA to config.h
7739 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7742 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7743 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7746 # Add turned on SQL drivers
7747 for DRIVER in $CFG_SQL_AVAILABLE; do
7748 eval "VAL=\$CFG_SQL_$DRIVER"
7751 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7752 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7753 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7756 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7762 QMakeVar set sql-drivers "$SQL_DRIVERS"
7763 QMakeVar set sql-plugins "$SQL_PLUGINS"
7765 # Add other configuration options to the qconfig.h file
7766 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7767 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7768 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7769 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7770 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7771 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7772 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7773 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7774 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7776 # ATM we need this define to compile Qt. Remove later!
7777 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7779 # X11/Unix/Mac only configs
7780 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7781 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7782 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7783 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7784 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7785 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7786 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7787 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7788 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7789 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7790 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7791 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7792 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7793 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7794 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7796 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7797 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7798 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7799 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7800 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7801 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7802 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7803 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7804 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7805 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7806 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7807 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7808 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7810 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7811 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7812 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7813 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7814 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7815 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7816 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7817 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7818 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
7820 # sort QCONFIG_FLAGS for neatness if we can
7821 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7822 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7824 if [ -n "$QCONFIG_FLAGS" ]; then
7825 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7826 #ifndef QT_BOOTSTRAPPED
7829 for cfg in $QCONFIG_FLAGS; do
7830 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7831 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7832 # figure out define logic, so we can output the correct
7833 # ifdefs to override the global defines in a project
7835 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7836 # QT_NO_option can be forcefully turned on by QT_option
7837 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7838 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7839 # QT_option can be forcefully turned off by QT_NO_option
7840 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7843 if [ -z $cfgdNeg ]; then
7844 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7851 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7852 #if defined($cfgd) && defined($cfgdNeg)
7854 #elif !defined($cfgd) && !defined($cfgdNeg)
7861 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7862 #endif // QT_BOOTSTRAPPED
7867 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7868 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7869 #define QT_VISIBILITY_AVAILABLE
7874 if [ -n "$QT_LIBINFIX" ]; then
7875 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7876 #define QT_LIBINFIX "$QT_LIBINFIX"
7881 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7882 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7883 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7885 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7886 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7887 chmod -w "$outpath/src/corelib/global/qconfig.h"
7888 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7889 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7893 #-------------------------------------------------------------------------------
7894 # save configuration into qconfig.pri
7895 #-------------------------------------------------------------------------------
7896 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7897 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7898 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7899 if [ "$CFG_DEBUG" = "yes" ]; then
7900 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7901 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7902 QT_CONFIG="$QT_CONFIG release"
7904 QT_CONFIG="$QT_CONFIG debug"
7905 elif [ "$CFG_DEBUG" = "no" ]; then
7906 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7907 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7908 QT_CONFIG="$QT_CONFIG debug"
7910 QT_CONFIG="$QT_CONFIG release"
7912 if [ "$CFG_STL" = "yes" ]; then
7913 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7915 if [ "$CFG_FRAMEWORK" = "no" ]; then
7916 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7918 QT_CONFIG="$QT_CONFIG qt_framework"
7919 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7921 if [ "$PLATFORM_MAC" = "yes" ]; then
7922 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7924 if [ "$CFG_DEV" = "yes" ]; then
7925 QT_CONFIG="$QT_CONFIG private_tests"
7928 # Make the application arch follow the Qt arch for single arch builds.
7929 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7930 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7931 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7934 cat >>"$QTCONFIG.tmp" <<EOF
7936 CONFIG += $QTCONFIG_CONFIG
7938 QT_EDITION = $Edition
7939 QT_CONFIG += $QT_CONFIG
7942 QT_VERSION = $QT_VERSION
7943 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7944 QT_MINOR_VERSION = $QT_MINOR_VERSION
7945 QT_PATCH_VERSION = $QT_PATCH_VERSION
7948 QT_LIBINFIX = $QT_LIBINFIX
7949 QT_NAMESPACE = $QT_NAMESPACE
7950 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7953 if [ -n "$CFG_SYSROOT" ]; then
7954 echo "# sysroot" >>"$QTCONFIG.tmp"
7955 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7956 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7957 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7958 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7959 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7960 echo "}" >> "$QTCONFIG.tmp"
7961 echo >> "$QTCONFIG.tmp"
7963 if [ "$CFG_RPATH" = "yes" ]; then
7964 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7966 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7967 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7968 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7969 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7972 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7973 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7974 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7977 # replace qconfig.pri if it differs from the newly created temp file
7978 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7979 rm -f "$QTCONFIG.tmp"
7981 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7984 #-------------------------------------------------------------------------------
7985 # save configuration into qmodule.pri
7986 #-------------------------------------------------------------------------------
7987 QTMODULE="$outpath/mkspecs/qmodule.pri"
7989 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7991 # Ensure we can link to uninistalled libraries
7992 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7993 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7995 if [ -n "$QT_CFLAGS_PSQL" ]; then
7996 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7998 if [ -n "$QT_LFLAGS_PSQL" ]; then
7999 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
8001 if [ -n "$QT_CFLAGS_MYSQL" ]; then
8002 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
8004 if [ -n "$QT_LFLAGS_MYSQL" ]; then
8005 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
8007 if [ -n "$QT_CFLAGS_SQLITE" ]; then
8008 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
8010 if [ -n "$QT_LFLAGS_SQLITE" ]; then
8011 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
8013 if [ -n "$QT_LFLAGS_ODBC" ]; then
8014 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
8016 if [ -n "$QT_LFLAGS_TDS" ]; then
8017 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8020 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8021 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8024 #dump in the OPENSSL_LIBS info
8025 if [ '!' -z "$OPENSSL_LIBS" ]; then
8026 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8027 elif [ "$CFG_OPENSSL" = "linked" ]; then
8028 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8031 #dump in the SDK info
8032 if [ '!' -z "$CFG_SDK" ]; then
8033 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8036 # mac gcc -Xarch support
8037 if [ "$CFG_MAC_XARCH" = "no" ]; then
8038 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8042 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8043 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8045 # replace qmodule.pri if it differs from the newly created temp file
8046 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8047 rm -f "$QTMODULE.tmp"
8049 mv -f "$QTMODULE.tmp" "$QTMODULE"
8052 #-------------------------------------------------------------------------------
8053 # save configuration into .qmake.cache
8054 #-------------------------------------------------------------------------------
8056 CACHEFILE="$outpath/.qmake.cache"
8057 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8058 cat >>"$CACHEFILE.tmp" <<EOF
8060 QT_SOURCE_TREE = \$\$quote($relpath)
8061 QT_BUILD_TREE = \$\$quote($outpath)
8062 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8064 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8065 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8066 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8067 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8068 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8069 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8070 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8072 include(\$\$PWD/mkspecs/qmodule.pri)
8073 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8074 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8075 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8079 #dump the qmake spec
8080 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8081 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8083 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8088 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8089 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8090 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8091 # don't need to worry about generated files
8092 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8093 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8095 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8097 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8098 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8101 # replace .qmake.cache if it differs from the newly created temp file
8102 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8103 rm -f "$CACHEFILE.tmp"
8105 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8108 #-------------------------------------------------------------------------------
8109 # give feedback on configuration
8110 #-------------------------------------------------------------------------------
8114 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8117 This target is using the GNU C++ compiler ($PLATFORM).
8119 Recent versions of this compiler automatically include code for
8120 exceptions, which increase both the size of the Qt libraries and
8121 the amount of memory taken by your applications.
8123 You may choose to re-run `basename $0` with the -no-exceptions
8124 option to compile Qt without exceptions. This is completely binary
8125 compatible, and existing applications will continue to work.
8133 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8136 This target is using the MIPSpro C++ compiler ($PLATFORM).
8138 You may choose to re-run `basename $0` with the -no-exceptions
8139 option to compile Qt without exceptions. This will make the
8140 size of the Qt library smaller and reduce the amount of memory
8141 taken by your applications.
8152 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8154 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8155 in debug mode will run out of memory on systems with 2GB or less.
8156 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8157 -no-webkit or -release to skip webkit debug.
8162 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8163 echo "Build type: $PLATFORM"
8165 echo "Building on: $PLATFORM"
8166 echo "Building for: $XPLATFORM"
8169 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8170 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8172 echo "Architecture: $CFG_ARCH"
8175 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8176 echo "Host architecture: $CFG_HOST_ARCH"
8179 if [ "$PLATFORM_MAC" = "yes" ]; then
8180 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8181 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8182 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8184 echo "Using framework: Cocoa"
8187 echo "Using framework: Carbon"
8191 if [ -n "$PLATFORM_NOTES" ]; then
8192 echo "Platform notes:"
8193 echo "$PLATFORM_NOTES"
8198 if [ "$OPT_VERBOSE" = "yes" ]; then
8199 echo $ECHO_N "qmake vars .......... $ECHO_C"
8200 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8201 echo "qmake switches ......... $QMAKE_SWITCHES"
8204 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8205 echo "Build .................. $CFG_BUILD_PARTS"
8206 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8207 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8208 echo "Debug .................. yes (combined)"
8209 if [ "$CFG_DEBUG" = "yes" ]; then
8210 echo "Default Link ........... debug"
8212 echo "Default Link ........... release"
8215 echo "Debug .................. $CFG_DEBUG"
8217 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8218 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8219 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8220 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8221 echo "QtGui module ........... $CFG_GUI"
8222 echo "QtScript module ........ $CFG_SCRIPT"
8223 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8224 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8225 echo "Phonon module .......... $CFG_PHONON"
8226 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8227 echo "SVG module ............. $CFG_SVG"
8228 case "$CFG_WEBKIT" in
8229 yes) echo "WebKit module .......... yes" ;;
8230 debug) echo "WebKit module .......... yes (debug)" ;;
8231 no) echo "WebKit module .......... no" ;;
8233 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8234 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8235 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8237 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8240 echo "V8 module .............. $CFG_V8"
8241 echo "Declarative module ..... $CFG_DECLARATIVE"
8242 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8243 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8245 echo "Location module ........ $CFG_LOCATION"
8246 echo "STL support ............ $CFG_STL"
8247 echo "PCH support ............ $CFG_PRECOMPILE"
8248 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8249 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8250 echo "AVX..................... ${CFG_AVX}"
8251 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8252 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8253 echo "NEON support ........... ${CFG_NEON}"
8255 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8256 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8257 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8258 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8259 echo "NIS support ............ $CFG_NIS"
8260 echo "CUPS support ........... $CFG_CUPS"
8261 echo "Iconv support .......... $CFG_ICONV"
8262 echo "Glib support ........... $CFG_GLIB"
8263 echo "GStreamer support ...... $CFG_GSTREAMER"
8264 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8265 echo "Large File support ..... $CFG_LARGEFILE"
8266 echo "GIF support ............ $CFG_GIF"
8267 if [ "$CFG_TIFF" = "no" ]; then
8268 echo "TIFF support ........... $CFG_TIFF"
8270 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8272 if [ "$CFG_JPEG" = "no" ]; then
8273 echo "JPEG support ........... $CFG_JPEG"
8275 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8277 if [ "$CFG_PNG" = "no" ]; then
8278 echo "PNG support ............ $CFG_PNG"
8280 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8282 if [ "$CFG_MNG" = "no" ]; then
8283 echo "MNG support ............ $CFG_MNG"
8285 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8287 echo "zlib support ........... $CFG_ZLIB"
8288 echo "Session management ..... $CFG_SM"
8289 if [ "$PLATFORM_QWS" = "yes" ]; then
8290 echo "Embedded support ....... $CFG_EMBEDDED"
8291 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8292 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8294 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8296 # Normalize the decoration output first
8297 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8298 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8299 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8300 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8301 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8302 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8303 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8304 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8305 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8306 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8307 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8308 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8309 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8310 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8311 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8312 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8314 if [ "$CFG_OPENGL" = "desktop" ]; then
8315 echo "OpenGL support ......... yes (Desktop OpenGL)"
8316 elif [ "$CFG_OPENGL" = "es2" ]; then
8317 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8319 echo "OpenGL support ......... no"
8321 if [ "$CFG_EGL" != "no" ]; then
8322 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8323 echo "EGL support ............ yes <GLES/egl.h>"
8325 echo "EGL support ............ yes <EGL/egl.h>"
8328 if [ "$CFG_OPENVG" ]; then
8329 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8330 echo "OpenVG support ......... ShivaVG"
8332 echo "OpenVG support ......... $CFG_OPENVG"
8335 if [ "$PLATFORM_X11" = "yes" ]; then
8336 echo "NAS sound support ...... $CFG_NAS"
8337 echo "XShape support ......... $CFG_XSHAPE"
8338 echo "XVideo support ......... $CFG_XVIDEO"
8339 echo "XSync support .......... $CFG_XSYNC"
8340 echo "Xinerama support ....... $CFG_XINERAMA"
8341 echo "Xcursor support ........ $CFG_XCURSOR"
8342 echo "Xfixes support ......... $CFG_XFIXES"
8343 echo "Xrandr support ......... $CFG_XRANDR"
8344 echo "Xi support ............. $CFG_XINPUT"
8345 echo "MIT-SHM support ........ $CFG_MITSHM"
8346 echo "FontConfig support ..... $CFG_FONTCONFIG"
8347 echo "XKB Support ............ $CFG_XKB"
8348 echo "immodule support ....... $CFG_IM"
8349 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8351 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8352 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8353 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8354 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8355 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8356 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8357 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8358 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8359 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8362 if [ "$CFG_OPENSSL" = "yes" ]; then
8363 OPENSSL_LINKAGE="(run-time)"
8364 elif [ "$CFG_OPENSSL" = "linked" ]; then
8365 OPENSSL_LINKAGE="(linked)"
8367 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8368 echo "Alsa support ........... $CFG_ALSA"
8369 if [ "$PLATFORM_MAC" = "yes" ]; then
8370 echo "CoreWlan support ....... $CFG_COREWLAN"
8372 echo "ICD support ............ $CFG_ICD"
8373 echo "libICU support ......... $CFG_ICU"
8374 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8375 echo "Xcb support ............ limited (old version)"
8377 echo "Xcb support ............ $CFG_XCB"
8379 echo "Xrender support ........ $CFG_XRENDER"
8380 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8381 echo "XInput2 support ........ $CFG_XINPUT2"
8385 # complain about not being able to use dynamic plugins if we are using a static build
8386 if [ "$CFG_SHARED" = "no" ]; then
8388 echo "WARNING: Using static linking will disable the use of dynamically"
8389 echo "loaded plugins. Make sure to import all needed static plugins,"
8390 echo "or compile needed modules into the library."
8393 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8395 echo "NOTE: When linking against OpenSSL, you can override the default"
8396 echo "library names through OPENSSL_LIBS."
8398 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8401 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8403 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8404 echo "if you want a pure debug build."
8409 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8414 #-------------------------------------------------------------------------------
8415 # build makefiles based on the configuration
8416 #-------------------------------------------------------------------------------
8418 echo "Finding project files. Please wait..."
8419 if [ "$CFG_NOPROCESS" != "yes" ]; then
8420 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8421 if [ -f "${relpath}/qtbase.pro" ]; then
8422 mkfile="${outpath}/Makefile"
8423 [ -f "$mkfile" ] && chmod +w "$mkfile"
8424 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8428 # .projects -> projects to process
8429 # .projects.1 -> qt and moc
8430 # .projects.2 -> subdirs and libs
8431 # .projects.3 -> the rest
8432 rm -f .projects .projects.1 .projects.2 .projects.3
8434 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8435 if [ -z "$AWK" ]; then
8436 for p in `echo $QMAKE_PROJECTS`; do
8437 echo "$p" >> .projects
8440 cat >projects.awk <<EOF
8446 first = "./.projects.1.tmp"
8447 second = "./.projects.2.tmp"
8448 third = "./.projects.3.tmp"
8453 if ( ! target_file )
8455 print input_file >target_file
8460 input_file = FILENAME
8465 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8468 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8469 target_file = second
8474 matched_target == 0 && /^(TEMPLATE.*=)/ {
8475 if ( \$3 == "subdirs" )
8476 target_file = second
8477 else if ( \$3 == "lib" )
8483 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8484 if ( \$0 ~ /plugin/ )
8487 target_file = second
8492 if ( ! target_file )
8494 print input_file >>target_file
8501 for p in `echo $QMAKE_PROJECTS`; do
8502 echo "$p" >> .projects.all
8505 # if you get errors about the length of the command line to awk, change the -l arg
8507 split -l 100 .projects.all .projects.all.
8508 for p in .projects.all.*; do
8509 "$AWK" -f projects.awk `cat $p`
8510 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8511 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8512 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8513 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8515 rm -f .projects.all* projects.awk
8517 [ -f .projects.1 ] && cat .projects.1 >>.projects
8518 [ -f .projects.2 ] && cat .projects.2 >>.projects
8519 rm -f .projects.1 .projects.2
8520 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8521 cat .projects.3 >>.projects
8525 # don't sort Qt and MOC in with the other project files
8526 # also work around a segfaulting uniq(1)
8527 if [ -f .sorted.projects.2 ]; then
8528 sort .sorted.projects.2 > .sorted.projects.2.new
8529 mv -f .sorted.projects.2.new .sorted.projects.2
8530 cat .sorted.projects.2 >> .sorted.projects.1
8532 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8533 rm -f .sorted.projects.2 .sorted.projects.1
8537 if [ -f .projects ]; then
8538 uniq .projects >.tmp
8539 mv -f .tmp .projects
8540 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8542 if [ -f .projects.3 ]; then
8543 uniq .projects.3 >.tmp
8544 mv -f .tmp .projects.3
8545 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8547 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8551 for part in $CFG_BUILD_PARTS; do
8553 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8554 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8555 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8556 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8561 if [ "$CFG_DEV" = "yes" ]; then
8562 PART_ROOTS="$PART_ROOTS tests"
8565 echo "Creating makefiles. Please wait..."
8566 for file in .projects .projects.3; do
8567 [ '!' -f "$file" ] && continue
8568 for a in `cat $file`; do
8570 for r in $PART_ROOTS; do
8571 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8576 [ "$IN_ROOT" = "no" ] && continue
8579 *winmain/winmain.pro)
8580 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8584 *examples/activeqt/*) continue ;;
8585 */qmake/qmake.pro) continue ;;
8586 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8587 *tools/mkv8snapshot/*)
8588 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8594 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8600 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8601 test -d "$dir" || mkdir -p "$dir"
8602 OUTDIR="$outpath/$dir"
8603 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8604 # fast configure - the makefile exists, skip it
8605 # since the makefile exists, it was generated by qmake, which means we
8606 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8608 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8611 QMAKE_SPEC_ARGS="-spec $SPEC"
8612 echo $ECHO_N " for $a$ECHO_C"
8614 QMAKE="$outpath/bin/qmake"
8615 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8616 if [ "$file" = ".projects.3" ]; then
8619 cat >"${OUTDIR}/Makefile" <<EOF
8620 # ${OUTDIR}/Makefile: generated by configure
8622 # WARNING: This makefile will be replaced with a real makefile.
8623 # All changes made to this file will be lost.
8625 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8627 cat >>"${OUTDIR}/Makefile" <<EOF
8629 all clean install qmake first Makefile: FORCE
8630 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8638 if [ "$OPT_VERBOSE" = "yes" ]; then
8639 echo " (`basename $SPEC`)"
8640 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8645 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8646 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8650 rm -f .projects .projects.3
8652 #-------------------------------------------------------------------------------
8653 # check for platforms that we don't yet know about
8654 #-------------------------------------------------------------------------------
8655 if [ "$CFG_ARCH" = "generic" ]; then
8658 NOTICE: Atomic operations are not yet supported for this
8661 Qt will use the 'generic' architecture instead, which uses a
8662 single pthread_mutex_t to protect all atomic operations. This
8663 implementation is the slow (but safe) fallback implementation
8664 for architectures Qt does not yet support.
8668 #-------------------------------------------------------------------------------
8669 # check if the user passed the -no-zlib option, which is no longer supported
8670 #-------------------------------------------------------------------------------
8671 if [ -n "$ZLIB_FORCED" ]; then
8672 which_zlib="supplied"
8673 if [ "$CFG_ZLIB" = "system" ]; then
8679 NOTICE: The -no-zlib option was supplied but is no longer
8682 Qt now requires zlib support in all builds, so the -no-zlib
8683 option was ignored. Qt will be built using the $which_zlib
8688 #-------------------------------------------------------------------------------
8689 # finally save the executed command to another script
8690 #-------------------------------------------------------------------------------
8691 if [ `basename $0` != "config.status" ]; then
8692 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8694 # add the system variables
8695 for varname in $SYSTEM_VARIABLES; do
8697 'if [ -n "\$'${varname}'" ]; then
8698 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8703 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8705 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8706 echo "#!/bin/sh" > "$outpath/config.status"
8707 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8708 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8709 echo "else" >> "$outpath/config.status"
8710 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8711 echo "fi" >> "$outpath/config.status"
8712 chmod +x "$outpath/config.status"
8715 if [ -n "$RPATH_MESSAGE" ]; then
8717 echo "$RPATH_MESSAGE"
8720 MAKE=`basename "$MAKE"`
8722 echo Qt is now configured for building. Just run \'$MAKE\'.
8723 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8724 echo Once everything is built, Qt is installed.
8725 echo You should not run \'$MAKE install\'.
8727 echo Once everything is built, you must run \'$MAKE install\'.
8728 echo Qt will be installed into $QT_INSTALL_PREFIX
8731 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.