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
779 CFG_PREFIX_INSTALL=yes
788 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
789 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
793 OPT_CONFIRM_LICENSE=no
807 # initalize variables used for installation
816 QT_INSTALL_TRANSLATIONS=
822 #flags for SQL drivers
830 QT_LFLAGS_ODBC="-lodbc"
833 # flags for libdbus-1
837 # flags for Glib (X11 only)
841 # flags for GStreamer (X11 only)
845 #-------------------------------------------------------------------------------
846 # check SQL drivers, mouse drivers and decorations available in this package
847 #-------------------------------------------------------------------------------
849 # opensource version removes some drivers, so force them to be off
855 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
856 for a in "$relpath/src/plugins/sqldrivers/"*; do
858 base_a=`basename "$a"`
859 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
860 eval "CFG_SQL_${base_a}=auto"
865 CFG_DECORATION_PLUGIN_AVAILABLE=
866 if [ -d "$relpath/src/plugins/decorations" ]; then
867 for a in "$relpath/src/plugins/decorations/"*; do
869 base_a=`basename "$a"`
870 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
875 CFG_KBD_PLUGIN_AVAILABLE=
876 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
877 for a in "$relpath/src/plugins/kbddrivers/"*; do
879 base_a=`basename "$a"`
880 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
885 CFG_MOUSE_PLUGIN_AVAILABLE=
886 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
887 for a in "$relpath/src/plugins/mousedrivers/"*; do
889 base_a=`basename "$a"`
890 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
895 CFG_GFX_PLUGIN_AVAILABLE=
896 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
897 for a in "$relpath/src/plugins/gfxdrivers/"*; do
899 base_a=`basename "$a"`
900 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
903 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
906 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
907 if [ -d "$relpath/src/plugins/imageformats" ]; then
908 for a in "$relpath/src/plugins/imageformats/"*; do
910 base_a=`basename "$a"`
911 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
916 #-------------------------------------------------------------------------------
917 # Set Default NaCl options
918 #-------------------------------------------------------------------------------
919 if [ "$CFG_EMBEDDED" = "nacl" ]; then
920 echo "Setting NaCl options:"
930 if [ `uname` = "Linux" ]; then
931 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
932 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
934 I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
935 L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
938 echo "-no-mediaservices -no-sql-sqlite -nomake tests"
942 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
943 QT_CONFIG="$QT_CONFIG nacl"
946 #-------------------------------------------------------------------------------
947 # parse command line arguments
948 #-------------------------------------------------------------------------------
950 # parse the arguments, setting things to "yes" or "no"
951 while [ "$#" -gt 0 ]; do
955 #Autoconf style options
957 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
961 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
965 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
966 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
969 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
973 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
977 -no-*-*|-plugin-*-*|-qt-*-*)
978 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
979 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
983 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
986 #Qt style yes options
987 -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)
988 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
991 #Qt style options that pass an argument
993 if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
995 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
999 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1003 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
1004 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1008 #Qt style complex options in one command
1009 -enable-*|-disable-*)
1010 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1011 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1013 #Qt Builtin/System style options
1014 -no-*|-system-*|-qt-*)
1015 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
1016 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
1018 #Options that cannot be generalized
1025 # this option may or may not be followed by an argument
1026 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1033 -embedded-lite|-qpa)
1035 # this option may or may not be followed by an argument
1036 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1049 # this option may or may not be followed by an argument
1050 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1059 # this option may or may not be followed by an argument
1060 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1068 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1069 # this option may or may not be followed by an argument
1070 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1079 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1083 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1097 if [ "$1" = "-D" ]; then
1101 VAL=`echo $1 | sed 's,-D,,'`
1106 # this option may or may not be followed by an argument
1107 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1116 if [ "$1" = "-I" ]; then
1120 VAL=`echo $1 | sed 's,-I,,'`
1125 if [ "$1" = "-L" ]; then
1129 VAL=`echo $1 | sed 's,-L,,'`
1134 if [ "$1" = "-R" ]; then
1138 VAL=`echo $1 | sed 's,-R,,'`
1143 VAL=`echo $1 | sed 's,-l,,'`
1147 if [ "$1" = "-F" ]; then
1151 VAL=`echo $1 | sed 's,-F,,'`
1156 if [ "$1" = "-fw" ]; then
1160 VAL=`echo $1 | sed 's,-fw,,'`
1168 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1175 if [ "$UNKNOWN_ARG" = "yes" ]; then
1176 echo "$1: unknown argument"
1187 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1188 CFG_ACCESSIBILITY="$VAL"
1197 CFG_USE_GNUMAKE="$VAL"
1200 CFG_MYSQL_CONFIG="$VAL"
1203 QT_INSTALL_PREFIX="$VAL"
1206 QT_HOST_PREFIX="$VAL"
1209 QT_FORCE_PKGCONFIG=yes
1212 QT_INSTALL_DOCS="$VAL"
1215 QT_INSTALL_HEADERS="$VAL"
1218 QT_INSTALL_PLUGINS="$VAL"
1221 QT_INSTALL_IMPORTS="$VAL"
1224 QT_INSTALL_DATA="$VAL"
1227 QT_INSTALL_LIBS="$VAL"
1236 QT_INSTALL_TRANSLATIONS="$VAL"
1238 sysconfdir|settingsdir)
1239 QT_INSTALL_SETTINGS="$VAL"
1242 QT_INSTALL_EXAMPLES="$VAL"
1245 QT_INSTALL_TESTS="$VAL"
1254 QT_INSTALL_BINS="$VAL"
1276 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1283 if [ "$VAL" = "little" ]; then
1284 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1285 elif [ "$VAL" = "big" ]; then
1286 CFG_ENDIAN="Q_BIG_ENDIAN"
1292 if [ "$VAL" = "little" ]; then
1293 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1294 elif [ "$VAL" = "big" ]; then
1295 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1301 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1308 CFG_QWS_DEPTHS="$VAL"
1311 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1312 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1313 [ "$VAL" = "es2" ]; then
1315 if [ "$VAL" = "es2" ]; then
1323 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1325 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1332 qvfb) # left for commandline compatibility, not documented
1333 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1334 if [ "$VAL" = "yes" ]; then
1335 QMakeVar add gfx-drivers qvfb
1336 QMakeVar add kbd-drivers qvfb
1337 QMakeVar add mouse-drivers qvfb
1338 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1339 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1340 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1347 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1350 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1359 if [ "$BUILD_ON_MAC" = "yes" ]; then
1366 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1367 CFG_MAC_DWARF2="$VAL"
1373 # if this is a Mac then "windows" probably means
1374 # we are cross-compiling for MinGW
1375 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1376 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1385 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1386 CFG_MAC_HARFBUZZ="$VAL"
1393 if [ "$BUILD_ON_MAC" = "yes" ]; then
1394 CFG_FRAMEWORK="$VAL"
1400 if [ "$VAL" = "yes" ]; then
1402 QMakeVar add QMAKE_CFLAGS -pg
1403 QMakeVar add QMAKE_CXXFLAGS -pg
1404 QMakeVar add QMAKE_LFLAGS -pg
1405 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1411 if [ "$VAL" = "yes" ]; then
1412 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1415 exceptions|g++-exceptions)
1416 if [ "$VAL" = "no" ]; then
1418 elif [ "$VAL" = "yes" ]; then
1426 # keep compatibility with old platform names
1432 PLATFORM=hpux-acc-o64
1435 PLATFORM=hpux-acc-64
1438 PLATFORM=hpux-acc-64
1450 PLATFORM=reliant-cds-64
1453 PLATFORM=solaris-cc-64
1456 PLATFORM=unixware-cc
1459 PLATFORM=unixware-g++
1462 PLATFORM=unixware-cc
1465 PLATFORM=unixware-g++
1471 i386) NATIVE_64_ARCH="x86_64" ;;
1472 powerpc) NATIVE_64_ARCH="ppc64" ;;
1473 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1475 if [ ! -z "$NATIVE_64_ARCH" ]; then
1476 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1483 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1486 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1487 CFG_DEBUG_RELEASE="$VAL"
1493 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1494 CFG_RELEASE_QMAKE="$VAL"
1500 if [ "$VAL" = "yes" ]; then
1502 elif [ "$VAL" = "no" ]; then
1509 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1510 CFG_PREFIX_INSTALL="$VAL"
1518 developer-build|commercial|opensource)
1519 # These switches have been dealt with already
1522 if [ "$VAL" = "yes" ]; then
1524 elif [ "$VAL" = "no" ]; then
1531 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1532 CFG_INCREMENTAL="$VAL"
1538 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1539 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1545 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1546 if [ "$VAL" = "no" ]; then
1547 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1548 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1549 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1555 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1562 if [ "$VAL" = "no" ]; then
1569 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1577 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1584 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1591 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1598 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1605 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1612 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1619 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1626 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1633 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1634 CFG_PRECOMPILE="$VAL"
1639 separate-debug-info)
1640 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1641 CFG_SEPARATE_DEBUG_INFO="$VAL"
1642 elif [ "$VAL" = "nocopy" ] ; then
1643 CFG_SEPARATE_DEBUG_INFO="yes"
1644 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1650 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1651 CFG_REDUCE_EXPORTS="$VAL"
1657 if [ "$VAL" = "no" ]; then
1664 if [ "$VAL" = "no" ]; then
1671 if [ "$VAL" = "no" ]; then
1678 if [ "$VAL" = "no" ]; then
1685 if [ "$VAL" = "no" ]; then
1692 if [ "$VAL" = "no" ]; then
1699 if [ "$VAL" = "no" ]; then
1706 if [ "$VAL" = "no" ]; then
1713 if [ "$VAL" = "no" ]; then
1723 if [ "$VAL" = "no" ]; then
1730 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1731 CFG_REDUCE_RELOCATIONS="$VAL"
1737 [ "$VAL" = "qt" ] && VAL=yes
1738 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1739 CFG_QWS_FREETYPE="$VAL"
1745 [ "$VAL" = "qt" ] && VAL=yes
1746 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1751 # No longer supported:
1752 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1755 if [ "$VAL" = "system" ]; then
1762 [ "$VAL" = "yes" ] && VAL=qt
1763 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1770 [ "$VAL" = "yes" ] && VAL=qt
1771 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1778 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1785 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1792 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1799 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1806 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1813 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1820 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1821 CFG_FONTCONFIG="$VAL"
1827 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1834 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1841 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1848 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1855 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1862 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1869 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1876 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1883 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1884 CFG_GSTREAMER="$VAL"
1890 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1891 CFG_QGTKSTYLE="$VAL"
1897 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1900 if [ "$VAL" = "no" ]; then
1908 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1910 elif [ "$VAL" = "runtime" ]; then
1917 if [ "$VAL" = "yes" ]; then
1924 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1931 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1932 CFG_LARGEFILE="$VAL"
1938 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1945 if [ "$VAL" = "yes" ]; then
1946 CFG_OPENSSL="linked"
1952 if [ "$VAL" = "yes" ]; then
1953 CFG_DECLARATIVE_DEBUG="yes"
1955 if [ "$VAL" = "no" ]; then
1956 CFG_DECLARATIVE_DEBUG="no"
1963 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1964 CFG_JAVASCRIPTCORE_JIT="$VAL"
1970 if [ "$VAL" = "yes" ]; then
1971 OPT_CONFIRM_LICENSE="$VAL"
1977 if [ "$VAL" = "yes" ]; then
1983 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
1984 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1985 # if autoconf style options were used, $VAL can be "yes" or "no"
1986 [ "$VAL" = "yes" ] && VAL=qt
1987 # now $VAL should be "no", "qt", or "plugin"... double-check
1988 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1991 # now $VAL is "no", "qt", or "plugin"
1993 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1994 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1996 # Grab the available values
1999 avail="$CFG_SQL_AVAILABLE"
2002 avail="$CFG_GFX_AVAILABLE"
2003 if [ "$OPT" = "plugin" ]; then
2004 avail="$CFG_GFX_PLUGIN_AVAILABLE"
2008 avail="$CFG_DECORATION_AVAILABLE"
2009 if [ "$OPT" = "plugin" ]; then
2010 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
2014 avail="$CFG_KBD_AVAILABLE"
2015 if [ "$OPT" = "plugin" ]; then
2016 avail="$CFG_KBD_PLUGIN_AVAILABLE"
2020 avail="$CFG_MOUSE_AVAILABLE"
2021 if [ "$OPT" = "plugin" ]; then
2022 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
2026 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
2027 if [ "$OPT" != "plugin" ]; then
2028 # png is always built in
2034 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
2038 # Check that that user's value is available.
2041 if [ "$VAL" = "$d" ]; then
2046 [ "$found" = yes ] || ERROR=yes
2048 if [ "$VAR" = "sql" ]; then
2049 # set the CFG_SQL_driver
2050 eval "CFG_SQL_$VAL=\$OPT"
2052 elif [ "$VAR" = "imageformat" ]; then
2053 [ "$OPT" = "qt" ] && OPT=yes
2054 VAL="`echo $VAL |tr a-z A-Z`"
2055 eval "CFG_$VAL=$OPT"
2059 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2060 if [ "$OPT" = "plugin" ]; then
2061 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2062 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2063 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2064 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2065 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2066 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2067 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2068 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2071 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2072 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2073 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2074 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2075 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2079 QMakeVar add "${VAR}s" "${VAL}"
2080 elif [ "$OPT" = "no" ]; then
2081 PLUG_VAR="${VAR}-plugin"
2082 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2083 IN_VAR="${VAR}-driver"
2087 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2088 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2089 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2090 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2091 QMakeVar del "${IN_VAR}s" "$VAL"
2092 QMakeVar del "${PLUG_VAR}s" "$VAL"
2094 if [ "$ERROR" = "yes" ]; then
2095 echo "$CURRENT_OPT: unknown argument"
2100 if [ "$VAL" = "yes" ]; then
2101 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2102 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2106 elif [ "$VAL" = "no" ]; then
2107 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2108 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2117 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2124 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2131 D_FLAGS="$D_FLAGS \"$VAL\""
2134 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2137 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2140 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2143 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2146 if [ "$BUILD_ON_MAC" = "yes" ]; then
2147 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2148 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2154 if [ "$BUILD_ON_MAC" = "yes" ]; then
2155 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2161 W_FLAGS="$W_FLAGS \"${VAL}\""
2167 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2168 CFG_PHONON_BACKEND="$VAL"
2180 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2181 CFG_AUDIO_BACKEND="$VAL"
2187 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2194 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2195 CFG_FORCE_ASSERTS="$VAL"
2201 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2211 if [ "$UNKNOWN_OPT" = "yes" ]; then
2212 echo "${CURRENT_OPT}: invalid command-line switch"
2218 # update QT_CONFIG to show our current predefined configuration
2219 case "$CFG_QCONFIG" in
2220 minimal|small|medium|large|full)
2221 # these are a sequence of increasing functionality
2222 for c in minimal small medium large full; do
2223 QT_CONFIG="$QT_CONFIG $c-config"
2224 [ "$CFG_QCONFIG" = $c ] && break
2228 # not known to be sufficient for anything
2229 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2230 echo >&2 "Error: configuration file not found:"
2231 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2233 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2238 #-------------------------------------------------------------------------------
2239 # build tree initialization
2240 #-------------------------------------------------------------------------------
2242 # where to find which..
2243 unixtests="$relpath/config.tests/unix"
2244 mactests="$relpath/config.tests/mac"
2245 WHICH="$unixtests/which.test"
2247 PERL=`$WHICH perl 2>/dev/null`
2249 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2251 for e in gawk nawk awk; do
2252 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2259 PERL="/usr/bin/perl"
2260 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2264 ### skip this if the user just needs help...
2265 if [ "$OPT_HELP" != "yes" ]; then
2267 # is this a shadow build?
2268 if [ "$OPT_SHADOW" = "maybe" ]; then
2270 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2271 if [ -h "$outpath" ]; then
2272 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2278 if [ "$OPT_SHADOW" = "yes" ]; then
2279 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2280 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2281 echo >&2 "Cannot proceed."
2284 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2287 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2289 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2290 echo "Qt can be built in release mode with separate debug information, so"
2291 echo "-debug-and-release is not necessary anymore"
2295 if [ "$CFG_SILENT" = "yes" ]; then
2296 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2299 # if the source tree is different from the build tree,
2300 # symlink or copy part of the sources
2301 if [ "$OPT_SHADOW" = "yes" ]; then
2302 echo "Preparing build tree..."
2304 if [ -z "$PERL" ]; then
2306 echo "You need perl in your PATH to make a shadow build."
2307 echo "Cannot proceed."
2311 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2313 # symlink the qmake directory
2314 find "$relpath/qmake" | while read a; do
2315 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2316 if [ '!' -f "$my_a" ]; then
2317 if [ -d "$a" ]; then
2318 # directories are created...
2321 a_dir=`dirname "$my_a"`
2322 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2323 # ... and files are symlinked
2324 case `basename "$a"` in
2325 *.o|*.d|GNUmakefile*|qmake)
2336 # make a syncqt script that can be used in the shadow
2337 rm -f "$outpath/bin/syncqt"
2338 if [ -x "$relpath/bin/syncqt" ]; then
2339 mkdir -p "$outpath/bin"
2340 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2341 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2342 chmod 755 "$outpath/bin/syncqt"
2345 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2346 rm -f "$outpath/bin/$i"
2347 if [ -x "$relpath/bin/$i" ]; then
2348 mkdir -p "$outpath/bin"
2349 echo "#!/bin/sh" >"$outpath/bin/$i"
2350 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2351 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2352 chmod 755 "$outpath/bin/$i"
2356 # symlink the mkspecs directory
2357 mkdir -p "$outpath/mkspecs"
2358 rm -rf "$outpath"/mkspecs/*
2359 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2360 rm -f "$outpath/mkspecs/default"
2364 rm -rf "$outpath/mkspecs/$1"
2365 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2366 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2369 # Special case for mkspecs/features directory.
2370 # To be able to place .prf files into a shadow build directory,
2371 # we're creating links for files only. The directory structure is reproduced.
2372 ShadowMkspecs features
2374 # The modules dir is special, too.
2375 ShadowMkspecs modules
2377 # symlink the doc directory
2378 rm -rf "$outpath/doc"
2379 ln -s "$relpath/doc" "$outpath/doc"
2382 # symlink fonts to be able to run application from build directory
2383 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2384 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2385 mkdir -p "${outpath}/lib"
2386 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2390 if [ "$OPT_FAST" = "auto" ]; then
2391 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2398 # find a make command
2399 if [ -z "$MAKE" ]; then
2401 for mk in gmake make; do
2402 if "$WHICH" $mk >/dev/null 2>&1; then
2407 if [ -z "$MAKE" ]; then
2408 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2409 echo >&2 "Cannot proceed."
2412 # export MAKE, we need it later in the config.tests
2418 #-------------------------------------------------------------------------------
2419 # auto-detect all that hasn't been specified in the arguments
2420 #-------------------------------------------------------------------------------
2422 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
2423 if [ "$CFG_EMBEDDED" != "no" ]; then
2424 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2426 [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
2427 if [ -z "$XPLATFORM" ]; then
2428 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2429 XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
2433 [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
2434 if [ -z "$XPLATFORM" ]; then
2435 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2436 XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
2440 [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
2441 if [ -z "$XPLATFORM" ]; then
2442 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2443 XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
2447 if [ -z "$PLATFORM" ]; then
2448 case "$UNAME_MACHINE" in
2450 PLATFORM=qws/linux-x86-g++
2453 PLATFORM=qws/linux-x86_64-g++
2456 PLATFORM=qws/linux-generic-g++
2460 if [ -z "$XPLATFORM" ]; then
2461 if [ "$CFG_EMBEDDED" = "auto" ]; then
2462 if [ -n "$CFG_ARCH" ]; then
2463 CFG_EMBEDDED=$CFG_ARCH
2465 case "$UNAME_MACHINE" in
2473 CFG_EMBEDDED=generic
2478 XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
2482 [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++
2483 if [ -z "$XPLATFORM" ]; then
2484 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
2485 XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2489 if [ -z "$XPLATFORM" ]; then
2494 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2501 if [ -z "$PLATFORM" ]; then
2503 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2505 if [ "$PLATFORM_QPA" = "yes" ]; then
2506 OSX_VERSION=`uname -r | cut -d. -f1`
2507 if [ "$OSX_VERSION" -ge 11 ]; then
2508 # We're on Lion or above. Check if we have a supported Clang version
2509 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2512 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2527 #PLATFORM=aix-g++-64
2529 #PLATFORM=aix-xlc-64
2531 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2541 # PLATFORM=dynix-g++
2547 PLATFORM=freebsd-g++
2549 - Also available for FreeBSD: freebsd-icc
2553 PLATFORM=openbsd-g++
2564 #PLATFORM=irix-cc-64
2566 - Also available for IRIX: irix-g++ irix-cc-64
2570 case "$UNAME_MACHINE" in
2572 #PLATFORM=hpuxi-acc-32
2573 PLATFORM=hpuxi-acc-64
2575 - Also available for HP-UXi: hpuxi-acc-32
2581 #PLATFORM=hpux-acc-64
2583 #PLATFORM=hpux-acc-o64
2585 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2594 - Also available for Tru64: tru64-g++
2598 case "$UNAME_MACHINE" in
2600 PLATFORM=linux-g++-64
2607 - Also available for Linux: linux-kcc linux-icc linux-cxx
2611 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2612 PLATFORM="solaris-g++"
2614 #PLATFORM=solaris-g++
2616 #PLATFORM=solaris-cc64
2619 - Also available for Solaris: solaris-g++ solaris-cc-64
2622 ReliantUNIX-*:*|SINIX-*:*)
2623 PLATFORM=reliant-cds
2624 #PLATFORM=reliant-cds-64
2626 - Also available for Reliant UNIX: reliant-cds-64
2636 #PLATFORM=unixware-g++
2637 PLATFORM=unixware-cc
2639 - Also available for OpenUNIX: unixware-g++
2643 #PLATFORM=unixware-g++
2644 PLATFORM=unixware-cc
2646 - Also available for UnixWare: unixware-g++
2653 - Also available for SCO OpenServer: sco-g++
2657 PLATFORM=unixware-g++
2660 PLATFORM=unsupported/qnx-g++
2663 if [ "$OPT_HELP" != "yes" ]; then
2665 for p in $PLATFORMS; do
2666 echo " $relconf $* -platform $p"
2669 echo " The build script does not currently recognize all" >&2
2670 echo " platforms supported by Qt." >&2
2671 echo " Rerun this script with a -platform option listed to" >&2
2672 echo " set the system/compiler combination you use." >&2
2679 if [ "$PLATFORM_QWS" = "yes" ]; then
2681 PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2683 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2686 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2688 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2689 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2691 if [ -d "$PLATFORM" ]; then
2692 QMAKESPEC="$PLATFORM"
2694 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2696 if [ -d "$XPLATFORM" ]; then
2697 XQMAKESPEC="$XPLATFORM"
2699 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2701 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2702 QT_CROSS_COMPILE=yes
2703 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2706 if [ "$BUILD_ON_MAC" = "yes" ]; then
2707 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2709 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2710 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2711 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2712 echo " built with 'macx-g++'" >&2
2718 # check specified platforms are supported
2719 if [ '!' -d "$QMAKESPEC" ]; then
2721 echo " The specified system/compiler is not supported:"
2725 echo " Please see the README file for a complete list."
2729 if [ '!' -d "$XQMAKESPEC" ]; then
2731 echo " The specified system/compiler is not supported:"
2735 echo " Please see the README file for a complete list."
2739 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2741 echo " The specified system/compiler port is not complete:"
2743 echo " $XQMAKESPEC/qplatformdefs.h"
2745 echo " Please contact qt-info@nokia.com."
2750 # now look at the configs and figure out what platform we are config'd for
2751 [ "$CFG_EMBEDDED" = "no" ] && [ "$PLATFORM_QPA" != "yes" ] \
2752 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2754 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2756 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2757 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2758 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2759 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2760 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2764 #-------------------------------------------------------------------------------
2765 # determine the system architecture
2766 #-------------------------------------------------------------------------------
2767 if [ "$OPT_VERBOSE" = "yes" ]; then
2768 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2771 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2772 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2774 echo "You have specified a target architecture with -embedded and -arch."
2775 echo "The two architectures you have specified are different, so we can"
2776 echo "not proceed. Either set both to be the same, or only use -embedded."
2782 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2783 case `basename "$XPLATFORM"` in
2786 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2788 echo "Please contact qt-info@nokia.com to upgrade your license to"
2789 echo "include this platform, or install the Qt Open Source Edition"
2790 echo "if you intend to develop free software."
2796 if [ -z "${CFG_HOST_ARCH}" ]; then
2797 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2799 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2800 case "$CFG_HOST_ARCH" in
2805 if [ "$OPT_VERBOSE" = "yes" ]; then
2806 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2810 CFG_HOST_ARCH=`uname -p`
2811 if [ "$OPT_VERBOSE" = "yes" ]; then
2812 echo " SGI ($CFG_HOST_ARCH)"
2816 case "$UNAME_MACHINE" in
2818 if [ "$OPT_VERBOSE" = "yes" ]; then
2819 echo " Sun SPARC (sparc)"
2826 if [ "$OPT_VERBOSE" = "yes" ]; then
2827 echo " 64-bit AMD 80x86 (x86_64)"
2829 CFG_HOST_ARCH=x86_64
2832 if [ "$OPT_VERBOSE" = "yes" ]; then
2833 echo " 32-bit Intel 80x86 (i386)"
2841 if [ "$OPT_VERBOSE" = "yes" ]; then
2842 echo " 64-bit IBM PowerPC (powerpc)"
2844 CFG_HOST_ARCH=powerpc
2847 if [ "$OPT_VERBOSE" = "yes" ]; then
2848 echo " HP PA-RISC (parisc)"
2850 CFG_HOST_ARCH=parisc
2853 if [ "$OPT_VERBOSE" = "yes" ]; then
2854 echo " 32-bit Intel 80x86 (i386)"
2858 *:*:x86_64|*:*:amd64)
2859 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2860 if [ "$OPT_VERBOSE" = "yes" ]; then
2861 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2865 if [ "$OPT_VERBOSE" = "yes" ]; then
2866 echo " 64-bit AMD 80x86 (x86_64)"
2868 CFG_HOST_ARCH=x86_64
2872 if [ "$OPT_VERBOSE" = "yes" ]; then
2873 echo " 32-bit PowerPC (powerpc)"
2875 CFG_HOST_ARCH=powerpc
2878 if [ "$OPT_VERBOSE" = "yes" ]; then
2879 echo " 64-bit PowerPC (powerpc)"
2881 CFG_HOST_ARCH=powerpc
2884 if [ "$OPT_VERBOSE" = "yes" ]; then
2885 echo " IBM S/390 (s390)"
2890 if [ "$OPT_VERBOSE" = "yes" ]; then
2896 if [ "$OPT_VERBOSE" = "yes" ]; then
2897 echo " Linux on SPARC"
2902 case "$UNAME_MACHINE" in
2904 if [ "$OPT_VERBOSE" = "yes" ]; then
2905 echo " QNX on Intel 80x86 (i386)"
2912 if [ "$OPT_VERBOSE" = "yes" ]; then
2913 echo " Trying '$UNAME_MACHINE'..."
2915 CFG_HOST_ARCH="$UNAME_MACHINE"
2920 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2921 if [ -n "$CFG_ARCH" ]; then
2922 CFG_EMBEDDED=$CFG_ARCH
2925 case "$CFG_EMBEDDED" in
2948 CFG_ARCH="$CFG_EMBEDDED"
2951 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
2952 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2953 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2954 CFG_ARCH=$CFG_HOST_ARCH
2961 # previously, armv6 was a different arch
2967 if [ "$OPT_VERBOSE" = "yes" ]; then
2968 echo "System architecture: '$CFG_ARCH'"
2969 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
2970 echo "Host architecture: '$CFG_HOST_ARCH'"
2974 #-------------------------------------------------------------------------------
2975 # tests that don't need qmake (must be run before displaying help)
2976 #-------------------------------------------------------------------------------
2978 # detect build style
2979 if [ "$CFG_DEBUG" = "auto" ]; then
2980 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2981 CFG_DEBUG_RELEASE=yes
2983 elif [ "$CFG_DEV" = "yes" ]; then
2984 CFG_DEBUG_RELEASE=no
2987 CFG_DEBUG_RELEASE=no
2991 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2992 QT_CONFIG="$QT_CONFIG build_all"
2995 if [ -z "$PKG_CONFIG" ]; then
2996 # See if PKG_CONFIG is set in the mkspec:
2997 PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2999 if [ -z "$PKG_CONFIG" ]; then
3000 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
3003 # Work out if we can use pkg-config
3004 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3005 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
3007 echo >&2 "You have asked to use pkg-config and are cross-compiling."
3008 echo >&2 "Please make sure you have a correctly set-up pkg-config"
3009 echo >&2 "environment!"
3011 if [ -z "$PKG_CONFIG_PATH" ]; then
3013 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
3014 echo >&2 "the host compiler's .pc files will be used. This is probably"
3015 echo >&2 "not what you want."
3017 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
3019 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
3020 echo >&2 "been set. This means your toolchain's .pc files must contain"
3021 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
3022 echo >&2 "tests are failing, please check these files."
3027 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
3028 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
3029 echo >&2 "dependencies"
3035 if [ ! -n "$PKG_CONFIG" ]; then
3036 QT_CONFIG="$QT_CONFIG no-pkg-config"
3039 # pass on $CFG_SDK to the configure tests.
3040 if [ '!' -z "$CFG_SDK" ]; then
3041 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
3044 # find the default framework value
3045 if [ "$BUILD_ON_MAC" = "yes" ]; then
3046 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3047 CFG_FRAMEWORK="$CFG_SHARED"
3048 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3050 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3058 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
3060 TEST_COMPILER=$QMAKE_CONF_COMPILER
3061 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3062 if [ -z "$TEST_COMPILER" ]; then
3063 echo "ERROR: Cannot set the compiler for the configuration tests"
3068 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3069 TEST_COMPILER="nacl-gcc"
3073 if [ -n "$CFG_SYSROOT" ]; then
3074 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3075 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3076 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3078 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3082 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3084 # auto-detect precompiled header support
3085 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3086 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3093 #auto-detect DWARF2 on the mac
3094 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3095 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3102 # don't autodetect support for separate debug info on objcopy when
3103 # cross-compiling as lots of toolchains seems to have problems with this
3104 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3105 CFG_SEPARATE_DEBUG_INFO="no"
3108 # auto-detect support for separate debug info in objcopy
3109 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3110 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3111 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3112 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3113 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3114 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3115 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3116 CFG_SEPARATE_DEBUG_INFO=no
3120 # binutils on HP-UX is buggy; default to no.
3121 CFG_SEPARATE_DEBUG_INFO=no
3124 CFG_SEPARATE_DEBUG_INFO=yes
3130 # auto-detect -fvisibility support
3131 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3132 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3133 CFG_REDUCE_EXPORTS=no
3135 CFG_REDUCE_EXPORTS=yes
3139 # detect the availability of the -Bsymbolic-functions linker optimization
3140 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3141 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3142 CFG_REDUCE_RELOCATIONS=no
3144 CFG_REDUCE_RELOCATIONS=yes
3148 # auto-detect GNU make support
3149 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3153 # If -opengl wasn't specified, don't try to auto-detect
3154 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3158 # find the default framework value
3159 if [ "$BUILD_ON_MAC" = "yes" ]; then
3160 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3161 CFG_FRAMEWORK="$CFG_SHARED"
3162 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3164 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3172 # x11 tests are done after qmake is built
3175 #setup the build parts
3176 if [ -z "$CFG_BUILD_PARTS" ]; then
3177 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3179 # don't build tools by default when cross-compiling
3180 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3181 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3184 for nobuild in $CFG_NOBUILD_PARTS; do
3185 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3187 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3189 # echo "WARNING: libs is a required part of the build."
3191 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3194 #-------------------------------------------------------------------------------
3195 # post process QT_INSTALL_* variables
3196 #-------------------------------------------------------------------------------
3198 if [ -z "$QT_INSTALL_PREFIX" ]; then
3199 if [ "$CFG_DEV" = "yes" ]; then
3200 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3202 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3205 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3207 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3208 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3209 if [ "$BUILD_ON_MAC" = "yes" ]; then
3210 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3213 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3216 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3218 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3219 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3220 if [ "$BUILD_ON_MAC" = "yes" ]; then
3221 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3226 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3229 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3231 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3232 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3233 if [ "$BUILD_ON_MAC" = "yes" ]; then
3234 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3235 QT_INSTALL_LIBS="/Libraries/Frameworks"
3239 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3241 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3243 if [ -z "$QT_INSTALL_BINS" ]; then #default
3244 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3245 if [ "$BUILD_ON_MAC" = "yes" ]; then
3246 QT_INSTALL_BINS="/Developer/Applications/Qt"
3249 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3251 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3253 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3254 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3255 if [ "$BUILD_ON_MAC" = "yes" ]; then
3256 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3259 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3261 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3263 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3264 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3265 if [ "$BUILD_ON_MAC" = "yes" ]; then
3266 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3269 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3271 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3273 if [ -z "$QT_INSTALL_DATA" ]; then #default
3274 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3276 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3278 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3279 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3281 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3283 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3284 if [ "$BUILD_ON_MAC" = "yes" ]; then
3285 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3287 QT_INSTALL_SETTINGS=/etc/xdg
3290 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3292 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3293 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3294 if [ "$BUILD_ON_MAC" = "yes" ]; then
3295 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3298 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3300 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3303 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3304 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3305 if [ "$BUILD_ON_MAC" = "yes" ]; then
3306 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3309 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3311 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3313 #-------------------------------------------------------------------------------
3314 # help - interactive parts of the script _after_ this section please
3315 #-------------------------------------------------------------------------------
3317 # next, emit a usage message if something failed.
3318 if [ "$OPT_HELP" = "yes" ]; then
3319 [ "x$ERROR" = "xyes" ] && echo
3320 if [ "$CFG_NIS" = "no" ]; then
3327 if [ "$CFG_CUPS" = "no" ]; then
3334 if [ "$CFG_ICONV" = "no" ]; then
3341 if [ "$CFG_LARGEFILE" = "no" ]; then
3348 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3355 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3363 if [ "$CFG_XCB" = "no" ]; then
3371 if [ "$CFG_WAYLAND" = "no" ]; then
3378 if [ "$CFG_XINPUT2" = "no" ]; then
3387 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3388 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3389 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3390 [-release] [-debug] [-debug-and-release]
3391 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3392 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3393 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3394 [-plugin-sql-<driver>] [-system-sqlite]
3395 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3396 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3397 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3398 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3399 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3400 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3401 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3402 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3403 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3404 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3405 [-no-audio-backend] [-audio-backend]
3406 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3407 [-no-optimized-qmake] [-optimized-qmake]
3408 [-no-openssl] [-openssl] [-openssl-linked]
3409 [-no-gtkstyle] [-gtkstyle]
3410 [-qt-pcre] [-system-pcre]
3411 [additional platform specific options (see below)]
3414 Installation options:
3416 -qpa ................ This will enable the QPA build.
3417 QPA is a window system agnostic implementation of Qt.
3419 These are optional, but you may specify install directories.
3421 -prefix <dir> ...... This will install everything relative to <dir>
3422 (default $QT_INSTALL_PREFIX)
3424 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3427 -hostprefix [dir] .. Tools and libraries needed when developing
3428 applications are installed in [dir]. If [dir] is
3429 not given, the current build directory will be used.
3434 * -prefix-install .... Force a sandboxed "local" installation of
3435 Qt. This will install into
3436 $QT_INSTALL_PREFIX, if this option is
3437 disabled then some platforms will attempt a
3438 "system" install by placing default values to
3439 be placed in a system location other than
3442 You may use these to separate different parts of the install:
3444 -bindir <dir> ......... Executables will be installed to <dir>
3445 (default PREFIX/bin)
3446 -libdir <dir> ......... Libraries will be installed to <dir>
3447 (default PREFIX/lib)
3448 -docdir <dir> ......... Documentation will be installed to <dir>
3449 (default PREFIX/doc)
3450 -headerdir <dir> ...... Headers will be installed to <dir>
3451 (default PREFIX/include)
3452 -plugindir <dir> ...... Plugins will be installed to <dir>
3453 (default PREFIX/plugins)
3454 -importdir <dir> ...... Imports for QML will be installed to <dir>
3455 (default PREFIX/imports)
3456 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3458 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3459 (default PREFIX/translations)
3460 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3461 (default PREFIX/etc/settings)
3462 -examplesdir <dir> .... Examples will be installed to <dir>
3463 (default PREFIX/examples)
3464 -testsdir <dir> ....... Tests will be installed to <dir>
3465 (default PREFIX/tests)
3469 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3470 that needs to be evaluated. If the evaluation succeeds, the feature is
3471 included. Here is a short explanation of each option:
3473 * -release ........... Compile and link Qt with debugging turned off.
3474 -debug ............. Compile and link Qt with debugging turned on.
3475 -debug-and-release . Compile and link two versions of Qt, with and without
3476 debugging turned on (Mac only).
3478 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3480 -opensource ........ Compile and link the Open-Source Edition of Qt.
3481 -commercial ........ Compile and link the Commercial Edition of Qt.
3484 * -shared ............ Create and use shared Qt libraries.
3485 -static ............ Create and use static Qt libraries.
3487 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3489 -fast .............. Configure Qt quickly by generating Makefiles only for
3490 library and subdirectory targets. All other Makefiles
3491 are created as wrappers, which will in turn run qmake.
3493 -no-largefile ...... Disables large file support.
3494 + -largefile ......... Enables Qt to access files larger than 4 GB.
3497 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3504 if [ "$CFG_DBUS" = "no" ]; then
3513 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3514 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3516 -no-accessibility .. Do not compile Accessibility support.
3517 * -accessibility ..... Compile Accessibility support.
3519 $SHN -no-stl ............ Do not compile STL support.
3520 $SHY -stl ............... Compile STL support.
3522 -no-sql-<driver> ... Disable SQL <driver> entirely.
3523 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3525 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3528 Possible values for <driver>:
3529 [ $CFG_SQL_AVAILABLE ]
3531 -system-sqlite ..... Use sqlite from the operating system.
3533 -no-phonon-backend.. Do not build the platform phonon plugin.
3534 + -phonon-backend..... Build the platform phonon plugin.
3536 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3537 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3539 -no-declarative-debug ..... Do not build the declarative debugging support.
3540 + -declarative-debug ....... Build the declarative debugging support.
3542 -platform target ... The operating system and compiler you are building
3545 See the README file for a list of supported
3546 operating systems and compilers.
3549 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3551 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3552 raster - Software rasterizer
3553 opengl - Rendering via OpenGL, Experimental!
3554 openvg - Rendering via OpenVG, Experimental!
3561 -no-mmx ............ Do not compile with use of MMX instructions.
3562 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3563 -no-sse ............ Do not compile with use of SSE instructions.
3564 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3565 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3566 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3567 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3568 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3569 -no-avx ............ Do not compile with use of AVX instructions.
3570 -no-neon ........... Do not compile with use of NEON instructions.
3572 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3573 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3575 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3577 -D <string> ........ Add an explicit define to the preprocessor.
3578 -I <string> ........ Add an explicit include path.
3579 -L <string> ........ Add an explicit library path.
3581 -help, -h .......... Display this information.
3583 Third Party Libraries:
3585 -qt-zlib ........... Use the zlib bundled with Qt.
3586 + -system-zlib ....... Use zlib from the operating system.
3587 See http://www.gzip.org/zlib
3589 -no-gif ............ Do not compile GIF reading support.
3591 -no-libpng ......... Do not compile PNG support.
3592 -qt-libpng ......... Use the libpng bundled with Qt.
3593 + -system-libpng ..... Use libpng from the operating system.
3594 See http://www.libpng.org/pub/png
3596 -no-libjpeg ........ Do not compile JPEG support.
3597 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3598 + -system-libjpeg .... Use libjpeg from the operating system.
3599 See http://www.ijg.org
3601 -no-openssl ........ Do not compile support for OpenSSL.
3602 + -openssl ........... Enable run-time OpenSSL support.
3603 -openssl-linked .... Enabled linked OpenSSL support.
3605 -qt-pcre ........... Use the PCRE library bundled with Qt.
3606 + -system-pcre ....... Use the PCRE library from the operating system.
3610 -make <part> ....... Add part to the list of parts to be built at make time.
3611 ($QT_DEFAULT_BUILD_PARTS)
3612 -nomake <part> ..... Exclude part from the list of parts to be built.
3614 -R <string> ........ Add an explicit runtime library path to the Qt
3616 -l <string> ........ Add an explicit library.
3618 -no-rpath .......... Do not use the library install path as a runtime
3620 + -rpath ............. Link Qt libraries and executables using the library
3621 install path as a runtime library path. Equivalent
3622 to -R install_libpath
3624 -continue .......... Continue as far as possible if an error occurs.
3626 -verbose, -v ....... Print verbose information about each step of the
3629 -silent ............ Reduce the build output so that warnings and errors
3630 can be seen more easily.
3632 * -no-optimized-qmake ... Do not build qmake optimized.
3633 -optimized-qmake ...... Build qmake optimized.
3635 -no-gui ............ Don't build the Qt GUI library
3637 $NSN -no-nis ............ Do not compile NIS support.
3638 $NSY -nis ............... Compile NIS support.
3640 $CUN -no-cups ........... Do not compile CUPS support.
3641 $CUY -cups .............. Compile CUPS support.
3642 Requires cups/cups.h and libcups.so.2.
3644 $CIN -no-iconv .......... Do not compile support for iconv(3).
3645 $CIY -iconv ............. Compile support for iconv(3).
3647 $PHN -no-pch ............ Do not use precompiled header support.
3648 $PHY -pch ............... Use precompiled header support.
3650 $DBN -no-dbus ........... Do not compile the QtDBus module.
3651 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3652 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3654 -reduce-relocations ..... Reduce relocations in the libraries through extra
3655 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3656 experimental; needs GNU ld >= 2.18).
3658 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3662 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3663 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3670 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3678 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3682 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3683 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3685 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3686 $XCBY -xcb ............... Compile Xcb support.
3688 $XWN -no-wayland......... Do not compile Wayland support.
3689 $XWY -wayland .......... Compile Wayland support.
3695 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3699 $X2N -no-xinput2......... Do not compile XInput2 support.
3700 $X2Y -xinput2............ Compile XInput2 support.
3706 if [ "$PLATFORM_X11" = "yes" ]; then
3707 if [ "$CFG_SM" = "no" ]; then
3714 if [ "$CFG_XSHAPE" = "no" ]; then
3721 if [ "$CFG_XVIDEO" = "no" ]; then
3728 if [ "$CFG_XINERAMA" = "no" ]; then
3735 if [ "$CFG_FONTCONFIG" = "no" ]; then
3742 if [ "$CFG_XCURSOR" = "no" ]; then
3749 if [ "$CFG_XFIXES" = "no" ]; then
3756 if [ "$CFG_XRANDR" = "no" ]; then
3763 if [ "$CFG_XRENDER" = "no" ]; then
3770 if [ "$CFG_MITSHM" = "no" ]; then
3777 if [ "$CFG_XINPUT" = "no" ]; then
3784 if [ "$CFG_XKB" = "no" ]; then
3791 if [ "$CFG_IM" = "no" ]; then
3802 -no-gtkstyle ....... Do not build the GTK theme integration.
3803 + -gtkstyle .......... Build the GTK theme integration.
3805 * -no-nas-sound ...... Do not compile in NAS sound support.
3806 -system-nas-sound .. Use NAS libaudio from the operating system.
3807 See http://radscan.com/nas.html
3809 -egl ............... Use EGL instead of GLX to manage contexts.
3810 When building for desktop OpenGL, this option will
3811 make Qt use EGL to manage contexts rather than the
3812 GLX, which is the default. Note: For OpenGL ES, EGL
3815 -no-opengl ......... Do not support OpenGL.
3816 + -opengl <api> ...... Enable OpenGL support.
3817 With no parameter, this will auto-detect the "best"
3818 OpenGL API to use. If desktop OpenGL is available, it
3819 will be used. Use desktop or es2 for <api>
3820 to force the use of the Desktop OpenGL or
3821 OpenGL ES 2 APIs instead.
3823 -no-openvg ........ Do not support OpenVG.
3824 + -openvg ........... Enable OpenVG support.
3825 Requires EGL support, typically supplied by an OpenGL
3826 or other graphics implementation.
3828 $SMN -no-sm ............. Do not support X Session Management.
3829 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3831 $SHN -no-xshape ......... Do not compile XShape support.
3832 $SHY -xshape ............ Compile XShape support.
3833 Requires X11/extensions/shape.h.
3835 $XVN -no-xvideo ......... Do not compile XVideo support.
3836 $XVY -xvideo ............ Compile XVideo support.
3837 Requires X11/extensions/Xv.h & Xvlib.h.
3839 $SHN -no-xsync .......... Do not compile XSync support.
3840 $SHY -xsync ............. Compile XSync support.
3841 Requires X11/extensions/sync.h.
3843 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3844 $XAY -xinerama .......... Compile Xinerama support.
3845 Requires X11/extensions/Xinerama.h and libXinerama.
3846 By default, Xinerama support will be compiled if
3847 available and the shared libraries are dynamically
3850 $XCN -no-xcursor ........ Do not compile Xcursor support.
3851 $XCY -xcursor ........... Compile Xcursor support.
3852 Requires X11/Xcursor/Xcursor.h and libXcursor.
3853 By default, Xcursor support will be compiled if
3854 available and the shared libraries are dynamically
3857 $XFN -no-xfixes ......... Do not compile Xfixes support.
3858 $XFY -xfixes ............ Compile Xfixes support.
3859 Requires X11/extensions/Xfixes.h and libXfixes.
3860 By default, Xfixes support will be compiled if
3861 available and the shared libraries are dynamically
3864 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3865 $XZY -xrandr ............ Compile Xrandr support.
3866 Requires X11/extensions/Xrandr.h and libXrandr.
3868 $XRN -no-xrender ........ Do not compile Xrender support.
3869 $XRY -xrender ........... Compile Xrender support.
3870 Requires X11/extensions/Xrender.h and libXrender.
3872 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3873 $XMY -mitshm ............ Compile MIT-SHM support.
3874 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3876 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3877 $FCGY -fontconfig ........ Compile FontConfig support.
3878 Requires fontconfig/fontconfig.h, libfontconfig,
3879 freetype.h and libfreetype.
3881 $XIN -no-xinput ......... Do not compile Xinput support.
3882 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3883 which requires IRIX with wacom.h and libXi or
3884 XFree86 with X11/extensions/XInput.h and libXi.
3886 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3887 $XKY -xkb ............... Compile XKB support.
3892 if [ "$BUILD_ON_MAC" = "yes" ]; then
3897 -Fstring ........... Add an explicit framework path.
3898 -fw string ......... Add an explicit framework.
3900 * -framework ......... Build Qt as a series of frameworks and
3901 link tools against those frameworks.
3902 -no-framework ...... Do not build Qt as a series of frameworks.
3904 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3905 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3907 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3908 Only one arch value can be specified.
3910 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3911 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3913 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3914 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3915 QT_ENABLE_HARFBUZZ environment variable.
3920 if [ "$PLATFORM_QWS" = "yes" ]; then
3922 Qt for Embedded Linux:
3924 -embedded <arch> .... This will enable the embedded build, you must have a
3925 proper license for this switch to work.
3926 Example values for <arch>: arm mips x86 generic
3930 if [ "$PLATFORM_QPA" = "yes" ]; then
3936 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3939 -xplatform target ... The target platform when cross-compiling.
3941 -no-feature-<feature> Do not compile in <feature>.
3942 -feature-<feature> .. Compile in <feature>. The available features
3943 are described in src/corelib/global/qfeatures.txt
3945 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3946 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3948 The floating point format is usually autodetected by configure. Use this
3949 to override the detected value.
3951 -little-endian ...... Target platform is little endian (LSB first).
3952 -big-endian ......... Target platform is big endian (MSB first).
3954 -host-little-endian . Host platform is little endian (LSB first).
3955 -host-big-endian .... Host platform is big endian (MSB first).
3957 You only need to specify the endianness when
3958 cross-compiling, otherwise the host
3959 endianness will be used.
3961 -no-freetype ........ Do not compile in Freetype2 support.
3962 -qt-freetype ........ Use the libfreetype bundled with Qt.
3963 * -system-freetype .... Use libfreetype from the operating system.
3964 See http://www.freetype.org/
3966 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3967 default ($CFG_QCONFIG).
3969 -no-opengl .......... Do not support OpenGL.
3970 -opengl <api> ....... Enable OpenGL ES support
3971 With no parameter, this will attempt to auto-detect
3972 OpenGL ES 2, or regular desktop OpenGL.
3973 Use es2 for <api> to override auto-detection.
3977 if [ "$PLATFORM_QWS" = "yes" ]; then
3980 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3981 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3983 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3984 by default all available decorations are on.
3985 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3986 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3987 linked to at run time.
3988 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3989 -no-decoration-<style> ....Disable decoration <style> entirely.
3990 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3992 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3993 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3994 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3995 linked to at run time.
3996 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3997 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3998 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4000 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4001 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4003 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4005 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4007 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4008 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4010 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4011 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4012 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4014 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4015 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4016 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4018 -iwmmxt ............ Compile using the iWMMXt instruction set
4019 (available on some XScale CPUs).
4023 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4024 if [ "$CFG_GLIB" = "no" ]; then
4032 $GBN -no-glib ........... Do not compile Glib support.
4033 $GBY -glib .............. Compile Glib support.
4038 [ "x$ERROR" = "xyes" ] && exit 1
4043 # -----------------------------------------------------------------------------
4044 # LICENSING, INTERACTIVE PART
4045 # -----------------------------------------------------------------------------
4047 if [ "$PLATFORM_QWS" = "yes" ]; then
4048 Platform="Qt for Embedded Linux"
4049 elif [ "$PLATFORM_QPA" = "yes" ]; then
4050 Platform="Qt Lighthouse"
4051 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4052 Platform="Qt for Windows"
4053 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4055 Platform="Qt for Linux/X11"
4059 echo "This is the $Platform ${EditionString} Edition."
4062 if [ "$Edition" = "OpenSource" ]; then
4064 echo "You are licensed to use this software under the terms of"
4065 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4066 if [ -f "$relpath/LICENSE.GPL3" ]; then
4067 echo "You are also licensed to use this software under the terms of"
4068 echo "the GNU General Public License (GPL) versions 3."
4074 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4075 echo "You have already accepted the terms of the $LicenseType license."
4078 if [ -f "$relpath/LICENSE.GPL3" ]; then
4079 echo "Type '3' to view the GNU General Public License version 3."
4081 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4082 echo "Type 'yes' to accept this license offer."
4083 echo "Type 'no' to decline this license offer."
4085 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4089 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4091 elif [ "$acceptance" = "no" ]; then
4092 echo "You are not licensed to use this software."
4095 elif [ "$acceptance" = "3" ]; then
4096 more "$relpath/LICENSE.GPL3"
4097 elif [ "$acceptance" = "L" ]; then
4098 more "$relpath/LICENSE.LGPL"
4101 elif [ "$Edition" = "Preview" ]; then
4102 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4105 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4106 echo "You have already accepted the terms of the $LicenseType license."
4109 echo "You are licensed to use this software under the terms of"
4110 echo "the $TheLicense"
4112 echo "Type '?' to read the Preview License."
4113 echo "Type 'yes' to accept this license offer."
4114 echo "Type 'no' to decline this license offer."
4116 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4120 if [ "$acceptance" = "yes" ]; then
4122 elif [ "$acceptance" = "no" ] ;then
4123 echo "You are not licensed to use this software."
4126 elif [ "$acceptance" = "?" ]; then
4127 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4130 elif [ "$Edition" != "OpenSource" ]; then
4131 if [ -n "$ExpiryDate" ]; then
4132 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4133 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4134 Today=`date +%Y%m%d`
4135 if [ "$Today" -gt "$ExpiryDate" ]; then
4136 case "$LicenseType" in
4137 Commercial|Academic|Educational)
4138 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4140 echo "NOTICE NOTICE NOTICE NOTICE"
4142 echo " Your support and upgrade period has expired."
4144 echo " You are no longer licensed to use this version of Qt."
4145 echo " Please contact qt-info@nokia.com to renew your support"
4146 echo " and upgrades for this license."
4148 echo "NOTICE NOTICE NOTICE NOTICE"
4153 echo "WARNING WARNING WARNING WARNING"
4155 echo " Your support and upgrade period has expired."
4157 echo " You may continue to use your last licensed release"
4158 echo " of Qt under the terms of your existing license"
4159 echo " agreement. But you are not entitled to technical"
4160 echo " support, nor are you entitled to use any more recent"
4161 echo " Qt releases."
4163 echo " Please contact qt-info@nokia.com to renew your"
4164 echo " support and upgrades for this license."
4166 echo "WARNING WARNING WARNING WARNING"
4173 echo "NOTICE NOTICE NOTICE NOTICE"
4175 echo " Your Evaluation license has expired."
4177 echo " You are no longer licensed to use this software. Please"
4178 echo " contact qt-info@nokia.com to purchase license, or install"
4179 echo " the Qt Open Source Edition if you intend to develop free"
4182 echo "NOTICE NOTICE NOTICE NOTICE"
4189 TheLicense=`head -n 1 "$outpath/LICENSE"`
4191 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4192 echo "You have already accepted the terms of the $TheLicense."
4195 echo "You are licensed to use this software under the terms of"
4196 echo "the $TheLicense."
4198 echo "Type '?' to view the $TheLicense."
4199 echo "Type 'yes' to accept this license offer."
4200 echo "Type 'no' to decline this license offer."
4202 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4206 if [ "$acceptance" = "yes" ]; then
4208 elif [ "$acceptance" = "no" ]; then
4209 echo "You are not licensed to use this software."
4212 else [ "$acceptance" = "?" ]
4213 more "$outpath/LICENSE"
4218 # this should be moved somewhere else
4221 AIX_VERSION=`uname -v`
4222 if [ "$AIX_VERSION" -lt "5" ]; then
4223 QMakeVar add QMAKE_LIBS_X11 -lbind
4230 #-------------------------------------------------------------------------------
4231 # generate qconfig.cpp
4232 #-------------------------------------------------------------------------------
4233 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4235 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4236 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4237 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4238 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4239 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4240 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4241 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4242 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4243 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4244 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4245 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4246 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4247 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4248 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4250 TODAY=`date +%Y-%m-%d`
4251 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4253 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4254 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4256 /* Installation date */
4257 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4261 if [ ! -z "$QT_HOST_PREFIX" ]; then
4262 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4263 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4264 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4265 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4266 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4267 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4268 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4269 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4270 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4271 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4272 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4273 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4275 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4277 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4278 /* Installation Info */
4279 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4280 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4281 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4282 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4283 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4284 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4285 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4286 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4287 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4288 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4289 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4290 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4291 #else // QT_BOOTSTRAPPED
4295 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4296 /* Installation Info */
4297 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4298 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4299 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4300 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4301 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4302 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4303 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4304 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4305 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4306 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4307 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4308 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4311 if [ ! -z "$QT_HOST_PREFIX" ]; then
4312 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4313 #endif // QT_BOOTSTRAPPED
4318 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4319 /* strlen( "qt_lcnsxxxx" ) == 12 */
4320 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4321 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4322 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4323 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4324 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4325 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4326 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4327 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4328 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4329 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4330 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4331 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4332 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4333 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4336 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4337 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4338 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4340 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4341 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4342 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4345 # -----------------------------------------------------------------------------
4346 if [ "$LicenseType" = "Evaluation" ]; then
4347 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4348 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4349 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4352 if [ -n "$EVALKEY" ]; then
4353 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4354 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4355 /* Evaluation license key */
4356 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4358 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4362 # -----------------------------------------------------------------------------
4364 # -----------------------------------------------------------------------------
4367 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4369 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4370 if [ "$OPT_SHADOW" = "yes" ]; then
4371 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4372 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4373 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4378 # $2: optional transformation
4379 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4380 # is where the resulting variable is written to
4381 # Assumes that the optional transformation produces the same variable name for each hit
4382 setBootstrapVariable()
4384 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4390 valStart = index($0, "=") + 1
4393 if (substr($0, valStart - 2, 1) == "+") {
4397 variable = substr($0, 0, valStart - 2 - append)
4398 value = substr($0, valStart)
4399 gsub("[ \t]+", "", variable)
4400 gsub("^[ \t]+", "", value)
4401 gsub("[ \t]+$", "", value)
4403 if (append == 1 && length(combinedValue) > 0) {
4404 combinedValue = combinedValue " " value
4406 combinedValue = value
4410 if (length(combinedValue) > 0) {
4411 printf "%s = %s\n", variable, combinedValue
4417 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4418 echo "Creating qmake. Please wait..."
4421 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4422 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4423 if [ -f "$QCONFIG_H" ]; then
4424 OLD_QCONFIG_H=$QCONFIG_H
4425 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4428 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4429 # when building qmake, we use #defines for the install paths,
4430 # however they are real functions in the library
4431 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4432 mkdir -p "$outpath/src/corelib/global"
4433 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4434 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4437 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4439 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4440 rm -rf mkspecs/default
4441 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4443 for mkfile in GNUmakefile Makefile; do
4446 in_mkfile="${mkfile}.in"
4447 if [ "$mkfile" = "Makefile" ]; then
4448 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4449 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4451 in_mkfile="${mkfile}.unix"
4453 in_mkfile="$relpath/qmake/$in_mkfile"
4454 mkfile="$outpath/qmake/$mkfile"
4455 if [ -f "$mkfile" ]; then
4456 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4459 [ -f "$in_mkfile" ] || continue
4461 echo "########################################################################" > "$mkfile"
4462 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4463 echo "########################################################################" >> "$mkfile"
4466 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4467 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4468 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4470 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4471 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4474 if [ "$CFG_SILENT" = "yes" ]; then
4475 setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4476 setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4478 setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4479 setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4481 setBootstrapVariable QMAKE_CFLAGS
4482 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4483 setBootstrapVariable QMAKE_LFLAGS
4485 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4486 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4487 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4489 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4490 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4491 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4492 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4493 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4494 elif [ "$CFG_DEBUG" = "yes" ]; then
4495 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4496 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4497 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4498 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4501 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4502 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4503 for rpath in $RPATH_FLAGS; do
4504 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4507 if [ "$BUILD_ON_MAC" = "yes" ]; then
4508 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4509 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4510 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4511 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4512 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4513 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4514 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4515 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4516 if [ '!' -z "$CFG_SDK" ]; then
4517 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4518 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4519 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4520 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4521 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4524 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4525 if [ '!' -z "$D_FLAGS" ]; then
4526 for DEF in $D_FLAGS; do
4527 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4530 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4531 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4532 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4533 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4535 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4536 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4537 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4538 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4539 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4540 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4541 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4542 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4543 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4544 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4546 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4547 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4548 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4549 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4554 QMAKE_BUILD_ERROR=no
4555 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4556 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4557 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4558 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4561 #-------------------------------------------------------------------------------
4562 # tests that need qmake
4563 #-------------------------------------------------------------------------------
4565 # detect availability of float math.h functions
4566 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4567 CFG_USE_FLOATMATH=yes
4569 CFG_USE_FLOATMATH=no
4572 # detect mmx support
4573 if [ "${CFG_MMX}" = "auto" ]; then
4574 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4581 # detect 3dnow support
4582 if [ "${CFG_3DNOW}" = "auto" ]; then
4583 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4590 # detect sse support
4591 if [ "${CFG_SSE}" = "auto" ]; then
4592 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4599 # detect sse2 support
4600 if [ "${CFG_SSE2}" = "auto" ]; then
4601 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4608 # detect sse3 support
4609 if [ "${CFG_SSE3}" = "auto" ]; then
4610 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4617 # detect ssse3 support
4618 if [ "${CFG_SSSE3}" = "auto" ]; then
4619 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4626 # detect sse4.1 support
4627 if [ "${CFG_SSE4_1}" = "auto" ]; then
4628 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
4635 # detect sse4.2 support
4636 if [ "${CFG_SSE4_2}" = "auto" ]; then
4637 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
4644 # detect avx support
4645 if [ "${CFG_AVX}" = "auto" ]; then
4646 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4653 # check iWMMXt support
4654 if [ "$CFG_IWMMXT" = "yes" ]; then
4655 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4656 if [ $? != "0" ]; then
4657 echo "The iWMMXt functionality test failed!"
4658 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4663 # detect neon support
4664 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4665 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
4672 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4675 if [ "$CFG_ZLIB" = "no" ]; then
4676 # Note: Qt no longer support builds without zlib
4677 # So we force a "no" to be "auto" here.
4678 # If you REALLY really need no zlib support, you can still disable
4679 # it by doing the following:
4680 # add "no-zlib" to mkspecs/qconfig.pri
4681 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4683 # There's no guarantee that Qt will build under those conditions
4688 if [ "$CFG_ZLIB" = "auto" ]; then
4689 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
4696 if [ "$CFG_LARGEFILE" = "auto" ]; then
4697 #Large files should be enabled for all Linux systems
4701 # detect how jpeg should be built
4702 if [ "$CFG_JPEG" = "auto" ]; then
4703 if [ "$CFG_SHARED" = "yes" ]; then
4710 if [ "$CFG_LIBJPEG" = "auto" ]; then
4711 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
4718 # detect how gif should be built
4719 if [ "$CFG_GIF" = "auto" ]; then
4720 if [ "$CFG_SHARED" = "yes" ]; then
4728 if [ "$CFG_LIBPNG" = "auto" ]; then
4729 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
4736 # detect accessibility
4737 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4738 CFG_ACCESSIBILITY=yes
4741 # auto-detect SQL-modules support
4742 for _SQLDR in $CFG_SQL_AVAILABLE; do
4745 if [ "$CFG_SQL_mysql" != "no" ]; then
4746 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4747 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4748 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4749 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4750 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4751 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4752 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4754 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4755 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4756 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4757 echo " You need MySql 4 or higher."
4758 echo " If you believe this message is in error you may use the continue"
4759 echo " switch (-continue) to $0 to continue."
4764 QT_LFLAGS_MYSQL_R=""
4768 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
4769 QMakeVar add CONFIG use_libmysqlclient_r
4770 if [ "$CFG_SQL_mysql" = "auto" ]; then
4771 CFG_SQL_mysql=plugin
4773 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4774 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
4775 if [ "$CFG_SQL_mysql" = "auto" ]; then
4776 CFG_SQL_mysql=plugin
4779 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4780 echo "MySQL support cannot be enabled due to functionality tests!"
4781 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4782 echo " If you believe this message is in error you may use the continue"
4783 echo " switch (-continue) to $0 to continue."
4788 QT_LFLAGS_MYSQL_R=""
4796 if [ "$CFG_SQL_psql" != "no" ]; then
4797 # Be careful not to use native pg_config when cross building.
4798 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4799 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4800 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4802 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4803 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4804 # But, respect PSQL_LIBS if set
4805 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4806 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
4807 if [ "$CFG_SQL_psql" = "auto" ]; then
4811 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4812 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4813 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4814 echo " If you believe this message is in error you may use the continue"
4815 echo " switch (-continue) to $0 to continue."
4826 if [ "$CFG_SQL_odbc" != "no" ]; then
4827 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
4828 if [ "$CFG_SQL_odbc" = "auto" ]; then
4832 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
4833 QT_LFLAGS_ODBC="-liodbc"
4834 if [ "$CFG_SQL_odbc" = "auto" ]; then
4838 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4839 echo "ODBC support cannot be enabled due to functionality tests!"
4840 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4841 echo " If you believe this message is in error you may use the continue"
4842 echo " switch (-continue) to $0 to continue."
4852 if [ "$CFG_SQL_oci" != "no" ]; then
4853 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
4854 if [ "$CFG_SQL_oci" = "auto" ]; then
4858 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4859 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4860 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4861 echo " If you believe this message is in error you may use the continue"
4862 echo " switch (-continue) to $0 to continue."
4871 if [ "$CFG_SQL_tds" != "no" ]; then
4872 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4873 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4874 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
4875 if [ "$CFG_SQL_tds" = "auto" ]; then
4879 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4880 echo "TDS support cannot be enabled due to functionality tests!"
4881 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4882 echo " If you believe this message is in error you may use the continue"
4883 echo " switch (-continue) to $0 to continue."
4892 if [ "$CFG_SQL_db2" != "no" ]; then
4893 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
4894 if [ "$CFG_SQL_db2" = "auto" ]; then
4898 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4899 echo "ODBC support cannot be enabled due to functionality tests!"
4900 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4901 echo " If you believe this message is in error you may use the continue"
4902 echo " switch (-continue) to $0 to continue."
4911 if [ "$CFG_SQL_ibase" != "no" ]; then
4912 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
4913 if [ "$CFG_SQL_ibase" = "auto" ]; then
4914 CFG_SQL_ibase=plugin
4917 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4918 echo "InterBase support cannot be enabled due to functionality tests!"
4919 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4920 echo " If you believe this message is in error you may use the continue"
4921 echo " switch (-continue) to $0 to continue."
4930 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4931 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
4932 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4933 CFG_SQL_sqlite2=plugin
4936 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4937 echo "SQLite2 support cannot be enabled due to functionality tests!"
4938 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4939 echo " If you believe this message is in error you may use the continue"
4940 echo " switch (-continue) to $0 to continue."
4949 if [ "$CFG_SQL_sqlite" != "no" ]; then
4950 SQLITE_AUTODETECT_FAILED="no"
4951 if [ "$CFG_SQLITE" = "system" ]; then
4952 if [ -n "$PKG_CONFIG" ]; then
4953 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4954 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4956 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
4957 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4958 CFG_SQL_sqlite=plugin
4960 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4962 SQLITE_AUTODETECT_FAILED="yes"
4965 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4966 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4967 CFG_SQL_sqlite=plugin
4970 SQLITE_AUTODETECT_FAILED="yes"
4974 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4975 echo "SQLite support cannot be enabled due to functionality tests!"
4976 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4977 echo " If you believe this message is in error you may use the continue"
4978 echo " switch (-continue) to $0 to continue."
4984 if [ "$OPT_VERBOSE" = "yes" ]; then
4985 echo "unknown SQL driver: $_SQLDR"
4991 # auto-detect NIS support
4992 if [ "$CFG_NIS" != "no" ]; then
4993 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
4996 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4997 echo "NIS support cannot be enabled due to functionality tests!"
4998 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4999 echo " If you believe this message is in error you may use the continue"
5000 echo " switch (-continue) to $0 to continue."
5008 # auto-detect CUPS support
5009 if [ "$CFG_CUPS" != "no" ]; then
5010 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
5013 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5014 echo "Cups support cannot be enabled due to functionality tests!"
5015 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5016 echo " If you believe this message is in error you may use the continue"
5017 echo " switch (-continue) to $0 to continue."
5025 # auto-detect iconv(3) support
5026 if [ "$CFG_ICONV" != "no" ]; then
5027 if [ "$PLATFORM_QWS" = "yes" -o "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
5029 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
5031 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
5033 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
5036 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5037 echo "Iconv support cannot be enabled due to functionality tests!"
5038 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5039 echo " If you believe this message is in error you may use the continue"
5040 echo " switch (-continue) to $0 to continue."
5048 # auto-detect libdbus-1 support
5049 if [ "$CFG_DBUS" != "no" ]; then
5050 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5051 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5052 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5054 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
5055 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5056 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5057 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5059 if [ "$CFG_DBUS" = "auto" ]; then
5061 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5062 # CFG_DBUS is "yes" or "linked" here
5064 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5065 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5066 echo " If you believe this message is in error you may use the continue"
5067 echo " switch (-continue) to $0 to continue."
5073 # X11/QWS/Lighthouse
5074 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5076 # auto-detect Glib support
5077 if [ "$CFG_GLIB" != "no" ]; then
5078 if [ -n "$PKG_CONFIG" ]; then
5079 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5080 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5082 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
5084 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5085 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5087 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5088 echo "Glib support cannot be enabled due to functionality tests!"
5089 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5090 echo " If you believe this message is in error you may use the continue"
5091 echo " switch (-continue) to $0 to continue."
5100 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5101 if [ -n "$PKG_CONFIG" ]; then
5102 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5103 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5105 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
5107 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5108 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5110 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5111 echo "Gstreamer support cannot be enabled due to functionality tests!"
5112 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5113 echo " If you believe this message is in error you may use the continue"
5114 echo " switch (-continue) to $0 to continue."
5120 elif [ "$CFG_GLIB" = "no" ]; then
5124 # auto-detect libicu support
5125 if [ "$CFG_ICU" != "no" ]; then
5126 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5127 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5129 if [ "$CFG_ICU" = "auto" ]; then
5131 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5134 echo "The ICU library support cannot be enabled."
5135 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5136 echo " If you believe this message is in error you may use the continue"
5137 echo " switch (-continue) to $0 to continue."
5143 # Auto-detect PulseAudio support
5144 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5145 if [ -n "$PKG_CONFIG" ]; then
5146 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5147 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5149 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
5151 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5152 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5154 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5155 echo "PulseAudio support cannot be enabled due to functionality tests!"
5156 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5157 echo " If you believe this message is in error you may use the continue"
5158 echo " switch (-continue) to $0 to continue."
5165 fi # X11/QWS/Lighthouse
5168 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5169 x11tests="$relpath/config.tests/x11"
5172 # work around broken X11 headers when using GCC 2.95 or later
5174 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5175 if [ $NOTYPE = "yes" ]; then
5176 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5177 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5180 # Check we actually have X11 :-)
5181 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5182 if [ $? != "0" ]; then
5183 echo "Basic XLib functionality test failed!"
5184 echo " You might need to modify the include and library search paths by editing"
5185 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5191 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5192 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5193 if [ "$CFG_GUI" = "no" ]; then
5194 if [ "$CFG_OPENGL" = "auto" ]; then
5197 if [ "$CFG_OPENGL" != "no" ]; then
5198 echo "OpenGL enabled, but GUI disabled."
5199 echo " You might need to either enable the GUI or disable OpenGL"
5203 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5204 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
5206 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
5208 if [ "$CFG_EGL" = "no" ]; then
5212 if [ "$CFG_OPENGL" = "yes" ]; then
5213 echo "All the OpenGL functionality tests failed!"
5214 echo " You might need to modify the include and library search paths by editing"
5215 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5216 echo " ${XQMAKESPEC}."
5223 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5224 if [ "$CFG_OPENGL" = "desktop" ]; then
5225 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5226 if [ $? != "0" ]; then
5227 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5234 elif [ "$CFG_OPENGL" = "es2" ]; then
5236 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5237 if [ $? != "0" ]; then
5238 echo "The OpenGL ES 2.0 functionality test failed!"
5239 echo " You might need to modify the include and library search paths by editing"
5240 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5241 echo " ${XQMAKESPEC}."
5244 elif [ "$CFG_OPENGL" = "desktop" ]; then
5245 # Desktop OpenGL support
5246 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5247 if [ $? != "0" ]; then
5248 echo "The OpenGL functionality test failed!"
5249 echo " You might need to modify the include and library search paths by editing"
5250 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5251 echo " ${XQMAKESPEC}."
5256 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5257 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5258 if [ $? != "0" ]; then
5259 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5266 fi # X11/MINGW OpenGL
5269 if [ "$PLATFORM_X11" = "yes" ]; then
5270 # auto-detect Xcursor support
5271 if [ "$CFG_XCURSOR" != "no" ]; then
5272 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
5273 if [ "$CFG_XCURSOR" != "runtime" ]; then
5277 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5278 echo "Xcursor support cannot be enabled due to functionality tests!"
5279 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5280 echo " If you believe this message is in error you may use the continue"
5281 echo " switch (-continue) to $0 to continue."
5289 # auto-detect Xfixes support
5290 if [ "$CFG_XFIXES" != "no" ]; then
5291 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5292 if [ "$CFG_XFIXES" != "runtime" ]; then
5296 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5297 echo "Xfixes support cannot be enabled due to functionality tests!"
5298 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5299 echo " If you believe this message is in error you may use the continue"
5300 echo " switch (-continue) to $0 to continue."
5308 # auto-detect Xrandr support (resize and rotate extension)
5309 if [ "$CFG_XRANDR" != "no" ]; then
5310 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
5311 if [ "$CFG_XRANDR" != "runtime" ]; then
5315 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5316 echo "Xrandr support cannot be enabled due to functionality tests!"
5317 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5318 echo " If you believe this message is in error you may use the continue"
5319 echo " switch (-continue) to $0 to continue."
5327 # auto-detect Xrender support
5328 if [ "$CFG_XRENDER" != "no" ]; then
5329 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
5332 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5333 echo "Xrender support cannot be enabled due to functionality tests!"
5334 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5335 echo " If you believe this message is in error you may use the continue"
5336 echo " switch (-continue) to $0 to continue."
5344 # auto-detect MIT-SHM support
5345 if [ "$CFG_MITSHM" != "no" ]; then
5346 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
5349 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5350 echo "MITSHM support cannot be enabled due to functionality tests!"
5351 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5352 echo " If you believe this message is in error you may use the continue"
5353 echo " switch (-continue) to $0 to continue."
5361 # auto-detect FontConfig support
5362 if [ "$CFG_FONTCONFIG" != "no" ]; then
5363 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5364 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5365 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5367 QT_CFLAGS_FONTCONFIG=
5368 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5370 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
5372 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5373 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5374 CFG_LIBFREETYPE=system
5376 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5377 echo "FontConfig support cannot be enabled due to functionality tests!"
5378 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5379 echo " If you believe this message is in error you may use the continue"
5380 echo " switch (-continue) to $0 to continue."
5388 # auto-detect Session Management support
5389 if [ "$CFG_SM" = "auto" ]; then
5390 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
5393 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5394 echo "Session Management support cannot be enabled due to functionality tests!"
5395 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5396 echo " If you believe this message is in error you may use the continue"
5397 echo " switch (-continue) to $0 to continue."
5405 # auto-detect SHAPE support
5406 if [ "$CFG_XSHAPE" != "no" ]; then
5407 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
5410 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5411 echo "XShape support cannot be enabled due to functionality tests!"
5412 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5413 echo " If you believe this message is in error you may use the continue"
5414 echo " switch (-continue) to $0 to continue."
5422 # auto-detect XVideo support
5423 if [ "$CFG_XVIDEO" != "no" ]; then
5424 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
5427 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5428 echo "XVideo support cannot be enabled due to functionality tests!"
5429 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5430 echo " If you believe this message is in error you may use the continue"
5431 echo " switch (-continue) to $0 to continue."
5439 # auto-detect XSync support
5440 if [ "$CFG_XSYNC" != "no" ]; then
5441 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
5444 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5445 echo "XSync support cannot be enabled due to functionality tests!"
5446 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5447 echo " If you believe this message is in error you may use the continue"
5448 echo " switch (-continue) to $0 to continue."
5456 # auto-detect Xinerama support
5457 if [ "$CFG_XINERAMA" != "no" ]; then
5458 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
5459 if [ "$CFG_XINERAMA" != "runtime" ]; then
5463 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5464 echo "Xinerama support cannot be enabled due to functionality tests!"
5465 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5466 echo " If you believe this message is in error you may use the continue"
5467 echo " switch (-continue) to $0 to continue."
5475 # auto-detect Xinput support
5476 if [ "$CFG_XINPUT" != "no" ]; then
5477 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
5478 if [ "$CFG_XINPUT" != "runtime" ]; then
5482 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5483 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5484 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5485 echo " If you believe this message is in error you may use the continue"
5486 echo " switch (-continue) to $0 to continue."
5494 # auto-detect XKB support
5495 if [ "$CFG_XKB" != "no" ]; then
5496 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
5499 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5500 echo "XKB support cannot be enabled due to functionality tests!"
5501 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5502 echo " If you believe this message is in error you may use the continue"
5503 echo " switch (-continue) to $0 to continue."
5511 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5512 if [ -n "$PKG_CONFIG" ]; then
5513 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5514 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5516 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5518 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5519 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5521 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5522 echo "Gtk theme support cannot be enabled due to functionality tests!"
5523 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5524 echo " If you believe this message is in error you may use the continue"
5525 echo " switch (-continue) to $0 to continue."
5531 elif [ "$CFG_GLIB" = "no" ]; then
5537 if [ "$BUILD_ON_MAC" = "yes" ]; then
5538 if [ "$CFG_PHONON" != "no" ]; then
5539 # Always enable Phonon (unless it was explicitly disabled)
5543 if [ "$CFG_COREWLAN" = "auto" ]; then
5544 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
5553 if [ "$PLATFORM_QPA" = "yes" ]; then
5554 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5555 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5556 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
5558 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
5561 if [ "$CFG_OPENGL" = "yes" ]; then
5562 echo "All the OpenGL functionality tests failed!"
5563 echo " You might need to modify the include and library search paths by editing"
5564 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5565 echo " ${XQMAKESPEC}."
5570 elif [ "$CFG_OPENGL" = "es2" ]; then
5572 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5573 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
5574 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
5575 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5576 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5577 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5578 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5579 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5582 "$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
5583 if [ $? != "0" ]; then
5584 echo "The OpenGL ES 2.0 functionality test failed!"
5585 echo " You might need to modify the include and library search paths by editing"
5586 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5587 echo " ${XQMAKESPEC}."
5590 elif [ "$CFG_OPENGL" = "desktop" ]; then
5591 # Desktop OpenGL support
5592 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5593 if [ $? != "0" ]; then
5594 echo "The OpenGL functionality test failed!"
5595 echo " You might need to modify the include and library search paths by editing"
5596 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5597 echo " ${XQMAKESPEC}."
5602 # auto-detect FontConfig support
5603 if [ "$CFG_FONTCONFIG" != "no" ]; then
5604 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5605 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5606 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5608 QT_CFLAGS_FONTCONFIG=
5609 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5611 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
5612 QT_CONFIG="$QT_CONFIG fontconfig"
5613 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5614 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5615 CFG_LIBFREETYPE=system
5620 # Save these for a check later
5621 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5622 ORIG_CFG_XCB="$CFG_XCB"
5624 if [ "$CFG_WAYLAND" != "no" ]; then
5625 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5626 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5627 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5628 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
5629 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
5631 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
5633 QT_CONFIG="$QT_CONFIG wayland"
5634 elif [ "$CFG_WAYLAND" = "yes" ]; then
5635 echo "The Wayland functionality test failed!"
5639 QMakeVar add DEFINES QT_NO_WAYLAND
5643 if [ "$CFG_LIBUDEV" != "no" ]; then
5644 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5646 QT_CONFIG="$QT_CONFIG libudev"
5647 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5648 echo "The libudev functionality test failed!"
5652 QMakeVar add DEFINES QT_NO_LIBUDEV
5656 if [ "$CFG_EVDEV" != "no" ]; then
5657 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5659 QT_CONFIG="$QT_CONFIG evdev"
5660 elif [ "$CFG_EVDEV" = "yes" ]; then
5661 echo "The evdev functionality test failed!"
5665 QMakeVar add DEFINES QT_NO_EVDEV
5669 # Check we actually have X11 :-)
5670 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
5671 QT_CONFIG="$QT_CONFIG xlib"
5674 # auto-detect Xrender support
5675 if [ "$CFG_XRENDER" != "no" ]; then
5676 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
5678 QT_CONFIG="$QT_CONFIG xrender"
5680 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5681 echo "Xrender support cannot be enabled due to functionality tests!"
5682 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5683 echo " If you believe this message is in error you may use the continue"
5684 echo " switch (-continue) to $0 to continue."
5692 if [ "$CFG_XCB" != "no" ]; then
5693 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
5695 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
5696 QT_CONFIG="$QT_CONFIG xcb-render"
5699 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
5701 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5704 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
5705 QT_CONFIG="$QT_CONFIG xcb-xlib"
5708 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5709 # auto-detect XInput2/Xinput support
5710 if [ "$CFG_XINPUT2" != "no" ]; then
5711 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
5715 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5716 echo "XInput2 support cannot be enabled due to functionality tests!"
5717 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5718 echo " If you believe this message is in error you may use the continue"
5719 echo " switch (-continue) to $0 to continue."
5728 if [ "$CFG_XCB" = "yes" ]; then
5729 echo "The XCB test failed!"
5730 echo " You might need to install dependency packages."
5731 echo " See src/plugins/platforms/xcb/README."
5735 QMakeVar add DEFINES QT_NO_XCB
5739 # Detect libxkbcommon
5740 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5741 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5742 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5743 if [ "$CFG_WAYLAND" = "yes" ]; then
5744 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5745 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5747 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5748 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5750 if [ "$CFG_WAYLAND" = "yes" ]; then
5751 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5753 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5756 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5757 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5758 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5759 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5760 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5761 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5762 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5765 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5766 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5767 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5768 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5771 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
5772 QT_CONFIG="$QT_CONFIG coreservices"
5774 QMakeVar add DEFINES QT_NO_CORESERVICES
5777 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5778 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5779 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5780 echo "No QPA platform plugin enabled!"
5781 echo " If you really want to build without a QPA platform plugin you must pass"
5782 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5783 echo " cannot run GUI applications."
5793 if [ "$PLATFORM_QWS" = "yes" ]; then
5795 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5796 if [ "$CFG_GUI" = "no" ]; then
5797 if [ "$CFG_OPENGL" = "auto" ]; then
5800 if [ "$CFG_OPENGL" != "no" ]; then
5801 echo "OpenGL enabled, but GUI disabled."
5802 echo " You might need to either enable the GUI or disable OpenGL"
5806 if [ "$CFG_OPENGL" = "yes" ]; then
5808 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
5811 elif [ "$CFG_OPENGL" = "es2" ]; then
5813 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5814 if [ $? != "0" ]; then
5815 echo "The OpenGL ES 2.0 functionality test failed!"
5816 echo " You might need to modify the include and library search paths by editing"
5817 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5818 echo " ${XQMAKESPEC}."
5822 elif [ "$CFG_OPENGL" = "desktop" ]; then
5823 # Desktop OpenGL support
5824 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5829 if [ "$PLATFORM_QWS" = "yes" ]; then
5832 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5833 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5834 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5835 if [ $? != "0" ]; then
5836 echo "The Ahi screen driver functionality test failed!"
5837 echo " You might need to modify the include and library search paths by editing"
5838 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5839 echo " ${XQMAKESPEC}."
5844 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5845 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5846 if [ $? != "0" ]; then
5847 echo "The SVGAlib screen driver functionality test failed!"
5848 echo " You might need to modify the include and library search paths by editing"
5849 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5850 echo " ${XQMAKESPEC}."
5855 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5856 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
5857 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5858 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
5859 elif directfb-config --version >/dev/null 2>&1; then
5860 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
5861 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
5864 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5865 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
5866 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
5867 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
5870 "$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
5871 if [ $? != "0" ]; then
5872 echo "The DirectFB screen driver functionality test failed!"
5873 echo " You might need to modify the include and library search paths by editing"
5874 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5875 echo " ${XQMAKESPEC}."
5883 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5884 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5885 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5886 if [ $? != "0" ]; then
5887 echo "The tslib functionality test failed!"
5888 echo " You might need to modify the include and library search paths by editing"
5889 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5890 echo " ${XQMAKESPEC}."
5899 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
5900 if [ $? != "0" ]; then
5901 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
5908 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
5909 if [ "$CFG_EGL" != "no" ]; then
5910 # detect EGL support
5911 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
5912 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5917 if [ "$EGL_VARIANT" = "none" ]; then
5918 if [ "$CFG_EGL" = "yes" ]; then
5919 echo "The EGL functionality test failed!"
5920 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5921 echo " You might need to modify the include and library search paths by editing"
5922 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5923 echo " ${XQMAKESPEC}."
5927 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5928 if [ "$CFG_OPENGL" = "es2" ]; then
5935 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5938 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
5939 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5940 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5941 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
5942 CFG_LIBFREETYPE=system
5948 if [ "$CFG_ENDIAN" = "auto" ]; then
5949 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5950 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5951 elif [ "$BUILD_ON_MAC" = "yes" ]; then
5954 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
5956 if [ "$F" -eq 0 ]; then
5957 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5958 elif [ "$F" -eq 1 ]; then
5959 CFG_ENDIAN="Q_BIG_ENDIAN"
5962 echo "The target system byte order could not be detected!"
5963 echo "Turn on verbose messaging (-v) to see the final report."
5964 echo "You can use the -little-endian or -big-endian switch to"
5965 echo "$0 to continue."
5971 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5972 if [ "$BUILD_ON_MAC" = "yes" ]; then
5975 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5977 if [ "$F" -eq 0 ]; then
5978 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5979 elif [ "$F" -eq 1 ]; then
5980 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5983 echo "The host system byte order could not be detected!"
5984 echo "Turn on verbose messaging (-v) to see the final report."
5985 echo "You can use the -host-little-endian or -host-big-endian switch to"
5986 echo "$0 to continue."
5992 if [ "$CFG_ARMFPA" != "auto" ]; then
5993 if [ "$CFG_ARMFPA" = "yes" ]; then
5994 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5995 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5997 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6000 CFG_DOUBLEFORMAT="normal"
6005 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6006 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6007 CFG_DOUBLEFORMAT=normal
6009 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6011 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6012 CFG_DOUBLEFORMAT=normal
6013 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6014 CFG_DOUBLEFORMAT=normal
6015 elif [ "$F" -eq 10 ]; then
6016 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6017 elif [ "$F" -eq 11 ]; then
6018 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6019 elif [ "$F" -eq 12 ]; then
6020 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6022 elif [ "$F" -eq 13 ]; then
6023 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6027 echo "The system floating point format could not be detected."
6028 echo "This may cause data to be generated in a wrong format"
6029 echo "Turn on verbose messaging (-v) to see the final report."
6030 # we do not fail on this since this is a new test, and if it fails,
6031 # the old behavior should be correct in most cases
6032 CFG_DOUBLEFORMAT=normal
6038 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6042 if [ "$CFG_STL" != "no" ]; then
6043 if [ "$HAVE_STL" = "yes" ]; then
6046 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6047 echo "STL support cannot be enabled due to functionality tests!"
6048 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6049 echo " If you believe this message is in error you may use the continue"
6050 echo " switch (-continue) to $0 to continue."
6058 # detect POSIX clock_gettime()
6059 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6060 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
6061 CFG_CLOCK_GETTIME=yes
6063 CFG_CLOCK_GETTIME=no
6067 # detect POSIX monotonic clocks
6068 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6069 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
6070 CFG_CLOCK_MONOTONIC=yes
6072 CFG_CLOCK_MONOTONIC=no
6074 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6075 CFG_CLOCK_MONOTONIC=no
6079 if [ "$CFG_MREMAP" = "auto" ]; then
6080 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6087 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6088 if [ "$CFG_GETADDRINFO" != "no" ]; then
6089 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6092 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6093 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6094 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6095 echo " If you believe this message is in error you may use the continue"
6096 echo " switch (-continue) to $0 to continue."
6104 # find if the platform provides inotify
6105 if [ "$CFG_INOTIFY" != "no" ]; then
6106 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6109 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6110 echo "inotify support cannot be enabled due to functionality tests!"
6111 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6112 echo " If you believe this message is in error you may use the continue"
6113 echo " switch (-continue) to $0 to continue."
6121 # find if the platform provides if_nametoindex (ipv6 interface name support)
6122 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6123 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
6126 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6127 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6128 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6129 echo " If you believe this message is in error you may use the continue"
6130 echo " switch (-continue) to $0 to continue."
6138 # find if the platform provides getifaddrs (network interface enumeration)
6139 if [ "$CFG_GETIFADDRS" != "no" ]; then
6140 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6143 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6144 echo "getifaddrs support cannot be enabled due to functionality tests!"
6145 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6146 echo " If you believe this message is in error you may use the continue"
6147 echo " switch (-continue) to $0 to continue."
6156 if [ "$CFG_OPENSSL" != "no" ]; then
6157 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
6158 if [ "$CFG_OPENSSL" = "auto" ]; then
6162 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6163 echo "OpenSSL support cannot be enabled due to functionality tests!"
6164 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6165 echo " If you believe this message is in error you may use the continue"
6166 echo " switch (-continue) to $0 to continue."
6175 if [ "$CFG_PCRE" != "qt" ]; then
6176 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
6179 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6180 echo "PCRE support cannot be enabled due to functionality tests!"
6181 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6182 echo " If you believe this message is in error you may use the continue"
6183 echo " switch (-continue) to $0 to continue."
6191 # detect OpenVG support
6192 if [ "$CFG_OPENVG" != "no" ]; then
6193 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
6194 if [ "$CFG_OPENVG" = "auto" ]; then
6197 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
6198 if [ "$CFG_OPENVG" = "auto" ]; then
6201 CFG_OPENVG_ON_OPENGL=yes
6202 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
6203 if [ "$CFG_OPENVG" = "auto" ]; then
6206 CFG_OPENVG_LC_INCLUDES=yes
6207 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
6208 if [ "$CFG_OPENVG" = "auto" ]; then
6211 CFG_OPENVG_LC_INCLUDES=yes
6212 CFG_OPENVG_ON_OPENGL=yes
6214 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6215 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6216 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6217 echo " If you believe this message is in error you may use the continue"
6218 echo " switch (-continue) to $0 to continue."
6224 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
6225 CFG_OPENVG_SHIVA=yes
6229 if [ "$CFG_ALSA" = "auto" ]; then
6230 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6237 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6238 if [ "$CFG_ARCH" = "arm" ]; then
6239 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6240 if [ $? != "0" ]; then
6241 CFG_JAVASCRIPTCORE_JIT=no
6244 case "$XPLATFORM" in
6246 CFG_JAVASCRIPTCORE_JIT=no
6252 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6253 QMakeVar set JAVASCRIPTCORE_JIT yes
6254 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6255 QMakeVar set JAVASCRIPTCORE_JIT no
6258 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6259 CFG_AUDIO_BACKEND=yes
6262 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6263 echo "Warning: largefile support cannot be disabled for win32."
6267 #-------------------------------------------------------------------------------
6268 # ask for all that hasn't been auto-detected or specified in the arguments
6269 #-------------------------------------------------------------------------------
6271 ### fix this: user input should be validated in a loop
6272 if [ "$PLATFORM_QWS" = "yes" ]; then
6273 PROMPT_FOR_DEPTHS="yes"
6275 PROMPT_FOR_DEPTHS="no"
6277 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6279 echo "Choose pixel-depths to support:"
6281 echo " 1. 1bpp, black/white"
6282 echo " 4. 4bpp, grayscale"
6283 echo " 8. 8bpp, paletted"
6284 echo " 12. 12bpp, rgb 4-4-4"
6285 echo " 15. 15bpp, rgb 5-5-5"
6286 echo " 16. 16bpp, rgb 5-6-5"
6287 echo " 18. 18bpp, rgb 6-6-6"
6288 echo " 24. 24bpp, rgb 8-8-8"
6289 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6290 echo " all. All supported depths"
6292 echo "Your choices (default 8,16,32):"
6294 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6295 CFG_QWS_DEPTHS=8,16,32
6298 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6299 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6300 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6302 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6304 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6305 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6310 # enable dwarf2 support on Mac
6311 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6312 QT_CONFIG="$QT_CONFIG dwarf2"
6315 # Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
6316 if [ "$BUILD_ON_MAC" = "yes" ]; then
6317 DEFAULT_ARCH="$CFG_MAC_ARCHS"
6318 if [ -z "$DEFAULT_ARCH" ]; then
6319 case `file "${outpath}/bin/qmake"` in
6327 # unsupported/unknown
6331 if [ -n "$DEFAULT_ARCH" ]; then
6332 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
6333 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
6334 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
6335 # Make the application arch follow the Qt arch for single arch builds.
6336 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
6337 [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
6342 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6343 QT_CONFIG="$QT_CONFIG phonon-backend"
6346 # disable accessibility
6347 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6348 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6350 QT_CONFIG="$QT_CONFIG accessibility"
6353 # egl stuff does not belong in lighthouse, but rather in plugins
6354 if [ "$PLATFORM_QPA" = "yes" ]; then
6359 if [ "$CFG_EGL" = "no" ]; then
6360 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6362 QT_CONFIG="$QT_CONFIG egl"
6363 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6364 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6369 if [ "$CFG_OPENVG" = "no" ]; then
6370 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6372 QT_CONFIG="$QT_CONFIG openvg"
6373 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6374 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6376 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6377 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6379 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6380 QT_CONFIG="$QT_CONFIG shivavg"
6381 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6386 if [ "$CFG_OPENGL" = "no" ]; then
6387 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6389 QT_CONFIG="$QT_CONFIG opengl"
6392 if [ "$CFG_OPENGL" = "es2" ]; then
6393 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6396 if [ "$CFG_OPENGL" = "es2" ]; then
6397 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6398 QT_CONFIG="$QT_CONFIG opengles2"
6401 # safe execution environment
6402 if [ "$CFG_SXE" != "no" ]; then
6403 QT_CONFIG="$QT_CONFIG sxe"
6406 # build up the variables for output
6407 if [ "$CFG_DEBUG" = "yes" ]; then
6408 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6409 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6410 elif [ "$CFG_DEBUG" = "no" ]; then
6411 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6412 QMAKE_CONFIG="$QMAKE_CONFIG release"
6414 if [ "$CFG_SHARED" = "yes" ]; then
6415 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6416 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6417 elif [ "$CFG_SHARED" = "no" ]; then
6418 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6419 QMAKE_CONFIG="$QMAKE_CONFIG static"
6421 if [ "$PLATFORM_QWS" = "yes" ]; then
6422 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6423 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6424 QT_CONFIG="$QT_CONFIG embedded"
6425 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6427 if [ "$PLATFORM_QPA" = "yes" ]; then
6428 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6429 QT_CONFIG="$QT_CONFIG qpa"
6430 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6431 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6434 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6435 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6436 QT_CONFIG="$QT_CONFIG nacl pepper"
6437 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6440 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6441 # Do not set this here for Windows. Let qmake do it so
6442 # debug and release precompiled headers are kept separate.
6443 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6445 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6446 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6447 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6448 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6449 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6450 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6452 if [ "$CFG_STL" = "no" ]; then
6453 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6455 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6457 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6458 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6460 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6461 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6462 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6463 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6464 QMakeVar add QMAKE_CFLAGS -g
6465 QMakeVar add QMAKE_CXXFLAGS -g
6466 QT_CONFIG="$QT_CONFIG separate_debug_info"
6468 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6469 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6471 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6472 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6473 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6474 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6475 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6476 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6477 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6478 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6479 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6480 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6481 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6482 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6483 QT_CONFIG="$QT_CONFIG clock-gettime"
6485 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6486 QT_CONFIG="$QT_CONFIG clock-monotonic"
6488 if [ "$CFG_MREMAP" = "yes" ]; then
6489 QT_CONFIG="$QT_CONFIG mremap"
6491 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6492 QT_CONFIG="$QT_CONFIG getaddrinfo"
6494 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6495 QT_CONFIG="$QT_CONFIG ipv6ifname"
6497 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6498 QT_CONFIG="$QT_CONFIG getifaddrs"
6500 if [ "$CFG_INOTIFY" = "yes" ]; then
6501 QT_CONFIG="$QT_CONFIG inotify"
6503 if [ "$CFG_LIBJPEG" = "no" ]; then
6505 elif [ "$CFG_LIBJPEG" = "system" ]; then
6506 QT_CONFIG="$QT_CONFIG system-jpeg"
6508 if [ "$CFG_JPEG" = "no" ]; then
6509 QT_CONFIG="$QT_CONFIG no-jpeg"
6510 elif [ "$CFG_JPEG" = "yes" ]; then
6511 QT_CONFIG="$QT_CONFIG jpeg"
6513 if [ "$CFG_LIBPNG" = "no" ]; then
6516 if [ "$CFG_LIBPNG" = "system" ]; then
6517 QT_CONFIG="$QT_CONFIG system-png"
6519 if [ "$CFG_PNG" = "no" ]; then
6520 QT_CONFIG="$QT_CONFIG no-png"
6521 elif [ "$CFG_PNG" = "yes" ]; then
6522 QT_CONFIG="$QT_CONFIG png"
6524 if [ "$CFG_GIF" = "no" ]; then
6525 QT_CONFIG="$QT_CONFIG no-gif"
6526 elif [ "$CFG_GIF" = "yes" ]; then
6527 QT_CONFIG="$QT_CONFIG gif"
6529 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6530 QT_CONFIG="$QT_CONFIG no-freetype"
6531 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6532 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6533 QT_CONFIG="$QT_CONFIG system-freetype"
6535 QT_CONFIG="$QT_CONFIG freetype"
6537 if [ "$CFG_GUI" = "auto" ]; then
6540 if [ "$CFG_GUI" = "no" ]; then
6541 QT_CONFIG="$QT_CONFIG no-gui"
6543 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6547 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6548 #On Mac we implicitly link against libz, so we
6549 #never use the 3rdparty stuff.
6550 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6552 if [ "$CFG_ZLIB" = "yes" ]; then
6553 QT_CONFIG="$QT_CONFIG zlib"
6554 elif [ "$CFG_ZLIB" = "system" ]; then
6555 QT_CONFIG="$QT_CONFIG system-zlib"
6558 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6559 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6560 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6561 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6562 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6563 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6564 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6565 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6566 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6567 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6568 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6569 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6570 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6571 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6572 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6574 if [ "$PLATFORM_X11" = "yes" ]; then
6575 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6577 # for some reason, the following libraries are not always built shared,
6578 # so *every* program/lib (including Qt) has to link against them
6579 if [ "$CFG_XSHAPE" = "yes" ]; then
6580 QT_CONFIG="$QT_CONFIG xshape"
6582 if [ "$CFG_XVIDEO" = "yes" ]; then
6583 QT_CONFIG="$QT_CONFIG xvideo"
6585 if [ "$CFG_XSYNC" = "yes" ]; then
6586 QT_CONFIG="$QT_CONFIG xsync"
6588 if [ "$CFG_XINERAMA" = "yes" ]; then
6589 QT_CONFIG="$QT_CONFIG xinerama"
6590 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6592 if [ "$CFG_XCURSOR" = "yes" ]; then
6593 QT_CONFIG="$QT_CONFIG xcursor"
6594 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6596 if [ "$CFG_XFIXES" = "yes" ]; then
6597 QT_CONFIG="$QT_CONFIG xfixes"
6598 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6600 if [ "$CFG_XRANDR" = "yes" ]; then
6601 QT_CONFIG="$QT_CONFIG xrandr"
6602 if [ "$CFG_XRENDER" != "yes" ]; then
6603 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6604 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6606 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6609 if [ "$CFG_XRENDER" = "yes" ]; then
6610 QT_CONFIG="$QT_CONFIG xrender"
6611 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6613 if [ "$CFG_MITSHM" = "yes" ]; then
6614 QT_CONFIG="$QT_CONFIG mitshm"
6616 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6617 QT_CONFIG="$QT_CONFIG fontconfig"
6619 if [ "$CFG_XINPUT" = "yes" ]; then
6620 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6622 if [ "$CFG_XINPUT" = "yes" ]; then
6623 QT_CONFIG="$QT_CONFIG xinput tablet"
6625 if [ "$CFG_XKB" = "yes" ]; then
6626 QT_CONFIG="$QT_CONFIG xkb"
6630 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6631 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6632 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6634 if [ "$PLATFORM_MAC" = "yes" ]; then
6635 if [ "$CFG_RPATH" = "yes" ]; then
6636 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6638 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
6639 if [ -n "$RPATH_FLAGS" ]; then
6641 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6645 elif [ "$CFG_RPATH" = "yes" ]; then
6646 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6650 if [ "$CFG_RPATH" = "yes" ]; then
6651 # set the default rpath to the library installation directory
6652 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6654 if [ -n "$RPATH_FLAGS" ]; then
6655 # add the user defined rpaths
6656 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6660 if [ '!' -z "$I_FLAGS" ]; then
6661 # add the user define include paths
6662 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6663 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6666 if [ '!' -z "$W_FLAGS" ]; then
6667 # add the user defined warning flags
6668 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6669 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6670 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6673 # turn off exceptions for the compilers that support it
6674 if [ "$PLATFORM_QWS" = "yes" ]; then
6675 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6676 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
6677 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6679 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6681 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6685 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6686 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6689 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6690 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6691 # Follow default behavior of configure.exe by overriding with "rtti".
6692 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6695 if [ "$CFG_ALSA" = "yes" ]; then
6696 QT_CONFIG="$QT_CONFIG alsa"
6699 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6700 QT_CONFIG="$QT_CONFIG pulseaudio"
6703 if [ "$CFG_COREWLAN" = "yes" ]; then
6704 QT_CONFIG="$QT_CONFIG corewlan"
6707 if [ "$CFG_ICU" = "yes" ]; then
6708 QT_CONFIG="$QT_CONFIG icu"
6711 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6712 QT_CONFIG="$QT_CONFIG force_asserts"
6715 if [ "$CFG_PCRE" = "qt" ]; then
6716 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6720 # Some Qt modules are too advanced in C++ for some old compilers
6721 # Detect here the platforms where they are known to work.
6723 # See Qt documentation for more information on which features are
6724 # supported and on which compilers.
6726 canBuildQtConcurrent="yes"
6727 canUseV8Snapshot="yes"
6729 case "$XPLATFORM" in
6731 # PA-RISC's assembly is too limited
6732 # gcc 3.4 on that platform can't build QtXmlPatterns
6733 # the assembly it generates cannot be compiled
6735 # Check gcc's version
6736 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6740 canBuildQtXmlPatterns="no"
6744 canBuildQtXmlPatterns="no"
6748 unsupported/vxworks-*-g++*)
6751 unsupported/vxworks-*-dcc*)
6753 canBuildQtXmlPatterns="no"
6756 # Check gcc's version
6757 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6765 canBuildQtXmlPatterns="no"
6770 # Check the compiler version
6771 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6774 canBuildQtXmlPatterns="no"
6775 canBuildQtConcurrent="no"
6779 canBuildQtConcurrent="no"
6785 canBuildQtXmlPatterns="no"
6786 canBuildQtConcurrent="no"
6792 # Get the xlC version
6793 cat > xlcver.c <<EOF
6797 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6802 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6803 xlcver=`./xlcver 2>/dev/null`
6806 if [ "$OPT_VERBOSE" = "yes" ]; then
6807 if [ -n "$xlcver" ]; then
6808 echo Found IBM xlC version: $xlcver.
6810 echo Could not determine IBM xlC version, assuming oldest supported.
6817 canBuildQtXmlPatterns="no"
6818 canBuildQtConcurrent="no"
6822 canBuildQtConcurrent="no"
6828 canBuildQtConcurrent="no"
6832 if [ "$CFG_GUI" = "no" ]; then
6833 # WebKit requires QtGui
6837 if [ "$CFG_SHARED" = "no" ]; then
6839 echo "WARNING: Using static linking will disable the WebKit module."
6844 CFG_CONCURRENT="yes"
6845 if [ "$canBuildQtConcurrent" = "no" ]; then
6846 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6849 QT_CONFIG="$QT_CONFIG concurrent"
6853 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6854 QT_CONFIG="$QT_CONFIG audio-backend"
6858 if [ "$CFG_WEBKIT" = "debug" ]; then
6859 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6863 QT_CONFIG="$QT_CONFIG v8"
6864 # Detect snapshot support
6865 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6866 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6869 *) canUseV8Snapshot="no"
6873 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6874 # QEMU crashes when building inside Scratchbox with an ARM target
6875 canUseV8Snapshot="no"
6878 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6879 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6881 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6882 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6885 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6886 QT_CONFIG="$QT_CONFIG v8snapshot"
6890 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6891 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6894 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6897 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6898 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6899 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6904 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6905 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6906 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6913 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6919 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6921 case "$COMPILER_VERSION" in
6923 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6924 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6925 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6928 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6929 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6930 QT_GCC_PATCH_VERSION=0
6940 #-------------------------------------------------------------------------------
6941 # part of configuration information goes into qconfig.h
6942 #-------------------------------------------------------------------------------
6944 case "$CFG_QCONFIG" in
6946 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6949 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6950 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6951 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6952 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6953 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6954 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6956 echo "#endif" >>"$tmpconfig"
6960 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6964 # define QT_EDITION $QT_EDITION
6967 /* Machine byte-order */
6968 #define Q_BIG_ENDIAN 4321
6969 #define Q_LITTLE_ENDIAN 1234
6972 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6973 if [ "$CFG_HOST_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_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6986 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6987 if [ "$CFG_ENDIAN" = "auto" ]; then
6988 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6989 #if defined(__BIG_ENDIAN__)
6990 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6991 #elif defined(__LITTLE_ENDIAN__)
6992 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6994 # error "Unable to determine byte order!"
6998 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
7000 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
7002 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
7003 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7004 /* Non-IEEE double format */
7005 #define Q_DOUBLE_LITTLE "01234567"
7006 #define Q_DOUBLE_BIG "76543210"
7007 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
7008 #define Q_DOUBLE_BIG_SWAPPED "32107654"
7009 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
7012 if [ "$CFG_ARMFPA" = "yes" ]; then
7013 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
7014 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7015 #ifndef QT_BOOTSTRAPPED
7020 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7024 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7025 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7026 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7027 /* Machine Architecture */
7028 #ifndef QT_BOOTSTRAPPED
7029 # define QT_ARCH_${CFG_ARCH_STR}
7031 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7035 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7036 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7038 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7039 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7042 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7043 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7046 if [ "$BUILD_ON_MAC" = "yes" ]; then
7047 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7048 #if defined(__LP64__)
7049 # define QT_POINTER_SIZE 8
7051 # define QT_POINTER_SIZE 4
7055 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7056 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7059 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
7060 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
7061 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
7065 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7067 if [ "$CFG_DEV" = "yes" ]; then
7068 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7071 # Embedded compile time options
7072 if [ "$PLATFORM_QWS" = "yes" ]; then
7073 # Add QWS to config.h
7074 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7076 # Add excluded decorations to $QCONFIG_FLAGS
7077 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7078 for decor in $decors; do
7079 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7080 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7083 # Figure which embedded drivers which are turned off
7084 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7085 for ADRIVER in $CFG_GFX_ON; do
7086 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7089 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7090 # the um driver is currently not in the available list for external builds
7091 if [ "$CFG_DEV" = "no" ]; then
7092 CFG_KBD_OFF="$CFG_KBD_OFF um"
7094 for ADRIVER in $CFG_KBD_ON; do
7095 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7098 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7099 for ADRIVER in $CFG_MOUSE_ON; do
7100 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7103 for DRIVER in $CFG_GFX_OFF; do
7104 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7105 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7108 for DRIVER in $CFG_KBD_OFF; do
7109 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7110 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7113 for DRIVER in $CFG_MOUSE_OFF; do
7114 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7115 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7119 if [ "$PLATFORM_QPA" = "yes" ]; then
7120 # Add QPA to config.h
7121 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7124 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7125 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7128 # Add turned on SQL drivers
7129 for DRIVER in $CFG_SQL_AVAILABLE; do
7130 eval "VAL=\$CFG_SQL_$DRIVER"
7133 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7134 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7135 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7138 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7144 QMakeVar set sql-drivers "$SQL_DRIVERS"
7145 QMakeVar set sql-plugins "$SQL_PLUGINS"
7147 # Add other configuration options to the qconfig.h file
7148 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7149 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7150 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7151 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7152 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7153 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7154 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7156 # X11/Unix/Mac only configs
7157 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7158 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7159 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7160 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7161 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7162 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7163 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7164 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7165 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7166 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7167 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7168 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7169 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7170 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7171 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7173 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7174 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7175 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7176 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7177 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7178 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7179 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7180 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7181 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7182 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7183 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7184 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7185 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7187 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7188 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7189 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7190 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7191 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7192 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7193 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7194 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7196 # sort QCONFIG_FLAGS for neatness if we can
7197 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7198 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7200 if [ -n "$QCONFIG_FLAGS" ]; then
7201 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7202 #ifndef QT_BOOTSTRAPPED
7205 for cfg in $QCONFIG_FLAGS; do
7206 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7207 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7208 # figure out define logic, so we can output the correct
7209 # ifdefs to override the global defines in a project
7211 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7212 # QT_NO_option can be forcefully turned on by QT_option
7213 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7214 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7215 # QT_option can be forcefully turned off by QT_NO_option
7216 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7219 if [ -z $cfgdNeg ]; then
7220 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7227 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7228 #if defined($cfgd) && defined($cfgdNeg)
7230 #elif !defined($cfgd) && !defined($cfgdNeg)
7237 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7238 #endif // QT_BOOTSTRAPPED
7243 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7244 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7245 #define QT_VISIBILITY_AVAILABLE
7250 if [ -n "$QT_LIBINFIX" ]; then
7251 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7252 #define QT_LIBINFIX "$QT_LIBINFIX"
7257 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7258 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7259 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7261 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7262 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7263 chmod -w "$outpath/src/corelib/global/qconfig.h"
7264 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7265 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7269 #-------------------------------------------------------------------------------
7270 # save configuration into qconfig.pri
7271 #-------------------------------------------------------------------------------
7272 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7273 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7274 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7275 if [ "$CFG_DEBUG" = "yes" ]; then
7276 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7277 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7278 QT_CONFIG="$QT_CONFIG release"
7280 QT_CONFIG="$QT_CONFIG debug"
7281 elif [ "$CFG_DEBUG" = "no" ]; then
7282 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7283 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7284 QT_CONFIG="$QT_CONFIG debug"
7286 QT_CONFIG="$QT_CONFIG release"
7288 if [ "$CFG_STL" = "yes" ]; then
7289 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7291 if [ "$CFG_FRAMEWORK" = "no" ]; then
7292 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7294 QT_CONFIG="$QT_CONFIG qt_framework"
7295 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7297 if [ "$CFG_DEV" = "yes" ]; then
7298 QT_CONFIG="$QT_CONFIG private_tests"
7301 cat >>"$QTCONFIG.tmp" <<EOF
7303 CONFIG += $QTCONFIG_CONFIG
7305 QT_EDITION = $Edition
7306 QT_CONFIG += $QT_CONFIG
7309 QT_VERSION = $QT_VERSION
7310 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7311 QT_MINOR_VERSION = $QT_MINOR_VERSION
7312 QT_PATCH_VERSION = $QT_PATCH_VERSION
7315 QT_LIBINFIX = $QT_LIBINFIX
7316 QT_NAMESPACE = $QT_NAMESPACE
7319 if [ -n "$CFG_SYSROOT" ]; then
7320 echo "# sysroot" >>"$QTCONFIG.tmp"
7321 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7322 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7323 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7324 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7325 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7326 echo "}" >> "$QTCONFIG.tmp"
7327 echo >> "$QTCONFIG.tmp"
7329 if [ "$CFG_RPATH" = "yes" ]; then
7330 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7332 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7333 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7334 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7335 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7338 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7339 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7340 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7343 # replace qconfig.pri if it differs from the newly created temp file
7344 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7345 rm -f "$QTCONFIG.tmp"
7347 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7350 #-------------------------------------------------------------------------------
7351 # save configuration into qmodule.pri
7352 #-------------------------------------------------------------------------------
7353 QTMODULE="$outpath/mkspecs/qmodule.pri"
7355 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7357 # Ensure we can link to uninistalled libraries
7358 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7359 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7361 if [ -n "$QT_CFLAGS_PSQL" ]; then
7362 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7364 if [ -n "$QT_LFLAGS_PSQL" ]; then
7365 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7367 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7368 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7370 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7371 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7373 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7374 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7376 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7377 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7379 if [ -n "$QT_LFLAGS_ODBC" ]; then
7380 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7382 if [ -n "$QT_LFLAGS_TDS" ]; then
7383 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
7386 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7387 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
7390 #dump in the OPENSSL_LIBS info
7391 if [ '!' -z "$OPENSSL_LIBS" ]; then
7392 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
7393 elif [ "$CFG_OPENSSL" = "linked" ]; then
7394 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
7397 #dump in the SDK info
7398 if [ '!' -z "$CFG_SDK" ]; then
7399 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
7403 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
7404 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7406 # replace qmodule.pri if it differs from the newly created temp file
7407 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
7408 rm -f "$QTMODULE.tmp"
7410 mv -f "$QTMODULE.tmp" "$QTMODULE"
7413 #-------------------------------------------------------------------------------
7414 # save configuration into .qmake.cache
7415 #-------------------------------------------------------------------------------
7417 CACHEFILE="$outpath/.qmake.cache"
7418 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7419 cat >>"$CACHEFILE.tmp" <<EOF
7421 QT_SOURCE_TREE = \$\$quote($relpath)
7422 QT_BUILD_TREE = \$\$quote($outpath)
7423 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7425 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7426 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7427 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7428 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7429 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7430 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7432 include(\$\$PWD/mkspecs/qmodule.pri)
7433 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
7434 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7435 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7439 #dump the qmake spec
7440 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7441 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7443 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7448 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7449 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7450 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7451 # don't need to worry about generated files
7452 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7453 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7455 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7457 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7458 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7461 # replace .qmake.cache if it differs from the newly created temp file
7462 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7463 rm -f "$CACHEFILE.tmp"
7465 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7468 #-------------------------------------------------------------------------------
7469 # give feedback on configuration
7470 #-------------------------------------------------------------------------------
7474 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7477 This target is using the GNU C++ compiler ($PLATFORM).
7479 Recent versions of this compiler automatically include code for
7480 exceptions, which increase both the size of the Qt libraries and
7481 the amount of memory taken by your applications.
7483 You may choose to re-run `basename $0` with the -no-exceptions
7484 option to compile Qt without exceptions. This is completely binary
7485 compatible, and existing applications will continue to work.
7493 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7496 This target is using the MIPSpro C++ compiler ($PLATFORM).
7498 You may choose to re-run `basename $0` with the -no-exceptions
7499 option to compile Qt without exceptions. This will make the
7500 size of the Qt library smaller and reduce the amount of memory
7501 taken by your applications.
7513 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7514 echo "Build type: $PLATFORM"
7516 echo "Building on: $PLATFORM"
7517 echo "Building for: $XPLATFORM"
7520 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7521 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7523 echo "Architecture: $CFG_ARCH"
7526 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7527 echo "Host architecture: $CFG_HOST_ARCH"
7530 if [ -n "$PLATFORM_NOTES" ]; then
7531 echo "Platform notes:"
7532 echo "$PLATFORM_NOTES"
7537 if [ "$OPT_VERBOSE" = "yes" ]; then
7538 echo $ECHO_N "qmake vars .......... $ECHO_C"
7539 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7540 echo "qmake switches ......... $QMAKE_SWITCHES"
7543 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7544 echo "Build .................. $CFG_BUILD_PARTS"
7545 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7546 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7547 echo "Debug .................. yes (combined)"
7548 if [ "$CFG_DEBUG" = "yes" ]; then
7549 echo "Default Link ........... debug"
7551 echo "Default Link ........... release"
7554 echo "Debug .................. $CFG_DEBUG"
7556 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7557 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7558 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7559 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7560 echo "QtGui module ........... $CFG_GUI"
7561 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7562 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7564 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7566 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7567 echo "STL support ............ $CFG_STL"
7568 echo "PCH support ............ $CFG_PRECOMPILE"
7569 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7570 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7571 echo "AVX..................... ${CFG_AVX}"
7572 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7573 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7574 echo "NEON support ........... ${CFG_NEON}"
7576 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
7577 echo "getaddrinfo support .... $CFG_GETADDRINFO"
7578 echo "getifaddrs support ..... $CFG_GETIFADDRS"
7579 echo "Accessibility .......... $CFG_ACCESSIBILITY"
7580 echo "NIS support ............ $CFG_NIS"
7581 echo "CUPS support ........... $CFG_CUPS"
7582 echo "Iconv support .......... $CFG_ICONV"
7583 echo "Glib support ........... $CFG_GLIB"
7584 echo "GStreamer support ...... $CFG_GSTREAMER"
7585 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7586 echo "Large File support ..... $CFG_LARGEFILE"
7587 echo "GIF support ............ $CFG_GIF"
7588 if [ "$CFG_JPEG" = "no" ]; then
7589 echo "JPEG support ........... $CFG_JPEG"
7591 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
7593 if [ "$CFG_PNG" = "no" ]; then
7594 echo "PNG support ............ $CFG_PNG"
7596 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
7598 echo "zlib support ........... $CFG_ZLIB"
7599 echo "Session management ..... $CFG_SM"
7600 if [ "$PLATFORM_QWS" = "yes" ]; then
7601 echo "Embedded support ....... $CFG_EMBEDDED"
7602 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7603 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7605 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
7607 # Normalize the decoration output first
7608 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
7609 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
7610 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
7611 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
7612 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
7613 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
7614 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
7615 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
7616 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
7617 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
7618 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
7619 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
7620 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
7621 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
7622 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
7623 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
7625 if [ "$CFG_OPENGL" = "desktop" ]; then
7626 echo "OpenGL support ......... yes (Desktop OpenGL)"
7627 elif [ "$CFG_OPENGL" = "es2" ]; then
7628 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
7630 echo "OpenGL support ......... no"
7632 if [ "$CFG_EGL" != "no" ]; then
7633 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7634 echo "EGL support ............ yes <GLES/egl.h>"
7636 echo "EGL support ............ yes <EGL/egl.h>"
7639 if [ "$CFG_OPENVG" ]; then
7640 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7641 echo "OpenVG support ......... ShivaVG"
7643 echo "OpenVG support ......... $CFG_OPENVG"
7646 if [ "$PLATFORM_X11" = "yes" ]; then
7647 echo "NAS sound support ...... $CFG_NAS"
7648 echo "XShape support ......... $CFG_XSHAPE"
7649 echo "XVideo support ......... $CFG_XVIDEO"
7650 echo "XSync support .......... $CFG_XSYNC"
7651 echo "Xinerama support ....... $CFG_XINERAMA"
7652 echo "Xcursor support ........ $CFG_XCURSOR"
7653 echo "Xfixes support ......... $CFG_XFIXES"
7654 echo "Xrandr support ......... $CFG_XRANDR"
7655 echo "Xi support ............. $CFG_XINPUT"
7656 echo "MIT-SHM support ........ $CFG_MITSHM"
7657 echo "FontConfig support ..... $CFG_FONTCONFIG"
7658 echo "XKB Support ............ $CFG_XKB"
7659 echo "immodule support ....... $CFG_IM"
7660 echo "GTK theme support ...... $CFG_QGTKSTYLE"
7662 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
7663 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
7664 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
7665 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
7666 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
7667 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
7668 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
7669 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
7670 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
7673 if [ "$CFG_OPENSSL" = "yes" ]; then
7674 OPENSSL_LINKAGE="(run-time)"
7675 elif [ "$CFG_OPENSSL" = "linked" ]; then
7676 OPENSSL_LINKAGE="(linked)"
7678 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
7679 echo "Alsa support ........... $CFG_ALSA"
7680 if [ "$BUILD_ON_MAC" = "yes" ]; then
7681 echo "CoreWlan support ....... $CFG_COREWLAN"
7683 echo "libICU support ......... $CFG_ICU"
7684 echo "PCRE support ........... $CFG_PCRE"
7685 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7686 echo "Xcb support ............ limited (old version)"
7688 echo "Xcb support ............ $CFG_XCB"
7690 echo "Xrender support ........ $CFG_XRENDER"
7691 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7692 echo "XInput2 support ........ $CFG_XINPUT2"
7696 # complain about not being able to use dynamic plugins if we are using a static build
7697 if [ "$CFG_SHARED" = "no" ]; then
7699 echo "WARNING: Using static linking will disable the use of dynamically"
7700 echo "loaded plugins. Make sure to import all needed static plugins,"
7701 echo "or compile needed modules into the library."
7704 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7706 echo "NOTE: When linking against OpenSSL, you can override the default"
7707 echo "library names through OPENSSL_LIBS."
7709 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
7712 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7714 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
7715 echo "if you want a pure debug build."
7720 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7725 #-------------------------------------------------------------------------------
7726 # build makefiles based on the configuration
7727 #-------------------------------------------------------------------------------
7729 echo "Finding project files. Please wait..."
7730 if [ "$CFG_NOPROCESS" != "yes" ]; then
7731 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7732 if [ -f "${relpath}/qtbase.pro" ]; then
7733 mkfile="${outpath}/Makefile"
7734 [ -f "$mkfile" ] && chmod +w "$mkfile"
7735 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7739 # .projects -> projects to process
7740 # .projects.1 -> qt and moc
7741 # .projects.2 -> subdirs and libs
7742 # .projects.3 -> the rest
7743 rm -f .projects .projects.1 .projects.2 .projects.3
7745 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7746 if [ -z "$AWK" ]; then
7747 for p in `echo $QMAKE_PROJECTS`; do
7748 echo "$p" >> .projects
7751 cat >projects.awk <<EOF
7757 first = "./.projects.1.tmp"
7758 second = "./.projects.2.tmp"
7759 third = "./.projects.3.tmp"
7764 if ( ! target_file )
7766 print input_file >target_file
7771 input_file = FILENAME
7776 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7779 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7780 target_file = second
7785 matched_target == 0 && /^(TEMPLATE.*=)/ {
7786 if ( \$3 == "subdirs" )
7787 target_file = second
7788 else if ( \$3 == "lib" )
7794 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7795 if ( \$0 ~ /plugin/ )
7798 target_file = second
7803 if ( ! target_file )
7805 print input_file >>target_file
7812 for p in `echo $QMAKE_PROJECTS`; do
7813 echo "$p" >> .projects.all
7816 # if you get errors about the length of the command line to awk, change the -l arg
7818 split -l 100 .projects.all .projects.all.
7819 for p in .projects.all.*; do
7820 "$AWK" -f projects.awk `cat $p`
7821 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7822 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7823 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7824 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7826 rm -f .projects.all* projects.awk
7828 [ -f .projects.1 ] && cat .projects.1 >>.projects
7829 [ -f .projects.2 ] && cat .projects.2 >>.projects
7830 rm -f .projects.1 .projects.2
7831 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7832 cat .projects.3 >>.projects
7836 # don't sort Qt and MOC in with the other project files
7837 # also work around a segfaulting uniq(1)
7838 if [ -f .sorted.projects.2 ]; then
7839 sort .sorted.projects.2 > .sorted.projects.2.new
7840 mv -f .sorted.projects.2.new .sorted.projects.2
7841 cat .sorted.projects.2 >> .sorted.projects.1
7843 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7844 rm -f .sorted.projects.2 .sorted.projects.1
7848 if [ -f .projects ]; then
7849 uniq .projects >.tmp
7850 mv -f .tmp .projects
7851 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7853 if [ -f .projects.3 ]; then
7854 uniq .projects.3 >.tmp
7855 mv -f .tmp .projects.3
7856 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7858 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7862 for part in $CFG_BUILD_PARTS; do
7864 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7865 libs) PART_ROOTS="$PART_ROOTS src" ;;
7866 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7867 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7872 if [ "$CFG_DEV" = "yes" ]; then
7873 PART_ROOTS="$PART_ROOTS tests"
7876 echo "Creating makefiles. Please wait..."
7877 for file in .projects .projects.3; do
7878 [ '!' -f "$file" ] && continue
7879 for a in `cat $file`; do
7881 for r in $PART_ROOTS; do
7882 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7887 [ "$IN_ROOT" = "no" ] && continue
7890 *winmain/winmain.pro)
7891 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7895 */qmake/qmake.pro) continue ;;
7896 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7897 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7903 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7904 test -d "$dir" || mkdir -p "$dir"
7905 OUTDIR="$outpath/$dir"
7906 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7907 # fast configure - the makefile exists, skip it
7908 # since the makefile exists, it was generated by qmake, which means we
7909 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7911 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7914 QMAKE_SPEC_ARGS="-spec $SPEC"
7915 echo $ECHO_N " for $a$ECHO_C"
7917 QMAKE="$outpath/bin/qmake"
7918 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7919 if [ "$file" = ".projects.3" ]; then
7922 cat >"${OUTDIR}/Makefile" <<EOF
7923 # ${OUTDIR}/Makefile: generated by configure
7925 # WARNING: This makefile will be replaced with a real makefile.
7926 # All changes made to this file will be lost.
7928 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7930 cat >>"${OUTDIR}/Makefile" <<EOF
7932 all clean install qmake first Makefile: FORCE
7933 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7941 if [ "$OPT_VERBOSE" = "yes" ]; then
7942 echo " (`basename $SPEC`)"
7943 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7948 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7949 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7953 rm -f .projects .projects.3
7955 #-------------------------------------------------------------------------------
7956 # check for platforms that we don't yet know about
7957 #-------------------------------------------------------------------------------
7958 if [ "$CFG_ARCH" = "generic" ]; then
7961 NOTICE: Atomic operations are not yet supported for this
7964 Qt will use the 'generic' architecture instead, which uses a
7965 single pthread_mutex_t to protect all atomic operations. This
7966 implementation is the slow (but safe) fallback implementation
7967 for architectures Qt does not yet support.
7971 #-------------------------------------------------------------------------------
7972 # check if the user passed the -no-zlib option, which is no longer supported
7973 #-------------------------------------------------------------------------------
7974 if [ -n "$ZLIB_FORCED" ]; then
7975 which_zlib="supplied"
7976 if [ "$CFG_ZLIB" = "system" ]; then
7982 NOTICE: The -no-zlib option was supplied but is no longer
7985 Qt now requires zlib support in all builds, so the -no-zlib
7986 option was ignored. Qt will be built using the $which_zlib
7991 #-------------------------------------------------------------------------------
7992 # finally save the executed command to another script
7993 #-------------------------------------------------------------------------------
7994 if [ `basename $0` != "config.status" ]; then
7995 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7997 # add the system variables
7998 for varname in $SYSTEM_VARIABLES; do
8000 'if [ -n "\$'${varname}'" ]; then
8001 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8006 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8008 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8009 echo "#!/bin/sh" > "$outpath/config.status"
8010 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8011 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8012 echo "else" >> "$outpath/config.status"
8013 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8014 echo "fi" >> "$outpath/config.status"
8015 chmod +x "$outpath/config.status"
8018 if [ -n "$RPATH_MESSAGE" ]; then
8020 echo "$RPATH_MESSAGE"
8023 MAKE=`basename "$MAKE"`
8025 echo Qt is now configured for building. Just run \'$MAKE\'.
8026 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8027 echo Once everything is built, Qt is installed.
8028 echo You should not run \'$MAKE install\'.
8030 echo Once everything is built, you must run \'$MAKE install\'.
8031 echo Qt will be installed into $QT_INSTALL_PREFIX
8034 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.