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`
3059 TEST_COMPILER="$CXX"
3061 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
3062 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
3063 if [ -z "$TEST_COMPILER" ]; then
3064 echo "ERROR: Cannot set the compiler for the configuration tests"
3069 if [ "$CFG_EMBEDDED" = "nacl" ]; then
3070 TEST_COMPILER="nacl-gcc"
3074 if [ -n "$CFG_SYSROOT" ]; then
3075 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
3076 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
3077 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
3079 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
3083 export SYSROOT_FLAG # used by config.tests/unix/compile.test
3085 # auto-detect precompiled header support
3086 if [ "$CFG_PRECOMPILE" = "auto" ]; then
3087 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3094 #auto-detect DWARF2 on the mac
3095 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
3096 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
3103 # don't autodetect support for separate debug info on objcopy when
3104 # cross-compiling as lots of toolchains seems to have problems with this
3105 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3106 CFG_SEPARATE_DEBUG_INFO="no"
3109 # auto-detect support for separate debug info in objcopy
3110 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
3111 TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3112 TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
3113 TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3114 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3115 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3116 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3117 CFG_SEPARATE_DEBUG_INFO=no
3121 # binutils on HP-UX is buggy; default to no.
3122 CFG_SEPARATE_DEBUG_INFO=no
3125 CFG_SEPARATE_DEBUG_INFO=yes
3131 # auto-detect -fvisibility support
3132 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3133 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3134 CFG_REDUCE_EXPORTS=no
3136 CFG_REDUCE_EXPORTS=yes
3140 # detect the availability of the -Bsymbolic-functions linker optimization
3141 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3142 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3143 CFG_REDUCE_RELOCATIONS=no
3145 CFG_REDUCE_RELOCATIONS=yes
3149 # auto-detect GNU make support
3150 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
3154 # If -opengl wasn't specified, don't try to auto-detect
3155 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3159 # find the default framework value
3160 if [ "$BUILD_ON_MAC" = "yes" ]; then
3161 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3162 CFG_FRAMEWORK="$CFG_SHARED"
3163 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3165 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3173 # x11 tests are done after qmake is built
3176 #setup the build parts
3177 if [ -z "$CFG_BUILD_PARTS" ]; then
3178 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
3180 # don't build tools by default when cross-compiling
3181 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3182 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3185 for nobuild in $CFG_NOBUILD_PARTS; do
3186 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3188 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
3190 # echo "WARNING: libs is a required part of the build."
3192 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3195 #-------------------------------------------------------------------------------
3196 # post process QT_INSTALL_* variables
3197 #-------------------------------------------------------------------------------
3199 if [ -z "$QT_INSTALL_PREFIX" ]; then
3200 if [ "$CFG_DEV" = "yes" ]; then
3201 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3203 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3206 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3208 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3209 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3210 if [ "$BUILD_ON_MAC" = "yes" ]; then
3211 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3214 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3217 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3219 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3220 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3221 if [ "$BUILD_ON_MAC" = "yes" ]; then
3222 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3227 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3230 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3232 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3233 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3234 if [ "$BUILD_ON_MAC" = "yes" ]; then
3235 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3236 QT_INSTALL_LIBS="/Libraries/Frameworks"
3240 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3242 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3244 if [ -z "$QT_INSTALL_BINS" ]; then #default
3245 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3246 if [ "$BUILD_ON_MAC" = "yes" ]; then
3247 QT_INSTALL_BINS="/Developer/Applications/Qt"
3250 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3252 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3254 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3255 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3256 if [ "$BUILD_ON_MAC" = "yes" ]; then
3257 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3260 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3262 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3264 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3265 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3266 if [ "$BUILD_ON_MAC" = "yes" ]; then
3267 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3270 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3272 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3274 if [ -z "$QT_INSTALL_DATA" ]; then #default
3275 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3277 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3279 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3280 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3282 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3284 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3285 if [ "$BUILD_ON_MAC" = "yes" ]; then
3286 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3288 QT_INSTALL_SETTINGS=/etc/xdg
3291 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3293 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3294 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3295 if [ "$BUILD_ON_MAC" = "yes" ]; then
3296 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3299 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3301 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3304 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3305 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3306 if [ "$BUILD_ON_MAC" = "yes" ]; then
3307 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3310 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3312 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3314 #-------------------------------------------------------------------------------
3315 # help - interactive parts of the script _after_ this section please
3316 #-------------------------------------------------------------------------------
3318 # next, emit a usage message if something failed.
3319 if [ "$OPT_HELP" = "yes" ]; then
3320 [ "x$ERROR" = "xyes" ] && echo
3321 if [ "$CFG_NIS" = "no" ]; then
3328 if [ "$CFG_CUPS" = "no" ]; then
3335 if [ "$CFG_ICONV" = "no" ]; then
3342 if [ "$CFG_LARGEFILE" = "no" ]; then
3349 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3356 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3364 if [ "$CFG_XCB" = "no" ]; then
3372 if [ "$CFG_WAYLAND" = "no" ]; then
3379 if [ "$CFG_XINPUT2" = "no" ]; then
3388 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3389 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3390 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3391 [-release] [-debug] [-debug-and-release]
3392 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3393 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3394 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3395 [-plugin-sql-<driver>] [-system-sqlite]
3396 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3397 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3398 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3399 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3400 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3401 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3402 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3403 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3404 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3405 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3406 [-no-audio-backend] [-audio-backend]
3407 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3408 [-no-optimized-qmake] [-optimized-qmake]
3409 [-no-openssl] [-openssl] [-openssl-linked]
3410 [-no-gtkstyle] [-gtkstyle]
3411 [-qt-pcre] [-system-pcre]
3412 [additional platform specific options (see below)]
3415 Installation options:
3417 -qpa ................ This will enable the QPA build.
3418 QPA is a window system agnostic implementation of Qt.
3420 These are optional, but you may specify install directories.
3422 -prefix <dir> ...... This will install everything relative to <dir>
3423 (default $QT_INSTALL_PREFIX)
3425 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3428 -hostprefix [dir] .. Tools and libraries needed when developing
3429 applications are installed in [dir]. If [dir] is
3430 not given, the current build directory will be used.
3435 * -prefix-install .... Force a sandboxed "local" installation of
3436 Qt. This will install into
3437 $QT_INSTALL_PREFIX, if this option is
3438 disabled then some platforms will attempt a
3439 "system" install by placing default values to
3440 be placed in a system location other than
3443 You may use these to separate different parts of the install:
3445 -bindir <dir> ......... Executables will be installed to <dir>
3446 (default PREFIX/bin)
3447 -libdir <dir> ......... Libraries will be installed to <dir>
3448 (default PREFIX/lib)
3449 -docdir <dir> ......... Documentation will be installed to <dir>
3450 (default PREFIX/doc)
3451 -headerdir <dir> ...... Headers will be installed to <dir>
3452 (default PREFIX/include)
3453 -plugindir <dir> ...... Plugins will be installed to <dir>
3454 (default PREFIX/plugins)
3455 -importdir <dir> ...... Imports for QML will be installed to <dir>
3456 (default PREFIX/imports)
3457 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3459 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3460 (default PREFIX/translations)
3461 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3462 (default PREFIX/etc/settings)
3463 -examplesdir <dir> .... Examples will be installed to <dir>
3464 (default PREFIX/examples)
3465 -testsdir <dir> ....... Tests will be installed to <dir>
3466 (default PREFIX/tests)
3470 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3471 that needs to be evaluated. If the evaluation succeeds, the feature is
3472 included. Here is a short explanation of each option:
3474 * -release ........... Compile and link Qt with debugging turned off.
3475 -debug ............. Compile and link Qt with debugging turned on.
3476 -debug-and-release . Compile and link two versions of Qt, with and without
3477 debugging turned on (Mac only).
3479 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3481 -opensource ........ Compile and link the Open-Source Edition of Qt.
3482 -commercial ........ Compile and link the Commercial Edition of Qt.
3485 * -shared ............ Create and use shared Qt libraries.
3486 -static ............ Create and use static Qt libraries.
3488 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3490 -fast .............. Configure Qt quickly by generating Makefiles only for
3491 library and subdirectory targets. All other Makefiles
3492 are created as wrappers, which will in turn run qmake.
3494 -no-largefile ...... Disables large file support.
3495 + -largefile ......... Enables Qt to access files larger than 4 GB.
3498 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3505 if [ "$CFG_DBUS" = "no" ]; then
3514 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3515 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3517 -no-accessibility .. Do not compile Accessibility support.
3518 * -accessibility ..... Compile Accessibility support.
3520 $SHN -no-stl ............ Do not compile STL support.
3521 $SHY -stl ............... Compile STL support.
3523 -no-sql-<driver> ... Disable SQL <driver> entirely.
3524 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3526 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3529 Possible values for <driver>:
3530 [ $CFG_SQL_AVAILABLE ]
3532 -system-sqlite ..... Use sqlite from the operating system.
3534 -no-phonon-backend.. Do not build the platform phonon plugin.
3535 + -phonon-backend..... Build the platform phonon plugin.
3537 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3538 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3540 -no-declarative-debug ..... Do not build the declarative debugging support.
3541 + -declarative-debug ....... Build the declarative debugging support.
3543 -platform target ... The operating system and compiler you are building
3546 See the README file for a list of supported
3547 operating systems and compilers.
3550 if [ "${PLATFORM_QWS}" != "yes" -a "${PLATFORM_QPA}" != "yes" ]; then
3552 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3553 raster - Software rasterizer
3554 opengl - Rendering via OpenGL, Experimental!
3555 openvg - Rendering via OpenVG, Experimental!
3562 -no-mmx ............ Do not compile with use of MMX instructions.
3563 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3564 -no-sse ............ Do not compile with use of SSE instructions.
3565 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3566 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3567 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3568 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3569 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3570 -no-avx ............ Do not compile with use of AVX instructions.
3571 -no-neon ........... Do not compile with use of NEON instructions.
3573 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3574 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3576 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3578 -D <string> ........ Add an explicit define to the preprocessor.
3579 -I <string> ........ Add an explicit include path.
3580 -L <string> ........ Add an explicit library path.
3582 -help, -h .......... Display this information.
3584 Third Party Libraries:
3586 -qt-zlib ........... Use the zlib bundled with Qt.
3587 + -system-zlib ....... Use zlib from the operating system.
3588 See http://www.gzip.org/zlib
3590 -no-gif ............ Do not compile GIF reading support.
3592 -no-libpng ......... Do not compile PNG support.
3593 -qt-libpng ......... Use the libpng bundled with Qt.
3594 + -system-libpng ..... Use libpng from the operating system.
3595 See http://www.libpng.org/pub/png
3597 -no-libjpeg ........ Do not compile JPEG support.
3598 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3599 + -system-libjpeg .... Use libjpeg from the operating system.
3600 See http://www.ijg.org
3602 -no-openssl ........ Do not compile support for OpenSSL.
3603 + -openssl ........... Enable run-time OpenSSL support.
3604 -openssl-linked .... Enabled linked OpenSSL support.
3606 -qt-pcre ........... Use the PCRE library bundled with Qt.
3607 + -system-pcre ....... Use the PCRE library from the operating system.
3611 -make <part> ....... Add part to the list of parts to be built at make time.
3612 ($QT_DEFAULT_BUILD_PARTS)
3613 -nomake <part> ..... Exclude part from the list of parts to be built.
3615 -R <string> ........ Add an explicit runtime library path to the Qt
3617 -l <string> ........ Add an explicit library.
3619 -no-rpath .......... Do not use the library install path as a runtime
3621 + -rpath ............. Link Qt libraries and executables using the library
3622 install path as a runtime library path. Equivalent
3623 to -R install_libpath
3625 -continue .......... Continue as far as possible if an error occurs.
3627 -verbose, -v ....... Print verbose information about each step of the
3630 -silent ............ Reduce the build output so that warnings and errors
3631 can be seen more easily.
3633 * -no-optimized-qmake ... Do not build qmake optimized.
3634 -optimized-qmake ...... Build qmake optimized.
3636 -no-gui ............ Don't build the Qt GUI library
3638 $NSN -no-nis ............ Do not compile NIS support.
3639 $NSY -nis ............... Compile NIS support.
3641 $CUN -no-cups ........... Do not compile CUPS support.
3642 $CUY -cups .............. Compile CUPS support.
3643 Requires cups/cups.h and libcups.so.2.
3645 $CIN -no-iconv .......... Do not compile support for iconv(3).
3646 $CIY -iconv ............. Compile support for iconv(3).
3648 $PHN -no-pch ............ Do not use precompiled header support.
3649 $PHY -pch ............... Use precompiled header support.
3651 $DBN -no-dbus ........... Do not compile the QtDBus module.
3652 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3653 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3655 -reduce-relocations ..... Reduce relocations in the libraries through extra
3656 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3657 experimental; needs GNU ld >= 2.18).
3659 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3663 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3664 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3671 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3679 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3683 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3684 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3686 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3687 $XCBY -xcb ............... Compile Xcb support.
3689 $XWN -no-wayland......... Do not compile Wayland support.
3690 $XWY -wayland .......... Compile Wayland support.
3696 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3700 $X2N -no-xinput2......... Do not compile XInput2 support.
3701 $X2Y -xinput2............ Compile XInput2 support.
3707 if [ "$PLATFORM_X11" = "yes" ]; then
3708 if [ "$CFG_SM" = "no" ]; then
3715 if [ "$CFG_XSHAPE" = "no" ]; then
3722 if [ "$CFG_XVIDEO" = "no" ]; then
3729 if [ "$CFG_XINERAMA" = "no" ]; then
3736 if [ "$CFG_FONTCONFIG" = "no" ]; then
3743 if [ "$CFG_XCURSOR" = "no" ]; then
3750 if [ "$CFG_XFIXES" = "no" ]; then
3757 if [ "$CFG_XRANDR" = "no" ]; then
3764 if [ "$CFG_XRENDER" = "no" ]; then
3771 if [ "$CFG_MITSHM" = "no" ]; then
3778 if [ "$CFG_XINPUT" = "no" ]; then
3785 if [ "$CFG_XKB" = "no" ]; then
3792 if [ "$CFG_IM" = "no" ]; then
3803 -no-gtkstyle ....... Do not build the GTK theme integration.
3804 + -gtkstyle .......... Build the GTK theme integration.
3806 * -no-nas-sound ...... Do not compile in NAS sound support.
3807 -system-nas-sound .. Use NAS libaudio from the operating system.
3808 See http://radscan.com/nas.html
3810 -egl ............... Use EGL instead of GLX to manage contexts.
3811 When building for desktop OpenGL, this option will
3812 make Qt use EGL to manage contexts rather than the
3813 GLX, which is the default. Note: For OpenGL ES, EGL
3816 -no-opengl ......... Do not support OpenGL.
3817 + -opengl <api> ...... Enable OpenGL support.
3818 With no parameter, this will auto-detect the "best"
3819 OpenGL API to use. If desktop OpenGL is available, it
3820 will be used. Use desktop or es2 for <api>
3821 to force the use of the Desktop OpenGL or
3822 OpenGL ES 2 APIs instead.
3824 -no-openvg ........ Do not support OpenVG.
3825 + -openvg ........... Enable OpenVG support.
3826 Requires EGL support, typically supplied by an OpenGL
3827 or other graphics implementation.
3829 $SMN -no-sm ............. Do not support X Session Management.
3830 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3832 $SHN -no-xshape ......... Do not compile XShape support.
3833 $SHY -xshape ............ Compile XShape support.
3834 Requires X11/extensions/shape.h.
3836 $XVN -no-xvideo ......... Do not compile XVideo support.
3837 $XVY -xvideo ............ Compile XVideo support.
3838 Requires X11/extensions/Xv.h & Xvlib.h.
3840 $SHN -no-xsync .......... Do not compile XSync support.
3841 $SHY -xsync ............. Compile XSync support.
3842 Requires X11/extensions/sync.h.
3844 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3845 $XAY -xinerama .......... Compile Xinerama support.
3846 Requires X11/extensions/Xinerama.h and libXinerama.
3847 By default, Xinerama support will be compiled if
3848 available and the shared libraries are dynamically
3851 $XCN -no-xcursor ........ Do not compile Xcursor support.
3852 $XCY -xcursor ........... Compile Xcursor support.
3853 Requires X11/Xcursor/Xcursor.h and libXcursor.
3854 By default, Xcursor support will be compiled if
3855 available and the shared libraries are dynamically
3858 $XFN -no-xfixes ......... Do not compile Xfixes support.
3859 $XFY -xfixes ............ Compile Xfixes support.
3860 Requires X11/extensions/Xfixes.h and libXfixes.
3861 By default, Xfixes support will be compiled if
3862 available and the shared libraries are dynamically
3865 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3866 $XZY -xrandr ............ Compile Xrandr support.
3867 Requires X11/extensions/Xrandr.h and libXrandr.
3869 $XRN -no-xrender ........ Do not compile Xrender support.
3870 $XRY -xrender ........... Compile Xrender support.
3871 Requires X11/extensions/Xrender.h and libXrender.
3873 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3874 $XMY -mitshm ............ Compile MIT-SHM support.
3875 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3877 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3878 $FCGY -fontconfig ........ Compile FontConfig support.
3879 Requires fontconfig/fontconfig.h, libfontconfig,
3880 freetype.h and libfreetype.
3882 $XIN -no-xinput ......... Do not compile Xinput support.
3883 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3884 which requires IRIX with wacom.h and libXi or
3885 XFree86 with X11/extensions/XInput.h and libXi.
3887 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3888 $XKY -xkb ............... Compile XKB support.
3893 if [ "$BUILD_ON_MAC" = "yes" ]; then
3898 -Fstring ........... Add an explicit framework path.
3899 -fw string ......... Add an explicit framework.
3901 * -framework ......... Build Qt as a series of frameworks and
3902 link tools against those frameworks.
3903 -no-framework ...... Do not build Qt as a series of frameworks.
3905 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3906 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3908 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3909 Only one arch value can be specified.
3911 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3912 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3914 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3915 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3916 QT_ENABLE_HARFBUZZ environment variable.
3921 if [ "$PLATFORM_QWS" = "yes" ]; then
3923 Qt for Embedded Linux:
3925 -embedded <arch> .... This will enable the embedded build, you must have a
3926 proper license for this switch to work.
3927 Example values for <arch>: arm mips x86 generic
3931 if [ "$PLATFORM_QPA" = "yes" ]; then
3937 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3940 -xplatform target ... The target platform when cross-compiling.
3942 -no-feature-<feature> Do not compile in <feature>.
3943 -feature-<feature> .. Compile in <feature>. The available features
3944 are described in src/corelib/global/qfeatures.txt
3946 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3947 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3949 The floating point format is usually autodetected by configure. Use this
3950 to override the detected value.
3952 -little-endian ...... Target platform is little endian (LSB first).
3953 -big-endian ......... Target platform is big endian (MSB first).
3955 -host-little-endian . Host platform is little endian (LSB first).
3956 -host-big-endian .... Host platform is big endian (MSB first).
3958 You only need to specify the endianness when
3959 cross-compiling, otherwise the host
3960 endianness will be used.
3962 -no-freetype ........ Do not compile in Freetype2 support.
3963 -qt-freetype ........ Use the libfreetype bundled with Qt.
3964 * -system-freetype .... Use libfreetype from the operating system.
3965 See http://www.freetype.org/
3967 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3968 default ($CFG_QCONFIG).
3970 -no-opengl .......... Do not support OpenGL.
3971 -opengl <api> ....... Enable OpenGL ES support
3972 With no parameter, this will attempt to auto-detect
3973 OpenGL ES 2, or regular desktop OpenGL.
3974 Use es2 for <api> to override auto-detection.
3978 if [ "$PLATFORM_QWS" = "yes" ]; then
3981 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3982 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3984 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3985 by default all available decorations are on.
3986 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3987 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3988 linked to at run time.
3989 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3990 -no-decoration-<style> ....Disable decoration <style> entirely.
3991 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3993 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3994 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3995 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3996 linked to at run time.
3997 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3998 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3999 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
4001 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
4002 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4004 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
4006 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
4008 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
4009 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
4011 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
4012 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4013 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
4015 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
4016 -no-mouse-<driver> ... Disable mouse <driver> entirely.
4017 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
4019 -iwmmxt ............ Compile using the iWMMXt instruction set
4020 (available on some XScale CPUs).
4024 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
4025 if [ "$CFG_GLIB" = "no" ]; then
4033 $GBN -no-glib ........... Do not compile Glib support.
4034 $GBY -glib .............. Compile Glib support.
4039 [ "x$ERROR" = "xyes" ] && exit 1
4044 # -----------------------------------------------------------------------------
4045 # LICENSING, INTERACTIVE PART
4046 # -----------------------------------------------------------------------------
4048 if [ "$PLATFORM_QWS" = "yes" ]; then
4049 Platform="Qt for Embedded Linux"
4050 elif [ "$PLATFORM_QPA" = "yes" ]; then
4051 Platform="Qt Lighthouse"
4052 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
4053 Platform="Qt for Windows"
4054 elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
4056 Platform="Qt for Linux/X11"
4060 echo "This is the $Platform ${EditionString} Edition."
4063 if [ "$Edition" = "OpenSource" ]; then
4065 echo "You are licensed to use this software under the terms of"
4066 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
4067 if [ -f "$relpath/LICENSE.GPL3" ]; then
4068 echo "You are also licensed to use this software under the terms of"
4069 echo "the GNU General Public License (GPL) versions 3."
4075 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4076 echo "You have already accepted the terms of the $LicenseType license."
4079 if [ -f "$relpath/LICENSE.GPL3" ]; then
4080 echo "Type '3' to view the GNU General Public License version 3."
4082 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
4083 echo "Type 'yes' to accept this license offer."
4084 echo "Type 'no' to decline this license offer."
4086 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
4090 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
4092 elif [ "$acceptance" = "no" ]; then
4093 echo "You are not licensed to use this software."
4096 elif [ "$acceptance" = "3" ]; then
4097 more "$relpath/LICENSE.GPL3"
4098 elif [ "$acceptance" = "L" ]; then
4099 more "$relpath/LICENSE.LGPL"
4102 elif [ "$Edition" = "Preview" ]; then
4103 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
4106 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4107 echo "You have already accepted the terms of the $LicenseType license."
4110 echo "You are licensed to use this software under the terms of"
4111 echo "the $TheLicense"
4113 echo "Type '?' to read the Preview License."
4114 echo "Type 'yes' to accept this license offer."
4115 echo "Type 'no' to decline this license offer."
4117 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
4121 if [ "$acceptance" = "yes" ]; then
4123 elif [ "$acceptance" = "no" ] ;then
4124 echo "You are not licensed to use this software."
4127 elif [ "$acceptance" = "?" ]; then
4128 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4131 elif [ "$Edition" != "OpenSource" ]; then
4132 if [ -n "$ExpiryDate" ]; then
4133 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4134 [ -z "$ExpiryDate" ] && ExpiryDate="0"
4135 Today=`date +%Y%m%d`
4136 if [ "$Today" -gt "$ExpiryDate" ]; then
4137 case "$LicenseType" in
4138 Commercial|Academic|Educational)
4139 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4141 echo "NOTICE NOTICE NOTICE NOTICE"
4143 echo " Your support and upgrade period has expired."
4145 echo " You are no longer licensed to use this version of Qt."
4146 echo " Please contact qt-info@nokia.com to renew your support"
4147 echo " and upgrades for this license."
4149 echo "NOTICE NOTICE NOTICE NOTICE"
4154 echo "WARNING WARNING WARNING WARNING"
4156 echo " Your support and upgrade period has expired."
4158 echo " You may continue to use your last licensed release"
4159 echo " of Qt under the terms of your existing license"
4160 echo " agreement. But you are not entitled to technical"
4161 echo " support, nor are you entitled to use any more recent"
4162 echo " Qt releases."
4164 echo " Please contact qt-info@nokia.com to renew your"
4165 echo " support and upgrades for this license."
4167 echo "WARNING WARNING WARNING WARNING"
4174 echo "NOTICE NOTICE NOTICE NOTICE"
4176 echo " Your Evaluation license has expired."
4178 echo " You are no longer licensed to use this software. Please"
4179 echo " contact qt-info@nokia.com to purchase license, or install"
4180 echo " the Qt Open Source Edition if you intend to develop free"
4183 echo "NOTICE NOTICE NOTICE NOTICE"
4190 TheLicense=`head -n 1 "$outpath/LICENSE"`
4192 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4193 echo "You have already accepted the terms of the $TheLicense."
4196 echo "You are licensed to use this software under the terms of"
4197 echo "the $TheLicense."
4199 echo "Type '?' to view the $TheLicense."
4200 echo "Type 'yes' to accept this license offer."
4201 echo "Type 'no' to decline this license offer."
4203 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
4207 if [ "$acceptance" = "yes" ]; then
4209 elif [ "$acceptance" = "no" ]; then
4210 echo "You are not licensed to use this software."
4213 else [ "$acceptance" = "?" ]
4214 more "$outpath/LICENSE"
4219 # this should be moved somewhere else
4222 AIX_VERSION=`uname -v`
4223 if [ "$AIX_VERSION" -lt "5" ]; then
4224 QMakeVar add QMAKE_LIBS_X11 -lbind
4231 #-------------------------------------------------------------------------------
4232 # generate qconfig.cpp
4233 #-------------------------------------------------------------------------------
4234 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
4236 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4237 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4238 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4239 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4240 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4241 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4242 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4243 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4244 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
4245 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4246 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4247 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4248 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4249 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4251 TODAY=`date +%Y-%m-%d`
4252 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4254 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4255 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4257 /* Installation date */
4258 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4262 if [ ! -z "$QT_HOST_PREFIX" ]; then
4263 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4264 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4265 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4266 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4267 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4268 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4269 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4270 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4271 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4272 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4273 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4274 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4276 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4278 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4279 /* Installation Info */
4280 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4281 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4282 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4283 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4284 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4285 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4286 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4287 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4288 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4289 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4290 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4291 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4292 #else // QT_BOOTSTRAPPED
4296 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4297 /* Installation Info */
4298 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4299 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4300 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4301 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4302 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4303 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4304 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4305 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4306 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4307 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4308 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4309 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4312 if [ ! -z "$QT_HOST_PREFIX" ]; then
4313 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4314 #endif // QT_BOOTSTRAPPED
4319 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4320 /* strlen( "qt_lcnsxxxx" ) == 12 */
4321 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4322 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4323 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4324 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4325 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4326 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4327 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4328 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4329 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4330 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4331 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4332 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4333 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4334 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4337 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4338 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4339 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4341 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4342 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4343 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4346 # -----------------------------------------------------------------------------
4347 if [ "$LicenseType" = "Evaluation" ]; then
4348 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4349 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4350 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4353 if [ -n "$EVALKEY" ]; then
4354 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4355 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4356 /* Evaluation license key */
4357 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4359 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4363 # -----------------------------------------------------------------------------
4365 # -----------------------------------------------------------------------------
4368 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4370 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4371 if [ "$OPT_SHADOW" = "yes" ]; then
4372 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4373 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4374 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4379 # $2: optional transformation
4380 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4381 # is where the resulting variable is written to
4382 # Assumes that the optional transformation produces the same variable name for each hit
4383 setBootstrapVariable()
4385 getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
4391 valStart = index($0, "=") + 1
4394 if (substr($0, valStart - 2, 1) == "+") {
4398 variable = substr($0, 0, valStart - 2 - append)
4399 value = substr($0, valStart)
4400 gsub("[ \t]+", "", variable)
4401 gsub("^[ \t]+", "", value)
4402 gsub("[ \t]+$", "", value)
4404 if (append == 1 && length(combinedValue) > 0) {
4405 combinedValue = combinedValue " " value
4407 combinedValue = value
4411 if (length(combinedValue) > 0) {
4412 printf "%s = %s\n", variable, combinedValue
4418 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4419 echo "Creating qmake. Please wait..."
4422 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4423 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4424 if [ -f "$QCONFIG_H" ]; then
4425 OLD_QCONFIG_H=$QCONFIG_H
4426 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4429 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4430 # when building qmake, we use #defines for the install paths,
4431 # however they are real functions in the library
4432 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4433 mkdir -p "$outpath/src/corelib/global"
4434 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4435 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4438 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4440 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4441 rm -rf mkspecs/default
4442 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4444 for mkfile in GNUmakefile Makefile; do
4447 in_mkfile="${mkfile}.in"
4448 if [ "$mkfile" = "Makefile" ]; then
4449 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4450 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4452 in_mkfile="${mkfile}.unix"
4454 in_mkfile="$relpath/qmake/$in_mkfile"
4455 mkfile="$outpath/qmake/$mkfile"
4456 if [ -f "$mkfile" ]; then
4457 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4460 [ -f "$in_mkfile" ] || continue
4462 echo "########################################################################" > "$mkfile"
4463 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4464 echo "########################################################################" >> "$mkfile"
4467 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4468 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4469 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4471 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4472 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4475 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4476 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4477 if [ "$CFG_SILENT" = "yes" ]; then
4478 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
4479 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
4481 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
4482 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
4484 setBootstrapVariable QMAKE_CFLAGS
4485 setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4486 setBootstrapVariable QMAKE_LFLAGS
4488 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4489 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4490 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4492 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4493 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4494 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4495 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4496 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4497 elif [ "$CFG_DEBUG" = "yes" ]; then
4498 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4499 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4500 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4501 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4504 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
4505 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" 's,\$\$LITERAL_WHITESPACE, ,;s,QMAKE_RPATH,QMAKE_LFLAGS_RPATH,'
4506 for rpath in $RPATH_FLAGS; do
4507 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4510 if [ "$BUILD_ON_MAC" = "yes" ]; then
4511 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4512 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4513 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4514 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4515 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4516 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4517 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4518 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4519 if [ '!' -z "$CFG_SDK" ]; then
4520 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4521 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4522 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4523 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4524 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4527 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
4528 if [ '!' -z "$D_FLAGS" ]; then
4529 for DEF in $D_FLAGS; do
4530 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4533 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4534 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4535 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4536 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4538 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4539 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4540 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4541 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4542 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4543 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4544 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4545 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4546 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4547 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4549 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4550 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4551 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4552 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4557 QMAKE_BUILD_ERROR=no
4558 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4559 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4560 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4561 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4564 #-------------------------------------------------------------------------------
4565 # tests that need qmake
4566 #-------------------------------------------------------------------------------
4568 # detect availability of float math.h functions
4569 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4570 CFG_USE_FLOATMATH=yes
4572 CFG_USE_FLOATMATH=no
4575 # detect mmx support
4576 if [ "${CFG_MMX}" = "auto" ]; then
4577 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4584 # detect 3dnow support
4585 if [ "${CFG_3DNOW}" = "auto" ]; then
4586 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4593 # detect sse support
4594 if [ "${CFG_SSE}" = "auto" ]; then
4595 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4602 # detect sse2 support
4603 if [ "${CFG_SSE2}" = "auto" ]; then
4604 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4611 # detect sse3 support
4612 if [ "${CFG_SSE3}" = "auto" ]; then
4613 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4620 # detect ssse3 support
4621 if [ "${CFG_SSSE3}" = "auto" ]; then
4622 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4629 # detect sse4.1 support
4630 if [ "${CFG_SSE4_1}" = "auto" ]; then
4631 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
4638 # detect sse4.2 support
4639 if [ "${CFG_SSE4_2}" = "auto" ]; then
4640 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
4647 # detect avx support
4648 if [ "${CFG_AVX}" = "auto" ]; then
4649 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4656 # check iWMMXt support
4657 if [ "$CFG_IWMMXT" = "yes" ]; then
4658 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4659 if [ $? != "0" ]; then
4660 echo "The iWMMXt functionality test failed!"
4661 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4666 # detect neon support
4667 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4668 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
4675 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4678 if [ "$CFG_ZLIB" = "no" ]; then
4679 # Note: Qt no longer support builds without zlib
4680 # So we force a "no" to be "auto" here.
4681 # If you REALLY really need no zlib support, you can still disable
4682 # it by doing the following:
4683 # add "no-zlib" to mkspecs/qconfig.pri
4684 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4686 # There's no guarantee that Qt will build under those conditions
4691 if [ "$CFG_ZLIB" = "auto" ]; then
4692 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
4699 if [ "$CFG_LARGEFILE" = "auto" ]; then
4700 #Large files should be enabled for all Linux systems
4704 # detect how jpeg should be built
4705 if [ "$CFG_JPEG" = "auto" ]; then
4706 if [ "$CFG_SHARED" = "yes" ]; then
4713 if [ "$CFG_LIBJPEG" = "auto" ]; then
4714 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
4721 # detect how gif should be built
4722 if [ "$CFG_GIF" = "auto" ]; then
4723 if [ "$CFG_SHARED" = "yes" ]; then
4731 if [ "$CFG_LIBPNG" = "auto" ]; then
4732 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
4739 # detect accessibility
4740 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4741 CFG_ACCESSIBILITY=yes
4744 # auto-detect SQL-modules support
4745 for _SQLDR in $CFG_SQL_AVAILABLE; do
4748 if [ "$CFG_SQL_mysql" != "no" ]; then
4749 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4750 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4751 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4752 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4753 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4754 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4755 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4757 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4758 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4759 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4760 echo " You need MySql 4 or higher."
4761 echo " If you believe this message is in error you may use the continue"
4762 echo " switch (-continue) to $0 to continue."
4767 QT_LFLAGS_MYSQL_R=""
4771 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
4772 QMakeVar add CONFIG use_libmysqlclient_r
4773 if [ "$CFG_SQL_mysql" = "auto" ]; then
4774 CFG_SQL_mysql=plugin
4776 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4777 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
4778 if [ "$CFG_SQL_mysql" = "auto" ]; then
4779 CFG_SQL_mysql=plugin
4782 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4783 echo "MySQL support cannot be enabled due to functionality tests!"
4784 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4785 echo " If you believe this message is in error you may use the continue"
4786 echo " switch (-continue) to $0 to continue."
4791 QT_LFLAGS_MYSQL_R=""
4799 if [ "$CFG_SQL_psql" != "no" ]; then
4800 # Be careful not to use native pg_config when cross building.
4801 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4802 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4803 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4805 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4806 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4807 # But, respect PSQL_LIBS if set
4808 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4809 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
4810 if [ "$CFG_SQL_psql" = "auto" ]; then
4814 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4815 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4816 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4817 echo " If you believe this message is in error you may use the continue"
4818 echo " switch (-continue) to $0 to continue."
4829 if [ "$CFG_SQL_odbc" != "no" ]; then
4830 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
4831 if [ "$CFG_SQL_odbc" = "auto" ]; then
4835 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
4836 QT_LFLAGS_ODBC="-liodbc"
4837 if [ "$CFG_SQL_odbc" = "auto" ]; then
4841 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4842 echo "ODBC support cannot be enabled due to functionality tests!"
4843 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4844 echo " If you believe this message is in error you may use the continue"
4845 echo " switch (-continue) to $0 to continue."
4855 if [ "$CFG_SQL_oci" != "no" ]; then
4856 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
4857 if [ "$CFG_SQL_oci" = "auto" ]; then
4861 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4862 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4863 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4864 echo " If you believe this message is in error you may use the continue"
4865 echo " switch (-continue) to $0 to continue."
4874 if [ "$CFG_SQL_tds" != "no" ]; then
4875 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4876 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4877 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
4878 if [ "$CFG_SQL_tds" = "auto" ]; then
4882 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4883 echo "TDS support cannot be enabled due to functionality tests!"
4884 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4885 echo " If you believe this message is in error you may use the continue"
4886 echo " switch (-continue) to $0 to continue."
4895 if [ "$CFG_SQL_db2" != "no" ]; then
4896 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
4897 if [ "$CFG_SQL_db2" = "auto" ]; then
4901 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4902 echo "ODBC support cannot be enabled due to functionality tests!"
4903 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4904 echo " If you believe this message is in error you may use the continue"
4905 echo " switch (-continue) to $0 to continue."
4914 if [ "$CFG_SQL_ibase" != "no" ]; then
4915 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
4916 if [ "$CFG_SQL_ibase" = "auto" ]; then
4917 CFG_SQL_ibase=plugin
4920 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4921 echo "InterBase support cannot be enabled due to functionality tests!"
4922 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4923 echo " If you believe this message is in error you may use the continue"
4924 echo " switch (-continue) to $0 to continue."
4933 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4934 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
4935 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4936 CFG_SQL_sqlite2=plugin
4939 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4940 echo "SQLite2 support cannot be enabled due to functionality tests!"
4941 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4942 echo " If you believe this message is in error you may use the continue"
4943 echo " switch (-continue) to $0 to continue."
4952 if [ "$CFG_SQL_sqlite" != "no" ]; then
4953 SQLITE_AUTODETECT_FAILED="no"
4954 if [ "$CFG_SQLITE" = "system" ]; then
4955 if [ -n "$PKG_CONFIG" ]; then
4956 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4957 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4959 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
4960 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4961 CFG_SQL_sqlite=plugin
4963 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4965 SQLITE_AUTODETECT_FAILED="yes"
4968 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4969 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4970 CFG_SQL_sqlite=plugin
4973 SQLITE_AUTODETECT_FAILED="yes"
4977 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4978 echo "SQLite support cannot be enabled due to functionality tests!"
4979 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4980 echo " If you believe this message is in error you may use the continue"
4981 echo " switch (-continue) to $0 to continue."
4987 if [ "$OPT_VERBOSE" = "yes" ]; then
4988 echo "unknown SQL driver: $_SQLDR"
4994 # auto-detect NIS support
4995 if [ "$CFG_NIS" != "no" ]; then
4996 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
4999 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5000 echo "NIS support cannot be enabled due to functionality tests!"
5001 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5002 echo " If you believe this message is in error you may use the continue"
5003 echo " switch (-continue) to $0 to continue."
5011 # auto-detect CUPS support
5012 if [ "$CFG_CUPS" != "no" ]; then
5013 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
5016 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5017 echo "Cups support cannot be enabled due to functionality tests!"
5018 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5019 echo " If you believe this message is in error you may use the continue"
5020 echo " switch (-continue) to $0 to continue."
5028 # auto-detect iconv(3) support
5029 if [ "$CFG_ICONV" != "no" ]; then
5030 if [ "$PLATFORM_QWS" = "yes" -o "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
5032 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
5034 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
5036 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
5039 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5040 echo "Iconv support cannot be enabled due to functionality tests!"
5041 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5042 echo " If you believe this message is in error you may use the continue"
5043 echo " switch (-continue) to $0 to continue."
5051 # auto-detect libdbus-1 support
5052 if [ "$CFG_DBUS" != "no" ]; then
5053 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
5054 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
5055 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
5057 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
5058 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
5059 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
5060 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
5062 if [ "$CFG_DBUS" = "auto" ]; then
5064 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5065 # CFG_DBUS is "yes" or "linked" here
5067 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
5068 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5069 echo " If you believe this message is in error you may use the continue"
5070 echo " switch (-continue) to $0 to continue."
5076 # X11/QWS/Lighthouse
5077 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
5079 # auto-detect Glib support
5080 if [ "$CFG_GLIB" != "no" ]; then
5081 if [ -n "$PKG_CONFIG" ]; then
5082 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
5083 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
5085 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
5087 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
5088 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
5090 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5091 echo "Glib support cannot be enabled due to functionality tests!"
5092 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5093 echo " If you believe this message is in error you may use the continue"
5094 echo " switch (-continue) to $0 to continue."
5103 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5104 if [ -n "$PKG_CONFIG" ]; then
5105 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5106 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5108 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
5110 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
5111 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
5113 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5114 echo "Gstreamer support cannot be enabled due to functionality tests!"
5115 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5116 echo " If you believe this message is in error you may use the continue"
5117 echo " switch (-continue) to $0 to continue."
5123 elif [ "$CFG_GLIB" = "no" ]; then
5127 # auto-detect libicu support
5128 if [ "$CFG_ICU" != "no" ]; then
5129 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
5130 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
5132 if [ "$CFG_ICU" = "auto" ]; then
5134 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5137 echo "The ICU library support cannot be enabled."
5138 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5139 echo " If you believe this message is in error you may use the continue"
5140 echo " switch (-continue) to $0 to continue."
5146 # Auto-detect PulseAudio support
5147 if [ "$CFG_PULSEAUDIO" != "no" ]; then
5148 if [ -n "$PKG_CONFIG" ]; then
5149 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5150 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
5152 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
5154 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
5155 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
5157 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5158 echo "PulseAudio support cannot be enabled due to functionality tests!"
5159 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5160 echo " If you believe this message is in error you may use the continue"
5161 echo " switch (-continue) to $0 to continue."
5168 fi # X11/QWS/Lighthouse
5171 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
5172 x11tests="$relpath/config.tests/x11"
5175 # work around broken X11 headers when using GCC 2.95 or later
5177 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
5178 if [ $NOTYPE = "yes" ]; then
5179 QMakeVar add QMAKE_CXXFLAGS -fpermissive
5180 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
5183 # Check we actually have X11 :-)
5184 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5185 if [ $? != "0" ]; then
5186 echo "Basic XLib functionality test failed!"
5187 echo " You might need to modify the include and library search paths by editing"
5188 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5194 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
5195 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5196 if [ "$CFG_GUI" = "no" ]; then
5197 if [ "$CFG_OPENGL" = "auto" ]; then
5200 if [ "$CFG_OPENGL" != "no" ]; then
5201 echo "OpenGL enabled, but GUI disabled."
5202 echo " You might need to either enable the GUI or disable OpenGL"
5206 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5207 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
5209 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
5211 if [ "$CFG_EGL" = "no" ]; then
5215 if [ "$CFG_OPENGL" = "yes" ]; then
5216 echo "All the OpenGL functionality tests failed!"
5217 echo " You might need to modify the include and library search paths by editing"
5218 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5219 echo " ${XQMAKESPEC}."
5226 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5227 if [ "$CFG_OPENGL" = "desktop" ]; then
5228 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5229 if [ $? != "0" ]; then
5230 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5237 elif [ "$CFG_OPENGL" = "es2" ]; then
5239 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5240 if [ $? != "0" ]; then
5241 echo "The OpenGL ES 2.0 functionality test failed!"
5242 echo " You might need to modify the include and library search paths by editing"
5243 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5244 echo " ${XQMAKESPEC}."
5247 elif [ "$CFG_OPENGL" = "desktop" ]; then
5248 # Desktop OpenGL support
5249 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5250 if [ $? != "0" ]; then
5251 echo "The OpenGL functionality test failed!"
5252 echo " You might need to modify the include and library search paths by editing"
5253 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5254 echo " ${XQMAKESPEC}."
5259 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5260 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5261 if [ $? != "0" ]; then
5262 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5269 fi # X11/MINGW OpenGL
5272 if [ "$PLATFORM_X11" = "yes" ]; then
5273 # auto-detect Xcursor support
5274 if [ "$CFG_XCURSOR" != "no" ]; then
5275 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
5276 if [ "$CFG_XCURSOR" != "runtime" ]; then
5280 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5281 echo "Xcursor support cannot be enabled due to functionality tests!"
5282 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5283 echo " If you believe this message is in error you may use the continue"
5284 echo " switch (-continue) to $0 to continue."
5292 # auto-detect Xfixes support
5293 if [ "$CFG_XFIXES" != "no" ]; then
5294 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5295 if [ "$CFG_XFIXES" != "runtime" ]; then
5299 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5300 echo "Xfixes support cannot be enabled due to functionality tests!"
5301 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5302 echo " If you believe this message is in error you may use the continue"
5303 echo " switch (-continue) to $0 to continue."
5311 # auto-detect Xrandr support (resize and rotate extension)
5312 if [ "$CFG_XRANDR" != "no" ]; then
5313 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
5314 if [ "$CFG_XRANDR" != "runtime" ]; then
5318 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5319 echo "Xrandr support cannot be enabled due to functionality tests!"
5320 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5321 echo " If you believe this message is in error you may use the continue"
5322 echo " switch (-continue) to $0 to continue."
5330 # auto-detect Xrender support
5331 if [ "$CFG_XRENDER" != "no" ]; then
5332 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
5335 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5336 echo "Xrender support cannot be enabled due to functionality tests!"
5337 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5338 echo " If you believe this message is in error you may use the continue"
5339 echo " switch (-continue) to $0 to continue."
5347 # auto-detect MIT-SHM support
5348 if [ "$CFG_MITSHM" != "no" ]; then
5349 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
5352 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5353 echo "MITSHM support cannot be enabled due to functionality tests!"
5354 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5355 echo " If you believe this message is in error you may use the continue"
5356 echo " switch (-continue) to $0 to continue."
5364 # auto-detect FontConfig support
5365 if [ "$CFG_FONTCONFIG" != "no" ]; then
5366 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5367 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5368 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5370 QT_CFLAGS_FONTCONFIG=
5371 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5373 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
5375 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5376 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5377 CFG_LIBFREETYPE=system
5379 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5380 echo "FontConfig support cannot be enabled due to functionality tests!"
5381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5382 echo " If you believe this message is in error you may use the continue"
5383 echo " switch (-continue) to $0 to continue."
5391 # auto-detect Session Management support
5392 if [ "$CFG_SM" = "auto" ]; then
5393 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
5396 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5397 echo "Session Management support cannot be enabled due to functionality tests!"
5398 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5399 echo " If you believe this message is in error you may use the continue"
5400 echo " switch (-continue) to $0 to continue."
5408 # auto-detect SHAPE support
5409 if [ "$CFG_XSHAPE" != "no" ]; then
5410 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
5413 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5414 echo "XShape support cannot be enabled due to functionality tests!"
5415 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5416 echo " If you believe this message is in error you may use the continue"
5417 echo " switch (-continue) to $0 to continue."
5425 # auto-detect XVideo support
5426 if [ "$CFG_XVIDEO" != "no" ]; then
5427 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
5430 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5431 echo "XVideo support cannot be enabled due to functionality tests!"
5432 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5433 echo " If you believe this message is in error you may use the continue"
5434 echo " switch (-continue) to $0 to continue."
5442 # auto-detect XSync support
5443 if [ "$CFG_XSYNC" != "no" ]; then
5444 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
5447 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5448 echo "XSync support cannot be enabled due to functionality tests!"
5449 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5450 echo " If you believe this message is in error you may use the continue"
5451 echo " switch (-continue) to $0 to continue."
5459 # auto-detect Xinerama support
5460 if [ "$CFG_XINERAMA" != "no" ]; then
5461 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
5462 if [ "$CFG_XINERAMA" != "runtime" ]; then
5466 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5467 echo "Xinerama support cannot be enabled due to functionality tests!"
5468 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5469 echo " If you believe this message is in error you may use the continue"
5470 echo " switch (-continue) to $0 to continue."
5478 # auto-detect Xinput support
5479 if [ "$CFG_XINPUT" != "no" ]; then
5480 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
5481 if [ "$CFG_XINPUT" != "runtime" ]; then
5485 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5486 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5487 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5488 echo " If you believe this message is in error you may use the continue"
5489 echo " switch (-continue) to $0 to continue."
5497 # auto-detect XKB support
5498 if [ "$CFG_XKB" != "no" ]; then
5499 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
5502 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5503 echo "XKB support cannot be enabled due to functionality tests!"
5504 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5505 echo " If you believe this message is in error you may use the continue"
5506 echo " switch (-continue) to $0 to continue."
5514 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5515 if [ -n "$PKG_CONFIG" ]; then
5516 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5517 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5519 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5521 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5522 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5524 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5525 echo "Gtk theme support cannot be enabled due to functionality tests!"
5526 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5527 echo " If you believe this message is in error you may use the continue"
5528 echo " switch (-continue) to $0 to continue."
5534 elif [ "$CFG_GLIB" = "no" ]; then
5540 if [ "$BUILD_ON_MAC" = "yes" ]; then
5541 if [ "$CFG_PHONON" != "no" ]; then
5542 # Always enable Phonon (unless it was explicitly disabled)
5546 if [ "$CFG_COREWLAN" = "auto" ]; then
5547 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
5556 if [ "$PLATFORM_QPA" = "yes" ]; then
5557 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5558 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5559 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
5561 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
5564 if [ "$CFG_OPENGL" = "yes" ]; then
5565 echo "All the OpenGL functionality tests failed!"
5566 echo " You might need to modify the include and library search paths by editing"
5567 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5568 echo " ${XQMAKESPEC}."
5573 elif [ "$CFG_OPENGL" = "es2" ]; then
5575 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5576 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --variable=includedir glesv2 2>/dev/null`
5577 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --variable=libdir glesv2 2>/dev/null`
5578 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5579 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5580 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5581 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5582 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5585 "$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
5586 if [ $? != "0" ]; then
5587 echo "The OpenGL ES 2.0 functionality test failed!"
5588 echo " You might need to modify the include and library search paths by editing"
5589 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5590 echo " ${XQMAKESPEC}."
5593 elif [ "$CFG_OPENGL" = "desktop" ]; then
5594 # Desktop OpenGL support
5595 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5596 if [ $? != "0" ]; then
5597 echo "The OpenGL functionality test failed!"
5598 echo " You might need to modify the include and library search paths by editing"
5599 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5600 echo " ${XQMAKESPEC}."
5605 # auto-detect FontConfig support
5606 if [ "$CFG_FONTCONFIG" != "no" ]; then
5607 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5608 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5609 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5611 QT_CFLAGS_FONTCONFIG=
5612 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5614 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
5615 QT_CONFIG="$QT_CONFIG fontconfig"
5616 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5617 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5618 CFG_LIBFREETYPE=system
5623 # Save these for a check later
5624 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5625 ORIG_CFG_XCB="$CFG_XCB"
5627 if [ "$CFG_WAYLAND" != "no" ]; then
5628 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5629 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5630 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5631 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
5632 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
5634 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
5636 QT_CONFIG="$QT_CONFIG wayland"
5637 elif [ "$CFG_WAYLAND" = "yes" ]; then
5638 echo "The Wayland functionality test failed!"
5642 QMakeVar add DEFINES QT_NO_WAYLAND
5646 if [ "$CFG_LIBUDEV" != "no" ]; then
5647 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5649 QT_CONFIG="$QT_CONFIG libudev"
5650 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5651 echo "The libudev functionality test failed!"
5655 QMakeVar add DEFINES QT_NO_LIBUDEV
5659 if [ "$CFG_EVDEV" != "no" ]; then
5660 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5662 QT_CONFIG="$QT_CONFIG evdev"
5663 elif [ "$CFG_EVDEV" = "yes" ]; then
5664 echo "The evdev functionality test failed!"
5668 QMakeVar add DEFINES QT_NO_EVDEV
5672 # Check we actually have X11 :-)
5673 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
5674 QT_CONFIG="$QT_CONFIG xlib"
5677 # auto-detect Xrender support
5678 if [ "$CFG_XRENDER" != "no" ]; then
5679 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
5681 QT_CONFIG="$QT_CONFIG xrender"
5683 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5684 echo "Xrender support cannot be enabled due to functionality tests!"
5685 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5686 echo " If you believe this message is in error you may use the continue"
5687 echo " switch (-continue) to $0 to continue."
5695 if [ "$CFG_XCB" != "no" ]; then
5696 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
5698 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
5699 QT_CONFIG="$QT_CONFIG xcb-render"
5702 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
5704 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5707 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
5708 QT_CONFIG="$QT_CONFIG xcb-xlib"
5711 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5712 # auto-detect XInput2/Xinput support
5713 if [ "$CFG_XINPUT2" != "no" ]; then
5714 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
5718 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5719 echo "XInput2 support cannot be enabled due to functionality tests!"
5720 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5721 echo " If you believe this message is in error you may use the continue"
5722 echo " switch (-continue) to $0 to continue."
5731 if [ "$CFG_XCB" = "yes" ]; then
5732 echo "The XCB test failed!"
5733 echo " You might need to install dependency packages."
5734 echo " See src/plugins/platforms/xcb/README."
5738 QMakeVar add DEFINES QT_NO_XCB
5742 # Detect libxkbcommon
5743 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5744 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5745 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5746 if [ "$CFG_WAYLAND" = "yes" ]; then
5747 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5748 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5750 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5751 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5753 if [ "$CFG_WAYLAND" = "yes" ]; then
5754 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5756 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5759 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5760 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5761 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5762 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5763 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5764 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5765 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5768 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5769 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5770 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5771 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5774 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
5775 QT_CONFIG="$QT_CONFIG coreservices"
5777 QMakeVar add DEFINES QT_NO_CORESERVICES
5780 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5781 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5782 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5783 echo "No QPA platform plugin enabled!"
5784 echo " If you really want to build without a QPA platform plugin you must pass"
5785 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5786 echo " cannot run GUI applications."
5796 if [ "$PLATFORM_QWS" = "yes" ]; then
5798 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5799 if [ "$CFG_GUI" = "no" ]; then
5800 if [ "$CFG_OPENGL" = "auto" ]; then
5803 if [ "$CFG_OPENGL" != "no" ]; then
5804 echo "OpenGL enabled, but GUI disabled."
5805 echo " You might need to either enable the GUI or disable OpenGL"
5809 if [ "$CFG_OPENGL" = "yes" ]; then
5811 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
5814 elif [ "$CFG_OPENGL" = "es2" ]; then
5816 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5817 if [ $? != "0" ]; then
5818 echo "The OpenGL ES 2.0 functionality test failed!"
5819 echo " You might need to modify the include and library search paths by editing"
5820 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5821 echo " ${XQMAKESPEC}."
5825 elif [ "$CFG_OPENGL" = "desktop" ]; then
5826 # Desktop OpenGL support
5827 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5832 if [ "$PLATFORM_QWS" = "yes" ]; then
5835 for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5836 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5837 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5838 if [ $? != "0" ]; then
5839 echo "The Ahi screen driver functionality test failed!"
5840 echo " You might need to modify the include and library search paths by editing"
5841 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5842 echo " ${XQMAKESPEC}."
5847 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5848 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5849 if [ $? != "0" ]; then
5850 echo "The SVGAlib screen driver functionality test failed!"
5851 echo " You might need to modify the include and library search paths by editing"
5852 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5853 echo " ${XQMAKESPEC}."
5858 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5859 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
5860 QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5861 QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
5862 elif directfb-config --version >/dev/null 2>&1; then
5863 QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
5864 QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
5867 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5868 if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
5869 QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
5870 QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
5873 "$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
5874 if [ $? != "0" ]; then
5875 echo "The DirectFB screen driver functionality test failed!"
5876 echo " You might need to modify the include and library search paths by editing"
5877 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5878 echo " ${XQMAKESPEC}."
5886 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5887 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5888 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5889 if [ $? != "0" ]; then
5890 echo "The tslib functionality test failed!"
5891 echo " You might need to modify the include and library search paths by editing"
5892 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5893 echo " ${XQMAKESPEC}."
5902 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS
5903 if [ $? != "0" ]; then
5904 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
5911 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
5912 if [ "$CFG_EGL" != "no" ]; then
5913 # detect EGL support
5914 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
5915 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5920 if [ "$EGL_VARIANT" = "none" ]; then
5921 if [ "$CFG_EGL" = "yes" ]; then
5922 echo "The EGL functionality test failed!"
5923 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5924 echo " You might need to modify the include and library search paths by editing"
5925 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5926 echo " ${XQMAKESPEC}."
5930 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5931 if [ "$CFG_OPENGL" = "es2" ]; then
5938 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5941 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
5942 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5943 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5944 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
5945 CFG_LIBFREETYPE=system
5951 if [ "$CFG_ENDIAN" = "auto" ]; then
5952 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5953 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5954 elif [ "$BUILD_ON_MAC" = "yes" ]; then
5957 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
5959 if [ "$F" -eq 0 ]; then
5960 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5961 elif [ "$F" -eq 1 ]; then
5962 CFG_ENDIAN="Q_BIG_ENDIAN"
5965 echo "The target system byte order could not be detected!"
5966 echo "Turn on verbose messaging (-v) to see the final report."
5967 echo "You can use the -little-endian or -big-endian switch to"
5968 echo "$0 to continue."
5974 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5975 if [ "$BUILD_ON_MAC" = "yes" ]; then
5978 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5980 if [ "$F" -eq 0 ]; then
5981 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5982 elif [ "$F" -eq 1 ]; then
5983 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5986 echo "The host system byte order could not be detected!"
5987 echo "Turn on verbose messaging (-v) to see the final report."
5988 echo "You can use the -host-little-endian or -host-big-endian switch to"
5989 echo "$0 to continue."
5995 if [ "$CFG_ARMFPA" != "auto" ]; then
5996 if [ "$CFG_ARMFPA" = "yes" ]; then
5997 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5998 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6000 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6003 CFG_DOUBLEFORMAT="normal"
6008 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
6009 if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
6010 CFG_DOUBLEFORMAT=normal
6012 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6014 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
6015 CFG_DOUBLEFORMAT=normal
6016 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
6017 CFG_DOUBLEFORMAT=normal
6018 elif [ "$F" -eq 10 ]; then
6019 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
6020 elif [ "$F" -eq 11 ]; then
6021 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
6022 elif [ "$F" -eq 12 ]; then
6023 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
6025 elif [ "$F" -eq 13 ]; then
6026 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
6030 echo "The system floating point format could not be detected."
6031 echo "This may cause data to be generated in a wrong format"
6032 echo "Turn on verbose messaging (-v) to see the final report."
6033 # we do not fail on this since this is a new test, and if it fails,
6034 # the old behavior should be correct in most cases
6035 CFG_DOUBLEFORMAT=normal
6041 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
6045 if [ "$CFG_STL" != "no" ]; then
6046 if [ "$HAVE_STL" = "yes" ]; then
6049 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6050 echo "STL support cannot be enabled due to functionality tests!"
6051 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6052 echo " If you believe this message is in error you may use the continue"
6053 echo " switch (-continue) to $0 to continue."
6061 # detect POSIX clock_gettime()
6062 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
6063 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
6064 CFG_CLOCK_GETTIME=yes
6066 CFG_CLOCK_GETTIME=no
6070 # detect POSIX monotonic clocks
6071 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
6072 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
6073 CFG_CLOCK_MONOTONIC=yes
6075 CFG_CLOCK_MONOTONIC=no
6077 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
6078 CFG_CLOCK_MONOTONIC=no
6082 if [ "$CFG_MREMAP" = "auto" ]; then
6083 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
6090 # find if the platform provides getaddrinfo (ipv6 dns lookups)
6091 if [ "$CFG_GETADDRINFO" != "no" ]; then
6092 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
6095 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6096 echo "getaddrinfo support cannot be enabled due to functionality tests!"
6097 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6098 echo " If you believe this message is in error you may use the continue"
6099 echo " switch (-continue) to $0 to continue."
6107 # find if the platform provides inotify
6108 if [ "$CFG_INOTIFY" != "no" ]; then
6109 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
6112 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6113 echo "inotify support cannot be enabled due to functionality tests!"
6114 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6115 echo " If you believe this message is in error you may use the continue"
6116 echo " switch (-continue) to $0 to continue."
6124 # find if the platform provides if_nametoindex (ipv6 interface name support)
6125 if [ "$CFG_IPV6IFNAME" != "no" ]; then
6126 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
6129 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6130 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
6131 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6132 echo " If you believe this message is in error you may use the continue"
6133 echo " switch (-continue) to $0 to continue."
6141 # find if the platform provides getifaddrs (network interface enumeration)
6142 if [ "$CFG_GETIFADDRS" != "no" ]; then
6143 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
6146 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6147 echo "getifaddrs support cannot be enabled due to functionality tests!"
6148 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6149 echo " If you believe this message is in error you may use the continue"
6150 echo " switch (-continue) to $0 to continue."
6159 if [ "$CFG_OPENSSL" != "no" ]; then
6160 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
6161 if [ "$CFG_OPENSSL" = "auto" ]; then
6165 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6166 echo "OpenSSL support cannot be enabled due to functionality tests!"
6167 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6168 echo " If you believe this message is in error you may use the continue"
6169 echo " switch (-continue) to $0 to continue."
6178 if [ "$CFG_PCRE" != "qt" ]; then
6179 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
6182 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6183 echo "PCRE support cannot be enabled due to functionality tests!"
6184 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6185 echo " If you believe this message is in error you may use the continue"
6186 echo " switch (-continue) to $0 to continue."
6194 # detect OpenVG support
6195 if [ "$CFG_OPENVG" != "no" ]; then
6196 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
6197 if [ "$CFG_OPENVG" = "auto" ]; then
6200 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
6201 if [ "$CFG_OPENVG" = "auto" ]; then
6204 CFG_OPENVG_ON_OPENGL=yes
6205 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
6206 if [ "$CFG_OPENVG" = "auto" ]; then
6209 CFG_OPENVG_LC_INCLUDES=yes
6210 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
6211 if [ "$CFG_OPENVG" = "auto" ]; then
6214 CFG_OPENVG_LC_INCLUDES=yes
6215 CFG_OPENVG_ON_OPENGL=yes
6217 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
6218 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
6219 echo " Turn on verbose messaging (-v) to $0 to see the final report."
6220 echo " If you believe this message is in error you may use the continue"
6221 echo " switch (-continue) to $0 to continue."
6227 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
6228 CFG_OPENVG_SHIVA=yes
6232 if [ "$CFG_ALSA" = "auto" ]; then
6233 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
6240 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6241 if [ "$CFG_ARCH" = "arm" ]; then
6242 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
6243 if [ $? != "0" ]; then
6244 CFG_JAVASCRIPTCORE_JIT=no
6247 case "$XPLATFORM" in
6249 CFG_JAVASCRIPTCORE_JIT=no
6255 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
6256 QMakeVar set JAVASCRIPTCORE_JIT yes
6257 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
6258 QMakeVar set JAVASCRIPTCORE_JIT no
6261 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
6262 CFG_AUDIO_BACKEND=yes
6265 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
6266 echo "Warning: largefile support cannot be disabled for win32."
6270 #-------------------------------------------------------------------------------
6271 # ask for all that hasn't been auto-detected or specified in the arguments
6272 #-------------------------------------------------------------------------------
6274 ### fix this: user input should be validated in a loop
6275 if [ "$PLATFORM_QWS" = "yes" ]; then
6276 PROMPT_FOR_DEPTHS="yes"
6278 PROMPT_FOR_DEPTHS="no"
6280 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
6282 echo "Choose pixel-depths to support:"
6284 echo " 1. 1bpp, black/white"
6285 echo " 4. 4bpp, grayscale"
6286 echo " 8. 8bpp, paletted"
6287 echo " 12. 12bpp, rgb 4-4-4"
6288 echo " 15. 15bpp, rgb 5-5-5"
6289 echo " 16. 16bpp, rgb 5-6-5"
6290 echo " 18. 18bpp, rgb 6-6-6"
6291 echo " 24. 24bpp, rgb 8-8-8"
6292 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
6293 echo " all. All supported depths"
6295 echo "Your choices (default 8,16,32):"
6297 if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
6298 CFG_QWS_DEPTHS=8,16,32
6301 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
6302 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
6303 CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
6305 for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
6307 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
6308 generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
6313 # enable dwarf2 support on Mac
6314 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
6315 QT_CONFIG="$QT_CONFIG dwarf2"
6318 # Set the default arch if there are no "-arch" arguments on the configure line
6319 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
6320 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
6321 CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
6322 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
6326 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6327 QT_CONFIG="$QT_CONFIG phonon-backend"
6330 # disable accessibility
6331 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6332 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6334 QT_CONFIG="$QT_CONFIG accessibility"
6337 # egl stuff does not belong in lighthouse, but rather in plugins
6338 if [ "$PLATFORM_QPA" = "yes" ]; then
6343 if [ "$CFG_EGL" = "no" ]; then
6344 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
6346 QT_CONFIG="$QT_CONFIG egl"
6347 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6348 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
6353 if [ "$CFG_OPENVG" = "no" ]; then
6354 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
6356 QT_CONFIG="$QT_CONFIG openvg"
6357 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6358 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6360 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6361 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
6363 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6364 QT_CONFIG="$QT_CONFIG shivavg"
6365 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
6370 if [ "$CFG_OPENGL" = "no" ]; then
6371 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
6373 QT_CONFIG="$QT_CONFIG opengl"
6376 if [ "$CFG_OPENGL" = "es2" ]; then
6377 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
6380 if [ "$CFG_OPENGL" = "es2" ]; then
6381 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6382 QT_CONFIG="$QT_CONFIG opengles2"
6385 # safe execution environment
6386 if [ "$CFG_SXE" != "no" ]; then
6387 QT_CONFIG="$QT_CONFIG sxe"
6390 # build up the variables for output
6391 if [ "$CFG_DEBUG" = "yes" ]; then
6392 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
6393 QMAKE_CONFIG="$QMAKE_CONFIG debug"
6394 elif [ "$CFG_DEBUG" = "no" ]; then
6395 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
6396 QMAKE_CONFIG="$QMAKE_CONFIG release"
6398 if [ "$CFG_SHARED" = "yes" ]; then
6399 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
6400 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
6401 elif [ "$CFG_SHARED" = "no" ]; then
6402 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
6403 QMAKE_CONFIG="$QMAKE_CONFIG static"
6405 if [ "$PLATFORM_QWS" = "yes" ]; then
6406 QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6407 QMAKE_CONFIG="$QMAKE_CONFIG embedded"
6408 QT_CONFIG="$QT_CONFIG embedded"
6409 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6411 if [ "$PLATFORM_QPA" = "yes" ]; then
6412 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
6413 QT_CONFIG="$QT_CONFIG qpa"
6414 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
6415 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6418 if [ "$CFG_EMBEDDED" = "nacl" ]; then
6419 QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
6420 QT_CONFIG="$QT_CONFIG nacl pepper"
6421 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6424 if [ "$XPLATFORM_MINGW" != "yes" ]; then
6425 # Do not set this here for Windows. Let qmake do it so
6426 # debug and release precompiled headers are kept separate.
6427 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
6429 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
6430 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
6431 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
6432 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
6433 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6434 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
6436 if [ "$CFG_STL" = "no" ]; then
6437 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
6439 QMAKE_CONFIG="$QMAKE_CONFIG stl"
6441 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6442 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
6444 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
6445 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
6446 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
6447 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6448 QMakeVar add QMAKE_CFLAGS -g
6449 QMakeVar add QMAKE_CXXFLAGS -g
6450 QT_CONFIG="$QT_CONFIG separate_debug_info"
6452 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6453 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
6455 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
6456 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
6457 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
6458 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
6459 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
6460 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
6461 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
6462 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
6463 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
6464 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
6465 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
6466 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6467 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6468 QT_CONFIG="$QT_CONFIG clock-gettime"
6470 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6471 QT_CONFIG="$QT_CONFIG clock-monotonic"
6473 if [ "$CFG_MREMAP" = "yes" ]; then
6474 QT_CONFIG="$QT_CONFIG mremap"
6476 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6477 QT_CONFIG="$QT_CONFIG getaddrinfo"
6479 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6480 QT_CONFIG="$QT_CONFIG ipv6ifname"
6482 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6483 QT_CONFIG="$QT_CONFIG getifaddrs"
6485 if [ "$CFG_INOTIFY" = "yes" ]; then
6486 QT_CONFIG="$QT_CONFIG inotify"
6488 if [ "$CFG_LIBJPEG" = "no" ]; then
6490 elif [ "$CFG_LIBJPEG" = "system" ]; then
6491 QT_CONFIG="$QT_CONFIG system-jpeg"
6493 if [ "$CFG_JPEG" = "no" ]; then
6494 QT_CONFIG="$QT_CONFIG no-jpeg"
6495 elif [ "$CFG_JPEG" = "yes" ]; then
6496 QT_CONFIG="$QT_CONFIG jpeg"
6498 if [ "$CFG_LIBPNG" = "no" ]; then
6501 if [ "$CFG_LIBPNG" = "system" ]; then
6502 QT_CONFIG="$QT_CONFIG system-png"
6504 if [ "$CFG_PNG" = "no" ]; then
6505 QT_CONFIG="$QT_CONFIG no-png"
6506 elif [ "$CFG_PNG" = "yes" ]; then
6507 QT_CONFIG="$QT_CONFIG png"
6509 if [ "$CFG_GIF" = "no" ]; then
6510 QT_CONFIG="$QT_CONFIG no-gif"
6511 elif [ "$CFG_GIF" = "yes" ]; then
6512 QT_CONFIG="$QT_CONFIG gif"
6514 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6515 QT_CONFIG="$QT_CONFIG no-freetype"
6516 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6517 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6518 QT_CONFIG="$QT_CONFIG system-freetype"
6520 QT_CONFIG="$QT_CONFIG freetype"
6522 if [ "$CFG_GUI" = "auto" ]; then
6525 if [ "$CFG_GUI" = "no" ]; then
6526 QT_CONFIG="$QT_CONFIG no-gui"
6528 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6532 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6533 #On Mac we implicitly link against libz, so we
6534 #never use the 3rdparty stuff.
6535 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6537 if [ "$CFG_ZLIB" = "yes" ]; then
6538 QT_CONFIG="$QT_CONFIG zlib"
6539 elif [ "$CFG_ZLIB" = "system" ]; then
6540 QT_CONFIG="$QT_CONFIG system-zlib"
6543 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6544 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6545 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6546 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6547 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6548 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6549 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6550 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6551 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6552 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6553 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6554 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6555 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6556 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6557 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6559 if [ "$PLATFORM_X11" = "yes" ]; then
6560 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6562 # for some reason, the following libraries are not always built shared,
6563 # so *every* program/lib (including Qt) has to link against them
6564 if [ "$CFG_XSHAPE" = "yes" ]; then
6565 QT_CONFIG="$QT_CONFIG xshape"
6567 if [ "$CFG_XVIDEO" = "yes" ]; then
6568 QT_CONFIG="$QT_CONFIG xvideo"
6570 if [ "$CFG_XSYNC" = "yes" ]; then
6571 QT_CONFIG="$QT_CONFIG xsync"
6573 if [ "$CFG_XINERAMA" = "yes" ]; then
6574 QT_CONFIG="$QT_CONFIG xinerama"
6575 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6577 if [ "$CFG_XCURSOR" = "yes" ]; then
6578 QT_CONFIG="$QT_CONFIG xcursor"
6579 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6581 if [ "$CFG_XFIXES" = "yes" ]; then
6582 QT_CONFIG="$QT_CONFIG xfixes"
6583 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6585 if [ "$CFG_XRANDR" = "yes" ]; then
6586 QT_CONFIG="$QT_CONFIG xrandr"
6587 if [ "$CFG_XRENDER" != "yes" ]; then
6588 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6589 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6591 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6594 if [ "$CFG_XRENDER" = "yes" ]; then
6595 QT_CONFIG="$QT_CONFIG xrender"
6596 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6598 if [ "$CFG_MITSHM" = "yes" ]; then
6599 QT_CONFIG="$QT_CONFIG mitshm"
6601 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6602 QT_CONFIG="$QT_CONFIG fontconfig"
6604 if [ "$CFG_XINPUT" = "yes" ]; then
6605 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6607 if [ "$CFG_XINPUT" = "yes" ]; then
6608 QT_CONFIG="$QT_CONFIG xinput tablet"
6610 if [ "$CFG_XKB" = "yes" ]; then
6611 QT_CONFIG="$QT_CONFIG xkb"
6615 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6616 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6617 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6619 if [ "$PLATFORM_MAC" = "yes" ]; then
6620 if [ "$CFG_RPATH" = "yes" ]; then
6621 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6623 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | $AWK '/QMAKE_(LFLAGS_)?RPATH/ {print $3;}'`" ]; then
6624 if [ -n "$RPATH_FLAGS" ]; then
6626 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6630 elif [ "$CFG_RPATH" = "yes" ]; then
6631 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6635 if [ "$CFG_RPATH" = "yes" ]; then
6636 # set the default rpath to the library installation directory
6637 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6639 if [ -n "$RPATH_FLAGS" ]; then
6640 # add the user defined rpaths
6641 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6645 if [ '!' -z "$I_FLAGS" ]; then
6646 # add the user define include paths
6647 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6648 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6651 if [ '!' -z "$W_FLAGS" ]; then
6652 # add the user defined warning flags
6653 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6654 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6655 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6658 # turn off exceptions for the compilers that support it
6659 if [ "$PLATFORM_QWS" = "yes" ]; then
6660 COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
6661 elif [ "$XPLATFORM" != "$PLATFORM" ]; then
6662 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6664 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6666 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6670 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6671 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6674 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6675 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6676 # Follow default behavior of configure.exe by overriding with "rtti".
6677 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6680 if [ "$CFG_ALSA" = "yes" ]; then
6681 QT_CONFIG="$QT_CONFIG alsa"
6684 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6685 QT_CONFIG="$QT_CONFIG pulseaudio"
6688 if [ "$CFG_COREWLAN" = "yes" ]; then
6689 QT_CONFIG="$QT_CONFIG corewlan"
6692 if [ "$CFG_ICU" = "yes" ]; then
6693 QT_CONFIG="$QT_CONFIG icu"
6696 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6697 QT_CONFIG="$QT_CONFIG force_asserts"
6700 if [ "$CFG_PCRE" = "qt" ]; then
6701 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6705 # Some Qt modules are too advanced in C++ for some old compilers
6706 # Detect here the platforms where they are known to work.
6708 # See Qt documentation for more information on which features are
6709 # supported and on which compilers.
6711 canBuildQtConcurrent="yes"
6712 canUseV8Snapshot="yes"
6714 case "$XPLATFORM" in
6716 # PA-RISC's assembly is too limited
6717 # gcc 3.4 on that platform can't build QtXmlPatterns
6718 # the assembly it generates cannot be compiled
6720 # Check gcc's version
6721 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6725 canBuildQtXmlPatterns="no"
6729 canBuildQtXmlPatterns="no"
6733 unsupported/vxworks-*-g++*)
6736 unsupported/vxworks-*-dcc*)
6738 canBuildQtXmlPatterns="no"
6741 # Check gcc's version
6742 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6750 canBuildQtXmlPatterns="no"
6755 # Check the compiler version
6756 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6759 canBuildQtXmlPatterns="no"
6760 canBuildQtConcurrent="no"
6764 canBuildQtConcurrent="no"
6770 canBuildQtXmlPatterns="no"
6771 canBuildQtConcurrent="no"
6777 # Get the xlC version
6778 cat > xlcver.c <<EOF
6782 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6787 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6788 xlcver=`./xlcver 2>/dev/null`
6791 if [ "$OPT_VERBOSE" = "yes" ]; then
6792 if [ -n "$xlcver" ]; then
6793 echo Found IBM xlC version: $xlcver.
6795 echo Could not determine IBM xlC version, assuming oldest supported.
6802 canBuildQtXmlPatterns="no"
6803 canBuildQtConcurrent="no"
6807 canBuildQtConcurrent="no"
6813 canBuildQtConcurrent="no"
6817 if [ "$CFG_GUI" = "no" ]; then
6818 # WebKit requires QtGui
6822 if [ "$CFG_SHARED" = "no" ]; then
6824 echo "WARNING: Using static linking will disable the WebKit module."
6829 CFG_CONCURRENT="yes"
6830 if [ "$canBuildQtConcurrent" = "no" ]; then
6831 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6834 QT_CONFIG="$QT_CONFIG concurrent"
6838 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6839 QT_CONFIG="$QT_CONFIG audio-backend"
6843 if [ "$CFG_WEBKIT" = "debug" ]; then
6844 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6848 QT_CONFIG="$QT_CONFIG v8"
6849 # Detect snapshot support
6850 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6851 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6854 *) canUseV8Snapshot="no"
6858 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6859 # QEMU crashes when building inside Scratchbox with an ARM target
6860 canUseV8Snapshot="no"
6863 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6864 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6866 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6867 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6870 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6871 QT_CONFIG="$QT_CONFIG v8snapshot"
6875 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6876 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6879 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6882 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6883 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6884 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6889 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6890 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6891 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6898 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6904 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6906 case "$COMPILER_VERSION" in
6908 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6909 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6910 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6913 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6914 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6915 QT_GCC_PATCH_VERSION=0
6925 #-------------------------------------------------------------------------------
6926 # part of configuration information goes into qconfig.h
6927 #-------------------------------------------------------------------------------
6929 case "$CFG_QCONFIG" in
6931 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6934 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6935 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6936 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6937 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6938 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6939 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6941 echo "#endif" >>"$tmpconfig"
6945 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6949 # define QT_EDITION $QT_EDITION
6952 /* Machine byte-order */
6953 #define Q_BIG_ENDIAN 4321
6954 #define Q_LITTLE_ENDIAN 1234
6957 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6958 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6959 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6960 #if defined(__BIG_ENDIAN__)
6961 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6962 #elif defined(__LITTLE_ENDIAN__)
6963 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6965 # error "Unable to determine byte order!"
6969 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6971 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6972 if [ "$CFG_ENDIAN" = "auto" ]; then
6973 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6974 #if defined(__BIG_ENDIAN__)
6975 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6976 #elif defined(__LITTLE_ENDIAN__)
6977 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6979 # error "Unable to determine byte order!"
6983 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6985 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6987 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6988 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6989 /* Non-IEEE double format */
6990 #define Q_DOUBLE_LITTLE "01234567"
6991 #define Q_DOUBLE_BIG "76543210"
6992 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6993 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6994 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6997 if [ "$CFG_ARMFPA" = "yes" ]; then
6998 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6999 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7000 #ifndef QT_BOOTSTRAPPED
7005 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
7009 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7010 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7011 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7012 /* Machine Architecture */
7013 #ifndef QT_BOOTSTRAPPED
7014 # define QT_ARCH_${CFG_ARCH_STR}
7016 # define QT_ARCH_${CFG_HOST_ARCH_STR}
7020 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
7021 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
7023 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
7024 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
7027 if [ "$CFG_FRAMEWORK" = "yes" ]; then
7028 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
7031 if [ "$BUILD_ON_MAC" = "yes" ]; then
7032 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
7033 #if defined(__LP64__)
7034 # define QT_POINTER_SIZE 8
7036 # define QT_POINTER_SIZE 4
7040 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
7041 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
7044 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
7045 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
7046 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
7050 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
7052 if [ "$CFG_DEV" = "yes" ]; then
7053 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
7056 # Embedded compile time options
7057 if [ "$PLATFORM_QWS" = "yes" ]; then
7058 # Add QWS to config.h
7059 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
7061 # Add excluded decorations to $QCONFIG_FLAGS
7062 decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
7063 for decor in $decors; do
7064 NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7065 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
7068 # Figure which embedded drivers which are turned off
7069 CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
7070 for ADRIVER in $CFG_GFX_ON; do
7071 CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
7074 CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
7075 # the um driver is currently not in the available list for external builds
7076 if [ "$CFG_DEV" = "no" ]; then
7077 CFG_KBD_OFF="$CFG_KBD_OFF um"
7079 for ADRIVER in $CFG_KBD_ON; do
7080 CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
7083 CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
7084 for ADRIVER in $CFG_MOUSE_ON; do
7085 CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
7088 for DRIVER in $CFG_GFX_OFF; do
7089 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7090 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
7093 for DRIVER in $CFG_KBD_OFF; do
7094 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7095 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
7098 for DRIVER in $CFG_MOUSE_OFF; do
7099 NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7100 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
7104 if [ "$PLATFORM_QPA" = "yes" ]; then
7105 # Add QPA to config.h
7106 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
7109 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
7110 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
7113 # Add turned on SQL drivers
7114 for DRIVER in $CFG_SQL_AVAILABLE; do
7115 eval "VAL=\$CFG_SQL_$DRIVER"
7118 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7119 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
7120 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
7123 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
7129 QMakeVar set sql-drivers "$SQL_DRIVERS"
7130 QMakeVar set sql-plugins "$SQL_PLUGINS"
7132 # Add other configuration options to the qconfig.h file
7133 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7134 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7135 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7136 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
7137 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7138 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
7139 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
7141 # X11/Unix/Mac only configs
7142 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
7143 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
7144 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
7145 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7146 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7147 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7148 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
7149 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7150 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7151 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7152 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
7153 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
7154 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
7155 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
7156 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7158 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7159 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
7160 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
7161 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7162 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
7163 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
7164 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
7165 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
7166 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
7167 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
7168 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
7169 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
7170 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7172 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7173 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7174 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7175 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7176 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7177 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
7178 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
7179 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
7181 # sort QCONFIG_FLAGS for neatness if we can
7182 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7183 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
7185 if [ -n "$QCONFIG_FLAGS" ]; then
7186 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7187 #ifndef QT_BOOTSTRAPPED
7190 for cfg in $QCONFIG_FLAGS; do
7191 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7192 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7193 # figure out define logic, so we can output the correct
7194 # ifdefs to override the global defines in a project
7196 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
7197 # QT_NO_option can be forcefully turned on by QT_option
7198 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7199 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
7200 # QT_option can be forcefully turned off by QT_NO_option
7201 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7204 if [ -z $cfgdNeg ]; then
7205 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7212 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7213 #if defined($cfgd) && defined($cfgdNeg)
7215 #elif !defined($cfgd) && !defined($cfgdNeg)
7222 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7223 #endif // QT_BOOTSTRAPPED
7228 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7229 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7230 #define QT_VISIBILITY_AVAILABLE
7235 if [ -n "$QT_LIBINFIX" ]; then
7236 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7237 #define QT_LIBINFIX "$QT_LIBINFIX"
7242 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7243 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7244 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7246 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
7247 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7248 chmod -w "$outpath/src/corelib/global/qconfig.h"
7249 for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7250 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7254 #-------------------------------------------------------------------------------
7255 # save configuration into qconfig.pri
7256 #-------------------------------------------------------------------------------
7257 QTCONFIG="$outpath/mkspecs/qconfig.pri"
7258 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
7259 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7260 if [ "$CFG_DEBUG" = "yes" ]; then
7261 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
7262 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7263 QT_CONFIG="$QT_CONFIG release"
7265 QT_CONFIG="$QT_CONFIG debug"
7266 elif [ "$CFG_DEBUG" = "no" ]; then
7267 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
7268 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7269 QT_CONFIG="$QT_CONFIG debug"
7271 QT_CONFIG="$QT_CONFIG release"
7273 if [ "$CFG_STL" = "yes" ]; then
7274 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
7276 if [ "$CFG_FRAMEWORK" = "no" ]; then
7277 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
7279 QT_CONFIG="$QT_CONFIG qt_framework"
7280 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
7282 if [ "$BUILD_ON_MAC" = "yes" ]; then
7283 QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
7285 if [ "$CFG_DEV" = "yes" ]; then
7286 QT_CONFIG="$QT_CONFIG private_tests"
7289 # Make the application arch follow the Qt arch for single arch builds.
7290 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7291 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7292 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7295 cat >>"$QTCONFIG.tmp" <<EOF
7297 CONFIG += $QTCONFIG_CONFIG
7299 QT_EDITION = $Edition
7300 QT_CONFIG += $QT_CONFIG
7303 QT_VERSION = $QT_VERSION
7304 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7305 QT_MINOR_VERSION = $QT_MINOR_VERSION
7306 QT_PATCH_VERSION = $QT_PATCH_VERSION
7309 QT_LIBINFIX = $QT_LIBINFIX
7310 QT_NAMESPACE = $QT_NAMESPACE
7313 if [ -n "$CFG_SYSROOT" ]; then
7314 echo "# sysroot" >>"$QTCONFIG.tmp"
7315 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
7316 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
7317 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7318 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7319 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
7320 echo "}" >> "$QTCONFIG.tmp"
7321 echo >> "$QTCONFIG.tmp"
7323 if [ "$CFG_RPATH" = "yes" ]; then
7324 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7326 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7327 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7328 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7329 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7332 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
7333 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
7334 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
7337 # replace qconfig.pri if it differs from the newly created temp file
7338 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7339 rm -f "$QTCONFIG.tmp"
7341 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7344 #-------------------------------------------------------------------------------
7345 # save configuration into qmodule.pri
7346 #-------------------------------------------------------------------------------
7347 QTMODULE="$outpath/mkspecs/qmodule.pri"
7349 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
7351 # Ensure we can link to uninistalled libraries
7352 if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
7353 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
7355 if [ -n "$QT_CFLAGS_PSQL" ]; then
7356 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
7358 if [ -n "$QT_LFLAGS_PSQL" ]; then
7359 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
7361 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7362 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
7364 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7365 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
7367 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7368 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
7370 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7371 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
7373 if [ -n "$QT_LFLAGS_ODBC" ]; then
7374 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
7376 if [ -n "$QT_LFLAGS_TDS" ]; then
7377 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
7380 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7381 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
7384 #dump in the OPENSSL_LIBS info
7385 if [ '!' -z "$OPENSSL_LIBS" ]; then
7386 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
7387 elif [ "$CFG_OPENSSL" = "linked" ]; then
7388 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
7391 #dump in the SDK info
7392 if [ '!' -z "$CFG_SDK" ]; then
7393 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
7397 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
7398 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
7400 # replace qmodule.pri if it differs from the newly created temp file
7401 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
7402 rm -f "$QTMODULE.tmp"
7404 mv -f "$QTMODULE.tmp" "$QTMODULE"
7407 #-------------------------------------------------------------------------------
7408 # save configuration into .qmake.cache
7409 #-------------------------------------------------------------------------------
7411 CACHEFILE="$outpath/.qmake.cache"
7412 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7413 cat >>"$CACHEFILE.tmp" <<EOF
7415 QT_SOURCE_TREE = \$\$quote($relpath)
7416 QT_BUILD_TREE = \$\$quote($outpath)
7417 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7419 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7420 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7421 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7422 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7423 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7424 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7426 include(\$\$PWD/mkspecs/qmodule.pri)
7427 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
7428 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7429 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7433 #dump the qmake spec
7434 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7435 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7437 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7442 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
7443 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7444 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
7445 # don't need to worry about generated files
7446 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7447 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
7449 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7451 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7452 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7455 # replace .qmake.cache if it differs from the newly created temp file
7456 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7457 rm -f "$CACHEFILE.tmp"
7459 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7462 #-------------------------------------------------------------------------------
7463 # give feedback on configuration
7464 #-------------------------------------------------------------------------------
7468 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7471 This target is using the GNU C++ compiler ($PLATFORM).
7473 Recent versions of this compiler automatically include code for
7474 exceptions, which increase both the size of the Qt libraries and
7475 the amount of memory taken by your applications.
7477 You may choose to re-run `basename $0` with the -no-exceptions
7478 option to compile Qt without exceptions. This is completely binary
7479 compatible, and existing applications will continue to work.
7487 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7490 This target is using the MIPSpro C++ compiler ($PLATFORM).
7492 You may choose to re-run `basename $0` with the -no-exceptions
7493 option to compile Qt without exceptions. This will make the
7494 size of the Qt library smaller and reduce the amount of memory
7495 taken by your applications.
7507 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7508 echo "Build type: $PLATFORM"
7510 echo "Building on: $PLATFORM"
7511 echo "Building for: $XPLATFORM"
7514 if [ ! -z "$CFG_MAC_ARCHS" ]; then
7515 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7517 echo "Architecture: $CFG_ARCH"
7520 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
7521 echo "Host architecture: $CFG_HOST_ARCH"
7524 if [ -n "$PLATFORM_NOTES" ]; then
7525 echo "Platform notes:"
7526 echo "$PLATFORM_NOTES"
7531 if [ "$OPT_VERBOSE" = "yes" ]; then
7532 echo $ECHO_N "qmake vars .......... $ECHO_C"
7533 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7534 echo "qmake switches ......... $QMAKE_SWITCHES"
7537 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7538 echo "Build .................. $CFG_BUILD_PARTS"
7539 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7540 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7541 echo "Debug .................. yes (combined)"
7542 if [ "$CFG_DEBUG" = "yes" ]; then
7543 echo "Default Link ........... debug"
7545 echo "Default Link ........... release"
7548 echo "Debug .................. $CFG_DEBUG"
7550 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7551 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7552 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7553 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7554 echo "QtGui module ........... $CFG_GUI"
7555 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7556 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7558 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7560 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7561 echo "STL support ............ $CFG_STL"
7562 echo "PCH support ............ $CFG_PRECOMPILE"
7563 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7564 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7565 echo "AVX..................... ${CFG_AVX}"
7566 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7567 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7568 echo "NEON support ........... ${CFG_NEON}"
7570 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
7571 echo "getaddrinfo support .... $CFG_GETADDRINFO"
7572 echo "getifaddrs support ..... $CFG_GETIFADDRS"
7573 echo "Accessibility .......... $CFG_ACCESSIBILITY"
7574 echo "NIS support ............ $CFG_NIS"
7575 echo "CUPS support ........... $CFG_CUPS"
7576 echo "Iconv support .......... $CFG_ICONV"
7577 echo "Glib support ........... $CFG_GLIB"
7578 echo "GStreamer support ...... $CFG_GSTREAMER"
7579 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7580 echo "Large File support ..... $CFG_LARGEFILE"
7581 echo "GIF support ............ $CFG_GIF"
7582 if [ "$CFG_JPEG" = "no" ]; then
7583 echo "JPEG support ........... $CFG_JPEG"
7585 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
7587 if [ "$CFG_PNG" = "no" ]; then
7588 echo "PNG support ............ $CFG_PNG"
7590 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
7592 echo "zlib support ........... $CFG_ZLIB"
7593 echo "Session management ..... $CFG_SM"
7594 if [ "$PLATFORM_QWS" = "yes" ]; then
7595 echo "Embedded support ....... $CFG_EMBEDDED"
7596 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7597 echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7599 echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
7601 # Normalize the decoration output first
7602 CFG_GFX_ON=`echo ${CFG_GFX_ON}`
7603 CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
7604 echo "Graphics (qt) .......... ${CFG_GFX_ON}"
7605 echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
7606 CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
7607 CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
7608 echo "Decorations (qt) ....... $CFG_DECORATION_ON"
7609 echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
7610 CFG_KBD_ON=`echo ${CFG_KBD_ON}`
7611 CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
7612 echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
7613 echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
7614 CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
7615 CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
7616 echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
7617 echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
7619 if [ "$CFG_OPENGL" = "desktop" ]; then
7620 echo "OpenGL support ......... yes (Desktop OpenGL)"
7621 elif [ "$CFG_OPENGL" = "es2" ]; then
7622 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
7624 echo "OpenGL support ......... no"
7626 if [ "$CFG_EGL" != "no" ]; then
7627 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7628 echo "EGL support ............ yes <GLES/egl.h>"
7630 echo "EGL support ............ yes <EGL/egl.h>"
7633 if [ "$CFG_OPENVG" ]; then
7634 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7635 echo "OpenVG support ......... ShivaVG"
7637 echo "OpenVG support ......... $CFG_OPENVG"
7640 if [ "$PLATFORM_X11" = "yes" ]; then
7641 echo "NAS sound support ...... $CFG_NAS"
7642 echo "XShape support ......... $CFG_XSHAPE"
7643 echo "XVideo support ......... $CFG_XVIDEO"
7644 echo "XSync support .......... $CFG_XSYNC"
7645 echo "Xinerama support ....... $CFG_XINERAMA"
7646 echo "Xcursor support ........ $CFG_XCURSOR"
7647 echo "Xfixes support ......... $CFG_XFIXES"
7648 echo "Xrandr support ......... $CFG_XRANDR"
7649 echo "Xi support ............. $CFG_XINPUT"
7650 echo "MIT-SHM support ........ $CFG_MITSHM"
7651 echo "FontConfig support ..... $CFG_FONTCONFIG"
7652 echo "XKB Support ............ $CFG_XKB"
7653 echo "immodule support ....... $CFG_IM"
7654 echo "GTK theme support ...... $CFG_QGTKSTYLE"
7656 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
7657 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
7658 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
7659 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
7660 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
7661 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
7662 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
7663 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
7664 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
7667 if [ "$CFG_OPENSSL" = "yes" ]; then
7668 OPENSSL_LINKAGE="(run-time)"
7669 elif [ "$CFG_OPENSSL" = "linked" ]; then
7670 OPENSSL_LINKAGE="(linked)"
7672 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
7673 echo "Alsa support ........... $CFG_ALSA"
7674 if [ "$BUILD_ON_MAC" = "yes" ]; then
7675 echo "CoreWlan support ....... $CFG_COREWLAN"
7677 echo "libICU support ......... $CFG_ICU"
7678 echo "PCRE support ........... $CFG_PCRE"
7679 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7680 echo "Xcb support ............ limited (old version)"
7682 echo "Xcb support ............ $CFG_XCB"
7684 echo "Xrender support ........ $CFG_XRENDER"
7685 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7686 echo "XInput2 support ........ $CFG_XINPUT2"
7690 # complain about not being able to use dynamic plugins if we are using a static build
7691 if [ "$CFG_SHARED" = "no" ]; then
7693 echo "WARNING: Using static linking will disable the use of dynamically"
7694 echo "loaded plugins. Make sure to import all needed static plugins,"
7695 echo "or compile needed modules into the library."
7698 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7700 echo "NOTE: When linking against OpenSSL, you can override the default"
7701 echo "library names through OPENSSL_LIBS."
7703 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
7706 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7708 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
7709 echo "if you want a pure debug build."
7714 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7719 #-------------------------------------------------------------------------------
7720 # build makefiles based on the configuration
7721 #-------------------------------------------------------------------------------
7723 echo "Finding project files. Please wait..."
7724 if [ "$CFG_NOPROCESS" != "yes" ]; then
7725 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7726 if [ -f "${relpath}/qtbase.pro" ]; then
7727 mkfile="${outpath}/Makefile"
7728 [ -f "$mkfile" ] && chmod +w "$mkfile"
7729 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7733 # .projects -> projects to process
7734 # .projects.1 -> qt and moc
7735 # .projects.2 -> subdirs and libs
7736 # .projects.3 -> the rest
7737 rm -f .projects .projects.1 .projects.2 .projects.3
7739 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7740 if [ -z "$AWK" ]; then
7741 for p in `echo $QMAKE_PROJECTS`; do
7742 echo "$p" >> .projects
7745 cat >projects.awk <<EOF
7751 first = "./.projects.1.tmp"
7752 second = "./.projects.2.tmp"
7753 third = "./.projects.3.tmp"
7758 if ( ! target_file )
7760 print input_file >target_file
7765 input_file = FILENAME
7770 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7773 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7774 target_file = second
7779 matched_target == 0 && /^(TEMPLATE.*=)/ {
7780 if ( \$3 == "subdirs" )
7781 target_file = second
7782 else if ( \$3 == "lib" )
7788 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7789 if ( \$0 ~ /plugin/ )
7792 target_file = second
7797 if ( ! target_file )
7799 print input_file >>target_file
7806 for p in `echo $QMAKE_PROJECTS`; do
7807 echo "$p" >> .projects.all
7810 # if you get errors about the length of the command line to awk, change the -l arg
7812 split -l 100 .projects.all .projects.all.
7813 for p in .projects.all.*; do
7814 "$AWK" -f projects.awk `cat $p`
7815 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7816 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7817 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7818 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7820 rm -f .projects.all* projects.awk
7822 [ -f .projects.1 ] && cat .projects.1 >>.projects
7823 [ -f .projects.2 ] && cat .projects.2 >>.projects
7824 rm -f .projects.1 .projects.2
7825 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7826 cat .projects.3 >>.projects
7830 # don't sort Qt and MOC in with the other project files
7831 # also work around a segfaulting uniq(1)
7832 if [ -f .sorted.projects.2 ]; then
7833 sort .sorted.projects.2 > .sorted.projects.2.new
7834 mv -f .sorted.projects.2.new .sorted.projects.2
7835 cat .sorted.projects.2 >> .sorted.projects.1
7837 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7838 rm -f .sorted.projects.2 .sorted.projects.1
7842 if [ -f .projects ]; then
7843 uniq .projects >.tmp
7844 mv -f .tmp .projects
7845 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7847 if [ -f .projects.3 ]; then
7848 uniq .projects.3 >.tmp
7849 mv -f .tmp .projects.3
7850 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7852 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7856 for part in $CFG_BUILD_PARTS; do
7858 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7859 libs) PART_ROOTS="$PART_ROOTS src" ;;
7860 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7861 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7866 if [ "$CFG_DEV" = "yes" ]; then
7867 PART_ROOTS="$PART_ROOTS tests"
7870 echo "Creating makefiles. Please wait..."
7871 for file in .projects .projects.3; do
7872 [ '!' -f "$file" ] && continue
7873 for a in `cat $file`; do
7875 for r in $PART_ROOTS; do
7876 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7881 [ "$IN_ROOT" = "no" ] && continue
7884 *winmain/winmain.pro)
7885 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7889 */qmake/qmake.pro) continue ;;
7890 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7891 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7897 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7898 test -d "$dir" || mkdir -p "$dir"
7899 OUTDIR="$outpath/$dir"
7900 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7901 # fast configure - the makefile exists, skip it
7902 # since the makefile exists, it was generated by qmake, which means we
7903 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7905 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7908 QMAKE_SPEC_ARGS="-spec $SPEC"
7909 echo $ECHO_N " for $a$ECHO_C"
7911 QMAKE="$outpath/bin/qmake"
7912 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7913 if [ "$file" = ".projects.3" ]; then
7916 cat >"${OUTDIR}/Makefile" <<EOF
7917 # ${OUTDIR}/Makefile: generated by configure
7919 # WARNING: This makefile will be replaced with a real makefile.
7920 # All changes made to this file will be lost.
7922 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7924 cat >>"${OUTDIR}/Makefile" <<EOF
7926 all clean install qmake first Makefile: FORCE
7927 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7935 if [ "$OPT_VERBOSE" = "yes" ]; then
7936 echo " (`basename $SPEC`)"
7937 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7942 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7943 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7947 rm -f .projects .projects.3
7949 #-------------------------------------------------------------------------------
7950 # check for platforms that we don't yet know about
7951 #-------------------------------------------------------------------------------
7952 if [ "$CFG_ARCH" = "generic" ]; then
7955 NOTICE: Atomic operations are not yet supported for this
7958 Qt will use the 'generic' architecture instead, which uses a
7959 single pthread_mutex_t to protect all atomic operations. This
7960 implementation is the slow (but safe) fallback implementation
7961 for architectures Qt does not yet support.
7965 #-------------------------------------------------------------------------------
7966 # check if the user passed the -no-zlib option, which is no longer supported
7967 #-------------------------------------------------------------------------------
7968 if [ -n "$ZLIB_FORCED" ]; then
7969 which_zlib="supplied"
7970 if [ "$CFG_ZLIB" = "system" ]; then
7976 NOTICE: The -no-zlib option was supplied but is no longer
7979 Qt now requires zlib support in all builds, so the -no-zlib
7980 option was ignored. Qt will be built using the $which_zlib
7985 #-------------------------------------------------------------------------------
7986 # finally save the executed command to another script
7987 #-------------------------------------------------------------------------------
7988 if [ `basename $0` != "config.status" ]; then
7989 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7991 # add the system variables
7992 for varname in $SYSTEM_VARIABLES; do
7994 'if [ -n "\$'${varname}'" ]; then
7995 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
8000 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
8002 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
8003 echo "#!/bin/sh" > "$outpath/config.status"
8004 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
8005 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
8006 echo "else" >> "$outpath/config.status"
8007 echo " $CONFIG_STATUS" >> "$outpath/config.status"
8008 echo "fi" >> "$outpath/config.status"
8009 chmod +x "$outpath/config.status"
8012 if [ -n "$RPATH_MESSAGE" ]; then
8014 echo "$RPATH_MESSAGE"
8017 MAKE=`basename "$MAKE"`
8019 echo Qt is now configured for building. Just run \'$MAKE\'.
8020 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
8021 echo Once everything is built, Qt is installed.
8022 echo You should not run \'$MAKE install\'.
8024 echo Once everything is built, you must run \'$MAKE install\'.
8025 echo Qt will be installed into $QT_INSTALL_PREFIX
8028 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.