2 #############################################################################
4 ## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
5 ## All rights reserved.
6 ## Contact: Nokia Corporation (qt-info@nokia.com)
8 ## This file is the build configuration utility of the Qt Toolkit.
10 ## $QT_BEGIN_LICENSE:LGPL$
11 ## GNU Lesser General Public License Usage
12 ## This file may be used under the terms of the GNU Lesser General Public
13 ## License version 2.1 as published by the Free Software Foundation and
14 ## appearing in the file LICENSE.LGPL included in the packaging of this
15 ## file. Please review the following information to ensure the GNU Lesser
16 ## General Public License version 2.1 requirements will be met:
17 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ## In addition, as a special exception, Nokia gives you certain additional
20 ## rights. These rights are described in the Nokia Qt LGPL Exception
21 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
23 ## GNU General Public License Usage
24 ## Alternatively, this file may be used under the terms of the GNU General
25 ## Public License version 3.0 as published by the Free Software Foundation
26 ## and appearing in the file LICENSE.GPL included in the packaging of this
27 ## file. Please review the following information to ensure the GNU General
28 ## Public License version 3.0 requirements will be met:
29 ## http://www.gnu.org/copyleft/gpl.html.
32 ## Alternatively, this file may be used in accordance with the terms and
33 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 #-------------------------------------------------------------------------------
44 # script initialization
45 #-------------------------------------------------------------------------------
47 # the name of this script
49 # the directory of this script is the "source tree"
51 relpath=`(cd "$relpath"; /bin/pwd)`
52 # the current directory is the "build tree" or "object tree"
55 #license file location
56 LICENSE_FILE="$QT_LICENSE_FILE"
57 [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
58 if [ -f "$LICENSE_FILE" ]; then
59 tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
60 diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
63 # later cache the command line in config.status
64 OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
66 # initialize global variables
73 QMAKE_VARS_FILE=.qmake.vars
77 #-------------------------------------------------------------------------------
79 #-------------------------------------------------------------------------------
83 echo "$@" | sed 's/ /\ /g'
86 # Adds a new qmake variable to the cache
87 # Usage: QMakeVar mode varname contents
88 # where mode is one of: set, add, del
102 echo >&2 "BUG: wrong command to QMakeVar: $1"
106 echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
109 # Helper function for getQMakeConf. It parses include statements in
110 # qmake.conf and prints out the expanded file
113 while read line; do case "$line" in
115 inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
116 current_dir=`dirname "$1"`
117 conf_file="$current_dir/$inc_file"
118 if [ ! -f "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1 "$conf_file"
131 # relies on $QMAKESPEC being set correctly. parses include statements in
132 # qmake.conf and prints out the expanded file
139 getQMakeConf1 "$tmpSPEC/qmake.conf"
142 # relies on $TEST_COMPILER being set correctly
143 compilerSupportsFlag()
145 cat >conftest.cpp <<EOF
146 int main() { return 0; }
148 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
150 rm -f conftest.cpp conftest.o
154 # relies on $TEST_COMPILER being set correctly
160 safe_flag=`shellEscape "$flag"`
161 lflags=$lflags,$safe_flag
163 compilerSupportsFlag "$lflags" >/dev/null 2>&1
166 #-------------------------------------------------------------------------------
167 # operating system detection
168 #-------------------------------------------------------------------------------
170 # need that throughout the script
171 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
172 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
173 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
174 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
176 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
177 if echo '\c' | grep '\c' >/dev/null; then
183 #-------------------------------------------------------------------------------
184 # window system detection
185 #-------------------------------------------------------------------------------
192 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
196 #-----------------------------------------------------------------------------
197 # Qt version detection
198 #-----------------------------------------------------------------------------
199 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
203 if [ -n "$QT_VERSION" ]; then
204 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
205 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
206 if [ -n "$MAJOR" ]; then
207 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
208 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
209 QT_MAJOR_VERSION="$MAJOR"
210 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
211 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
214 if [ -z "$QT_MAJOR_VERSION" ]; then
215 echo "Cannot process version from qglobal.h: $QT_VERSION"
216 echo "Cannot proceed."
220 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
221 if [ -z "$QT_PACKAGEDATE" ]; then
222 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
223 echo "Cannot proceed"
227 #-------------------------------------------------------------------------------
229 #-------------------------------------------------------------------------------
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 if [ "$CFG_XCB" != "no" ]; then
6085 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
6087 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
6088 QT_CONFIG="$QT_CONFIG xcb-render"
6091 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
6093 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
6096 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
6097 QT_CONFIG="$QT_CONFIG xcb-xlib"
6100 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
6101 # auto-detect XInput2/Xinput support
6102 if [ "$CFG_XINPUT2" != "no" ]; then
6103 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
6107 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6108 echo "XInput2 support cannot be enabled due to functionality tests!"
6109 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6110 echo " If you believe this message is in error you may use the continue"
6111 echo " switch (-continue) to $0 to continue."
6120 if [ "$CFG_XCB" = "yes" ]; then
6121 echo "The XCB test failed!"
6122 echo " You might need to install dependency packages."
6123 echo " See src/plugins/platforms/xcb/README."
6127 QMakeVar add DEFINES QT_NO_XCB
6131 # Detect libxkbcommon
6132 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
6133 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
6134 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
6135 if [ "$CFG_WAYLAND" = "yes" ]; then
6136 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
6137 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
6139 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
6140 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
6142 if [ "$CFG_WAYLAND" = "yes" ]; then
6143 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
6145 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
6148 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6149 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
6150 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
6151 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
6152 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
6153 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
6154 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
6157 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
6158 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
6159 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
6160 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
6163 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
6164 QT_CONFIG="$QT_CONFIG coreservices"
6166 QMakeVar add DEFINES QT_NO_CORESERVICES
6169 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ]; then
6170 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
6171 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
6172 echo "No QPA platform plugin enabled!"
6173 echo " If you really want to build without a QPA platform plugin you must pass"
6174 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
6175 echo " cannot run GUI applications."
6185 if [ "$PLATFORM_QWS" = "yes" ]; then
6187 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
6188 if [ "$CFG_GUI" = "no" ]; then
6189 if [ "$CFG_OPENGL" = "auto" ]; then
6192 if [ "$CFG_OPENGL" != "no" ]; then
6193 echo "OpenGL enabled, but GUI disabled."
6194 echo " You might need to either enable the GUI or disable OpenGL"
6198 if [ "$CFG_OPENGL" = "yes" ]; then
6200 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
6203 elif [ "$CFG_OPENGL" = "es2" ]; then
6205 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
6206 if [ $? != "0" ]; then
6207 echo "The OpenGL ES 2.0 functionality test failed!"
6208 echo " You might need to modify the include and library search paths by editing"
6209 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
6210 echo " ${XQMAKESPEC}."
6214 elif [ "$CFG_OPENGL" = "desktop" ]; then
6215 # Desktop OpenGL support
6216 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
6221 if [ "$PLATFORM_QWS" = "yes" ]; then
6224 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
6225 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6226 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
6227 if [ $? != "0" ]; then
6228 echo "The Ahi screen driver functionality test failed!"
6229 echo " You might need to modify the include and library search paths by editing"
6230 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6231 echo " ${XQMAKESPEC}."
6236 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6237 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
6238 if [ $? != "0" ]; then
6239 echo "The SVGAlib screen driver functionality test failed!"
6240 echo " You might need to modify the include and library search paths by editing"
6241 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6242 echo " ${XQMAKESPEC}."
6247 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6248 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
6249 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
6250 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
6251 elif directfb-config --version >/dev/null 2>&1; then
6252 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
6253 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
6256 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
6257 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
6258 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
6259 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
6262 "$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
6263 if [ $? != "0" ]; then
6264 echo "The DirectFB screen driver functionality test failed!"
6265 echo " You might need to modify the include and library search paths by editing"
6266 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
6267 echo " ${XQMAKESPEC}."
6275 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
6276 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
6277 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
6278 if [ $? != "0" ]; then
6279 echo "The tslib functionality test failed!"
6280 echo " You might need to modify the include and library search paths by editing"
6281 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
6282 echo " ${XQMAKESPEC}."
6291 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
6292 if [ $? != "0" ]; then
6293 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
6300 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
6301 if [ "$CFG_EGL" != "no" ]; then
6302 # detect EGL support
6303 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
6304 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
6309 if [ "$EGL_VARIANT" = "none" ]; then
6310 if [ "$CFG_EGL" = "yes" ]; then
6311 echo "The EGL functionality test failed!"
6312 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
6313 echo " You might need to modify the include and library search paths by editing"
6314 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
6315 echo " ${XQMAKESPEC}."
6319 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
6320 if [ "$CFG_OPENGL" = "es2" ]; then
6327 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
6330 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
6331 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
6332 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
6333 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
6334 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
6335 CFG_LIBFREETYPE=system
6341 if [ "$CFG_ENDIAN" = "auto" ]; then
6342 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6343 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6344 elif [ "$PLATFORM_MAC" = "yes" ]; then
6347 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6349 if [ "$F" -eq 0 ]; then
6350 CFG_ENDIAN="Q_LITTLE_ENDIAN"
6351 elif [ "$F" -eq 1 ]; then
6352 CFG_ENDIAN="Q_BIG_ENDIAN"
6355 echo "The target system byte order could not be detected!"
6356 echo "Turn on verbose messaging (-v) to see the final report."
6357 echo "You can use the -little-endian or -big-endian switch to"
6358 echo "$0 to continue."
6364 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6365 if [ "$PLATFORM_MAC" = "yes" ]; then
6368 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6370 if [ "$F" -eq 0 ]; then
6371 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
6372 elif [ "$F" -eq 1 ]; then
6373 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
6376 echo "The host system byte order could not be detected!"
6377 echo "Turn on verbose messaging (-v) to see the final report."
6378 echo "You can use the -host-little-endian or -host-big-endian switch to"
6379 echo "$0 to continue."
6385 if [ "$CFG_ARMFPA" != "auto" ]; then
6386 if [ "$CFG_ARMFPA" = "yes" ]; then
6387 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6388 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6390 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6393 CFG_DOUBLEFORMAT="normal"
6398 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6399 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6400 CFG_DOUBLEFORMAT=normal
6402 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6404 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6405 CFG_DOUBLEFORMAT=normal
6406 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6407 CFG_DOUBLEFORMAT=normal
6408 elif [ "$F" -eq 10 ]; then
6409 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6410 elif [ "$F" -eq 11 ]; then
6411 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6412 elif [ "$F" -eq 12 ]; then
6413 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6415 elif [ "$F" -eq 13 ]; then
6416 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6420 echo "The system floating point format could not be detected."
6421 echo "This may cause data to be generated in a wrong format"
6422 echo "Turn on verbose messaging (-v) to see the final report."
6423 # we do not fail on this since this is a new test, and if it fails,
6424 # the old behavior should be correct in most cases
6425 CFG_DOUBLEFORMAT=normal
6431 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6435 if [ "$CFG_STL" != "no" ]; then
6436 if [ "$HAVE_STL" = "yes" ]; then
6439 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6440 echo "STL support cannot be enabled due to functionality tests!"
6441 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6442 echo " If you believe this message is in error you may use the continue"
6443 echo " switch (-continue) to $0 to continue."
6451 # detect POSIX clock_gettime()
6452 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6453 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
6454 CFG_CLOCK_GETTIME=yes
6456 CFG_CLOCK_GETTIME=no
6460 # detect POSIX monotonic clocks
6461 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6462 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
6463 CFG_CLOCK_MONOTONIC=yes
6465 CFG_CLOCK_MONOTONIC=no
6467 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6468 CFG_CLOCK_MONOTONIC=no
6472 if [ "$CFG_MREMAP" = "auto" ]; then
6473 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6480 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6481 if [ "$CFG_GETADDRINFO" != "no" ]; then
6482 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6485 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6486 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6487 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6488 echo " If you believe this message is in error you may use the continue"
6489 echo " switch (-continue) to $0 to continue."
6497 # find if the platform provides inotify
6498 if [ "$CFG_INOTIFY" != "no" ]; then
6499 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6502 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6503 echo "inotify support cannot be enabled due to functionality tests!"
6504 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6505 echo " If you believe this message is in error you may use the continue"
6506 echo " switch (-continue) to $0 to continue."
6514 # find if the platform provides if_nametoindex (ipv6 interface name support)
6515 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6516 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
6519 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6520 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6521 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6522 echo " If you believe this message is in error you may use the continue"
6523 echo " switch (-continue) to $0 to continue."
6531 # find if the platform provides getifaddrs (network interface enumeration)
6532 if [ "$CFG_GETIFADDRS" != "no" ]; then
6533 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6536 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6537 echo "getifaddrs support cannot be enabled due to functionality tests!"
6538 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6539 echo " If you believe this message is in error you may use the continue"
6540 echo " switch (-continue) to $0 to continue."
6549 if [ "$CFG_OPENSSL" != "no" ]; then
6550 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
6551 if [ "$CFG_OPENSSL" = "auto" ]; then
6555 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6556 echo "OpenSSL support cannot be enabled due to functionality tests!"
6557 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6558 echo " If you believe this message is in error you may use the continue"
6559 echo " switch (-continue) to $0 to continue."
6567 # detect OpenVG support
6568 if [ "$CFG_OPENVG" != "no" ]; then
6569 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
6570 if [ "$CFG_OPENVG" = "auto" ]; then
6573 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
6574 if [ "$CFG_OPENVG" = "auto" ]; then
6577 CFG_OPENVG_ON_OPENGL=yes
6578 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
6579 if [ "$CFG_OPENVG" = "auto" ]; then
6582 CFG_OPENVG_LC_INCLUDES=yes
6583 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
6584 if [ "$CFG_OPENVG" = "auto" ]; then
6587 CFG_OPENVG_LC_INCLUDES=yes
6588 CFG_OPENVG_ON_OPENGL=yes
6590 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6591 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6592 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6593 echo " If you believe this message is in error you may use the continue"
6594 echo " switch (-continue) to $0 to continue."
6600 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
6601 CFG_OPENVG_SHIVA=yes
6605 if [ "$CFG_ALSA" = "auto" ]; then
6606 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6613 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6614 if [ "$CFG_ARCH" = "arm" ]; then
6615 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6616 if [ $? != "0" ]; then
6617 CFG_JAVASCRIPTCORE_JIT=no
6620 case "$XPLATFORM" in
6622 CFG_JAVASCRIPTCORE_JIT=no
6628 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6629 QMakeVar set JAVASCRIPTCORE_JIT yes
6630 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6631 QMakeVar set JAVASCRIPTCORE_JIT no
6634 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6635 CFG_AUDIO_BACKEND=yes
6638 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6639 echo "Warning: largefile support cannot be disabled for win32."
6643 #-------------------------------------------------------------------------------
6644 # ask for all that hasn't been auto-detected or specified in the arguments
6645 #-------------------------------------------------------------------------------
6647 ### fix this: user input should be validated in a loop
6648 if [ "$PLATFORM_QWS" = "yes" ]; then
6649 PROMPT_FOR_DEPTHS="yes"
6651 PROMPT_FOR_DEPTHS="no"
6653 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6655 echo "Choose pixel-depths to support:"
6657 echo " 1. 1bpp, black/white"
6658 echo " 4. 4bpp, grayscale"
6659 echo " 8. 8bpp, paletted"
6660 echo " 12. 12bpp, rgb 4-4-4"
6661 echo " 15. 15bpp, rgb 5-5-5"
6662 echo " 16. 16bpp, rgb 5-6-5"
6663 echo " 18. 18bpp, rgb 6-6-6"
6664 echo " 24. 24bpp, rgb 8-8-8"
6665 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6666 echo " all. All supported depths"
6668 echo "Your choices (default 8,16,32):"
6670 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6671 CFG_QWS_DEPTHS=8,16,32
6674 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6675 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6676 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6678 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6680 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6681 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6686 # enable dwarf2 support on Mac
6687 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6688 QT_CONFIG="$QT_CONFIG dwarf2"
6691 # Set the default arch if there are no "-arch" arguments on the configure line
6692 # For "-carbon" builds: 32 bit x86/ppc.
6693 # For builds on snow leopard : compiler default (64-bit).
6694 # For builds on leopard : compiler default (32-bit).
6695 if [ "$CFG_ARCH" = "macosx" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6696 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6698 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6699 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
6700 CFG_MAC_ARCHS=" x86"
6701 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
6702 CFG_MAC_ARCHS=" ppc"
6704 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6707 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6710 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6713 # enable Cocoa and/or Carbon on Mac
6714 # -carbon on the command line disables Cocoa, except for 64-bit archs
6715 if [ "$CFG_MAC_CARBON" = "yes" ]; then
6716 CFG_MAC_CARBON="YES"
6719 # check which archs are in use, enable cocoa if we find a 64-bit one
6720 if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
6721 CFG_MAC_COCOA="yes";
6722 CFG_MAC_CARBON="no";
6723 if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
6724 CFG_MAC_CARBON="yes";
6726 if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
6727 CFG_MAC_CARBON="yes";
6732 # select Carbon on 10.4 Tiger.
6733 if [ "$PLATFORM_MAC" = "yes" ]; then
6734 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
6735 if [ "$VERSION" == 8 ]; then
6737 CFG_MAC_CARBON="yes";
6741 # select Carbon when using the 10.4u SDK
6742 if [ "$PLATFORM_MAC" = "yes" ]; then
6743 if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
6746 CFG_MAC_CARBON="yes";
6750 # but disable Cocoa if cross-building for mingw
6751 [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
6754 if [ "$CFG_PHONON" = "yes" ]; then
6755 # No longer needed after modularization
6756 #QT_CONFIG="$QT_CONFIG phonon"
6757 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6758 QT_CONFIG="$QT_CONFIG phonon-backend"
6761 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
6764 # disable accessibility
6765 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6766 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6768 QT_CONFIG="$QT_CONFIG accessibility"
6771 # egl stuff does not belong in lighthouse, but rather in plugins
6772 if [ "$PLATFORM_QPA" = "yes" ]; then
6777 if [ "$CFG_EGL" = "no" ]; then
6778 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6780 QT_CONFIG="$QT_CONFIG egl"
6781 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6782 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6787 if [ "$CFG_OPENVG" = "no" ]; then
6788 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6790 QT_CONFIG="$QT_CONFIG openvg"
6791 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6792 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6794 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6795 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6797 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6798 QT_CONFIG="$QT_CONFIG shivavg"
6799 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6804 if [ "$CFG_OPENGL" = "no" ]; then
6805 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6807 QT_CONFIG="$QT_CONFIG opengl"
6810 if [ "$CFG_OPENGL" = "es2" ]; then
6811 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6814 if [ "$CFG_OPENGL" = "es2" ]; then
6815 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6816 QT_CONFIG="$QT_CONFIG opengles2"
6819 # safe execution environment
6820 if [ "$CFG_SXE" != "no" ]; then
6821 QT_CONFIG="$QT_CONFIG sxe"
6824 # build up the variables for output
6825 if [ "$CFG_DEBUG" = "yes" ]; then
6826 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6827 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6828 elif [ "$CFG_DEBUG" = "no" ]; then
6829 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6830 QMAKE_CONFIG="$QMAKE_CONFIG release"
6832 if [ "$CFG_SHARED" = "yes" ]; then
6833 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6834 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6835 elif [ "$CFG_SHARED" = "no" ]; then
6836 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6837 QMAKE_CONFIG="$QMAKE_CONFIG static"
6839 if [ "$PLATFORM_QWS" = "yes" ]; then
6840 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6841 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6842 QT_CONFIG="$QT_CONFIG embedded"
6843 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6845 if [ "$PLATFORM_QPA" = "yes" ]; then
6846 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6847 QT_CONFIG="$QT_CONFIG qpa"
6848 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6849 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6852 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6853 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6854 QT_CONFIG="$QT_CONFIG nacl pepper"
6855 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6858 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6859 # Do not set this here for Windows. Let qmake do it so
6860 # debug and release precompiled headers are kept separate.
6861 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6863 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6864 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6865 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6866 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6867 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6868 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6870 if [ "$CFG_STL" = "no" ]; then
6871 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6873 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6875 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6876 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6878 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6879 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6880 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6881 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6882 QMakeVar add QMAKE_CFLAGS -g
6883 QMakeVar add QMAKE_CXXFLAGS -g
6884 QT_CONFIG="$QT_CONFIG separate_debug_info"
6886 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6887 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6889 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6890 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6891 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6892 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6893 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6894 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6895 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6896 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6897 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6898 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6899 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6900 [ "$CFG_ARCH" = "macosx" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6901 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6902 QT_CONFIG="$QT_CONFIG clock-gettime"
6904 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6905 QT_CONFIG="$QT_CONFIG clock-monotonic"
6907 if [ "$CFG_MREMAP" = "yes" ]; then
6908 QT_CONFIG="$QT_CONFIG mremap"
6910 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6911 QT_CONFIG="$QT_CONFIG getaddrinfo"
6913 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6914 QT_CONFIG="$QT_CONFIG ipv6ifname"
6916 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6917 QT_CONFIG="$QT_CONFIG getifaddrs"
6919 if [ "$CFG_INOTIFY" = "yes" ]; then
6920 QT_CONFIG="$QT_CONFIG inotify"
6922 if [ "$CFG_LIBJPEG" = "no" ]; then
6924 elif [ "$CFG_LIBJPEG" = "system" ]; then
6925 QT_CONFIG="$QT_CONFIG system-jpeg"
6927 if [ "$CFG_JPEG" = "no" ]; then
6928 QT_CONFIG="$QT_CONFIG no-jpeg"
6929 elif [ "$CFG_JPEG" = "yes" ]; then
6930 QT_CONFIG="$QT_CONFIG jpeg"
6932 if [ "$CFG_LIBMNG" = "no" ]; then
6934 elif [ "$CFG_LIBMNG" = "system" ]; then
6935 QT_CONFIG="$QT_CONFIG system-mng"
6937 if [ "$CFG_MNG" = "no" ]; then
6938 QT_CONFIG="$QT_CONFIG no-mng"
6939 elif [ "$CFG_MNG" = "yes" ]; then
6940 QT_CONFIG="$QT_CONFIG mng"
6942 if [ "$CFG_LIBPNG" = "no" ]; then
6945 if [ "$CFG_LIBPNG" = "system" ]; then
6946 QT_CONFIG="$QT_CONFIG system-png"
6948 if [ "$CFG_PNG" = "no" ]; then
6949 QT_CONFIG="$QT_CONFIG no-png"
6950 elif [ "$CFG_PNG" = "yes" ]; then
6951 QT_CONFIG="$QT_CONFIG png"
6953 if [ "$CFG_GIF" = "no" ]; then
6954 QT_CONFIG="$QT_CONFIG no-gif"
6955 elif [ "$CFG_GIF" = "yes" ]; then
6956 QT_CONFIG="$QT_CONFIG gif"
6958 if [ "$CFG_LIBTIFF" = "no" ]; then
6960 elif [ "$CFG_LIBTIFF" = "system" ]; then
6961 QT_CONFIG="$QT_CONFIG system-tiff"
6963 if [ "$CFG_TIFF" = "no" ]; then
6964 QT_CONFIG="$QT_CONFIG no-tiff"
6965 elif [ "$CFG_TIFF" = "yes" ]; then
6966 QT_CONFIG="$QT_CONFIG tiff"
6968 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6969 QT_CONFIG="$QT_CONFIG no-freetype"
6970 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6971 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6972 QT_CONFIG="$QT_CONFIG system-freetype"
6974 QT_CONFIG="$QT_CONFIG freetype"
6976 if [ "$CFG_GUI" = "auto" ]; then
6979 if [ "$CFG_GUI" = "no" ]; then
6980 QT_CONFIG="$QT_CONFIG no-gui"
6982 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6986 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6987 #On Mac we implicitly link against libz, so we
6988 #never use the 3rdparty stuff.
6989 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6991 if [ "$CFG_ZLIB" = "yes" ]; then
6992 QT_CONFIG="$QT_CONFIG zlib"
6993 elif [ "$CFG_ZLIB" = "system" ]; then
6994 QT_CONFIG="$QT_CONFIG system-zlib"
6997 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6998 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6999 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
7000 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
7001 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
7002 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
7003 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
7004 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
7005 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
7006 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
7007 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
7008 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
7009 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
7010 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
7011 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
7013 if [ "$PLATFORM_X11" = "yes" ]; then
7014 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
7016 # for some reason, the following libraries are not always built shared,
7017 # so *every* program/lib (including Qt) has to link against them
7018 if [ "$CFG_XSHAPE" = "yes" ]; then
7019 QT_CONFIG="$QT_CONFIG xshape"
7021 if [ "$CFG_XVIDEO" = "yes" ]; then
7022 QT_CONFIG="$QT_CONFIG xvideo"
7024 if [ "$CFG_XSYNC" = "yes" ]; then
7025 QT_CONFIG="$QT_CONFIG xsync"
7027 if [ "$CFG_XINERAMA" = "yes" ]; then
7028 QT_CONFIG="$QT_CONFIG xinerama"
7029 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
7031 if [ "$CFG_XCURSOR" = "yes" ]; then
7032 QT_CONFIG="$QT_CONFIG xcursor"
7033 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
7035 if [ "$CFG_XFIXES" = "yes" ]; then
7036 QT_CONFIG="$QT_CONFIG xfixes"
7037 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
7039 if [ "$CFG_XRANDR" = "yes" ]; then
7040 QT_CONFIG="$QT_CONFIG xrandr"
7041 if [ "$CFG_XRENDER" != "yes" ]; then
7042 # libXrandr uses 1 function from libXrender, so we always have to have it :/
7043 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
7045 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
7048 if [ "$CFG_XRENDER" = "yes" ]; then
7049 QT_CONFIG="$QT_CONFIG xrender"
7050 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
7052 if [ "$CFG_MITSHM" = "yes" ]; then
7053 QT_CONFIG="$QT_CONFIG mitshm"
7055 if [ "$CFG_FONTCONFIG" = "yes" ]; then
7056 QT_CONFIG="$QT_CONFIG fontconfig"
7058 if [ "$CFG_XINPUT" = "yes" ]; then
7059 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
7061 if [ "$CFG_XINPUT" = "yes" ]; then
7062 QT_CONFIG="$QT_CONFIG xinput tablet"
7064 if [ "$CFG_XKB" = "yes" ]; then
7065 QT_CONFIG="$QT_CONFIG xkb"
7069 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
7070 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
7071 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
7073 if [ "$CFG_ARCH" = "macosx" ]; then
7074 if [ "$CFG_RPATH" = "yes" ]; then
7075 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
7077 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
7078 if [ -n "$RPATH_FLAGS" ]; then
7080 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
7084 elif [ "$CFG_RPATH" = "yes" ]; then
7085 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
7089 if [ "$CFG_RPATH" = "yes" ]; then
7090 # set the default rpath to the library installation directory
7091 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
7093 if [ -n "$RPATH_FLAGS" ]; then
7094 # add the user defined rpaths
7095 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
7099 if [ '!' -z "$I_FLAGS" ]; then
7100 # add the user define include paths
7101 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
7102 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
7105 if [ '!' -z "$W_FLAGS" ]; then
7106 # add the user defined warning flags
7107 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
7108 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
7109 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
7112 # turn off exceptions for the compilers that support it
7113 if [ "$PLATFORM_QWS" = "yes" ]; then
7114 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
7115 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
7116 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
7118 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
7120 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
7124 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7125 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
7128 if [ "$XPLATFORM_MINGW" = "yes" ]; then
7129 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
7130 # Follow default behavior of configure.exe by overriding with "rtti".
7131 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
7134 if [ "$CFG_ALSA" = "yes" ]; then
7135 QT_CONFIG="$QT_CONFIG alsa"
7138 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
7139 QT_CONFIG="$QT_CONFIG pulseaudio"
7142 if [ "$CFG_COREWLAN" = "yes" ]; then
7143 QT_CONFIG="$QT_CONFIG corewlan"
7146 if [ "$CFG_ICD" = "yes" ]; then
7147 QT_CONFIG="$QT_CONFIG icd"
7150 if [ "$CFG_ICU" = "yes" ]; then
7151 QT_CONFIG="$QT_CONFIG icu"
7154 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
7155 QT_CONFIG="$QT_CONFIG force_asserts"
7159 # Some Qt modules are too advanced in C++ for some old compilers
7160 # Detect here the platforms where they are known to work.
7162 # See Qt documentation for more information on which features are
7163 # supported and on which compilers.
7165 canBuildQtXmlPatterns="yes"
7166 canBuildWebKit="$HAVE_STL"
7167 canBuildQtConcurrent="yes"
7169 canUseV8Snapshot="yes"
7171 # WebKit requires stdint.h
7172 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
7173 if [ $? != "0" ]; then
7177 case "$XPLATFORM" in
7179 # PA-RISC's assembly is too limited
7180 # gcc 3.4 on that platform can't build QtXmlPatterns
7181 # the assembly it generates cannot be compiled
7183 # Check gcc's version
7184 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7188 canBuildQtXmlPatterns="no"
7192 canBuildQtXmlPatterns="no"
7196 unsupported/vxworks-*-g++*)
7199 unsupported/vxworks-*-dcc*)
7201 canBuildQtXmlPatterns="no"
7204 # Check gcc's version
7205 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
7213 canBuildQtXmlPatterns="no"
7218 # Check the compiler version
7219 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
7222 canBuildQtXmlPatterns="no"
7223 canBuildQtConcurrent="no"
7227 canBuildQtConcurrent="no"
7233 canBuildQtXmlPatterns="no"
7234 canBuildQtConcurrent="no"
7240 # Get the xlC version
7241 cat > xlcver.c <<EOF
7245 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
7250 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
7251 xlcver=`./xlcver 2>/dev/null`
7254 if [ "$OPT_VERBOSE" = "yes" ]; then
7255 if [ -n "$xlcver" ]; then
7256 echo Found IBM xlC version: $xlcver.
7258 echo Could not determine IBM xlC version, assuming oldest supported.
7265 canBuildQtXmlPatterns="no"
7266 canBuildQtConcurrent="no"
7270 canBuildQtConcurrent="no"
7276 canBuildQtConcurrent="no"
7280 if [ "$CFG_GUI" = "no" ]; then
7281 # WebKit requires QtGui
7285 if [ "$CFG_SHARED" = "no" ]; then
7287 echo "WARNING: Using static linking will disable the WebKit module."
7292 CFG_CONCURRENT="yes"
7293 if [ "$canBuildQtConcurrent" = "no" ]; then
7294 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
7297 QT_CONFIG="$QT_CONFIG concurrent"
7300 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
7301 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
7304 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
7305 CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
7306 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
7307 CFG_XMLPATTERNS="no"
7309 # No longer needed after modularization
7310 #if [ "$CFG_XMLPATTERNS" = "yes" ]; then
7311 # QT_CONFIG="$QT_CONFIG xmlpatterns"
7313 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
7316 # No longer needed after modularization
7317 #if [ "$CFG_MULTIMEDIA" = "no" ]; then
7318 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
7320 # QT_CONFIG="$QT_CONFIG multimedia"
7323 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
7324 QT_CONFIG="$QT_CONFIG audio-backend"
7327 if [ "$CFG_SVG" = "auto" ]; then
7331 if [ "$CFG_SVG" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7332 echo "QtSvg requested, but it can't be built without QtGui"
7336 if [ "$CFG_SVG" = "yes" ]; then
7337 QT_CONFIG="$QT_CONFIG svg"
7339 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
7342 if [ "$CFG_WEBKIT" != "no" ]; then
7343 CFG_WEBKIT="$canBuildWebKit"
7346 if [ "$CFG_WEBKIT" != "no" ]; then
7347 # No longer needed after modularization
7348 #QT_CONFIG="$QT_CONFIG webkit"
7349 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
7350 if [ "$CFG_WEBKIT" = "debug" ]; then
7351 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
7355 if [ "$CFG_SCRIPT" = "auto" ]; then
7359 # No longer needed after modularization
7360 #if [ "$CFG_SCRIPT" = "yes" ]; then
7361 # QT_CONFIG="$QT_CONFIG script"
7363 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT"
7366 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
7367 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
7370 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
7371 CFG_SCRIPTTOOLS="yes"
7372 elif [ "$CFG_SCRIPT" = "no" ]; then
7373 CFG_SCRIPTTOOLS="no"
7376 # No longer needed after modularization
7377 #if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
7378 # QT_CONFIG="$QT_CONFIG scripttools"
7380 # QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
7385 i386|x86_64|arm|mips|macosx) ;;
7386 *) canBuildV8="no";;
7389 if [ "$CFG_V8" = "yes" -a "$canBuildV8" = "no" ]; then
7390 echo "Error: V8 was requested, but is not supported on this platform."
7394 if [ "$CFG_V8" = "auto" ]; then
7395 CFG_V8="$canBuildV8"
7398 if [ "$CFG_V8" = "no" ]; then
7399 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_V8"
7401 QT_CONFIG="$QT_CONFIG v8"
7402 # Detect snapshot support
7403 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7404 case "$CFG_HOST_ARCH,$CFG_ARCH" in
7407 *) canUseV8Snapshot="no"
7411 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
7412 CFG_V8SNAPSHOT="$canUseV8Snapshot"
7414 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
7415 echo "Error: V8 snapshot was requested, but is not supported on this platform."
7418 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
7419 QT_CONFIG="$QT_CONFIG v8snapshot"
7423 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7424 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7425 echo "Error: QtDeclarative was requested, but it can't be built due to QtV8 or QtGui being disabled."
7429 if [ "$CFG_DECLARATIVE" = "auto" ]; then
7430 if [ "$CFG_V8" = "no" -o "$CFG_GUI" = "no" ]; then
7437 if [ "$CFG_DECLARATIVE" = "yes" ]; then
7438 # No longer needed after modularization
7439 #QT_CONFIG="$QT_CONFIG declarative"
7440 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
7441 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
7444 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
7447 if [ "$CFG_LOCATION" = "auto" ]; then
7448 CFG_LOCATION="$CFG_GUI"
7451 if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then
7452 echo "QtLocation requested, but it can't be built without QtGui"
7456 #Disable QtLocation until ready
7459 if [ "$CFG_LOCATION" = "no" ]; then
7460 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION"
7463 if [ "$CFG_EXCEPTIONS" = "no" ]; then
7466 QMakeVar add QMAKE_CFLAGS -fno-exceptions
7467 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
7468 QMakeVar add QMAKE_LFLAGS -fno-exceptions
7473 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
7474 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
7475 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
7482 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
7485 # On Mac, set the minimum deployment target for the different architechtures
7486 # using the Xarch compiler option when supported (10.5 and up).
7487 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
7488 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
7489 QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7490 QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7491 QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
7492 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
7494 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
7495 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7496 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7497 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
7498 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
7500 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
7501 QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7502 QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7503 QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
7504 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
7506 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
7507 QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7508 QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7509 QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
7510 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
7517 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
7519 case "$COMPILER_VERSION" in
7521 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
7522 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
7523 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
7526 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
7527 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
7528 QT_GCC_PATCH_VERSION=0
7538 #-------------------------------------------------------------------------------
7539 # part of configuration information goes into qconfig.h
7540 #-------------------------------------------------------------------------------
7542 case "$CFG_QCONFIG" in
7544 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
7547 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
7548 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
7549 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
7550 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
7551 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
7552 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
7554 echo "#endif" >>"$tmpconfig"
7558 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7562 # define QT_EDITION $QT_EDITION
7565 /* Machine byte-order */
7566 #define Q_BIG_ENDIAN 4321
7567 #define Q_LITTLE_ENDIAN 1234
7570 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
7571 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
7572 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7573 #if defined(__BIG_ENDIAN__)
7574 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7575 #elif defined(__LITTLE_ENDIAN__)
7576 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7578 # error "Unable to determine byte order!"
7582 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7584 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
7585 if [ "$CFG_ENDIAN" = "auto" ]; then
7586 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7587 #if defined(__BIG_ENDIAN__)
7588 # define Q_BYTE_ORDER Q_BIG_ENDIAN
7589 #elif defined(__LITTLE_ENDIAN__)
7590 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
7592 # error "Unable to determine byte order!"
7596 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7598 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7600 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7601 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7602 /* Non-IEEE double format */
7603 #define Q_DOUBLE_LITTLE "01234567"
7604 #define Q_DOUBLE_BIG "76543210"
7605 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7606 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7607 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7610 if [ "$CFG_ARMFPA" = "yes" ]; then
7611 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7612 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7613 #ifndef QT_BOOTSTRAPPED
7618 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7622 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7623 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7624 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7625 /* Machine Architecture */
7626 #ifndef QT_BOOTSTRAPPED
7627 # define QT_ARCH_${CFG_ARCH_STR}
7629 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7633 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7634 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7636 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7637 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7640 # if both carbon and cocoa are specified, enable the autodetection code.
7641 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
7642 echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7643 elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
7644 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
7647 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7648 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7651 if [ "$PLATFORM_MAC" = "yes" ]; then
7652 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7653 #if defined(__LP64__)
7654 # define QT_POINTER_SIZE 8
7656 # define QT_POINTER_SIZE 4
7660 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7661 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7665 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7667 if [ "$CFG_DEV" = "yes" ]; then
7668 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7671 # Embedded compile time options
7672 if [ "$PLATFORM_QWS" = "yes" ]; then
7673 # Add QWS to config.h
7674 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7676 # Add excluded decorations to $QCONFIG_FLAGS
7677 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7678 for decor in $decors; do
7679 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7680 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7683 # Figure which embedded drivers which are turned off
7684 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7685 for ADRIVER in $CFG_GFX_ON; do
7686 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7689 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7690 # the um driver is currently not in the available list for external builds
7691 if [ "$CFG_DEV" = "no" ]; then
7692 CFG_KBD_OFF="$CFG_KBD_OFF um"
7694 for ADRIVER in $CFG_KBD_ON; do
7695 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7698 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7699 for ADRIVER in $CFG_MOUSE_ON; do
7700 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7703 for DRIVER in $CFG_GFX_OFF; do
7704 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7705 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7708 for DRIVER in $CFG_KBD_OFF; do
7709 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7710 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7713 for DRIVER in $CFG_MOUSE_OFF; do
7714 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7715 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7719 if [ "$PLATFORM_QPA" = "yes" ]; then
7720 # Add QPA to config.h
7721 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7724 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7725 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7728 # Add turned on SQL drivers
7729 for DRIVER in $CFG_SQL_AVAILABLE; do
7730 eval "VAL=\$CFG_SQL_$DRIVER"
7733 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7734 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7735 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7738 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7744 QMakeVar set sql-drivers "$SQL_DRIVERS"
7745 QMakeVar set sql-plugins "$SQL_PLUGINS"
7747 # Add other configuration options to the qconfig.h file
7748 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7749 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7750 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7751 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7752 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7753 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7754 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7755 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7756 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7758 # ATM we need this define to compile Qt. Remove later!
7759 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
7761 # X11/Unix/Mac only configs
7762 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7763 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7764 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7765 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7766 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7767 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7768 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7769 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7770 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7771 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7772 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7773 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7774 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7775 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
7776 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7778 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7779 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7780 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7781 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7782 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7783 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7784 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7785 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7786 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7787 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7788 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7789 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7790 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7792 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7793 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7794 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7795 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7796 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7797 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7798 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7799 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7800 [ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
7802 # sort QCONFIG_FLAGS for neatness if we can
7803 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7804 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7806 if [ -n "$QCONFIG_FLAGS" ]; then
7807 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7808 #ifndef QT_BOOTSTRAPPED
7811 for cfg in $QCONFIG_FLAGS; do
7812 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7813 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7814 # figure out define logic, so we can output the correct
7815 # ifdefs to override the global defines in a project
7817 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7818 # QT_NO_option can be forcefully turned on by QT_option
7819 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7820 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7821 # QT_option can be forcefully turned off by QT_NO_option
7822 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7825 if [ -z $cfgdNeg ]; then
7826 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7833 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7834 #if defined($cfgd) && defined($cfgdNeg)
7836 #elif !defined($cfgd) && !defined($cfgdNeg)
7843 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7844 #endif // QT_BOOTSTRAPPED
7849 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7850 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7851 #define QT_VISIBILITY_AVAILABLE
7856 if [ -n "$QT_LIBINFIX" ]; then
7857 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7858 #define QT_LIBINFIX "$QT_LIBINFIX"
7863 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7864 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7865 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7867 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7868 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7869 chmod -w "$outpath/src/corelib/global/qconfig.h"
7870 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7871 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7875 #-------------------------------------------------------------------------------
7876 # save configuration into qconfig.pri
7877 #-------------------------------------------------------------------------------
7878 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7879 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7880 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7881 if [ "$CFG_DEBUG" = "yes" ]; then
7882 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7883 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7884 QT_CONFIG="$QT_CONFIG release"
7886 QT_CONFIG="$QT_CONFIG debug"
7887 elif [ "$CFG_DEBUG" = "no" ]; then
7888 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7889 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7890 QT_CONFIG="$QT_CONFIG debug"
7892 QT_CONFIG="$QT_CONFIG release"
7894 if [ "$CFG_STL" = "yes" ]; then
7895 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7897 if [ "$CFG_FRAMEWORK" = "no" ]; then
7898 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7900 QT_CONFIG="$QT_CONFIG qt_framework"
7901 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7903 if [ "$PLATFORM_MAC" = "yes" ]; then
7904 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7906 if [ "$CFG_DEV" = "yes" ]; then
7907 QT_CONFIG="$QT_CONFIG private_tests"
7910 # Make the application arch follow the Qt arch for single arch builds.
7911 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7912 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7913 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7916 cat >>"$QTCONFIG.tmp" <<EOF
7918 CONFIG += $QTCONFIG_CONFIG
7920 QT_EDITION = $Edition
7921 QT_CONFIG += $QT_CONFIG
7924 QT_VERSION = $QT_VERSION
7925 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7926 QT_MINOR_VERSION = $QT_MINOR_VERSION
7927 QT_PATCH_VERSION = $QT_PATCH_VERSION
7930 QT_LIBINFIX = $QT_LIBINFIX
7931 QT_NAMESPACE = $QT_NAMESPACE
7932 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7935 if [ -n "$CFG_SYSROOT" ]; then
7936 echo "# sysroot" >>"$QTCONFIG.tmp"
7937 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7938 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7939 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7940 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7941 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7942 echo "}" >> "$QTCONFIG.tmp"
7943 echo >> "$QTCONFIG.tmp"
7945 if [ "$CFG_RPATH" = "yes" ]; then
7946 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7948 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7949 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7950 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7951 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7954 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7955 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7956 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7959 # replace qconfig.pri if it differs from the newly created temp file
7960 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7961 rm -f "$QTCONFIG.tmp"
7963 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7966 #-------------------------------------------------------------------------------
7967 # save configuration into qmodule.pri
7968 #-------------------------------------------------------------------------------
7969 QTMODULE="$outpath/mkspecs/qmodule.pri"
7971 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7973 # Ensure we can link to uninistalled libraries
7974 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7975 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7977 if [ -n "$QT_CFLAGS_PSQL" ]; then
7978 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7980 if [ -n "$QT_LFLAGS_PSQL" ]; then
7981 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7983 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7984 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7986 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7987 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7989 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7990 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7992 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7993 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7995 if [ -n "$QT_LFLAGS_ODBC" ]; then
7996 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7998 if [ -n "$QT_LFLAGS_TDS" ]; then
7999 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
8002 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
8003 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
8006 #dump in the OPENSSL_LIBS info
8007 if [ '!' -z "$OPENSSL_LIBS" ]; then
8008 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
8009 elif [ "$CFG_OPENSSL" = "linked" ]; then
8010 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
8013 #dump in the SDK info
8014 if [ '!' -z "$CFG_SDK" ]; then
8015 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
8018 # mac gcc -Xarch support
8019 if [ "$CFG_MAC_XARCH" = "no" ]; then
8020 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
8024 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
8025 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
8027 # replace qmodule.pri if it differs from the newly created temp file
8028 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
8029 rm -f "$QTMODULE.tmp"
8031 mv -f "$QTMODULE.tmp" "$QTMODULE"
8034 #-------------------------------------------------------------------------------
8035 # save configuration into .qmake.cache
8036 #-------------------------------------------------------------------------------
8038 CACHEFILE="$outpath/.qmake.cache"
8039 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
8040 cat >>"$CACHEFILE.tmp" <<EOF
8042 QT_SOURCE_TREE = \$\$quote($relpath)
8043 QT_BUILD_TREE = \$\$quote($outpath)
8044 QT_BUILD_PARTS = $CFG_BUILD_PARTS
8046 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
8047 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
8048 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
8049 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
8050 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
8051 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
8052 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
8054 include(\$\$PWD/mkspecs/qmodule.pri)
8055 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
8056 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
8057 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
8061 #dump the qmake spec
8062 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
8063 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
8065 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
8070 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
8071 if [ "$CFG_INCREMENTAL" = "yes" ]; then
8072 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
8073 # don't need to worry about generated files
8074 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
8075 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
8077 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
8079 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
8080 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
8083 # replace .qmake.cache if it differs from the newly created temp file
8084 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
8085 rm -f "$CACHEFILE.tmp"
8087 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
8090 #-------------------------------------------------------------------------------
8091 # give feedback on configuration
8092 #-------------------------------------------------------------------------------
8096 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8099 This target is using the GNU C++ compiler ($PLATFORM).
8101 Recent versions of this compiler automatically include code for
8102 exceptions, which increase both the size of the Qt libraries and
8103 the amount of memory taken by your applications.
8105 You may choose to re-run `basename $0` with the -no-exceptions
8106 option to compile Qt without exceptions. This is completely binary
8107 compatible, and existing applications will continue to work.
8115 if [ "$CFG_EXCEPTIONS" != "no" ]; then
8118 This target is using the MIPSpro C++ compiler ($PLATFORM).
8120 You may choose to re-run `basename $0` with the -no-exceptions
8121 option to compile Qt without exceptions. This will make the
8122 size of the Qt library smaller and reduce the amount of memory
8123 taken by your applications.
8134 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8136 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
8137 in debug mode will run out of memory on systems with 2GB or less.
8138 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
8139 -no-webkit or -release to skip webkit debug.
8144 if [ "$XPLATFORM" = "$PLATFORM" ]; then
8145 echo "Build type: $PLATFORM"
8147 echo "Building on: $PLATFORM"
8148 echo "Building for: $XPLATFORM"
8151 if [ ! -z "$CFG_MAC_ARCHS" ]; then
8152 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
8154 echo "Architecture: $CFG_ARCH"
8157 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
8158 echo "Host architecture: $CFG_HOST_ARCH"
8161 if [ "$PLATFORM_MAC" = "yes" ]; then
8162 if [ "$CFG_MAC_COCOA" = "yes" ]; then
8163 if [ "$CFG_MAC_CARBON" = "yes" ]; then
8164 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
8166 echo "Using framework: Cocoa"
8169 echo "Using framework: Carbon"
8173 if [ -n "$PLATFORM_NOTES" ]; then
8174 echo "Platform notes:"
8175 echo "$PLATFORM_NOTES"
8180 if [ "$OPT_VERBOSE" = "yes" ]; then
8181 echo $ECHO_N "qmake vars .......... $ECHO_C"
8182 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
8183 echo "qmake switches ......... $QMAKE_SWITCHES"
8186 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
8187 echo "Build .................. $CFG_BUILD_PARTS"
8188 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
8189 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
8190 echo "Debug .................. yes (combined)"
8191 if [ "$CFG_DEBUG" = "yes" ]; then
8192 echo "Default Link ........... debug"
8194 echo "Default Link ........... release"
8197 echo "Debug .................. $CFG_DEBUG"
8199 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
8200 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
8201 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
8202 echo "QtConcurrent code ...... $CFG_CONCURRENT"
8203 echo "QtGui module ........... $CFG_GUI"
8204 echo "QtScript module ........ $CFG_SCRIPT"
8205 echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
8206 echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
8207 echo "Phonon module .......... $CFG_PHONON"
8208 echo "Multimedia module ...... $CFG_MULTIMEDIA"
8209 echo "SVG module ............. $CFG_SVG"
8210 case "$CFG_WEBKIT" in
8211 yes) echo "WebKit module .......... yes" ;;
8212 debug) echo "WebKit module .......... yes (debug)" ;;
8213 no) echo "WebKit module .......... no" ;;
8215 if [ "$CFG_WEBKIT" != "no" ] || [ "$CFG_SCRIPT" != "no" ]; then
8216 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
8217 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
8219 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
8222 echo "V8 module .............. $CFG_V8"
8223 echo "Declarative module ..... $CFG_DECLARATIVE"
8224 if [ "$CFG_DECLARATIVE" = "yes" ]; then
8225 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
8227 echo "Location module ........ $CFG_LOCATION"
8228 echo "STL support ............ $CFG_STL"
8229 echo "PCH support ............ $CFG_PRECOMPILE"
8230 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
8231 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
8232 echo "AVX..................... ${CFG_AVX}"
8233 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
8234 echo "iWMMXt support ......... ${CFG_IWMMXT}"
8235 echo "NEON support ........... ${CFG_NEON}"
8237 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
8238 echo "getaddrinfo support .... $CFG_GETADDRINFO"
8239 echo "getifaddrs support ..... $CFG_GETIFADDRS"
8240 echo "Accessibility .......... $CFG_ACCESSIBILITY"
8241 echo "NIS support ............ $CFG_NIS"
8242 echo "CUPS support ........... $CFG_CUPS"
8243 echo "Iconv support .......... $CFG_ICONV"
8244 echo "Glib support ........... $CFG_GLIB"
8245 echo "GStreamer support ...... $CFG_GSTREAMER"
8246 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
8247 echo "Large File support ..... $CFG_LARGEFILE"
8248 echo "GIF support ............ $CFG_GIF"
8249 if [ "$CFG_TIFF" = "no" ]; then
8250 echo "TIFF support ........... $CFG_TIFF"
8252 echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
8254 if [ "$CFG_JPEG" = "no" ]; then
8255 echo "JPEG support ........... $CFG_JPEG"
8257 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
8259 if [ "$CFG_PNG" = "no" ]; then
8260 echo "PNG support ............ $CFG_PNG"
8262 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
8264 if [ "$CFG_MNG" = "no" ]; then
8265 echo "MNG support ............ $CFG_MNG"
8267 echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
8269 echo "zlib support ........... $CFG_ZLIB"
8270 echo "Session management ..... $CFG_SM"
8271 if [ "$PLATFORM_QWS" = "yes" ]; then
8272 echo "Embedded support ....... $CFG_EMBEDDED"
8273 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
8274 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
8276 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
8278 # Normalize the decoration output first
8279 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
8280 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
8281 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
8282 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
8283 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
8284 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
8285 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
8286 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
8287 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
8288 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
8289 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
8290 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
8291 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
8292 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
8293 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
8294 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
8296 if [ "$CFG_OPENGL" = "desktop" ]; then
8297 echo "OpenGL support ......... yes (Desktop OpenGL)"
8298 elif [ "$CFG_OPENGL" = "es2" ]; then
8299 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
8301 echo "OpenGL support ......... no"
8303 if [ "$CFG_EGL" != "no" ]; then
8304 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
8305 echo "EGL support ............ yes <GLES/egl.h>"
8307 echo "EGL support ............ yes <EGL/egl.h>"
8310 if [ "$CFG_OPENVG" ]; then
8311 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
8312 echo "OpenVG support ......... ShivaVG"
8314 echo "OpenVG support ......... $CFG_OPENVG"
8317 if [ "$PLATFORM_X11" = "yes" ]; then
8318 echo "NAS sound support ...... $CFG_NAS"
8319 echo "XShape support ......... $CFG_XSHAPE"
8320 echo "XVideo support ......... $CFG_XVIDEO"
8321 echo "XSync support .......... $CFG_XSYNC"
8322 echo "Xinerama support ....... $CFG_XINERAMA"
8323 echo "Xcursor support ........ $CFG_XCURSOR"
8324 echo "Xfixes support ......... $CFG_XFIXES"
8325 echo "Xrandr support ......... $CFG_XRANDR"
8326 echo "Xrender support ........ $CFG_XRENDER"
8327 echo "Xi support ............. $CFG_XINPUT"
8328 echo "MIT-SHM support ........ $CFG_MITSHM"
8329 echo "FontConfig support ..... $CFG_FONTCONFIG"
8330 echo "XKB Support ............ $CFG_XKB"
8331 echo "immodule support ....... $CFG_IM"
8332 echo "GTK theme support ...... $CFG_QGTKSTYLE"
8334 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
8335 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
8336 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
8337 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
8338 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
8339 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
8340 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
8341 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
8342 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
8345 if [ "$CFG_OPENSSL" = "yes" ]; then
8346 OPENSSL_LINKAGE="(run-time)"
8347 elif [ "$CFG_OPENSSL" = "linked" ]; then
8348 OPENSSL_LINKAGE="(linked)"
8350 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
8351 echo "Alsa support ........... $CFG_ALSA"
8352 if [ "$PLATFORM_MAC" = "yes" ]; then
8353 echo "CoreWlan support ....... $CFG_COREWLAN"
8355 echo "ICD support ............ $CFG_ICD"
8356 echo "libICU support ......... $CFG_ICU"
8357 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8358 echo "Xcb support ............ limited (old version)"
8360 echo "Xcb support ............ $CFG_XCB"
8362 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
8363 echo "XInput2 support ........ $CFG_XINPUT2"
8367 # complain about not being able to use dynamic plugins if we are using a static build
8368 if [ "$CFG_SHARED" = "no" ]; then
8370 echo "WARNING: Using static linking will disable the use of dynamically"
8371 echo "loaded plugins. Make sure to import all needed static plugins,"
8372 echo "or compile needed modules into the library."
8375 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
8377 echo "NOTE: When linking against OpenSSL, you can override the default"
8378 echo "library names through OPENSSL_LIBS."
8380 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
8383 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
8385 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
8386 echo "if you want a pure debug build."
8391 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
8396 #-------------------------------------------------------------------------------
8397 # build makefiles based on the configuration
8398 #-------------------------------------------------------------------------------
8400 echo "Finding project files. Please wait..."
8401 if [ "$CFG_NOPROCESS" != "yes" ]; then
8402 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
8403 if [ -f "${relpath}/qtbase.pro" ]; then
8404 mkfile="${outpath}/Makefile"
8405 [ -f "$mkfile" ] && chmod +w "$mkfile"
8406 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
8410 # .projects -> projects to process
8411 # .projects.1 -> qt and moc
8412 # .projects.2 -> subdirs and libs
8413 # .projects.3 -> the rest
8414 rm -f .projects .projects.1 .projects.2 .projects.3
8416 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
8417 if [ -z "$AWK" ]; then
8418 for p in `echo $QMAKE_PROJECTS`; do
8419 echo "$p" >> .projects
8422 cat >projects.awk <<EOF
8428 first = "./.projects.1.tmp"
8429 second = "./.projects.2.tmp"
8430 third = "./.projects.3.tmp"
8435 if ( ! target_file )
8437 print input_file >target_file
8442 input_file = FILENAME
8447 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
8450 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
8451 target_file = second
8456 matched_target == 0 && /^(TEMPLATE.*=)/ {
8457 if ( \$3 == "subdirs" )
8458 target_file = second
8459 else if ( \$3 == "lib" )
8465 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
8466 if ( \$0 ~ /plugin/ )
8469 target_file = second
8474 if ( ! target_file )
8476 print input_file >>target_file
8483 for p in `echo $QMAKE_PROJECTS`; do
8484 echo "$p" >> .projects.all
8487 # if you get errors about the length of the command line to awk, change the -l arg
8489 split -l 100 .projects.all .projects.all.
8490 for p in .projects.all.*; do
8491 "$AWK" -f projects.awk `cat $p`
8492 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
8493 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
8494 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
8495 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
8497 rm -f .projects.all* projects.awk
8499 [ -f .projects.1 ] && cat .projects.1 >>.projects
8500 [ -f .projects.2 ] && cat .projects.2 >>.projects
8501 rm -f .projects.1 .projects.2
8502 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
8503 cat .projects.3 >>.projects
8507 # don't sort Qt and MOC in with the other project files
8508 # also work around a segfaulting uniq(1)
8509 if [ -f .sorted.projects.2 ]; then
8510 sort .sorted.projects.2 > .sorted.projects.2.new
8511 mv -f .sorted.projects.2.new .sorted.projects.2
8512 cat .sorted.projects.2 >> .sorted.projects.1
8514 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
8515 rm -f .sorted.projects.2 .sorted.projects.1
8519 if [ -f .projects ]; then
8520 uniq .projects >.tmp
8521 mv -f .tmp .projects
8522 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
8524 if [ -f .projects.3 ]; then
8525 uniq .projects.3 >.tmp
8526 mv -f .tmp .projects.3
8527 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
8529 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
8533 for part in $CFG_BUILD_PARTS; do
8535 tools) PART_ROOTS="$PART_ROOTS tools" ;;
8536 libs) PART_ROOTS="$PART_ROOTS src tools/linguist/lrelease" ;;
8537 translations) PART_ROOTS="$PART_ROOTS translations" ;;
8538 examples) PART_ROOTS="$PART_ROOTS examples" ;;
8543 if [ "$CFG_DEV" = "yes" ]; then
8544 PART_ROOTS="$PART_ROOTS tests"
8547 echo "Creating makefiles. Please wait..."
8548 for file in .projects .projects.3; do
8549 [ '!' -f "$file" ] && continue
8550 for a in `cat $file`; do
8552 for r in $PART_ROOTS; do
8553 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
8558 [ "$IN_ROOT" = "no" ] && continue
8561 *winmain/winmain.pro)
8562 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
8566 *examples/activeqt/*) continue ;;
8567 */qmake/qmake.pro) continue ;;
8568 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
8569 *tools/mkv8snapshot/*)
8570 if [ "$CFG_V8" = "yes" -a "$CFG_V8SNAPSHOT" = "yes" ]; then
8576 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
8582 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
8583 test -d "$dir" || mkdir -p "$dir"
8584 OUTDIR="$outpath/$dir"
8585 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
8586 # fast configure - the makefile exists, skip it
8587 # since the makefile exists, it was generated by qmake, which means we
8588 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
8590 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
8593 QMAKE_SPEC_ARGS="-spec $SPEC"
8594 echo $ECHO_N " for $a$ECHO_C"
8596 QMAKE="$outpath/bin/qmake"
8597 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
8598 if [ "$file" = ".projects.3" ]; then
8601 cat >"${OUTDIR}/Makefile" <<EOF
8602 # ${OUTDIR}/Makefile: generated by configure
8604 # WARNING: This makefile will be replaced with a real makefile.
8605 # All changes made to this file will be lost.
8607 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
8609 cat >>"${OUTDIR}/Makefile" <<EOF
8611 all clean install qmake first Makefile: FORCE
8612 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
8620 if [ "$OPT_VERBOSE" = "yes" ]; then
8621 echo " (`basename $SPEC`)"
8622 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8627 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
8628 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
8632 rm -f .projects .projects.3
8634 #-------------------------------------------------------------------------------
8635 # check for platforms that we don't yet know about
8636 #-------------------------------------------------------------------------------
8637 if [ "$CFG_ARCH" = "generic" ]; then
8640 NOTICE: Atomic operations are not yet supported for this
8643 Qt will use the 'generic' architecture instead, which uses a
8644 single pthread_mutex_t to protect all atomic operations. This
8645 implementation is the slow (but safe) fallback implementation
8646 for architectures Qt does not yet support.
8650 #-------------------------------------------------------------------------------
8651 # check if the user passed the -no-zlib option, which is no longer supported
8652 #-------------------------------------------------------------------------------
8653 if [ -n "$ZLIB_FORCED" ]; then
8654 which_zlib="supplied"
8655 if [ "$CFG_ZLIB" = "system" ]; then
8661 NOTICE: The -no-zlib option was supplied but is no longer
8664 Qt now requires zlib support in all builds, so the -no-zlib
8665 option was ignored. Qt will be built using the $which_zlib
8670 #-------------------------------------------------------------------------------
8671 # finally save the executed command to another script
8672 #-------------------------------------------------------------------------------
8673 if [ `basename $0` != "config.status" ]; then
8674 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
8676 # add the system variables
8677 for varname in $SYSTEM_VARIABLES; do
8679 'if [ -n "\$'${varname}'" ]; then
8680 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8685 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8687 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8688 echo "#!/bin/sh" > "$outpath/config.status"
8689 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8690 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8691 echo "else" >> "$outpath/config.status"
8692 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8693 echo "fi" >> "$outpath/config.status"
8694 chmod +x "$outpath/config.status"
8697 if [ -n "$RPATH_MESSAGE" ]; then
8699 echo "$RPATH_MESSAGE"
8702 MAKE=`basename "$MAKE"`
8704 echo Qt is now configured for building. Just run \'$MAKE\'.
8705 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8706 echo Once everything is built, Qt is installed.
8707 echo You should not run \'$MAKE install\'.
8709 echo Once everything is built, you must run \'$MAKE install\'.
8710 echo Qt will be installed into $QT_INSTALL_PREFIX
8713 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.