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=
743 CFG_SEPARATE_DEBUG_INFO=no
744 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
745 CFG_REDUCE_EXPORTS=auto
755 CFG_REDUCE_RELOCATIONS=auto
758 CFG_ACCESSIBILITY=auto
761 CFG_DOUBLEFORMAT=auto
765 CFG_CLOCK_GETTIME=auto
766 CFG_CLOCK_MONOTONIC=auto
775 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
780 CFG_PREFIX_INSTALL=yes
789 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
790 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
794 OPT_CONFIRM_LICENSE=no
808 # initalize variables used for installation
817 QT_INSTALL_TRANSLATIONS=
823 #flags for SQL drivers
831 QT_LFLAGS_ODBC="-lodbc"
834 # flags for libdbus-1
838 # flags for Glib (X11 only)
842 # flags for GStreamer (X11 only)
846 #-------------------------------------------------------------------------------
847 # check SQL drivers, mouse drivers and decorations available in this package
848 #-------------------------------------------------------------------------------
850 # opensource version removes some drivers, so force them to be off
856 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
857 for a in "$relpath/src/plugins/sqldrivers/"*; do
859 base_a=`basename "$a"`
860 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
861 eval "CFG_SQL_${base_a}=auto"
866 CFG_DECORATION_PLUGIN_AVAILABLE=
867 if [ -d "$relpath/src/plugins/decorations" ]; then
868 for a in "$relpath/src/plugins/decorations/"*; do
870 base_a=`basename "$a"`
871 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
876 CFG_KBD_PLUGIN_AVAILABLE=
877 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
878 for a in "$relpath/src/plugins/kbddrivers/"*; do
880 base_a=`basename "$a"`
881 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
886 CFG_MOUSE_PLUGIN_AVAILABLE=
887 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
888 for a in "$relpath/src/plugins/mousedrivers/"*; do
890 base_a=`basename "$a"`
891 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
896 CFG_GFX_PLUGIN_AVAILABLE=
897 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
898 for a in "$relpath/src/plugins/gfxdrivers/"*; do
900 base_a=`basename "$a"`
901 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
904 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
907 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
908 if [ -d "$relpath/src/plugins/imageformats" ]; then
909 for a in "$relpath/src/plugins/imageformats/"*; do
911 base_a=`basename "$a"`
912 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
917 #-------------------------------------------------------------------------------
918 # Set Default NaCl options
919 #-------------------------------------------------------------------------------
920 if [ "$CFG_EMBEDDED" = "nacl" ]; then
921 echo "Setting NaCl options:"
931 if [ `uname` = "Linux" ]; then
932 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
933 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
935 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
936 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
939 echo "-no-mediaservices -no-sql-sqlite -nomake tests"
943 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
944 QT_CONFIG="$QT_CONFIG nacl"
947 #-------------------------------------------------------------------------------
948 # parse command line arguments
949 #-------------------------------------------------------------------------------
951 # parse the arguments, setting things to "yes" or "no"
952 while [ "$#" -gt 0 ]; do
956 #Autoconf style options
958 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
962 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
966 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
967 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
970 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
974 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
978 -no-*-*|-plugin-*-*|-qt-*-*)
979 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
980 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
984 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
987 #Qt style yes options
988 -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)
989 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
992 #Qt style options that pass an argument
994 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
996 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
1000 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1004 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1005 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1009 #Qt style complex options in one command
1010 -enable-*|-disable-*)
1011 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1012 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1014 #Qt Builtin/System style options
1015 -no-*|-system-*|-qt-*)
1016 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1017 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1019 #Options that cannot be generalized
1026 # this option may or may not be followed by an argument
1027 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1034 -embedded-lite|-qpa)
1036 # this option may or may not be followed by an argument
1037 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1050 # this option may or may not be followed by an argument
1051 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1060 # this option may or may not be followed by an argument
1061 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1069 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1070 # this option may or may not be followed by an argument
1071 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1080 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1084 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1098 if [ "$1" = "-D" ]; then
1102 VAL=`echo $1 | sed 's,-D,,'`
1107 # this option may or may not be followed by an argument
1108 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1117 if [ "$1" = "-I" ]; then
1121 VAL=`echo $1 | sed 's,-I,,'`
1126 if [ "$1" = "-L" ]; then
1130 VAL=`echo $1 | sed 's,-L,,'`
1135 if [ "$1" = "-R" ]; then
1139 VAL=`echo $1 | sed 's,-R,,'`
1144 VAL=`echo $1 | sed 's,-l,,'`
1148 if [ "$1" = "-F" ]; then
1152 VAL=`echo $1 | sed 's,-F,,'`
1157 if [ "$1" = "-fw" ]; then
1161 VAL=`echo $1 | sed 's,-fw,,'`
1169 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1176 if [ "$UNKNOWN_ARG" = "yes" ]; then
1177 echo "$1: unknown argument"
1188 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1189 CFG_ACCESSIBILITY="$VAL"
1198 CFG_USE_GNUMAKE="$VAL"
1201 CFG_MYSQL_CONFIG="$VAL"
1204 QT_INSTALL_PREFIX="$VAL"
1207 QT_HOST_PREFIX="$VAL"
1210 QT_FORCE_PKGCONFIG=yes
1213 QT_INSTALL_DOCS="$VAL"
1216 QT_INSTALL_HEADERS="$VAL"
1219 QT_INSTALL_PLUGINS="$VAL"
1222 QT_INSTALL_IMPORTS="$VAL"
1225 QT_INSTALL_DATA="$VAL"
1228 QT_INSTALL_LIBS="$VAL"
1237 QT_INSTALL_TRANSLATIONS="$VAL"
1239 sysconfdir|settingsdir)
1240 QT_INSTALL_SETTINGS="$VAL"
1243 QT_INSTALL_EXAMPLES="$VAL"
1246 QT_INSTALL_TESTS="$VAL"
1255 QT_INSTALL_BINS="$VAL"
1277 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1284 if [ "$VAL" = "little" ]; then
1285 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1286 elif [ "$VAL" = "big" ]; then
1287 CFG_ENDIAN="Q_BIG_ENDIAN"
1293 if [ "$VAL" = "little" ]; then
1294 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1295 elif [ "$VAL" = "big" ]; then
1296 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1302 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1309 CFG_QWS_DEPTHS="$VAL"
1312 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1313 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1314 [ "$VAL" = "es2" ]; then
1316 if [ "$VAL" = "es2" ]; then
1324 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1326 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1333 qvfb) # left for commandline compatibility, not documented
1334 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1335 if [ "$VAL" = "yes" ]; then
1336 QMakeVar add gfx-drivers qvfb
1337 QMakeVar add kbd-drivers qvfb
1338 QMakeVar add mouse-drivers qvfb
1339 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1340 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1341 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1348 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1351 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1360 if [ "$BUILD_ON_MAC" = "yes" ]; then
1367 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1368 CFG_MAC_DWARF2="$VAL"
1374 # if this is a Mac then "windows" probably means
1375 # we are cross-compiling for MinGW
1376 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1377 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1386 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1387 CFG_MAC_HARFBUZZ="$VAL"
1394 if [ "$BUILD_ON_MAC" = "yes" ]; then
1395 CFG_FRAMEWORK="$VAL"
1401 if [ "$VAL" = "yes" ]; then
1403 QMakeVar add QMAKE_CFLAGS -pg
1404 QMakeVar add QMAKE_CXXFLAGS -pg
1405 QMakeVar add QMAKE_LFLAGS -pg
1406 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1412 if [ "$VAL" = "yes" ]; then
1413 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1416 exceptions|g++-exceptions)
1417 if [ "$VAL" = "no" ]; then
1419 elif [ "$VAL" = "yes" ]; then
1427 # keep compatibility with old platform names
1433 PLATFORM=hpux-acc-o64
1436 PLATFORM=hpux-acc-64
1439 PLATFORM=hpux-acc-64
1451 PLATFORM=reliant-cds-64
1454 PLATFORM=solaris-cc-64
1457 PLATFORM=unixware-cc
1460 PLATFORM=unixware-g++
1463 PLATFORM=unixware-cc
1466 PLATFORM=unixware-g++
1472 i386) NATIVE_64_ARCH="x86_64" ;;
1473 powerpc) NATIVE_64_ARCH="ppc64" ;;
1474 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1476 if [ ! -z "$NATIVE_64_ARCH" ]; then
1477 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1484 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1487 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1488 CFG_DEBUG_RELEASE="$VAL"
1494 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1495 CFG_RELEASE_QMAKE="$VAL"
1501 if [ "$VAL" = "yes" ]; then
1503 elif [ "$VAL" = "no" ]; then
1510 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1511 CFG_PREFIX_INSTALL="$VAL"
1519 developer-build|commercial|opensource)
1520 # These switches have been dealt with already
1523 if [ "$VAL" = "yes" ]; then
1525 elif [ "$VAL" = "no" ]; then
1532 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1533 CFG_INCREMENTAL="$VAL"
1539 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1540 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1546 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1547 if [ "$VAL" = "no" ]; then
1548 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1549 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1550 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1556 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1563 if [ "$VAL" = "no" ]; then
1570 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1578 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1585 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1592 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1599 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1606 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1613 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1620 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1627 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1634 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1635 CFG_PRECOMPILE="$VAL"
1640 separate-debug-info)
1641 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1642 CFG_SEPARATE_DEBUG_INFO="$VAL"
1643 elif [ "$VAL" = "nocopy" ] ; then
1644 CFG_SEPARATE_DEBUG_INFO="yes"
1645 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1651 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1652 CFG_REDUCE_EXPORTS="$VAL"
1658 if [ "$VAL" = "no" ]; then
1665 if [ "$VAL" = "no" ]; then
1672 if [ "$VAL" = "no" ]; then
1679 if [ "$VAL" = "no" ]; then
1686 if [ "$VAL" = "no" ]; then
1693 if [ "$VAL" = "no" ]; then
1700 if [ "$VAL" = "no" ]; then
1707 if [ "$VAL" = "no" ]; then
1714 if [ "$VAL" = "no" ]; then
1724 if [ "$VAL" = "no" ]; then
1731 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1732 CFG_REDUCE_RELOCATIONS="$VAL"
1738 [ "$VAL" = "qt" ] && VAL=yes
1739 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1740 CFG_QWS_FREETYPE="$VAL"
1746 [ "$VAL" = "qt" ] && VAL=yes
1747 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1752 # No longer supported:
1753 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1756 if [ "$VAL" = "system" ]; then
1763 [ "$VAL" = "yes" ] && VAL=qt
1764 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1771 [ "$VAL" = "yes" ] && VAL=qt
1772 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1779 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1786 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1793 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1800 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1807 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1814 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1821 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1822 CFG_FONTCONFIG="$VAL"
1828 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1835 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1842 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1849 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1856 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1863 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1870 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1877 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1884 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1885 CFG_GSTREAMER="$VAL"
1891 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1892 CFG_QGTKSTYLE="$VAL"
1898 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1901 if [ "$VAL" = "no" ]; then
1909 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1911 elif [ "$VAL" = "runtime" ]; then
1918 if [ "$VAL" = "yes" ]; then
1925 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1932 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1933 CFG_LARGEFILE="$VAL"
1939 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1946 if [ "$VAL" = "yes" ]; then
1947 CFG_OPENSSL="linked"
1953 if [ "$VAL" = "yes" ]; then
1954 CFG_DECLARATIVE_DEBUG="yes"
1956 if [ "$VAL" = "no" ]; then
1957 CFG_DECLARATIVE_DEBUG="no"
1964 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1965 CFG_JAVASCRIPTCORE_JIT="$VAL"
1971 if [ "$VAL" = "yes" ]; then
1972 OPT_CONFIRM_LICENSE="$VAL"
1978 if [ "$VAL" = "yes" ]; then
1984 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
1985 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1986 # if autoconf style options were used, $VAL can be "yes" or "no"
1987 [ "$VAL" = "yes" ] && VAL=qt
1988 # now $VAL should be "no", "qt", or "plugin"... double-check
1989 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1992 # now $VAL is "no", "qt", or "plugin"
1994 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1995 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1997 # Grab the available values
2000 avail="$CFG_SQL_AVAILABLE"
2003 avail="$CFG_GFX_AVAILABLE"
2004 if [ "$OPT" = "plugin" ]; then
2005 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2009 avail="$CFG_DECORATION_AVAILABLE"
2010 if [ "$OPT" = "plugin" ]; then
2011 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2015 avail="$CFG_KBD_AVAILABLE"
2016 if [ "$OPT" = "plugin" ]; then
2017 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2021 avail="$CFG_MOUSE_AVAILABLE"
2022 if [ "$OPT" = "plugin" ]; then
2023 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2027 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2028 if [ "$OPT" != "plugin" ]; then
2029 # png is always built in
2035 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2039 # Check that that user's value is available.
2042 if [ "$VAL" = "$d" ]; then
2047 [ "$found" = yes ] || ERROR=yes
2049 if [ "$VAR" = "sql" ]; then
2050 # set the CFG_SQL_driver
2051 eval "CFG_SQL_$VAL=\$OPT"
2053 elif [ "$VAR" = "imageformat" ]; then
2054 [ "$OPT" = "qt" ] && OPT=yes
2055 VAL="`echo $VAL |tr a-z A-Z`"
2056 eval "CFG_$VAL=$OPT"
2060 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2061 if [ "$OPT" = "plugin" ]; then
2062 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2063 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2064 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2065 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2066 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2067 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2068 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2069 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2072 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2073 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2074 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2075 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2076 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2080 QMakeVar add "${VAR}s" "${VAL}"
2081 elif [ "$OPT" = "no" ]; then
2082 PLUG_VAR="${VAR}-plugin"
2083 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2084 IN_VAR="${VAR}-driver"
2088 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2089 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2090 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2091 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2092 QMakeVar del "${IN_VAR}s" "$VAL"
2093 QMakeVar del "${PLUG_VAR}s" "$VAL"
2095 if [ "$ERROR" = "yes" ]; then
2096 echo "$CURRENT_OPT: unknown argument"
2101 if [ "$VAL" = "yes" ]; then
2102 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2103 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2107 elif [ "$VAL" = "no" ]; then
2108 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2109 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2118 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2125 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2132 D_FLAGS="$D_FLAGS \"$VAL\""
2135 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2138 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2141 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2144 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2147 if [ "$BUILD_ON_MAC" = "yes" ]; then
2148 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2149 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2155 if [ "$BUILD_ON_MAC" = "yes" ]; then
2156 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2162 W_FLAGS="$W_FLAGS \"${VAL}\""
2168 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2169 CFG_PHONON_BACKEND="$VAL"
2181 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2182 CFG_AUDIO_BACKEND="$VAL"
2188 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2195 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2196 CFG_FORCE_ASSERTS="$VAL"
2202 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2212 if [ "$UNKNOWN_OPT" = "yes" ]; then
2213 echo "${CURRENT_OPT}: invalid command-line switch"
2219 # update QT_CONFIG to show our current predefined configuration
2220 case "$CFG_QCONFIG" in
2221 minimal|small|medium|large|full)
2222 # these are a sequence of increasing functionality
2223 for c in minimal small medium large full; do
2224 QT_CONFIG="$QT_CONFIG $c-config"
2225 [ "$CFG_QCONFIG" = $c ] && break
2229 # not known to be sufficient for anything
2230 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2231 echo >&2 "Error: configuration file not found:"
2232 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2234 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2239 #-------------------------------------------------------------------------------
2240 # build tree initialization
2241 #-------------------------------------------------------------------------------
2243 # where to find which..
2244 unixtests="$relpath/config.tests/unix"
2245 mactests="$relpath/config.tests/mac"
2246 WHICH="$unixtests/which.test"
2248 PERL=`$WHICH perl 2>/dev/null`
2250 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2252 for e in gawk nawk awk; do
2253 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2260 PERL="/usr/bin/perl"
2261 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2265 ### skip this if the user just needs help...
2266 if [ "$OPT_HELP" != "yes" ]; then
2268 # is this a shadow build?
2269 if [ "$OPT_SHADOW" = "maybe" ]; then
2271 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2272 if [ -h "$outpath" ]; then
2273 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2279 if [ "$OPT_SHADOW" = "yes" ]; then
2280 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2281 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2282 echo >&2 "Cannot proceed."
2285 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2288 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2290 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2291 echo "Qt can be built in release mode with separate debug information, so"
2292 echo "-debug-and-release is not necessary anymore"
2296 if [ "$CFG_SILENT" = "yes" ]; then
2297 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2300 # if the source tree is different from the build tree,
2301 # symlink or copy part of the sources
2302 if [ "$OPT_SHADOW" = "yes" ]; then
2303 echo "Preparing build tree..."
2305 if [ -z "$PERL" ]; then
2307 echo "You need perl in your PATH to make a shadow build."
2308 echo "Cannot proceed."
2312 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2314 # symlink the qmake directory
2315 find "$relpath/qmake" | while read a; do
2316 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2317 if [ '!' -f "$my_a" ]; then
2318 if [ -d "$a" ]; then
2319 # directories are created...
2322 a_dir=`dirname "$my_a"`
2323 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2324 # ... and files are symlinked
2325 case `basename "$a"` in
2326 *.o|*.d|GNUmakefile*|qmake)
2337 # make a syncqt script that can be used in the shadow
2338 rm -f "$outpath/bin/syncqt"
2339 if [ -x "$relpath/bin/syncqt" ]; then
2340 mkdir -p "$outpath/bin"
2341 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2342 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2343 chmod 755 "$outpath/bin/syncqt"
2346 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2347 rm -f "$outpath/bin/$i"
2348 if [ -x "$relpath/bin/$i" ]; then
2349 mkdir -p "$outpath/bin"
2350 echo "#!/bin/sh" >"$outpath/bin/$i"
2351 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2352 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2353 chmod 755 "$outpath/bin/$i"
2357 # symlink the mkspecs directory
2358 mkdir -p "$outpath/mkspecs"
2359 rm -rf "$outpath"/mkspecs/*
2360 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2361 rm -f "$outpath/mkspecs/default"
2365 rm -rf "$outpath/mkspecs/$1"
2366 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2367 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2370 # Special case for mkspecs/features directory.
2371 # To be able to place .prf files into a shadow build directory,
2372 # we're creating links for files only. The directory structure is reproduced.
2373 ShadowMkspecs features
2375 # The modules dir is special, too.
2376 ShadowMkspecs modules
2378 # symlink the doc directory
2379 rm -rf "$outpath/doc"
2380 ln -s "$relpath/doc" "$outpath/doc"
2383 # symlink fonts to be able to run application from build directory
2384 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2385 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2386 mkdir -p "${outpath}/lib"
2387 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2391 if [ "$OPT_FAST" = "auto" ]; then
2392 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2399 # find a make command
2400 if [ -z "$MAKE" ]; then
2402 for mk in gmake make; do
2403 if "$WHICH" $mk >/dev/null 2>&1; then
2408 if [ -z "$MAKE" ]; then
2409 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2410 echo >&2 "Cannot proceed."
2413 # export MAKE, we need it later in the config.tests
2419 #-------------------------------------------------------------------------------
2420 # auto-detect all that hasn't been specified in the arguments
2421 #-------------------------------------------------------------------------------
2423 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2424 if [ "$CFG_EMBEDDED" != "no" ]; then
2425 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2427 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2428 if [ -z "$XPLATFORM" ]; then
2429 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2430 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2434 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2435 if [ -z "$XPLATFORM" ]; then
2436 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2437 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2441 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2442 if [ -z "$XPLATFORM" ]; then
2443 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2444 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2448 if [ -z "$PLATFORM" ]; then
2449 case "$UNAME_MACHINE" in
2451 PLATFORM=qws/linux-x86-g++
2454 PLATFORM=qws/linux-x86_64-g++
2457 PLATFORM=qws/linux-generic-g++
2461 if [ -z "$XPLATFORM" ]; then
2462 if [ "$CFG_EMBEDDED" = "auto" ]; then
2463 if [ -n "$CFG_ARCH" ]; then
2464 CFG_EMBEDDED=$CFG_ARCH
2466 case "$UNAME_MACHINE" in
2474 CFG_EMBEDDED=generic
2479 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2483 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2484 if [ -z "$XPLATFORM" ]; then
2485 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2486 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2490 if [ -z "$XPLATFORM" ]; then
2495 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2502 if [ -z "$PLATFORM" ]; then
2504 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2506 if [ "$PLATFORM_QPA" = "yes" ]; then
2507 OSX_VERSION=`uname -r | cut -d. -f1`
2508 if [ "$OSX_VERSION" -ge 11 ]; then
2509 # We're on Lion or above. Check if we have a supported Clang version
2510 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2513 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2528 #PLATFORM=aix-g++-64
2530 #PLATFORM=aix-xlc-64
2532 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2542 # PLATFORM=dynix-g++
2548 PLATFORM=freebsd-g++
2550 - Also available for FreeBSD: freebsd-icc
2554 PLATFORM=openbsd-g++
2565 #PLATFORM=irix-cc-64
2567 - Also available for IRIX: irix-g++ irix-cc-64
2571 case "$UNAME_MACHINE" in
2573 #PLATFORM=hpuxi-acc-32
2574 PLATFORM=hpuxi-acc-64
2576 - Also available for HP-UXi: hpuxi-acc-32
2582 #PLATFORM=hpux-acc-64
2584 #PLATFORM=hpux-acc-o64
2586 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2595 - Also available for Tru64: tru64-g++
2599 case "$UNAME_MACHINE" in
2601 PLATFORM=linux-g++-64
2608 - Also available for Linux: linux-kcc linux-icc linux-cxx
2612 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2613 PLATFORM="solaris-g++"
2615 #PLATFORM=solaris-g++
2617 #PLATFORM=solaris-cc64
2620 - Also available for Solaris: solaris-g++ solaris-cc-64
2623 ReliantUNIX-*:*|SINIX-*:*)
2624 PLATFORM=reliant-cds
2625 #PLATFORM=reliant-cds-64
2627 - Also available for Reliant UNIX: reliant-cds-64
2637 #PLATFORM=unixware-g++
2638 PLATFORM=unixware-cc
2640 - Also available for OpenUNIX: unixware-g++
2644 #PLATFORM=unixware-g++
2645 PLATFORM=unixware-cc
2647 - Also available for UnixWare: unixware-g++
2654 - Also available for SCO OpenServer: sco-g++
2658 PLATFORM=unixware-g++
2661 PLATFORM=unsupported/qnx-g++
2664 if [ "$OPT_HELP" != "yes" ]; then
2666 for p in $PLATFORMS; do
2667 echo " $relconf $* -platform $p"
2670 echo " The build script does not currently recognize all" >&2
2671 echo " platforms supported by Qt." >&2
2672 echo " Rerun this script with a -platform option listed to" >&2
2673 echo " set the system/compiler combination you use." >&2
2680 if [ "$PLATFORM_QWS" = "yes" ]; then
2682 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2684 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2687 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2689 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2690 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2692 if [ -d "$PLATFORM" ]; then
2693 QMAKESPEC="$PLATFORM"
2695 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2697 if [ -d "$XPLATFORM" ]; then
2698 XQMAKESPEC="$XPLATFORM"
2700 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2702 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2703 QT_CROSS_COMPILE=yes
2704 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2707 if [ "$BUILD_ON_MAC" = "yes" ]; then
2708 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2710 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2711 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2712 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2713 echo " built with 'macx-g++'" >&2
2719 # check specified platforms are supported
2720 if [ '!' -d "$QMAKESPEC" ]; then
2722 echo " The specified system/compiler is not supported:"
2726 echo " Please see the README file for a complete list."
2730 if [ '!' -d "$XQMAKESPEC" ]; then
2732 echo " The specified system/compiler is not supported:"
2736 echo " Please see the README file for a complete list."
2740 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2742 echo " The specified system/compiler port is not complete:"
2744 echo " $XQMAKESPEC/qplatformdefs.h"
2746 echo " Please contact qt-info@nokia.com."
2751 # now look at the configs and figure out what platform we are config'd for
2752 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2753 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2755 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2757 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2758 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2759 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2760 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2761 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2765 #-------------------------------------------------------------------------------
2766 # determine the system architecture
2767 #-------------------------------------------------------------------------------
2768 if [ "$OPT_VERBOSE" = "yes" ]; then
2769 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2772 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2773 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2775 echo "You have specified a target architecture with -embedded and -arch."
2776 echo "The two architectures you have specified are different, so we can"
2777 echo "not proceed. Either set both to be the same, or only use -embedded."
2783 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2784 case `basename "$XPLATFORM"` in
2787 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2789 echo "Please contact qt-info@nokia.com to upgrade your license to"
2790 echo "include this platform, or install the Qt Open Source Edition"
2791 echo "if you intend to develop free software."
2797 if [ -z "${CFG_HOST_ARCH}" ]; then
2798 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2800 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2801 case "$CFG_HOST_ARCH" in
2806 if [ "$OPT_VERBOSE" = "yes" ]; then
2807 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2811 CFG_HOST_ARCH=`uname -p`
2812 if [ "$OPT_VERBOSE" = "yes" ]; then
2813 echo " SGI ($CFG_HOST_ARCH)"
2817 case "$UNAME_MACHINE" in
2819 if [ "$OPT_VERBOSE" = "yes" ]; then
2820 echo " Sun SPARC (sparc)"
2827 if [ "$OPT_VERBOSE" = "yes" ]; then
2828 echo " 64-bit AMD 80x86 (x86_64)"
2830 CFG_HOST_ARCH=x86_64
2833 if [ "$OPT_VERBOSE" = "yes" ]; then
2834 echo " 32-bit Intel 80x86 (i386)"
2842 if [ "$OPT_VERBOSE" = "yes" ]; then
2843 echo " 64-bit IBM PowerPC (powerpc)"
2845 CFG_HOST_ARCH=powerpc
2848 if [ "$OPT_VERBOSE" = "yes" ]; then
2849 echo " HP PA-RISC (parisc)"
2851 CFG_HOST_ARCH=parisc
2854 if [ "$OPT_VERBOSE" = "yes" ]; then
2855 echo " 32-bit Intel 80x86 (i386)"
2859 *:*:x86_64|*:*:amd64)
2860 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2861 if [ "$OPT_VERBOSE" = "yes" ]; then
2862 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2866 if [ "$OPT_VERBOSE" = "yes" ]; then
2867 echo " 64-bit AMD 80x86 (x86_64)"
2869 CFG_HOST_ARCH=x86_64
2873 if [ "$OPT_VERBOSE" = "yes" ]; then
2874 echo " 32-bit PowerPC (powerpc)"
2876 CFG_HOST_ARCH=powerpc
2879 if [ "$OPT_VERBOSE" = "yes" ]; then
2880 echo " 64-bit PowerPC (powerpc)"
2882 CFG_HOST_ARCH=powerpc
2885 if [ "$OPT_VERBOSE" = "yes" ]; then
2886 echo " IBM S/390 (s390)"
2891 if [ "$OPT_VERBOSE" = "yes" ]; then
2897 if [ "$OPT_VERBOSE" = "yes" ]; then
2898 echo " Linux on SPARC"
2903 case "$UNAME_MACHINE" in
2905 if [ "$OPT_VERBOSE" = "yes" ]; then
2906 echo " QNX on Intel 80x86 (i386)"
2913 if [ "$OPT_VERBOSE" = "yes" ]; then
2914 echo " Trying '$UNAME_MACHINE'..."
2916 CFG_HOST_ARCH="$UNAME_MACHINE"
2921 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2922 if [ -n "$CFG_ARCH" ]; then
2923 CFG_EMBEDDED=$CFG_ARCH
2926 case "$CFG_EMBEDDED" in
2949 CFG_ARCH="$CFG_EMBEDDED"
2952 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
2953 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2954 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2955 CFG_ARCH=$CFG_HOST_ARCH
2962 # previously, armv6 was a different arch
2968 if [ "$OPT_VERBOSE" = "yes" ]; then
2969 echo "System architecture: '$CFG_ARCH'"
2970 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2971 echo "Host architecture: '$CFG_HOST_ARCH'"
2975 #-------------------------------------------------------------------------------
2976 # tests that don't need qmake (must be run before displaying help)
2977 #-------------------------------------------------------------------------------
2979 # detect build style
2980 if [ "$CFG_DEBUG" = "auto" ]; then
2981 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2982 CFG_DEBUG_RELEASE=yes
2984 elif [ "$CFG_DEV" = "yes" ]; then
2985 CFG_DEBUG_RELEASE=no
2988 CFG_DEBUG_RELEASE=no
2992 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2993 QT_CONFIG="$QT_CONFIG build_all"
2996 if [ -z "$PKG_CONFIG" ]; then
2997 # See if PKG_CONFIG is set in the mkspec:
2998 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
3000 if [ -z "$PKG_CONFIG" ]; then
3001 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3004 # Work out if we can use pkg-config
3005 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3006 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3008 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3009 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3010 echo >&2 "environment!"
3012 if [ -z "$PKG_CONFIG_PATH" ]; then
3014 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3015 echo >&2 "the host compiler's .pc files will be used. This is probably"
3016 echo >&2 "not what you want."
3018 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3020 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3021 echo >&2 "been set. This means your toolchain's .pc files must contain"
3022 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3023 echo >&2 "tests are failing, please check these files."
3028 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3029 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3030 echo >&2 "dependencies"
3036 if [ ! -n "$PKG_CONFIG" ]; then
3037 QT_CONFIG="$QT_CONFIG no-pkg-config"
3040 # pass on $CFG_SDK to the configure tests.
3041 if [ '!' -z "$CFG_SDK" ]; then
3042 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3045 # find the default framework value
3046 if [ "$BUILD_ON_MAC" = "yes" ]; then
3047 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3048 CFG_FRAMEWORK="$CFG_SHARED"
3049 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3051 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3059 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3060 TEST_COMPILER="$CXX"
3062 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3063 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3064 if [ -z "$TEST_COMPILER" ]; then
3065 echo "ERROR: Cannot set the compiler for the configuration tests"
3070 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3071 TEST_COMPILER="nacl-gcc"
3075 if [ -n "$CFG_SYSROOT" ]; then
3076 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3077 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3078 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3080 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3084 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3086 # auto-detect precompiled header support
3087 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3088 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3095 #auto-detect DWARF2 on the mac
3096 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3097 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3104 # don't autodetect support for separate debug info on objcopy when
3105 # cross-compiling as lots of toolchains seems to have problems with this
3106 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3107 CFG_SEPARATE_DEBUG_INFO="no"
3110 # auto-detect support for separate debug info in objcopy
3111 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3112 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3113 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3114 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3115 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3116 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3117 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3118 CFG_SEPARATE_DEBUG_INFO=no
3122 # binutils on HP-UX is buggy; default to no.
3123 CFG_SEPARATE_DEBUG_INFO=no
3126 CFG_SEPARATE_DEBUG_INFO=yes
3132 # auto-detect -fvisibility support
3133 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3134 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3135 CFG_REDUCE_EXPORTS=no
3137 CFG_REDUCE_EXPORTS=yes
3141 # detect the availability of the -Bsymbolic-functions linker optimization
3142 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3143 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3144 CFG_REDUCE_RELOCATIONS=no
3146 CFG_REDUCE_RELOCATIONS=yes
3150 # auto-detect GNU make support
3151 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3155 # If -opengl wasn't specified, don't try to auto-detect
3156 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3160 # find the default framework value
3161 if [ "$BUILD_ON_MAC" = "yes" ]; then
3162 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3163 CFG_FRAMEWORK="$CFG_SHARED"
3164 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3166 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3174 # x11 tests are done after qmake is built
3177 #setup the build parts
3178 if [ -z "$CFG_BUILD_PARTS" ]; then
3179 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3181 # don't build tools by default when cross-compiling
3182 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3183 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3186 for nobuild in $CFG_NOBUILD_PARTS; do
3187 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3189 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3191 # echo "WARNING: libs is a required part of the build."
3193 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3196 #-------------------------------------------------------------------------------
3197 # post process QT_INSTALL_* variables
3198 #-------------------------------------------------------------------------------
3200 if [ -z "$QT_INSTALL_PREFIX" ]; then
3201 if [ "$CFG_DEV" = "yes" ]; then
3202 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3204 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3207 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3209 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3210 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3211 if [ "$BUILD_ON_MAC" = "yes" ]; then
3212 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3215 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3218 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3220 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3221 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3222 if [ "$BUILD_ON_MAC" = "yes" ]; then
3223 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3228 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3231 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3233 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3234 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3235 if [ "$BUILD_ON_MAC" = "yes" ]; then
3236 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3237 QT_INSTALL_LIBS="/Libraries/Frameworks"
3241 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3243 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3245 if [ -z "$QT_INSTALL_BINS" ]; then #default
3246 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3247 if [ "$BUILD_ON_MAC" = "yes" ]; then
3248 QT_INSTALL_BINS="/Developer/Applications/Qt"
3251 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3253 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3255 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3256 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3257 if [ "$BUILD_ON_MAC" = "yes" ]; then
3258 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3261 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3263 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3265 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3266 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3267 if [ "$BUILD_ON_MAC" = "yes" ]; then
3268 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3271 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3273 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3275 if [ -z "$QT_INSTALL_DATA" ]; then #default
3276 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3278 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3280 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3281 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3283 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3285 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3286 if [ "$BUILD_ON_MAC" = "yes" ]; then
3287 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3289 QT_INSTALL_SETTINGS=/etc/xdg
3292 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3294 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3295 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3296 if [ "$BUILD_ON_MAC" = "yes" ]; then
3297 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3300 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3302 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3305 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3306 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3307 if [ "$BUILD_ON_MAC" = "yes" ]; then
3308 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3311 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3313 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3315 #-------------------------------------------------------------------------------
3316 # help - interactive parts of the script _after_ this section please
3317 #-------------------------------------------------------------------------------
3319 # next, emit a usage message if something failed.
3320 if [ "$OPT_HELP" = "yes" ]; then
3321 [ "x$ERROR" = "xyes" ] && echo
3322 if [ "$CFG_NIS" = "no" ]; then
3329 if [ "$CFG_CUPS" = "no" ]; then
3336 if [ "$CFG_ICONV" = "no" ]; then
3343 if [ "$CFG_LARGEFILE" = "no" ]; then
3350 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3357 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3365 if [ "$CFG_XCB" = "no" ]; then
3373 if [ "$CFG_WAYLAND" = "no" ]; then
3380 if [ "$CFG_XINPUT2" = "no" ]; then
3389 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3390 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3391 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3392 [-release] [-debug] [-debug-and-release]
3393 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3394 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3395 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3396 [-plugin-sql-<driver>] [-system-sqlite]
3397 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3398 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3399 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3400 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3401 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3402 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3403 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3404 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3405 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3406 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3407 [-no-audio-backend] [-audio-backend]
3408 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3409 [-no-optimized-qmake] [-optimized-qmake]
3410 [-no-openssl] [-openssl] [-openssl-linked]
3411 [-no-gtkstyle] [-gtkstyle]
3412 [-qt-pcre] [-system-pcre]
3413 [additional platform specific options (see below)]
3416 Installation options:
3418 -qpa ................ This will enable the QPA build.
3419 QPA is a window system agnostic implementation of Qt.
3421 These are optional, but you may specify install directories.
3423 -prefix <dir> ...... This will install everything relative to <dir>
3424 (default $QT_INSTALL_PREFIX)
3426 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3429 -hostprefix [dir] .. Tools and libraries needed when developing
3430 applications are installed in [dir]. If [dir] is
3431 not given, the current build directory will be used.
3436 * -prefix-install .... Force a sandboxed "local" installation of
3437 Qt. This will install into
3438 $QT_INSTALL_PREFIX, if this option is
3439 disabled then some platforms will attempt a
3440 "system" install by placing default values to
3441 be placed in a system location other than
3444 You may use these to separate different parts of the install:
3446 -bindir <dir> ......... Executables will be installed to <dir>
3447 (default PREFIX/bin)
3448 -libdir <dir> ......... Libraries will be installed to <dir>
3449 (default PREFIX/lib)
3450 -docdir <dir> ......... Documentation will be installed to <dir>
3451 (default PREFIX/doc)
3452 -headerdir <dir> ...... Headers will be installed to <dir>
3453 (default PREFIX/include)
3454 -plugindir <dir> ...... Plugins will be installed to <dir>
3455 (default PREFIX/plugins)
3456 -importdir <dir> ...... Imports for QML will be installed to <dir>
3457 (default PREFIX/imports)
3458 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3460 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3461 (default PREFIX/translations)
3462 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3463 (default PREFIX/etc/settings)
3464 -examplesdir <dir> .... Examples will be installed to <dir>
3465 (default PREFIX/examples)
3466 -testsdir <dir> ....... Tests will be installed to <dir>
3467 (default PREFIX/tests)
3471 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3472 that needs to be evaluated. If the evaluation succeeds, the feature is
3473 included. Here is a short explanation of each option:
3475 * -release ........... Compile and link Qt with debugging turned off.
3476 -debug ............. Compile and link Qt with debugging turned on.
3477 -debug-and-release . Compile and link two versions of Qt, with and without
3478 debugging turned on (Mac only).
3480 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3482 -opensource ........ Compile and link the Open-Source Edition of Qt.
3483 -commercial ........ Compile and link the Commercial Edition of Qt.
3486 * -shared ............ Create and use shared Qt libraries.
3487 -static ............ Create and use static Qt libraries.
3489 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3491 -fast .............. Configure Qt quickly by generating Makefiles only for
3492 library and subdirectory targets. All other Makefiles
3493 are created as wrappers, which will in turn run qmake.
3495 -no-largefile ...... Disables large file support.
3496 + -largefile ......... Enables Qt to access files larger than 4 GB.
3499 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3506 if [ "$CFG_DBUS" = "no" ]; then
3515 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3516 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3518 -no-accessibility .. Do not compile Accessibility support.
3519 * -accessibility ..... Compile Accessibility support.
3521 $SHN -no-stl ............ Do not compile STL support.
3522 $SHY -stl ............... Compile STL support.
3524 -no-sql-<driver> ... Disable SQL <driver> entirely.
3525 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3527 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3530 Possible values for <driver>:
3531 [ $CFG_SQL_AVAILABLE ]
3533 -system-sqlite ..... Use sqlite from the operating system.
3535 -no-phonon-backend.. Do not build the platform phonon plugin.
3536 + -phonon-backend..... Build the platform phonon plugin.
3538 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3539 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3541 -no-declarative-debug ..... Do not build the declarative debugging support.
3542 + -declarative-debug ....... Build the declarative debugging support.
3544 -platform target ... The operating system and compiler you are building
3547 See the README file for a list of supported
3548 operating systems and compilers.
3551 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3553 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3554 raster - Software rasterizer
3555 opengl - Rendering via OpenGL, Experimental!
3556 openvg - Rendering via OpenVG, Experimental!
3563 -no-mmx ............ Do not compile with use of MMX instructions.
3564 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3565 -no-sse ............ Do not compile with use of SSE instructions.
3566 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3567 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3568 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3569 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3570 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3571 -no-avx ............ Do not compile with use of AVX instructions.
3572 -no-neon ........... Do not compile with use of NEON instructions.
3574 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3575 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3577 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3579 -D <string> ........ Add an explicit define to the preprocessor.
3580 -I <string> ........ Add an explicit include path.
3581 -L <string> ........ Add an explicit library path.
3583 -help, -h .......... Display this information.
3585 Third Party Libraries:
3587 -qt-zlib ........... Use the zlib bundled with Qt.
3588 + -system-zlib ....... Use zlib from the operating system.
3589 See http://www.gzip.org/zlib
3591 -no-gif ............ Do not compile GIF reading support.
3593 -no-libpng ......... Do not compile PNG support.
3594 -qt-libpng ......... Use the libpng bundled with Qt.
3595 + -system-libpng ..... Use libpng from the operating system.
3596 See http://www.libpng.org/pub/png
3598 -no-libjpeg ........ Do not compile JPEG support.
3599 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3600 + -system-libjpeg .... Use libjpeg from the operating system.
3601 See http://www.ijg.org
3603 -no-openssl ........ Do not compile support for OpenSSL.
3604 + -openssl ........... Enable run-time OpenSSL support.
3605 -openssl-linked .... Enabled linked OpenSSL support.
3607 -qt-pcre ........... Use the PCRE library bundled with Qt.
3608 + -system-pcre ....... Use the PCRE library from the operating system.
3612 -make <part> ....... Add part to the list of parts to be built at make time.
3613 ($QT_DEFAULT_BUILD_PARTS)
3614 -nomake <part> ..... Exclude part from the list of parts to be built.
3616 -R <string> ........ Add an explicit runtime library path to the Qt
3618 -l <string> ........ Add an explicit library.
3620 -no-rpath .......... Do not use the library install path as a runtime
3622 + -rpath ............. Link Qt libraries and executables using the library
3623 install path as a runtime library path. Equivalent
3624 to -R install_libpath
3626 -continue .......... Continue as far as possible if an error occurs.
3628 -verbose, -v ....... Print verbose information about each step of the
3631 -silent ............ Reduce the build output so that warnings and errors
3632 can be seen more easily.
3634 * -no-optimized-qmake ... Do not build qmake optimized.
3635 -optimized-qmake ...... Build qmake optimized.
3637 -no-gui ............ Don't build the Qt GUI library
3639 $NSN -no-nis ............ Do not compile NIS support.
3640 $NSY -nis ............... Compile NIS support.
3642 $CUN -no-cups ........... Do not compile CUPS support.
3643 $CUY -cups .............. Compile CUPS support.
3644 Requires cups/cups.h and libcups.so.2.
3646 $CIN -no-iconv .......... Do not compile support for iconv(3).
3647 $CIY -iconv ............. Compile support for iconv(3).
3649 $PHN -no-pch ............ Do not use precompiled header support.
3650 $PHY -pch ............... Use precompiled header support.
3652 $DBN -no-dbus ........... Do not compile the QtDBus module.
3653 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3654 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3656 -reduce-relocations ..... Reduce relocations in the libraries through extra
3657 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3658 experimental; needs GNU ld >= 2.18).
3660 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3664 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3665 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3672 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3680 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3684 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3685 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3687 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3688 $XCBY -xcb ............... Compile Xcb support.
3690 $XWN -no-wayland......... Do not compile Wayland support.
3691 $XWY -wayland .......... Compile Wayland support.
3697 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3701 $X2N -no-xinput2......... Do not compile XInput2 support.
3702 $X2Y -xinput2............ Compile XInput2 support.
3708 if [ "$PLATFORM_X11" = "yes" ]; then
3709 if [ "$CFG_SM" = "no" ]; then
3716 if [ "$CFG_XSHAPE" = "no" ]; then
3723 if [ "$CFG_XVIDEO" = "no" ]; then
3730 if [ "$CFG_XINERAMA" = "no" ]; then
3737 if [ "$CFG_FONTCONFIG" = "no" ]; then
3744 if [ "$CFG_XCURSOR" = "no" ]; then
3751 if [ "$CFG_XFIXES" = "no" ]; then
3758 if [ "$CFG_XRANDR" = "no" ]; then
3765 if [ "$CFG_XRENDER" = "no" ]; then
3772 if [ "$CFG_MITSHM" = "no" ]; then
3779 if [ "$CFG_XINPUT" = "no" ]; then
3786 if [ "$CFG_XKB" = "no" ]; then
3793 if [ "$CFG_IM" = "no" ]; then
3804 -no-gtkstyle ....... Do not build the GTK theme integration.
3805 + -gtkstyle .......... Build the GTK theme integration.
3807 * -no-nas-sound ...... Do not compile in NAS sound support.
3808 -system-nas-sound .. Use NAS libaudio from the operating system.
3809 See http://radscan.com/nas.html
3811 -egl ............... Use EGL instead of GLX to manage contexts.
3812 When building for desktop OpenGL, this option will
3813 make Qt use EGL to manage contexts rather than the
3814 GLX, which is the default. Note: For OpenGL ES, EGL
3817 -no-opengl ......... Do not support OpenGL.
3818 + -opengl <api> ...... Enable OpenGL support.
3819 With no parameter, this will auto-detect the "best"
3820 OpenGL API to use. If desktop OpenGL is available, it
3821 will be used. Use desktop or es2 for <api>
3822 to force the use of the Desktop OpenGL or
3823 OpenGL ES 2 APIs instead.
3825 -no-openvg ........ Do not support OpenVG.
3826 + -openvg ........... Enable OpenVG support.
3827 Requires EGL support, typically supplied by an OpenGL
3828 or other graphics implementation.
3830 $SMN -no-sm ............. Do not support X Session Management.
3831 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3833 $SHN -no-xshape ......... Do not compile XShape support.
3834 $SHY -xshape ............ Compile XShape support.
3835 Requires X11/extensions/shape.h.
3837 $XVN -no-xvideo ......... Do not compile XVideo support.
3838 $XVY -xvideo ............ Compile XVideo support.
3839 Requires X11/extensions/Xv.h & Xvlib.h.
3841 $SHN -no-xsync .......... Do not compile XSync support.
3842 $SHY -xsync ............. Compile XSync support.
3843 Requires X11/extensions/sync.h.
3845 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3846 $XAY -xinerama .......... Compile Xinerama support.
3847 Requires X11/extensions/Xinerama.h and libXinerama.
3848 By default, Xinerama support will be compiled if
3849 available and the shared libraries are dynamically
3852 $XCN -no-xcursor ........ Do not compile Xcursor support.
3853 $XCY -xcursor ........... Compile Xcursor support.
3854 Requires X11/Xcursor/Xcursor.h and libXcursor.
3855 By default, Xcursor support will be compiled if
3856 available and the shared libraries are dynamically
3859 $XFN -no-xfixes ......... Do not compile Xfixes support.
3860 $XFY -xfixes ............ Compile Xfixes support.
3861 Requires X11/extensions/Xfixes.h and libXfixes.
3862 By default, Xfixes support will be compiled if
3863 available and the shared libraries are dynamically
3866 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3867 $XZY -xrandr ............ Compile Xrandr support.
3868 Requires X11/extensions/Xrandr.h and libXrandr.
3870 $XRN -no-xrender ........ Do not compile Xrender support.
3871 $XRY -xrender ........... Compile Xrender support.
3872 Requires X11/extensions/Xrender.h and libXrender.
3874 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3875 $XMY -mitshm ............ Compile MIT-SHM support.
3876 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3878 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3879 $FCGY -fontconfig ........ Compile FontConfig support.
3880 Requires fontconfig/fontconfig.h, libfontconfig,
3881 freetype.h and libfreetype.
3883 $XIN -no-xinput ......... Do not compile Xinput support.
3884 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3885 which requires IRIX with wacom.h and libXi or
3886 XFree86 with X11/extensions/XInput.h and libXi.
3888 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3889 $XKY -xkb ............... Compile XKB support.
3894 if [ "$BUILD_ON_MAC" = "yes" ]; then
3899 -Fstring ........... Add an explicit framework path.
3900 -fw string ......... Add an explicit framework.
3902 * -framework ......... Build Qt as a series of frameworks and
3903 link tools against those frameworks.
3904 -no-framework ...... Do not build Qt as a series of frameworks.
3906 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3907 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3909 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3910 Only one arch value can be specified.
3912 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3913 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3915 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3916 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3917 QT_ENABLE_HARFBUZZ environment variable.
3922 if [ "$PLATFORM_QWS" = "yes" ]; then
3924 Qt for Embedded Linux:
3926 -embedded <arch> .... This will enable the embedded build, you must have a
3927 proper license for this switch to work.
3928 Example values for <arch>: arm mips x86 generic
3932 if [ "$PLATFORM_QPA" = "yes" ]; then
3938 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3941 -xplatform target ... The target platform when cross-compiling.
3943 -no-feature-<feature> Do not compile in <feature>.
3944 -feature-<feature> .. Compile in <feature>. The available features
3945 are described in src/corelib/global/qfeatures.txt
3947 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3948 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3950 The floating point format is usually autodetected by configure. Use this
3951 to override the detected value.
3953 -little-endian ...... Target platform is little endian (LSB first).
3954 -big-endian ......... Target platform is big endian (MSB first).
3956 -host-little-endian . Host platform is little endian (LSB first).
3957 -host-big-endian .... Host platform is big endian (MSB first).
3959 You only need to specify the endianness when
3960 cross-compiling, otherwise the host
3961 endianness will be used.
3963 -no-freetype ........ Do not compile in Freetype2 support.
3964 -qt-freetype ........ Use the libfreetype bundled with Qt.
3965 * -system-freetype .... Use libfreetype from the operating system.
3966 See http://www.freetype.org/
3968 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3969 default ($CFG_QCONFIG).
3971 -no-opengl .......... Do not support OpenGL.
3972 -opengl <api> ....... Enable OpenGL ES support
3973 With no parameter, this will attempt to auto-detect
3974 OpenGL ES 2, or regular desktop OpenGL.
3975 Use es2 for <api> to override auto-detection.
3979 if [ "$PLATFORM_QWS" = "yes" ]; then
3982 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3983 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3985 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3986 by default all available decorations are on.
3987 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3988 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3989 linked to at run time.
3990 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3991 -no-decoration-<style> ....Disable decoration <style> entirely.
3992 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3994 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3995 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3996 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3997 linked to at run time.
3998 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3999 -no-gfx-<driver> ... Disable graphics <driver> entirely.
4000 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4002 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4003 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4005 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4007 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4009 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4010 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4012 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4013 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4014 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4016 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4017 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4018 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4020 -iwmmxt ............ Compile using the iWMMXt instruction set
4021 (available on some XScale CPUs).
4025 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4026 if [ "$CFG_GLIB" = "no" ]; then
4034 $GBN -no-glib ........... Do not compile Glib support.
4035 $GBY -glib .............. Compile Glib support.
4040 [ "x$ERROR" = "xyes" ] && exit 1
4045 # -----------------------------------------------------------------------------
4046 # LICENSING, INTERACTIVE PART
4047 # -----------------------------------------------------------------------------
4049 if [ "$PLATFORM_QWS" = "yes" ]; then
4050 Platform="Qt for Embedded Linux"
4051 elif [ "$PLATFORM_QPA" = "yes" ]; then
4052 Platform="Qt Lighthouse"
4053 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4054 Platform="Qt for Windows"
4055 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4057 Platform="Qt for Linux/X11"
4061 echo "This is the $Platform ${EditionString} Edition."
4064 if [ "$Edition" = "OpenSource" ]; then
4066 echo "You are licensed to use this software under the terms of"
4067 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4068 if [ -f "$relpath/LICENSE.GPL3" ]; then
4069 echo "You are also licensed to use this software under the terms of"
4070 echo "the GNU General Public License (GPL) versions 3."
4076 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4077 echo "You have already accepted the terms of the $LicenseType license."
4080 if [ -f "$relpath/LICENSE.GPL3" ]; then
4081 echo "Type '3' to view the GNU General Public License version 3."
4083 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4084 echo "Type 'yes' to accept this license offer."
4085 echo "Type 'no' to decline this license offer."
4087 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4091 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4093 elif [ "$acceptance" = "no" ]; then
4094 echo "You are not licensed to use this software."
4097 elif [ "$acceptance" = "3" ]; then
4098 more "$relpath/LICENSE.GPL3"
4099 elif [ "$acceptance" = "L" ]; then
4100 more "$relpath/LICENSE.LGPL"
4103 elif [ "$Edition" = "Preview" ]; then
4104 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4107 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4108 echo "You have already accepted the terms of the $LicenseType license."
4111 echo "You are licensed to use this software under the terms of"
4112 echo "the $TheLicense"
4114 echo "Type '?' to read the Preview License."
4115 echo "Type 'yes' to accept this license offer."
4116 echo "Type 'no' to decline this license offer."
4118 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4122 if [ "$acceptance" = "yes" ]; then
4124 elif [ "$acceptance" = "no" ] ;then
4125 echo "You are not licensed to use this software."
4128 elif [ "$acceptance" = "?" ]; then
4129 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4132 elif [ "$Edition" != "OpenSource" ]; then
4133 if [ -n "$ExpiryDate" ]; then
4134 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4135 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4136 Today=`date +%Y%m%d`
4137 if [ "$Today" -gt "$ExpiryDate" ]; then
4138 case "$LicenseType" in
4139 Commercial|Academic|Educational)
4140 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4142 echo "NOTICE NOTICE NOTICE NOTICE"
4144 echo " Your support and upgrade period has expired."
4146 echo " You are no longer licensed to use this version of Qt."
4147 echo " Please contact qt-info@nokia.com to renew your support"
4148 echo " and upgrades for this license."
4150 echo "NOTICE NOTICE NOTICE NOTICE"
4155 echo "WARNING WARNING WARNING WARNING"
4157 echo " Your support and upgrade period has expired."
4159 echo " You may continue to use your last licensed release"
4160 echo " of Qt under the terms of your existing license"
4161 echo " agreement. But you are not entitled to technical"
4162 echo " support, nor are you entitled to use any more recent"
4163 echo " Qt releases."
4165 echo " Please contact qt-info@nokia.com to renew your"
4166 echo " support and upgrades for this license."
4168 echo "WARNING WARNING WARNING WARNING"
4175 echo "NOTICE NOTICE NOTICE NOTICE"
4177 echo " Your Evaluation license has expired."
4179 echo " You are no longer licensed to use this software. Please"
4180 echo " contact qt-info@nokia.com to purchase license, or install"
4181 echo " the Qt Open Source Edition if you intend to develop free"
4184 echo "NOTICE NOTICE NOTICE NOTICE"
4191 TheLicense=`head -n 1 "$outpath/LICENSE"`
4193 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4194 echo "You have already accepted the terms of the $TheLicense."
4197 echo "You are licensed to use this software under the terms of"
4198 echo "the $TheLicense."
4200 echo "Type '?' to view the $TheLicense."
4201 echo "Type 'yes' to accept this license offer."
4202 echo "Type 'no' to decline this license offer."
4204 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4208 if [ "$acceptance" = "yes" ]; then
4210 elif [ "$acceptance" = "no" ]; then
4211 echo "You are not licensed to use this software."
4214 else [ "$acceptance" = "?" ]
4215 more "$outpath/LICENSE"
4220 # this should be moved somewhere else
4223 AIX_VERSION=`uname -v`
4224 if [ "$AIX_VERSION" -lt "5" ]; then
4225 QMakeVar add QMAKE_LIBS_X11 -lbind
4232 #-------------------------------------------------------------------------------
4233 # generate qconfig.cpp
4234 #-------------------------------------------------------------------------------
4235 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4237 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4238 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4239 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4240 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4241 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4242 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4243 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4244 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4245 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4246 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4247 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4248 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4249 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4250 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4252 TODAY=`date +%Y-%m-%d`
4253 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4255 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4256 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4258 /* Installation date */
4259 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4263 if [ ! -z "$QT_HOST_PREFIX" ]; then
4264 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4265 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4266 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4267 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4268 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4269 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4270 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4271 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4272 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4273 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4274 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4275 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4277 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4279 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4280 /* Installation Info */
4281 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4282 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4283 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4284 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4285 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4286 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4287 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4288 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4289 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4290 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4291 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4292 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4293 #else // QT_BOOTSTRAPPED
4297 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4298 /* Installation Info */
4299 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4300 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4301 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4302 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4303 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4304 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4305 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4306 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4307 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4308 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4309 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4310 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4313 if [ ! -z "$QT_HOST_PREFIX" ]; then
4314 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4315 #endif // QT_BOOTSTRAPPED
4320 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4321 /* strlen( "qt_lcnsxxxx" ) == 12 */
4322 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4323 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4324 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4325 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4326 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4327 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4328 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4329 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4330 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4331 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4332 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4333 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4334 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4335 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4338 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4339 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4340 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4342 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4343 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4344 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4347 # -----------------------------------------------------------------------------
4348 if [ "$LicenseType" = "Evaluation" ]; then
4349 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4350 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4351 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4354 if [ -n "$EVALKEY" ]; then
4355 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4356 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4357 /* Evaluation license key */
4358 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4360 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4364 # -----------------------------------------------------------------------------
4366 # -----------------------------------------------------------------------------
4369 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4371 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4372 if [ "$OPT_SHADOW" = "yes" ]; then
4373 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4374 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4375 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4380 # $2: optional transformation
4381 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4382 # is where the resulting variable is written to
4383 # Assumes that the optional transformation produces the same variable name for each hit
4384 setBootstrapVariable()
4386 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4392 valStart = index($0, "=") + 1
4395 if (substr($0, valStart - 2, 1) == "+") {
4399 variable = substr($0, 0, valStart - 2 - append)
4400 value = substr($0, valStart)
4401 gsub("[ \t]+", "", variable)
4402 gsub("^[ \t]+", "", value)
4403 gsub("[ \t]+$", "", value)
4405 if (append == 1 && length(combinedValue) > 0) {
4406 combinedValue = combinedValue " " value
4408 combinedValue = value
4412 if (length(combinedValue) > 0) {
4413 printf "%s = %s\n", variable, combinedValue
4419 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4420 echo "Creating qmake. Please wait..."
4423 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4424 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4425 if [ -f "$QCONFIG_H" ]; then
4426 OLD_QCONFIG_H=$QCONFIG_H
4427 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4430 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4431 # when building qmake, we use #defines for the install paths,
4432 # however they are real functions in the library
4433 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4434 mkdir -p "$outpath/src/corelib/global"
4435 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4436 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4439 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4441 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4442 rm -rf mkspecs/default
4443 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4445 for mkfile in GNUmakefile Makefile; do
4448 in_mkfile="${mkfile}.in"
4449 if [ "$mkfile" = "Makefile" ]; then
4450 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4451 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4453 in_mkfile="${mkfile}.unix"
4455 in_mkfile="$relpath/qmake/$in_mkfile"
4456 mkfile="$outpath/qmake/$mkfile"
4457 if [ -f "$mkfile" ]; then
4458 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4461 [ -f "$in_mkfile" ] || continue
4463 echo "########################################################################" > "$mkfile"
4464 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4465 echo "########################################################################" >> "$mkfile"
4468 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4469 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4470 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4472 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4473 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4476 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4477 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4478 if [ "$CFG_SILENT" = "yes" ]; then
4479 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4480 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4482 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4483 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4485 setBootstrapVariable QMAKE_CFLAGS
4486 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4487 setBootstrapVariable QMAKE_LFLAGS
4489 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4490 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4491 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4493 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4494 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4495 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4496 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4497 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4498 elif [ "$CFG_DEBUG" = "yes" ]; then
4499 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4500 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4501 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4502 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4505 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4506 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4507 for rpath in $RPATH_FLAGS; do
4508 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4511 if [ "$BUILD_ON_MAC" = "yes" ]; then
4512 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4513 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4514 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4515 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4516 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4517 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4518 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4519 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4520 if [ '!' -z "$CFG_SDK" ]; then
4521 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4522 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4523 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4524 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4525 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4528 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4529 if [ '!' -z "$D_FLAGS" ]; then
4530 for DEF in $D_FLAGS; do
4531 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4534 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4535 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4536 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4537 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4539 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4540 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4541 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4542 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4543 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4544 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4545 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4546 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4547 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4548 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4550 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4551 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4552 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4553 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4558 QMAKE_BUILD_ERROR=no
4559 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4560 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4561 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4562 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4565 #-------------------------------------------------------------------------------
4566 # tests that need qmake
4567 #-------------------------------------------------------------------------------
4569 # detect availability of float math.h functions
4570 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4571 CFG_USE_FLOATMATH=yes
4573 CFG_USE_FLOATMATH=no
4576 # detect mmx support
4577 if [ "${CFG_MMX}" = "auto" ]; then
4578 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4585 # detect 3dnow support
4586 if [ "${CFG_3DNOW}" = "auto" ]; then
4587 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4594 # detect sse support
4595 if [ "${CFG_SSE}" = "auto" ]; then
4596 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4603 # detect sse2 support
4604 if [ "${CFG_SSE2}" = "auto" ]; then
4605 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4612 # detect sse3 support
4613 if [ "${CFG_SSE3}" = "auto" ]; then
4614 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4621 # detect ssse3 support
4622 if [ "${CFG_SSSE3}" = "auto" ]; then
4623 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4630 # detect sse4.1 support
4631 if [ "${CFG_SSE4_1}" = "auto" ]; then
4632 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
4639 # detect sse4.2 support
4640 if [ "${CFG_SSE4_2}" = "auto" ]; then
4641 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
4648 # detect avx support
4649 if [ "${CFG_AVX}" = "auto" ]; then
4650 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4657 # check iWMMXt support
4658 if [ "$CFG_IWMMXT" = "yes" ]; then
4659 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4660 if [ $? != "0" ]; then
4661 echo "The iWMMXt functionality test failed!"
4662 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4667 # detect neon support
4668 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4669 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
4676 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4679 if [ "$CFG_ZLIB" = "no" ]; then
4680 # Note: Qt no longer support builds without zlib
4681 # So we force a "no" to be "auto" here.
4682 # If you REALLY really need no zlib support, you can still disable
4683 # it by doing the following:
4684 # add "no-zlib" to mkspecs/qconfig.pri
4685 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4687 # There's no guarantee that Qt will build under those conditions
4692 if [ "$CFG_ZLIB" = "auto" ]; then
4693 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
4700 if [ "$CFG_LARGEFILE" = "auto" ]; then
4701 #Large files should be enabled for all Linux systems
4705 # detect how jpeg should be built
4706 if [ "$CFG_JPEG" = "auto" ]; then
4707 if [ "$CFG_SHARED" = "yes" ]; then
4714 if [ "$CFG_LIBJPEG" = "auto" ]; then
4715 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
4722 # detect how gif should be built
4723 if [ "$CFG_GIF" = "auto" ]; then
4724 if [ "$CFG_SHARED" = "yes" ]; then
4732 if [ "$CFG_LIBPNG" = "auto" ]; then
4733 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
4740 # detect accessibility
4741 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4742 CFG_ACCESSIBILITY=yes
4745 # auto-detect SQL-modules support
4746 for _SQLDR in $CFG_SQL_AVAILABLE; do
4749 if [ "$CFG_SQL_mysql" != "no" ]; then
4750 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4751 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4752 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4753 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4754 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4755 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4756 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4758 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4759 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4760 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4761 echo " You need MySql 4 or higher."
4762 echo " If you believe this message is in error you may use the continue"
4763 echo " switch (-continue) to $0 to continue."
4768 QT_LFLAGS_MYSQL_R=""
4772 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
4773 QMakeVar add CONFIG use_libmysqlclient_r
4774 if [ "$CFG_SQL_mysql" = "auto" ]; then
4775 CFG_SQL_mysql=plugin
4777 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4778 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
4779 if [ "$CFG_SQL_mysql" = "auto" ]; then
4780 CFG_SQL_mysql=plugin
4783 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4784 echo "MySQL support cannot be enabled due to functionality tests!"
4785 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4786 echo " If you believe this message is in error you may use the continue"
4787 echo " switch (-continue) to $0 to continue."
4792 QT_LFLAGS_MYSQL_R=""
4800 if [ "$CFG_SQL_psql" != "no" ]; then
4801 # Be careful not to use native pg_config when cross building.
4802 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4803 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4804 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4806 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4807 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4808 # But, respect PSQL_LIBS if set
4809 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4810 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
4811 if [ "$CFG_SQL_psql" = "auto" ]; then
4815 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4816 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4817 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4818 echo " If you believe this message is in error you may use the continue"
4819 echo " switch (-continue) to $0 to continue."
4830 if [ "$CFG_SQL_odbc" != "no" ]; then
4831 if ( [ "$BUILD_ON_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
4832 if [ "$CFG_SQL_odbc" = "auto" ]; then
4836 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
4837 QT_LFLAGS_ODBC="-liodbc"
4838 if [ "$CFG_SQL_odbc" = "auto" ]; then
4842 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4843 echo "ODBC support cannot be enabled due to functionality tests!"
4844 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4845 echo " If you believe this message is in error you may use the continue"
4846 echo " switch (-continue) to $0 to continue."
4856 if [ "$CFG_SQL_oci" != "no" ]; then
4857 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
4858 if [ "$CFG_SQL_oci" = "auto" ]; then
4862 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4863 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4864 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4865 echo " If you believe this message is in error you may use the continue"
4866 echo " switch (-continue) to $0 to continue."
4875 if [ "$CFG_SQL_tds" != "no" ]; then
4876 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4877 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4878 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
4879 if [ "$CFG_SQL_tds" = "auto" ]; then
4883 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4884 echo "TDS support cannot be enabled due to functionality tests!"
4885 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4886 echo " If you believe this message is in error you may use the continue"
4887 echo " switch (-continue) to $0 to continue."
4896 if [ "$CFG_SQL_db2" != "no" ]; then
4897 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
4898 if [ "$CFG_SQL_db2" = "auto" ]; then
4902 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4903 echo "ODBC support cannot be enabled due to functionality tests!"
4904 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4905 echo " If you believe this message is in error you may use the continue"
4906 echo " switch (-continue) to $0 to continue."
4915 if [ "$CFG_SQL_ibase" != "no" ]; then
4916 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
4917 if [ "$CFG_SQL_ibase" = "auto" ]; then
4918 CFG_SQL_ibase=plugin
4921 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4922 echo "InterBase support cannot be enabled due to functionality tests!"
4923 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4924 echo " If you believe this message is in error you may use the continue"
4925 echo " switch (-continue) to $0 to continue."
4934 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4935 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
4936 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4937 CFG_SQL_sqlite2=plugin
4940 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4941 echo "SQLite2 support cannot be enabled due to functionality tests!"
4942 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4943 echo " If you believe this message is in error you may use the continue"
4944 echo " switch (-continue) to $0 to continue."
4953 if [ "$CFG_SQL_sqlite" != "no" ]; then
4954 SQLITE_AUTODETECT_FAILED="no"
4955 if [ "$CFG_SQLITE" = "system" ]; then
4956 if [ -n "$PKG_CONFIG" ]; then
4957 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4958 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4960 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
4961 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4962 CFG_SQL_sqlite=plugin
4964 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4966 SQLITE_AUTODETECT_FAILED="yes"
4969 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4970 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4971 CFG_SQL_sqlite=plugin
4974 SQLITE_AUTODETECT_FAILED="yes"
4978 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4979 echo "SQLite support cannot be enabled due to functionality tests!"
4980 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4981 echo " If you believe this message is in error you may use the continue"
4982 echo " switch (-continue) to $0 to continue."
4988 if [ "$OPT_VERBOSE" = "yes" ]; then
4989 echo "unknown SQL driver: $_SQLDR"
4995 # auto-detect NIS support
4996 if [ "$CFG_NIS" != "no" ]; then
4997 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
5000 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5001 echo "NIS support cannot be enabled due to functionality tests!"
5002 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5003 echo " If you believe this message is in error you may use the continue"
5004 echo " switch (-continue) to $0 to continue."
5012 # auto-detect CUPS support
5013 if [ "$CFG_CUPS" != "no" ]; then
5014 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
5017 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5018 echo "Cups support cannot be enabled due to functionality tests!"
5019 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5020 echo " If you believe this message is in error you may use the continue"
5021 echo " switch (-continue) to $0 to continue."
5029 # auto-detect iconv(3) support
5030 if [ "$CFG_ICONV" != "no" ]; then
5031 if [ "$PLATFORM_QWS" = "yes" -o "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
5033 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
5035 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
5037 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
5040 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5041 echo "Iconv support cannot be enabled due to functionality tests!"
5042 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5043 echo " If you believe this message is in error you may use the continue"
5044 echo " switch (-continue) to $0 to continue."
5052 # auto-detect libdbus-1 support
5053 if [ "$CFG_DBUS" != "no" ]; then
5054 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5055 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5056 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5058 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
5059 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5060 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5061 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5063 if [ "$CFG_DBUS" = "auto" ]; then
5065 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5066 # CFG_DBUS is "yes" or "linked" here
5068 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5069 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5070 echo " If you believe this message is in error you may use the continue"
5071 echo " switch (-continue) to $0 to continue."
5077 # X11/QWS/Lighthouse
5078 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5080 # auto-detect Glib support
5081 if [ "$CFG_GLIB" != "no" ]; then
5082 if [ -n "$PKG_CONFIG" ]; then
5083 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5084 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5086 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
5088 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5089 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5091 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5092 echo "Glib support cannot be enabled due to functionality tests!"
5093 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5094 echo " If you believe this message is in error you may use the continue"
5095 echo " switch (-continue) to $0 to continue."
5104 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5105 if [ -n "$PKG_CONFIG" ]; then
5106 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5107 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5109 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
5111 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5112 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5114 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5115 echo "Gstreamer support cannot be enabled due to functionality tests!"
5116 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5117 echo " If you believe this message is in error you may use the continue"
5118 echo " switch (-continue) to $0 to continue."
5124 elif [ "$CFG_GLIB" = "no" ]; then
5128 # auto-detect libicu support
5129 if [ "$CFG_ICU" != "no" ]; then
5130 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5131 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5133 if [ "$CFG_ICU" = "auto" ]; then
5135 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5138 echo "The ICU library support cannot be enabled."
5139 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5140 echo " If you believe this message is in error you may use the continue"
5141 echo " switch (-continue) to $0 to continue."
5147 # Auto-detect PulseAudio support
5148 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5149 if [ -n "$PKG_CONFIG" ]; then
5150 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5151 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5153 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
5155 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5156 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5158 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5159 echo "PulseAudio support cannot be enabled due to functionality tests!"
5160 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5161 echo " If you believe this message is in error you may use the continue"
5162 echo " switch (-continue) to $0 to continue."
5169 fi # X11/QWS/Lighthouse
5172 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5173 x11tests="$relpath/config.tests/x11"
5176 # work around broken X11 headers when using GCC 2.95 or later
5178 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5179 if [ $NOTYPE = "yes" ]; then
5180 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5181 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5184 # Check we actually have X11 :-)
5185 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5186 if [ $? != "0" ]; then
5187 echo "Basic XLib functionality test failed!"
5188 echo " You might need to modify the include and library search paths by editing"
5189 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5195 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5196 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5197 if [ "$CFG_GUI" = "no" ]; then
5198 if [ "$CFG_OPENGL" = "auto" ]; then
5201 if [ "$CFG_OPENGL" != "no" ]; then
5202 echo "OpenGL enabled, but GUI disabled."
5203 echo " You might need to either enable the GUI or disable OpenGL"
5207 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5208 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
5210 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
5212 if [ "$CFG_EGL" = "no" ]; then
5216 if [ "$CFG_OPENGL" = "yes" ]; then
5217 echo "All the OpenGL functionality tests failed!"
5218 echo " You might need to modify the include and library search paths by editing"
5219 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5220 echo " ${XQMAKESPEC}."
5227 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5228 if [ "$CFG_OPENGL" = "desktop" ]; then
5229 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5230 if [ $? != "0" ]; then
5231 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5238 elif [ "$CFG_OPENGL" = "es2" ]; then
5240 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5241 if [ $? != "0" ]; then
5242 echo "The OpenGL ES 2.0 functionality test failed!"
5243 echo " You might need to modify the include and library search paths by editing"
5244 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5245 echo " ${XQMAKESPEC}."
5248 elif [ "$CFG_OPENGL" = "desktop" ]; then
5249 # Desktop OpenGL support
5250 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5251 if [ $? != "0" ]; then
5252 echo "The OpenGL functionality test failed!"
5253 echo " You might need to modify the include and library search paths by editing"
5254 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5255 echo " ${XQMAKESPEC}."
5260 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5261 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5262 if [ $? != "0" ]; then
5263 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5270 fi # X11/MINGW OpenGL
5273 if [ "$PLATFORM_X11" = "yes" ]; then
5274 # auto-detect Xcursor support
5275 if [ "$CFG_XCURSOR" != "no" ]; then
5276 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
5277 if [ "$CFG_XCURSOR" != "runtime" ]; then
5281 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5282 echo "Xcursor support cannot be enabled due to functionality tests!"
5283 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5284 echo " If you believe this message is in error you may use the continue"
5285 echo " switch (-continue) to $0 to continue."
5293 # auto-detect Xfixes support
5294 if [ "$CFG_XFIXES" != "no" ]; then
5295 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5296 if [ "$CFG_XFIXES" != "runtime" ]; then
5300 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5301 echo "Xfixes support cannot be enabled due to functionality tests!"
5302 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5303 echo " If you believe this message is in error you may use the continue"
5304 echo " switch (-continue) to $0 to continue."
5312 # auto-detect Xrandr support (resize and rotate extension)
5313 if [ "$CFG_XRANDR" != "no" ]; then
5314 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
5315 if [ "$CFG_XRANDR" != "runtime" ]; then
5319 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5320 echo "Xrandr support cannot be enabled due to functionality tests!"
5321 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5322 echo " If you believe this message is in error you may use the continue"
5323 echo " switch (-continue) to $0 to continue."
5331 # auto-detect Xrender support
5332 if [ "$CFG_XRENDER" != "no" ]; then
5333 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
5336 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5337 echo "Xrender support cannot be enabled due to functionality tests!"
5338 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5339 echo " If you believe this message is in error you may use the continue"
5340 echo " switch (-continue) to $0 to continue."
5348 # auto-detect MIT-SHM support
5349 if [ "$CFG_MITSHM" != "no" ]; then
5350 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
5353 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5354 echo "MITSHM support cannot be enabled due to functionality tests!"
5355 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5356 echo " If you believe this message is in error you may use the continue"
5357 echo " switch (-continue) to $0 to continue."
5365 # auto-detect FontConfig support
5366 if [ "$CFG_FONTCONFIG" != "no" ]; then
5367 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5368 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5369 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5371 QT_CFLAGS_FONTCONFIG=
5372 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5374 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
5376 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5377 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5378 CFG_LIBFREETYPE=system
5380 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5381 echo "FontConfig support cannot be enabled due to functionality tests!"
5382 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5383 echo " If you believe this message is in error you may use the continue"
5384 echo " switch (-continue) to $0 to continue."
5392 # auto-detect Session Management support
5393 if [ "$CFG_SM" = "auto" ]; then
5394 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
5397 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5398 echo "Session Management support cannot be enabled due to functionality tests!"
5399 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5400 echo " If you believe this message is in error you may use the continue"
5401 echo " switch (-continue) to $0 to continue."
5409 # auto-detect SHAPE support
5410 if [ "$CFG_XSHAPE" != "no" ]; then
5411 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
5414 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5415 echo "XShape support cannot be enabled due to functionality tests!"
5416 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5417 echo " If you believe this message is in error you may use the continue"
5418 echo " switch (-continue) to $0 to continue."
5426 # auto-detect XVideo support
5427 if [ "$CFG_XVIDEO" != "no" ]; then
5428 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
5431 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5432 echo "XVideo support cannot be enabled due to functionality tests!"
5433 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5434 echo " If you believe this message is in error you may use the continue"
5435 echo " switch (-continue) to $0 to continue."
5443 # auto-detect XSync support
5444 if [ "$CFG_XSYNC" != "no" ]; then
5445 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
5448 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5449 echo "XSync support cannot be enabled due to functionality tests!"
5450 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5451 echo " If you believe this message is in error you may use the continue"
5452 echo " switch (-continue) to $0 to continue."
5460 # auto-detect Xinerama support
5461 if [ "$CFG_XINERAMA" != "no" ]; then
5462 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
5463 if [ "$CFG_XINERAMA" != "runtime" ]; then
5467 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5468 echo "Xinerama support cannot be enabled due to functionality tests!"
5469 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5470 echo " If you believe this message is in error you may use the continue"
5471 echo " switch (-continue) to $0 to continue."
5479 # auto-detect Xinput support
5480 if [ "$CFG_XINPUT" != "no" ]; then
5481 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
5482 if [ "$CFG_XINPUT" != "runtime" ]; then
5486 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5487 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5488 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5489 echo " If you believe this message is in error you may use the continue"
5490 echo " switch (-continue) to $0 to continue."
5498 # auto-detect XKB support
5499 if [ "$CFG_XKB" != "no" ]; then
5500 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
5503 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5504 echo "XKB support cannot be enabled due to functionality tests!"
5505 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5506 echo " If you believe this message is in error you may use the continue"
5507 echo " switch (-continue) to $0 to continue."
5515 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5516 if [ -n "$PKG_CONFIG" ]; then
5517 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5518 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5520 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5522 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5523 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5525 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5526 echo "Gtk theme support cannot be enabled due to functionality tests!"
5527 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5528 echo " If you believe this message is in error you may use the continue"
5529 echo " switch (-continue) to $0 to continue."
5535 elif [ "$CFG_GLIB" = "no" ]; then
5541 if [ "$BUILD_ON_MAC" = "yes" ]; then
5542 if [ "$CFG_PHONON" != "no" ]; then
5543 # Always enable Phonon (unless it was explicitly disabled)
5547 if [ "$CFG_COREWLAN" = "auto" ]; then
5548 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
5557 if [ "$PLATFORM_QPA" = "yes" ]; then
5558 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5559 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5560 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
5562 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
5565 if [ "$CFG_OPENGL" = "yes" ]; then
5566 echo "All the OpenGL functionality tests failed!"
5567 echo " You might need to modify the include and library search paths by editing"
5568 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5569 echo " ${XQMAKESPEC}."
5574 elif [ "$CFG_OPENGL" = "es2" ]; then
5576 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5577 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
5578 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
5579 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5580 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5581 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5582 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5583 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5586 "$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
5587 if [ $? != "0" ]; then
5588 echo "The OpenGL ES 2.0 functionality test failed!"
5589 echo " You might need to modify the include and library search paths by editing"
5590 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5591 echo " ${XQMAKESPEC}."
5594 elif [ "$CFG_OPENGL" = "desktop" ]; then
5595 # Desktop OpenGL support
5596 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5597 if [ $? != "0" ]; then
5598 echo "The OpenGL functionality test failed!"
5599 echo " You might need to modify the include and library search paths by editing"
5600 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5601 echo " ${XQMAKESPEC}."
5606 # auto-detect FontConfig support
5607 if [ "$CFG_FONTCONFIG" != "no" ]; then
5608 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5609 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5610 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5612 QT_CFLAGS_FONTCONFIG=
5613 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5615 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
5616 QT_CONFIG="$QT_CONFIG fontconfig"
5617 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5618 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5619 CFG_LIBFREETYPE=system
5624 # Save these for a check later
5625 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5626 ORIG_CFG_XCB="$CFG_XCB"
5628 if [ "$CFG_WAYLAND" != "no" ]; then
5629 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5630 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5631 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5632 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
5633 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
5635 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
5637 QT_CONFIG="$QT_CONFIG wayland"
5638 elif [ "$CFG_WAYLAND" = "yes" ]; then
5639 echo "The Wayland functionality test failed!"
5643 QMakeVar add DEFINES QT_NO_WAYLAND
5647 if [ "$CFG_LIBUDEV" != "no" ]; then
5648 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5650 QT_CONFIG="$QT_CONFIG libudev"
5651 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5652 echo "The libudev functionality test failed!"
5656 QMakeVar add DEFINES QT_NO_LIBUDEV
5660 if [ "$CFG_EVDEV" != "no" ]; then
5661 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5663 QT_CONFIG="$QT_CONFIG evdev"
5664 elif [ "$CFG_EVDEV" = "yes" ]; then
5665 echo "The evdev functionality test failed!"
5669 QMakeVar add DEFINES QT_NO_EVDEV
5673 # Check we actually have X11 :-)
5674 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
5675 QT_CONFIG="$QT_CONFIG xlib"
5678 # auto-detect Xrender support
5679 if [ "$CFG_XRENDER" != "no" ]; then
5680 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
5682 QT_CONFIG="$QT_CONFIG xrender"
5684 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5685 echo "Xrender support cannot be enabled due to functionality tests!"
5686 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5687 echo " If you believe this message is in error you may use the continue"
5688 echo " switch (-continue) to $0 to continue."
5696 if [ "$CFG_XCB" != "no" ]; then
5697 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
5699 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
5700 QT_CONFIG="$QT_CONFIG xcb-render"
5703 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
5705 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5708 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
5709 QT_CONFIG="$QT_CONFIG xcb-xlib"
5712 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5713 # auto-detect XInput2/Xinput support
5714 if [ "$CFG_XINPUT2" != "no" ]; then
5715 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
5719 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5720 echo "XInput2 support cannot be enabled due to functionality tests!"
5721 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5722 echo " If you believe this message is in error you may use the continue"
5723 echo " switch (-continue) to $0 to continue."
5732 if [ "$CFG_XCB" = "yes" ]; then
5733 echo "The XCB test failed!"
5734 echo " You might need to install dependency packages."
5735 echo " See src/plugins/platforms/xcb/README."
5739 QMakeVar add DEFINES QT_NO_XCB
5743 # Detect libxkbcommon
5744 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5745 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5746 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5747 if [ "$CFG_WAYLAND" = "yes" ]; then
5748 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5749 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5751 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5752 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5754 if [ "$CFG_WAYLAND" = "yes" ]; then
5755 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5757 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5760 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5761 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5762 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5763 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5764 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5765 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5766 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5769 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5770 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5771 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5772 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5775 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
5776 QT_CONFIG="$QT_CONFIG coreservices"
5778 QMakeVar add DEFINES QT_NO_CORESERVICES
5781 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5782 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5783 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5784 echo "No QPA platform plugin enabled!"
5785 echo " If you really want to build without a QPA platform plugin you must pass"
5786 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5787 echo " cannot run GUI applications."
5797 if [ "$PLATFORM_QWS" = "yes" ]; then
5799 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5800 if [ "$CFG_GUI" = "no" ]; then
5801 if [ "$CFG_OPENGL" = "auto" ]; then
5804 if [ "$CFG_OPENGL" != "no" ]; then
5805 echo "OpenGL enabled, but GUI disabled."
5806 echo " You might need to either enable the GUI or disable OpenGL"
5810 if [ "$CFG_OPENGL" = "yes" ]; then
5812 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
5815 elif [ "$CFG_OPENGL" = "es2" ]; then
5817 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5818 if [ $? != "0" ]; then
5819 echo "The OpenGL ES 2.0 functionality test failed!"
5820 echo " You might need to modify the include and library search paths by editing"
5821 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5822 echo " ${XQMAKESPEC}."
5826 elif [ "$CFG_OPENGL" = "desktop" ]; then
5827 # Desktop OpenGL support
5828 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5833 if [ "$PLATFORM_QWS" = "yes" ]; then
5836 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5837 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5838 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5839 if [ $? != "0" ]; then
5840 echo "The Ahi screen driver functionality test failed!"
5841 echo " You might need to modify the include and library search paths by editing"
5842 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5843 echo " ${XQMAKESPEC}."
5848 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5849 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5850 if [ $? != "0" ]; then
5851 echo "The SVGAlib screen driver functionality test failed!"
5852 echo " You might need to modify the include and library search paths by editing"
5853 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5854 echo " ${XQMAKESPEC}."
5859 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5860 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
5861 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5862 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
5863 elif directfb-config --version >/dev/null 2>&1; then
5864 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
5865 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
5868 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5869 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
5870 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
5871 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
5874 "$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
5875 if [ $? != "0" ]; then
5876 echo "The DirectFB screen driver functionality test failed!"
5877 echo " You might need to modify the include and library search paths by editing"
5878 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5879 echo " ${XQMAKESPEC}."
5887 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5888 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5889 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5890 if [ $? != "0" ]; then
5891 echo "The tslib functionality test failed!"
5892 echo " You might need to modify the include and library search paths by editing"
5893 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5894 echo " ${XQMAKESPEC}."
5903 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
5904 if [ $? != "0" ]; then
5905 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
5912 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
5913 if [ "$CFG_EGL" != "no" ]; then
5914 # detect EGL support
5915 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
5916 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5921 if [ "$EGL_VARIANT" = "none" ]; then
5922 if [ "$CFG_EGL" = "yes" ]; then
5923 echo "The EGL functionality test failed!"
5924 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5925 echo " You might need to modify the include and library search paths by editing"
5926 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5927 echo " ${XQMAKESPEC}."
5931 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5932 if [ "$CFG_OPENGL" = "es2" ]; then
5939 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5942 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
5943 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5944 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5945 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
5946 CFG_LIBFREETYPE=system
5952 if [ "$CFG_ENDIAN" = "auto" ]; then
5953 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5954 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5955 elif [ "$BUILD_ON_MAC" = "yes" ]; then
5958 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
5960 if [ "$F" -eq 0 ]; then
5961 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5962 elif [ "$F" -eq 1 ]; then
5963 CFG_ENDIAN="Q_BIG_ENDIAN"
5966 echo "The target system byte order could not be detected!"
5967 echo "Turn on verbose messaging (-v) to see the final report."
5968 echo "You can use the -little-endian or -big-endian switch to"
5969 echo "$0 to continue."
5975 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5976 if [ "$BUILD_ON_MAC" = "yes" ]; then
5979 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5981 if [ "$F" -eq 0 ]; then
5982 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5983 elif [ "$F" -eq 1 ]; then
5984 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5987 echo "The host system byte order could not be detected!"
5988 echo "Turn on verbose messaging (-v) to see the final report."
5989 echo "You can use the -host-little-endian or -host-big-endian switch to"
5990 echo "$0 to continue."
5996 if [ "$CFG_ARMFPA" != "auto" ]; then
5997 if [ "$CFG_ARMFPA" = "yes" ]; then
5998 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5999 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6001 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6004 CFG_DOUBLEFORMAT="normal"
6009 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6010 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6011 CFG_DOUBLEFORMAT=normal
6013 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6015 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6016 CFG_DOUBLEFORMAT=normal
6017 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6018 CFG_DOUBLEFORMAT=normal
6019 elif [ "$F" -eq 10 ]; then
6020 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6021 elif [ "$F" -eq 11 ]; then
6022 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6023 elif [ "$F" -eq 12 ]; then
6024 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6026 elif [ "$F" -eq 13 ]; then
6027 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6031 echo "The system floating point format could not be detected."
6032 echo "This may cause data to be generated in a wrong format"
6033 echo "Turn on verbose messaging (-v) to see the final report."
6034 # we do not fail on this since this is a new test, and if it fails,
6035 # the old behavior should be correct in most cases
6036 CFG_DOUBLEFORMAT=normal
6042 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6046 if [ "$CFG_STL" != "no" ]; then
6047 if [ "$HAVE_STL" = "yes" ]; then
6050 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6051 echo "STL support cannot be enabled due to functionality tests!"
6052 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6053 echo " If you believe this message is in error you may use the continue"
6054 echo " switch (-continue) to $0 to continue."
6062 # detect POSIX clock_gettime()
6063 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6064 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
6065 CFG_CLOCK_GETTIME=yes
6067 CFG_CLOCK_GETTIME=no
6071 # detect POSIX monotonic clocks
6072 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6073 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
6074 CFG_CLOCK_MONOTONIC=yes
6076 CFG_CLOCK_MONOTONIC=no
6078 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6079 CFG_CLOCK_MONOTONIC=no
6083 if [ "$CFG_MREMAP" = "auto" ]; then
6084 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6091 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6092 if [ "$CFG_GETADDRINFO" != "no" ]; then
6093 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6096 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6097 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6098 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6099 echo " If you believe this message is in error you may use the continue"
6100 echo " switch (-continue) to $0 to continue."
6108 # find if the platform provides inotify
6109 if [ "$CFG_INOTIFY" != "no" ]; then
6110 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6113 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6114 echo "inotify support cannot be enabled due to functionality tests!"
6115 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6116 echo " If you believe this message is in error you may use the continue"
6117 echo " switch (-continue) to $0 to continue."
6125 # find if the platform provides if_nametoindex (ipv6 interface name support)
6126 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6127 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
6130 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6131 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6132 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6133 echo " If you believe this message is in error you may use the continue"
6134 echo " switch (-continue) to $0 to continue."
6142 # find if the platform provides getifaddrs (network interface enumeration)
6143 if [ "$CFG_GETIFADDRS" != "no" ]; then
6144 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6147 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6148 echo "getifaddrs support cannot be enabled due to functionality tests!"
6149 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6150 echo " If you believe this message is in error you may use the continue"
6151 echo " switch (-continue) to $0 to continue."
6160 if [ "$CFG_OPENSSL" != "no" ]; then
6161 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
6162 if [ "$CFG_OPENSSL" = "auto" ]; then
6166 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6167 echo "OpenSSL support cannot be enabled due to functionality tests!"
6168 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6169 echo " If you believe this message is in error you may use the continue"
6170 echo " switch (-continue) to $0 to continue."
6179 if [ "$CFG_PCRE" != "qt" ]; then
6180 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
6183 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6184 echo "PCRE support cannot be enabled due to functionality tests!"
6185 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6186 echo " If you believe this message is in error you may use the continue"
6187 echo " switch (-continue) to $0 to continue."
6195 # detect OpenVG support
6196 if [ "$CFG_OPENVG" != "no" ]; then
6197 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
6198 if [ "$CFG_OPENVG" = "auto" ]; then
6201 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
6202 if [ "$CFG_OPENVG" = "auto" ]; then
6205 CFG_OPENVG_ON_OPENGL=yes
6206 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
6207 if [ "$CFG_OPENVG" = "auto" ]; then
6210 CFG_OPENVG_LC_INCLUDES=yes
6211 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
6212 if [ "$CFG_OPENVG" = "auto" ]; then
6215 CFG_OPENVG_LC_INCLUDES=yes
6216 CFG_OPENVG_ON_OPENGL=yes
6218 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6219 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6220 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6221 echo " If you believe this message is in error you may use the continue"
6222 echo " switch (-continue) to $0 to continue."
6228 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
6229 CFG_OPENVG_SHIVA=yes
6233 if [ "$CFG_ALSA" = "auto" ]; then
6234 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6241 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6242 if [ "$CFG_ARCH" = "arm" ]; then
6243 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6244 if [ $? != "0" ]; then
6245 CFG_JAVASCRIPTCORE_JIT=no
6248 case "$XPLATFORM" in
6250 CFG_JAVASCRIPTCORE_JIT=no
6256 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6257 QMakeVar set JAVASCRIPTCORE_JIT yes
6258 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6259 QMakeVar set JAVASCRIPTCORE_JIT no
6262 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6263 CFG_AUDIO_BACKEND=yes
6266 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6267 echo "Warning: largefile support cannot be disabled for win32."
6271 #-------------------------------------------------------------------------------
6272 # ask for all that hasn't been auto-detected or specified in the arguments
6273 #-------------------------------------------------------------------------------
6275 ### fix this: user input should be validated in a loop
6276 if [ "$PLATFORM_QWS" = "yes" ]; then
6277 PROMPT_FOR_DEPTHS="yes"
6279 PROMPT_FOR_DEPTHS="no"
6281 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6283 echo "Choose pixel-depths to support:"
6285 echo " 1. 1bpp, black/white"
6286 echo " 4. 4bpp, grayscale"
6287 echo " 8. 8bpp, paletted"
6288 echo " 12. 12bpp, rgb 4-4-4"
6289 echo " 15. 15bpp, rgb 5-5-5"
6290 echo " 16. 16bpp, rgb 5-6-5"
6291 echo " 18. 18bpp, rgb 6-6-6"
6292 echo " 24. 24bpp, rgb 8-8-8"
6293 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6294 echo " all. All supported depths"
6296 echo "Your choices (default 8,16,32):"
6298 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6299 CFG_QWS_DEPTHS=8,16,32
6302 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6303 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6304 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6306 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6308 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6309 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6314 # enable dwarf2 support on Mac
6315 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6316 QT_CONFIG="$QT_CONFIG dwarf2"
6319 # Set the default arch if there are no "-arch" arguments on the configure line
6320 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6321 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6322 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6323 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6327 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6328 QT_CONFIG="$QT_CONFIG phonon-backend"
6331 # disable accessibility
6332 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6333 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6335 QT_CONFIG="$QT_CONFIG accessibility"
6338 # egl stuff does not belong in lighthouse, but rather in plugins
6339 if [ "$PLATFORM_QPA" = "yes" ]; then
6344 if [ "$CFG_EGL" = "no" ]; then
6345 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6347 QT_CONFIG="$QT_CONFIG egl"
6348 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6349 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6354 if [ "$CFG_OPENVG" = "no" ]; then
6355 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6357 QT_CONFIG="$QT_CONFIG openvg"
6358 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6359 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6361 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6362 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6364 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6365 QT_CONFIG="$QT_CONFIG shivavg"
6366 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6371 if [ "$CFG_OPENGL" = "no" ]; then
6372 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6374 QT_CONFIG="$QT_CONFIG opengl"
6377 if [ "$CFG_OPENGL" = "es2" ]; then
6378 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6381 if [ "$CFG_OPENGL" = "es2" ]; then
6382 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6383 QT_CONFIG="$QT_CONFIG opengles2"
6386 # safe execution environment
6387 if [ "$CFG_SXE" != "no" ]; then
6388 QT_CONFIG="$QT_CONFIG sxe"
6391 # build up the variables for output
6392 if [ "$CFG_DEBUG" = "yes" ]; then
6393 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6394 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6395 elif [ "$CFG_DEBUG" = "no" ]; then
6396 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6397 QMAKE_CONFIG="$QMAKE_CONFIG release"
6399 if [ "$CFG_SHARED" = "yes" ]; then
6400 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6401 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6402 elif [ "$CFG_SHARED" = "no" ]; then
6403 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6404 QMAKE_CONFIG="$QMAKE_CONFIG static"
6406 if [ "$PLATFORM_QWS" = "yes" ]; then
6407 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6408 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6409 QT_CONFIG="$QT_CONFIG embedded"
6410 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6412 if [ "$PLATFORM_QPA" = "yes" ]; then
6413 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6414 QT_CONFIG="$QT_CONFIG qpa"
6415 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6416 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6419 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6420 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6421 QT_CONFIG="$QT_CONFIG nacl pepper"
6422 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6425 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6426 # Do not set this here for Windows. Let qmake do it so
6427 # debug and release precompiled headers are kept separate.
6428 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6430 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6431 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6432 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6433 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6434 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6435 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6437 if [ "$CFG_STL" = "no" ]; then
6438 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6440 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6442 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6443 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6445 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6446 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6447 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6448 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6449 QMakeVar add QMAKE_CFLAGS -g
6450 QMakeVar add QMAKE_CXXFLAGS -g
6451 QT_CONFIG="$QT_CONFIG separate_debug_info"
6453 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6454 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6456 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6457 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6458 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6459 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6460 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6461 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6462 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6463 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6464 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6465 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6466 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6467 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6468 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6469 QT_CONFIG="$QT_CONFIG clock-gettime"
6471 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6472 QT_CONFIG="$QT_CONFIG clock-monotonic"
6474 if [ "$CFG_MREMAP" = "yes" ]; then
6475 QT_CONFIG="$QT_CONFIG mremap"
6477 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6478 QT_CONFIG="$QT_CONFIG getaddrinfo"
6480 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6481 QT_CONFIG="$QT_CONFIG ipv6ifname"
6483 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6484 QT_CONFIG="$QT_CONFIG getifaddrs"
6486 if [ "$CFG_INOTIFY" = "yes" ]; then
6487 QT_CONFIG="$QT_CONFIG inotify"
6489 if [ "$CFG_LIBJPEG" = "no" ]; then
6491 elif [ "$CFG_LIBJPEG" = "system" ]; then
6492 QT_CONFIG="$QT_CONFIG system-jpeg"
6494 if [ "$CFG_JPEG" = "no" ]; then
6495 QT_CONFIG="$QT_CONFIG no-jpeg"
6496 elif [ "$CFG_JPEG" = "yes" ]; then
6497 QT_CONFIG="$QT_CONFIG jpeg"
6499 if [ "$CFG_LIBPNG" = "no" ]; then
6502 if [ "$CFG_LIBPNG" = "system" ]; then
6503 QT_CONFIG="$QT_CONFIG system-png"
6505 if [ "$CFG_PNG" = "no" ]; then
6506 QT_CONFIG="$QT_CONFIG no-png"
6507 elif [ "$CFG_PNG" = "yes" ]; then
6508 QT_CONFIG="$QT_CONFIG png"
6510 if [ "$CFG_GIF" = "no" ]; then
6511 QT_CONFIG="$QT_CONFIG no-gif"
6512 elif [ "$CFG_GIF" = "yes" ]; then
6513 QT_CONFIG="$QT_CONFIG gif"
6515 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6516 QT_CONFIG="$QT_CONFIG no-freetype"
6517 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6518 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6519 QT_CONFIG="$QT_CONFIG system-freetype"
6521 QT_CONFIG="$QT_CONFIG freetype"
6523 if [ "$CFG_GUI" = "auto" ]; then
6526 if [ "$CFG_GUI" = "no" ]; then
6527 QT_CONFIG="$QT_CONFIG no-gui"
6529 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6533 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6534 #On Mac we implicitly link against libz, so we
6535 #never use the 3rdparty stuff.
6536 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6538 if [ "$CFG_ZLIB" = "yes" ]; then
6539 QT_CONFIG="$QT_CONFIG zlib"
6540 elif [ "$CFG_ZLIB" = "system" ]; then
6541 QT_CONFIG="$QT_CONFIG system-zlib"
6544 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6545 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6546 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6547 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6548 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6549 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6550 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6551 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6552 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6553 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6554 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6555 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6556 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6557 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6558 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6560 if [ "$PLATFORM_X11" = "yes" ]; then
6561 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6563 # for some reason, the following libraries are not always built shared,
6564 # so *every* program/lib (including Qt) has to link against them
6565 if [ "$CFG_XSHAPE" = "yes" ]; then
6566 QT_CONFIG="$QT_CONFIG xshape"
6568 if [ "$CFG_XVIDEO" = "yes" ]; then
6569 QT_CONFIG="$QT_CONFIG xvideo"
6571 if [ "$CFG_XSYNC" = "yes" ]; then
6572 QT_CONFIG="$QT_CONFIG xsync"
6574 if [ "$CFG_XINERAMA" = "yes" ]; then
6575 QT_CONFIG="$QT_CONFIG xinerama"
6576 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6578 if [ "$CFG_XCURSOR" = "yes" ]; then
6579 QT_CONFIG="$QT_CONFIG xcursor"
6580 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6582 if [ "$CFG_XFIXES" = "yes" ]; then
6583 QT_CONFIG="$QT_CONFIG xfixes"
6584 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6586 if [ "$CFG_XRANDR" = "yes" ]; then
6587 QT_CONFIG="$QT_CONFIG xrandr"
6588 if [ "$CFG_XRENDER" != "yes" ]; then
6589 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6590 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6592 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6595 if [ "$CFG_XRENDER" = "yes" ]; then
6596 QT_CONFIG="$QT_CONFIG xrender"
6597 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6599 if [ "$CFG_MITSHM" = "yes" ]; then
6600 QT_CONFIG="$QT_CONFIG mitshm"
6602 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6603 QT_CONFIG="$QT_CONFIG fontconfig"
6605 if [ "$CFG_XINPUT" = "yes" ]; then
6606 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6608 if [ "$CFG_XINPUT" = "yes" ]; then
6609 QT_CONFIG="$QT_CONFIG xinput tablet"
6611 if [ "$CFG_XKB" = "yes" ]; then
6612 QT_CONFIG="$QT_CONFIG xkb"
6616 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6617 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6618 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6620 if [ "$PLATFORM_MAC" = "yes" ]; then
6621 if [ "$CFG_RPATH" = "yes" ]; then
6622 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6624 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
6625 if [ -n "$RPATH_FLAGS" ]; then
6627 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6631 elif [ "$CFG_RPATH" = "yes" ]; then
6632 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6636 if [ "$CFG_RPATH" = "yes" ]; then
6637 # set the default rpath to the library installation directory
6638 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6640 if [ -n "$RPATH_FLAGS" ]; then
6641 # add the user defined rpaths
6642 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6646 if [ '!' -z "$I_FLAGS" ]; then
6647 # add the user define include paths
6648 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6649 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6652 if [ '!' -z "$W_FLAGS" ]; then
6653 # add the user defined warning flags
6654 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6655 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6656 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6659 # turn off exceptions for the compilers that support it
6660 if [ "$PLATFORM_QWS" = "yes" ]; then
6661 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6662 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
6663 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6665 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6667 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6671 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6672 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6675 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6676 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6677 # Follow default behavior of configure.exe by overriding with "rtti".
6678 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6681 if [ "$CFG_ALSA" = "yes" ]; then
6682 QT_CONFIG="$QT_CONFIG alsa"
6685 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6686 QT_CONFIG="$QT_CONFIG pulseaudio"
6689 if [ "$CFG_COREWLAN" = "yes" ]; then
6690 QT_CONFIG="$QT_CONFIG corewlan"
6693 if [ "$CFG_ICU" = "yes" ]; then
6694 QT_CONFIG="$QT_CONFIG icu"
6697 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6698 QT_CONFIG="$QT_CONFIG force_asserts"
6701 if [ "$CFG_PCRE" = "qt" ]; then
6702 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6706 # Some Qt modules are too advanced in C++ for some old compilers
6707 # Detect here the platforms where they are known to work.
6709 # See Qt documentation for more information on which features are
6710 # supported and on which compilers.
6712 canBuildQtConcurrent="yes"
6713 canUseV8Snapshot="yes"
6715 case "$XPLATFORM" in
6717 # PA-RISC's assembly is too limited
6718 # gcc 3.4 on that platform can't build QtXmlPatterns
6719 # the assembly it generates cannot be compiled
6721 # Check gcc's version
6722 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6726 canBuildQtXmlPatterns="no"
6730 canBuildQtXmlPatterns="no"
6734 unsupported/vxworks-*-g++*)
6737 unsupported/vxworks-*-dcc*)
6739 canBuildQtXmlPatterns="no"
6742 # Check gcc's version
6743 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6751 canBuildQtXmlPatterns="no"
6756 # Check the compiler version
6757 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6760 canBuildQtXmlPatterns="no"
6761 canBuildQtConcurrent="no"
6765 canBuildQtConcurrent="no"
6771 canBuildQtXmlPatterns="no"
6772 canBuildQtConcurrent="no"
6778 # Get the xlC version
6779 cat > xlcver.c <<EOF
6783 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6788 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6789 xlcver=`./xlcver 2>/dev/null`
6792 if [ "$OPT_VERBOSE" = "yes" ]; then
6793 if [ -n "$xlcver" ]; then
6794 echo Found IBM xlC version: $xlcver.
6796 echo Could not determine IBM xlC version, assuming oldest supported.
6803 canBuildQtXmlPatterns="no"
6804 canBuildQtConcurrent="no"
6808 canBuildQtConcurrent="no"
6814 canBuildQtConcurrent="no"
6818 if [ "$CFG_GUI" = "no" ]; then
6819 # WebKit requires QtGui
6823 if [ "$CFG_SHARED" = "no" ]; then
6825 echo "WARNING: Using static linking will disable the WebKit module."
6830 CFG_CONCURRENT="yes"
6831 if [ "$canBuildQtConcurrent" = "no" ]; then
6832 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6835 QT_CONFIG="$QT_CONFIG concurrent"
6839 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6840 QT_CONFIG="$QT_CONFIG audio-backend"
6844 if [ "$CFG_WEBKIT" = "debug" ]; then
6845 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6849 QT_CONFIG="$QT_CONFIG v8"
6850 # Detect snapshot support
6851 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6852 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6855 *) canUseV8Snapshot="no"
6859 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6860 # QEMU crashes when building inside Scratchbox with an ARM target
6861 canUseV8Snapshot="no"
6864 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6865 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6867 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6868 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6871 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6872 QT_CONFIG="$QT_CONFIG v8snapshot"
6876 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6877 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6880 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6883 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6884 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6885 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6890 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6891 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6892 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6899 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6905 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6907 case "$COMPILER_VERSION" in
6909 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6910 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6911 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6914 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6915 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6916 QT_GCC_PATCH_VERSION=0
6926 #-------------------------------------------------------------------------------
6927 # part of configuration information goes into qconfig.h
6928 #-------------------------------------------------------------------------------
6930 case "$CFG_QCONFIG" in
6932 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6935 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6936 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6937 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6938 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6939 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6940 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6942 echo "#endif" >>"$tmpconfig"
6946 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6950 # define QT_EDITION $QT_EDITION
6953 /* Machine byte-order */
6954 #define Q_BIG_ENDIAN 4321
6955 #define Q_LITTLE_ENDIAN 1234
6958 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6959 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6960 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6961 #if defined(__BIG_ENDIAN__)
6962 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6963 #elif defined(__LITTLE_ENDIAN__)
6964 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6966 # error "Unable to determine byte order!"
6970 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6972 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6973 if [ "$CFG_ENDIAN" = "auto" ]; then
6974 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6975 #if defined(__BIG_ENDIAN__)
6976 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6977 #elif defined(__LITTLE_ENDIAN__)
6978 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6980 # error "Unable to determine byte order!"
6984 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6986 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6988 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6989 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6990 /* Non-IEEE double format */
6991 #define Q_DOUBLE_LITTLE "01234567"
6992 #define Q_DOUBLE_BIG "76543210"
6993 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6994 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6995 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6998 if [ "$CFG_ARMFPA" = "yes" ]; then
6999 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7000 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7001 #ifndef QT_BOOTSTRAPPED
7006 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7010 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7011 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7012 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7013 /* Machine Architecture */
7014 #ifndef QT_BOOTSTRAPPED
7015 # define QT_ARCH_${CFG_ARCH_STR}
7017 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7021 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7022 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7024 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7025 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7028 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7029 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7032 if [ "$BUILD_ON_MAC" = "yes" ]; then
7033 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7034 #if defined(__LP64__)
7035 # define QT_POINTER_SIZE 8
7037 # define QT_POINTER_SIZE 4
7041 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7042 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7045 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
7046 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
7047 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
7051 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7053 if [ "$CFG_DEV" = "yes" ]; then
7054 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7057 # Embedded compile time options
7058 if [ "$PLATFORM_QWS" = "yes" ]; then
7059 # Add QWS to config.h
7060 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7062 # Add excluded decorations to $QCONFIG_FLAGS
7063 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7064 for decor in $decors; do
7065 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7066 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7069 # Figure which embedded drivers which are turned off
7070 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7071 for ADRIVER in $CFG_GFX_ON; do
7072 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7075 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7076 # the um driver is currently not in the available list for external builds
7077 if [ "$CFG_DEV" = "no" ]; then
7078 CFG_KBD_OFF="$CFG_KBD_OFF um"
7080 for ADRIVER in $CFG_KBD_ON; do
7081 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7084 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7085 for ADRIVER in $CFG_MOUSE_ON; do
7086 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7089 for DRIVER in $CFG_GFX_OFF; do
7090 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7091 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7094 for DRIVER in $CFG_KBD_OFF; do
7095 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7096 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7099 for DRIVER in $CFG_MOUSE_OFF; do
7100 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7101 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7105 if [ "$PLATFORM_QPA" = "yes" ]; then
7106 # Add QPA to config.h
7107 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7110 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7111 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7114 # Add turned on SQL drivers
7115 for DRIVER in $CFG_SQL_AVAILABLE; do
7116 eval "VAL=\$CFG_SQL_$DRIVER"
7119 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7120 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7121 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7124 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7130 QMakeVar set sql-drivers "$SQL_DRIVERS"
7131 QMakeVar set sql-plugins "$SQL_PLUGINS"
7133 # Add other configuration options to the qconfig.h file
7134 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7135 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7136 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7137 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7138 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7139 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7140 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7142 # X11/Unix/Mac only configs
7143 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7144 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7145 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7146 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7147 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7148 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7149 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7150 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7151 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7152 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7153 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7154 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7155 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7156 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7157 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7159 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7160 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7161 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7162 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7163 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7164 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7165 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7166 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7167 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7168 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7169 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7170 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7171 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7173 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7174 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7175 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7176 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7177 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7178 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7179 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7180 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7182 # sort QCONFIG_FLAGS for neatness if we can
7183 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7184 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7186 if [ -n "$QCONFIG_FLAGS" ]; then
7187 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7188 #ifndef QT_BOOTSTRAPPED
7191 for cfg in $QCONFIG_FLAGS; do
7192 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7193 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7194 # figure out define logic, so we can output the correct
7195 # ifdefs to override the global defines in a project
7197 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7198 # QT_NO_option can be forcefully turned on by QT_option
7199 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7200 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7201 # QT_option can be forcefully turned off by QT_NO_option
7202 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7205 if [ -z $cfgdNeg ]; then
7206 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7213 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7214 #if defined($cfgd) && defined($cfgdNeg)
7216 #elif !defined($cfgd) && !defined($cfgdNeg)
7223 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7224 #endif // QT_BOOTSTRAPPED
7229 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7230 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7231 #define QT_VISIBILITY_AVAILABLE
7236 if [ -n "$QT_LIBINFIX" ]; then
7237 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7238 #define QT_LIBINFIX "$QT_LIBINFIX"
7243 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7244 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7245 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7247 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7248 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7249 chmod -w "$outpath/src/corelib/global/qconfig.h"
7250 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7251 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7255 #-------------------------------------------------------------------------------
7256 # save configuration into qconfig.pri
7257 #-------------------------------------------------------------------------------
7258 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7259 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7260 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7261 if [ "$CFG_DEBUG" = "yes" ]; then
7262 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7263 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7264 QT_CONFIG="$QT_CONFIG release"
7266 QT_CONFIG="$QT_CONFIG debug"
7267 elif [ "$CFG_DEBUG" = "no" ]; then
7268 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7269 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7270 QT_CONFIG="$QT_CONFIG debug"
7272 QT_CONFIG="$QT_CONFIG release"
7274 if [ "$CFG_STL" = "yes" ]; then
7275 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7277 if [ "$CFG_FRAMEWORK" = "no" ]; then
7278 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7280 QT_CONFIG="$QT_CONFIG qt_framework"
7281 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7283 if [ "$BUILD_ON_MAC" = "yes" ]; then
7284 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7286 if [ "$CFG_DEV" = "yes" ]; then
7287 QT_CONFIG="$QT_CONFIG private_tests"
7290 # Make the application arch follow the Qt arch for single arch builds.
7291 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7292 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7293 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7296 cat >>"$QTCONFIG.tmp" <<EOF
7298 CONFIG += $QTCONFIG_CONFIG
7300 QT_EDITION = $Edition
7301 QT_CONFIG += $QT_CONFIG
7304 QT_VERSION = $QT_VERSION
7305 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7306 QT_MINOR_VERSION = $QT_MINOR_VERSION
7307 QT_PATCH_VERSION = $QT_PATCH_VERSION
7310 QT_LIBINFIX = $QT_LIBINFIX
7311 QT_NAMESPACE = $QT_NAMESPACE
7312 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7315 if [ -n "$CFG_SYSROOT" ]; then
7316 echo "# sysroot" >>"$QTCONFIG.tmp"
7317 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7318 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7319 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7320 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7321 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7322 echo "}" >> "$QTCONFIG.tmp"
7323 echo >> "$QTCONFIG.tmp"
7325 if [ "$CFG_RPATH" = "yes" ]; then
7326 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7328 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7329 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7330 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7331 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7334 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7335 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7336 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7339 # replace qconfig.pri if it differs from the newly created temp file
7340 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7341 rm -f "$QTCONFIG.tmp"
7343 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7346 #-------------------------------------------------------------------------------
7347 # save configuration into qmodule.pri
7348 #-------------------------------------------------------------------------------
7349 QTMODULE="$outpath/mkspecs/qmodule.pri"
7351 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7353 # Ensure we can link to uninistalled libraries
7354 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7355 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7357 if [ -n "$QT_CFLAGS_PSQL" ]; then
7358 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7360 if [ -n "$QT_LFLAGS_PSQL" ]; then
7361 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7363 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7364 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7366 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7367 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7369 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7370 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7372 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7373 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7375 if [ -n "$QT_LFLAGS_ODBC" ]; then
7376 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7378 if [ -n "$QT_LFLAGS_TDS" ]; then
7379 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
7382 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7383 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
7386 #dump in the OPENSSL_LIBS info
7387 if [ '!' -z "$OPENSSL_LIBS" ]; then
7388 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
7389 elif [ "$CFG_OPENSSL" = "linked" ]; then
7390 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
7393 #dump in the SDK info
7394 if [ '!' -z "$CFG_SDK" ]; then
7395 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
7399 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
7400 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7402 # replace qmodule.pri if it differs from the newly created temp file
7403 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
7404 rm -f "$QTMODULE.tmp"
7406 mv -f "$QTMODULE.tmp" "$QTMODULE"
7409 #-------------------------------------------------------------------------------
7410 # save configuration into .qmake.cache
7411 #-------------------------------------------------------------------------------
7413 CACHEFILE="$outpath/.qmake.cache"
7414 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7415 cat >>"$CACHEFILE.tmp" <<EOF
7417 QT_SOURCE_TREE = \$\$quote($relpath)
7418 QT_BUILD_TREE = \$\$quote($outpath)
7419 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7421 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7422 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7423 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7424 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7425 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7426 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7428 include(\$\$PWD/mkspecs/qmodule.pri)
7429 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
7430 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7431 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7435 #dump the qmake spec
7436 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7437 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7439 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7444 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7445 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7446 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7447 # don't need to worry about generated files
7448 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7449 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7451 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7453 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7454 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7457 # replace .qmake.cache if it differs from the newly created temp file
7458 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7459 rm -f "$CACHEFILE.tmp"
7461 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7464 #-------------------------------------------------------------------------------
7465 # give feedback on configuration
7466 #-------------------------------------------------------------------------------
7470 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7473 This target is using the GNU C++ compiler ($PLATFORM).
7475 Recent versions of this compiler automatically include code for
7476 exceptions, which increase both the size of the Qt libraries and
7477 the amount of memory taken by your applications.
7479 You may choose to re-run `basename $0` with the -no-exceptions
7480 option to compile Qt without exceptions. This is completely binary
7481 compatible, and existing applications will continue to work.
7489 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7492 This target is using the MIPSpro C++ compiler ($PLATFORM).
7494 You may choose to re-run `basename $0` with the -no-exceptions
7495 option to compile Qt without exceptions. This will make the
7496 size of the Qt library smaller and reduce the amount of memory
7497 taken by your applications.
7509 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7510 echo "Build type: $PLATFORM"
7512 echo "Building on: $PLATFORM"
7513 echo "Building for: $XPLATFORM"
7516 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7517 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7519 echo "Architecture: $CFG_ARCH"
7522 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7523 echo "Host architecture: $CFG_HOST_ARCH"
7526 if [ -n "$PLATFORM_NOTES" ]; then
7527 echo "Platform notes:"
7528 echo "$PLATFORM_NOTES"
7533 if [ "$OPT_VERBOSE" = "yes" ]; then
7534 echo $ECHO_N "qmake vars .......... $ECHO_C"
7535 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7536 echo "qmake switches ......... $QMAKE_SWITCHES"
7539 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7540 echo "Build .................. $CFG_BUILD_PARTS"
7541 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7542 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7543 echo "Debug .................. yes (combined)"
7544 if [ "$CFG_DEBUG" = "yes" ]; then
7545 echo "Default Link ........... debug"
7547 echo "Default Link ........... release"
7550 echo "Debug .................. $CFG_DEBUG"
7552 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7553 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7554 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7555 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7556 echo "QtGui module ........... $CFG_GUI"
7557 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7558 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7560 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7562 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7563 echo "STL support ............ $CFG_STL"
7564 echo "PCH support ............ $CFG_PRECOMPILE"
7565 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7566 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7567 echo "AVX..................... ${CFG_AVX}"
7568 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7569 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7570 echo "NEON support ........... ${CFG_NEON}"
7572 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
7573 echo "getaddrinfo support .... $CFG_GETADDRINFO"
7574 echo "getifaddrs support ..... $CFG_GETIFADDRS"
7575 echo "Accessibility .......... $CFG_ACCESSIBILITY"
7576 echo "NIS support ............ $CFG_NIS"
7577 echo "CUPS support ........... $CFG_CUPS"
7578 echo "Iconv support .......... $CFG_ICONV"
7579 echo "Glib support ........... $CFG_GLIB"
7580 echo "GStreamer support ...... $CFG_GSTREAMER"
7581 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7582 echo "Large File support ..... $CFG_LARGEFILE"
7583 echo "GIF support ............ $CFG_GIF"
7584 if [ "$CFG_JPEG" = "no" ]; then
7585 echo "JPEG support ........... $CFG_JPEG"
7587 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
7589 if [ "$CFG_PNG" = "no" ]; then
7590 echo "PNG support ............ $CFG_PNG"
7592 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
7594 echo "zlib support ........... $CFG_ZLIB"
7595 echo "Session management ..... $CFG_SM"
7596 if [ "$PLATFORM_QWS" = "yes" ]; then
7597 echo "Embedded support ....... $CFG_EMBEDDED"
7598 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7599 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7601 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
7603 # Normalize the decoration output first
7604 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
7605 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
7606 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
7607 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
7608 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
7609 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
7610 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
7611 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
7612 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
7613 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
7614 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
7615 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
7616 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
7617 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
7618 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
7619 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
7621 if [ "$CFG_OPENGL" = "desktop" ]; then
7622 echo "OpenGL support ......... yes (Desktop OpenGL)"
7623 elif [ "$CFG_OPENGL" = "es2" ]; then
7624 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
7626 echo "OpenGL support ......... no"
7628 if [ "$CFG_EGL" != "no" ]; then
7629 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7630 echo "EGL support ............ yes <GLES/egl.h>"
7632 echo "EGL support ............ yes <EGL/egl.h>"
7635 if [ "$CFG_OPENVG" ]; then
7636 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7637 echo "OpenVG support ......... ShivaVG"
7639 echo "OpenVG support ......... $CFG_OPENVG"
7642 if [ "$PLATFORM_X11" = "yes" ]; then
7643 echo "NAS sound support ...... $CFG_NAS"
7644 echo "XShape support ......... $CFG_XSHAPE"
7645 echo "XVideo support ......... $CFG_XVIDEO"
7646 echo "XSync support .......... $CFG_XSYNC"
7647 echo "Xinerama support ....... $CFG_XINERAMA"
7648 echo "Xcursor support ........ $CFG_XCURSOR"
7649 echo "Xfixes support ......... $CFG_XFIXES"
7650 echo "Xrandr support ......... $CFG_XRANDR"
7651 echo "Xi support ............. $CFG_XINPUT"
7652 echo "MIT-SHM support ........ $CFG_MITSHM"
7653 echo "FontConfig support ..... $CFG_FONTCONFIG"
7654 echo "XKB Support ............ $CFG_XKB"
7655 echo "immodule support ....... $CFG_IM"
7656 echo "GTK theme support ...... $CFG_QGTKSTYLE"
7658 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
7659 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
7660 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
7661 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
7662 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
7663 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
7664 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
7665 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
7666 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
7669 if [ "$CFG_OPENSSL" = "yes" ]; then
7670 OPENSSL_LINKAGE="(run-time)"
7671 elif [ "$CFG_OPENSSL" = "linked" ]; then
7672 OPENSSL_LINKAGE="(linked)"
7674 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
7675 echo "Alsa support ........... $CFG_ALSA"
7676 if [ "$BUILD_ON_MAC" = "yes" ]; then
7677 echo "CoreWlan support ....... $CFG_COREWLAN"
7679 echo "libICU support ......... $CFG_ICU"
7680 echo "PCRE support ........... $CFG_PCRE"
7681 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7682 echo "Xcb support ............ limited (old version)"
7684 echo "Xcb support ............ $CFG_XCB"
7686 echo "Xrender support ........ $CFG_XRENDER"
7687 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7688 echo "XInput2 support ........ $CFG_XINPUT2"
7692 # complain about not being able to use dynamic plugins if we are using a static build
7693 if [ "$CFG_SHARED" = "no" ]; then
7695 echo "WARNING: Using static linking will disable the use of dynamically"
7696 echo "loaded plugins. Make sure to import all needed static plugins,"
7697 echo "or compile needed modules into the library."
7700 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7702 echo "NOTE: When linking against OpenSSL, you can override the default"
7703 echo "library names through OPENSSL_LIBS."
7705 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
7708 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7710 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
7711 echo "if you want a pure debug build."
7716 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7721 #-------------------------------------------------------------------------------
7722 # build makefiles based on the configuration
7723 #-------------------------------------------------------------------------------
7725 echo "Finding project files. Please wait..."
7726 if [ "$CFG_NOPROCESS" != "yes" ]; then
7727 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7728 if [ -f "${relpath}/qtbase.pro" ]; then
7729 mkfile="${outpath}/Makefile"
7730 [ -f "$mkfile" ] && chmod +w "$mkfile"
7731 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7735 # .projects -> projects to process
7736 # .projects.1 -> qt and moc
7737 # .projects.2 -> subdirs and libs
7738 # .projects.3 -> the rest
7739 rm -f .projects .projects.1 .projects.2 .projects.3
7741 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7742 if [ -z "$AWK" ]; then
7743 for p in `echo $QMAKE_PROJECTS`; do
7744 echo "$p" >> .projects
7747 cat >projects.awk <<EOF
7753 first = "./.projects.1.tmp"
7754 second = "./.projects.2.tmp"
7755 third = "./.projects.3.tmp"
7760 if ( ! target_file )
7762 print input_file >target_file
7767 input_file = FILENAME
7772 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7775 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7776 target_file = second
7781 matched_target == 0 && /^(TEMPLATE.*=)/ {
7782 if ( \$3 == "subdirs" )
7783 target_file = second
7784 else if ( \$3 == "lib" )
7790 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7791 if ( \$0 ~ /plugin/ )
7794 target_file = second
7799 if ( ! target_file )
7801 print input_file >>target_file
7808 for p in `echo $QMAKE_PROJECTS`; do
7809 echo "$p" >> .projects.all
7812 # if you get errors about the length of the command line to awk, change the -l arg
7814 split -l 100 .projects.all .projects.all.
7815 for p in .projects.all.*; do
7816 "$AWK" -f projects.awk `cat $p`
7817 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7818 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7819 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7820 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7822 rm -f .projects.all* projects.awk
7824 [ -f .projects.1 ] && cat .projects.1 >>.projects
7825 [ -f .projects.2 ] && cat .projects.2 >>.projects
7826 rm -f .projects.1 .projects.2
7827 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7828 cat .projects.3 >>.projects
7832 # don't sort Qt and MOC in with the other project files
7833 # also work around a segfaulting uniq(1)
7834 if [ -f .sorted.projects.2 ]; then
7835 sort .sorted.projects.2 > .sorted.projects.2.new
7836 mv -f .sorted.projects.2.new .sorted.projects.2
7837 cat .sorted.projects.2 >> .sorted.projects.1
7839 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7840 rm -f .sorted.projects.2 .sorted.projects.1
7844 if [ -f .projects ]; then
7845 uniq .projects >.tmp
7846 mv -f .tmp .projects
7847 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7849 if [ -f .projects.3 ]; then
7850 uniq .projects.3 >.tmp
7851 mv -f .tmp .projects.3
7852 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7854 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7858 for part in $CFG_BUILD_PARTS; do
7860 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7861 libs) PART_ROOTS="$PART_ROOTS src" ;;
7862 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7863 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7868 if [ "$CFG_DEV" = "yes" ]; then
7869 PART_ROOTS="$PART_ROOTS tests"
7872 echo "Creating makefiles. Please wait..."
7873 for file in .projects .projects.3; do
7874 [ '!' -f "$file" ] && continue
7875 for a in `cat $file`; do
7877 for r in $PART_ROOTS; do
7878 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7883 [ "$IN_ROOT" = "no" ] && continue
7886 *winmain/winmain.pro)
7887 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7891 */qmake/qmake.pro) continue ;;
7892 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7893 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7899 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7900 test -d "$dir" || mkdir -p "$dir"
7901 OUTDIR="$outpath/$dir"
7902 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7903 # fast configure - the makefile exists, skip it
7904 # since the makefile exists, it was generated by qmake, which means we
7905 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7907 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7910 QMAKE_SPEC_ARGS="-spec $SPEC"
7911 echo $ECHO_N " for $a$ECHO_C"
7913 QMAKE="$outpath/bin/qmake"
7914 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7915 if [ "$file" = ".projects.3" ]; then
7918 cat >"${OUTDIR}/Makefile" <<EOF
7919 # ${OUTDIR}/Makefile: generated by configure
7921 # WARNING: This makefile will be replaced with a real makefile.
7922 # All changes made to this file will be lost.
7924 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7926 cat >>"${OUTDIR}/Makefile" <<EOF
7928 all clean install qmake first Makefile: FORCE
7929 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7937 if [ "$OPT_VERBOSE" = "yes" ]; then
7938 echo " (`basename $SPEC`)"
7939 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7944 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7945 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7949 rm -f .projects .projects.3
7951 #-------------------------------------------------------------------------------
7952 # check for platforms that we don't yet know about
7953 #-------------------------------------------------------------------------------
7954 if [ "$CFG_ARCH" = "generic" ]; then
7957 NOTICE: Atomic operations are not yet supported for this
7960 Qt will use the 'generic' architecture instead, which uses a
7961 single pthread_mutex_t to protect all atomic operations. This
7962 implementation is the slow (but safe) fallback implementation
7963 for architectures Qt does not yet support.
7967 #-------------------------------------------------------------------------------
7968 # check if the user passed the -no-zlib option, which is no longer supported
7969 #-------------------------------------------------------------------------------
7970 if [ -n "$ZLIB_FORCED" ]; then
7971 which_zlib="supplied"
7972 if [ "$CFG_ZLIB" = "system" ]; then
7978 NOTICE: The -no-zlib option was supplied but is no longer
7981 Qt now requires zlib support in all builds, so the -no-zlib
7982 option was ignored. Qt will be built using the $which_zlib
7987 #-------------------------------------------------------------------------------
7988 # finally save the executed command to another script
7989 #-------------------------------------------------------------------------------
7990 if [ `basename $0` != "config.status" ]; then
7991 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7993 # add the system variables
7994 for varname in $SYSTEM_VARIABLES; do
7996 'if [ -n "\$'${varname}'" ]; then
7997 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8002 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8004 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8005 echo "#!/bin/sh" > "$outpath/config.status"
8006 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8007 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8008 echo "else" >> "$outpath/config.status"
8009 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8010 echo "fi" >> "$outpath/config.status"
8011 chmod +x "$outpath/config.status"
8014 if [ -n "$RPATH_MESSAGE" ]; then
8016 echo "$RPATH_MESSAGE"
8019 MAKE=`basename "$MAKE"`
8021 echo Qt is now configured for building. Just run \'$MAKE\'.
8022 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8023 echo Once everything is built, Qt is installed.
8024 echo You should not run \'$MAKE install\'.
8026 echo Once everything is built, you must run \'$MAKE install\'.
8027 echo Qt will be installed into $QT_INSTALL_PREFIX
8030 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.