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"
134 values["LITERAL_WHITESPACE"] = " "
135 values["LITERAL_DOLLAR"] = "$"
137 /^[_A-Z0-9.]+[ \t]*\+?=/ {
138 valStart = index($0, "=") + 1
141 if (substr($0, valStart - 2, 1) == "+") {
145 variable = substr($0, 0, valStart - 2 - append)
146 value = substr($0, valStart)
147 gsub("[ \t]+", "", variable)
148 gsub("^[ \t]+", "", value)
149 gsub("[ \t]+$", "", value)
152 while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
153 ovalue = ovalue substr(value, 1, RSTART - 1)
154 var = substr(value, RSTART + 2, RLENGTH - 2)
155 value = substr(value, RSTART + RLENGTH)
157 var = substr(var, 2, length(var) - 2)
159 ovalue = ovalue values[var]
161 ovalue = ovalue value
163 combinedValue = values[variable]
164 if (append == 1 && length(combinedValue) > 0) {
165 combinedValue = combinedValue " " ovalue
167 combinedValue = ovalue
169 values[variable] = combinedValue
172 for (var in values) {
173 print var "=" values[var]
181 echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
184 # relies on $QMAKESPEC being set correctly. parses include statements in
185 # qmake.conf and prints out the expanded file
188 if [ -z "$specvals" ]; then
189 specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
191 getQMakeConf3 "$1" "$specvals"
196 if [ -z "$xspecvals" ]; then
197 xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
199 getQMakeConf3 "$1" "$xspecvals"
202 # relies on $TEST_COMPILER being set correctly
203 compilerSupportsFlag()
205 cat >conftest.cpp <<EOF
206 int main() { return 0; }
208 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
210 rm -f conftest.cpp conftest.o
214 # relies on $TEST_COMPILER being set correctly
220 safe_flag=`shellEscape "$flag"`
221 lflags=$lflags,$safe_flag
223 compilerSupportsFlag "$lflags" >/dev/null 2>&1
226 #-------------------------------------------------------------------------------
227 # operating system detection
228 #-------------------------------------------------------------------------------
230 # need that throughout the script
231 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
232 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
233 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
234 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
236 # detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
237 if echo '\c' | grep '\c' >/dev/null; then
243 #-------------------------------------------------------------------------------
244 # window system detection
245 #-------------------------------------------------------------------------------
251 if [ -d /System/Library/Frameworks/Carbon.framework ]; then
256 #-----------------------------------------------------------------------------
257 # Qt version detection
258 #-----------------------------------------------------------------------------
259 QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
263 if [ -n "$QT_VERSION" ]; then
264 QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
265 MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
266 if [ -n "$MAJOR" ]; then
267 MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
268 PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
269 QT_MAJOR_VERSION="$MAJOR"
270 [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
271 [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
274 if [ -z "$QT_MAJOR_VERSION" ]; then
275 echo "Cannot process version from qglobal.h: $QT_VERSION"
276 echo "Cannot proceed."
280 QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
281 if [ -z "$QT_PACKAGEDATE" ]; then
282 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
283 echo "Cannot proceed"
287 #-------------------------------------------------------------------------------
289 #-------------------------------------------------------------------------------
293 EditionString=Commercial
297 # parse the arguments, setting things to "yes" or "no"
298 while [ "$#" -gt 0 ]; do
302 #Autoconf style options
304 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
308 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
312 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
313 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
316 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
321 # this option may or may not be followed by an argument
322 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
329 -h|help|--help|-help)
330 if [ "$VAL" = "yes" ]; then
332 COMMERCIAL_USER="no" #doesn't matter we will display the help
335 COMMERCIAL_USER="no" #doesn't matter we will display the help
339 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
343 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
350 if [ "$UNKNOWN_ARG" = "yes" ]; then
359 if [ "$PLATFORM_QPA" != "no" ]; then
360 if [ "$PLATFORM_QPA" = "maybe" ]; then
366 echo "No license exists to enable Qt QPA. Disabling."
373 COMMERCIAL_USER="yes"
387 if [ "$COMMERCIAL_USER" = "ask" ]; then
389 echo "Which edition of Qt do you want to use ?"
391 echo "Type 'c' if you want to use the Commercial Edition."
392 echo "Type 'o' if you want to use the Open Source Edition."
396 if [ "$commercial" = "c" ]; then
397 COMMERCIAL_USER="yes"
399 elif [ "$commercial" = "o" ]; then
406 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
407 # Commercial preview release
408 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
411 QT_EDITION="QT_EDITION_DESKTOP"
412 LicenseType="Technology Preview"
413 elif [ $COMMERCIAL_USER = "yes" ]; then
414 # one of commercial editions
415 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
416 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
418 # read in the license file
419 if [ -f "$LICENSE_FILE" ]; then
420 . "$LICENSE_FILE" >/dev/null 2>&1
421 if [ -z "$LicenseKeyExt" ]; then
423 echo "You are using an old license file."
425 echo "Please install the license file supplied by Nokia,"
426 echo "or install the Qt Open Source Edition if you intend to"
427 echo "develop free software."
430 if [ -z "$Licensee" ]; then
432 echo "Invalid license key. Please check the license key."
436 if [ -z "$LicenseKeyExt" ]; then
438 echo $ECHO_N "Please enter your license key: $ECHO_C"
440 Licensee="Unknown user"
445 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
446 && LicenseValid="yes" \
448 if [ "$LicenseValid" != "yes" ]; then
450 echo "Invalid license key. Please check the license key."
453 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
454 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
455 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
456 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
458 # determine which edition we are licensed to use
459 case "$LicenseTypeCode" in
461 LicenseType="Commercial"
465 QT_EDITION="QT_EDITION_UNIVERSAL"
468 Edition="FullFramework"
469 EditionString="Full Framework"
470 QT_EDITION="QT_EDITION_DESKTOP"
473 Edition="GUIFramework"
474 EditionString="GUI Framework"
475 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
480 LicenseType="Evaluation"
481 QMakeVar add DEFINES QT_EVAL
485 QT_EDITION="QT_EDITION_EVALUATION"
490 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
492 echo "Invalid license key. Please check the license key."
496 # verify that we are licensed to use Qt on this platform
498 case "$PlatformCode" in
501 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
505 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
508 ### EMBEDDED_QPA logic missing ###
509 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
510 X9,* | XC,* | XU,* | XW,* | XM,*)
512 LICENSE_EXTENSION="-ALLOS"
514 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
515 # Qt for Embedded Linux
516 LICENSE_EXTENSION="-EMBEDDED"
518 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
520 LICENSE_EXTENSION="-EMBEDDED"
522 FM,*,no | LM,yes,* | ZM,no,no)
524 LICENSE_EXTENSION="-DESKTOP"
528 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
530 echo "You are not licensed for the $Platform platform."
532 echo "Please contact qt-info@nokia.com to upgrade your license to"
533 echo "include the $Platform platform, or install the Qt Open Source Edition"
534 echo "if you intend to develop free software."
539 if test -r "$relpath/.LICENSE"; then
540 # Generic, non-final license
542 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
547 *TECHNOLOGY?PREVIEW*)
554 echo >&2 "Invalid license files; cannot continue"
559 EditionString="$Edition"
560 QT_EDITION="QT_EDITION_DESKTOP"
563 case "$LicenseFeatureCode" in
566 case "$LicenseType" in
568 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
571 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
577 case "$LicenseType" in
579 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
582 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
588 echo "Invalid license key. Please check the license key."
592 case "$LicenseFeatureCode" in
600 if [ '!' -f "$outpath/LICENSE" ]; then
601 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
602 echo "this software has disappeared."
604 echo "Sorry, you are not licensed to use this software."
605 echo "Try re-installing."
609 elif [ $COMMERCIAL_USER = "no" ]; then
610 # Open Source edition - may only be used under the terms of the GPL or LGPL.
611 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
612 Licensee="Open Source"
614 EditionString="Open Source"
615 QT_EDITION="QT_EDITION_OPENSOURCE"
618 #-------------------------------------------------------------------------------
619 # initalize variables
620 #-------------------------------------------------------------------------------
622 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
623 for varname in $SYSTEM_VARIABLES; do
624 qmakevarname="${varname}"
625 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
626 if [ "${varname}" = "LDFLAGS" ]; then
627 qmakevarname="LFLAGS"
628 elif [ "${varname}" = "LD" ]; then
632 'if [ -n "\$'${varname}'" ]; then
633 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
637 # Use CC/CXX to run config.tests
638 mkdir -p "$outpath/config.tests"
639 rm -f "$outpath/config.tests/.qmake.cache"
640 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
642 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
643 QMakeVar add decorations "default windows styled"
644 QMakeVar add mouse-drivers "pc"
645 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
646 QMakeVar add gfx-drivers "linuxfb"
647 QMakeVar add mouse-drivers "linuxtp"
649 QMakeVar add kbd-drivers "tty"
651 if [ "$CFG_DEV" = "yes" ]; then
652 QMakeVar add kbd-drivers "um"
655 # QTDIR may be set and point to an old or system-wide Qt installation
658 # the minimum version of libdbus-1 that we require:
659 MIN_DBUS_1_VERSION=0.93
661 # initalize internal variables
662 CFG_CONFIGURE_EXIT_ON_ERROR=yes
664 CFG_EXCEPTIONS=unspecified
665 CFG_GUI=auto # (yes|no|auto)
691 CFG_OPENVG_LC_INCLUDES=no
692 CFG_OPENVG_SHIVA=auto
693 CFG_OPENVG_ON_OPENGL=auto
695 CFG_EGL_GLES_INCLUDES=no
700 QT_DEFAULT_BUILD_PARTS="libs examples tests"
704 CFG_AUDIO_BACKEND=auto
706 CFG_DECLARATIVE_DEBUG=yes
707 CFG_JAVASCRIPTCORE_JIT=auto
709 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
710 CFG_GFX_ON="linuxfb multiscreen"
711 CFG_GFX_PLUGIN_AVAILABLE=
714 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
715 CFG_KBD_ON="tty" #default, see QMakeVar above
716 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
717 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
721 CFG_KBD_PLUGIN_AVAILABLE=
724 CFG_MOUSE_PLUGIN_AVAILABLE=
729 CFG_DECORATION_AVAILABLE="styled windows default"
730 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
731 CFG_DECORATION_PLUGIN_AVAILABLE=
732 CFG_DECORATION_PLUGIN=
752 CFG_SEPARATE_DEBUG_INFO=no
753 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
754 CFG_REDUCE_EXPORTS=auto
764 CFG_REDUCE_RELOCATIONS=auto
766 CFG_ACCESSIBILITY=auto
769 CFG_DOUBLEFORMAT=auto
773 CFG_CLOCK_GETTIME=auto
774 CFG_CLOCK_MONOTONIC=auto
783 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
787 CFG_PREFIX_INSTALL=yes
796 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
797 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
801 OPT_CONFIRM_LICENSE=no
815 # initalize variables used for installation
824 QT_INSTALL_TRANSLATIONS=
830 #flags for SQL drivers
838 QT_LFLAGS_ODBC="-lodbc"
841 # flags for libdbus-1
845 # flags for Glib (X11 only)
849 # flags for GStreamer (X11 only)
853 #-------------------------------------------------------------------------------
854 # check SQL drivers, mouse drivers and decorations available in this package
855 #-------------------------------------------------------------------------------
857 # opensource version removes some drivers, so force them to be off
863 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
864 for a in "$relpath/src/plugins/sqldrivers/"*; do
866 base_a=`basename "$a"`
867 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
868 eval "CFG_SQL_${base_a}=auto"
873 CFG_DECORATION_PLUGIN_AVAILABLE=
874 if [ -d "$relpath/src/plugins/decorations" ]; then
875 for a in "$relpath/src/plugins/decorations/"*; do
877 base_a=`basename "$a"`
878 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
883 CFG_KBD_PLUGIN_AVAILABLE=
884 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
885 for a in "$relpath/src/plugins/kbddrivers/"*; do
887 base_a=`basename "$a"`
888 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
893 CFG_MOUSE_PLUGIN_AVAILABLE=
894 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
895 for a in "$relpath/src/plugins/mousedrivers/"*; do
897 base_a=`basename "$a"`
898 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
903 CFG_GFX_PLUGIN_AVAILABLE=
904 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
905 for a in "$relpath/src/plugins/gfxdrivers/"*; do
907 base_a=`basename "$a"`
908 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
911 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
914 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
915 if [ -d "$relpath/src/plugins/imageformats" ]; then
916 for a in "$relpath/src/plugins/imageformats/"*; do
918 base_a=`basename "$a"`
919 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
924 #-------------------------------------------------------------------------------
925 # parse command line arguments
926 #-------------------------------------------------------------------------------
928 # parse the arguments, setting things to "yes" or "no"
929 while [ "$#" -gt 0 ]; do
933 #Autoconf style options
935 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
939 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
943 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
944 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
947 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
951 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
955 -no-*-*|-plugin-*-*|-qt-*-*)
956 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
957 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
961 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
964 #Qt style yes options
965 -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)
966 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
969 #Qt style options that pass an argument
971 if [ "$PLATFORM_QPA" != "yes" ]; then
973 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
977 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
981 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
982 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
986 #Qt style complex options in one command
987 -enable-*|-disable-*)
988 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
989 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
991 #Qt Builtin/System style options
992 -no-*|-system-*|-qt-*)
993 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
994 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
996 #Options that cannot be generalized
1001 -embedded-lite|-qpa)
1003 # this option may or may not be followed by an argument
1004 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1013 # this option may or may not be followed by an argument
1014 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1023 # this option may or may not be followed by an argument
1024 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1032 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1033 # this option may or may not be followed by an argument
1034 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1043 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1047 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1061 if [ "$1" = "-D" ]; then
1065 VAL=`echo $1 | sed 's,-D,,'`
1070 # this option may or may not be followed by an argument
1071 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1080 if [ "$1" = "-I" ]; then
1084 VAL=`echo $1 | sed 's,-I,,'`
1089 if [ "$1" = "-L" ]; then
1093 VAL=`echo $1 | sed 's,-L,,'`
1098 if [ "$1" = "-R" ]; then
1102 VAL=`echo $1 | sed 's,-R,,'`
1107 VAL=`echo $1 | sed 's,-l,,'`
1111 if [ "$1" = "-F" ]; then
1115 VAL=`echo $1 | sed 's,-F,,'`
1120 if [ "$1" = "-fw" ]; then
1124 VAL=`echo $1 | sed 's,-fw,,'`
1132 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1139 if [ "$UNKNOWN_ARG" = "yes" ]; then
1140 echo "$1: unknown argument"
1151 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1152 CFG_ACCESSIBILITY="$VAL"
1161 CFG_USE_GNUMAKE="$VAL"
1164 CFG_MYSQL_CONFIG="$VAL"
1167 QT_INSTALL_PREFIX="$VAL"
1170 QT_HOST_PREFIX="$VAL"
1173 QT_FORCE_PKGCONFIG=yes
1176 QT_INSTALL_DOCS="$VAL"
1179 QT_INSTALL_HEADERS="$VAL"
1182 QT_INSTALL_PLUGINS="$VAL"
1185 QT_INSTALL_IMPORTS="$VAL"
1188 QT_INSTALL_DATA="$VAL"
1191 QT_INSTALL_LIBS="$VAL"
1200 QT_INSTALL_TRANSLATIONS="$VAL"
1202 sysconfdir|settingsdir)
1203 QT_INSTALL_SETTINGS="$VAL"
1206 QT_INSTALL_EXAMPLES="$VAL"
1209 QT_INSTALL_TESTS="$VAL"
1218 QT_INSTALL_BINS="$VAL"
1229 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1236 if [ "$VAL" = "little" ]; then
1237 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1238 elif [ "$VAL" = "big" ]; then
1239 CFG_ENDIAN="Q_BIG_ENDIAN"
1245 if [ "$VAL" = "little" ]; then
1246 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1247 elif [ "$VAL" = "big" ]; then
1248 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1254 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1261 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1262 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1263 [ "$VAL" = "es2" ]; then
1265 if [ "$VAL" = "es2" ]; then
1273 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1275 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1282 qvfb) # left for commandline compatibility, not documented
1283 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1284 if [ "$VAL" = "yes" ]; then
1285 QMakeVar add gfx-drivers qvfb
1286 QMakeVar add kbd-drivers qvfb
1287 QMakeVar add mouse-drivers qvfb
1288 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1289 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1290 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1297 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1300 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1308 if [ "$BUILD_ON_MAC" = "yes" ]; then
1315 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1316 CFG_MAC_DWARF2="$VAL"
1322 # if this is a Mac then "windows" probably means
1323 # we are cross-compiling for MinGW
1324 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1325 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1334 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1335 CFG_MAC_HARFBUZZ="$VAL"
1342 if [ "$BUILD_ON_MAC" = "yes" ]; then
1343 CFG_FRAMEWORK="$VAL"
1349 if [ "$VAL" = "yes" ]; then
1351 QMakeVar add QMAKE_CFLAGS -pg
1352 QMakeVar add QMAKE_CXXFLAGS -pg
1353 QMakeVar add QMAKE_LFLAGS -pg
1354 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1360 if [ "$VAL" = "yes" ]; then
1361 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1364 exceptions|g++-exceptions)
1365 if [ "$VAL" = "no" ]; then
1367 elif [ "$VAL" = "yes" ]; then
1375 # keep compatibility with old platform names
1381 PLATFORM=hpux-acc-o64
1384 PLATFORM=hpux-acc-64
1387 PLATFORM=hpux-acc-64
1399 PLATFORM=reliant-cds-64
1402 PLATFORM=solaris-cc-64
1405 PLATFORM=unixware-cc
1408 PLATFORM=unixware-g++
1411 PLATFORM=unixware-cc
1414 PLATFORM=unixware-g++
1420 i386) NATIVE_64_ARCH="x86_64" ;;
1421 powerpc) NATIVE_64_ARCH="ppc64" ;;
1422 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1424 if [ ! -z "$NATIVE_64_ARCH" ]; then
1425 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1432 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1435 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1436 CFG_DEBUG_RELEASE="$VAL"
1442 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1443 CFG_RELEASE_QMAKE="$VAL"
1449 if [ "$VAL" = "yes" ]; then
1451 elif [ "$VAL" = "no" ]; then
1458 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1459 CFG_PREFIX_INSTALL="$VAL"
1467 developer-build|commercial|opensource)
1468 # These switches have been dealt with already
1471 if [ "$VAL" = "yes" ]; then
1473 elif [ "$VAL" = "no" ]; then
1480 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1481 CFG_INCREMENTAL="$VAL"
1487 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1488 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1494 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1495 if [ "$VAL" = "no" ]; then
1496 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1497 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1498 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1504 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1511 if [ "$VAL" = "no" ]; then
1518 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1526 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1533 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1540 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1547 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1554 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1561 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1568 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1575 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1582 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1583 CFG_PRECOMPILE="$VAL"
1588 separate-debug-info)
1589 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1590 CFG_SEPARATE_DEBUG_INFO="$VAL"
1591 elif [ "$VAL" = "nocopy" ] ; then
1592 CFG_SEPARATE_DEBUG_INFO="yes"
1593 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1599 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1600 CFG_REDUCE_EXPORTS="$VAL"
1606 if [ "$VAL" = "no" ]; then
1613 if [ "$VAL" = "no" ]; then
1620 if [ "$VAL" = "no" ]; then
1627 if [ "$VAL" = "no" ]; then
1634 if [ "$VAL" = "no" ]; then
1641 if [ "$VAL" = "no" ]; then
1648 if [ "$VAL" = "no" ]; then
1655 if [ "$VAL" = "no" ]; then
1662 if [ "$VAL" = "no" ]; then
1672 if [ "$VAL" = "no" ]; then
1679 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1680 CFG_REDUCE_RELOCATIONS="$VAL"
1686 [ "$VAL" = "qt" ] && VAL=yes
1687 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1692 # No longer supported:
1693 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1696 if [ "$VAL" = "system" ]; then
1703 [ "$VAL" = "yes" ] && VAL=qt
1704 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1711 [ "$VAL" = "yes" ] && VAL=qt
1712 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1719 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1726 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1733 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1740 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1747 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1754 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1761 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1762 CFG_FONTCONFIG="$VAL"
1768 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1775 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1782 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1789 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1796 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1803 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1810 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1817 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1824 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1825 CFG_GSTREAMER="$VAL"
1831 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1832 CFG_QGTKSTYLE="$VAL"
1838 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1841 if [ "$VAL" = "no" ]; then
1849 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1851 elif [ "$VAL" = "runtime" ]; then
1858 if [ "$VAL" = "yes" ]; then
1865 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1872 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1873 CFG_LARGEFILE="$VAL"
1879 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1886 if [ "$VAL" = "yes" ]; then
1887 CFG_OPENSSL="linked"
1893 if [ "$VAL" = "yes" ]; then
1894 CFG_DECLARATIVE_DEBUG="yes"
1896 if [ "$VAL" = "no" ]; then
1897 CFG_DECLARATIVE_DEBUG="no"
1904 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1905 CFG_JAVASCRIPTCORE_JIT="$VAL"
1911 if [ "$VAL" = "yes" ]; then
1912 OPT_CONFIRM_LICENSE="$VAL"
1918 if [ "$VAL" = "yes" ]; then
1924 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
1925 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1926 # if autoconf style options were used, $VAL can be "yes" or "no"
1927 [ "$VAL" = "yes" ] && VAL=qt
1928 # now $VAL should be "no", "qt", or "plugin"... double-check
1929 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1932 # now $VAL is "no", "qt", or "plugin"
1934 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1935 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1937 # Grab the available values
1940 avail="$CFG_SQL_AVAILABLE"
1943 avail="$CFG_GFX_AVAILABLE"
1944 if [ "$OPT" = "plugin" ]; then
1945 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1949 avail="$CFG_DECORATION_AVAILABLE"
1950 if [ "$OPT" = "plugin" ]; then
1951 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1955 avail="$CFG_KBD_AVAILABLE"
1956 if [ "$OPT" = "plugin" ]; then
1957 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1961 avail="$CFG_MOUSE_AVAILABLE"
1962 if [ "$OPT" = "plugin" ]; then
1963 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1967 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1968 if [ "$OPT" != "plugin" ]; then
1969 # png is always built in
1975 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1979 # Check that that user's value is available.
1982 if [ "$VAL" = "$d" ]; then
1987 [ "$found" = yes ] || ERROR=yes
1989 if [ "$VAR" = "sql" ]; then
1990 # set the CFG_SQL_driver
1991 eval "CFG_SQL_$VAL=\$OPT"
1993 elif [ "$VAR" = "imageformat" ]; then
1994 [ "$OPT" = "qt" ] && OPT=yes
1995 VAL="`echo $VAL |tr a-z A-Z`"
1996 eval "CFG_$VAL=$OPT"
2000 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
2001 if [ "$OPT" = "plugin" ]; then
2002 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
2003 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
2004 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
2005 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
2006 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
2007 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
2008 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
2009 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2012 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2013 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2014 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2015 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2016 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2020 QMakeVar add "${VAR}s" "${VAL}"
2021 elif [ "$OPT" = "no" ]; then
2022 PLUG_VAR="${VAR}-plugin"
2023 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2024 IN_VAR="${VAR}-driver"
2028 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2029 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2030 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2031 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2032 QMakeVar del "${IN_VAR}s" "$VAL"
2033 QMakeVar del "${PLUG_VAR}s" "$VAL"
2035 if [ "$ERROR" = "yes" ]; then
2036 echo "$CURRENT_OPT: unknown argument"
2041 if [ "$VAL" = "yes" ]; then
2042 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2043 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2047 elif [ "$VAL" = "no" ]; then
2048 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2049 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2058 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2065 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2072 D_FLAGS="$D_FLAGS \"$VAL\""
2075 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2078 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2081 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2084 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2087 if [ "$BUILD_ON_MAC" = "yes" ]; then
2088 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2089 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2095 if [ "$BUILD_ON_MAC" = "yes" ]; then
2096 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2102 W_FLAGS="$W_FLAGS \"${VAL}\""
2108 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2109 CFG_PHONON_BACKEND="$VAL"
2121 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2122 CFG_AUDIO_BACKEND="$VAL"
2128 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2135 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2136 CFG_FORCE_ASSERTS="$VAL"
2142 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2152 if [ "$UNKNOWN_OPT" = "yes" ]; then
2153 echo "${CURRENT_OPT}: invalid command-line switch"
2159 # update QT_CONFIG to show our current predefined configuration
2160 case "$CFG_QCONFIG" in
2161 minimal|small|medium|large|full)
2162 # these are a sequence of increasing functionality
2163 for c in minimal small medium large full; do
2164 QT_CONFIG="$QT_CONFIG $c-config"
2165 [ "$CFG_QCONFIG" = $c ] && break
2169 # not known to be sufficient for anything
2170 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2171 echo >&2 "Error: configuration file not found:"
2172 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2174 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2179 #-------------------------------------------------------------------------------
2180 # build tree initialization
2181 #-------------------------------------------------------------------------------
2183 # where to find which..
2184 unixtests="$relpath/config.tests/unix"
2185 mactests="$relpath/config.tests/mac"
2186 WHICH="$unixtests/which.test"
2188 PERL=`$WHICH perl 2>/dev/null`
2190 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2192 for e in gawk nawk awk; do
2193 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2200 PERL="/usr/bin/perl"
2201 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2205 ### skip this if the user just needs help...
2206 if [ "$OPT_HELP" != "yes" ]; then
2208 # is this a shadow build?
2209 if [ "$OPT_SHADOW" = "maybe" ]; then
2211 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2212 if [ -h "$outpath" ]; then
2213 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2219 if [ "$OPT_SHADOW" = "yes" ]; then
2220 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2221 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2222 echo >&2 "Cannot proceed."
2225 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2228 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2230 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2231 echo "Qt can be built in release mode with separate debug information, so"
2232 echo "-debug-and-release is not necessary anymore"
2236 if [ "$CFG_SILENT" = "yes" ]; then
2237 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2240 # if the source tree is different from the build tree,
2241 # symlink or copy part of the sources
2242 if [ "$OPT_SHADOW" = "yes" ]; then
2243 echo "Preparing build tree..."
2245 if [ -z "$PERL" ]; then
2247 echo "You need perl in your PATH to make a shadow build."
2248 echo "Cannot proceed."
2252 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2254 # symlink the qmake directory
2255 find "$relpath/qmake" | while read a; do
2256 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2257 if [ '!' -f "$my_a" ]; then
2258 if [ -d "$a" ]; then
2259 # directories are created...
2262 a_dir=`dirname "$my_a"`
2263 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2264 # ... and files are symlinked
2265 case `basename "$a"` in
2266 *.o|*.d|GNUmakefile*|qmake)
2277 # make a syncqt script that can be used in the shadow
2278 rm -f "$outpath/bin/syncqt"
2279 if [ -x "$relpath/bin/syncqt" ]; then
2280 mkdir -p "$outpath/bin"
2281 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2282 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2283 chmod 755 "$outpath/bin/syncqt"
2286 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2287 rm -f "$outpath/bin/$i"
2288 if [ -x "$relpath/bin/$i" ]; then
2289 mkdir -p "$outpath/bin"
2290 echo "#!/bin/sh" >"$outpath/bin/$i"
2291 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2292 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2293 chmod 755 "$outpath/bin/$i"
2297 # symlink the mkspecs directory
2298 mkdir -p "$outpath/mkspecs"
2299 rm -rf "$outpath"/mkspecs/*
2300 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2301 rm -f "$outpath/mkspecs/default"
2305 rm -rf "$outpath/mkspecs/$1"
2306 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2307 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2310 # Special case for mkspecs/features directory.
2311 # To be able to place .prf files into a shadow build directory,
2312 # we're creating links for files only. The directory structure is reproduced.
2313 ShadowMkspecs features
2315 # The modules dir is special, too.
2316 ShadowMkspecs modules
2318 # symlink the doc directory
2319 rm -rf "$outpath/doc"
2320 ln -s "$relpath/doc" "$outpath/doc"
2323 # symlink fonts to be able to run application from build directory
2324 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2325 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2326 mkdir -p "${outpath}/lib"
2327 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2331 if [ "$OPT_FAST" = "auto" ]; then
2332 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2339 # find a make command
2340 if [ -z "$MAKE" ]; then
2342 for mk in gmake make; do
2343 if "$WHICH" $mk >/dev/null 2>&1; then
2348 if [ -z "$MAKE" ]; then
2349 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2350 echo >&2 "Cannot proceed."
2353 # export MAKE, we need it later in the config.tests
2359 #-------------------------------------------------------------------------------
2360 # auto-detect all that hasn't been specified in the arguments
2361 #-------------------------------------------------------------------------------
2363 if [ -z "$PLATFORM" ]; then
2365 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2367 if [ "$PLATFORM_QPA" = "yes" ]; then
2368 OSX_VERSION=`uname -r | cut -d. -f1`
2369 if [ "$OSX_VERSION" -ge 11 ]; then
2370 # We're on Lion or above. Check if we have a supported Clang version
2371 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2374 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2389 #PLATFORM=aix-g++-64
2391 #PLATFORM=aix-xlc-64
2393 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2403 # PLATFORM=dynix-g++
2409 PLATFORM=freebsd-g++
2411 - Also available for FreeBSD: freebsd-icc
2415 PLATFORM=openbsd-g++
2426 #PLATFORM=irix-cc-64
2428 - Also available for IRIX: irix-g++ irix-cc-64
2432 case "$UNAME_MACHINE" in
2434 #PLATFORM=hpuxi-acc-32
2435 PLATFORM=hpuxi-acc-64
2437 - Also available for HP-UXi: hpuxi-acc-32
2443 #PLATFORM=hpux-acc-64
2445 #PLATFORM=hpux-acc-o64
2447 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2456 - Also available for Tru64: tru64-g++
2460 case "$UNAME_MACHINE" in
2462 PLATFORM=linux-g++-64
2469 - Also available for Linux: linux-kcc linux-icc linux-cxx
2473 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2474 PLATFORM="solaris-g++"
2476 #PLATFORM=solaris-g++
2478 #PLATFORM=solaris-cc64
2481 - Also available for Solaris: solaris-g++ solaris-cc-64
2484 ReliantUNIX-*:*|SINIX-*:*)
2485 PLATFORM=reliant-cds
2486 #PLATFORM=reliant-cds-64
2488 - Also available for Reliant UNIX: reliant-cds-64
2498 #PLATFORM=unixware-g++
2499 PLATFORM=unixware-cc
2501 - Also available for OpenUNIX: unixware-g++
2505 #PLATFORM=unixware-g++
2506 PLATFORM=unixware-cc
2508 - Also available for UnixWare: unixware-g++
2515 - Also available for SCO OpenServer: sco-g++
2519 PLATFORM=unixware-g++
2522 PLATFORM=unsupported/qnx-g++
2525 if [ "$OPT_HELP" != "yes" ]; then
2527 for p in $PLATFORMS; do
2528 echo " $relconf $* -platform $p"
2531 echo " The build script does not currently recognize all" >&2
2532 echo " platforms supported by Qt." >&2
2533 echo " Rerun this script with a -platform option listed to" >&2
2534 echo " set the system/compiler combination you use." >&2
2541 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2543 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2545 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2546 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2548 if [ -d "$PLATFORM" ]; then
2549 QMAKESPEC="$PLATFORM"
2551 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2553 if [ -d "$XPLATFORM" ]; then
2554 XQMAKESPEC="$XPLATFORM"
2556 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2558 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2559 QT_CROSS_COMPILE=yes
2560 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2563 if [ "$BUILD_ON_MAC" = "yes" ]; then
2564 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2566 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2567 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2568 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2569 echo " built with 'macx-g++'" >&2
2575 # check specified platforms are supported
2576 if [ '!' -d "$QMAKESPEC" ]; then
2578 echo " The specified system/compiler is not supported:"
2582 echo " Please see the README file for a complete list."
2586 if [ '!' -d "$XQMAKESPEC" ]; then
2588 echo " The specified system/compiler is not supported:"
2592 echo " Please see the README file for a complete list."
2596 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2598 echo " The specified system/compiler port is not complete:"
2600 echo " $XQMAKESPEC/qplatformdefs.h"
2602 echo " Please contact qt-info@nokia.com."
2607 # now look at the configs and figure out what platform we are config'd for
2608 [ "$PLATFORM_QPA" != "yes" ] \
2609 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2611 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2613 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2614 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2615 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2616 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2617 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2621 #-------------------------------------------------------------------------------
2622 # determine the system architecture
2623 #-------------------------------------------------------------------------------
2624 if [ "$OPT_VERBOSE" = "yes" ]; then
2625 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2628 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2629 case `basename "$XPLATFORM"` in
2632 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2634 echo "Please contact qt-info@nokia.com to upgrade your license to"
2635 echo "include this platform, or install the Qt Open Source Edition"
2636 echo "if you intend to develop free software."
2642 if [ -z "${CFG_HOST_ARCH}" ]; then
2643 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2645 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2646 case "$CFG_HOST_ARCH" in
2651 if [ "$OPT_VERBOSE" = "yes" ]; then
2652 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2656 CFG_HOST_ARCH=`uname -p`
2657 if [ "$OPT_VERBOSE" = "yes" ]; then
2658 echo " SGI ($CFG_HOST_ARCH)"
2662 case "$UNAME_MACHINE" in
2664 if [ "$OPT_VERBOSE" = "yes" ]; then
2665 echo " Sun SPARC (sparc)"
2672 if [ "$OPT_VERBOSE" = "yes" ]; then
2673 echo " 64-bit AMD 80x86 (x86_64)"
2675 CFG_HOST_ARCH=x86_64
2678 if [ "$OPT_VERBOSE" = "yes" ]; then
2679 echo " 32-bit Intel 80x86 (i386)"
2687 if [ "$OPT_VERBOSE" = "yes" ]; then
2688 echo " 64-bit IBM PowerPC (powerpc)"
2690 CFG_HOST_ARCH=powerpc
2693 if [ "$OPT_VERBOSE" = "yes" ]; then
2694 echo " HP PA-RISC (parisc)"
2696 CFG_HOST_ARCH=parisc
2699 if [ "$OPT_VERBOSE" = "yes" ]; then
2700 echo " 32-bit Intel 80x86 (i386)"
2704 *:*:x86_64|*:*:amd64)
2705 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2706 if [ "$OPT_VERBOSE" = "yes" ]; then
2707 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2711 if [ "$OPT_VERBOSE" = "yes" ]; then
2712 echo " 64-bit AMD 80x86 (x86_64)"
2714 CFG_HOST_ARCH=x86_64
2718 if [ "$OPT_VERBOSE" = "yes" ]; then
2719 echo " 32-bit PowerPC (powerpc)"
2721 CFG_HOST_ARCH=powerpc
2724 if [ "$OPT_VERBOSE" = "yes" ]; then
2725 echo " 64-bit PowerPC (powerpc)"
2727 CFG_HOST_ARCH=powerpc
2730 if [ "$OPT_VERBOSE" = "yes" ]; then
2731 echo " IBM S/390 (s390)"
2736 if [ "$OPT_VERBOSE" = "yes" ]; then
2742 if [ "$OPT_VERBOSE" = "yes" ]; then
2743 echo " Linux on SPARC"
2748 case "$UNAME_MACHINE" in
2750 if [ "$OPT_VERBOSE" = "yes" ]; then
2751 echo " QNX on Intel 80x86 (i386)"
2758 if [ "$OPT_VERBOSE" = "yes" ]; then
2759 echo " Trying '$UNAME_MACHINE'..."
2761 CFG_HOST_ARCH="$UNAME_MACHINE"
2766 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2767 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2768 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2769 CFG_ARCH=$CFG_HOST_ARCH
2776 # previously, armv6 was a different arch
2782 if [ "$OPT_VERBOSE" = "yes" ]; then
2783 echo "System architecture: '$CFG_ARCH'"
2784 if [ "$PLATFORM_QPA" = "yes" ]; then
2785 echo "Host architecture: '$CFG_HOST_ARCH'"
2789 #-------------------------------------------------------------------------------
2790 # tests that don't need qmake (must be run before displaying help)
2791 #-------------------------------------------------------------------------------
2793 # detect build style
2794 if [ "$CFG_DEBUG" = "auto" ]; then
2795 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2796 CFG_DEBUG_RELEASE=yes
2798 elif [ "$CFG_DEV" = "yes" ]; then
2799 CFG_DEBUG_RELEASE=no
2802 CFG_DEBUG_RELEASE=no
2806 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2807 QT_CONFIG="$QT_CONFIG build_all"
2810 if [ -z "$PKG_CONFIG" ]; then
2811 # See if PKG_CONFIG is set in the mkspec:
2812 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2814 if [ -z "$PKG_CONFIG" ]; then
2815 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2818 # Work out if we can use pkg-config
2819 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2820 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2822 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2823 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2824 echo >&2 "environment!"
2826 if [ -z "$PKG_CONFIG_PATH" ]; then
2828 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2829 echo >&2 "the host compiler's .pc files will be used. This is probably"
2830 echo >&2 "not what you want."
2832 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2834 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2835 echo >&2 "been set. This means your toolchain's .pc files must contain"
2836 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2837 echo >&2 "tests are failing, please check these files."
2842 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2843 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2844 echo >&2 "dependencies"
2850 if [ ! -n "$PKG_CONFIG" ]; then
2851 QT_CONFIG="$QT_CONFIG no-pkg-config"
2854 # pass on $CFG_SDK to the configure tests.
2855 if [ '!' -z "$CFG_SDK" ]; then
2856 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2859 # find the default framework value
2860 if [ "$BUILD_ON_MAC" = "yes" ]; then
2861 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2862 CFG_FRAMEWORK="$CFG_SHARED"
2863 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2865 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2873 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2875 TEST_COMPILER=$QMAKE_CONF_COMPILER
2876 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2877 if [ -z "$TEST_COMPILER" ]; then
2878 echo "ERROR: Cannot set the compiler for the configuration tests"
2884 if [ -n "$CFG_SYSROOT" ]; then
2885 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2886 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2887 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2889 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2893 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2895 # auto-detect precompiled header support
2896 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2897 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2904 #auto-detect DWARF2 on the mac
2905 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2906 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2913 # don't autodetect support for separate debug info on objcopy when
2914 # cross-compiling as lots of toolchains seems to have problems with this
2915 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2916 CFG_SEPARATE_DEBUG_INFO="no"
2919 # auto-detect support for separate debug info in objcopy
2920 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2921 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2922 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2923 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2924 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2925 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2926 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2927 CFG_SEPARATE_DEBUG_INFO=no
2931 # binutils on HP-UX is buggy; default to no.
2932 CFG_SEPARATE_DEBUG_INFO=no
2935 CFG_SEPARATE_DEBUG_INFO=yes
2941 # auto-detect -fvisibility support
2942 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2943 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2944 CFG_REDUCE_EXPORTS=no
2946 CFG_REDUCE_EXPORTS=yes
2950 # detect the availability of the -Bsymbolic-functions linker optimization
2951 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2952 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2953 CFG_REDUCE_RELOCATIONS=no
2955 CFG_REDUCE_RELOCATIONS=yes
2959 # auto-detect GNU make support
2960 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2964 # find the default framework value
2965 if [ "$BUILD_ON_MAC" = "yes" ]; then
2966 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2967 CFG_FRAMEWORK="$CFG_SHARED"
2968 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2970 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2978 # x11 tests are done after qmake is built
2981 #setup the build parts
2982 if [ -z "$CFG_BUILD_PARTS" ]; then
2983 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2985 # don't build tools by default when cross-compiling
2986 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2987 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2990 for nobuild in $CFG_NOBUILD_PARTS; do
2991 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2993 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2995 # echo "WARNING: libs is a required part of the build."
2997 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
3000 #-------------------------------------------------------------------------------
3001 # post process QT_INSTALL_* variables
3002 #-------------------------------------------------------------------------------
3004 if [ -z "$QT_INSTALL_PREFIX" ]; then
3005 if [ "$CFG_DEV" = "yes" ]; then
3006 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
3008 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3011 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3013 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3014 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3015 if [ "$BUILD_ON_MAC" = "yes" ]; then
3016 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3019 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3022 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3024 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3025 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3026 if [ "$BUILD_ON_MAC" = "yes" ]; then
3027 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3032 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3035 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3037 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3038 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3039 if [ "$BUILD_ON_MAC" = "yes" ]; then
3040 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3041 QT_INSTALL_LIBS="/Libraries/Frameworks"
3045 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3047 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3049 if [ -z "$QT_INSTALL_BINS" ]; then #default
3050 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3051 if [ "$BUILD_ON_MAC" = "yes" ]; then
3052 QT_INSTALL_BINS="/Developer/Applications/Qt"
3055 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3057 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3059 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3060 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3061 if [ "$BUILD_ON_MAC" = "yes" ]; then
3062 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3065 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3067 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3069 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3070 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3071 if [ "$BUILD_ON_MAC" = "yes" ]; then
3072 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3075 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3077 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3079 if [ -z "$QT_INSTALL_DATA" ]; then #default
3080 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3082 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3084 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3085 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3087 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3089 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3090 if [ "$BUILD_ON_MAC" = "yes" ]; then
3091 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3093 QT_INSTALL_SETTINGS=/etc/xdg
3096 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3098 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3099 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3100 if [ "$BUILD_ON_MAC" = "yes" ]; then
3101 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3104 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3106 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3109 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3110 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3111 if [ "$BUILD_ON_MAC" = "yes" ]; then
3112 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3115 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3117 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3119 #-------------------------------------------------------------------------------
3120 # help - interactive parts of the script _after_ this section please
3121 #-------------------------------------------------------------------------------
3123 # next, emit a usage message if something failed.
3124 if [ "$OPT_HELP" = "yes" ]; then
3125 [ "x$ERROR" = "xyes" ] && echo
3126 if [ "$CFG_NIS" = "no" ]; then
3133 if [ "$CFG_CUPS" = "no" ]; then
3140 if [ "$CFG_ICONV" = "no" ]; then
3147 if [ "$CFG_LARGEFILE" = "no" ]; then
3154 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3161 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3169 if [ "$CFG_XCB" = "no" ]; then
3177 if [ "$CFG_WAYLAND" = "no" ]; then
3184 if [ "$CFG_XINPUT2" = "no" ]; then
3193 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3194 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3195 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3196 [-release] [-debug] [-debug-and-release]
3197 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3198 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3199 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3200 [-plugin-sql-<driver>] [-system-sqlite]
3201 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3202 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3203 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3204 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3205 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3206 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3207 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3208 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3209 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3210 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3211 [-no-audio-backend] [-audio-backend]
3212 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3213 [-no-optimized-qmake] [-optimized-qmake]
3214 [-no-openssl] [-openssl] [-openssl-linked]
3215 [-no-gtkstyle] [-gtkstyle]
3216 [-qt-pcre] [-system-pcre]
3217 [additional platform specific options (see below)]
3220 Installation options:
3222 -qpa ................ This will enable the QPA build.
3223 QPA is a window system agnostic implementation of Qt.
3225 These are optional, but you may specify install directories.
3227 -prefix <dir> ...... This will install everything relative to <dir>
3228 (default $QT_INSTALL_PREFIX)
3230 if [ "$PLATFORM_QPA" = "yes" ]; then
3233 -hostprefix [dir] .. Tools and libraries needed when developing
3234 applications are installed in [dir]. If [dir] is
3235 not given, the current build directory will be used.
3240 * -prefix-install .... Force a sandboxed "local" installation of
3241 Qt. This will install into
3242 $QT_INSTALL_PREFIX, if this option is
3243 disabled then some platforms will attempt a
3244 "system" install by placing default values to
3245 be placed in a system location other than
3248 You may use these to separate different parts of the install:
3250 -bindir <dir> ......... Executables will be installed to <dir>
3251 (default PREFIX/bin)
3252 -libdir <dir> ......... Libraries will be installed to <dir>
3253 (default PREFIX/lib)
3254 -docdir <dir> ......... Documentation will be installed to <dir>
3255 (default PREFIX/doc)
3256 -headerdir <dir> ...... Headers will be installed to <dir>
3257 (default PREFIX/include)
3258 -plugindir <dir> ...... Plugins will be installed to <dir>
3259 (default PREFIX/plugins)
3260 -importdir <dir> ...... Imports for QML will be installed to <dir>
3261 (default PREFIX/imports)
3262 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3264 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3265 (default PREFIX/translations)
3266 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3267 (default PREFIX/etc/settings)
3268 -examplesdir <dir> .... Examples will be installed to <dir>
3269 (default PREFIX/examples)
3270 -testsdir <dir> ....... Tests will be installed to <dir>
3271 (default PREFIX/tests)
3275 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3276 that needs to be evaluated. If the evaluation succeeds, the feature is
3277 included. Here is a short explanation of each option:
3279 * -release ........... Compile and link Qt with debugging turned off.
3280 -debug ............. Compile and link Qt with debugging turned on.
3281 -debug-and-release . Compile and link two versions of Qt, with and without
3282 debugging turned on (Mac only).
3284 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3286 -opensource ........ Compile and link the Open-Source Edition of Qt.
3287 -commercial ........ Compile and link the Commercial Edition of Qt.
3290 * -shared ............ Create and use shared Qt libraries.
3291 -static ............ Create and use static Qt libraries.
3293 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3295 -fast .............. Configure Qt quickly by generating Makefiles only for
3296 library and subdirectory targets. All other Makefiles
3297 are created as wrappers, which will in turn run qmake.
3299 -no-largefile ...... Disables large file support.
3300 + -largefile ......... Enables Qt to access files larger than 4 GB.
3303 if [ "$PLATFORM_QPA" = "yes" ]; then
3310 if [ "$CFG_DBUS" = "no" ]; then
3319 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3320 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3322 -no-accessibility .. Do not compile Accessibility support.
3323 * -accessibility ..... Compile Accessibility support.
3325 $SHN -no-stl ............ Do not compile STL support.
3326 $SHY -stl ............... Compile STL support.
3328 -no-sql-<driver> ... Disable SQL <driver> entirely.
3329 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3331 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3334 Possible values for <driver>:
3335 [ $CFG_SQL_AVAILABLE ]
3337 -system-sqlite ..... Use sqlite from the operating system.
3339 -no-phonon-backend.. Do not build the platform phonon plugin.
3340 + -phonon-backend..... Build the platform phonon plugin.
3342 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3343 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3345 -no-declarative-debug ..... Do not build the declarative debugging support.
3346 + -declarative-debug ....... Build the declarative debugging support.
3348 -platform target ... The operating system and compiler you are building
3351 See the README file for a list of supported
3352 operating systems and compilers.
3355 if [ "${PLATFORM_QPA}" != "yes" ]; then
3357 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3358 raster - Software rasterizer
3359 opengl - Rendering via OpenGL, Experimental!
3360 openvg - Rendering via OpenVG, Experimental!
3367 -no-mmx ............ Do not compile with use of MMX instructions.
3368 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3369 -no-sse ............ Do not compile with use of SSE instructions.
3370 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3371 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3372 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3373 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3374 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3375 -no-avx ............ Do not compile with use of AVX instructions.
3376 -no-neon ........... Do not compile with use of NEON instructions.
3378 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3379 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3381 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3383 -D <string> ........ Add an explicit define to the preprocessor.
3384 -I <string> ........ Add an explicit include path.
3385 -L <string> ........ Add an explicit library path.
3387 -help, -h .......... Display this information.
3389 Third Party Libraries:
3391 -qt-zlib ........... Use the zlib bundled with Qt.
3392 + -system-zlib ....... Use zlib from the operating system.
3393 See http://www.gzip.org/zlib
3395 -no-gif ............ Do not compile GIF reading support.
3397 -no-libpng ......... Do not compile PNG support.
3398 -qt-libpng ......... Use the libpng bundled with Qt.
3399 + -system-libpng ..... Use libpng from the operating system.
3400 See http://www.libpng.org/pub/png
3402 -no-libjpeg ........ Do not compile JPEG support.
3403 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3404 + -system-libjpeg .... Use libjpeg from the operating system.
3405 See http://www.ijg.org
3407 -no-openssl ........ Do not compile support for OpenSSL.
3408 + -openssl ........... Enable run-time OpenSSL support.
3409 -openssl-linked .... Enabled linked OpenSSL support.
3411 -qt-pcre ........... Use the PCRE library bundled with Qt.
3412 + -system-pcre ....... Use the PCRE library from the operating system.
3416 -make <part> ....... Add part to the list of parts to be built at make time.
3417 ($QT_DEFAULT_BUILD_PARTS)
3418 -nomake <part> ..... Exclude part from the list of parts to be built.
3420 -R <string> ........ Add an explicit runtime library path to the Qt
3422 -l <string> ........ Add an explicit library.
3424 -no-rpath .......... Do not use the library install path as a runtime
3426 + -rpath ............. Link Qt libraries and executables using the library
3427 install path as a runtime library path. Equivalent
3428 to -R install_libpath
3430 -continue .......... Continue as far as possible if an error occurs.
3432 -verbose, -v ....... Print verbose information about each step of the
3435 -silent ............ Reduce the build output so that warnings and errors
3436 can be seen more easily.
3438 * -no-optimized-qmake ... Do not build qmake optimized.
3439 -optimized-qmake ...... Build qmake optimized.
3441 -no-gui ............ Don't build the Qt GUI library
3443 $NSN -no-nis ............ Do not compile NIS support.
3444 $NSY -nis ............... Compile NIS support.
3446 $CUN -no-cups ........... Do not compile CUPS support.
3447 $CUY -cups .............. Compile CUPS support.
3448 Requires cups/cups.h and libcups.so.2.
3450 $CIN -no-iconv .......... Do not compile support for iconv(3).
3451 $CIY -iconv ............. Compile support for iconv(3).
3453 $PHN -no-pch ............ Do not use precompiled header support.
3454 $PHY -pch ............... Use precompiled header support.
3456 $DBN -no-dbus ........... Do not compile the QtDBus module.
3457 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3458 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3460 -reduce-relocations ..... Reduce relocations in the libraries through extra
3461 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3462 experimental; needs GNU ld >= 2.18).
3464 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3468 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3469 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3476 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3484 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3488 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3489 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3491 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3492 $XCBY -xcb ............... Compile Xcb support.
3494 $XWN -no-wayland......... Do not compile Wayland support.
3495 $XWY -wayland .......... Compile Wayland support.
3501 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3505 $X2N -no-xinput2......... Do not compile XInput2 support.
3506 $X2Y -xinput2............ Compile XInput2 support.
3512 if [ "$PLATFORM_X11" = "yes" ]; then
3513 if [ "$CFG_SM" = "no" ]; then
3520 if [ "$CFG_XSHAPE" = "no" ]; then
3527 if [ "$CFG_XVIDEO" = "no" ]; then
3534 if [ "$CFG_XINERAMA" = "no" ]; then
3541 if [ "$CFG_FONTCONFIG" = "no" ]; then
3548 if [ "$CFG_XCURSOR" = "no" ]; then
3555 if [ "$CFG_XFIXES" = "no" ]; then
3562 if [ "$CFG_XRANDR" = "no" ]; then
3569 if [ "$CFG_XRENDER" = "no" ]; then
3576 if [ "$CFG_MITSHM" = "no" ]; then
3583 if [ "$CFG_XINPUT" = "no" ]; then
3590 if [ "$CFG_XKB" = "no" ]; then
3597 if [ "$CFG_IM" = "no" ]; then
3608 -no-gtkstyle ....... Do not build the GTK theme integration.
3609 + -gtkstyle .......... Build the GTK theme integration.
3611 * -no-nas-sound ...... Do not compile in NAS sound support.
3612 -system-nas-sound .. Use NAS libaudio from the operating system.
3613 See http://radscan.com/nas.html
3615 -egl ............... Use EGL instead of GLX to manage contexts.
3616 When building for desktop OpenGL, this option will
3617 make Qt use EGL to manage contexts rather than the
3618 GLX, which is the default. Note: For OpenGL ES, EGL
3621 -no-opengl ......... Do not support OpenGL.
3622 + -opengl <api> ...... Enable OpenGL support.
3623 With no parameter, this will auto-detect the "best"
3624 OpenGL API to use. If desktop OpenGL is available, it
3625 will be used. Use desktop or es2 for <api>
3626 to force the use of the Desktop OpenGL or
3627 OpenGL ES 2 APIs instead.
3629 -no-openvg ........ Do not support OpenVG.
3630 + -openvg ........... Enable OpenVG support.
3631 Requires EGL support, typically supplied by an OpenGL
3632 or other graphics implementation.
3634 $SMN -no-sm ............. Do not support X Session Management.
3635 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3637 $SHN -no-xshape ......... Do not compile XShape support.
3638 $SHY -xshape ............ Compile XShape support.
3639 Requires X11/extensions/shape.h.
3641 $XVN -no-xvideo ......... Do not compile XVideo support.
3642 $XVY -xvideo ............ Compile XVideo support.
3643 Requires X11/extensions/Xv.h & Xvlib.h.
3645 $SHN -no-xsync .......... Do not compile XSync support.
3646 $SHY -xsync ............. Compile XSync support.
3647 Requires X11/extensions/sync.h.
3649 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3650 $XAY -xinerama .......... Compile Xinerama support.
3651 Requires X11/extensions/Xinerama.h and libXinerama.
3652 By default, Xinerama support will be compiled if
3653 available and the shared libraries are dynamically
3656 $XCN -no-xcursor ........ Do not compile Xcursor support.
3657 $XCY -xcursor ........... Compile Xcursor support.
3658 Requires X11/Xcursor/Xcursor.h and libXcursor.
3659 By default, Xcursor support will be compiled if
3660 available and the shared libraries are dynamically
3663 $XFN -no-xfixes ......... Do not compile Xfixes support.
3664 $XFY -xfixes ............ Compile Xfixes support.
3665 Requires X11/extensions/Xfixes.h and libXfixes.
3666 By default, Xfixes support will be compiled if
3667 available and the shared libraries are dynamically
3670 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3671 $XZY -xrandr ............ Compile Xrandr support.
3672 Requires X11/extensions/Xrandr.h and libXrandr.
3674 $XRN -no-xrender ........ Do not compile Xrender support.
3675 $XRY -xrender ........... Compile Xrender support.
3676 Requires X11/extensions/Xrender.h and libXrender.
3678 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3679 $XMY -mitshm ............ Compile MIT-SHM support.
3680 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3682 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3683 $FCGY -fontconfig ........ Compile FontConfig support.
3684 Requires fontconfig/fontconfig.h, libfontconfig,
3685 freetype.h and libfreetype.
3687 $XIN -no-xinput ......... Do not compile Xinput support.
3688 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3689 which requires IRIX with wacom.h and libXi or
3690 XFree86 with X11/extensions/XInput.h and libXi.
3692 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3693 $XKY -xkb ............... Compile XKB support.
3698 if [ "$BUILD_ON_MAC" = "yes" ]; then
3703 -Fstring ........... Add an explicit framework path.
3704 -fw string ......... Add an explicit framework.
3706 * -framework ......... Build Qt as a series of frameworks and
3707 link tools against those frameworks.
3708 -no-framework ...... Do not build Qt as a series of frameworks.
3710 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3711 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3713 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3714 Only one arch value can be specified.
3716 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3717 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3719 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3720 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3721 QT_ENABLE_HARFBUZZ environment variable.
3726 if [ "$PLATFORM_QPA" = "yes" ]; then
3732 if [ "$PLATFORM_QPA" = "yes" ]; then
3735 -xplatform target ... The target platform when cross-compiling.
3737 -no-feature-<feature> Do not compile in <feature>.
3738 -feature-<feature> .. Compile in <feature>. The available features
3739 are described in src/corelib/global/qfeatures.txt
3741 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3742 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3744 The floating point format is usually autodetected by configure. Use this
3745 to override the detected value.
3747 -little-endian ...... Target platform is little endian (LSB first).
3748 -big-endian ......... Target platform is big endian (MSB first).
3750 -host-little-endian . Host platform is little endian (LSB first).
3751 -host-big-endian .... Host platform is big endian (MSB first).
3753 You only need to specify the endianness when
3754 cross-compiling, otherwise the host
3755 endianness will be used.
3757 -no-freetype ........ Do not compile in Freetype2 support.
3758 -qt-freetype ........ Use the libfreetype bundled with Qt.
3759 * -system-freetype .... Use libfreetype from the operating system.
3760 See http://www.freetype.org/
3762 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3763 default ($CFG_QCONFIG).
3765 -no-opengl .......... Do not support OpenGL.
3766 -opengl <api> ....... Enable OpenGL ES support
3767 With no parameter, this will attempt to auto-detect
3768 OpenGL ES 2, or regular desktop OpenGL.
3769 Use es2 for <api> to override auto-detection.
3773 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3774 if [ "$CFG_GLIB" = "no" ]; then
3782 $GBN -no-glib ........... Do not compile Glib support.
3783 $GBY -glib .............. Compile Glib support.
3788 [ "x$ERROR" = "xyes" ] && exit 1
3793 # -----------------------------------------------------------------------------
3794 # LICENSING, INTERACTIVE PART
3795 # -----------------------------------------------------------------------------
3797 if [ "$PLATFORM_QPA" = "yes" ]; then
3798 Platform="Qt Lighthouse"
3799 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3800 Platform="Qt for Windows"
3801 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3803 Platform="Qt for Linux/X11"
3807 echo "This is the $Platform ${EditionString} Edition."
3810 if [ "$Edition" = "OpenSource" ]; then
3812 echo "You are licensed to use this software under the terms of"
3813 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3814 if [ -f "$relpath/LICENSE.GPL3" ]; then
3815 echo "You are also licensed to use this software under the terms of"
3816 echo "the GNU General Public License (GPL) versions 3."
3822 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3823 echo "You have already accepted the terms of the $LicenseType license."
3826 if [ -f "$relpath/LICENSE.GPL3" ]; then
3827 echo "Type '3' to view the GNU General Public License version 3."
3829 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3830 echo "Type 'yes' to accept this license offer."
3831 echo "Type 'no' to decline this license offer."
3833 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3837 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3839 elif [ "$acceptance" = "no" ]; then
3840 echo "You are not licensed to use this software."
3843 elif [ "$acceptance" = "3" ]; then
3844 more "$relpath/LICENSE.GPL3"
3845 elif [ "$acceptance" = "L" ]; then
3846 more "$relpath/LICENSE.LGPL"
3849 elif [ "$Edition" = "Preview" ]; then
3850 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3853 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3854 echo "You have already accepted the terms of the $LicenseType license."
3857 echo "You are licensed to use this software under the terms of"
3858 echo "the $TheLicense"
3860 echo "Type '?' to read the Preview License."
3861 echo "Type 'yes' to accept this license offer."
3862 echo "Type 'no' to decline this license offer."
3864 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3868 if [ "$acceptance" = "yes" ]; then
3870 elif [ "$acceptance" = "no" ] ;then
3871 echo "You are not licensed to use this software."
3874 elif [ "$acceptance" = "?" ]; then
3875 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3878 elif [ "$Edition" != "OpenSource" ]; then
3879 if [ -n "$ExpiryDate" ]; then
3880 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3881 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3882 Today=`date +%Y%m%d`
3883 if [ "$Today" -gt "$ExpiryDate" ]; then
3884 case "$LicenseType" in
3885 Commercial|Academic|Educational)
3886 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3888 echo "NOTICE NOTICE NOTICE NOTICE"
3890 echo " Your support and upgrade period has expired."
3892 echo " You are no longer licensed to use this version of Qt."
3893 echo " Please contact qt-info@nokia.com to renew your support"
3894 echo " and upgrades for this license."
3896 echo "NOTICE NOTICE NOTICE NOTICE"
3901 echo "WARNING WARNING WARNING WARNING"
3903 echo " Your support and upgrade period has expired."
3905 echo " You may continue to use your last licensed release"
3906 echo " of Qt under the terms of your existing license"
3907 echo " agreement. But you are not entitled to technical"
3908 echo " support, nor are you entitled to use any more recent"
3909 echo " Qt releases."
3911 echo " Please contact qt-info@nokia.com to renew your"
3912 echo " support and upgrades for this license."
3914 echo "WARNING WARNING WARNING WARNING"
3921 echo "NOTICE NOTICE NOTICE NOTICE"
3923 echo " Your Evaluation license has expired."
3925 echo " You are no longer licensed to use this software. Please"
3926 echo " contact qt-info@nokia.com to purchase license, or install"
3927 echo " the Qt Open Source Edition if you intend to develop free"
3930 echo "NOTICE NOTICE NOTICE NOTICE"
3937 TheLicense=`head -n 1 "$outpath/LICENSE"`
3939 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3940 echo "You have already accepted the terms of the $TheLicense."
3943 echo "You are licensed to use this software under the terms of"
3944 echo "the $TheLicense."
3946 echo "Type '?' to view the $TheLicense."
3947 echo "Type 'yes' to accept this license offer."
3948 echo "Type 'no' to decline this license offer."
3950 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3954 if [ "$acceptance" = "yes" ]; then
3956 elif [ "$acceptance" = "no" ]; then
3957 echo "You are not licensed to use this software."
3960 else [ "$acceptance" = "?" ]
3961 more "$outpath/LICENSE"
3966 # this should be moved somewhere else
3969 AIX_VERSION=`uname -v`
3970 if [ "$AIX_VERSION" -lt "5" ]; then
3971 QMakeVar add QMAKE_LIBS_X11 -lbind
3978 #-------------------------------------------------------------------------------
3979 # generate qconfig.cpp
3980 #-------------------------------------------------------------------------------
3981 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3983 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3985 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3986 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3988 /* Installation date */
3989 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3993 if [ ! -z "$QT_HOST_PREFIX" ]; then
3994 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3996 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
3997 /* Installation Info */
3998 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3999 "qt_prfxpath=$QT_HOST_PREFIX",
4000 "qt_docspath=$QT_HOST_PREFIX/doc",
4001 "qt_hdrspath=$QT_HOST_PREFIX/include",
4002 "qt_libspath=$QT_HOST_PREFIX/lib",
4003 "qt_binspath=$QT_HOST_PREFIX/bin",
4004 "qt_plugpath=$QT_HOST_PREFIX/plugins",
4005 "qt_impspath=$QT_HOST_PREFIX/IMPORTS",
4006 "qt_datapath=$QT_HOST_PREFIX",
4007 "qt_trnspath=$QT_HOST_PREFIX/translations",
4008 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
4009 "qt_tstspath=$QT_INSTALL_TESTS",
4011 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
4012 #else // QT_BOOTSTRAPPED
4016 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4017 /* Installation Info */
4018 static const char qt_configure_prefix_path_strs[][256 + 12] = {
4019 "qt_prfxpath=$QT_INSTALL_PREFIX",
4020 "qt_docspath=$QT_INSTALL_DOCS",
4021 "qt_hdrspath=$QT_INSTALL_HEADERS",
4022 "qt_libspath=$QT_INSTALL_LIBS",
4023 "qt_binspath=$QT_INSTALL_BINS",
4024 "qt_plugpath=$QT_INSTALL_PLUGINS",
4025 "qt_impspath=$QT_INSTALL_IMPORTS",
4026 "qt_datapath=$QT_INSTALL_DATA",
4027 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
4028 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
4029 "qt_tstspath=$QT_INSTALL_TESTS",
4031 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
4034 if [ ! -z "$QT_HOST_PREFIX" ]; then
4035 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4036 #endif // QT_BOOTSTRAPPED
4041 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4043 /* strlen( "qt_lcnsxxxx" ) == 12 */
4044 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4045 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4047 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4050 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4051 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4052 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4054 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4055 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4056 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4059 # -----------------------------------------------------------------------------
4060 if [ "$LicenseType" = "Evaluation" ]; then
4061 EVALKEY=qt_qevalkey=$LicenseKeyExt
4062 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4063 EVALKEY=qt_qevalkey=
4066 if [ -n "$EVALKEY" ]; then
4067 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4068 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4069 /* Evaluation license key */
4070 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4072 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4076 # -----------------------------------------------------------------------------
4078 # -----------------------------------------------------------------------------
4081 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4083 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4084 if [ "$OPT_SHADOW" = "yes" ]; then
4085 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4086 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4087 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4091 # $1: input variable name (awk regexp)
4092 # $2: optional output variable name
4093 # $3: optional value transformation (sed command)
4094 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4095 # is where the resulting variable is written to
4096 setBootstrapVariable()
4098 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
4102 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4103 echo "Creating qmake. Please wait..."
4106 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4107 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4108 if [ -f "$QCONFIG_H" ]; then
4109 OLD_QCONFIG_H=$QCONFIG_H
4110 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4113 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4114 # when building qmake, we use #defines for the install paths,
4115 # however they are real functions in the library
4116 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4117 mkdir -p "$outpath/src/corelib/global"
4118 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4119 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4122 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4124 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4125 rm -rf mkspecs/default
4126 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4128 for mkfile in GNUmakefile Makefile; do
4131 in_mkfile="${mkfile}.in"
4132 if [ "$mkfile" = "Makefile" ]; then
4133 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4134 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4136 in_mkfile="${mkfile}.unix"
4138 in_mkfile="$relpath/qmake/$in_mkfile"
4139 mkfile="$outpath/qmake/$mkfile"
4140 if [ -f "$mkfile" ]; then
4141 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4144 [ -f "$in_mkfile" ] || continue
4146 echo "########################################################################" > "$mkfile"
4147 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4148 echo "########################################################################" >> "$mkfile"
4151 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4152 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4153 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4155 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4156 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4159 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
4160 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
4161 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
4162 setBootstrapVariable QMAKE_CFLAGS
4163 setBootstrapVariable QMAKE_CXXFLAGS
4164 setBootstrapVariable QMAKE_LFLAGS
4166 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4167 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4168 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4170 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4171 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4172 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
4173 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4174 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4175 elif [ "$CFG_DEBUG" = "yes" ]; then
4176 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4177 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
4178 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4179 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4182 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
4183 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
4184 for rpath in $RPATH_FLAGS; do
4185 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4188 if [ "$BUILD_ON_MAC" = "yes" ]; then
4189 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4190 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4191 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4192 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4193 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4194 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4195 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4196 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4197 if [ '!' -z "$CFG_SDK" ]; then
4198 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4199 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4200 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4201 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4202 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4205 if [ '!' -z "$D_FLAGS" ]; then
4206 for DEF in $D_FLAGS; do
4207 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4210 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4211 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4212 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4213 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4215 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4216 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4217 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4218 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4219 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4220 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4221 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4222 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4223 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4224 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4226 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4227 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4228 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4229 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4234 QMAKE_BUILD_ERROR=no
4235 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4236 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4237 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4238 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4241 #-------------------------------------------------------------------------------
4242 # tests that need qmake
4243 #-------------------------------------------------------------------------------
4245 # detect availability of float math.h functions
4246 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4247 CFG_USE_FLOATMATH=yes
4249 CFG_USE_FLOATMATH=no
4252 # detect mmx support
4253 if [ "${CFG_MMX}" = "auto" ]; then
4254 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4261 # detect 3dnow support
4262 if [ "${CFG_3DNOW}" = "auto" ]; then
4263 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4270 # detect sse support
4271 if [ "${CFG_SSE}" = "auto" ]; then
4272 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4279 # detect sse2 support
4280 if [ "${CFG_SSE2}" = "auto" ]; then
4281 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4288 # detect sse3 support
4289 if [ "${CFG_SSE3}" = "auto" ]; then
4290 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4297 # detect ssse3 support
4298 if [ "${CFG_SSSE3}" = "auto" ]; then
4299 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4306 # detect sse4.1 support
4307 if [ "${CFG_SSE4_1}" = "auto" ]; then
4308 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
4315 # detect sse4.2 support
4316 if [ "${CFG_SSE4_2}" = "auto" ]; then
4317 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
4324 # detect avx support
4325 if [ "${CFG_AVX}" = "auto" ]; then
4326 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4333 # check iWMMXt support
4334 if [ "$CFG_IWMMXT" = "yes" ]; then
4335 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4336 if [ $? != "0" ]; then
4337 echo "The iWMMXt functionality test failed!"
4338 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4343 # detect neon support
4344 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4345 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
4352 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4355 if [ "$CFG_ZLIB" = "no" ]; then
4356 # Note: Qt no longer support builds without zlib
4357 # So we force a "no" to be "auto" here.
4358 # If you REALLY really need no zlib support, you can still disable
4359 # it by doing the following:
4360 # add "no-zlib" to mkspecs/qconfig.pri
4361 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4363 # There's no guarantee that Qt will build under those conditions
4368 if [ "$CFG_ZLIB" = "auto" ]; then
4369 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
4376 if [ "$CFG_LARGEFILE" = "auto" ]; then
4377 #Large files should be enabled for all Linux systems
4381 # detect how jpeg should be built
4382 if [ "$CFG_JPEG" = "auto" ]; then
4383 if [ "$CFG_SHARED" = "yes" ]; then
4390 if [ "$CFG_LIBJPEG" = "auto" ]; then
4391 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
4398 # detect how gif should be built
4399 if [ "$CFG_GIF" = "auto" ]; then
4400 if [ "$CFG_SHARED" = "yes" ]; then
4408 if [ "$CFG_LIBPNG" = "auto" ]; then
4409 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
4416 # detect accessibility
4417 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4418 CFG_ACCESSIBILITY=yes
4421 # auto-detect SQL-modules support
4422 for _SQLDR in $CFG_SQL_AVAILABLE; do
4425 if [ "$CFG_SQL_mysql" != "no" ]; then
4426 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4427 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4428 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4429 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4430 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4431 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4432 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4434 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4435 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4436 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4437 echo " You need MySql 4 or higher."
4438 echo " If you believe this message is in error you may use the continue"
4439 echo " switch (-continue) to $0 to continue."
4444 QT_LFLAGS_MYSQL_R=""
4448 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
4449 QMakeVar add CONFIG use_libmysqlclient_r
4450 if [ "$CFG_SQL_mysql" = "auto" ]; then
4451 CFG_SQL_mysql=plugin
4453 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4454 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
4455 if [ "$CFG_SQL_mysql" = "auto" ]; then
4456 CFG_SQL_mysql=plugin
4459 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4460 echo "MySQL support cannot be enabled due to functionality tests!"
4461 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4462 echo " If you believe this message is in error you may use the continue"
4463 echo " switch (-continue) to $0 to continue."
4468 QT_LFLAGS_MYSQL_R=""
4476 if [ "$CFG_SQL_psql" != "no" ]; then
4477 # Be careful not to use native pg_config when cross building.
4478 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4479 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4480 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4482 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4483 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4484 # But, respect PSQL_LIBS if set
4485 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4486 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
4487 if [ "$CFG_SQL_psql" = "auto" ]; then
4491 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4492 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4493 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4494 echo " If you believe this message is in error you may use the continue"
4495 echo " switch (-continue) to $0 to continue."
4506 if [ "$CFG_SQL_odbc" != "no" ]; then
4507 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
4508 if [ "$CFG_SQL_odbc" = "auto" ]; then
4512 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
4513 QT_LFLAGS_ODBC="-liodbc"
4514 if [ "$CFG_SQL_odbc" = "auto" ]; then
4518 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4519 echo "ODBC support cannot be enabled due to functionality tests!"
4520 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4521 echo " If you believe this message is in error you may use the continue"
4522 echo " switch (-continue) to $0 to continue."
4532 if [ "$CFG_SQL_oci" != "no" ]; then
4533 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
4534 if [ "$CFG_SQL_oci" = "auto" ]; then
4538 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4539 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4540 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4541 echo " If you believe this message is in error you may use the continue"
4542 echo " switch (-continue) to $0 to continue."
4551 if [ "$CFG_SQL_tds" != "no" ]; then
4552 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4553 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4554 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
4555 if [ "$CFG_SQL_tds" = "auto" ]; then
4559 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4560 echo "TDS support cannot be enabled due to functionality tests!"
4561 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4562 echo " If you believe this message is in error you may use the continue"
4563 echo " switch (-continue) to $0 to continue."
4572 if [ "$CFG_SQL_db2" != "no" ]; then
4573 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
4574 if [ "$CFG_SQL_db2" = "auto" ]; then
4578 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4579 echo "ODBC support cannot be enabled due to functionality tests!"
4580 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4581 echo " If you believe this message is in error you may use the continue"
4582 echo " switch (-continue) to $0 to continue."
4591 if [ "$CFG_SQL_ibase" != "no" ]; then
4592 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
4593 if [ "$CFG_SQL_ibase" = "auto" ]; then
4594 CFG_SQL_ibase=plugin
4597 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4598 echo "InterBase support cannot be enabled due to functionality tests!"
4599 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4600 echo " If you believe this message is in error you may use the continue"
4601 echo " switch (-continue) to $0 to continue."
4610 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4611 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
4612 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4613 CFG_SQL_sqlite2=plugin
4616 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4617 echo "SQLite2 support cannot be enabled due to functionality tests!"
4618 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4619 echo " If you believe this message is in error you may use the continue"
4620 echo " switch (-continue) to $0 to continue."
4629 if [ "$CFG_SQL_sqlite" != "no" ]; then
4630 SQLITE_AUTODETECT_FAILED="no"
4631 if [ "$CFG_SQLITE" = "system" ]; then
4632 if [ -n "$PKG_CONFIG" ]; then
4633 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4634 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4636 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
4637 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4638 CFG_SQL_sqlite=plugin
4640 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4642 SQLITE_AUTODETECT_FAILED="yes"
4645 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4646 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4647 CFG_SQL_sqlite=plugin
4650 SQLITE_AUTODETECT_FAILED="yes"
4654 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4655 echo "SQLite support cannot be enabled due to functionality tests!"
4656 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4657 echo " If you believe this message is in error you may use the continue"
4658 echo " switch (-continue) to $0 to continue."
4664 if [ "$OPT_VERBOSE" = "yes" ]; then
4665 echo "unknown SQL driver: $_SQLDR"
4671 # auto-detect NIS support
4672 if [ "$CFG_NIS" != "no" ]; then
4673 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
4676 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4677 echo "NIS support cannot be enabled due to functionality tests!"
4678 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4679 echo " If you believe this message is in error you may use the continue"
4680 echo " switch (-continue) to $0 to continue."
4688 # auto-detect CUPS support
4689 if [ "$CFG_CUPS" != "no" ]; then
4690 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
4693 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4694 echo "Cups support cannot be enabled due to functionality tests!"
4695 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4696 echo " If you believe this message is in error you may use the continue"
4697 echo " switch (-continue) to $0 to continue."
4705 # auto-detect iconv(3) support
4706 if [ "$CFG_ICONV" != "no" ]; then
4707 if [ "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
4709 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
4711 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
4713 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
4716 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4717 echo "Iconv support cannot be enabled due to functionality tests!"
4718 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4719 echo " If you believe this message is in error you may use the continue"
4720 echo " switch (-continue) to $0 to continue."
4728 # auto-detect libdbus-1 support
4729 if [ "$CFG_DBUS" != "no" ]; then
4730 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4731 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4732 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4734 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
4735 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4736 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4737 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4739 if [ "$CFG_DBUS" = "auto" ]; then
4741 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4742 # CFG_DBUS is "yes" or "linked" here
4744 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4745 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4746 echo " If you believe this message is in error you may use the continue"
4747 echo " switch (-continue) to $0 to continue."
4754 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4756 # auto-detect Glib support
4757 if [ "$CFG_GLIB" != "no" ]; then
4758 if [ -n "$PKG_CONFIG" ]; then
4759 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4760 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4762 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
4764 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4765 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4767 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4768 echo "Glib support cannot be enabled due to functionality tests!"
4769 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4770 echo " If you believe this message is in error you may use the continue"
4771 echo " switch (-continue) to $0 to continue."
4780 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4781 if [ -n "$PKG_CONFIG" ]; then
4782 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4783 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4785 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
4787 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4788 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4790 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4791 echo "Gstreamer support cannot be enabled due to functionality tests!"
4792 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4793 echo " If you believe this message is in error you may use the continue"
4794 echo " switch (-continue) to $0 to continue."
4800 elif [ "$CFG_GLIB" = "no" ]; then
4804 # auto-detect libicu support
4805 if [ "$CFG_ICU" != "no" ]; then
4806 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4807 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4809 if [ "$CFG_ICU" = "auto" ]; then
4811 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4814 echo "The ICU library support cannot be enabled."
4815 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4816 echo " If you believe this message is in error you may use the continue"
4817 echo " switch (-continue) to $0 to continue."
4823 # Auto-detect PulseAudio support
4824 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4825 if [ -n "$PKG_CONFIG" ]; then
4826 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4827 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4829 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
4831 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4832 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4834 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4835 echo "PulseAudio support cannot be enabled due to functionality tests!"
4836 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4837 echo " If you believe this message is in error you may use the continue"
4838 echo " switch (-continue) to $0 to continue."
4848 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4849 x11tests="$relpath/config.tests/x11"
4852 # work around broken X11 headers when using GCC 2.95 or later
4854 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4855 if [ $NOTYPE = "yes" ]; then
4856 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4857 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4860 # Check we actually have X11 :-)
4861 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4862 if [ $? != "0" ]; then
4863 echo "Basic XLib functionality test failed!"
4864 echo " You might need to modify the include and library search paths by editing"
4865 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4871 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4872 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4873 if [ "$CFG_GUI" = "no" ]; then
4874 if [ "$CFG_OPENGL" = "auto" ]; then
4877 if [ "$CFG_OPENGL" != "no" ]; then
4878 echo "OpenGL enabled, but GUI disabled."
4879 echo " You might need to either enable the GUI or disable OpenGL"
4883 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4884 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
4886 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
4888 if [ "$CFG_EGL" = "no" ]; then
4892 if [ "$CFG_OPENGL" = "yes" ]; then
4893 echo "All the OpenGL functionality tests failed!"
4894 echo " You might need to modify the include and library search paths by editing"
4895 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4896 echo " ${XQMAKESPEC}."
4903 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4904 if [ "$CFG_OPENGL" = "desktop" ]; then
4905 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4906 if [ $? != "0" ]; then
4907 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4914 elif [ "$CFG_OPENGL" = "es2" ]; then
4916 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4917 if [ $? != "0" ]; then
4918 echo "The OpenGL ES 2.0 functionality test failed!"
4919 echo " You might need to modify the include and library search paths by editing"
4920 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4921 echo " ${XQMAKESPEC}."
4924 elif [ "$CFG_OPENGL" = "desktop" ]; then
4925 # Desktop OpenGL support
4926 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4927 if [ $? != "0" ]; then
4928 echo "The OpenGL functionality test failed!"
4929 echo " You might need to modify the include and library search paths by editing"
4930 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4931 echo " ${XQMAKESPEC}."
4936 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4937 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4938 if [ $? != "0" ]; then
4939 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4946 fi # X11/MINGW OpenGL
4949 if [ "$PLATFORM_X11" = "yes" ]; then
4950 # auto-detect Xcursor support
4951 if [ "$CFG_XCURSOR" != "no" ]; then
4952 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
4953 if [ "$CFG_XCURSOR" != "runtime" ]; then
4957 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4958 echo "Xcursor support cannot be enabled due to functionality tests!"
4959 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4960 echo " If you believe this message is in error you may use the continue"
4961 echo " switch (-continue) to $0 to continue."
4969 # auto-detect Xfixes support
4970 if [ "$CFG_XFIXES" != "no" ]; then
4971 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4972 if [ "$CFG_XFIXES" != "runtime" ]; then
4976 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4977 echo "Xfixes support cannot be enabled due to functionality tests!"
4978 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4979 echo " If you believe this message is in error you may use the continue"
4980 echo " switch (-continue) to $0 to continue."
4988 # auto-detect Xrandr support (resize and rotate extension)
4989 if [ "$CFG_XRANDR" != "no" ]; then
4990 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
4991 if [ "$CFG_XRANDR" != "runtime" ]; then
4995 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4996 echo "Xrandr support cannot be enabled due to functionality tests!"
4997 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4998 echo " If you believe this message is in error you may use the continue"
4999 echo " switch (-continue) to $0 to continue."
5007 # auto-detect Xrender support
5008 if [ "$CFG_XRENDER" != "no" ]; then
5009 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
5012 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5013 echo "Xrender support cannot be enabled due to functionality tests!"
5014 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5015 echo " If you believe this message is in error you may use the continue"
5016 echo " switch (-continue) to $0 to continue."
5024 # auto-detect MIT-SHM support
5025 if [ "$CFG_MITSHM" != "no" ]; then
5026 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
5029 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5030 echo "MITSHM support cannot be enabled due to functionality tests!"
5031 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5032 echo " If you believe this message is in error you may use the continue"
5033 echo " switch (-continue) to $0 to continue."
5041 # auto-detect FontConfig support
5042 if [ "$CFG_FONTCONFIG" != "no" ]; then
5043 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5044 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5045 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5047 QT_CFLAGS_FONTCONFIG=
5048 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5050 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
5052 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5053 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5054 CFG_LIBFREETYPE=system
5056 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5057 echo "FontConfig support cannot be enabled due to functionality tests!"
5058 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5059 echo " If you believe this message is in error you may use the continue"
5060 echo " switch (-continue) to $0 to continue."
5068 # auto-detect Session Management support
5069 if [ "$CFG_SM" = "auto" ]; then
5070 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
5073 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5074 echo "Session Management support cannot be enabled due to functionality tests!"
5075 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5076 echo " If you believe this message is in error you may use the continue"
5077 echo " switch (-continue) to $0 to continue."
5085 # auto-detect SHAPE support
5086 if [ "$CFG_XSHAPE" != "no" ]; then
5087 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
5090 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5091 echo "XShape 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."
5102 # auto-detect XVideo support
5103 if [ "$CFG_XVIDEO" != "no" ]; then
5104 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
5107 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5108 echo "XVideo support cannot be enabled due to functionality tests!"
5109 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5110 echo " If you believe this message is in error you may use the continue"
5111 echo " switch (-continue) to $0 to continue."
5119 # auto-detect XSync support
5120 if [ "$CFG_XSYNC" != "no" ]; then
5121 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
5124 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5125 echo "XSync support cannot be enabled due to functionality tests!"
5126 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5127 echo " If you believe this message is in error you may use the continue"
5128 echo " switch (-continue) to $0 to continue."
5136 # auto-detect Xinerama support
5137 if [ "$CFG_XINERAMA" != "no" ]; then
5138 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
5139 if [ "$CFG_XINERAMA" != "runtime" ]; then
5143 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5144 echo "Xinerama support cannot be enabled due to functionality tests!"
5145 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5146 echo " If you believe this message is in error you may use the continue"
5147 echo " switch (-continue) to $0 to continue."
5155 # auto-detect Xinput support
5156 if [ "$CFG_XINPUT" != "no" ]; then
5157 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
5158 if [ "$CFG_XINPUT" != "runtime" ]; then
5162 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5163 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5164 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5165 echo " If you believe this message is in error you may use the continue"
5166 echo " switch (-continue) to $0 to continue."
5174 # auto-detect XKB support
5175 if [ "$CFG_XKB" != "no" ]; then
5176 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
5179 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5180 echo "XKB support cannot be enabled due to functionality tests!"
5181 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5182 echo " If you believe this message is in error you may use the continue"
5183 echo " switch (-continue) to $0 to continue."
5191 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5192 if [ -n "$PKG_CONFIG" ]; then
5193 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5194 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5196 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5198 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5199 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5201 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5202 echo "Gtk theme support cannot be enabled due to functionality tests!"
5203 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5204 echo " If you believe this message is in error you may use the continue"
5205 echo " switch (-continue) to $0 to continue."
5211 elif [ "$CFG_GLIB" = "no" ]; then
5217 if [ "$BUILD_ON_MAC" = "yes" ]; then
5218 if [ "$CFG_PHONON" != "no" ]; then
5219 # Always enable Phonon (unless it was explicitly disabled)
5223 if [ "$CFG_COREWLAN" = "auto" ]; then
5224 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
5233 if [ "$PLATFORM_QPA" = "yes" ]; then
5234 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5235 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5236 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
5238 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
5241 if [ "$CFG_OPENGL" = "yes" ]; then
5242 echo "All the OpenGL functionality tests failed!"
5243 echo " You might need to modify the include and library search paths by editing"
5244 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5245 echo " ${XQMAKESPEC}."
5250 elif [ "$CFG_OPENGL" = "es2" ]; then
5252 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5253 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5254 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5255 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5256 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5257 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5258 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5259 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5262 "$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
5263 if [ $? != "0" ]; then
5264 echo "The OpenGL ES 2.0 functionality test failed!"
5265 echo " You might need to modify the include and library search paths by editing"
5266 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5267 echo " ${XQMAKESPEC}."
5270 elif [ "$CFG_OPENGL" = "desktop" ]; then
5271 # Desktop OpenGL support
5272 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5273 if [ $? != "0" ]; then
5274 echo "The OpenGL functionality test failed!"
5275 echo " You might need to modify the include and library search paths by editing"
5276 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5277 echo " ${XQMAKESPEC}."
5282 # auto-detect FontConfig support
5283 if [ "$CFG_FONTCONFIG" != "no" ]; then
5284 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5285 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5286 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5288 QT_CFLAGS_FONTCONFIG=
5289 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5291 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
5292 QT_CONFIG="$QT_CONFIG fontconfig"
5293 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5294 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5295 CFG_LIBFREETYPE=system
5300 # Save these for a check later
5301 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5302 ORIG_CFG_XCB="$CFG_XCB"
5304 if [ "$CFG_WAYLAND" != "no" ]; then
5305 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5306 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5307 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5308 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --cflags-only-I wayland-client 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5309 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --libs-only-L wayland-client 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5311 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
5313 QT_CONFIG="$QT_CONFIG wayland"
5314 elif [ "$CFG_WAYLAND" = "yes" ]; then
5315 echo "The Wayland functionality test failed!"
5319 QMakeVar add DEFINES QT_NO_WAYLAND
5323 if [ "$CFG_LIBUDEV" != "no" ]; then
5324 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5326 QT_CONFIG="$QT_CONFIG libudev"
5327 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5328 echo "The libudev functionality test failed!"
5332 QMakeVar add DEFINES QT_NO_LIBUDEV
5336 if [ "$CFG_EVDEV" != "no" ]; then
5337 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5339 QT_CONFIG="$QT_CONFIG evdev"
5340 elif [ "$CFG_EVDEV" = "yes" ]; then
5341 echo "The evdev functionality test failed!"
5345 QMakeVar add DEFINES QT_NO_EVDEV
5349 # Check we actually have X11 :-)
5350 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
5351 QT_CONFIG="$QT_CONFIG xlib"
5354 # auto-detect Xrender support
5355 if [ "$CFG_XRENDER" != "no" ]; then
5356 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
5358 QT_CONFIG="$QT_CONFIG xrender"
5360 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5361 echo "Xrender support cannot be enabled due to functionality tests!"
5362 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5363 echo " If you believe this message is in error you may use the continue"
5364 echo " switch (-continue) to $0 to continue."
5372 if [ "$CFG_XCB" != "no" ]; then
5373 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then
5374 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5375 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5377 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
5379 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
5380 QT_CONFIG="$QT_CONFIG xcb-render"
5383 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 $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
5385 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5388 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
5389 QT_CONFIG="$QT_CONFIG xcb-xlib"
5392 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5393 # auto-detect XInput2/Xinput support
5394 if [ "$CFG_XINPUT2" != "no" ]; then
5395 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
5399 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5400 echo "XInput2 support cannot be enabled due to functionality tests!"
5401 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5402 echo " If you believe this message is in error you may use the continue"
5403 echo " switch (-continue) to $0 to continue."
5412 if [ "$CFG_XCB" = "yes" ]; then
5413 echo "The XCB test failed!"
5414 echo " You might need to install dependency packages."
5415 echo " See src/plugins/platforms/xcb/README."
5419 QMakeVar add DEFINES QT_NO_XCB
5423 # Detect libxkbcommon
5424 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5425 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5426 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5427 if [ "$CFG_WAYLAND" = "yes" ]; then
5428 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5429 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5431 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5432 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5434 if [ "$CFG_WAYLAND" = "yes" ]; then
5435 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5437 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5440 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5441 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5442 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5443 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5444 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5445 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5446 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5449 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5450 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5451 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5452 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5455 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
5456 QT_CONFIG="$QT_CONFIG coreservices"
5458 QMakeVar add DEFINES QT_NO_CORESERVICES
5461 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5462 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5463 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5464 echo "No QPA platform plugin enabled!"
5465 echo " If you really want to build without a QPA platform plugin you must pass"
5466 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5467 echo " cannot run GUI applications."
5477 if [ "$PLATFORM_X11" = "yes" ]; then
5478 if [ "$CFG_EGL" != "no" ]; then
5479 # detect EGL support
5480 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
5481 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5486 if [ "$EGL_VARIANT" = "none" ]; then
5487 if [ "$CFG_EGL" = "yes" ]; then
5488 echo "The EGL functionality test failed!"
5489 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5490 echo " You might need to modify the include and library search paths by editing"
5491 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5492 echo " ${XQMAKESPEC}."
5496 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5497 if [ "$CFG_OPENGL" = "es2" ]; then
5504 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5507 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5508 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5509 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
5510 CFG_LIBFREETYPE=system
5516 if [ "$CFG_ENDIAN" = "auto" ]; then
5517 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5518 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5520 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
5522 if [ "$F" -eq 0 ]; then
5523 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5524 elif [ "$F" -eq 1 ]; then
5525 CFG_ENDIAN="Q_BIG_ENDIAN"
5528 echo "The target system byte order could not be detected!"
5529 echo "Turn on verbose messaging (-v) to see the final report."
5530 echo "You can use the -little-endian or -big-endian switch to"
5531 echo "$0 to continue."
5537 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5538 if [ "$BUILD_ON_MAC" = "yes" ]; then
5541 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5543 if [ "$F" -eq 0 ]; then
5544 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5545 elif [ "$F" -eq 1 ]; then
5546 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5549 echo "The host system byte order could not be detected!"
5550 echo "Turn on verbose messaging (-v) to see the final report."
5551 echo "You can use the -host-little-endian or -host-big-endian switch to"
5552 echo "$0 to continue."
5558 if [ "$CFG_ARMFPA" != "auto" ]; then
5559 if [ "$CFG_ARMFPA" = "yes" ]; then
5560 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5561 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5563 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5566 CFG_DOUBLEFORMAT="normal"
5571 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5572 if [ "$PLATFORM_QPA" = "yes" ]; then
5573 CFG_DOUBLEFORMAT=normal
5575 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5577 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5578 CFG_DOUBLEFORMAT=normal
5579 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5580 CFG_DOUBLEFORMAT=normal
5581 elif [ "$F" -eq 10 ]; then
5582 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
5583 elif [ "$F" -eq 11 ]; then
5584 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
5585 elif [ "$F" -eq 12 ]; then
5586 CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
5588 elif [ "$F" -eq 13 ]; then
5589 CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
5593 echo "The system floating point format could not be detected."
5594 echo "This may cause data to be generated in a wrong format"
5595 echo "Turn on verbose messaging (-v) to see the final report."
5596 # we do not fail on this since this is a new test, and if it fails,
5597 # the old behavior should be correct in most cases
5598 CFG_DOUBLEFORMAT=normal
5604 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5608 if [ "$CFG_STL" != "no" ]; then
5609 if [ "$HAVE_STL" = "yes" ]; then
5612 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5613 echo "STL support cannot be enabled due to functionality tests!"
5614 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5615 echo " If you believe this message is in error you may use the continue"
5616 echo " switch (-continue) to $0 to continue."
5624 # detect POSIX clock_gettime()
5625 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5626 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
5627 CFG_CLOCK_GETTIME=yes
5629 CFG_CLOCK_GETTIME=no
5633 # detect POSIX monotonic clocks
5634 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5635 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
5636 CFG_CLOCK_MONOTONIC=yes
5638 CFG_CLOCK_MONOTONIC=no
5640 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5641 CFG_CLOCK_MONOTONIC=no
5645 if [ "$CFG_MREMAP" = "auto" ]; then
5646 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5653 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5654 if [ "$CFG_GETADDRINFO" != "no" ]; then
5655 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5658 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5659 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5660 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5661 echo " If you believe this message is in error you may use the continue"
5662 echo " switch (-continue) to $0 to continue."
5670 # find if the platform provides inotify
5671 if [ "$CFG_INOTIFY" != "no" ]; then
5672 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5675 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5676 echo "inotify support cannot be enabled due to functionality tests!"
5677 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5678 echo " If you believe this message is in error you may use the continue"
5679 echo " switch (-continue) to $0 to continue."
5687 # find if the platform provides if_nametoindex (ipv6 interface name support)
5688 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5689 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
5692 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5693 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5694 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5695 echo " If you believe this message is in error you may use the continue"
5696 echo " switch (-continue) to $0 to continue."
5704 # find if the platform provides getifaddrs (network interface enumeration)
5705 if [ "$CFG_GETIFADDRS" != "no" ]; then
5706 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5709 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5710 echo "getifaddrs support cannot be enabled due to functionality tests!"
5711 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5712 echo " If you believe this message is in error you may use the continue"
5713 echo " switch (-continue) to $0 to continue."
5722 if [ "$CFG_OPENSSL" != "no" ]; then
5723 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
5724 if [ "$CFG_OPENSSL" = "auto" ]; then
5728 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5729 echo "OpenSSL support cannot be enabled due to functionality tests!"
5730 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5731 echo " If you believe this message is in error you may use the continue"
5732 echo " switch (-continue) to $0 to continue."
5741 if [ "$CFG_PCRE" != "qt" ]; then
5742 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5745 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5746 echo "PCRE support cannot be enabled due to functionality tests!"
5747 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5748 echo " If you believe this message is in error you may use the continue"
5749 echo " switch (-continue) to $0 to continue."
5757 # detect OpenVG support
5758 if [ "$CFG_OPENVG" != "no" ]; then
5759 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
5760 if [ "$CFG_OPENVG" = "auto" ]; then
5763 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
5764 if [ "$CFG_OPENVG" = "auto" ]; then
5767 CFG_OPENVG_ON_OPENGL=yes
5768 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
5769 if [ "$CFG_OPENVG" = "auto" ]; then
5772 CFG_OPENVG_LC_INCLUDES=yes
5773 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
5774 if [ "$CFG_OPENVG" = "auto" ]; then
5777 CFG_OPENVG_LC_INCLUDES=yes
5778 CFG_OPENVG_ON_OPENGL=yes
5780 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5781 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5782 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5783 echo " If you believe this message is in error you may use the continue"
5784 echo " switch (-continue) to $0 to continue."
5790 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
5791 CFG_OPENVG_SHIVA=yes
5795 if [ "$CFG_ALSA" = "auto" ]; then
5796 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5803 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5804 if [ "$CFG_ARCH" = "arm" ]; then
5805 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5806 if [ $? != "0" ]; then
5807 CFG_JAVASCRIPTCORE_JIT=no
5810 case "$XPLATFORM" in
5812 CFG_JAVASCRIPTCORE_JIT=no
5818 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5819 QMakeVar set JAVASCRIPTCORE_JIT yes
5820 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5821 QMakeVar set JAVASCRIPTCORE_JIT no
5824 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5825 CFG_AUDIO_BACKEND=yes
5828 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5829 echo "Warning: largefile support cannot be disabled for win32."
5833 #-------------------------------------------------------------------------------
5834 # ask for all that hasn't been auto-detected or specified in the arguments
5835 #-------------------------------------------------------------------------------
5837 # enable dwarf2 support on Mac
5838 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5839 QT_CONFIG="$QT_CONFIG dwarf2"
5842 # Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
5843 if [ "$BUILD_ON_MAC" = "yes" ]; then
5844 DEFAULT_ARCH="$CFG_MAC_ARCHS"
5845 if [ -z "$DEFAULT_ARCH" ]; then
5846 case `file "${outpath}/bin/qmake"` in
5854 # unsupported/unknown
5858 if [ -n "$DEFAULT_ARCH" ]; then
5859 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5860 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5861 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5862 # Make the application arch follow the Qt arch for single arch builds.
5863 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
5864 [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5869 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5870 QT_CONFIG="$QT_CONFIG phonon-backend"
5873 # disable accessibility
5874 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5875 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5877 QT_CONFIG="$QT_CONFIG accessibility"
5880 # egl stuff does not belong in lighthouse, but rather in plugins
5881 if [ "$PLATFORM_QPA" = "yes" ]; then
5886 if [ "$CFG_EGL" = "no" ]; then
5887 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5889 QT_CONFIG="$QT_CONFIG egl"
5890 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5891 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5896 if [ "$CFG_OPENVG" = "no" ]; then
5897 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5899 QT_CONFIG="$QT_CONFIG openvg"
5900 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5901 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5903 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5904 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5906 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5907 QT_CONFIG="$QT_CONFIG shivavg"
5908 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5913 if [ "$CFG_OPENGL" = "no" ]; then
5914 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5916 QT_CONFIG="$QT_CONFIG opengl"
5919 if [ "$CFG_OPENGL" = "es2" ]; then
5920 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5923 if [ "$CFG_OPENGL" = "es2" ]; then
5924 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5925 QT_CONFIG="$QT_CONFIG opengles2"
5928 # safe execution environment
5929 if [ "$CFG_SXE" != "no" ]; then
5930 QT_CONFIG="$QT_CONFIG sxe"
5933 # build up the variables for output
5934 if [ "$CFG_DEBUG" = "yes" ]; then
5935 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5936 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5937 elif [ "$CFG_DEBUG" = "no" ]; then
5938 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5939 QMAKE_CONFIG="$QMAKE_CONFIG release"
5941 if [ "$CFG_SHARED" = "yes" ]; then
5942 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5943 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5944 elif [ "$CFG_SHARED" = "no" ]; then
5945 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5946 QMAKE_CONFIG="$QMAKE_CONFIG static"
5948 if [ "$PLATFORM_QPA" = "yes" ]; then
5949 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5950 QT_CONFIG="$QT_CONFIG qpa"
5951 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5952 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5955 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5956 # Do not set this here for Windows. Let qmake do it so
5957 # debug and release precompiled headers are kept separate.
5958 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5960 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5961 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5962 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5963 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5964 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5965 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5967 if [ "$CFG_STL" = "no" ]; then
5968 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5970 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5972 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5973 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5975 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5976 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5977 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5978 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5979 QMakeVar add QMAKE_CFLAGS -g
5980 QMakeVar add QMAKE_CXXFLAGS -g
5981 QT_CONFIG="$QT_CONFIG separate_debug_info"
5983 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5984 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5986 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5987 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5988 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5989 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5990 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5991 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5992 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5993 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5994 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5995 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5996 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5997 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5998 QT_CONFIG="$QT_CONFIG clock-gettime"
6000 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6001 QT_CONFIG="$QT_CONFIG clock-monotonic"
6003 if [ "$CFG_MREMAP" = "yes" ]; then
6004 QT_CONFIG="$QT_CONFIG mremap"
6006 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6007 QT_CONFIG="$QT_CONFIG getaddrinfo"
6009 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6010 QT_CONFIG="$QT_CONFIG ipv6ifname"
6012 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6013 QT_CONFIG="$QT_CONFIG getifaddrs"
6015 if [ "$CFG_INOTIFY" = "yes" ]; then
6016 QT_CONFIG="$QT_CONFIG inotify"
6018 if [ "$CFG_LIBJPEG" = "no" ]; then
6020 elif [ "$CFG_LIBJPEG" = "system" ]; then
6021 QT_CONFIG="$QT_CONFIG system-jpeg"
6023 if [ "$CFG_JPEG" = "no" ]; then
6024 QT_CONFIG="$QT_CONFIG no-jpeg"
6025 elif [ "$CFG_JPEG" = "yes" ]; then
6026 QT_CONFIG="$QT_CONFIG jpeg"
6028 if [ "$CFG_LIBPNG" = "no" ]; then
6031 if [ "$CFG_LIBPNG" = "system" ]; then
6032 QT_CONFIG="$QT_CONFIG system-png"
6034 if [ "$CFG_PNG" = "no" ]; then
6035 QT_CONFIG="$QT_CONFIG no-png"
6036 elif [ "$CFG_PNG" = "yes" ]; then
6037 QT_CONFIG="$QT_CONFIG png"
6039 if [ "$CFG_GIF" = "no" ]; then
6040 QT_CONFIG="$QT_CONFIG no-gif"
6041 elif [ "$CFG_GIF" = "yes" ]; then
6042 QT_CONFIG="$QT_CONFIG gif"
6044 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6045 QT_CONFIG="$QT_CONFIG no-freetype"
6046 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6047 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6048 QT_CONFIG="$QT_CONFIG system-freetype"
6050 QT_CONFIG="$QT_CONFIG freetype"
6052 if [ "$CFG_GUI" = "auto" ]; then
6055 if [ "$CFG_GUI" = "no" ]; then
6056 QT_CONFIG="$QT_CONFIG no-gui"
6058 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6062 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6063 #On Mac we implicitly link against libz, so we
6064 #never use the 3rdparty stuff.
6065 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6067 if [ "$CFG_ZLIB" = "yes" ]; then
6068 QT_CONFIG="$QT_CONFIG zlib"
6069 elif [ "$CFG_ZLIB" = "system" ]; then
6070 QT_CONFIG="$QT_CONFIG system-zlib"
6073 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6074 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6075 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6076 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6077 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6078 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6079 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6080 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6081 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6082 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6083 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6084 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6085 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6086 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6087 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6089 if [ "$PLATFORM_X11" = "yes" ]; then
6090 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6092 # for some reason, the following libraries are not always built shared,
6093 # so *every* program/lib (including Qt) has to link against them
6094 if [ "$CFG_XSHAPE" = "yes" ]; then
6095 QT_CONFIG="$QT_CONFIG xshape"
6097 if [ "$CFG_XVIDEO" = "yes" ]; then
6098 QT_CONFIG="$QT_CONFIG xvideo"
6100 if [ "$CFG_XSYNC" = "yes" ]; then
6101 QT_CONFIG="$QT_CONFIG xsync"
6103 if [ "$CFG_XINERAMA" = "yes" ]; then
6104 QT_CONFIG="$QT_CONFIG xinerama"
6105 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6107 if [ "$CFG_XCURSOR" = "yes" ]; then
6108 QT_CONFIG="$QT_CONFIG xcursor"
6109 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6111 if [ "$CFG_XFIXES" = "yes" ]; then
6112 QT_CONFIG="$QT_CONFIG xfixes"
6113 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6115 if [ "$CFG_XRANDR" = "yes" ]; then
6116 QT_CONFIG="$QT_CONFIG xrandr"
6117 if [ "$CFG_XRENDER" != "yes" ]; then
6118 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6119 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6121 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6124 if [ "$CFG_XRENDER" = "yes" ]; then
6125 QT_CONFIG="$QT_CONFIG xrender"
6126 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6128 if [ "$CFG_MITSHM" = "yes" ]; then
6129 QT_CONFIG="$QT_CONFIG mitshm"
6131 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6132 QT_CONFIG="$QT_CONFIG fontconfig"
6134 if [ "$CFG_XINPUT" = "yes" ]; then
6135 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6137 if [ "$CFG_XINPUT" = "yes" ]; then
6138 QT_CONFIG="$QT_CONFIG xinput tablet"
6140 if [ "$CFG_XKB" = "yes" ]; then
6141 QT_CONFIG="$QT_CONFIG xkb"
6145 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6146 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6147 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6149 if [ "$PLATFORM_MAC" = "yes" ]; then
6150 if [ "$CFG_RPATH" = "yes" ]; then
6151 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6153 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
6154 if [ -n "$RPATH_FLAGS" ]; then
6156 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6160 elif [ "$CFG_RPATH" = "yes" ]; then
6161 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6165 if [ "$CFG_RPATH" = "yes" ]; then
6166 # set the default rpath to the library installation directory
6167 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6169 if [ -n "$RPATH_FLAGS" ]; then
6170 # add the user defined rpaths
6171 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6175 if [ '!' -z "$I_FLAGS" ]; then
6176 # add the user define include paths
6177 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6178 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6181 if [ '!' -z "$W_FLAGS" ]; then
6182 # add the user defined warning flags
6183 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6184 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6185 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6188 # turn off exceptions for the compilers that support it
6189 if [ "$XPLATFORM" != "$PLATFORM" ]; then
6190 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6192 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6195 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6196 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6199 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6200 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6201 # Follow default behavior of configure.exe by overriding with "rtti".
6202 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6205 if [ "$CFG_ALSA" = "yes" ]; then
6206 QT_CONFIG="$QT_CONFIG alsa"
6209 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6210 QT_CONFIG="$QT_CONFIG pulseaudio"
6213 if [ "$CFG_COREWLAN" = "yes" ]; then
6214 QT_CONFIG="$QT_CONFIG corewlan"
6217 if [ "$CFG_ICU" = "yes" ]; then
6218 QT_CONFIG="$QT_CONFIG icu"
6221 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6222 QT_CONFIG="$QT_CONFIG force_asserts"
6225 if [ "$CFG_PCRE" = "qt" ]; then
6226 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6230 # Some Qt modules are too advanced in C++ for some old compilers
6231 # Detect here the platforms where they are known to work.
6233 # See Qt documentation for more information on which features are
6234 # supported and on which compilers.
6236 canBuildQtConcurrent="yes"
6237 canUseV8Snapshot="yes"
6239 case "$XPLATFORM" in
6241 # PA-RISC's assembly is too limited
6242 # gcc 3.4 on that platform can't build QtXmlPatterns
6243 # the assembly it generates cannot be compiled
6245 # Check gcc's version
6246 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6250 canBuildQtXmlPatterns="no"
6254 canBuildQtXmlPatterns="no"
6258 unsupported/vxworks-*-g++*)
6261 unsupported/vxworks-*-dcc*)
6263 canBuildQtXmlPatterns="no"
6266 # Check gcc's version
6267 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6275 canBuildQtXmlPatterns="no"
6280 # Check the compiler version
6281 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6284 canBuildQtXmlPatterns="no"
6285 canBuildQtConcurrent="no"
6289 canBuildQtConcurrent="no"
6295 canBuildQtXmlPatterns="no"
6296 canBuildQtConcurrent="no"
6302 # Get the xlC version
6303 cat > xlcver.c <<EOF
6307 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6312 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6313 xlcver=`./xlcver 2>/dev/null`
6316 if [ "$OPT_VERBOSE" = "yes" ]; then
6317 if [ -n "$xlcver" ]; then
6318 echo Found IBM xlC version: $xlcver.
6320 echo Could not determine IBM xlC version, assuming oldest supported.
6327 canBuildQtXmlPatterns="no"
6328 canBuildQtConcurrent="no"
6332 canBuildQtConcurrent="no"
6338 canBuildQtConcurrent="no"
6342 if [ "$CFG_GUI" = "no" ]; then
6343 # WebKit requires QtGui
6347 if [ "$CFG_SHARED" = "no" ]; then
6349 echo "WARNING: Using static linking will disable the WebKit module."
6354 CFG_CONCURRENT="yes"
6355 if [ "$canBuildQtConcurrent" = "no" ]; then
6356 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6359 QT_CONFIG="$QT_CONFIG concurrent"
6363 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6364 QT_CONFIG="$QT_CONFIG audio-backend"
6368 if [ "$CFG_WEBKIT" = "debug" ]; then
6369 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6373 QT_CONFIG="$QT_CONFIG v8"
6374 # Detect snapshot support
6375 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6376 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6379 *) canUseV8Snapshot="no"
6383 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6384 # QEMU crashes when building inside Scratchbox with an ARM target
6385 canUseV8Snapshot="no"
6388 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6389 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6391 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6392 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6395 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6396 QT_CONFIG="$QT_CONFIG v8snapshot"
6400 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6401 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6404 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6407 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6408 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6409 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6414 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6415 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6416 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6423 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6429 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6431 case "$COMPILER_VERSION" in
6433 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6434 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6435 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6438 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6439 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6440 QT_GCC_PATCH_VERSION=0
6450 #-------------------------------------------------------------------------------
6451 # part of configuration information goes into qconfig.h
6452 #-------------------------------------------------------------------------------
6454 case "$CFG_QCONFIG" in
6456 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6459 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6460 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6461 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6462 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6463 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6464 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6466 echo "#endif" >>"$tmpconfig"
6470 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6474 # define QT_EDITION $QT_EDITION
6477 /* Machine byte-order */
6478 #define Q_BIG_ENDIAN 4321
6479 #define Q_LITTLE_ENDIAN 1234
6482 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6483 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6484 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6485 #if defined(__BIG_ENDIAN__)
6486 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6487 #elif defined(__LITTLE_ENDIAN__)
6488 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6490 # error "Unable to determine byte order!"
6494 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6496 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6497 if [ "$CFG_ENDIAN" = "auto" ]; then
6498 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6499 #if defined(__BIG_ENDIAN__)
6500 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6501 #elif defined(__LITTLE_ENDIAN__)
6502 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6504 # error "Unable to determine byte order!"
6508 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6510 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6512 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6513 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6514 /* Non-IEEE double format */
6515 #define Q_DOUBLE_LITTLE "01234567"
6516 #define Q_DOUBLE_BIG "76543210"
6517 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6518 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6519 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6522 if [ "$CFG_ARMFPA" = "yes" ]; then
6523 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6524 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6525 #ifndef QT_BOOTSTRAPPED
6530 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6534 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6535 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6536 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6537 /* Machine Architecture */
6538 #ifndef QT_BOOTSTRAPPED
6539 # define QT_ARCH_${CFG_ARCH_STR}
6541 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6545 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6546 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6548 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6549 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6552 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6553 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6556 if [ "$BUILD_ON_MAC" = "yes" ]; then
6557 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6558 #if defined(__LP64__)
6559 # define QT_POINTER_SIZE 8
6561 # define QT_POINTER_SIZE 4
6565 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6566 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6569 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6570 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6571 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6575 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6577 if [ "$CFG_DEV" = "yes" ]; then
6578 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6581 if [ "$PLATFORM_QPA" = "yes" ]; then
6582 # Add QPA to config.h
6583 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6586 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6587 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6590 # Add turned on SQL drivers
6591 for DRIVER in $CFG_SQL_AVAILABLE; do
6592 eval "VAL=\$CFG_SQL_$DRIVER"
6595 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6596 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6597 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6600 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6606 QMakeVar set sql-drivers "$SQL_DRIVERS"
6607 QMakeVar set sql-plugins "$SQL_PLUGINS"
6609 # Add other configuration options to the qconfig.h file
6610 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6611 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6612 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6613 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6614 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6615 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6616 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6618 # X11/Unix/Mac only configs
6619 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6620 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6621 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6622 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6623 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6624 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6625 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6626 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6627 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6628 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6629 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6630 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6631 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6632 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6633 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6635 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6636 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6637 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6638 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6639 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6640 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6641 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6642 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6643 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6644 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6645 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6646 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6647 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6649 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6650 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6651 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6652 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6653 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6654 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6655 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6656 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6658 # sort QCONFIG_FLAGS for neatness if we can
6659 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6660 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6662 if [ -n "$QCONFIG_FLAGS" ]; then
6663 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6664 #ifndef QT_BOOTSTRAPPED
6667 for cfg in $QCONFIG_FLAGS; do
6668 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6669 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6670 # figure out define logic, so we can output the correct
6671 # ifdefs to override the global defines in a project
6673 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6674 # QT_NO_option can be forcefully turned on by QT_option
6675 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6676 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6677 # QT_option can be forcefully turned off by QT_NO_option
6678 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6681 if [ -z $cfgdNeg ]; then
6682 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6689 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6690 #if defined($cfgd) && defined($cfgdNeg)
6692 #elif !defined($cfgd) && !defined($cfgdNeg)
6699 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6700 #endif // QT_BOOTSTRAPPED
6705 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6706 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6707 #define QT_VISIBILITY_AVAILABLE
6712 if [ -n "$QT_LIBINFIX" ]; then
6713 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6714 #define QT_LIBINFIX "$QT_LIBINFIX"
6719 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6720 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6721 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6723 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6724 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6725 chmod -w "$outpath/src/corelib/global/qconfig.h"
6726 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6727 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6731 #-------------------------------------------------------------------------------
6732 # save configuration into qconfig.pri
6733 #-------------------------------------------------------------------------------
6734 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6735 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6736 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6737 if [ "$CFG_DEBUG" = "yes" ]; then
6738 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6739 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6740 QT_CONFIG="$QT_CONFIG release"
6742 QT_CONFIG="$QT_CONFIG debug"
6743 elif [ "$CFG_DEBUG" = "no" ]; then
6744 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6745 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6746 QT_CONFIG="$QT_CONFIG debug"
6748 QT_CONFIG="$QT_CONFIG release"
6750 if [ "$CFG_STL" = "yes" ]; then
6751 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6753 if [ "$CFG_FRAMEWORK" = "no" ]; then
6754 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6756 QT_CONFIG="$QT_CONFIG qt_framework"
6757 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6759 if [ "$CFG_DEV" = "yes" ]; then
6760 QT_CONFIG="$QT_CONFIG private_tests"
6763 cat >>"$QTCONFIG.tmp" <<EOF
6765 CONFIG += $QTCONFIG_CONFIG
6767 QT_EDITION = $Edition
6768 QT_CONFIG += $QT_CONFIG
6771 QT_VERSION = $QT_VERSION
6772 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6773 QT_MINOR_VERSION = $QT_MINOR_VERSION
6774 QT_PATCH_VERSION = $QT_PATCH_VERSION
6777 QT_LIBINFIX = $QT_LIBINFIX
6778 QT_NAMESPACE = $QT_NAMESPACE
6781 if [ -n "$CFG_SYSROOT" ]; then
6782 echo "# sysroot" >>"$QTCONFIG.tmp"
6783 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6784 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
6785 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
6786 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
6787 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
6788 echo "}" >> "$QTCONFIG.tmp"
6789 echo >> "$QTCONFIG.tmp"
6791 if [ "$CFG_RPATH" = "yes" ]; then
6792 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6794 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6795 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6796 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6797 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6800 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6801 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6802 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6805 # replace qconfig.pri if it differs from the newly created temp file
6806 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6807 rm -f "$QTCONFIG.tmp"
6809 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6812 #-------------------------------------------------------------------------------
6813 # save configuration into qmodule.pri
6814 #-------------------------------------------------------------------------------
6815 QTMODULE="$outpath/mkspecs/qmodule.pri"
6817 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6819 # Ensure we can link to uninistalled libraries
6820 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6821 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6823 if [ -n "$QT_CFLAGS_PSQL" ]; then
6824 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6826 if [ -n "$QT_LFLAGS_PSQL" ]; then
6827 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6829 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6830 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6832 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6833 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6835 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6836 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6838 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6839 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6841 if [ -n "$QT_LFLAGS_ODBC" ]; then
6842 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6844 if [ -n "$QT_LFLAGS_TDS" ]; then
6845 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6848 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6849 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6852 #dump in the OPENSSL_LIBS info
6853 if [ '!' -z "$OPENSSL_LIBS" ]; then
6854 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6855 elif [ "$CFG_OPENSSL" = "linked" ]; then
6856 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6859 #dump in the SDK info
6860 if [ '!' -z "$CFG_SDK" ]; then
6861 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6865 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6866 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6868 # replace qmodule.pri if it differs from the newly created temp file
6869 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6870 rm -f "$QTMODULE.tmp"
6872 mv -f "$QTMODULE.tmp" "$QTMODULE"
6875 #-------------------------------------------------------------------------------
6876 # save configuration into .qmake.cache
6877 #-------------------------------------------------------------------------------
6879 CACHEFILE="$outpath/.qmake.cache"
6880 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6881 cat >>"$CACHEFILE.tmp" <<EOF
6883 QT_SOURCE_TREE = \$\$quote($relpath)
6884 QT_BUILD_TREE = \$\$quote($outpath)
6885 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6887 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6888 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
6889 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
6890 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
6891 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6892 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6894 include(\$\$PWD/mkspecs/qmodule.pri)
6895 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6896 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
6897 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
6901 #dump the qmake spec
6902 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6903 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6905 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6910 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
6911 if [ "$CFG_INCREMENTAL" = "yes" ]; then
6912 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
6913 # don't need to worry about generated files
6914 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
6915 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
6917 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
6919 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
6920 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
6923 # replace .qmake.cache if it differs from the newly created temp file
6924 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6925 rm -f "$CACHEFILE.tmp"
6927 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6930 #-------------------------------------------------------------------------------
6931 # give feedback on configuration
6932 #-------------------------------------------------------------------------------
6936 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6939 This target is using the GNU C++ compiler ($PLATFORM).
6941 Recent versions of this compiler automatically include code for
6942 exceptions, which increase both the size of the Qt libraries and
6943 the amount of memory taken by your applications.
6945 You may choose to re-run `basename $0` with the -no-exceptions
6946 option to compile Qt without exceptions. This is completely binary
6947 compatible, and existing applications will continue to work.
6955 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6958 This target is using the MIPSpro C++ compiler ($PLATFORM).
6960 You may choose to re-run `basename $0` with the -no-exceptions
6961 option to compile Qt without exceptions. This will make the
6962 size of the Qt library smaller and reduce the amount of memory
6963 taken by your applications.
6975 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6976 echo "Build type: $PLATFORM"
6978 echo "Building on: $PLATFORM"
6979 echo "Building for: $XPLATFORM"
6982 if [ ! -z "$CFG_MAC_ARCHS" ]; then
6983 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
6985 echo "Architecture: $CFG_ARCH"
6988 if [ "$PLATFORM_QPA" = "yes" ]; then
6989 echo "Host architecture: $CFG_HOST_ARCH"
6992 if [ -n "$PLATFORM_NOTES" ]; then
6993 echo "Platform notes:"
6994 echo "$PLATFORM_NOTES"
6999 if [ "$OPT_VERBOSE" = "yes" ]; then
7000 echo $ECHO_N "qmake vars .......... $ECHO_C"
7001 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
7002 echo "qmake switches ......... $QMAKE_SWITCHES"
7005 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
7006 echo "Build .................. $CFG_BUILD_PARTS"
7007 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
7008 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7009 echo "Debug .................. yes (combined)"
7010 if [ "$CFG_DEBUG" = "yes" ]; then
7011 echo "Default Link ........... debug"
7013 echo "Default Link ........... release"
7016 echo "Debug .................. $CFG_DEBUG"
7018 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
7019 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
7020 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
7021 echo "QtConcurrent code ...... $CFG_CONCURRENT"
7022 echo "QtGui module ........... $CFG_GUI"
7023 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7024 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
7026 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
7028 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
7029 echo "STL support ............ $CFG_STL"
7030 echo "PCH support ............ $CFG_PRECOMPILE"
7031 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
7032 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
7033 echo "AVX..................... ${CFG_AVX}"
7034 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
7035 echo "iWMMXt support ......... ${CFG_IWMMXT}"
7036 echo "NEON support ........... ${CFG_NEON}"
7038 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
7039 echo "getaddrinfo support .... $CFG_GETADDRINFO"
7040 echo "getifaddrs support ..... $CFG_GETIFADDRS"
7041 echo "Accessibility .......... $CFG_ACCESSIBILITY"
7042 echo "NIS support ............ $CFG_NIS"
7043 echo "CUPS support ........... $CFG_CUPS"
7044 echo "Iconv support .......... $CFG_ICONV"
7045 echo "Glib support ........... $CFG_GLIB"
7046 echo "GStreamer support ...... $CFG_GSTREAMER"
7047 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7048 echo "Large File support ..... $CFG_LARGEFILE"
7049 echo "GIF support ............ $CFG_GIF"
7050 if [ "$CFG_JPEG" = "no" ]; then
7051 echo "JPEG support ........... $CFG_JPEG"
7053 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
7055 if [ "$CFG_PNG" = "no" ]; then
7056 echo "PNG support ............ $CFG_PNG"
7058 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
7060 echo "zlib support ........... $CFG_ZLIB"
7061 echo "Session management ..... $CFG_SM"
7063 if [ "$CFG_OPENGL" = "desktop" ]; then
7064 echo "OpenGL support ......... yes (Desktop OpenGL)"
7065 elif [ "$CFG_OPENGL" = "es2" ]; then
7066 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
7068 echo "OpenGL support ......... no"
7070 if [ "$CFG_EGL" != "no" ]; then
7071 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7072 echo "EGL support ............ yes <GLES/egl.h>"
7074 echo "EGL support ............ yes <EGL/egl.h>"
7077 if [ "$CFG_OPENVG" ]; then
7078 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7079 echo "OpenVG support ......... ShivaVG"
7081 echo "OpenVG support ......... $CFG_OPENVG"
7084 if [ "$PLATFORM_X11" = "yes" ]; then
7085 echo "NAS sound support ...... $CFG_NAS"
7086 echo "XShape support ......... $CFG_XSHAPE"
7087 echo "XVideo support ......... $CFG_XVIDEO"
7088 echo "XSync support .......... $CFG_XSYNC"
7089 echo "Xinerama support ....... $CFG_XINERAMA"
7090 echo "Xcursor support ........ $CFG_XCURSOR"
7091 echo "Xfixes support ......... $CFG_XFIXES"
7092 echo "Xrandr support ......... $CFG_XRANDR"
7093 echo "Xi support ............. $CFG_XINPUT"
7094 echo "MIT-SHM support ........ $CFG_MITSHM"
7095 echo "FontConfig support ..... $CFG_FONTCONFIG"
7096 echo "XKB Support ............ $CFG_XKB"
7097 echo "immodule support ....... $CFG_IM"
7098 echo "GTK theme support ...... $CFG_QGTKSTYLE"
7100 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
7101 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
7102 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
7103 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
7104 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
7105 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
7106 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
7107 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
7108 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
7111 if [ "$CFG_OPENSSL" = "yes" ]; then
7112 OPENSSL_LINKAGE="(run-time)"
7113 elif [ "$CFG_OPENSSL" = "linked" ]; then
7114 OPENSSL_LINKAGE="(linked)"
7116 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
7117 echo "Alsa support ........... $CFG_ALSA"
7118 if [ "$BUILD_ON_MAC" = "yes" ]; then
7119 echo "CoreWlan support ....... $CFG_COREWLAN"
7121 echo "libICU support ......... $CFG_ICU"
7122 echo "PCRE support ........... $CFG_PCRE"
7123 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7124 echo "Xcb support ............ limited (old version)"
7126 echo "Xcb support ............ $CFG_XCB"
7128 echo "Xrender support ........ $CFG_XRENDER"
7129 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7130 echo "XInput2 support ........ $CFG_XINPUT2"
7134 # complain about not being able to use dynamic plugins if we are using a static build
7135 if [ "$CFG_SHARED" = "no" ]; then
7137 echo "WARNING: Using static linking will disable the use of dynamically"
7138 echo "loaded plugins. Make sure to import all needed static plugins,"
7139 echo "or compile needed modules into the library."
7142 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7144 echo "NOTE: When linking against OpenSSL, you can override the default"
7145 echo "library names through OPENSSL_LIBS."
7147 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
7150 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7152 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
7153 echo "if you want a pure debug build."
7158 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7163 #-------------------------------------------------------------------------------
7164 # build makefiles based on the configuration
7165 #-------------------------------------------------------------------------------
7167 echo "Finding project files. Please wait..."
7168 if [ "$CFG_NOPROCESS" != "yes" ]; then
7169 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7170 if [ -f "${relpath}/qtbase.pro" ]; then
7171 mkfile="${outpath}/Makefile"
7172 [ -f "$mkfile" ] && chmod +w "$mkfile"
7173 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7177 # .projects -> projects to process
7178 # .projects.1 -> qt and moc
7179 # .projects.2 -> subdirs and libs
7180 # .projects.3 -> the rest
7181 rm -f .projects .projects.1 .projects.2 .projects.3
7183 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7184 if [ -z "$AWK" ]; then
7185 for p in `echo $QMAKE_PROJECTS`; do
7186 echo "$p" >> .projects
7189 cat >projects.awk <<EOF
7195 first = "./.projects.1.tmp"
7196 second = "./.projects.2.tmp"
7197 third = "./.projects.3.tmp"
7202 if ( ! target_file )
7204 print input_file >target_file
7209 input_file = FILENAME
7214 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7217 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7218 target_file = second
7223 matched_target == 0 && /^(TEMPLATE.*=)/ {
7224 if ( \$3 == "subdirs" )
7225 target_file = second
7226 else if ( \$3 == "lib" )
7232 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7233 if ( \$0 ~ /plugin/ )
7236 target_file = second
7241 if ( ! target_file )
7243 print input_file >>target_file
7250 for p in `echo $QMAKE_PROJECTS`; do
7251 echo "$p" >> .projects.all
7254 # if you get errors about the length of the command line to awk, change the -l arg
7256 split -l 100 .projects.all .projects.all.
7257 for p in .projects.all.*; do
7258 "$AWK" -f projects.awk `cat $p`
7259 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7260 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7261 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7262 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7264 rm -f .projects.all* projects.awk
7266 [ -f .projects.1 ] && cat .projects.1 >>.projects
7267 [ -f .projects.2 ] && cat .projects.2 >>.projects
7268 rm -f .projects.1 .projects.2
7269 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7270 cat .projects.3 >>.projects
7274 # don't sort Qt and MOC in with the other project files
7275 # also work around a segfaulting uniq(1)
7276 if [ -f .sorted.projects.2 ]; then
7277 sort .sorted.projects.2 > .sorted.projects.2.new
7278 mv -f .sorted.projects.2.new .sorted.projects.2
7279 cat .sorted.projects.2 >> .sorted.projects.1
7281 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7282 rm -f .sorted.projects.2 .sorted.projects.1
7286 if [ -f .projects ]; then
7287 uniq .projects >.tmp
7288 mv -f .tmp .projects
7289 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7291 if [ -f .projects.3 ]; then
7292 uniq .projects.3 >.tmp
7293 mv -f .tmp .projects.3
7294 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7296 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7300 for part in $CFG_BUILD_PARTS; do
7302 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7303 libs) PART_ROOTS="$PART_ROOTS src" ;;
7304 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7305 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7310 if [ "$CFG_DEV" = "yes" ]; then
7311 PART_ROOTS="$PART_ROOTS tests"
7314 echo "Creating makefiles. Please wait..."
7315 for file in .projects .projects.3; do
7316 [ '!' -f "$file" ] && continue
7317 for a in `cat $file`; do
7319 for r in $PART_ROOTS; do
7320 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7325 [ "$IN_ROOT" = "no" ] && continue
7328 *winmain/winmain.pro)
7329 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7333 */qmake/qmake.pro) continue ;;
7334 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7335 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7341 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7342 test -d "$dir" || mkdir -p "$dir"
7343 OUTDIR="$outpath/$dir"
7344 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7345 # fast configure - the makefile exists, skip it
7346 # since the makefile exists, it was generated by qmake, which means we
7347 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7349 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7352 QMAKE_SPEC_ARGS="-spec $SPEC"
7353 echo $ECHO_N " for $a$ECHO_C"
7355 QMAKE="$outpath/bin/qmake"
7356 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7357 if [ "$file" = ".projects.3" ]; then
7360 cat >"${OUTDIR}/Makefile" <<EOF
7361 # ${OUTDIR}/Makefile: generated by configure
7363 # WARNING: This makefile will be replaced with a real makefile.
7364 # All changes made to this file will be lost.
7366 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7368 cat >>"${OUTDIR}/Makefile" <<EOF
7370 all clean install qmake first Makefile: FORCE
7371 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7379 if [ "$OPT_VERBOSE" = "yes" ]; then
7380 echo " (`basename $SPEC`)"
7381 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7386 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7387 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7391 rm -f .projects .projects.3
7393 #-------------------------------------------------------------------------------
7394 # check for platforms that we don't yet know about
7395 #-------------------------------------------------------------------------------
7396 if [ "$CFG_ARCH" = "generic" ]; then
7399 NOTICE: Atomic operations are not yet supported for this
7402 Qt will use the 'generic' architecture instead, which uses a
7403 single pthread_mutex_t to protect all atomic operations. This
7404 implementation is the slow (but safe) fallback implementation
7405 for architectures Qt does not yet support.
7409 #-------------------------------------------------------------------------------
7410 # check if the user passed the -no-zlib option, which is no longer supported
7411 #-------------------------------------------------------------------------------
7412 if [ -n "$ZLIB_FORCED" ]; then
7413 which_zlib="supplied"
7414 if [ "$CFG_ZLIB" = "system" ]; then
7420 NOTICE: The -no-zlib option was supplied but is no longer
7423 Qt now requires zlib support in all builds, so the -no-zlib
7424 option was ignored. Qt will be built using the $which_zlib
7429 #-------------------------------------------------------------------------------
7430 # finally save the executed command to another script
7431 #-------------------------------------------------------------------------------
7432 if [ `basename $0` != "config.status" ]; then
7433 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7435 # add the system variables
7436 for varname in $SYSTEM_VARIABLES; do
7438 'if [ -n "\$'${varname}'" ]; then
7439 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7444 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7446 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7447 echo "#!/bin/sh" > "$outpath/config.status"
7448 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7449 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7450 echo "else" >> "$outpath/config.status"
7451 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7452 echo "fi" >> "$outpath/config.status"
7453 chmod +x "$outpath/config.status"
7456 if [ -n "$RPATH_MESSAGE" ]; then
7458 echo "$RPATH_MESSAGE"
7461 MAKE=`basename "$MAKE"`
7463 echo Qt is now configured for building. Just run \'$MAKE\'.
7464 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7465 echo Once everything is built, Qt is installed.
7466 echo You should not run \'$MAKE install\'.
7468 echo Once everything is built, you must run \'$MAKE install\'.
7469 echo Qt will be installed into $QT_INSTALL_PREFIX
7472 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.