2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is the build configuration utility of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## 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
197 #-----------------------------------------------------------------------------
198 # Qt version detection
199 #-----------------------------------------------------------------------------
200 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
204 if [ -n "$QT_VERSION" ]; then
205 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
206 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
207 if [ -n "$MAJOR" ]; then
208 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
209 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
210 QT_MAJOR_VERSION="$MAJOR"
211 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
212 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
215 if [ -z "$QT_MAJOR_VERSION" ]; then
216 echo "Cannot process version from qglobal.h: $QT_VERSION"
217 echo "Cannot proceed."
221 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
222 if [ -z "$QT_PACKAGEDATE" ]; then
223 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
224 echo "Cannot proceed"
228 #-------------------------------------------------------------------------------
230 #-------------------------------------------------------------------------------
235 EditionString=Commercial
239 # parse the arguments, setting things to "yes" or "no"
240 while [ "$#" -gt 0 ]; do
244 #Autoconf style options
246 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
250 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
254 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
255 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
258 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
263 # this option may or may not be followed by an argument
264 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
273 # this option may or may not be followed by an argument
274 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
287 -h|help|--help|-help)
288 if [ "$VAL" = "yes" ]; then
290 COMMERCIAL_USER="no" #doesn't matter we will display the help
293 COMMERCIAL_USER="no" #doesn't matter we will display the help
297 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
301 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
308 if [ "$UNKNOWN_ARG" = "yes" ]; then
325 if [ "$PLATFORM_QPA" != "no" ]; then
326 if [ "$PLATFORM_QPA" = "maybe" ]; then
333 echo "No license exists to enable Qt QPA. Disabling."
338 echo "Using NaCl at $VAL."
350 COMMERCIAL_USER="yes"
364 if [ "$COMMERCIAL_USER" = "ask" ]; then
366 echo "Which edition of Qt do you want to use ?"
368 echo "Type 'c' if you want to use the Commercial Edition."
369 echo "Type 'o' if you want to use the Open Source Edition."
373 if [ "$commercial" = "c" ]; then
374 COMMERCIAL_USER="yes"
376 elif [ "$commercial" = "o" ]; then
383 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
384 # Commercial preview release
385 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
388 QT_EDITION="QT_EDITION_DESKTOP"
389 LicenseType="Technology Preview"
390 elif [ $COMMERCIAL_USER = "yes" ]; then
391 # one of commercial editions
392 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
393 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
394 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
396 # read in the license file
397 if [ -f "$LICENSE_FILE" ]; then
398 . "$LICENSE_FILE" >/dev/null 2>&1
399 if [ -z "$LicenseKeyExt" ]; then
401 echo "You are using an old license file."
403 echo "Please install the license file supplied by Nokia,"
404 echo "or install the Qt Open Source Edition if you intend to"
405 echo "develop free software."
408 if [ -z "$Licensee" ]; then
410 echo "Invalid license key. Please check the license key."
414 if [ -z "$LicenseKeyExt" ]; then
416 echo $ECHO_N "Please enter your license key: $ECHO_C"
418 Licensee="Unknown user"
423 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
424 && LicenseValid="yes" \
426 if [ "$LicenseValid" != "yes" ]; then
428 echo "Invalid license key. Please check the license key."
431 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
432 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
433 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
434 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
436 # determine which edition we are licensed to use
437 case "$LicenseTypeCode" in
439 LicenseType="Commercial"
443 QT_EDITION="QT_EDITION_UNIVERSAL"
446 Edition="FullFramework"
447 EditionString="Full Framework"
448 QT_EDITION="QT_EDITION_DESKTOP"
451 Edition="GUIFramework"
452 EditionString="GUI Framework"
453 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
458 LicenseType="Evaluation"
459 QMakeVar add DEFINES QT_EVAL
463 QT_EDITION="QT_EDITION_EVALUATION"
468 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
470 echo "Invalid license key. Please check the license key."
474 # verify that we are licensed to use Qt on this platform
476 case "$PlatformCode" in
479 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
483 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
486 ### EMBEDDED_QPA logic missing ###
487 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
488 X9,* | XC,* | XU,* | XW,* | XM,*)
490 LICENSE_EXTENSION="-ALLOS"
492 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
493 # Qt for Embedded Linux
494 LICENSE_EXTENSION="-EMBEDDED"
496 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
498 LICENSE_EXTENSION="-EMBEDDED"
500 FM,*,no | LM,yes,* | ZM,no,no)
502 LICENSE_EXTENSION="-DESKTOP"
506 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
507 [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
509 echo "You are not licensed for the $Platform platform."
511 echo "Please contact qt-info@nokia.com to upgrade your license to"
512 echo "include the $Platform platform, or install the Qt Open Source Edition"
513 echo "if you intend to develop free software."
518 if test -r "$relpath/.LICENSE"; then
519 # Generic, non-final license
521 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
526 *TECHNOLOGY?PREVIEW*)
533 echo >&2 "Invalid license files; cannot continue"
538 EditionString="$Edition"
539 QT_EDITION="QT_EDITION_DESKTOP"
542 case "$LicenseFeatureCode" in
545 case "$LicenseType" in
547 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
550 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
556 case "$LicenseType" in
558 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
561 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
567 echo "Invalid license key. Please check the license key."
571 case "$LicenseFeatureCode" in
579 if [ '!' -f "$outpath/LICENSE" ]; then
580 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
581 echo "this software has disappeared."
583 echo "Sorry, you are not licensed to use this software."
584 echo "Try re-installing."
588 elif [ $COMMERCIAL_USER = "no" ]; then
589 # Open Source edition - may only be used under the terms of the GPL or LGPL.
590 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
591 Licensee="Open Source"
593 EditionString="Open Source"
594 QT_EDITION="QT_EDITION_OPENSOURCE"
597 #-------------------------------------------------------------------------------
598 # initalize variables
599 #-------------------------------------------------------------------------------
601 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
602 for varname in $SYSTEM_VARIABLES; do
603 qmakevarname="${varname}"
604 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
605 if [ "${varname}" = "LDFLAGS" ]; then
606 qmakevarname="LFLAGS"
607 elif [ "${varname}" = "LD" ]; then
611 'if [ -n "\$'${varname}'" ]; then
612 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
616 # Use CC/CXX to run config.tests
617 mkdir -p "$outpath/config.tests"
618 rm -f "$outpath/config.tests/.qmake.cache"
619 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
621 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
622 QMakeVar add decorations "default windows styled"
623 QMakeVar add mouse-drivers "pc"
624 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
625 QMakeVar add gfx-drivers "linuxfb"
626 QMakeVar add mouse-drivers "linuxtp"
628 QMakeVar add kbd-drivers "tty"
630 if [ "$CFG_DEV" = "yes" ]; then
631 QMakeVar add kbd-drivers "um"
634 # QTDIR may be set and point to an old or system-wide Qt installation
637 # the minimum version of libdbus-1 that we require:
638 MIN_DBUS_1_VERSION=0.93
640 # initalize internal variables
641 CFG_CONFIGURE_EXIT_ON_ERROR=yes
643 CFG_EXCEPTIONS=unspecified
644 CFG_GUI=auto # (yes|no|auto)
670 CFG_OPENVG_LC_INCLUDES=no
671 CFG_OPENVG_SHIVA=auto
672 CFG_OPENVG_ON_OPENGL=auto
674 CFG_EGL_GLES_INCLUDES=no
677 CFG_QWS_FREETYPE=auto
680 QT_DEFAULT_BUILD_PARTS="libs examples tests"
684 CFG_AUDIO_BACKEND=auto
686 CFG_DECLARATIVE_DEBUG=yes
687 CFG_JAVASCRIPTCORE_JIT=auto
689 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
690 CFG_GFX_ON="linuxfb multiscreen"
691 CFG_GFX_PLUGIN_AVAILABLE=
694 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
695 CFG_KBD_ON="tty" #default, see QMakeVar above
696 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
697 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
699 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
700 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx"
701 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx"
702 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx"
704 if [ -f "$relpath/src/gui/embedded/qscreenintegrityfb_qws.cpp" ]; then
705 CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} integrity"
706 CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} integrity"
707 CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} integrityfb"
712 CFG_KBD_PLUGIN_AVAILABLE=
715 CFG_MOUSE_PLUGIN_AVAILABLE=
720 CFG_DECORATION_AVAILABLE="styled windows default"
721 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
722 CFG_DECORATION_PLUGIN_AVAILABLE=
723 CFG_DECORATION_PLUGIN=
741 CFG_SEPARATE_DEBUG_INFO=no
742 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
743 CFG_REDUCE_EXPORTS=auto
753 CFG_REDUCE_RELOCATIONS=auto
756 CFG_ACCESSIBILITY=auto
759 CFG_DOUBLEFORMAT=auto
763 CFG_CLOCK_GETTIME=auto
764 CFG_CLOCK_MONOTONIC=auto
773 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
778 CFG_PREFIX_INSTALL=yes
787 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
788 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
792 OPT_CONFIRM_LICENSE=no
806 # initalize variables used for installation
815 QT_INSTALL_TRANSLATIONS=
821 #flags for SQL drivers
829 QT_LFLAGS_ODBC="-lodbc"
832 # flags for libdbus-1
836 # flags for Glib (X11 only)
840 # flags for GStreamer (X11 only)
844 #-------------------------------------------------------------------------------
845 # check SQL drivers, mouse drivers and decorations available in this package
846 #-------------------------------------------------------------------------------
848 # opensource version removes some drivers, so force them to be off
854 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
855 for a in "$relpath/src/plugins/sqldrivers/"*; do
857 base_a=`basename "$a"`
858 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
859 eval "CFG_SQL_${base_a}=auto"
864 CFG_DECORATION_PLUGIN_AVAILABLE=
865 if [ -d "$relpath/src/plugins/decorations" ]; then
866 for a in "$relpath/src/plugins/decorations/"*; do
868 base_a=`basename "$a"`
869 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
874 CFG_KBD_PLUGIN_AVAILABLE=
875 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
876 for a in "$relpath/src/plugins/kbddrivers/"*; do
878 base_a=`basename "$a"`
879 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
884 CFG_MOUSE_PLUGIN_AVAILABLE=
885 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
886 for a in "$relpath/src/plugins/mousedrivers/"*; do
888 base_a=`basename "$a"`
889 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
894 CFG_GFX_PLUGIN_AVAILABLE=
895 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
896 for a in "$relpath/src/plugins/gfxdrivers/"*; do
898 base_a=`basename "$a"`
899 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
902 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
905 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
906 if [ -d "$relpath/src/plugins/imageformats" ]; then
907 for a in "$relpath/src/plugins/imageformats/"*; do
909 base_a=`basename "$a"`
910 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
915 #-------------------------------------------------------------------------------
916 # Set Default NaCl options
917 #-------------------------------------------------------------------------------
918 if [ "$CFG_EMBEDDED" = "nacl" ]; then
919 echo "Setting NaCl options:"
929 if [ `uname` = "Linux" ]; then
930 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
931 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
933 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
934 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
937 echo "-no-mediaservices -no-sql-sqlite -nomake tests"
941 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
942 QT_CONFIG="$QT_CONFIG nacl"
945 #-------------------------------------------------------------------------------
946 # parse command line arguments
947 #-------------------------------------------------------------------------------
949 # parse the arguments, setting things to "yes" or "no"
950 while [ "$#" -gt 0 ]; do
954 #Autoconf style options
956 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
960 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
964 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
965 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
968 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
972 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
976 -no-*-*|-plugin-*-*|-qt-*-*)
977 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
978 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
982 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
985 #Qt style yes options
986 -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|-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|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-phonon-backend|-audio-backend|-declarative-debug|-javascript-jit|-rpath|-force-pkg-config|-icu|-force-asserts|-testcocoon)
987 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
990 #Qt style options that pass an argument
992 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
994 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
998 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1002 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1003 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1007 #Qt style complex options in one command
1008 -enable-*|-disable-*)
1009 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1010 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1012 #Qt Builtin/System style options
1013 -no-*|-system-*|-qt-*)
1014 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1015 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1017 #Options that cannot be generalized
1024 # this option may or may not be followed by an argument
1025 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1032 -embedded-lite|-qpa)
1034 # this option may or may not be followed by an argument
1035 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1048 # this option may or may not be followed by an argument
1049 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1058 # this option may or may not be followed by an argument
1059 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1067 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1068 # this option may or may not be followed by an argument
1069 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1078 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1082 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1096 if [ "$1" = "-D" ]; then
1100 VAL=`echo $1 | sed 's,-D,,'`
1105 # this option may or may not be followed by an argument
1106 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1115 if [ "$1" = "-I" ]; then
1119 VAL=`echo $1 | sed 's,-I,,'`
1124 if [ "$1" = "-L" ]; then
1128 VAL=`echo $1 | sed 's,-L,,'`
1133 if [ "$1" = "-R" ]; then
1137 VAL=`echo $1 | sed 's,-R,,'`
1142 VAL=`echo $1 | sed 's,-l,,'`
1146 if [ "$1" = "-F" ]; then
1150 VAL=`echo $1 | sed 's,-F,,'`
1155 if [ "$1" = "-fw" ]; then
1159 VAL=`echo $1 | sed 's,-fw,,'`
1167 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1174 if [ "$UNKNOWN_ARG" = "yes" ]; then
1175 echo "$1: unknown argument"
1186 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1187 CFG_ACCESSIBILITY="$VAL"
1196 CFG_USE_GNUMAKE="$VAL"
1199 CFG_MYSQL_CONFIG="$VAL"
1202 QT_INSTALL_PREFIX="$VAL"
1205 QT_HOST_PREFIX="$VAL"
1208 QT_FORCE_PKGCONFIG=yes
1211 QT_INSTALL_DOCS="$VAL"
1214 QT_INSTALL_HEADERS="$VAL"
1217 QT_INSTALL_PLUGINS="$VAL"
1220 QT_INSTALL_IMPORTS="$VAL"
1223 QT_INSTALL_DATA="$VAL"
1226 QT_INSTALL_LIBS="$VAL"
1235 QT_INSTALL_TRANSLATIONS="$VAL"
1237 sysconfdir|settingsdir)
1238 QT_INSTALL_SETTINGS="$VAL"
1241 QT_INSTALL_EXAMPLES="$VAL"
1244 QT_INSTALL_TESTS="$VAL"
1253 QT_INSTALL_BINS="$VAL"
1275 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1282 if [ "$VAL" = "little" ]; then
1283 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1284 elif [ "$VAL" = "big" ]; then
1285 CFG_ENDIAN="Q_BIG_ENDIAN"
1291 if [ "$VAL" = "little" ]; then
1292 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1293 elif [ "$VAL" = "big" ]; then
1294 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1300 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1307 CFG_QWS_DEPTHS="$VAL"
1310 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1311 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1312 [ "$VAL" = "es2" ]; then
1314 if [ "$VAL" = "es2" ]; then
1322 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1324 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1331 qvfb) # left for commandline compatibility, not documented
1332 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1333 if [ "$VAL" = "yes" ]; then
1334 QMakeVar add gfx-drivers qvfb
1335 QMakeVar add kbd-drivers qvfb
1336 QMakeVar add mouse-drivers qvfb
1337 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1338 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1339 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1346 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1349 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1358 if [ "$PLATFORM_MAC" = "yes" ]; then
1365 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1366 CFG_MAC_DWARF2="$VAL"
1372 # if this is a Mac then "windows" probably means
1373 # we are cross-compiling for MinGW
1374 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1375 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1384 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1385 CFG_MAC_HARFBUZZ="$VAL"
1392 if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
1393 CFG_FRAMEWORK="$VAL"
1399 if [ "$VAL" = "yes" ]; then
1401 QMakeVar add QMAKE_CFLAGS -pg
1402 QMakeVar add QMAKE_CXXFLAGS -pg
1403 QMakeVar add QMAKE_LFLAGS -pg
1404 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1410 if [ "$VAL" = "yes" ]; then
1411 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1414 exceptions|g++-exceptions)
1415 if [ "$VAL" = "no" ]; then
1417 elif [ "$VAL" = "yes" ]; then
1425 # keep compatibility with old platform names
1431 PLATFORM=hpux-acc-o64
1434 PLATFORM=hpux-acc-64
1437 PLATFORM=hpux-acc-64
1449 PLATFORM=reliant-cds-64
1452 PLATFORM=solaris-cc-64
1455 PLATFORM=unixware-cc
1458 PLATFORM=unixware-g++
1461 PLATFORM=unixware-cc
1464 PLATFORM=unixware-g++
1470 i386) NATIVE_64_ARCH="x86_64" ;;
1471 powerpc) NATIVE_64_ARCH="ppc64" ;;
1472 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1474 if [ ! -z "$NATIVE_64_ARCH" ]; then
1475 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1482 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1485 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1486 CFG_DEBUG_RELEASE="$VAL"
1492 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1493 CFG_RELEASE_QMAKE="$VAL"
1499 if [ "$VAL" = "yes" ]; then
1501 elif [ "$VAL" = "no" ]; then
1508 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1509 CFG_PREFIX_INSTALL="$VAL"
1517 developer-build|commercial|opensource)
1518 # These switches have been dealt with already
1521 if [ "$VAL" = "yes" ]; then
1523 elif [ "$VAL" = "no" ]; then
1530 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1531 CFG_INCREMENTAL="$VAL"
1537 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1538 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1544 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1545 if [ "$VAL" = "no" ]; then
1546 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1547 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1548 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1554 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1561 if [ "$VAL" = "no" ]; then
1568 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1576 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1583 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1590 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1597 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1604 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1611 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1618 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1625 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1632 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1633 CFG_PRECOMPILE="$VAL"
1638 separate-debug-info)
1639 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1640 CFG_SEPARATE_DEBUG_INFO="$VAL"
1641 elif [ "$VAL" = "nocopy" ] ; then
1642 CFG_SEPARATE_DEBUG_INFO="yes"
1643 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1650 CFG_REDUCE_EXPORTS="$VAL"
1656 if [ "$VAL" = "no" ]; then
1663 if [ "$VAL" = "no" ]; then
1670 if [ "$VAL" = "no" ]; then
1677 if [ "$VAL" = "no" ]; then
1684 if [ "$VAL" = "no" ]; then
1691 if [ "$VAL" = "no" ]; then
1698 if [ "$VAL" = "no" ]; then
1705 if [ "$VAL" = "no" ]; then
1712 if [ "$VAL" = "no" ]; then
1722 if [ "$VAL" = "no" ]; then
1729 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1730 CFG_REDUCE_RELOCATIONS="$VAL"
1736 [ "$VAL" = "qt" ] && VAL=yes
1737 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1738 CFG_QWS_FREETYPE="$VAL"
1744 [ "$VAL" = "qt" ] && VAL=yes
1745 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1750 # No longer supported:
1751 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1754 if [ "$VAL" = "system" ]; then
1761 [ "$VAL" = "yes" ] && VAL=qt
1762 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1769 [ "$VAL" = "yes" ] && VAL=qt
1770 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1777 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1784 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1791 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1798 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1805 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1812 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1819 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1820 CFG_FONTCONFIG="$VAL"
1826 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1833 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1840 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1847 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1854 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1861 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1868 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1869 CFG_GSTREAMER="$VAL"
1875 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1876 CFG_QGTKSTYLE="$VAL"
1882 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1885 if [ "$VAL" = "no" ]; then
1893 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1895 elif [ "$VAL" = "runtime" ]; then
1902 if [ "$VAL" = "yes" ]; then
1909 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1916 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1917 CFG_LARGEFILE="$VAL"
1923 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1930 if [ "$VAL" = "yes" ]; then
1931 CFG_OPENSSL="linked"
1937 if [ "$VAL" = "yes" ]; then
1938 CFG_DECLARATIVE_DEBUG="yes"
1940 if [ "$VAL" = "no" ]; then
1941 CFG_DECLARATIVE_DEBUG="no"
1948 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1949 CFG_JAVASCRIPTCORE_JIT="$VAL"
1955 if [ "$VAL" = "yes" ]; then
1956 OPT_CONFIRM_LICENSE="$VAL"
1962 if [ "$VAL" = "yes" ]; then
1968 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
1969 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1970 # if autoconf style options were used, $VAL can be "yes" or "no"
1971 [ "$VAL" = "yes" ] && VAL=qt
1972 # now $VAL should be "no", "qt", or "plugin"... double-check
1973 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1976 # now $VAL is "no", "qt", or "plugin"
1978 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1979 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1981 # Grab the available values
1984 avail="$CFG_SQL_AVAILABLE"
1987 avail="$CFG_GFX_AVAILABLE"
1988 if [ "$OPT" = "plugin" ]; then
1989 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1993 avail="$CFG_DECORATION_AVAILABLE"
1994 if [ "$OPT" = "plugin" ]; then
1995 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1999 avail="$CFG_KBD_AVAILABLE"
2000 if [ "$OPT" = "plugin" ]; then
2001 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2005 avail="$CFG_MOUSE_AVAILABLE"
2006 if [ "$OPT" = "plugin" ]; then
2007 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2011 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2012 if [ "$OPT" != "plugin" ]; then
2013 # png is always built in
2019 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2023 # Check that that user's value is available.
2026 if [ "$VAL" = "$d" ]; then
2031 [ "$found" = yes ] || ERROR=yes
2033 if [ "$VAR" = "sql" ]; then
2034 # set the CFG_SQL_driver
2035 eval "CFG_SQL_$VAL=\$OPT"
2037 elif [ "$VAR" = "imageformat" ]; then
2038 [ "$OPT" = "qt" ] && OPT=yes
2039 VAL="`echo $VAL |tr a-z A-Z`"
2040 eval "CFG_$VAL=$OPT"
2044 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2045 if [ "$OPT" = "plugin" ]; then
2046 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2047 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2048 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2049 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2050 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2051 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2052 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2053 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2056 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2057 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2058 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2059 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2060 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2064 QMakeVar add "${VAR}s" "${VAL}"
2065 elif [ "$OPT" = "no" ]; then
2066 PLUG_VAR="${VAR}-plugin"
2067 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2068 IN_VAR="${VAR}-driver"
2072 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2073 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2074 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2075 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2076 QMakeVar del "${IN_VAR}s" "$VAL"
2077 QMakeVar del "${PLUG_VAR}s" "$VAL"
2079 if [ "$ERROR" = "yes" ]; then
2080 echo "$CURRENT_OPT: unknown argument"
2085 if [ "$VAL" = "yes" ]; then
2086 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2087 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2091 elif [ "$VAL" = "no" ]; then
2092 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2093 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2102 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2109 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2116 D_FLAGS="$D_FLAGS \"$VAL\""
2119 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2122 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2125 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2128 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2131 if [ "$PLATFORM_MAC" = "yes" ]; then
2132 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2133 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2139 if [ "$PLATFORM_MAC" = "yes" ]; then
2140 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2146 W_FLAGS="$W_FLAGS \"${VAL}\""
2152 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2153 CFG_PHONON_BACKEND="$VAL"
2165 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2166 CFG_AUDIO_BACKEND="$VAL"
2172 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2179 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2180 CFG_FORCE_ASSERTS="$VAL"
2186 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2196 if [ "$UNKNOWN_OPT" = "yes" ]; then
2197 echo "${CURRENT_OPT}: invalid command-line switch"
2203 # update QT_CONFIG to show our current predefined configuration
2204 case "$CFG_QCONFIG" in
2205 minimal|small|medium|large|full)
2206 # these are a sequence of increasing functionality
2207 for c in minimal small medium large full; do
2208 QT_CONFIG="$QT_CONFIG $c-config"
2209 [ "$CFG_QCONFIG" = $c ] && break
2213 # not known to be sufficient for anything
2214 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2215 echo >&2 "Error: configuration file not found:"
2216 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2218 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2223 #-------------------------------------------------------------------------------
2224 # build tree initialization
2225 #-------------------------------------------------------------------------------
2227 # where to find which..
2228 unixtests="$relpath/config.tests/unix"
2229 mactests="$relpath/config.tests/mac"
2230 WHICH="$unixtests/which.test"
2232 PERL=`$WHICH perl 2>/dev/null`
2234 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2236 for e in gawk nawk awk; do
2237 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2244 PERL="/usr/bin/perl"
2245 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2249 ### skip this if the user just needs help...
2250 if [ "$OPT_HELP" != "yes" ]; then
2252 # is this a shadow build?
2253 if [ "$OPT_SHADOW" = "maybe" ]; then
2255 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2256 if [ -h "$outpath" ]; then
2257 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2263 if [ "$OPT_SHADOW" = "yes" ]; then
2264 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2265 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2266 echo >&2 "Cannot proceed."
2269 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2272 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2274 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2275 echo "Qt can be built in release mode with separate debug information, so"
2276 echo "-debug-and-release is not necessary anymore"
2280 if [ "$CFG_SILENT" = "yes" ]; then
2281 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2284 # if the source tree is different from the build tree,
2285 # symlink or copy part of the sources
2286 if [ "$OPT_SHADOW" = "yes" ]; then
2287 echo "Preparing build tree..."
2289 if [ -z "$PERL" ]; then
2291 echo "You need perl in your PATH to make a shadow build."
2292 echo "Cannot proceed."
2296 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2298 # symlink the qmake directory
2299 find "$relpath/qmake" | while read a; do
2300 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2301 if [ '!' -f "$my_a" ]; then
2302 if [ -d "$a" ]; then
2303 # directories are created...
2306 a_dir=`dirname "$my_a"`
2307 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2308 # ... and files are symlinked
2309 case `basename "$a"` in
2310 *.o|*.d|GNUmakefile*|qmake)
2321 # make a syncqt script that can be used in the shadow
2322 rm -f "$outpath/bin/syncqt"
2323 if [ -x "$relpath/bin/syncqt" ]; then
2324 mkdir -p "$outpath/bin"
2325 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2326 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2327 chmod 755 "$outpath/bin/syncqt"
2330 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2331 rm -f "$outpath/bin/$i"
2332 if [ -x "$relpath/bin/$i" ]; then
2333 mkdir -p "$outpath/bin"
2334 echo "#!/bin/sh" >"$outpath/bin/$i"
2335 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2336 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2337 chmod 755 "$outpath/bin/$i"
2341 # symlink the mkspecs directory
2342 mkdir -p "$outpath/mkspecs"
2343 rm -rf "$outpath"/mkspecs/*
2344 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2345 rm -f "$outpath/mkspecs/default"
2349 rm -rf "$outpath/mkspecs/$1"
2350 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2351 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2354 # Special case for mkspecs/features directory.
2355 # To be able to place .prf files into a shadow build directory,
2356 # we're creating links for files only. The directory structure is reproduced.
2357 ShadowMkspecs features
2359 # The modules dir is special, too.
2360 ShadowMkspecs modules
2362 # symlink the doc directory
2363 rm -rf "$outpath/doc"
2364 ln -s "$relpath/doc" "$outpath/doc"
2367 # symlink fonts to be able to run application from build directory
2368 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2369 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2370 mkdir -p "${outpath}/lib"
2371 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2375 if [ "$OPT_FAST" = "auto" ]; then
2376 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2383 # find a make command
2384 if [ -z "$MAKE" ]; then
2386 for mk in gmake make; do
2387 if "$WHICH" $mk >/dev/null 2>&1; then
2392 if [ -z "$MAKE" ]; then
2393 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2394 echo >&2 "Cannot proceed."
2397 # export MAKE, we need it later in the config.tests
2403 #-------------------------------------------------------------------------------
2404 # auto-detect all that hasn't been specified in the arguments
2405 #-------------------------------------------------------------------------------
2407 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2408 if [ "$CFG_EMBEDDED" != "no" ]; then
2409 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2411 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2412 if [ -z "$XPLATFORM" ]; then
2413 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2414 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2418 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2419 if [ -z "$XPLATFORM" ]; then
2420 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2421 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2425 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2426 if [ -z "$XPLATFORM" ]; then
2427 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2428 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2432 if [ -z "$PLATFORM" ]; then
2433 case "$UNAME_MACHINE" in
2435 PLATFORM=qws/linux-x86-g++
2438 PLATFORM=qws/linux-x86_64-g++
2441 PLATFORM=qws/linux-generic-g++
2445 if [ -z "$XPLATFORM" ]; then
2446 if [ "$CFG_EMBEDDED" = "auto" ]; then
2447 if [ -n "$CFG_ARCH" ]; then
2448 CFG_EMBEDDED=$CFG_ARCH
2450 case "$UNAME_MACHINE" in
2458 CFG_EMBEDDED=generic
2463 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2467 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2468 if [ -z "$XPLATFORM" ]; then
2469 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2470 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2474 if [ -z "$XPLATFORM" ]; then
2479 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2486 if [ -z "$PLATFORM" ]; then
2488 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2490 if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2491 OSX_VERSION=`uname -r | cut -d. -f1`
2492 if [ "$OSX_VERSION" -ge 11 ]; then
2493 # We're on Lion or above. Check if we have a supported Clang version
2494 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2497 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2512 #PLATFORM=aix-g++-64
2514 #PLATFORM=aix-xlc-64
2516 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2526 # PLATFORM=dynix-g++
2532 PLATFORM=freebsd-g++
2534 - Also available for FreeBSD: freebsd-icc
2538 PLATFORM=openbsd-g++
2549 #PLATFORM=irix-cc-64
2551 - Also available for IRIX: irix-g++ irix-cc-64
2555 case "$UNAME_MACHINE" in
2557 #PLATFORM=hpuxi-acc-32
2558 PLATFORM=hpuxi-acc-64
2560 - Also available for HP-UXi: hpuxi-acc-32
2566 #PLATFORM=hpux-acc-64
2568 #PLATFORM=hpux-acc-o64
2570 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2579 - Also available for Tru64: tru64-g++
2583 case "$UNAME_MACHINE" in
2585 PLATFORM=linux-g++-64
2592 - Also available for Linux: linux-kcc linux-icc linux-cxx
2596 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2597 PLATFORM="solaris-g++"
2599 #PLATFORM=solaris-g++
2601 #PLATFORM=solaris-cc64
2604 - Also available for Solaris: solaris-g++ solaris-cc-64
2607 ReliantUNIX-*:*|SINIX-*:*)
2608 PLATFORM=reliant-cds
2609 #PLATFORM=reliant-cds-64
2611 - Also available for Reliant UNIX: reliant-cds-64
2621 #PLATFORM=unixware-g++
2622 PLATFORM=unixware-cc
2624 - Also available for OpenUNIX: unixware-g++
2628 #PLATFORM=unixware-g++
2629 PLATFORM=unixware-cc
2631 - Also available for UnixWare: unixware-g++
2638 - Also available for SCO OpenServer: sco-g++
2642 PLATFORM=unixware-g++
2645 PLATFORM=unsupported/qnx-g++
2648 if [ "$OPT_HELP" != "yes" ]; then
2650 for p in $PLATFORMS; do
2651 echo " $relconf $* -platform $p"
2654 echo " The build script does not currently recognize all" >&2
2655 echo " platforms supported by Qt." >&2
2656 echo " Rerun this script with a -platform option listed to" >&2
2657 echo " set the system/compiler combination you use." >&2
2664 if [ "$PLATFORM_QWS" = "yes" ]; then
2666 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2668 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2671 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2673 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2674 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2676 if [ -d "$PLATFORM" ]; then
2677 QMAKESPEC="$PLATFORM"
2679 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2681 if [ -d "$XPLATFORM" ]; then
2682 XQMAKESPEC="$XPLATFORM"
2684 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2686 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2687 QT_CROSS_COMPILE=yes
2688 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2691 if [ "$PLATFORM_MAC" = "yes" ]; then
2692 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2694 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2695 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2696 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2697 echo " built with 'macx-g++'" >&2
2703 # check specified platforms are supported
2704 if [ '!' -d "$QMAKESPEC" ]; then
2706 echo " The specified system/compiler is not supported:"
2710 echo " Please see the README file for a complete list."
2714 if [ '!' -d "$XQMAKESPEC" ]; then
2716 echo " The specified system/compiler is not supported:"
2720 echo " Please see the README file for a complete list."
2724 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2726 echo " The specified system/compiler port is not complete:"
2728 echo " $XQMAKESPEC/qplatformdefs.h"
2730 echo " Please contact qt-info@nokia.com."
2735 # now look at the configs and figure out what platform we are config'd for
2736 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2737 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2739 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2741 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2742 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2743 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2744 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2745 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2749 #-------------------------------------------------------------------------------
2750 # determine the system architecture
2751 #-------------------------------------------------------------------------------
2752 if [ "$OPT_VERBOSE" = "yes" ]; then
2753 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2756 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2757 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2759 echo "You have specified a target architecture with -embedded and -arch."
2760 echo "The two architectures you have specified are different, so we can"
2761 echo "not proceed. Either set both to be the same, or only use -embedded."
2767 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2768 case `basename "$XPLATFORM"` in
2771 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2773 echo "Please contact qt-info@nokia.com to upgrade your license to"
2774 echo "include this platform, or install the Qt Open Source Edition"
2775 echo "if you intend to develop free software."
2781 if [ -z "${CFG_HOST_ARCH}" ]; then
2782 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2784 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2785 case "$CFG_HOST_ARCH" in
2790 if [ "$OPT_VERBOSE" = "yes" ]; then
2791 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2795 CFG_HOST_ARCH=`uname -p`
2796 if [ "$OPT_VERBOSE" = "yes" ]; then
2797 echo " SGI ($CFG_HOST_ARCH)"
2801 case "$UNAME_MACHINE" in
2803 if [ "$OPT_VERBOSE" = "yes" ]; then
2804 echo " Sun SPARC (sparc)"
2811 if [ "$OPT_VERBOSE" = "yes" ]; then
2812 echo " 64-bit AMD 80x86 (x86_64)"
2814 CFG_HOST_ARCH=x86_64
2817 if [ "$OPT_VERBOSE" = "yes" ]; then
2818 echo " 32-bit Intel 80x86 (i386)"
2826 if [ "$OPT_VERBOSE" = "yes" ]; then
2827 echo " 64-bit IBM PowerPC (powerpc)"
2829 CFG_HOST_ARCH=powerpc
2832 if [ "$OPT_VERBOSE" = "yes" ]; then
2833 echo " HP PA-RISC (parisc)"
2835 CFG_HOST_ARCH=parisc
2838 if [ "$OPT_VERBOSE" = "yes" ]; then
2839 echo " 32-bit Intel 80x86 (i386)"
2843 *:*:x86_64|*:*:amd64)
2844 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2845 if [ "$OPT_VERBOSE" = "yes" ]; then
2846 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2850 if [ "$OPT_VERBOSE" = "yes" ]; then
2851 echo " 64-bit AMD 80x86 (x86_64)"
2853 CFG_HOST_ARCH=x86_64
2857 if [ "$OPT_VERBOSE" = "yes" ]; then
2858 echo " 32-bit PowerPC (powerpc)"
2860 CFG_HOST_ARCH=powerpc
2863 if [ "$OPT_VERBOSE" = "yes" ]; then
2864 echo " 64-bit PowerPC (powerpc)"
2866 CFG_HOST_ARCH=powerpc
2869 if [ "$OPT_VERBOSE" = "yes" ]; then
2870 echo " IBM S/390 (s390)"
2875 if [ "$OPT_VERBOSE" = "yes" ]; then
2881 if [ "$OPT_VERBOSE" = "yes" ]; then
2882 echo " Linux on SPARC"
2887 case "$UNAME_MACHINE" in
2889 if [ "$OPT_VERBOSE" = "yes" ]; then
2890 echo " QNX on Intel 80x86 (i386)"
2897 if [ "$OPT_VERBOSE" = "yes" ]; then
2898 echo " Trying '$UNAME_MACHINE'..."
2900 CFG_HOST_ARCH="$UNAME_MACHINE"
2905 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2906 if [ -n "$CFG_ARCH" ]; then
2907 CFG_EMBEDDED=$CFG_ARCH
2910 case "$CFG_EMBEDDED" in
2933 CFG_ARCH="$CFG_EMBEDDED"
2936 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
2937 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2938 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2939 CFG_ARCH=$CFG_HOST_ARCH
2946 # previously, armv6 was a different arch
2952 if [ "$OPT_VERBOSE" = "yes" ]; then
2953 echo "System architecture: '$CFG_ARCH'"
2954 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2955 echo "Host architecture: '$CFG_HOST_ARCH'"
2959 #-------------------------------------------------------------------------------
2960 # tests that don't need qmake (must be run before displaying help)
2961 #-------------------------------------------------------------------------------
2963 # detect build style
2964 if [ "$CFG_DEBUG" = "auto" ]; then
2965 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2966 CFG_DEBUG_RELEASE=yes
2968 elif [ "$CFG_DEV" = "yes" ]; then
2969 CFG_DEBUG_RELEASE=no
2972 CFG_DEBUG_RELEASE=no
2976 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2977 QT_CONFIG="$QT_CONFIG build_all"
2980 if [ -z "$PKG_CONFIG" ]; then
2981 # See if PKG_CONFIG is set in the mkspec:
2982 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2984 if [ -z "$PKG_CONFIG" ]; then
2985 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2988 # Work out if we can use pkg-config
2989 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2990 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2992 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2993 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2994 echo >&2 "environment!"
2996 if [ -z "$PKG_CONFIG_PATH" ]; then
2998 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2999 echo >&2 "the host compiler's .pc files will be used. This is probably"
3000 echo >&2 "not what you want."
3002 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3004 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3005 echo >&2 "been set. This means your toolchain's .pc files must contain"
3006 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3007 echo >&2 "tests are failing, please check these files."
3012 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3013 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3014 echo >&2 "dependencies"
3020 if [ ! -n "$PKG_CONFIG" ]; then
3021 QT_CONFIG="$QT_CONFIG no-pkg-config"
3024 # pass on $CFG_SDK to the configure tests.
3025 if [ '!' -z "$CFG_SDK" ]; then
3026 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3029 # find the default framework value
3030 if [ "$PLATFORM_MAC" = "yes" ]; then
3031 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3032 CFG_FRAMEWORK="$CFG_SHARED"
3033 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3035 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3043 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3044 TEST_COMPILER="$CXX"
3046 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3047 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3048 if [ -z "$TEST_COMPILER" ]; then
3049 echo "ERROR: Cannot set the compiler for the configuration tests"
3054 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3055 TEST_COMPILER="nacl-gcc"
3059 if [ -n "$CFG_SYSROOT" ]; then
3060 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3061 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3062 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3064 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3068 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3070 # auto-detect precompiled header support
3071 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3072 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3079 #auto-detect DWARF2 on the mac
3080 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3081 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3088 # don't autodetect support for separate debug info on objcopy when
3089 # cross-compiling as lots of toolchains seems to have problems with this
3090 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3091 CFG_SEPARATE_DEBUG_INFO="no"
3094 # auto-detect support for separate debug info in objcopy
3095 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3096 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3097 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3098 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3099 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3100 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3101 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3102 CFG_SEPARATE_DEBUG_INFO=no
3106 # binutils on HP-UX is buggy; default to no.
3107 CFG_SEPARATE_DEBUG_INFO=no
3110 CFG_SEPARATE_DEBUG_INFO=yes
3116 # auto-detect -fvisibility support
3117 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3118 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3119 CFG_REDUCE_EXPORTS=no
3121 CFG_REDUCE_EXPORTS=yes
3125 # detect the availability of the -Bsymbolic-functions linker optimization
3126 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3127 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3128 CFG_REDUCE_RELOCATIONS=no
3130 CFG_REDUCE_RELOCATIONS=yes
3134 # auto-detect GNU make support
3135 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3139 # If -opengl wasn't specified, don't try to auto-detect
3140 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3145 if [ "$PLATFORM_MAC" = "yes" ]; then
3146 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
3151 # find the default framework value
3152 if [ "$PLATFORM_MAC" = "yes" ]; then
3153 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3154 CFG_FRAMEWORK="$CFG_SHARED"
3155 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3157 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3165 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3166 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3167 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3168 # get the darwin version. 10.0.0 and up means snow leopard.
3169 VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
3170 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3172 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3177 # x11 tests are done after qmake is built
3180 #setup the build parts
3181 if [ -z "$CFG_BUILD_PARTS" ]; then
3182 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3184 # don't build tools by default when cross-compiling
3185 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3186 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3189 for nobuild in $CFG_NOBUILD_PARTS; do
3190 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3192 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3194 # echo "WARNING: libs is a required part of the build."
3196 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3199 #-------------------------------------------------------------------------------
3200 # post process QT_INSTALL_* variables
3201 #-------------------------------------------------------------------------------
3203 if [ -z "$QT_INSTALL_PREFIX" ]; then
3204 if [ "$CFG_DEV" = "yes" ]; then
3205 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3207 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3210 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3212 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3213 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3214 if [ "$PLATFORM_MAC" = "yes" ]; then
3215 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3218 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3221 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3223 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3224 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3225 if [ "$PLATFORM_MAC" = "yes" ]; then
3226 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3231 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3234 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3236 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3237 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3238 if [ "$PLATFORM_MAC" = "yes" ]; then
3239 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3240 QT_INSTALL_LIBS="/Libraries/Frameworks"
3244 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3246 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3248 if [ -z "$QT_INSTALL_BINS" ]; then #default
3249 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3250 if [ "$PLATFORM_MAC" = "yes" ]; then
3251 QT_INSTALL_BINS="/Developer/Applications/Qt"
3254 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3256 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3258 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3259 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3260 if [ "$PLATFORM_MAC" = "yes" ]; then
3261 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3264 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3266 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3268 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3269 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3270 if [ "$PLATFORM_MAC" = "yes" ]; then
3271 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3274 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3276 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3278 if [ -z "$QT_INSTALL_DATA" ]; then #default
3279 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3281 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3283 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3284 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3286 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3288 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3289 if [ "$PLATFORM_MAC" = "yes" ]; then
3290 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3292 QT_INSTALL_SETTINGS=/etc/xdg
3295 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3297 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3298 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3299 if [ "$PLATFORM_MAC" = "yes" ]; then
3300 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3303 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3305 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3308 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3309 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3310 if [ "$PLATFORM_MAC" = "yes" ]; then
3311 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3314 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3316 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3318 #-------------------------------------------------------------------------------
3319 # help - interactive parts of the script _after_ this section please
3320 #-------------------------------------------------------------------------------
3322 # next, emit a usage message if something failed.
3323 if [ "$OPT_HELP" = "yes" ]; then
3324 [ "x$ERROR" = "xyes" ] && echo
3325 if [ "$CFG_NIS" = "no" ]; then
3332 if [ "$CFG_CUPS" = "no" ]; then
3339 if [ "$CFG_ICONV" = "no" ]; then
3346 if [ "$CFG_LARGEFILE" = "no" ]; then
3353 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3360 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3368 if [ "$CFG_XCB" = "no" ]; then
3376 if [ "$CFG_WAYLAND" = "no" ]; then
3383 if [ "$CFG_XINPUT2" = "no" ]; then
3392 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3393 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3394 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3395 [-release] [-debug] [-debug-and-release]
3396 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3397 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3398 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3399 [-plugin-sql-<driver>] [-system-sqlite]
3400 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3401 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3402 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3403 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3404 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3405 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3406 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3407 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3408 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3409 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3410 [-no-audio-backend] [-audio-backend]
3411 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3412 [-no-optimized-qmake] [-optimized-qmake]
3413 [-no-openssl] [-openssl] [-openssl-linked]
3414 [-no-gtkstyle] [-gtkstyle]
3415 [-qt-pcre] [-system-pcre]
3416 [additional platform specific options (see below)]
3419 Installation options:
3421 -qpa ................ This will enable the QPA build.
3422 QPA is a window system agnostic implementation of Qt.
3424 These are optional, but you may specify install directories.
3426 -prefix <dir> ...... This will install everything relative to <dir>
3427 (default $QT_INSTALL_PREFIX)
3429 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3432 -hostprefix [dir] .. Tools and libraries needed when developing
3433 applications are installed in [dir]. If [dir] is
3434 not given, the current build directory will be used.
3439 * -prefix-install .... Force a sandboxed "local" installation of
3440 Qt. This will install into
3441 $QT_INSTALL_PREFIX, if this option is
3442 disabled then some platforms will attempt a
3443 "system" install by placing default values to
3444 be placed in a system location other than
3447 You may use these to separate different parts of the install:
3449 -bindir <dir> ......... Executables will be installed to <dir>
3450 (default PREFIX/bin)
3451 -libdir <dir> ......... Libraries will be installed to <dir>
3452 (default PREFIX/lib)
3453 -docdir <dir> ......... Documentation will be installed to <dir>
3454 (default PREFIX/doc)
3455 -headerdir <dir> ...... Headers will be installed to <dir>
3456 (default PREFIX/include)
3457 -plugindir <dir> ...... Plugins will be installed to <dir>
3458 (default PREFIX/plugins)
3459 -importdir <dir> ...... Imports for QML will be installed to <dir>
3460 (default PREFIX/imports)
3461 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3463 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3464 (default PREFIX/translations)
3465 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3466 (default PREFIX/etc/settings)
3467 -examplesdir <dir> .... Examples will be installed to <dir>
3468 (default PREFIX/examples)
3469 -testsdir <dir> ....... Tests will be installed to <dir>
3470 (default PREFIX/tests)
3474 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3475 that needs to be evaluated. If the evaluation succeeds, the feature is
3476 included. Here is a short explanation of each option:
3478 * -release ........... Compile and link Qt with debugging turned off.
3479 -debug ............. Compile and link Qt with debugging turned on.
3480 -debug-and-release . Compile and link two versions of Qt, with and without
3481 debugging turned on (Mac only).
3483 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3485 -opensource ........ Compile and link the Open-Source Edition of Qt.
3486 -commercial ........ Compile and link the Commercial Edition of Qt.
3489 * -shared ............ Create and use shared Qt libraries.
3490 -static ............ Create and use static Qt libraries.
3492 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3494 -fast .............. Configure Qt quickly by generating Makefiles only for
3495 library and subdirectory targets. All other Makefiles
3496 are created as wrappers, which will in turn run qmake.
3498 -no-largefile ...... Disables large file support.
3499 + -largefile ......... Enables Qt to access files larger than 4 GB.
3502 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3509 if [ "$CFG_DBUS" = "no" ]; then
3518 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3519 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3521 -no-accessibility .. Do not compile Accessibility support.
3522 * -accessibility ..... Compile Accessibility support.
3524 $SHN -no-stl ............ Do not compile STL support.
3525 $SHY -stl ............... Compile STL support.
3527 -no-sql-<driver> ... Disable SQL <driver> entirely.
3528 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3530 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3533 Possible values for <driver>:
3534 [ $CFG_SQL_AVAILABLE ]
3536 -system-sqlite ..... Use sqlite from the operating system.
3538 -no-phonon-backend.. Do not build the platform phonon plugin.
3539 + -phonon-backend..... Build the platform phonon plugin.
3541 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3542 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3544 -no-declarative-debug ..... Do not build the declarative debugging support.
3545 + -declarative-debug ....... Build the declarative debugging support.
3547 -platform target ... The operating system and compiler you are building
3550 See the README file for a list of supported
3551 operating systems and compilers.
3554 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3556 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3557 raster - Software rasterizer
3558 opengl - Rendering via OpenGL, Experimental!
3559 openvg - Rendering via OpenVG, Experimental!
3566 -no-mmx ............ Do not compile with use of MMX instructions.
3567 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3568 -no-sse ............ Do not compile with use of SSE instructions.
3569 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3570 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3571 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3572 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3573 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3574 -no-avx ............ Do not compile with use of AVX instructions.
3575 -no-neon ........... Do not compile with use of NEON instructions.
3577 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3578 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3580 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3582 -D <string> ........ Add an explicit define to the preprocessor.
3583 -I <string> ........ Add an explicit include path.
3584 -L <string> ........ Add an explicit library path.
3586 -help, -h .......... Display this information.
3588 Third Party Libraries:
3590 -qt-zlib ........... Use the zlib bundled with Qt.
3591 + -system-zlib ....... Use zlib from the operating system.
3592 See http://www.gzip.org/zlib
3594 -no-gif ............ Do not compile GIF reading support.
3596 -no-libpng ......... Do not compile PNG support.
3597 -qt-libpng ......... Use the libpng bundled with Qt.
3598 + -system-libpng ..... Use libpng from the operating system.
3599 See http://www.libpng.org/pub/png
3601 -no-libjpeg ........ Do not compile JPEG support.
3602 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3603 + -system-libjpeg .... Use libjpeg from the operating system.
3604 See http://www.ijg.org
3606 -no-openssl ........ Do not compile support for OpenSSL.
3607 + -openssl ........... Enable run-time OpenSSL support.
3608 -openssl-linked .... Enabled linked OpenSSL support.
3610 -qt-pcre ........... Use the PCRE library bundled with Qt.
3611 + -system-pcre ....... Use the PCRE library from the operating system.
3615 -make <part> ....... Add part to the list of parts to be built at make time.
3616 ($QT_DEFAULT_BUILD_PARTS)
3617 -nomake <part> ..... Exclude part from the list of parts to be built.
3619 -R <string> ........ Add an explicit runtime library path to the Qt
3621 -l <string> ........ Add an explicit library.
3623 -no-rpath .......... Do not use the library install path as a runtime
3625 + -rpath ............. Link Qt libraries and executables using the library
3626 install path as a runtime library path. Equivalent
3627 to -R install_libpath
3629 -continue .......... Continue as far as possible if an error occurs.
3631 -verbose, -v ....... Print verbose information about each step of the
3634 -silent ............ Reduce the build output so that warnings and errors
3635 can be seen more easily.
3637 * -no-optimized-qmake ... Do not build qmake optimized.
3638 -optimized-qmake ...... Build qmake optimized.
3640 -no-gui ............ Don't build the Qt GUI library
3642 $NSN -no-nis ............ Do not compile NIS support.
3643 $NSY -nis ............... Compile NIS support.
3645 $CUN -no-cups ........... Do not compile CUPS support.
3646 $CUY -cups .............. Compile CUPS support.
3647 Requires cups/cups.h and libcups.so.2.
3649 $CIN -no-iconv .......... Do not compile support for iconv(3).
3650 $CIY -iconv ............. Compile support for iconv(3).
3652 $PHN -no-pch ............ Do not use precompiled header support.
3653 $PHY -pch ............... Use precompiled header support.
3655 $DBN -no-dbus ........... Do not compile the QtDBus module.
3656 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3657 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3659 -reduce-relocations ..... Reduce relocations in the libraries through extra
3660 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3661 experimental; needs GNU ld >= 2.18).
3663 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3667 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3668 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3675 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3683 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3687 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3688 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3690 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3691 $XCBY -xcb ............... Compile Xcb support.
3693 $XWN -no-wayland......... Do not compile Wayland support.
3694 $XWY -wayland .......... Compile Wayland support.
3700 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3704 $X2N -no-xinput2......... Do not compile XInput2 support.
3705 $X2Y -xinput2............ Compile XInput2 support.
3711 if [ "$PLATFORM_X11" = "yes" ]; then
3712 if [ "$CFG_SM" = "no" ]; then
3719 if [ "$CFG_XSHAPE" = "no" ]; then
3726 if [ "$CFG_XVIDEO" = "no" ]; then
3733 if [ "$CFG_XINERAMA" = "no" ]; then
3740 if [ "$CFG_FONTCONFIG" = "no" ]; then
3747 if [ "$CFG_XCURSOR" = "no" ]; then
3754 if [ "$CFG_XFIXES" = "no" ]; then
3761 if [ "$CFG_XRANDR" = "no" ]; then
3768 if [ "$CFG_XRENDER" = "no" ]; then
3775 if [ "$CFG_MITSHM" = "no" ]; then
3782 if [ "$CFG_XINPUT" = "no" ]; then
3789 if [ "$CFG_XKB" = "no" ]; then
3796 if [ "$CFG_IM" = "no" ]; then
3807 -no-gtkstyle ....... Do not build the GTK theme integration.
3808 + -gtkstyle .......... Build the GTK theme integration.
3810 * -no-nas-sound ...... Do not compile in NAS sound support.
3811 -system-nas-sound .. Use NAS libaudio from the operating system.
3812 See http://radscan.com/nas.html
3814 -egl ............... Use EGL instead of GLX to manage contexts.
3815 When building for desktop OpenGL, this option will
3816 make Qt use EGL to manage contexts rather than the
3817 GLX, which is the default. Note: For OpenGL ES, EGL
3820 -no-opengl ......... Do not support OpenGL.
3821 + -opengl <api> ...... Enable OpenGL support.
3822 With no parameter, this will auto-detect the "best"
3823 OpenGL API to use. If desktop OpenGL is available, it
3824 will be used. Use desktop or es2 for <api>
3825 to force the use of the Desktop OpenGL or
3826 OpenGL ES 2 APIs instead.
3828 -no-openvg ........ Do not support OpenVG.
3829 + -openvg ........... Enable OpenVG support.
3830 Requires EGL support, typically supplied by an OpenGL
3831 or other graphics implementation.
3833 $SMN -no-sm ............. Do not support X Session Management.
3834 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3836 $SHN -no-xshape ......... Do not compile XShape support.
3837 $SHY -xshape ............ Compile XShape support.
3838 Requires X11/extensions/shape.h.
3840 $XVN -no-xvideo ......... Do not compile XVideo support.
3841 $XVY -xvideo ............ Compile XVideo support.
3842 Requires X11/extensions/Xv.h & Xvlib.h.
3844 $SHN -no-xsync .......... Do not compile XSync support.
3845 $SHY -xsync ............. Compile XSync support.
3846 Requires X11/extensions/sync.h.
3848 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3849 $XAY -xinerama .......... Compile Xinerama support.
3850 Requires X11/extensions/Xinerama.h and libXinerama.
3851 By default, Xinerama support will be compiled if
3852 available and the shared libraries are dynamically
3855 $XCN -no-xcursor ........ Do not compile Xcursor support.
3856 $XCY -xcursor ........... Compile Xcursor support.
3857 Requires X11/Xcursor/Xcursor.h and libXcursor.
3858 By default, Xcursor support will be compiled if
3859 available and the shared libraries are dynamically
3862 $XFN -no-xfixes ......... Do not compile Xfixes support.
3863 $XFY -xfixes ............ Compile Xfixes support.
3864 Requires X11/extensions/Xfixes.h and libXfixes.
3865 By default, Xfixes support will be compiled if
3866 available and the shared libraries are dynamically
3869 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3870 $XZY -xrandr ............ Compile Xrandr support.
3871 Requires X11/extensions/Xrandr.h and libXrandr.
3873 $XRN -no-xrender ........ Do not compile Xrender support.
3874 $XRY -xrender ........... Compile Xrender support.
3875 Requires X11/extensions/Xrender.h and libXrender.
3877 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3878 $XMY -mitshm ............ Compile MIT-SHM support.
3879 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3881 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3882 $FCGY -fontconfig ........ Compile FontConfig support.
3883 Requires fontconfig/fontconfig.h, libfontconfig,
3884 freetype.h and libfreetype.
3886 $XIN -no-xinput ......... Do not compile Xinput support.
3887 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3888 which requires IRIX with wacom.h and libXi or
3889 XFree86 with X11/extensions/XInput.h and libXi.
3891 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3892 $XKY -xkb ............... Compile XKB support.
3897 if [ "$BUILD_ON_MAC" = "yes" ]; then
3902 -Fstring ........... Add an explicit framework path.
3903 -fw string ......... Add an explicit framework.
3905 * -framework ......... Build Qt as a series of frameworks and
3906 link tools against those frameworks.
3907 -no-framework ...... Do not build Qt as a series of frameworks.
3909 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3910 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3912 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3913 Only one arch value can be specified.
3915 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3916 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3918 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3919 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3920 QT_ENABLE_HARFBUZZ environment variable.
3925 if [ "$PLATFORM_QWS" = "yes" ]; then
3927 Qt for Embedded Linux:
3929 -embedded <arch> .... This will enable the embedded build, you must have a
3930 proper license for this switch to work.
3931 Example values for <arch>: arm mips x86 generic
3935 if [ "$PLATFORM_QPA" = "yes" ]; then
3941 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3944 -xplatform target ... The target platform when cross-compiling.
3946 -no-feature-<feature> Do not compile in <feature>.
3947 -feature-<feature> .. Compile in <feature>. The available features
3948 are described in src/corelib/global/qfeatures.txt
3950 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3951 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3953 The floating point format is usually autodetected by configure. Use this
3954 to override the detected value.
3956 -little-endian ...... Target platform is little endian (LSB first).
3957 -big-endian ......... Target platform is big endian (MSB first).
3959 -host-little-endian . Host platform is little endian (LSB first).
3960 -host-big-endian .... Host platform is big endian (MSB first).
3962 You only need to specify the endianness when
3963 cross-compiling, otherwise the host
3964 endianness will be used.
3966 -no-freetype ........ Do not compile in Freetype2 support.
3967 -qt-freetype ........ Use the libfreetype bundled with Qt.
3968 * -system-freetype .... Use libfreetype from the operating system.
3969 See http://www.freetype.org/
3971 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3972 default ($CFG_QCONFIG).
3974 -no-opengl .......... Do not support OpenGL.
3975 -opengl <api> ....... Enable OpenGL ES support
3976 With no parameter, this will attempt to auto-detect
3977 OpenGL ES 2, or regular desktop OpenGL.
3978 Use es2 for <api> to override auto-detection.
3982 if [ "$PLATFORM_QWS" = "yes" ]; then
3985 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3986 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3988 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3989 by default all available decorations are on.
3990 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3991 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3992 linked to at run time.
3993 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3994 -no-decoration-<style> ....Disable decoration <style> entirely.
3995 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3997 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3998 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3999 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
4000 linked to at run time.
4001 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
4002 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4003 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4005 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4006 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4008 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4010 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4012 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4013 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4015 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4016 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4017 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4019 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4020 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4021 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4023 -iwmmxt ............ Compile using the iWMMXt instruction set
4024 (available on some XScale CPUs).
4028 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4029 if [ "$CFG_GLIB" = "no" ]; then
4037 $GBN -no-glib ........... Do not compile Glib support.
4038 $GBY -glib .............. Compile Glib support.
4043 [ "x$ERROR" = "xyes" ] && exit 1
4048 # -----------------------------------------------------------------------------
4049 # LICENSING, INTERACTIVE PART
4050 # -----------------------------------------------------------------------------
4052 if [ "$PLATFORM_QWS" = "yes" ]; then
4053 Platform="Qt for Embedded Linux"
4054 elif [ "$PLATFORM_QPA" = "yes" ]; then
4055 Platform="Qt Lighthouse"
4056 elif [ "$PLATFORM_MAC" = "yes" ]; then
4057 Platform="Qt for Mac OS X"
4058 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4059 Platform="Qt for Windows"
4060 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4062 Platform="Qt for Linux/X11"
4066 echo "This is the $Platform ${EditionString} Edition."
4069 if [ "$Edition" = "OpenSource" ]; then
4071 echo "You are licensed to use this software under the terms of"
4072 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4073 if [ -f "$relpath/LICENSE.GPL3" ]; then
4074 echo "You are also licensed to use this software under the terms of"
4075 echo "the GNU General Public License (GPL) versions 3."
4081 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4082 echo "You have already accepted the terms of the $LicenseType license."
4085 if [ -f "$relpath/LICENSE.GPL3" ]; then
4086 echo "Type '3' to view the GNU General Public License version 3."
4088 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4089 echo "Type 'yes' to accept this license offer."
4090 echo "Type 'no' to decline this license offer."
4092 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4096 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4098 elif [ "$acceptance" = "no" ]; then
4099 echo "You are not licensed to use this software."
4102 elif [ "$acceptance" = "3" ]; then
4103 more "$relpath/LICENSE.GPL3"
4104 elif [ "$acceptance" = "L" ]; then
4105 more "$relpath/LICENSE.LGPL"
4108 elif [ "$Edition" = "Preview" ]; then
4109 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4112 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4113 echo "You have already accepted the terms of the $LicenseType license."
4116 echo "You are licensed to use this software under the terms of"
4117 echo "the $TheLicense"
4119 echo "Type '?' to read the Preview License."
4120 echo "Type 'yes' to accept this license offer."
4121 echo "Type 'no' to decline this license offer."
4123 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4127 if [ "$acceptance" = "yes" ]; then
4129 elif [ "$acceptance" = "no" ] ;then
4130 echo "You are not licensed to use this software."
4133 elif [ "$acceptance" = "?" ]; then
4134 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4137 elif [ "$Edition" != "OpenSource" ]; then
4138 if [ -n "$ExpiryDate" ]; then
4139 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4140 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4141 Today=`date +%Y%m%d`
4142 if [ "$Today" -gt "$ExpiryDate" ]; then
4143 case "$LicenseType" in
4144 Commercial|Academic|Educational)
4145 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4147 echo "NOTICE NOTICE NOTICE NOTICE"
4149 echo " Your support and upgrade period has expired."
4151 echo " You are no longer licensed to use this version of Qt."
4152 echo " Please contact qt-info@nokia.com to renew your support"
4153 echo " and upgrades for this license."
4155 echo "NOTICE NOTICE NOTICE NOTICE"
4160 echo "WARNING WARNING WARNING WARNING"
4162 echo " Your support and upgrade period has expired."
4164 echo " You may continue to use your last licensed release"
4165 echo " of Qt under the terms of your existing license"
4166 echo " agreement. But you are not entitled to technical"
4167 echo " support, nor are you entitled to use any more recent"
4168 echo " Qt releases."
4170 echo " Please contact qt-info@nokia.com to renew your"
4171 echo " support and upgrades for this license."
4173 echo "WARNING WARNING WARNING WARNING"
4180 echo "NOTICE NOTICE NOTICE NOTICE"
4182 echo " Your Evaluation license has expired."
4184 echo " You are no longer licensed to use this software. Please"
4185 echo " contact qt-info@nokia.com to purchase license, or install"
4186 echo " the Qt Open Source Edition if you intend to develop free"
4189 echo "NOTICE NOTICE NOTICE NOTICE"
4196 TheLicense=`head -n 1 "$outpath/LICENSE"`
4198 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4199 echo "You have already accepted the terms of the $TheLicense."
4202 echo "You are licensed to use this software under the terms of"
4203 echo "the $TheLicense."
4205 echo "Type '?' to view the $TheLicense."
4206 echo "Type 'yes' to accept this license offer."
4207 echo "Type 'no' to decline this license offer."
4209 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4213 if [ "$acceptance" = "yes" ]; then
4215 elif [ "$acceptance" = "no" ]; then
4216 echo "You are not licensed to use this software."
4219 else [ "$acceptance" = "?" ]
4220 more "$outpath/LICENSE"
4225 # this should be moved somewhere else
4228 AIX_VERSION=`uname -v`
4229 if [ "$AIX_VERSION" -lt "5" ]; then
4230 QMakeVar add QMAKE_LIBS_X11 -lbind
4237 #-------------------------------------------------------------------------------
4238 # generate qconfig.cpp
4239 #-------------------------------------------------------------------------------
4240 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4242 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4243 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4244 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4245 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4246 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4247 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4248 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4249 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4250 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4251 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4252 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4253 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4254 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4255 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4257 TODAY=`date +%Y-%m-%d`
4258 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4260 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4261 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4263 /* Installation date */
4264 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4268 if [ ! -z "$QT_HOST_PREFIX" ]; then
4269 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4270 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4271 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4272 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4273 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4274 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4275 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4276 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4277 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4278 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4279 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4280 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4282 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4284 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4285 /* Installation Info */
4286 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4287 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4288 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4289 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4290 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4291 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4292 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4293 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4294 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4295 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4296 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4297 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4298 #else // QT_BOOTSTRAPPED
4302 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4303 /* Installation Info */
4304 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4305 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4306 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4307 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4308 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4309 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4310 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4311 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4312 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4313 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4314 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4315 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4318 if [ ! -z "$QT_HOST_PREFIX" ]; then
4319 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4320 #endif // QT_BOOTSTRAPPED
4325 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4326 /* strlen( "qt_lcnsxxxx" ) == 12 */
4327 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4328 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4329 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4330 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4331 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4332 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4333 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4334 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4335 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4336 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4337 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4338 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4339 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4340 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4343 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4344 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4345 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4347 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4348 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4349 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4352 # -----------------------------------------------------------------------------
4353 if [ "$LicenseType" = "Evaluation" ]; then
4354 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4355 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4356 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4359 if [ -n "$EVALKEY" ]; then
4360 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4361 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4362 /* Evaluation license key */
4363 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4365 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4369 # -----------------------------------------------------------------------------
4371 # -----------------------------------------------------------------------------
4374 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4376 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4377 if [ "$OPT_SHADOW" = "yes" ]; then
4378 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4379 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4380 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4385 # $2: optional transformation
4386 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4387 # is where the resulting variable is written to
4388 # Assumes that the optional transformation produces the same variable name for each hit
4389 setBootstrapVariable()
4391 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4397 valStart = index($0, "=") + 1
4400 if (substr($0, valStart - 2, 1) == "+") {
4404 variable = substr($0, 0, valStart - 2 - append)
4405 value = substr($0, valStart)
4406 gsub("[ \t]+", "", variable)
4407 gsub("^[ \t]+", "", value)
4408 gsub("[ \t]+$", "", value)
4410 if (append == 1 && length(combinedValue) > 0) {
4411 combinedValue = combinedValue " " value
4413 combinedValue = value
4417 if (length(combinedValue) > 0) {
4418 printf "%s = %s\n", variable, combinedValue
4424 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4425 echo "Creating qmake. Please wait..."
4428 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4429 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4430 if [ -f "$QCONFIG_H" ]; then
4431 OLD_QCONFIG_H=$QCONFIG_H
4432 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4435 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4436 # when building qmake, we use #defines for the install paths,
4437 # however they are real functions in the library
4438 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4439 mkdir -p "$outpath/src/corelib/global"
4440 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4441 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4444 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4446 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4447 rm -rf mkspecs/default
4448 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4450 for mkfile in GNUmakefile Makefile; do
4453 in_mkfile="${mkfile}.in"
4454 if [ "$mkfile" = "Makefile" ]; then
4455 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4456 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4458 in_mkfile="${mkfile}.unix"
4460 in_mkfile="$relpath/qmake/$in_mkfile"
4461 mkfile="$outpath/qmake/$mkfile"
4462 if [ -f "$mkfile" ]; then
4463 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4466 [ -f "$in_mkfile" ] || continue
4468 echo "########################################################################" > "$mkfile"
4469 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4470 echo "########################################################################" >> "$mkfile"
4473 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4474 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4475 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4477 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4478 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4481 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4482 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4483 if [ "$CFG_SILENT" = "yes" ]; then
4484 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4485 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4487 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4488 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4490 setBootstrapVariable QMAKE_CFLAGS
4491 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4492 setBootstrapVariable QMAKE_LFLAGS
4494 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4495 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4496 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4498 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4499 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4500 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4501 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4502 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4503 elif [ "$CFG_DEBUG" = "yes" ]; then
4504 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4505 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4506 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4507 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4510 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4511 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4512 for rpath in $RPATH_FLAGS; do
4513 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4516 if [ "$BUILD_ON_MAC" = "yes" ]; then
4517 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4518 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4519 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4520 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4521 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4522 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4523 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4524 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4525 if [ '!' -z "$CFG_SDK" ]; then
4526 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4527 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4528 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4529 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4530 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4533 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4534 if [ '!' -z "$D_FLAGS" ]; then
4535 for DEF in $D_FLAGS; do
4536 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4539 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4540 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4541 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4542 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4544 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4545 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4546 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4547 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4548 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4549 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4550 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4551 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4552 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4553 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4555 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4556 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4557 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4558 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4563 QMAKE_BUILD_ERROR=no
4564 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4565 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4566 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4567 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4570 #-------------------------------------------------------------------------------
4571 # tests that need qmake
4572 #-------------------------------------------------------------------------------
4574 # detect availability of float math.h functions
4575 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4576 CFG_USE_FLOATMATH=yes
4578 CFG_USE_FLOATMATH=no
4581 # detect mmx support
4582 if [ "${CFG_MMX}" = "auto" ]; then
4583 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4590 # detect 3dnow support
4591 if [ "${CFG_3DNOW}" = "auto" ]; then
4592 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4599 # detect sse support
4600 if [ "${CFG_SSE}" = "auto" ]; then
4601 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4608 # detect sse2 support
4609 if [ "${CFG_SSE2}" = "auto" ]; then
4610 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4617 # detect sse3 support
4618 if [ "${CFG_SSE3}" = "auto" ]; then
4619 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4626 # detect ssse3 support
4627 if [ "${CFG_SSSE3}" = "auto" ]; then
4628 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4635 # detect sse4.1 support
4636 if [ "${CFG_SSE4_1}" = "auto" ]; then
4637 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
4644 # detect sse4.2 support
4645 if [ "${CFG_SSE4_2}" = "auto" ]; then
4646 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
4653 # detect avx support
4654 if [ "${CFG_AVX}" = "auto" ]; then
4655 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4662 # check iWMMXt support
4663 if [ "$CFG_IWMMXT" = "yes" ]; then
4664 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4665 if [ $? != "0" ]; then
4666 echo "The iWMMXt functionality test failed!"
4667 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4672 # detect neon support
4673 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4674 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
4681 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4684 if [ "$CFG_ZLIB" = "no" ]; then
4685 # Note: Qt no longer support builds without zlib
4686 # So we force a "no" to be "auto" here.
4687 # If you REALLY really need no zlib support, you can still disable
4688 # it by doing the following:
4689 # add "no-zlib" to mkspecs/qconfig.pri
4690 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4692 # There's no guarantee that Qt will build under those conditions
4697 if [ "$CFG_ZLIB" = "auto" ]; then
4698 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
4705 if [ "$CFG_LARGEFILE" = "auto" ]; then
4706 #Large files should be enabled for all Linux systems
4710 # detect how jpeg should be built
4711 if [ "$CFG_JPEG" = "auto" ]; then
4712 if [ "$CFG_SHARED" = "yes" ]; then
4719 if [ "$CFG_LIBJPEG" = "auto" ]; then
4720 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
4727 # detect how gif should be built
4728 if [ "$CFG_GIF" = "auto" ]; then
4729 if [ "$CFG_SHARED" = "yes" ]; then
4737 if [ "$CFG_LIBPNG" = "auto" ]; then
4738 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
4745 # detect accessibility
4746 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4747 CFG_ACCESSIBILITY=yes
4750 # auto-detect SQL-modules support
4751 for _SQLDR in $CFG_SQL_AVAILABLE; do
4754 if [ "$CFG_SQL_mysql" != "no" ]; then
4755 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4756 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4757 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4758 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4759 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4760 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4761 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4763 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4764 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4765 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4766 echo " You need MySql 4 or higher."
4767 echo " If you believe this message is in error you may use the continue"
4768 echo " switch (-continue) to $0 to continue."
4773 QT_LFLAGS_MYSQL_R=""
4777 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
4778 QMakeVar add CONFIG use_libmysqlclient_r
4779 if [ "$CFG_SQL_mysql" = "auto" ]; then
4780 CFG_SQL_mysql=plugin
4782 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4783 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
4784 if [ "$CFG_SQL_mysql" = "auto" ]; then
4785 CFG_SQL_mysql=plugin
4788 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4789 echo "MySQL support cannot be enabled due to functionality tests!"
4790 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4791 echo " If you believe this message is in error you may use the continue"
4792 echo " switch (-continue) to $0 to continue."
4797 QT_LFLAGS_MYSQL_R=""
4805 if [ "$CFG_SQL_psql" != "no" ]; then
4806 # Be careful not to use native pg_config when cross building.
4807 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4808 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4809 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4811 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4812 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4813 # But, respect PSQL_LIBS if set
4814 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4815 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
4816 if [ "$CFG_SQL_psql" = "auto" ]; then
4820 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4821 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4822 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4823 echo " If you believe this message is in error you may use the continue"
4824 echo " switch (-continue) to $0 to continue."
4835 if [ "$CFG_SQL_odbc" != "no" ]; then
4836 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
4837 if [ "$CFG_SQL_odbc" = "auto" ]; then
4841 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
4842 QT_LFLAGS_ODBC="-liodbc"
4843 if [ "$CFG_SQL_odbc" = "auto" ]; then
4847 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4848 echo "ODBC support cannot be enabled due to functionality tests!"
4849 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4850 echo " If you believe this message is in error you may use the continue"
4851 echo " switch (-continue) to $0 to continue."
4861 if [ "$CFG_SQL_oci" != "no" ]; then
4862 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
4863 if [ "$CFG_SQL_oci" = "auto" ]; then
4867 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4868 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4869 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4870 echo " If you believe this message is in error you may use the continue"
4871 echo " switch (-continue) to $0 to continue."
4880 if [ "$CFG_SQL_tds" != "no" ]; then
4881 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4882 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4883 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
4884 if [ "$CFG_SQL_tds" = "auto" ]; then
4888 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4889 echo "TDS support cannot be enabled due to functionality tests!"
4890 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4891 echo " If you believe this message is in error you may use the continue"
4892 echo " switch (-continue) to $0 to continue."
4901 if [ "$CFG_SQL_db2" != "no" ]; then
4902 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
4903 if [ "$CFG_SQL_db2" = "auto" ]; then
4907 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4908 echo "ODBC support cannot be enabled due to functionality tests!"
4909 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4910 echo " If you believe this message is in error you may use the continue"
4911 echo " switch (-continue) to $0 to continue."
4920 if [ "$CFG_SQL_ibase" != "no" ]; then
4921 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
4922 if [ "$CFG_SQL_ibase" = "auto" ]; then
4923 CFG_SQL_ibase=plugin
4926 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4927 echo "InterBase support cannot be enabled due to functionality tests!"
4928 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4929 echo " If you believe this message is in error you may use the continue"
4930 echo " switch (-continue) to $0 to continue."
4939 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4940 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
4941 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4942 CFG_SQL_sqlite2=plugin
4945 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4946 echo "SQLite2 support cannot be enabled due to functionality tests!"
4947 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4948 echo " If you believe this message is in error you may use the continue"
4949 echo " switch (-continue) to $0 to continue."
4958 if [ "$CFG_SQL_sqlite" != "no" ]; then
4959 SQLITE_AUTODETECT_FAILED="no"
4960 if [ "$CFG_SQLITE" = "system" ]; then
4961 if [ -n "$PKG_CONFIG" ]; then
4962 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4963 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4965 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
4966 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4967 CFG_SQL_sqlite=plugin
4969 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4971 SQLITE_AUTODETECT_FAILED="yes"
4974 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4975 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4976 CFG_SQL_sqlite=plugin
4979 SQLITE_AUTODETECT_FAILED="yes"
4983 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4984 echo "SQLite support cannot be enabled due to functionality tests!"
4985 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4986 echo " If you believe this message is in error you may use the continue"
4987 echo " switch (-continue) to $0 to continue."
4993 if [ "$OPT_VERBOSE" = "yes" ]; then
4994 echo "unknown SQL driver: $_SQLDR"
5000 # auto-detect NIS support
5001 if [ "$CFG_NIS" != "no" ]; then
5002 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
5005 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5006 echo "NIS support cannot be enabled due to functionality tests!"
5007 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5008 echo " If you believe this message is in error you may use the continue"
5009 echo " switch (-continue) to $0 to continue."
5017 # auto-detect CUPS support
5018 if [ "$CFG_CUPS" != "no" ]; then
5019 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
5022 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5023 echo "Cups support cannot be enabled due to functionality tests!"
5024 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5025 echo " If you believe this message is in error you may use the continue"
5026 echo " switch (-continue) to $0 to continue."
5034 # auto-detect iconv(3) support
5035 if [ "$CFG_ICONV" != "no" ]; then
5036 if [ "$PLATFORM_QWS" = "yes" -o "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
5038 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
5040 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
5042 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
5045 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5046 echo "Iconv support cannot be enabled due to functionality tests!"
5047 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5048 echo " If you believe this message is in error you may use the continue"
5049 echo " switch (-continue) to $0 to continue."
5057 # auto-detect libdbus-1 support
5058 if [ "$CFG_DBUS" != "no" ]; then
5059 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5060 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5061 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5063 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
5064 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5065 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5066 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5068 if [ "$CFG_DBUS" = "auto" ]; then
5070 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5071 # CFG_DBUS is "yes" or "linked" here
5073 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5074 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5075 echo " If you believe this message is in error you may use the continue"
5076 echo " switch (-continue) to $0 to continue."
5082 # X11/QWS/Lighthouse
5083 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5085 # auto-detect Glib support
5086 if [ "$CFG_GLIB" != "no" ]; then
5087 if [ -n "$PKG_CONFIG" ]; then
5088 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5089 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5091 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
5093 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5094 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5096 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5097 echo "Glib support cannot be enabled due to functionality tests!"
5098 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5099 echo " If you believe this message is in error you may use the continue"
5100 echo " switch (-continue) to $0 to continue."
5109 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5110 if [ -n "$PKG_CONFIG" ]; then
5111 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5112 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5114 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
5116 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5117 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5119 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5120 echo "Gstreamer support cannot be enabled due to functionality tests!"
5121 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5122 echo " If you believe this message is in error you may use the continue"
5123 echo " switch (-continue) to $0 to continue."
5129 elif [ "$CFG_GLIB" = "no" ]; then
5133 # auto-detect libicu support
5134 if [ "$CFG_ICU" != "no" ]; then
5135 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5136 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5138 if [ "$CFG_ICU" = "auto" ]; then
5140 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5143 echo "The ICU library support cannot be enabled."
5144 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5145 echo " If you believe this message is in error you may use the continue"
5146 echo " switch (-continue) to $0 to continue."
5152 # Auto-detect PulseAudio support
5153 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5154 if [ -n "$PKG_CONFIG" ]; then
5155 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5156 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5158 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
5160 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5161 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5163 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5164 echo "PulseAudio support cannot be enabled due to functionality tests!"
5165 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5166 echo " If you believe this message is in error you may use the continue"
5167 echo " switch (-continue) to $0 to continue."
5174 fi # X11/QWS/Lighthouse
5177 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5178 x11tests="$relpath/config.tests/x11"
5181 # work around broken X11 headers when using GCC 2.95 or later
5183 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5184 if [ $NOTYPE = "yes" ]; then
5185 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5186 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5189 # Check we actually have X11 :-)
5190 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5191 if [ $? != "0" ]; then
5192 echo "Basic XLib functionality test failed!"
5193 echo " You might need to modify the include and library search paths by editing"
5194 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5200 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5201 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5202 if [ "$CFG_GUI" = "no" ]; then
5203 if [ "$CFG_OPENGL" = "auto" ]; then
5206 if [ "$CFG_OPENGL" != "no" ]; then
5207 echo "OpenGL enabled, but GUI disabled."
5208 echo " You might need to either enable the GUI or disable OpenGL"
5212 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5213 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
5215 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
5217 if [ "$CFG_EGL" = "no" ]; then
5221 if [ "$CFG_OPENGL" = "yes" ]; then
5222 echo "All the OpenGL functionality tests failed!"
5223 echo " You might need to modify the include and library search paths by editing"
5224 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5225 echo " ${XQMAKESPEC}."
5232 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5233 if [ "$CFG_OPENGL" = "desktop" ]; then
5234 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5235 if [ $? != "0" ]; then
5236 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5243 elif [ "$CFG_OPENGL" = "es2" ]; then
5245 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5246 if [ $? != "0" ]; then
5247 echo "The OpenGL ES 2.0 functionality test failed!"
5248 echo " You might need to modify the include and library search paths by editing"
5249 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5250 echo " ${XQMAKESPEC}."
5253 elif [ "$CFG_OPENGL" = "desktop" ]; then
5254 # Desktop OpenGL support
5255 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5256 if [ $? != "0" ]; then
5257 echo "The OpenGL functionality test failed!"
5258 echo " You might need to modify the include and library search paths by editing"
5259 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5260 echo " ${XQMAKESPEC}."
5265 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5266 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5267 if [ $? != "0" ]; then
5268 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5275 fi # X11/MINGW OpenGL
5278 if [ "$PLATFORM_X11" = "yes" ]; then
5279 # auto-detect Xcursor support
5280 if [ "$CFG_XCURSOR" != "no" ]; then
5281 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
5282 if [ "$CFG_XCURSOR" != "runtime" ]; then
5286 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5287 echo "Xcursor 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."
5298 # auto-detect Xfixes support
5299 if [ "$CFG_XFIXES" != "no" ]; then
5300 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5301 if [ "$CFG_XFIXES" != "runtime" ]; then
5305 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5306 echo "Xfixes support cannot be enabled due to functionality tests!"
5307 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5308 echo " If you believe this message is in error you may use the continue"
5309 echo " switch (-continue) to $0 to continue."
5317 # auto-detect Xrandr support (resize and rotate extension)
5318 if [ "$CFG_XRANDR" != "no" ]; then
5319 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
5320 if [ "$CFG_XRANDR" != "runtime" ]; then
5324 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5325 echo "Xrandr 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."
5336 # auto-detect Xrender support
5337 if [ "$CFG_XRENDER" != "no" ]; then
5338 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
5341 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5342 echo "Xrender support cannot be enabled due to functionality tests!"
5343 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5344 echo " If you believe this message is in error you may use the continue"
5345 echo " switch (-continue) to $0 to continue."
5353 # auto-detect MIT-SHM support
5354 if [ "$CFG_MITSHM" != "no" ]; then
5355 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
5358 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5359 echo "MITSHM support cannot be enabled due to functionality tests!"
5360 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5361 echo " If you believe this message is in error you may use the continue"
5362 echo " switch (-continue) to $0 to continue."
5370 # auto-detect FontConfig support
5371 if [ "$CFG_FONTCONFIG" != "no" ]; then
5372 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5373 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5374 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5376 QT_CFLAGS_FONTCONFIG=
5377 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5379 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
5381 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5382 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5383 CFG_LIBFREETYPE=system
5385 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5386 echo "FontConfig support cannot be enabled due to functionality tests!"
5387 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5388 echo " If you believe this message is in error you may use the continue"
5389 echo " switch (-continue) to $0 to continue."
5397 # auto-detect Session Management support
5398 if [ "$CFG_SM" = "auto" ]; then
5399 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
5402 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5403 echo "Session Management support cannot be enabled due to functionality tests!"
5404 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5405 echo " If you believe this message is in error you may use the continue"
5406 echo " switch (-continue) to $0 to continue."
5414 # auto-detect SHAPE support
5415 if [ "$CFG_XSHAPE" != "no" ]; then
5416 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
5419 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5420 echo "XShape support cannot be enabled due to functionality tests!"
5421 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5422 echo " If you believe this message is in error you may use the continue"
5423 echo " switch (-continue) to $0 to continue."
5431 # auto-detect XVideo support
5432 if [ "$CFG_XVIDEO" != "no" ]; then
5433 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
5436 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5437 echo "XVideo support cannot be enabled due to functionality tests!"
5438 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5439 echo " If you believe this message is in error you may use the continue"
5440 echo " switch (-continue) to $0 to continue."
5448 # auto-detect XSync support
5449 if [ "$CFG_XSYNC" != "no" ]; then
5450 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
5453 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5454 echo "XSync 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 # auto-detect Xinerama support
5466 if [ "$CFG_XINERAMA" != "no" ]; then
5467 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
5468 if [ "$CFG_XINERAMA" != "runtime" ]; then
5472 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5473 echo "Xinerama support cannot be enabled due to functionality tests!"
5474 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5475 echo " If you believe this message is in error you may use the continue"
5476 echo " switch (-continue) to $0 to continue."
5484 # auto-detect Xinput support
5485 if [ "$CFG_XINPUT" != "no" ]; then
5486 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
5487 if [ "$CFG_XINPUT" != "runtime" ]; then
5491 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5492 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5493 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5494 echo " If you believe this message is in error you may use the continue"
5495 echo " switch (-continue) to $0 to continue."
5503 # auto-detect XKB support
5504 if [ "$CFG_XKB" != "no" ]; then
5505 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
5508 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5509 echo "XKB support cannot be enabled due to functionality tests!"
5510 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5511 echo " If you believe this message is in error you may use the continue"
5512 echo " switch (-continue) to $0 to continue."
5520 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5521 if [ -n "$PKG_CONFIG" ]; then
5522 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5523 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5525 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5527 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5528 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5530 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5531 echo "Gtk theme support cannot be enabled due to functionality tests!"
5532 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5533 echo " If you believe this message is in error you may use the continue"
5534 echo " switch (-continue) to $0 to continue."
5540 elif [ "$CFG_GLIB" = "no" ]; then
5546 if [ "$PLATFORM_MAC" = "yes" ]; then
5547 if [ "$CFG_PHONON" != "no" ]; then
5548 # Always enable Phonon (unless it was explicitly disabled)
5552 if [ "$CFG_COREWLAN" = "auto" ]; then
5553 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
5562 if [ "$PLATFORM_QPA" = "yes" ]; then
5563 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5564 if [ "$PLATFORM_MAC" = "yes" ]; then
5566 elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5567 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
5569 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
5572 if [ "$CFG_OPENGL" = "yes" ]; then
5573 echo "All the OpenGL functionality tests failed!"
5574 echo " You might need to modify the include and library search paths by editing"
5575 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5576 echo " ${XQMAKESPEC}."
5581 elif [ "$CFG_OPENGL" = "es2" ]; then
5583 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5584 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
5585 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
5586 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5587 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5588 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5589 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5590 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5593 "$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
5594 if [ $? != "0" ]; then
5595 echo "The OpenGL ES 2.0 functionality test failed!"
5596 echo " You might need to modify the include and library search paths by editing"
5597 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5598 echo " ${XQMAKESPEC}."
5601 elif [ "$CFG_OPENGL" = "desktop" ]; then
5602 # Desktop OpenGL support
5603 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5604 if [ $? != "0" ]; then
5605 echo "The OpenGL functionality test failed!"
5606 echo " You might need to modify the include and library search paths by editing"
5607 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5608 echo " ${XQMAKESPEC}."
5613 # auto-detect FontConfig support
5614 if [ "$CFG_FONTCONFIG" != "no" ]; then
5615 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5616 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5617 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5619 QT_CFLAGS_FONTCONFIG=
5620 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5622 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
5623 QT_CONFIG="$QT_CONFIG fontconfig"
5624 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5625 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5626 CFG_LIBFREETYPE=system
5631 # Save these for a check later
5632 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5633 ORIG_CFG_XCB="$CFG_XCB"
5635 if [ "$CFG_WAYLAND" != "no" ]; then
5636 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5637 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5638 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5639 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
5640 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
5642 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
5644 QT_CONFIG="$QT_CONFIG wayland"
5645 elif [ "$CFG_WAYLAND" = "yes" ]; then
5646 echo "The Wayland functionality test failed!"
5650 QMakeVar add DEFINES QT_NO_WAYLAND
5654 # Check we actually have X11 :-)
5655 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
5656 QT_CONFIG="$QT_CONFIG xlib"
5659 # auto-detect Xrender support
5660 if [ "$CFG_XRENDER" != "no" ]; then
5661 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
5663 QT_CONFIG="$QT_CONFIG xrender"
5665 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5666 echo "Xrender support cannot be enabled due to functionality tests!"
5667 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5668 echo " If you believe this message is in error you may use the continue"
5669 echo " switch (-continue) to $0 to continue."
5677 if [ "$CFG_XCB" != "no" ]; then
5678 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
5680 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
5681 QT_CONFIG="$QT_CONFIG xcb-render"
5684 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
5686 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5689 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
5690 QT_CONFIG="$QT_CONFIG xcb-xlib"
5693 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5694 # auto-detect XInput2/Xinput support
5695 if [ "$CFG_XINPUT2" != "no" ]; then
5696 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
5700 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5701 echo "XInput2 support cannot be enabled due to functionality tests!"
5702 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5703 echo " If you believe this message is in error you may use the continue"
5704 echo " switch (-continue) to $0 to continue."
5713 if [ "$CFG_XCB" = "yes" ]; then
5714 echo "The XCB test failed!"
5715 echo " You might need to install dependency packages."
5716 echo " See src/plugins/platforms/xcb/README."
5720 QMakeVar add DEFINES QT_NO_XCB
5724 # Detect libxkbcommon
5725 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5726 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5727 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5728 if [ "$CFG_WAYLAND" = "yes" ]; then
5729 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5730 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5732 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5733 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5735 if [ "$CFG_WAYLAND" = "yes" ]; then
5736 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5738 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5741 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5742 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5743 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5744 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5745 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5746 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5747 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5750 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5751 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5752 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5753 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5756 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
5757 QT_CONFIG="$QT_CONFIG coreservices"
5759 QMakeVar add DEFINES QT_NO_CORESERVICES
5762 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5763 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5764 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5765 echo "No QPA platform plugin enabled!"
5766 echo " If you really want to build without a QPA platform plugin you must pass"
5767 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5768 echo " cannot run GUI applications."
5778 if [ "$PLATFORM_QWS" = "yes" ]; then
5780 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5781 if [ "$CFG_GUI" = "no" ]; then
5782 if [ "$CFG_OPENGL" = "auto" ]; then
5785 if [ "$CFG_OPENGL" != "no" ]; then
5786 echo "OpenGL enabled, but GUI disabled."
5787 echo " You might need to either enable the GUI or disable OpenGL"
5791 if [ "$CFG_OPENGL" = "yes" ]; then
5793 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
5796 elif [ "$CFG_OPENGL" = "es2" ]; then
5798 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5799 if [ $? != "0" ]; then
5800 echo "The OpenGL ES 2.0 functionality test failed!"
5801 echo " You might need to modify the include and library search paths by editing"
5802 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5803 echo " ${XQMAKESPEC}."
5807 elif [ "$CFG_OPENGL" = "desktop" ]; then
5808 # Desktop OpenGL support
5809 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5814 if [ "$PLATFORM_QWS" = "yes" ]; then
5817 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5818 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5819 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5820 if [ $? != "0" ]; then
5821 echo "The Ahi screen driver functionality test failed!"
5822 echo " You might need to modify the include and library search paths by editing"
5823 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5824 echo " ${XQMAKESPEC}."
5829 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5830 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5831 if [ $? != "0" ]; then
5832 echo "The SVGAlib screen driver functionality test failed!"
5833 echo " You might need to modify the include and library search paths by editing"
5834 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5835 echo " ${XQMAKESPEC}."
5840 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5841 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
5842 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5843 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
5844 elif directfb-config --version >/dev/null 2>&1; then
5845 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
5846 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
5849 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5850 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
5851 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
5852 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
5855 "$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
5856 if [ $? != "0" ]; then
5857 echo "The DirectFB screen driver functionality test failed!"
5858 echo " You might need to modify the include and library search paths by editing"
5859 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5860 echo " ${XQMAKESPEC}."
5868 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5869 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5870 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5871 if [ $? != "0" ]; then
5872 echo "The tslib functionality test failed!"
5873 echo " You might need to modify the include and library search paths by editing"
5874 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5875 echo " ${XQMAKESPEC}."
5884 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
5885 if [ $? != "0" ]; then
5886 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
5893 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
5894 if [ "$CFG_EGL" != "no" ]; then
5895 # detect EGL support
5896 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
5897 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5902 if [ "$EGL_VARIANT" = "none" ]; then
5903 if [ "$CFG_EGL" = "yes" ]; then
5904 echo "The EGL functionality test failed!"
5905 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5906 echo " You might need to modify the include and library search paths by editing"
5907 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5908 echo " ${XQMAKESPEC}."
5912 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5913 if [ "$CFG_OPENGL" = "es2" ]; then
5920 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5923 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
5924 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
5925 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5926 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5927 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
5928 CFG_LIBFREETYPE=system
5934 if [ "$CFG_ENDIAN" = "auto" ]; then
5935 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5936 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5937 elif [ "$PLATFORM_MAC" = "yes" ]; then
5940 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5942 if [ "$F" -eq 0 ]; then
5943 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5944 elif [ "$F" -eq 1 ]; then
5945 CFG_ENDIAN="Q_BIG_ENDIAN"
5948 echo "The target system byte order could not be detected!"
5949 echo "Turn on verbose messaging (-v) to see the final report."
5950 echo "You can use the -little-endian or -big-endian switch to"
5951 echo "$0 to continue."
5957 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5958 if [ "$PLATFORM_MAC" = "yes" ]; then
5961 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5963 if [ "$F" -eq 0 ]; then
5964 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5965 elif [ "$F" -eq 1 ]; then
5966 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5969 echo "The host system byte order could not be detected!"
5970 echo "Turn on verbose messaging (-v) to see the final report."
5971 echo "You can use the -host-little-endian or -host-big-endian switch to"
5972 echo "$0 to continue."
5978 if [ "$CFG_ARMFPA" != "auto" ]; then
5979 if [ "$CFG_ARMFPA" = "yes" ]; then
5980 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5981 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5983 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5986 CFG_DOUBLEFORMAT="normal"
5991 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5992 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5993 CFG_DOUBLEFORMAT=normal
5995 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5997 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5998 CFG_DOUBLEFORMAT=normal
5999 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6000 CFG_DOUBLEFORMAT=normal
6001 elif [ "$F" -eq 10 ]; then
6002 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6003 elif [ "$F" -eq 11 ]; then
6004 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6005 elif [ "$F" -eq 12 ]; then
6006 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6008 elif [ "$F" -eq 13 ]; then
6009 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6013 echo "The system floating point format could not be detected."
6014 echo "This may cause data to be generated in a wrong format"
6015 echo "Turn on verbose messaging (-v) to see the final report."
6016 # we do not fail on this since this is a new test, and if it fails,
6017 # the old behavior should be correct in most cases
6018 CFG_DOUBLEFORMAT=normal
6024 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6028 if [ "$CFG_STL" != "no" ]; then
6029 if [ "$HAVE_STL" = "yes" ]; then
6032 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6033 echo "STL support cannot be enabled due to functionality tests!"
6034 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6035 echo " If you believe this message is in error you may use the continue"
6036 echo " switch (-continue) to $0 to continue."
6044 # detect POSIX clock_gettime()
6045 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6046 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
6047 CFG_CLOCK_GETTIME=yes
6049 CFG_CLOCK_GETTIME=no
6053 # detect POSIX monotonic clocks
6054 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6055 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
6056 CFG_CLOCK_MONOTONIC=yes
6058 CFG_CLOCK_MONOTONIC=no
6060 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6061 CFG_CLOCK_MONOTONIC=no
6065 if [ "$CFG_MREMAP" = "auto" ]; then
6066 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6073 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6074 if [ "$CFG_GETADDRINFO" != "no" ]; then
6075 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6078 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6079 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6080 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6081 echo " If you believe this message is in error you may use the continue"
6082 echo " switch (-continue) to $0 to continue."
6090 # find if the platform provides inotify
6091 if [ "$CFG_INOTIFY" != "no" ]; then
6092 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6095 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6096 echo "inotify support cannot be enabled due to functionality tests!"
6097 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6098 echo " If you believe this message is in error you may use the continue"
6099 echo " switch (-continue) to $0 to continue."
6107 # find if the platform provides if_nametoindex (ipv6 interface name support)
6108 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6109 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
6112 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6113 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6114 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6115 echo " If you believe this message is in error you may use the continue"
6116 echo " switch (-continue) to $0 to continue."
6124 # find if the platform provides getifaddrs (network interface enumeration)
6125 if [ "$CFG_GETIFADDRS" != "no" ]; then
6126 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6129 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6130 echo "getifaddrs support cannot be enabled due to functionality tests!"
6131 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6132 echo " If you believe this message is in error you may use the continue"
6133 echo " switch (-continue) to $0 to continue."
6142 if [ "$CFG_OPENSSL" != "no" ]; then
6143 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
6144 if [ "$CFG_OPENSSL" = "auto" ]; then
6148 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6149 echo "OpenSSL support cannot be enabled due to functionality tests!"
6150 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6151 echo " If you believe this message is in error you may use the continue"
6152 echo " switch (-continue) to $0 to continue."
6161 if [ "$CFG_PCRE" != "qt" ]; then
6162 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
6165 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6166 echo "PCRE support cannot be enabled due to functionality tests!"
6167 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6168 echo " If you believe this message is in error you may use the continue"
6169 echo " switch (-continue) to $0 to continue."
6177 # detect OpenVG support
6178 if [ "$CFG_OPENVG" != "no" ]; then
6179 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
6180 if [ "$CFG_OPENVG" = "auto" ]; then
6183 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
6184 if [ "$CFG_OPENVG" = "auto" ]; then
6187 CFG_OPENVG_ON_OPENGL=yes
6188 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
6189 if [ "$CFG_OPENVG" = "auto" ]; then
6192 CFG_OPENVG_LC_INCLUDES=yes
6193 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
6194 if [ "$CFG_OPENVG" = "auto" ]; then
6197 CFG_OPENVG_LC_INCLUDES=yes
6198 CFG_OPENVG_ON_OPENGL=yes
6200 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6201 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6202 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6203 echo " If you believe this message is in error you may use the continue"
6204 echo " switch (-continue) to $0 to continue."
6210 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
6211 CFG_OPENVG_SHIVA=yes
6215 if [ "$CFG_ALSA" = "auto" ]; then
6216 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6223 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6224 if [ "$CFG_ARCH" = "arm" ]; then
6225 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6226 if [ $? != "0" ]; then
6227 CFG_JAVASCRIPTCORE_JIT=no
6230 case "$XPLATFORM" in
6232 CFG_JAVASCRIPTCORE_JIT=no
6238 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6239 QMakeVar set JAVASCRIPTCORE_JIT yes
6240 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6241 QMakeVar set JAVASCRIPTCORE_JIT no
6244 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6245 CFG_AUDIO_BACKEND=yes
6248 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6249 echo "Warning: largefile support cannot be disabled for win32."
6253 #-------------------------------------------------------------------------------
6254 # ask for all that hasn't been auto-detected or specified in the arguments
6255 #-------------------------------------------------------------------------------
6257 ### fix this: user input should be validated in a loop
6258 if [ "$PLATFORM_QWS" = "yes" ]; then
6259 PROMPT_FOR_DEPTHS="yes"
6261 PROMPT_FOR_DEPTHS="no"
6263 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6265 echo "Choose pixel-depths to support:"
6267 echo " 1. 1bpp, black/white"
6268 echo " 4. 4bpp, grayscale"
6269 echo " 8. 8bpp, paletted"
6270 echo " 12. 12bpp, rgb 4-4-4"
6271 echo " 15. 15bpp, rgb 5-5-5"
6272 echo " 16. 16bpp, rgb 5-6-5"
6273 echo " 18. 18bpp, rgb 6-6-6"
6274 echo " 24. 24bpp, rgb 8-8-8"
6275 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6276 echo " all. All supported depths"
6278 echo "Your choices (default 8,16,32):"
6280 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6281 CFG_QWS_DEPTHS=8,16,32
6284 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6285 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6286 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6288 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6290 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6291 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6296 # enable dwarf2 support on Mac
6297 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6298 QT_CONFIG="$QT_CONFIG dwarf2"
6301 # Set the default arch if there are no "-arch" arguments on the configure line
6302 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6303 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6304 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6305 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6309 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6310 QT_CONFIG="$QT_CONFIG phonon-backend"
6313 # disable accessibility
6314 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6315 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6317 QT_CONFIG="$QT_CONFIG accessibility"
6320 # egl stuff does not belong in lighthouse, but rather in plugins
6321 if [ "$PLATFORM_QPA" = "yes" ]; then
6326 if [ "$CFG_EGL" = "no" ]; then
6327 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6329 QT_CONFIG="$QT_CONFIG egl"
6330 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6331 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6336 if [ "$CFG_OPENVG" = "no" ]; then
6337 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6339 QT_CONFIG="$QT_CONFIG openvg"
6340 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6341 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6343 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6344 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6346 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6347 QT_CONFIG="$QT_CONFIG shivavg"
6348 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6353 if [ "$CFG_OPENGL" = "no" ]; then
6354 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6356 QT_CONFIG="$QT_CONFIG opengl"
6359 if [ "$CFG_OPENGL" = "es2" ]; then
6360 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6363 if [ "$CFG_OPENGL" = "es2" ]; then
6364 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6365 QT_CONFIG="$QT_CONFIG opengles2"
6368 # safe execution environment
6369 if [ "$CFG_SXE" != "no" ]; then
6370 QT_CONFIG="$QT_CONFIG sxe"
6373 # build up the variables for output
6374 if [ "$CFG_DEBUG" = "yes" ]; then
6375 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6376 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6377 elif [ "$CFG_DEBUG" = "no" ]; then
6378 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6379 QMAKE_CONFIG="$QMAKE_CONFIG release"
6381 if [ "$CFG_SHARED" = "yes" ]; then
6382 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6383 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6384 elif [ "$CFG_SHARED" = "no" ]; then
6385 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6386 QMAKE_CONFIG="$QMAKE_CONFIG static"
6388 if [ "$PLATFORM_QWS" = "yes" ]; then
6389 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6390 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6391 QT_CONFIG="$QT_CONFIG embedded"
6392 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6394 if [ "$PLATFORM_QPA" = "yes" ]; then
6395 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6396 QT_CONFIG="$QT_CONFIG qpa"
6397 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6398 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6401 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6402 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6403 QT_CONFIG="$QT_CONFIG nacl pepper"
6404 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6407 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6408 # Do not set this here for Windows. Let qmake do it so
6409 # debug and release precompiled headers are kept separate.
6410 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6412 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6413 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6414 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6415 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6416 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6417 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6419 if [ "$CFG_STL" = "no" ]; then
6420 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6422 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6424 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6425 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6427 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6428 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6429 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6430 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6431 QMakeVar add QMAKE_CFLAGS -g
6432 QMakeVar add QMAKE_CXXFLAGS -g
6433 QT_CONFIG="$QT_CONFIG separate_debug_info"
6435 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6436 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6438 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6439 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6440 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6441 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6442 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6443 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6444 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6445 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6446 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6447 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6448 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6449 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6450 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6451 QT_CONFIG="$QT_CONFIG clock-gettime"
6453 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6454 QT_CONFIG="$QT_CONFIG clock-monotonic"
6456 if [ "$CFG_MREMAP" = "yes" ]; then
6457 QT_CONFIG="$QT_CONFIG mremap"
6459 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6460 QT_CONFIG="$QT_CONFIG getaddrinfo"
6462 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6463 QT_CONFIG="$QT_CONFIG ipv6ifname"
6465 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6466 QT_CONFIG="$QT_CONFIG getifaddrs"
6468 if [ "$CFG_INOTIFY" = "yes" ]; then
6469 QT_CONFIG="$QT_CONFIG inotify"
6471 if [ "$CFG_LIBJPEG" = "no" ]; then
6473 elif [ "$CFG_LIBJPEG" = "system" ]; then
6474 QT_CONFIG="$QT_CONFIG system-jpeg"
6476 if [ "$CFG_JPEG" = "no" ]; then
6477 QT_CONFIG="$QT_CONFIG no-jpeg"
6478 elif [ "$CFG_JPEG" = "yes" ]; then
6479 QT_CONFIG="$QT_CONFIG jpeg"
6481 if [ "$CFG_LIBPNG" = "no" ]; then
6484 if [ "$CFG_LIBPNG" = "system" ]; then
6485 QT_CONFIG="$QT_CONFIG system-png"
6487 if [ "$CFG_PNG" = "no" ]; then
6488 QT_CONFIG="$QT_CONFIG no-png"
6489 elif [ "$CFG_PNG" = "yes" ]; then
6490 QT_CONFIG="$QT_CONFIG png"
6492 if [ "$CFG_GIF" = "no" ]; then
6493 QT_CONFIG="$QT_CONFIG no-gif"
6494 elif [ "$CFG_GIF" = "yes" ]; then
6495 QT_CONFIG="$QT_CONFIG gif"
6497 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6498 QT_CONFIG="$QT_CONFIG no-freetype"
6499 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6500 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6501 QT_CONFIG="$QT_CONFIG system-freetype"
6503 QT_CONFIG="$QT_CONFIG freetype"
6505 if [ "$CFG_GUI" = "auto" ]; then
6508 if [ "$CFG_GUI" = "no" ]; then
6509 QT_CONFIG="$QT_CONFIG no-gui"
6511 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6515 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6516 #On Mac we implicitly link against libz, so we
6517 #never use the 3rdparty stuff.
6518 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6520 if [ "$CFG_ZLIB" = "yes" ]; then
6521 QT_CONFIG="$QT_CONFIG zlib"
6522 elif [ "$CFG_ZLIB" = "system" ]; then
6523 QT_CONFIG="$QT_CONFIG system-zlib"
6526 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6527 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6528 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6529 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6530 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6531 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6532 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6533 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6534 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6535 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6536 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6537 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6538 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6539 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6540 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6542 if [ "$PLATFORM_X11" = "yes" ]; then
6543 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6545 # for some reason, the following libraries are not always built shared,
6546 # so *every* program/lib (including Qt) has to link against them
6547 if [ "$CFG_XSHAPE" = "yes" ]; then
6548 QT_CONFIG="$QT_CONFIG xshape"
6550 if [ "$CFG_XVIDEO" = "yes" ]; then
6551 QT_CONFIG="$QT_CONFIG xvideo"
6553 if [ "$CFG_XSYNC" = "yes" ]; then
6554 QT_CONFIG="$QT_CONFIG xsync"
6556 if [ "$CFG_XINERAMA" = "yes" ]; then
6557 QT_CONFIG="$QT_CONFIG xinerama"
6558 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6560 if [ "$CFG_XCURSOR" = "yes" ]; then
6561 QT_CONFIG="$QT_CONFIG xcursor"
6562 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6564 if [ "$CFG_XFIXES" = "yes" ]; then
6565 QT_CONFIG="$QT_CONFIG xfixes"
6566 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6568 if [ "$CFG_XRANDR" = "yes" ]; then
6569 QT_CONFIG="$QT_CONFIG xrandr"
6570 if [ "$CFG_XRENDER" != "yes" ]; then
6571 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6572 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6574 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6577 if [ "$CFG_XRENDER" = "yes" ]; then
6578 QT_CONFIG="$QT_CONFIG xrender"
6579 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6581 if [ "$CFG_MITSHM" = "yes" ]; then
6582 QT_CONFIG="$QT_CONFIG mitshm"
6584 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6585 QT_CONFIG="$QT_CONFIG fontconfig"
6587 if [ "$CFG_XINPUT" = "yes" ]; then
6588 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6590 if [ "$CFG_XINPUT" = "yes" ]; then
6591 QT_CONFIG="$QT_CONFIG xinput tablet"
6593 if [ "$CFG_XKB" = "yes" ]; then
6594 QT_CONFIG="$QT_CONFIG xkb"
6598 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6599 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6600 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6602 if [ "$PLATFORM_MAC" = "yes" ]; then
6603 if [ "$CFG_RPATH" = "yes" ]; then
6604 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6606 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
6607 if [ -n "$RPATH_FLAGS" ]; then
6609 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6613 elif [ "$CFG_RPATH" = "yes" ]; then
6614 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6618 if [ "$CFG_RPATH" = "yes" ]; then
6619 # set the default rpath to the library installation directory
6620 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6622 if [ -n "$RPATH_FLAGS" ]; then
6623 # add the user defined rpaths
6624 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6628 if [ '!' -z "$I_FLAGS" ]; then
6629 # add the user define include paths
6630 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6631 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6634 if [ '!' -z "$W_FLAGS" ]; then
6635 # add the user defined warning flags
6636 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6637 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6638 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6641 # turn off exceptions for the compilers that support it
6642 if [ "$PLATFORM_QWS" = "yes" ]; then
6643 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6644 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
6645 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6647 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6649 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6653 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6654 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6657 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6658 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6659 # Follow default behavior of configure.exe by overriding with "rtti".
6660 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6663 if [ "$CFG_ALSA" = "yes" ]; then
6664 QT_CONFIG="$QT_CONFIG alsa"
6667 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6668 QT_CONFIG="$QT_CONFIG pulseaudio"
6671 if [ "$CFG_COREWLAN" = "yes" ]; then
6672 QT_CONFIG="$QT_CONFIG corewlan"
6675 if [ "$CFG_ICU" = "yes" ]; then
6676 QT_CONFIG="$QT_CONFIG icu"
6679 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6680 QT_CONFIG="$QT_CONFIG force_asserts"
6683 if [ "$CFG_PCRE" = "qt" ]; then
6684 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6688 # Some Qt modules are too advanced in C++ for some old compilers
6689 # Detect here the platforms where they are known to work.
6691 # See Qt documentation for more information on which features are
6692 # supported and on which compilers.
6694 canBuildQtConcurrent="yes"
6695 canUseV8Snapshot="yes"
6697 case "$XPLATFORM" in
6699 # PA-RISC's assembly is too limited
6700 # gcc 3.4 on that platform can't build QtXmlPatterns
6701 # the assembly it generates cannot be compiled
6703 # Check gcc's version
6704 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6708 canBuildQtXmlPatterns="no"
6712 canBuildQtXmlPatterns="no"
6716 unsupported/vxworks-*-g++*)
6719 unsupported/vxworks-*-dcc*)
6721 canBuildQtXmlPatterns="no"
6724 # Check gcc's version
6725 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6733 canBuildQtXmlPatterns="no"
6738 # Check the compiler version
6739 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6742 canBuildQtXmlPatterns="no"
6743 canBuildQtConcurrent="no"
6747 canBuildQtConcurrent="no"
6753 canBuildQtXmlPatterns="no"
6754 canBuildQtConcurrent="no"
6760 # Get the xlC version
6761 cat > xlcver.c <<EOF
6765 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6770 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6771 xlcver=`./xlcver 2>/dev/null`
6774 if [ "$OPT_VERBOSE" = "yes" ]; then
6775 if [ -n "$xlcver" ]; then
6776 echo Found IBM xlC version: $xlcver.
6778 echo Could not determine IBM xlC version, assuming oldest supported.
6785 canBuildQtXmlPatterns="no"
6786 canBuildQtConcurrent="no"
6790 canBuildQtConcurrent="no"
6796 canBuildQtConcurrent="no"
6800 if [ "$CFG_GUI" = "no" ]; then
6801 # WebKit requires QtGui
6805 if [ "$CFG_SHARED" = "no" ]; then
6807 echo "WARNING: Using static linking will disable the WebKit module."
6812 CFG_CONCURRENT="yes"
6813 if [ "$canBuildQtConcurrent" = "no" ]; then
6814 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6817 QT_CONFIG="$QT_CONFIG concurrent"
6821 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6822 QT_CONFIG="$QT_CONFIG audio-backend"
6826 if [ "$CFG_WEBKIT" = "debug" ]; then
6827 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6831 QT_CONFIG="$QT_CONFIG v8"
6832 # Detect snapshot support
6833 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6834 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6837 *) canUseV8Snapshot="no"
6841 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6842 # QEMU crashes when building inside Scratchbox with an ARM target
6843 canUseV8Snapshot="no"
6846 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6847 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6849 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6850 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6853 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6854 QT_CONFIG="$QT_CONFIG v8snapshot"
6858 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6859 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6862 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6865 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6866 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6867 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6872 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6873 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6874 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6881 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6887 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6889 case "$COMPILER_VERSION" in
6891 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6892 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6893 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6896 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6897 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6898 QT_GCC_PATCH_VERSION=0
6908 #-------------------------------------------------------------------------------
6909 # part of configuration information goes into qconfig.h
6910 #-------------------------------------------------------------------------------
6912 case "$CFG_QCONFIG" in
6914 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6917 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6918 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6919 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6920 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6921 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6922 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6924 echo "#endif" >>"$tmpconfig"
6928 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6932 # define QT_EDITION $QT_EDITION
6935 /* Machine byte-order */
6936 #define Q_BIG_ENDIAN 4321
6937 #define Q_LITTLE_ENDIAN 1234
6940 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6941 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6942 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6943 #if defined(__BIG_ENDIAN__)
6944 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6945 #elif defined(__LITTLE_ENDIAN__)
6946 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6948 # error "Unable to determine byte order!"
6952 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6954 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6955 if [ "$CFG_ENDIAN" = "auto" ]; then
6956 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6957 #if defined(__BIG_ENDIAN__)
6958 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6959 #elif defined(__LITTLE_ENDIAN__)
6960 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6962 # error "Unable to determine byte order!"
6966 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6968 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6970 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6971 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6972 /* Non-IEEE double format */
6973 #define Q_DOUBLE_LITTLE "01234567"
6974 #define Q_DOUBLE_BIG "76543210"
6975 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6976 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6977 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6980 if [ "$CFG_ARMFPA" = "yes" ]; then
6981 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6982 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6983 #ifndef QT_BOOTSTRAPPED
6988 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6992 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6993 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6994 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6995 /* Machine Architecture */
6996 #ifndef QT_BOOTSTRAPPED
6997 # define QT_ARCH_${CFG_ARCH_STR}
6999 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7003 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7004 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7006 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7007 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7010 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7011 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7014 if [ "$PLATFORM_MAC" = "yes" ]; then
7015 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7016 #if defined(__LP64__)
7017 # define QT_POINTER_SIZE 8
7019 # define QT_POINTER_SIZE 4
7023 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7024 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7028 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7030 if [ "$CFG_DEV" = "yes" ]; then
7031 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7034 # Embedded compile time options
7035 if [ "$PLATFORM_QWS" = "yes" ]; then
7036 # Add QWS to config.h
7037 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7039 # Add excluded decorations to $QCONFIG_FLAGS
7040 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7041 for decor in $decors; do
7042 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7043 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7046 # Figure which embedded drivers which are turned off
7047 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7048 for ADRIVER in $CFG_GFX_ON; do
7049 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7052 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7053 # the um driver is currently not in the available list for external builds
7054 if [ "$CFG_DEV" = "no" ]; then
7055 CFG_KBD_OFF="$CFG_KBD_OFF um"
7057 for ADRIVER in $CFG_KBD_ON; do
7058 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7061 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7062 for ADRIVER in $CFG_MOUSE_ON; do
7063 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7066 for DRIVER in $CFG_GFX_OFF; do
7067 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7068 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7071 for DRIVER in $CFG_KBD_OFF; do
7072 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7073 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7076 for DRIVER in $CFG_MOUSE_OFF; do
7077 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7078 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7082 if [ "$PLATFORM_QPA" = "yes" ]; then
7083 # Add QPA to config.h
7084 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7087 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7088 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7091 # Add turned on SQL drivers
7092 for DRIVER in $CFG_SQL_AVAILABLE; do
7093 eval "VAL=\$CFG_SQL_$DRIVER"
7096 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7097 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7098 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7101 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7107 QMakeVar set sql-drivers "$SQL_DRIVERS"
7108 QMakeVar set sql-plugins "$SQL_PLUGINS"
7110 # Add other configuration options to the qconfig.h file
7111 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7112 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7113 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7114 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7115 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7116 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7117 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7119 # X11/Unix/Mac only configs
7120 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7121 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7122 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7123 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7124 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7125 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7126 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7127 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7128 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7129 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7130 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7131 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7132 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7133 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7134 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7136 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7137 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7138 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7139 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7140 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7141 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7142 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7143 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7144 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7145 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7146 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7147 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7148 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7150 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7151 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7152 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7153 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7154 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7155 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7156 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7157 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7159 # sort QCONFIG_FLAGS for neatness if we can
7160 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7161 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7163 if [ -n "$QCONFIG_FLAGS" ]; then
7164 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7165 #ifndef QT_BOOTSTRAPPED
7168 for cfg in $QCONFIG_FLAGS; do
7169 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7170 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7171 # figure out define logic, so we can output the correct
7172 # ifdefs to override the global defines in a project
7174 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7175 # QT_NO_option can be forcefully turned on by QT_option
7176 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7177 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7178 # QT_option can be forcefully turned off by QT_NO_option
7179 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7182 if [ -z $cfgdNeg ]; then
7183 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7190 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7191 #if defined($cfgd) && defined($cfgdNeg)
7193 #elif !defined($cfgd) && !defined($cfgdNeg)
7200 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7201 #endif // QT_BOOTSTRAPPED
7206 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7207 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7208 #define QT_VISIBILITY_AVAILABLE
7213 if [ -n "$QT_LIBINFIX" ]; then
7214 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7215 #define QT_LIBINFIX "$QT_LIBINFIX"
7220 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7221 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7222 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7224 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7225 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7226 chmod -w "$outpath/src/corelib/global/qconfig.h"
7227 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7228 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7232 #-------------------------------------------------------------------------------
7233 # save configuration into qconfig.pri
7234 #-------------------------------------------------------------------------------
7235 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7236 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7237 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7238 if [ "$CFG_DEBUG" = "yes" ]; then
7239 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7240 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7241 QT_CONFIG="$QT_CONFIG release"
7243 QT_CONFIG="$QT_CONFIG debug"
7244 elif [ "$CFG_DEBUG" = "no" ]; then
7245 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7246 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7247 QT_CONFIG="$QT_CONFIG debug"
7249 QT_CONFIG="$QT_CONFIG release"
7251 if [ "$CFG_STL" = "yes" ]; then
7252 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7254 if [ "$CFG_FRAMEWORK" = "no" ]; then
7255 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7257 QT_CONFIG="$QT_CONFIG qt_framework"
7258 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7260 if [ "$BUILD_ON_MAC" = "yes" ]; then
7261 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7263 if [ "$CFG_DEV" = "yes" ]; then
7264 QT_CONFIG="$QT_CONFIG private_tests"
7267 # Make the application arch follow the Qt arch for single arch builds.
7268 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7269 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7270 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7273 cat >>"$QTCONFIG.tmp" <<EOF
7275 CONFIG += $QTCONFIG_CONFIG
7277 QT_EDITION = $Edition
7278 QT_CONFIG += $QT_CONFIG
7281 QT_VERSION = $QT_VERSION
7282 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7283 QT_MINOR_VERSION = $QT_MINOR_VERSION
7284 QT_PATCH_VERSION = $QT_PATCH_VERSION
7287 QT_LIBINFIX = $QT_LIBINFIX
7288 QT_NAMESPACE = $QT_NAMESPACE
7289 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7292 if [ -n "$CFG_SYSROOT" ]; then
7293 echo "# sysroot" >>"$QTCONFIG.tmp"
7294 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7295 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7296 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7297 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7298 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7299 echo "}" >> "$QTCONFIG.tmp"
7300 echo >> "$QTCONFIG.tmp"
7302 if [ "$CFG_RPATH" = "yes" ]; then
7303 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7305 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7306 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7307 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7308 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7311 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7312 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7313 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7316 # replace qconfig.pri if it differs from the newly created temp file
7317 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7318 rm -f "$QTCONFIG.tmp"
7320 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7323 #-------------------------------------------------------------------------------
7324 # save configuration into qmodule.pri
7325 #-------------------------------------------------------------------------------
7326 QTMODULE="$outpath/mkspecs/qmodule.pri"
7328 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7330 # Ensure we can link to uninistalled libraries
7331 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7332 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7334 if [ -n "$QT_CFLAGS_PSQL" ]; then
7335 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7337 if [ -n "$QT_LFLAGS_PSQL" ]; then
7338 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7340 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7341 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7343 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7344 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7346 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7347 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7349 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7350 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7352 if [ -n "$QT_LFLAGS_ODBC" ]; then
7353 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7355 if [ -n "$QT_LFLAGS_TDS" ]; then
7356 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
7359 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7360 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
7363 #dump in the OPENSSL_LIBS info
7364 if [ '!' -z "$OPENSSL_LIBS" ]; then
7365 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
7366 elif [ "$CFG_OPENSSL" = "linked" ]; then
7367 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
7370 #dump in the SDK info
7371 if [ '!' -z "$CFG_SDK" ]; then
7372 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
7375 # mac gcc -Xarch support
7376 if [ "$CFG_MAC_XARCH" = "no" ]; then
7377 echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
7381 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
7382 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7384 # replace qmodule.pri if it differs from the newly created temp file
7385 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
7386 rm -f "$QTMODULE.tmp"
7388 mv -f "$QTMODULE.tmp" "$QTMODULE"
7391 #-------------------------------------------------------------------------------
7392 # save configuration into .qmake.cache
7393 #-------------------------------------------------------------------------------
7395 CACHEFILE="$outpath/.qmake.cache"
7396 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7397 cat >>"$CACHEFILE.tmp" <<EOF
7399 QT_SOURCE_TREE = \$\$quote($relpath)
7400 QT_BUILD_TREE = \$\$quote($outpath)
7401 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7403 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7404 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7405 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7406 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7407 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7408 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7410 include(\$\$PWD/mkspecs/qmodule.pri)
7411 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
7412 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7413 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7417 #dump the qmake spec
7418 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7419 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7421 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7426 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7427 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7428 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7429 # don't need to worry about generated files
7430 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7431 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7433 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7435 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7436 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7439 # replace .qmake.cache if it differs from the newly created temp file
7440 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7441 rm -f "$CACHEFILE.tmp"
7443 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7446 #-------------------------------------------------------------------------------
7447 # give feedback on configuration
7448 #-------------------------------------------------------------------------------
7452 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7455 This target is using the GNU C++ compiler ($PLATFORM).
7457 Recent versions of this compiler automatically include code for
7458 exceptions, which increase both the size of the Qt libraries and
7459 the amount of memory taken by your applications.
7461 You may choose to re-run `basename $0` with the -no-exceptions
7462 option to compile Qt without exceptions. This is completely binary
7463 compatible, and existing applications will continue to work.
7471 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7474 This target is using the MIPSpro C++ compiler ($PLATFORM).
7476 You may choose to re-run `basename $0` with the -no-exceptions
7477 option to compile Qt without exceptions. This will make the
7478 size of the Qt library smaller and reduce the amount of memory
7479 taken by your applications.
7491 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7492 echo "Build type: $PLATFORM"
7494 echo "Building on: $PLATFORM"
7495 echo "Building for: $XPLATFORM"
7498 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7499 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7501 echo "Architecture: $CFG_ARCH"
7504 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7505 echo "Host architecture: $CFG_HOST_ARCH"
7508 if [ -n "$PLATFORM_NOTES" ]; then
7509 echo "Platform notes:"
7510 echo "$PLATFORM_NOTES"
7515 if [ "$OPT_VERBOSE" = "yes" ]; then
7516 echo $ECHO_N "qmake vars .......... $ECHO_C"
7517 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7518 echo "qmake switches ......... $QMAKE_SWITCHES"
7521 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7522 echo "Build .................. $CFG_BUILD_PARTS"
7523 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7524 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7525 echo "Debug .................. yes (combined)"
7526 if [ "$CFG_DEBUG" = "yes" ]; then
7527 echo "Default Link ........... debug"
7529 echo "Default Link ........... release"
7532 echo "Debug .................. $CFG_DEBUG"
7534 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7535 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7536 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7537 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7538 echo "QtGui module ........... $CFG_GUI"
7539 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7540 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7542 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7544 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7545 echo "STL support ............ $CFG_STL"
7546 echo "PCH support ............ $CFG_PRECOMPILE"
7547 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7548 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7549 echo "AVX..................... ${CFG_AVX}"
7550 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7551 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7552 echo "NEON support ........... ${CFG_NEON}"
7554 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
7555 echo "getaddrinfo support .... $CFG_GETADDRINFO"
7556 echo "getifaddrs support ..... $CFG_GETIFADDRS"
7557 echo "Accessibility .......... $CFG_ACCESSIBILITY"
7558 echo "NIS support ............ $CFG_NIS"
7559 echo "CUPS support ........... $CFG_CUPS"
7560 echo "Iconv support .......... $CFG_ICONV"
7561 echo "Glib support ........... $CFG_GLIB"
7562 echo "GStreamer support ...... $CFG_GSTREAMER"
7563 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7564 echo "Large File support ..... $CFG_LARGEFILE"
7565 echo "GIF support ............ $CFG_GIF"
7566 if [ "$CFG_JPEG" = "no" ]; then
7567 echo "JPEG support ........... $CFG_JPEG"
7569 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
7571 if [ "$CFG_PNG" = "no" ]; then
7572 echo "PNG support ............ $CFG_PNG"
7574 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
7576 echo "zlib support ........... $CFG_ZLIB"
7577 echo "Session management ..... $CFG_SM"
7578 if [ "$PLATFORM_QWS" = "yes" ]; then
7579 echo "Embedded support ....... $CFG_EMBEDDED"
7580 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7581 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7583 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
7585 # Normalize the decoration output first
7586 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
7587 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
7588 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
7589 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
7590 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
7591 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
7592 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
7593 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
7594 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
7595 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
7596 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
7597 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
7598 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
7599 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
7600 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
7601 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
7603 if [ "$CFG_OPENGL" = "desktop" ]; then
7604 echo "OpenGL support ......... yes (Desktop OpenGL)"
7605 elif [ "$CFG_OPENGL" = "es2" ]; then
7606 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
7608 echo "OpenGL support ......... no"
7610 if [ "$CFG_EGL" != "no" ]; then
7611 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7612 echo "EGL support ............ yes <GLES/egl.h>"
7614 echo "EGL support ............ yes <EGL/egl.h>"
7617 if [ "$CFG_OPENVG" ]; then
7618 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7619 echo "OpenVG support ......... ShivaVG"
7621 echo "OpenVG support ......... $CFG_OPENVG"
7624 if [ "$PLATFORM_X11" = "yes" ]; then
7625 echo "NAS sound support ...... $CFG_NAS"
7626 echo "XShape support ......... $CFG_XSHAPE"
7627 echo "XVideo support ......... $CFG_XVIDEO"
7628 echo "XSync support .......... $CFG_XSYNC"
7629 echo "Xinerama support ....... $CFG_XINERAMA"
7630 echo "Xcursor support ........ $CFG_XCURSOR"
7631 echo "Xfixes support ......... $CFG_XFIXES"
7632 echo "Xrandr support ......... $CFG_XRANDR"
7633 echo "Xi support ............. $CFG_XINPUT"
7634 echo "MIT-SHM support ........ $CFG_MITSHM"
7635 echo "FontConfig support ..... $CFG_FONTCONFIG"
7636 echo "XKB Support ............ $CFG_XKB"
7637 echo "immodule support ....... $CFG_IM"
7638 echo "GTK theme support ...... $CFG_QGTKSTYLE"
7640 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
7641 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
7642 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
7643 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
7644 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
7645 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
7646 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
7647 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
7648 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
7651 if [ "$CFG_OPENSSL" = "yes" ]; then
7652 OPENSSL_LINKAGE="(run-time)"
7653 elif [ "$CFG_OPENSSL" = "linked" ]; then
7654 OPENSSL_LINKAGE="(linked)"
7656 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
7657 echo "Alsa support ........... $CFG_ALSA"
7658 if [ "$PLATFORM_MAC" = "yes" ]; then
7659 echo "CoreWlan support ....... $CFG_COREWLAN"
7661 echo "libICU support ......... $CFG_ICU"
7662 echo "PCRE support ........... $CFG_PCRE"
7663 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7664 echo "Xcb support ............ limited (old version)"
7666 echo "Xcb support ............ $CFG_XCB"
7668 echo "Xrender support ........ $CFG_XRENDER"
7669 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7670 echo "XInput2 support ........ $CFG_XINPUT2"
7674 # complain about not being able to use dynamic plugins if we are using a static build
7675 if [ "$CFG_SHARED" = "no" ]; then
7677 echo "WARNING: Using static linking will disable the use of dynamically"
7678 echo "loaded plugins. Make sure to import all needed static plugins,"
7679 echo "or compile needed modules into the library."
7682 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7684 echo "NOTE: When linking against OpenSSL, you can override the default"
7685 echo "library names through OPENSSL_LIBS."
7687 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
7690 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7692 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
7693 echo "if you want a pure debug build."
7698 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7703 #-------------------------------------------------------------------------------
7704 # build makefiles based on the configuration
7705 #-------------------------------------------------------------------------------
7707 echo "Finding project files. Please wait..."
7708 if [ "$CFG_NOPROCESS" != "yes" ]; then
7709 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7710 if [ -f "${relpath}/qtbase.pro" ]; then
7711 mkfile="${outpath}/Makefile"
7712 [ -f "$mkfile" ] && chmod +w "$mkfile"
7713 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7717 # .projects -> projects to process
7718 # .projects.1 -> qt and moc
7719 # .projects.2 -> subdirs and libs
7720 # .projects.3 -> the rest
7721 rm -f .projects .projects.1 .projects.2 .projects.3
7723 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7724 if [ -z "$AWK" ]; then
7725 for p in `echo $QMAKE_PROJECTS`; do
7726 echo "$p" >> .projects
7729 cat >projects.awk <<EOF
7735 first = "./.projects.1.tmp"
7736 second = "./.projects.2.tmp"
7737 third = "./.projects.3.tmp"
7742 if ( ! target_file )
7744 print input_file >target_file
7749 input_file = FILENAME
7754 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7757 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7758 target_file = second
7763 matched_target == 0 && /^(TEMPLATE.*=)/ {
7764 if ( \$3 == "subdirs" )
7765 target_file = second
7766 else if ( \$3 == "lib" )
7772 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7773 if ( \$0 ~ /plugin/ )
7776 target_file = second
7781 if ( ! target_file )
7783 print input_file >>target_file
7790 for p in `echo $QMAKE_PROJECTS`; do
7791 echo "$p" >> .projects.all
7794 # if you get errors about the length of the command line to awk, change the -l arg
7796 split -l 100 .projects.all .projects.all.
7797 for p in .projects.all.*; do
7798 "$AWK" -f projects.awk `cat $p`
7799 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7800 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7801 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7802 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7804 rm -f .projects.all* projects.awk
7806 [ -f .projects.1 ] && cat .projects.1 >>.projects
7807 [ -f .projects.2 ] && cat .projects.2 >>.projects
7808 rm -f .projects.1 .projects.2
7809 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7810 cat .projects.3 >>.projects
7814 # don't sort Qt and MOC in with the other project files
7815 # also work around a segfaulting uniq(1)
7816 if [ -f .sorted.projects.2 ]; then
7817 sort .sorted.projects.2 > .sorted.projects.2.new
7818 mv -f .sorted.projects.2.new .sorted.projects.2
7819 cat .sorted.projects.2 >> .sorted.projects.1
7821 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7822 rm -f .sorted.projects.2 .sorted.projects.1
7826 if [ -f .projects ]; then
7827 uniq .projects >.tmp
7828 mv -f .tmp .projects
7829 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7831 if [ -f .projects.3 ]; then
7832 uniq .projects.3 >.tmp
7833 mv -f .tmp .projects.3
7834 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7836 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7840 for part in $CFG_BUILD_PARTS; do
7842 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7843 libs) PART_ROOTS="$PART_ROOTS src" ;;
7844 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7845 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7850 if [ "$CFG_DEV" = "yes" ]; then
7851 PART_ROOTS="$PART_ROOTS tests"
7854 echo "Creating makefiles. Please wait..."
7855 for file in .projects .projects.3; do
7856 [ '!' -f "$file" ] && continue
7857 for a in `cat $file`; do
7859 for r in $PART_ROOTS; do
7860 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7865 [ "$IN_ROOT" = "no" ] && continue
7868 *winmain/winmain.pro)
7869 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7873 */qmake/qmake.pro) continue ;;
7874 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7875 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7881 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7882 test -d "$dir" || mkdir -p "$dir"
7883 OUTDIR="$outpath/$dir"
7884 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7885 # fast configure - the makefile exists, skip it
7886 # since the makefile exists, it was generated by qmake, which means we
7887 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7889 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7892 QMAKE_SPEC_ARGS="-spec $SPEC"
7893 echo $ECHO_N " for $a$ECHO_C"
7895 QMAKE="$outpath/bin/qmake"
7896 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7897 if [ "$file" = ".projects.3" ]; then
7900 cat >"${OUTDIR}/Makefile" <<EOF
7901 # ${OUTDIR}/Makefile: generated by configure
7903 # WARNING: This makefile will be replaced with a real makefile.
7904 # All changes made to this file will be lost.
7906 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7908 cat >>"${OUTDIR}/Makefile" <<EOF
7910 all clean install qmake first Makefile: FORCE
7911 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7919 if [ "$OPT_VERBOSE" = "yes" ]; then
7920 echo " (`basename $SPEC`)"
7921 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7926 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7927 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7931 rm -f .projects .projects.3
7933 #-------------------------------------------------------------------------------
7934 # check for platforms that we don't yet know about
7935 #-------------------------------------------------------------------------------
7936 if [ "$CFG_ARCH" = "generic" ]; then
7939 NOTICE: Atomic operations are not yet supported for this
7942 Qt will use the 'generic' architecture instead, which uses a
7943 single pthread_mutex_t to protect all atomic operations. This
7944 implementation is the slow (but safe) fallback implementation
7945 for architectures Qt does not yet support.
7949 #-------------------------------------------------------------------------------
7950 # check if the user passed the -no-zlib option, which is no longer supported
7951 #-------------------------------------------------------------------------------
7952 if [ -n "$ZLIB_FORCED" ]; then
7953 which_zlib="supplied"
7954 if [ "$CFG_ZLIB" = "system" ]; then
7960 NOTICE: The -no-zlib option was supplied but is no longer
7963 Qt now requires zlib support in all builds, so the -no-zlib
7964 option was ignored. Qt will be built using the $which_zlib
7969 #-------------------------------------------------------------------------------
7970 # finally save the executed command to another script
7971 #-------------------------------------------------------------------------------
7972 if [ `basename $0` != "config.status" ]; then
7973 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7975 # add the system variables
7976 for varname in $SYSTEM_VARIABLES; do
7978 'if [ -n "\$'${varname}'" ]; then
7979 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7984 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7986 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7987 echo "#!/bin/sh" > "$outpath/config.status"
7988 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7989 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7990 echo "else" >> "$outpath/config.status"
7991 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7992 echo "fi" >> "$outpath/config.status"
7993 chmod +x "$outpath/config.status"
7996 if [ -n "$RPATH_MESSAGE" ]; then
7998 echo "$RPATH_MESSAGE"
8001 MAKE=`basename "$MAKE"`
8003 echo Qt is now configured for building. Just run \'$MAKE\'.
8004 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8005 echo Once everything is built, Qt is installed.
8006 echo You should not run \'$MAKE install\'.
8008 echo Once everything is built, you must run \'$MAKE install\'.
8009 echo Qt will be installed into $QT_INSTALL_PREFIX
8012 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.