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
365 echo "No license exists to enable Qt QPA. Disabling."
372 COMMERCIAL_USER="yes"
386 if [ "$COMMERCIAL_USER" = "ask" ]; then
388 echo "Which edition of Qt do you want to use ?"
390 echo "Type 'c' if you want to use the Commercial Edition."
391 echo "Type 'o' if you want to use the Open Source Edition."
395 if [ "$commercial" = "c" ]; then
396 COMMERCIAL_USER="yes"
398 elif [ "$commercial" = "o" ]; then
405 if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
406 # Commercial preview release
407 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
410 QT_EDITION="QT_EDITION_DESKTOP"
411 LicenseType="Technology Preview"
412 elif [ $COMMERCIAL_USER = "yes" ]; then
413 # one of commercial editions
414 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
415 [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
417 # read in the license file
418 if [ -f "$LICENSE_FILE" ]; then
419 . "$LICENSE_FILE" >/dev/null 2>&1
420 if [ -z "$LicenseKeyExt" ]; then
422 echo "You are using an old license file."
424 echo "Please install the license file supplied by Nokia,"
425 echo "or install the Qt Open Source Edition if you intend to"
426 echo "develop free software."
429 if [ -z "$Licensee" ]; then
431 echo "Invalid license key. Please check the license key."
435 if [ -z "$LicenseKeyExt" ]; then
437 echo $ECHO_N "Please enter your license key: $ECHO_C"
439 Licensee="Unknown user"
444 echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
445 && LicenseValid="yes" \
447 if [ "$LicenseValid" != "yes" ]; then
449 echo "Invalid license key. Please check the license key."
452 ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
453 PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
454 LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
455 LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
457 # determine which edition we are licensed to use
458 case "$LicenseTypeCode" in
460 LicenseType="Commercial"
464 QT_EDITION="QT_EDITION_UNIVERSAL"
467 Edition="FullFramework"
468 EditionString="Full Framework"
469 QT_EDITION="QT_EDITION_DESKTOP"
472 Edition="GUIFramework"
473 EditionString="GUI Framework"
474 QT_EDITION="QT_EDITION_DESKTOPLIGHT"
479 LicenseType="Evaluation"
480 QMakeVar add DEFINES QT_EVAL
484 QT_EDITION="QT_EDITION_EVALUATION"
489 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
491 echo "Invalid license key. Please check the license key."
495 # verify that we are licensed to use Qt on this platform
497 case "$PlatformCode" in
500 PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
504 PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
507 ### EMBEDDED_QPA logic missing ###
508 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
509 X9,* | XC,* | XU,* | XW,* | XM,*)
511 LICENSE_EXTENSION="-ALLOS"
513 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
514 # Qt for Embedded Linux
515 LICENSE_EXTENSION="-EMBEDDED"
517 6M,*,no | N7,*,no | N9,*,no | NX,*,no)
519 LICENSE_EXTENSION="-EMBEDDED"
521 FM,*,no | LM,yes,* | ZM,no,no)
523 LICENSE_EXTENSION="-DESKTOP"
527 [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
529 echo "You are not licensed for the $Platform platform."
531 echo "Please contact qt-info@nokia.com to upgrade your license to"
532 echo "include the $Platform platform, or install the Qt Open Source Edition"
533 echo "if you intend to develop free software."
538 if test -r "$relpath/.LICENSE"; then
539 # Generic, non-final license
541 line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
546 *TECHNOLOGY?PREVIEW*)
553 echo >&2 "Invalid license files; cannot continue"
558 EditionString="$Edition"
559 QT_EDITION="QT_EDITION_DESKTOP"
562 case "$LicenseFeatureCode" in
565 case "$LicenseType" in
567 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
570 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
576 case "$LicenseType" in
578 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
581 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
587 echo "Invalid license key. Please check the license key."
591 case "$LicenseFeatureCode" in
599 if [ '!' -f "$outpath/LICENSE" ]; then
600 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
601 echo "this software has disappeared."
603 echo "Sorry, you are not licensed to use this software."
604 echo "Try re-installing."
608 elif [ $COMMERCIAL_USER = "no" ]; then
609 # Open Source edition - may only be used under the terms of the GPL or LGPL.
610 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
611 Licensee="Open Source"
613 EditionString="Open Source"
614 QT_EDITION="QT_EDITION_OPENSOURCE"
617 #-------------------------------------------------------------------------------
618 # initalize variables
619 #-------------------------------------------------------------------------------
621 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
622 for varname in $SYSTEM_VARIABLES; do
623 qmakevarname="${varname}"
624 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
625 if [ "${varname}" = "LDFLAGS" ]; then
626 qmakevarname="LFLAGS"
627 elif [ "${varname}" = "LD" ]; then
631 'if [ -n "\$'${varname}'" ]; then
632 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
636 # Use CC/CXX to run config.tests
637 mkdir -p "$outpath/config.tests"
638 rm -f "$outpath/config.tests/.qmake.cache"
639 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
641 QMakeVar add styles "cde mac motif plastique cleanlooks windows"
642 QMakeVar add decorations "default windows styled"
643 QMakeVar add mouse-drivers "pc"
644 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
645 QMakeVar add gfx-drivers "linuxfb"
646 QMakeVar add mouse-drivers "linuxtp"
648 QMakeVar add kbd-drivers "tty"
650 if [ "$CFG_DEV" = "yes" ]; then
651 QMakeVar add kbd-drivers "um"
654 # QTDIR may be set and point to an old or system-wide Qt installation
657 # the minimum version of libdbus-1 that we require:
658 MIN_DBUS_1_VERSION=0.93
660 # initalize internal variables
661 CFG_CONFIGURE_EXIT_ON_ERROR=yes
663 CFG_EXCEPTIONS=unspecified
664 CFG_GUI=auto # (yes|no|auto)
690 CFG_OPENVG_LC_INCLUDES=no
691 CFG_OPENVG_SHIVA=auto
692 CFG_OPENVG_ON_OPENGL=auto
694 CFG_EGL_GLES_INCLUDES=no
699 QT_DEFAULT_BUILD_PARTS="libs examples tests"
703 CFG_AUDIO_BACKEND=auto
705 CFG_DECLARATIVE_DEBUG=yes
706 CFG_JAVASCRIPTCORE_JIT=auto
708 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
709 CFG_GFX_ON="linuxfb multiscreen"
710 CFG_GFX_PLUGIN_AVAILABLE=
713 CFG_KBD_AVAILABLE="tty linuxinput qvfb"
714 CFG_KBD_ON="tty" #default, see QMakeVar above
715 CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb"
716 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
720 CFG_KBD_PLUGIN_AVAILABLE=
723 CFG_MOUSE_PLUGIN_AVAILABLE=
728 CFG_DECORATION_AVAILABLE="styled windows default"
729 CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
730 CFG_DECORATION_PLUGIN_AVAILABLE=
731 CFG_DECORATION_PLUGIN=
751 CFG_SEPARATE_DEBUG_INFO=no
752 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
753 CFG_REDUCE_EXPORTS=auto
763 CFG_REDUCE_RELOCATIONS=auto
765 CFG_ACCESSIBILITY=auto
770 CFG_CLOCK_GETTIME=auto
771 CFG_CLOCK_MONOTONIC=auto
780 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
784 CFG_PREFIX_INSTALL=yes
793 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
794 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
798 OPT_CONFIRM_LICENSE=no
812 # initalize variables used for installation
821 QT_INSTALL_TRANSLATIONS=
827 #flags for SQL drivers
835 QT_LFLAGS_ODBC="-lodbc"
838 # flags for libdbus-1
842 # flags for Glib (X11 only)
846 # flags for GStreamer (X11 only)
850 #-------------------------------------------------------------------------------
851 # check SQL drivers, mouse drivers and decorations available in this package
852 #-------------------------------------------------------------------------------
854 # opensource version removes some drivers, so force them to be off
860 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
861 for a in "$relpath/src/plugins/sqldrivers/"*; do
863 base_a=`basename "$a"`
864 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
865 eval "CFG_SQL_${base_a}=auto"
870 CFG_DECORATION_PLUGIN_AVAILABLE=
871 if [ -d "$relpath/src/plugins/decorations" ]; then
872 for a in "$relpath/src/plugins/decorations/"*; do
874 base_a=`basename "$a"`
875 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
880 CFG_KBD_PLUGIN_AVAILABLE=
881 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
882 for a in "$relpath/src/plugins/kbddrivers/"*; do
884 base_a=`basename "$a"`
885 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
890 CFG_MOUSE_PLUGIN_AVAILABLE=
891 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
892 for a in "$relpath/src/plugins/mousedrivers/"*; do
894 base_a=`basename "$a"`
895 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
900 CFG_GFX_PLUGIN_AVAILABLE=
901 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
902 for a in "$relpath/src/plugins/gfxdrivers/"*; do
904 base_a=`basename "$a"`
905 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
908 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
911 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
912 if [ -d "$relpath/src/plugins/imageformats" ]; then
913 for a in "$relpath/src/plugins/imageformats/"*; do
915 base_a=`basename "$a"`
916 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
921 #-------------------------------------------------------------------------------
922 # parse command line arguments
923 #-------------------------------------------------------------------------------
925 # parse the arguments, setting things to "yes" or "no"
926 while [ "$#" -gt 0 ]; do
930 #Autoconf style options
932 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
936 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
940 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
941 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
944 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
948 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
952 -no-*-*|-plugin-*-*|-qt-*-*)
953 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
954 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
958 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
961 #Qt style yes options
962 -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|-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)
963 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
966 #Qt style options that pass an argument
968 if [ "$PLATFORM_QPA" != "yes" ]; then
970 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
974 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
978 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
979 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
983 #Qt style complex options in one command
984 -enable-*|-disable-*)
985 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
986 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
988 #Qt Builtin/System style options
989 -no-*|-system-*|-qt-*)
990 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
991 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
993 #Options that cannot be generalized
1000 # this option may or may not be followed by an argument
1001 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1010 # this option may or may not be followed by an argument
1011 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1020 # this option may or may not be followed by an argument
1021 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1029 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1030 # this option may or may not be followed by an argument
1031 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1040 VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1044 VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1058 if [ "$1" = "-D" ]; then
1062 VAL=`echo $1 | sed 's,-D,,'`
1067 # this option may or may not be followed by an argument
1068 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1077 if [ "$1" = "-I" ]; then
1081 VAL=`echo $1 | sed 's,-I,,'`
1086 if [ "$1" = "-L" ]; then
1090 VAL=`echo $1 | sed 's,-L,,'`
1095 if [ "$1" = "-R" ]; then
1099 VAL=`echo $1 | sed 's,-R,,'`
1104 VAL=`echo $1 | sed 's,-l,,'`
1108 if [ "$1" = "-F" ]; then
1112 VAL=`echo $1 | sed 's,-F,,'`
1117 if [ "$1" = "-fw" ]; then
1121 VAL=`echo $1 | sed 's,-fw,,'`
1129 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1136 if [ "$UNKNOWN_ARG" = "yes" ]; then
1137 echo "$1: unknown argument"
1148 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1149 CFG_ACCESSIBILITY="$VAL"
1158 CFG_USE_GNUMAKE="$VAL"
1161 CFG_MYSQL_CONFIG="$VAL"
1164 QT_INSTALL_PREFIX="$VAL"
1167 QT_HOST_PREFIX="$VAL"
1170 QT_FORCE_PKGCONFIG=yes
1173 QT_INSTALL_DOCS="$VAL"
1176 QT_INSTALL_HEADERS="$VAL"
1179 QT_INSTALL_PLUGINS="$VAL"
1182 QT_INSTALL_IMPORTS="$VAL"
1185 QT_INSTALL_DATA="$VAL"
1188 QT_INSTALL_LIBS="$VAL"
1197 QT_INSTALL_TRANSLATIONS="$VAL"
1199 sysconfdir|settingsdir)
1200 QT_INSTALL_SETTINGS="$VAL"
1203 QT_INSTALL_EXAMPLES="$VAL"
1206 QT_INSTALL_TESTS="$VAL"
1215 QT_INSTALL_BINS="$VAL"
1225 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1232 if [ "$VAL" = "little" ]; then
1233 CFG_ENDIAN="Q_LITTLE_ENDIAN"
1234 elif [ "$VAL" = "big" ]; then
1235 CFG_ENDIAN="Q_BIG_ENDIAN"
1241 if [ "$VAL" = "little" ]; then
1242 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
1243 elif [ "$VAL" = "big" ]; then
1244 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
1250 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1251 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1252 [ "$VAL" = "es2" ]; then
1254 if [ "$VAL" = "es2" ]; then
1262 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1264 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1271 qvfb) # left for commandline compatibility, not documented
1272 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1273 if [ "$VAL" = "yes" ]; then
1274 QMakeVar add gfx-drivers qvfb
1275 QMakeVar add kbd-drivers qvfb
1276 QMakeVar add mouse-drivers qvfb
1277 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1278 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1279 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1286 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1289 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1297 if [ "$BUILD_ON_MAC" = "yes" ]; then
1304 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1305 CFG_MAC_DWARF2="$VAL"
1311 # if this is a Mac then "windows" probably means
1312 # we are cross-compiling for MinGW
1313 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1314 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1323 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1324 CFG_MAC_HARFBUZZ="$VAL"
1331 if [ "$BUILD_ON_MAC" = "yes" ]; then
1332 CFG_FRAMEWORK="$VAL"
1338 if [ "$VAL" = "yes" ]; then
1340 QMakeVar add QMAKE_CFLAGS -pg
1341 QMakeVar add QMAKE_CXXFLAGS -pg
1342 QMakeVar add QMAKE_LFLAGS -pg
1343 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1349 if [ "$VAL" = "yes" ]; then
1350 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1353 exceptions|g++-exceptions)
1354 if [ "$VAL" = "no" ]; then
1356 elif [ "$VAL" = "yes" ]; then
1364 # keep compatibility with old platform names
1370 PLATFORM=hpux-acc-o64
1373 PLATFORM=hpux-acc-64
1376 PLATFORM=hpux-acc-64
1388 PLATFORM=reliant-cds-64
1391 PLATFORM=solaris-cc-64
1394 PLATFORM=unixware-cc
1397 PLATFORM=unixware-g++
1400 PLATFORM=unixware-cc
1403 PLATFORM=unixware-g++
1409 i386) NATIVE_64_ARCH="x86_64" ;;
1410 powerpc) NATIVE_64_ARCH="ppc64" ;;
1411 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1413 if [ ! -z "$NATIVE_64_ARCH" ]; then
1414 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1421 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1424 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1425 CFG_DEBUG_RELEASE="$VAL"
1431 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1432 CFG_RELEASE_QMAKE="$VAL"
1438 if [ "$VAL" = "yes" ]; then
1440 elif [ "$VAL" = "no" ]; then
1447 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1448 CFG_PREFIX_INSTALL="$VAL"
1456 developer-build|commercial|opensource)
1457 # These switches have been dealt with already
1460 if [ "$VAL" = "yes" ]; then
1462 elif [ "$VAL" = "no" ]; then
1469 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1470 CFG_INCREMENTAL="$VAL"
1476 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1477 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1483 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1484 if [ "$VAL" = "no" ]; then
1485 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1486 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1487 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1493 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1500 if [ "$VAL" = "no" ]; then
1507 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1515 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1522 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1529 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1536 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1543 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1550 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1557 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1564 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1571 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1572 CFG_PRECOMPILE="$VAL"
1577 separate-debug-info)
1578 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1579 CFG_SEPARATE_DEBUG_INFO="$VAL"
1580 elif [ "$VAL" = "nocopy" ] ; then
1581 CFG_SEPARATE_DEBUG_INFO="yes"
1582 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1588 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1589 CFG_REDUCE_EXPORTS="$VAL"
1595 if [ "$VAL" = "no" ]; then
1602 if [ "$VAL" = "no" ]; then
1609 if [ "$VAL" = "no" ]; then
1616 if [ "$VAL" = "no" ]; then
1623 if [ "$VAL" = "no" ]; then
1630 if [ "$VAL" = "no" ]; then
1637 if [ "$VAL" = "no" ]; then
1644 if [ "$VAL" = "no" ]; then
1651 if [ "$VAL" = "no" ]; then
1661 if [ "$VAL" = "no" ]; then
1668 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1669 CFG_REDUCE_RELOCATIONS="$VAL"
1675 [ "$VAL" = "qt" ] && VAL=yes
1676 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1681 # No longer supported:
1682 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1685 if [ "$VAL" = "system" ]; then
1692 [ "$VAL" = "yes" ] && VAL=qt
1693 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1700 [ "$VAL" = "yes" ] && VAL=qt
1701 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1708 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1715 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1722 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1729 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1736 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1743 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1750 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1751 CFG_FONTCONFIG="$VAL"
1757 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1764 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1771 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1778 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1785 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1792 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1799 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1806 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1813 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1814 CFG_GSTREAMER="$VAL"
1820 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1821 CFG_QGTKSTYLE="$VAL"
1827 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1830 if [ "$VAL" = "no" ]; then
1838 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1840 elif [ "$VAL" = "runtime" ]; then
1847 if [ "$VAL" = "yes" ]; then
1854 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1861 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1862 CFG_LARGEFILE="$VAL"
1868 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1875 if [ "$VAL" = "yes" ]; then
1876 CFG_OPENSSL="linked"
1882 if [ "$VAL" = "yes" ]; then
1883 CFG_DECLARATIVE_DEBUG="yes"
1885 if [ "$VAL" = "no" ]; then
1886 CFG_DECLARATIVE_DEBUG="no"
1893 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1894 CFG_JAVASCRIPTCORE_JIT="$VAL"
1900 if [ "$VAL" = "yes" ]; then
1901 OPT_CONFIRM_LICENSE="$VAL"
1907 if [ "$VAL" = "yes" ]; then
1913 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
1914 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1915 # if autoconf style options were used, $VAL can be "yes" or "no"
1916 [ "$VAL" = "yes" ] && VAL=qt
1917 # now $VAL should be "no", "qt", or "plugin"... double-check
1918 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1921 # now $VAL is "no", "qt", or "plugin"
1923 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1924 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1926 # Grab the available values
1929 avail="$CFG_SQL_AVAILABLE"
1932 avail="$CFG_GFX_AVAILABLE"
1933 if [ "$OPT" = "plugin" ]; then
1934 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1938 avail="$CFG_DECORATION_AVAILABLE"
1939 if [ "$OPT" = "plugin" ]; then
1940 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1944 avail="$CFG_KBD_AVAILABLE"
1945 if [ "$OPT" = "plugin" ]; then
1946 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1950 avail="$CFG_MOUSE_AVAILABLE"
1951 if [ "$OPT" = "plugin" ]; then
1952 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1956 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1957 if [ "$OPT" != "plugin" ]; then
1958 # png is always built in
1964 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1968 # Check that that user's value is available.
1971 if [ "$VAL" = "$d" ]; then
1976 [ "$found" = yes ] || ERROR=yes
1978 if [ "$VAR" = "sql" ]; then
1979 # set the CFG_SQL_driver
1980 eval "CFG_SQL_$VAL=\$OPT"
1982 elif [ "$VAR" = "imageformat" ]; then
1983 [ "$OPT" = "qt" ] && OPT=yes
1984 VAL="`echo $VAL |tr a-z A-Z`"
1985 eval "CFG_$VAL=$OPT"
1989 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1990 if [ "$OPT" = "plugin" ]; then
1991 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
1992 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1993 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1994 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1995 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
1996 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1997 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1998 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
2001 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
2002 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
2003 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
2004 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
2005 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
2009 QMakeVar add "${VAR}s" "${VAL}"
2010 elif [ "$OPT" = "no" ]; then
2011 PLUG_VAR="${VAR}-plugin"
2012 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
2013 IN_VAR="${VAR}-driver"
2017 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2018 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2019 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2020 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2021 QMakeVar del "${IN_VAR}s" "$VAL"
2022 QMakeVar del "${PLUG_VAR}s" "$VAL"
2024 if [ "$ERROR" = "yes" ]; then
2025 echo "$CURRENT_OPT: unknown argument"
2030 if [ "$VAL" = "yes" ]; then
2031 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2032 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2036 elif [ "$VAL" = "no" ]; then
2037 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2038 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2047 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2054 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2061 D_FLAGS="$D_FLAGS \"$VAL\""
2064 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2067 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2070 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2073 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2076 if [ "$BUILD_ON_MAC" = "yes" ]; then
2077 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2078 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2084 if [ "$BUILD_ON_MAC" = "yes" ]; then
2085 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2091 W_FLAGS="$W_FLAGS \"${VAL}\""
2097 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2098 CFG_PHONON_BACKEND="$VAL"
2110 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2111 CFG_AUDIO_BACKEND="$VAL"
2117 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2124 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2125 CFG_FORCE_ASSERTS="$VAL"
2131 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2141 if [ "$UNKNOWN_OPT" = "yes" ]; then
2142 echo "${CURRENT_OPT}: invalid command-line switch"
2148 # update QT_CONFIG to show our current predefined configuration
2149 case "$CFG_QCONFIG" in
2150 minimal|small|medium|large|full)
2151 # these are a sequence of increasing functionality
2152 for c in minimal small medium large full; do
2153 QT_CONFIG="$QT_CONFIG $c-config"
2154 [ "$CFG_QCONFIG" = $c ] && break
2158 # not known to be sufficient for anything
2159 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2160 echo >&2 "Error: configuration file not found:"
2161 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2163 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2168 #-------------------------------------------------------------------------------
2169 # build tree initialization
2170 #-------------------------------------------------------------------------------
2172 # where to find which..
2173 unixtests="$relpath/config.tests/unix"
2174 mactests="$relpath/config.tests/mac"
2175 WHICH="$unixtests/which.test"
2177 PERL=`$WHICH perl 2>/dev/null`
2179 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2181 for e in gawk nawk awk; do
2182 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2189 PERL="/usr/bin/perl"
2190 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2194 ### skip this if the user just needs help...
2195 if [ "$OPT_HELP" != "yes" ]; then
2197 # is this a shadow build?
2198 if [ "$OPT_SHADOW" = "maybe" ]; then
2200 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2201 if [ -h "$outpath" ]; then
2202 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2208 if [ "$OPT_SHADOW" = "yes" ]; then
2209 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2210 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2211 echo >&2 "Cannot proceed."
2214 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2217 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2219 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2220 echo "Qt can be built in release mode with separate debug information, so"
2221 echo "-debug-and-release is not necessary anymore"
2225 if [ "$CFG_SILENT" = "yes" ]; then
2226 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2229 # if the source tree is different from the build tree,
2230 # symlink or copy part of the sources
2231 if [ "$OPT_SHADOW" = "yes" ]; then
2232 echo "Preparing build tree..."
2234 if [ -z "$PERL" ]; then
2236 echo "You need perl in your PATH to make a shadow build."
2237 echo "Cannot proceed."
2241 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2243 # symlink the qmake directory
2244 find "$relpath/qmake" | while read a; do
2245 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2246 if [ '!' -f "$my_a" ]; then
2247 if [ -d "$a" ]; then
2248 # directories are created...
2251 a_dir=`dirname "$my_a"`
2252 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2253 # ... and files are symlinked
2254 case `basename "$a"` in
2255 *.o|*.d|GNUmakefile*|qmake)
2266 # make a syncqt script that can be used in the shadow
2267 rm -f "$outpath/bin/syncqt"
2268 if [ -x "$relpath/bin/syncqt" ]; then
2269 mkdir -p "$outpath/bin"
2270 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2271 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2272 chmod 755 "$outpath/bin/syncqt"
2275 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2276 rm -f "$outpath/bin/$i"
2277 if [ -x "$relpath/bin/$i" ]; then
2278 mkdir -p "$outpath/bin"
2279 echo "#!/bin/sh" >"$outpath/bin/$i"
2280 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2281 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2282 chmod 755 "$outpath/bin/$i"
2286 # symlink the mkspecs directory
2287 mkdir -p "$outpath/mkspecs"
2288 rm -rf "$outpath"/mkspecs/*
2289 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2290 rm -f "$outpath/mkspecs/default"
2294 rm -rf "$outpath/mkspecs/$1"
2295 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2296 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2299 # Special case for mkspecs/features directory.
2300 # To be able to place .prf files into a shadow build directory,
2301 # we're creating links for files only. The directory structure is reproduced.
2302 ShadowMkspecs features
2304 # The modules dir is special, too.
2305 ShadowMkspecs modules
2307 # symlink the doc directory
2308 rm -rf "$outpath/doc"
2309 ln -s "$relpath/doc" "$outpath/doc"
2312 # symlink fonts to be able to run application from build directory
2313 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2314 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2315 mkdir -p "${outpath}/lib"
2316 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2320 if [ "$OPT_FAST" = "auto" ]; then
2321 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2328 # find a make command
2329 if [ -z "$MAKE" ]; then
2331 for mk in gmake make; do
2332 if "$WHICH" $mk >/dev/null 2>&1; then
2337 if [ -z "$MAKE" ]; then
2338 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2339 echo >&2 "Cannot proceed."
2342 # export MAKE, we need it later in the config.tests
2348 #-------------------------------------------------------------------------------
2349 # auto-detect all that hasn't been specified in the arguments
2350 #-------------------------------------------------------------------------------
2352 if [ -z "$PLATFORM" ]; then
2354 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2356 if [ "$PLATFORM_QPA" = "yes" ]; then
2357 OSX_VERSION=`uname -r | cut -d. -f1`
2358 if [ "$OSX_VERSION" -ge 11 ]; then
2359 # We're on Lion or above. Check if we have a supported Clang version
2360 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2363 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2378 #PLATFORM=aix-g++-64
2380 #PLATFORM=aix-xlc-64
2382 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2392 # PLATFORM=dynix-g++
2398 PLATFORM=freebsd-g++
2400 - Also available for FreeBSD: freebsd-icc
2404 PLATFORM=openbsd-g++
2415 #PLATFORM=irix-cc-64
2417 - Also available for IRIX: irix-g++ irix-cc-64
2421 case "$UNAME_MACHINE" in
2423 #PLATFORM=hpuxi-acc-32
2424 PLATFORM=hpuxi-acc-64
2426 - Also available for HP-UXi: hpuxi-acc-32
2432 #PLATFORM=hpux-acc-64
2434 #PLATFORM=hpux-acc-o64
2436 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2445 - Also available for Tru64: tru64-g++
2449 case "$UNAME_MACHINE" in
2451 PLATFORM=linux-g++-64
2458 - Also available for Linux: linux-kcc linux-icc linux-cxx
2462 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2463 PLATFORM="solaris-g++"
2465 #PLATFORM=solaris-g++
2467 #PLATFORM=solaris-cc64
2470 - Also available for Solaris: solaris-g++ solaris-cc-64
2473 ReliantUNIX-*:*|SINIX-*:*)
2474 PLATFORM=reliant-cds
2475 #PLATFORM=reliant-cds-64
2477 - Also available for Reliant UNIX: reliant-cds-64
2487 #PLATFORM=unixware-g++
2488 PLATFORM=unixware-cc
2490 - Also available for OpenUNIX: unixware-g++
2494 #PLATFORM=unixware-g++
2495 PLATFORM=unixware-cc
2497 - Also available for UnixWare: unixware-g++
2504 - Also available for SCO OpenServer: sco-g++
2508 PLATFORM=unixware-g++
2511 PLATFORM=unsupported/qnx-g++
2514 if [ "$OPT_HELP" != "yes" ]; then
2516 for p in $PLATFORMS; do
2517 echo " $relconf $* -platform $p"
2520 echo " The build script does not currently recognize all" >&2
2521 echo " platforms supported by Qt." >&2
2522 echo " Rerun this script with a -platform option listed to" >&2
2523 echo " set the system/compiler combination you use." >&2
2530 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2532 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2534 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2535 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2537 if [ -d "$PLATFORM" ]; then
2538 QMAKESPEC="$PLATFORM"
2540 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2542 if [ -d "$XPLATFORM" ]; then
2543 XQMAKESPEC="$XPLATFORM"
2545 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2547 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2548 QT_CROSS_COMPILE=yes
2549 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2552 if [ "$BUILD_ON_MAC" = "yes" ]; then
2553 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2555 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2556 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2557 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2558 echo " built with 'macx-g++'" >&2
2564 # check specified platforms are supported
2565 if [ '!' -d "$QMAKESPEC" ]; then
2567 echo " The specified system/compiler is not supported:"
2571 echo " Please see the README file for a complete list."
2575 if [ '!' -d "$XQMAKESPEC" ]; then
2577 echo " The specified system/compiler is not supported:"
2581 echo " Please see the README file for a complete list."
2585 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2587 echo " The specified system/compiler port is not complete:"
2589 echo " $XQMAKESPEC/qplatformdefs.h"
2591 echo " Please contact qt-info@nokia.com."
2596 # now look at the configs and figure out what platform we are config'd for
2597 [ "$PLATFORM_QPA" != "yes" ] \
2598 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2600 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2602 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2603 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2604 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2605 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2606 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2610 #-------------------------------------------------------------------------------
2611 # determine the system architecture
2612 #-------------------------------------------------------------------------------
2613 if [ "$OPT_VERBOSE" = "yes" ]; then
2614 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2617 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2618 case `basename "$XPLATFORM"` in
2621 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2623 echo "Please contact qt-info@nokia.com to upgrade your license to"
2624 echo "include this platform, or install the Qt Open Source Edition"
2625 echo "if you intend to develop free software."
2631 if [ -z "${CFG_HOST_ARCH}" ]; then
2632 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2634 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2635 case "$CFG_HOST_ARCH" in
2640 if [ "$OPT_VERBOSE" = "yes" ]; then
2641 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2645 CFG_HOST_ARCH=`uname -p`
2646 if [ "$OPT_VERBOSE" = "yes" ]; then
2647 echo " SGI ($CFG_HOST_ARCH)"
2651 case "$UNAME_MACHINE" in
2653 if [ "$OPT_VERBOSE" = "yes" ]; then
2654 echo " Sun SPARC (sparc)"
2661 if [ "$OPT_VERBOSE" = "yes" ]; then
2662 echo " 64-bit AMD 80x86 (x86_64)"
2664 CFG_HOST_ARCH=x86_64
2667 if [ "$OPT_VERBOSE" = "yes" ]; then
2668 echo " 32-bit Intel 80x86 (i386)"
2676 if [ "$OPT_VERBOSE" = "yes" ]; then
2677 echo " 64-bit IBM PowerPC (powerpc)"
2679 CFG_HOST_ARCH=powerpc
2682 if [ "$OPT_VERBOSE" = "yes" ]; then
2683 echo " HP PA-RISC (parisc)"
2685 CFG_HOST_ARCH=parisc
2688 if [ "$OPT_VERBOSE" = "yes" ]; then
2689 echo " 32-bit Intel 80x86 (i386)"
2693 *:*:x86_64|*:*:amd64)
2694 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2695 if [ "$OPT_VERBOSE" = "yes" ]; then
2696 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2700 if [ "$OPT_VERBOSE" = "yes" ]; then
2701 echo " 64-bit AMD 80x86 (x86_64)"
2703 CFG_HOST_ARCH=x86_64
2707 if [ "$OPT_VERBOSE" = "yes" ]; then
2708 echo " 32-bit PowerPC (powerpc)"
2710 CFG_HOST_ARCH=powerpc
2713 if [ "$OPT_VERBOSE" = "yes" ]; then
2714 echo " 64-bit PowerPC (powerpc)"
2716 CFG_HOST_ARCH=powerpc
2719 if [ "$OPT_VERBOSE" = "yes" ]; then
2720 echo " IBM S/390 (s390)"
2725 if [ "$OPT_VERBOSE" = "yes" ]; then
2731 if [ "$OPT_VERBOSE" = "yes" ]; then
2732 echo " Linux on SPARC"
2737 case "$UNAME_MACHINE" in
2739 if [ "$OPT_VERBOSE" = "yes" ]; then
2740 echo " QNX on Intel 80x86 (i386)"
2747 if [ "$OPT_VERBOSE" = "yes" ]; then
2748 echo " Trying '$UNAME_MACHINE'..."
2750 CFG_HOST_ARCH="$UNAME_MACHINE"
2755 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2756 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2757 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2758 CFG_ARCH=$CFG_HOST_ARCH
2765 # previously, armv6 was a different arch
2771 if [ "$OPT_VERBOSE" = "yes" ]; then
2772 echo "System architecture: '$CFG_ARCH'"
2773 if [ "$PLATFORM_QPA" = "yes" ]; then
2774 echo "Host architecture: '$CFG_HOST_ARCH'"
2778 #-------------------------------------------------------------------------------
2779 # tests that don't need qmake (must be run before displaying help)
2780 #-------------------------------------------------------------------------------
2782 # detect build style
2783 if [ "$CFG_DEBUG" = "auto" ]; then
2784 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2785 CFG_DEBUG_RELEASE=yes
2787 elif [ "$CFG_DEV" = "yes" ]; then
2788 CFG_DEBUG_RELEASE=no
2791 CFG_DEBUG_RELEASE=no
2795 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2796 QT_CONFIG="$QT_CONFIG build_all"
2799 if [ -z "$PKG_CONFIG" ]; then
2800 # See if PKG_CONFIG is set in the mkspec:
2801 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2803 if [ -z "$PKG_CONFIG" ]; then
2804 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2807 # Work out if we can use pkg-config
2808 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2809 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2811 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2812 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2813 echo >&2 "environment!"
2815 if [ -z "$PKG_CONFIG_PATH" ]; then
2817 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2818 echo >&2 "the host compiler's .pc files will be used. This is probably"
2819 echo >&2 "not what you want."
2821 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2823 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2824 echo >&2 "been set. This means your toolchain's .pc files must contain"
2825 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2826 echo >&2 "tests are failing, please check these files."
2831 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2832 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2833 echo >&2 "dependencies"
2839 if [ ! -n "$PKG_CONFIG" ]; then
2840 QT_CONFIG="$QT_CONFIG no-pkg-config"
2843 # pass on $CFG_SDK to the configure tests.
2844 if [ '!' -z "$CFG_SDK" ]; then
2845 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2848 # find the default framework value
2849 if [ "$BUILD_ON_MAC" = "yes" ]; then
2850 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2851 CFG_FRAMEWORK="$CFG_SHARED"
2852 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2854 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2862 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2864 TEST_COMPILER=$QMAKE_CONF_COMPILER
2865 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2866 if [ -z "$TEST_COMPILER" ]; then
2867 echo "ERROR: Cannot set the compiler for the configuration tests"
2873 if [ -n "$CFG_SYSROOT" ]; then
2874 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2875 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2876 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2878 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2882 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2884 # auto-detect precompiled header support
2885 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2886 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2893 #auto-detect DWARF2 on the mac
2894 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2895 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2902 # don't autodetect support for separate debug info on objcopy when
2903 # cross-compiling as lots of toolchains seems to have problems with this
2904 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2905 CFG_SEPARATE_DEBUG_INFO="no"
2908 # auto-detect support for separate debug info in objcopy
2909 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2910 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2911 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2912 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2913 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2914 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2915 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2916 CFG_SEPARATE_DEBUG_INFO=no
2920 # binutils on HP-UX is buggy; default to no.
2921 CFG_SEPARATE_DEBUG_INFO=no
2924 CFG_SEPARATE_DEBUG_INFO=yes
2930 # auto-detect -fvisibility support
2931 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2932 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2933 CFG_REDUCE_EXPORTS=no
2935 CFG_REDUCE_EXPORTS=yes
2939 # detect the availability of the -Bsymbolic-functions linker optimization
2940 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2941 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2942 CFG_REDUCE_RELOCATIONS=no
2944 CFG_REDUCE_RELOCATIONS=yes
2948 # auto-detect GNU make support
2949 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2953 # find the default framework value
2954 if [ "$BUILD_ON_MAC" = "yes" ]; then
2955 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2956 CFG_FRAMEWORK="$CFG_SHARED"
2957 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2959 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2967 # x11 tests are done after qmake is built
2970 #setup the build parts
2971 if [ -z "$CFG_BUILD_PARTS" ]; then
2972 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2974 # don't build tools by default when cross-compiling
2975 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2976 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2979 for nobuild in $CFG_NOBUILD_PARTS; do
2980 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2982 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2984 # echo "WARNING: libs is a required part of the build."
2986 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2989 #-------------------------------------------------------------------------------
2990 # post process QT_INSTALL_* variables
2991 #-------------------------------------------------------------------------------
2993 if [ -z "$QT_INSTALL_PREFIX" ]; then
2994 if [ "$CFG_DEV" = "yes" ]; then
2995 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2997 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
3000 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3002 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3003 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3004 if [ "$BUILD_ON_MAC" = "yes" ]; then
3005 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
3008 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
3011 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3013 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3014 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3015 if [ "$BUILD_ON_MAC" = "yes" ]; then
3016 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3021 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3024 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3026 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3027 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3028 if [ "$BUILD_ON_MAC" = "yes" ]; then
3029 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3030 QT_INSTALL_LIBS="/Libraries/Frameworks"
3034 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3036 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3038 if [ -z "$QT_INSTALL_BINS" ]; then #default
3039 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3040 if [ "$BUILD_ON_MAC" = "yes" ]; then
3041 QT_INSTALL_BINS="/Developer/Applications/Qt"
3044 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3046 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3048 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3049 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3050 if [ "$BUILD_ON_MAC" = "yes" ]; then
3051 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3054 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3056 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3058 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3059 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3060 if [ "$BUILD_ON_MAC" = "yes" ]; then
3061 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3064 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3066 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3068 if [ -z "$QT_INSTALL_DATA" ]; then #default
3069 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3071 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3073 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3074 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3076 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3078 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3079 if [ "$BUILD_ON_MAC" = "yes" ]; then
3080 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3082 QT_INSTALL_SETTINGS=/etc/xdg
3085 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3087 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3088 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3089 if [ "$BUILD_ON_MAC" = "yes" ]; then
3090 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3093 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3095 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3098 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3099 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3100 if [ "$BUILD_ON_MAC" = "yes" ]; then
3101 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3104 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3106 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3108 #-------------------------------------------------------------------------------
3109 # help - interactive parts of the script _after_ this section please
3110 #-------------------------------------------------------------------------------
3112 # next, emit a usage message if something failed.
3113 if [ "$OPT_HELP" = "yes" ]; then
3114 [ "x$ERROR" = "xyes" ] && echo
3115 if [ "$CFG_NIS" = "no" ]; then
3122 if [ "$CFG_CUPS" = "no" ]; then
3129 if [ "$CFG_ICONV" = "no" ]; then
3136 if [ "$CFG_LARGEFILE" = "no" ]; then
3143 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3150 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3158 if [ "$CFG_XCB" = "no" ]; then
3166 if [ "$CFG_WAYLAND" = "no" ]; then
3173 if [ "$CFG_XINPUT2" = "no" ]; then
3182 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3183 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3184 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3185 [-release] [-debug] [-debug-and-release]
3186 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3187 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3188 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3189 [-plugin-sql-<driver>] [-system-sqlite]
3190 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3191 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3192 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3193 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3194 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3195 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3196 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3197 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3198 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
3199 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3200 [-no-audio-backend] [-audio-backend]
3201 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3202 [-no-optimized-qmake] [-optimized-qmake]
3203 [-no-openssl] [-openssl] [-openssl-linked]
3204 [-no-gtkstyle] [-gtkstyle]
3205 [-qt-pcre] [-system-pcre]
3206 [additional platform specific options (see below)]
3209 Installation options:
3211 -qpa ................ This will enable the QPA build.
3212 QPA is a window system agnostic implementation of Qt.
3214 These are optional, but you may specify install directories.
3216 -prefix <dir> ...... This will install everything relative to <dir>
3217 (default $QT_INSTALL_PREFIX)
3219 if [ "$PLATFORM_QPA" = "yes" ]; then
3222 -hostprefix [dir] .. Tools and libraries needed when developing
3223 applications are installed in [dir]. If [dir] is
3224 not given, the current build directory will be used.
3229 * -prefix-install .... Force a sandboxed "local" installation of
3230 Qt. This will install into
3231 $QT_INSTALL_PREFIX, if this option is
3232 disabled then some platforms will attempt a
3233 "system" install by placing default values to
3234 be placed in a system location other than
3237 You may use these to separate different parts of the install:
3239 -bindir <dir> ......... Executables will be installed to <dir>
3240 (default PREFIX/bin)
3241 -libdir <dir> ......... Libraries will be installed to <dir>
3242 (default PREFIX/lib)
3243 -docdir <dir> ......... Documentation will be installed to <dir>
3244 (default PREFIX/doc)
3245 -headerdir <dir> ...... Headers will be installed to <dir>
3246 (default PREFIX/include)
3247 -plugindir <dir> ...... Plugins will be installed to <dir>
3248 (default PREFIX/plugins)
3249 -importdir <dir> ...... Imports for QML will be installed to <dir>
3250 (default PREFIX/imports)
3251 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3253 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3254 (default PREFIX/translations)
3255 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3256 (default PREFIX/etc/settings)
3257 -examplesdir <dir> .... Examples will be installed to <dir>
3258 (default PREFIX/examples)
3259 -testsdir <dir> ....... Tests will be installed to <dir>
3260 (default PREFIX/tests)
3264 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3265 that needs to be evaluated. If the evaluation succeeds, the feature is
3266 included. Here is a short explanation of each option:
3268 * -release ........... Compile and link Qt with debugging turned off.
3269 -debug ............. Compile and link Qt with debugging turned on.
3270 -debug-and-release . Compile and link two versions of Qt, with and without
3271 debugging turned on (Mac only).
3273 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3275 -opensource ........ Compile and link the Open-Source Edition of Qt.
3276 -commercial ........ Compile and link the Commercial Edition of Qt.
3279 * -shared ............ Create and use shared Qt libraries.
3280 -static ............ Create and use static Qt libraries.
3282 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3284 -fast .............. Configure Qt quickly by generating Makefiles only for
3285 library and subdirectory targets. All other Makefiles
3286 are created as wrappers, which will in turn run qmake.
3288 -no-largefile ...... Disables large file support.
3289 + -largefile ......... Enables Qt to access files larger than 4 GB.
3292 if [ "$PLATFORM_QPA" = "yes" ]; then
3299 if [ "$CFG_DBUS" = "no" ]; then
3308 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3309 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3311 -no-accessibility .. Do not compile Accessibility support.
3312 * -accessibility ..... Compile Accessibility support.
3314 $SHN -no-stl ............ Do not compile STL support.
3315 $SHY -stl ............... Compile STL support.
3317 -no-sql-<driver> ... Disable SQL <driver> entirely.
3318 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3320 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3323 Possible values for <driver>:
3324 [ $CFG_SQL_AVAILABLE ]
3326 -system-sqlite ..... Use sqlite from the operating system.
3328 -no-phonon-backend.. Do not build the platform phonon plugin.
3329 + -phonon-backend..... Build the platform phonon plugin.
3331 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3332 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3334 -no-declarative-debug ..... Do not build the declarative debugging support.
3335 + -declarative-debug ....... Build the declarative debugging support.
3337 -platform target ... The operating system and compiler you are building
3340 See the README file for a list of supported
3341 operating systems and compilers.
3344 if [ "${PLATFORM_QPA}" != "yes" ]; then
3346 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3347 raster - Software rasterizer
3348 opengl - Rendering via OpenGL, Experimental!
3349 openvg - Rendering via OpenVG, Experimental!
3356 -no-mmx ............ Do not compile with use of MMX instructions.
3357 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3358 -no-sse ............ Do not compile with use of SSE instructions.
3359 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3360 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3361 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3362 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3363 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3364 -no-avx ............ Do not compile with use of AVX instructions.
3365 -no-neon ........... Do not compile with use of NEON instructions.
3367 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3368 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3370 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3372 -D <string> ........ Add an explicit define to the preprocessor.
3373 -I <string> ........ Add an explicit include path.
3374 -L <string> ........ Add an explicit library path.
3376 -help, -h .......... Display this information.
3378 Third Party Libraries:
3380 -qt-zlib ........... Use the zlib bundled with Qt.
3381 + -system-zlib ....... Use zlib from the operating system.
3382 See http://www.gzip.org/zlib
3384 -no-gif ............ Do not compile GIF reading support.
3386 -no-libpng ......... Do not compile PNG support.
3387 -qt-libpng ......... Use the libpng bundled with Qt.
3388 + -system-libpng ..... Use libpng from the operating system.
3389 See http://www.libpng.org/pub/png
3391 -no-libjpeg ........ Do not compile JPEG support.
3392 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3393 + -system-libjpeg .... Use libjpeg from the operating system.
3394 See http://www.ijg.org
3396 -no-openssl ........ Do not compile support for OpenSSL.
3397 + -openssl ........... Enable run-time OpenSSL support.
3398 -openssl-linked .... Enabled linked OpenSSL support.
3400 -qt-pcre ........... Use the PCRE library bundled with Qt.
3401 + -system-pcre ....... Use the PCRE library from the operating system.
3405 -make <part> ....... Add part to the list of parts to be built at make time.
3406 ($QT_DEFAULT_BUILD_PARTS)
3407 -nomake <part> ..... Exclude part from the list of parts to be built.
3409 -R <string> ........ Add an explicit runtime library path to the Qt
3411 -l <string> ........ Add an explicit library.
3413 -no-rpath .......... Do not use the library install path as a runtime
3415 + -rpath ............. Link Qt libraries and executables using the library
3416 install path as a runtime library path. Equivalent
3417 to -R install_libpath
3419 -continue .......... Continue as far as possible if an error occurs.
3421 -verbose, -v ....... Print verbose information about each step of the
3424 -silent ............ Reduce the build output so that warnings and errors
3425 can be seen more easily.
3427 * -no-optimized-qmake ... Do not build qmake optimized.
3428 -optimized-qmake ...... Build qmake optimized.
3430 -no-gui ............ Don't build the Qt GUI library
3432 $NSN -no-nis ............ Do not compile NIS support.
3433 $NSY -nis ............... Compile NIS support.
3435 $CUN -no-cups ........... Do not compile CUPS support.
3436 $CUY -cups .............. Compile CUPS support.
3437 Requires cups/cups.h and libcups.so.2.
3439 $CIN -no-iconv .......... Do not compile support for iconv(3).
3440 $CIY -iconv ............. Compile support for iconv(3).
3442 $PHN -no-pch ............ Do not use precompiled header support.
3443 $PHY -pch ............... Use precompiled header support.
3445 $DBN -no-dbus ........... Do not compile the QtDBus module.
3446 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3447 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3449 -reduce-relocations ..... Reduce relocations in the libraries through extra
3450 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3451 experimental; needs GNU ld >= 2.18).
3453 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3457 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3458 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3465 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3473 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3477 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3478 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3480 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3481 $XCBY -xcb ............... Compile Xcb support.
3483 $XWN -no-wayland......... Do not compile Wayland support.
3484 $XWY -wayland .......... Compile Wayland support.
3490 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3494 $X2N -no-xinput2......... Do not compile XInput2 support.
3495 $X2Y -xinput2............ Compile XInput2 support.
3501 if [ "$PLATFORM_X11" = "yes" ]; then
3502 if [ "$CFG_SM" = "no" ]; then
3509 if [ "$CFG_XSHAPE" = "no" ]; then
3516 if [ "$CFG_XVIDEO" = "no" ]; then
3523 if [ "$CFG_XINERAMA" = "no" ]; then
3530 if [ "$CFG_FONTCONFIG" = "no" ]; then
3537 if [ "$CFG_XCURSOR" = "no" ]; then
3544 if [ "$CFG_XFIXES" = "no" ]; then
3551 if [ "$CFG_XRANDR" = "no" ]; then
3558 if [ "$CFG_XRENDER" = "no" ]; then
3565 if [ "$CFG_MITSHM" = "no" ]; then
3572 if [ "$CFG_XINPUT" = "no" ]; then
3579 if [ "$CFG_XKB" = "no" ]; then
3586 if [ "$CFG_IM" = "no" ]; then
3597 -no-gtkstyle ....... Do not build the GTK theme integration.
3598 + -gtkstyle .......... Build the GTK theme integration.
3600 * -no-nas-sound ...... Do not compile in NAS sound support.
3601 -system-nas-sound .. Use NAS libaudio from the operating system.
3602 See http://radscan.com/nas.html
3604 -egl ............... Use EGL instead of GLX to manage contexts.
3605 When building for desktop OpenGL, this option will
3606 make Qt use EGL to manage contexts rather than the
3607 GLX, which is the default. Note: For OpenGL ES, EGL
3610 -no-opengl ......... Do not support OpenGL.
3611 + -opengl <api> ...... Enable OpenGL support.
3612 With no parameter, this will auto-detect the "best"
3613 OpenGL API to use. If desktop OpenGL is available, it
3614 will be used. Use desktop or es2 for <api>
3615 to force the use of the Desktop OpenGL or
3616 OpenGL ES 2 APIs instead.
3618 -no-openvg ........ Do not support OpenVG.
3619 + -openvg ........... Enable OpenVG support.
3620 Requires EGL support, typically supplied by an OpenGL
3621 or other graphics implementation.
3623 $SMN -no-sm ............. Do not support X Session Management.
3624 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3626 $SHN -no-xshape ......... Do not compile XShape support.
3627 $SHY -xshape ............ Compile XShape support.
3628 Requires X11/extensions/shape.h.
3630 $XVN -no-xvideo ......... Do not compile XVideo support.
3631 $XVY -xvideo ............ Compile XVideo support.
3632 Requires X11/extensions/Xv.h & Xvlib.h.
3634 $SHN -no-xsync .......... Do not compile XSync support.
3635 $SHY -xsync ............. Compile XSync support.
3636 Requires X11/extensions/sync.h.
3638 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3639 $XAY -xinerama .......... Compile Xinerama support.
3640 Requires X11/extensions/Xinerama.h and libXinerama.
3641 By default, Xinerama support will be compiled if
3642 available and the shared libraries are dynamically
3645 $XCN -no-xcursor ........ Do not compile Xcursor support.
3646 $XCY -xcursor ........... Compile Xcursor support.
3647 Requires X11/Xcursor/Xcursor.h and libXcursor.
3648 By default, Xcursor support will be compiled if
3649 available and the shared libraries are dynamically
3652 $XFN -no-xfixes ......... Do not compile Xfixes support.
3653 $XFY -xfixes ............ Compile Xfixes support.
3654 Requires X11/extensions/Xfixes.h and libXfixes.
3655 By default, Xfixes support will be compiled if
3656 available and the shared libraries are dynamically
3659 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3660 $XZY -xrandr ............ Compile Xrandr support.
3661 Requires X11/extensions/Xrandr.h and libXrandr.
3663 $XRN -no-xrender ........ Do not compile Xrender support.
3664 $XRY -xrender ........... Compile Xrender support.
3665 Requires X11/extensions/Xrender.h and libXrender.
3667 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3668 $XMY -mitshm ............ Compile MIT-SHM support.
3669 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3671 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3672 $FCGY -fontconfig ........ Compile FontConfig support.
3673 Requires fontconfig/fontconfig.h, libfontconfig,
3674 freetype.h and libfreetype.
3676 $XIN -no-xinput ......... Do not compile Xinput support.
3677 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3678 which requires IRIX with wacom.h and libXi or
3679 XFree86 with X11/extensions/XInput.h and libXi.
3681 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3682 $XKY -xkb ............... Compile XKB support.
3687 if [ "$BUILD_ON_MAC" = "yes" ]; then
3692 -Fstring ........... Add an explicit framework path.
3693 -fw string ......... Add an explicit framework.
3695 * -framework ......... Build Qt as a series of frameworks and
3696 link tools against those frameworks.
3697 -no-framework ...... Do not build Qt as a series of frameworks.
3699 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3700 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3702 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3703 Only one arch value can be specified.
3705 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3706 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3708 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3709 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3710 QT_ENABLE_HARFBUZZ environment variable.
3715 if [ "$PLATFORM_QPA" = "yes" ]; then
3721 if [ "$PLATFORM_QPA" = "yes" ]; then
3724 -xplatform target ... The target platform when cross-compiling.
3726 -no-feature-<feature> Do not compile in <feature>.
3727 -feature-<feature> .. Compile in <feature>. The available features
3728 are described in src/corelib/global/qfeatures.txt
3730 -little-endian ...... Target platform is little endian (LSB first).
3731 -big-endian ......... Target platform is big endian (MSB first).
3733 -host-little-endian . Host platform is little endian (LSB first).
3734 -host-big-endian .... Host platform is big endian (MSB first).
3736 You only need to specify the endianness when
3737 cross-compiling, otherwise the host
3738 endianness will be used.
3740 -no-freetype ........ Do not compile in Freetype2 support.
3741 -qt-freetype ........ Use the libfreetype bundled with Qt.
3742 * -system-freetype .... Use libfreetype from the operating system.
3743 See http://www.freetype.org/
3745 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3746 default ($CFG_QCONFIG).
3748 -no-opengl .......... Do not support OpenGL.
3749 -opengl <api> ....... Enable OpenGL ES support
3750 With no parameter, this will attempt to auto-detect
3751 OpenGL ES 2, or regular desktop OpenGL.
3752 Use es2 for <api> to override auto-detection.
3756 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3757 if [ "$CFG_GLIB" = "no" ]; then
3765 $GBN -no-glib ........... Do not compile Glib support.
3766 $GBY -glib .............. Compile Glib support.
3771 [ "x$ERROR" = "xyes" ] && exit 1
3776 # -----------------------------------------------------------------------------
3777 # LICENSING, INTERACTIVE PART
3778 # -----------------------------------------------------------------------------
3780 if [ "$PLATFORM_QPA" = "yes" ]; then
3781 Platform="Qt Lighthouse"
3782 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3783 Platform="Qt for Windows"
3784 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3786 Platform="Qt for Linux/X11"
3790 echo "This is the $Platform ${EditionString} Edition."
3793 if [ "$Edition" = "OpenSource" ]; then
3795 echo "You are licensed to use this software under the terms of"
3796 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3797 if [ -f "$relpath/LICENSE.GPL3" ]; then
3798 echo "You are also licensed to use this software under the terms of"
3799 echo "the GNU General Public License (GPL) versions 3."
3805 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3806 echo "You have already accepted the terms of the $LicenseType license."
3809 if [ -f "$relpath/LICENSE.GPL3" ]; then
3810 echo "Type '3' to view the GNU General Public License version 3."
3812 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3813 echo "Type 'yes' to accept this license offer."
3814 echo "Type 'no' to decline this license offer."
3816 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3820 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3822 elif [ "$acceptance" = "no" ]; then
3823 echo "You are not licensed to use this software."
3826 elif [ "$acceptance" = "3" ]; then
3827 more "$relpath/LICENSE.GPL3"
3828 elif [ "$acceptance" = "L" ]; then
3829 more "$relpath/LICENSE.LGPL"
3832 elif [ "$Edition" = "Preview" ]; then
3833 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3836 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3837 echo "You have already accepted the terms of the $LicenseType license."
3840 echo "You are licensed to use this software under the terms of"
3841 echo "the $TheLicense"
3843 echo "Type '?' to read the Preview License."
3844 echo "Type 'yes' to accept this license offer."
3845 echo "Type 'no' to decline this license offer."
3847 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3851 if [ "$acceptance" = "yes" ]; then
3853 elif [ "$acceptance" = "no" ] ;then
3854 echo "You are not licensed to use this software."
3857 elif [ "$acceptance" = "?" ]; then
3858 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3861 elif [ "$Edition" != "OpenSource" ]; then
3862 if [ -n "$ExpiryDate" ]; then
3863 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3864 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3865 Today=`date +%Y%m%d`
3866 if [ "$Today" -gt "$ExpiryDate" ]; then
3867 case "$LicenseType" in
3868 Commercial|Academic|Educational)
3869 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3871 echo "NOTICE NOTICE NOTICE NOTICE"
3873 echo " Your support and upgrade period has expired."
3875 echo " You are no longer licensed to use this version of Qt."
3876 echo " Please contact qt-info@nokia.com to renew your support"
3877 echo " and upgrades for this license."
3879 echo "NOTICE NOTICE NOTICE NOTICE"
3884 echo "WARNING WARNING WARNING WARNING"
3886 echo " Your support and upgrade period has expired."
3888 echo " You may continue to use your last licensed release"
3889 echo " of Qt under the terms of your existing license"
3890 echo " agreement. But you are not entitled to technical"
3891 echo " support, nor are you entitled to use any more recent"
3892 echo " Qt releases."
3894 echo " Please contact qt-info@nokia.com to renew your"
3895 echo " support and upgrades for this license."
3897 echo "WARNING WARNING WARNING WARNING"
3904 echo "NOTICE NOTICE NOTICE NOTICE"
3906 echo " Your Evaluation license has expired."
3908 echo " You are no longer licensed to use this software. Please"
3909 echo " contact qt-info@nokia.com to purchase license, or install"
3910 echo " the Qt Open Source Edition if you intend to develop free"
3913 echo "NOTICE NOTICE NOTICE NOTICE"
3920 TheLicense=`head -n 1 "$outpath/LICENSE"`
3922 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3923 echo "You have already accepted the terms of the $TheLicense."
3926 echo "You are licensed to use this software under the terms of"
3927 echo "the $TheLicense."
3929 echo "Type '?' to view the $TheLicense."
3930 echo "Type 'yes' to accept this license offer."
3931 echo "Type 'no' to decline this license offer."
3933 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3937 if [ "$acceptance" = "yes" ]; then
3939 elif [ "$acceptance" = "no" ]; then
3940 echo "You are not licensed to use this software."
3943 else [ "$acceptance" = "?" ]
3944 more "$outpath/LICENSE"
3949 # this should be moved somewhere else
3952 AIX_VERSION=`uname -v`
3953 if [ "$AIX_VERSION" -lt "5" ]; then
3954 QMakeVar add QMAKE_LIBS_X11 -lbind
3961 #-------------------------------------------------------------------------------
3962 # generate qconfig.cpp
3963 #-------------------------------------------------------------------------------
3964 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3966 LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
3967 LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
3968 PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
3969 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
3970 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
3971 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
3972 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
3973 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
3974 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
3975 DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
3976 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
3977 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
3978 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
3979 TESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
3981 TODAY=`date +%Y-%m-%d`
3982 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3984 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
3985 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
3987 /* Installation date */
3988 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
3992 if [ ! -z "$QT_HOST_PREFIX" ]; then
3993 HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
3994 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
3995 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
3996 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
3997 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
3998 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
3999 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
4000 HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4001 HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4002 HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4003 HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4004 HOSTTESTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_tstspath=$QT_INSTALL_TESTS"`
4006 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4008 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4009 /* Installation Info */
4010 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4011 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4012 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4013 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4014 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4015 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4016 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
4017 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4018 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4019 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4020 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4021 static const char qt_configure_tests_path_str [256 + 12] = "$HOSTTESTS_PATH_STR";
4022 #else // QT_BOOTSTRAPPED
4026 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4027 /* Installation Info */
4028 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4029 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4030 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4031 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4032 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4033 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4034 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
4035 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4036 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4037 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4038 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4039 static const char qt_configure_tests_path_str [256 + 12] = "$TESTS_PATH_STR";
4042 if [ ! -z "$QT_HOST_PREFIX" ]; then
4043 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4044 #endif // QT_BOOTSTRAPPED
4049 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4050 /* strlen( "qt_lcnsxxxx" ) == 12 */
4051 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4052 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4053 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4054 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4055 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4056 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4057 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4058 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4059 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
4060 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4061 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4062 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4063 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4064 #define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;
4067 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4068 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4069 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4071 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4072 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4073 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4076 # -----------------------------------------------------------------------------
4077 if [ "$LicenseType" = "Evaluation" ]; then
4078 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4079 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4080 EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4083 if [ -n "$EVALKEY" ]; then
4084 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4085 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4086 /* Evaluation license key */
4087 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4089 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4093 # -----------------------------------------------------------------------------
4095 # -----------------------------------------------------------------------------
4098 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4100 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4101 if [ "$OPT_SHADOW" = "yes" ]; then
4102 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4103 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4104 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4108 # $1: input variable name (awk regexp)
4109 # $2: optional output variable name
4110 # $3: optional value transformation (sed command)
4111 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4112 # is where the resulting variable is written to
4113 setBootstrapVariable()
4115 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
4119 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4120 echo "Creating qmake. Please wait..."
4123 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4124 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4125 if [ -f "$QCONFIG_H" ]; then
4126 OLD_QCONFIG_H=$QCONFIG_H
4127 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4130 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4131 # when building qmake, we use #defines for the install paths,
4132 # however they are real functions in the library
4133 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4134 mkdir -p "$outpath/src/corelib/global"
4135 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4136 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4139 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4141 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4142 rm -rf mkspecs/default
4143 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4145 for mkfile in GNUmakefile Makefile; do
4148 in_mkfile="${mkfile}.in"
4149 if [ "$mkfile" = "Makefile" ]; then
4150 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4151 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4153 in_mkfile="${mkfile}.unix"
4155 in_mkfile="$relpath/qmake/$in_mkfile"
4156 mkfile="$outpath/qmake/$mkfile"
4157 if [ -f "$mkfile" ]; then
4158 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4161 [ -f "$in_mkfile" ] || continue
4163 echo "########################################################################" > "$mkfile"
4164 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4165 echo "########################################################################" >> "$mkfile"
4168 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4169 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4170 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4172 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4173 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4176 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
4177 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
4178 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
4179 setBootstrapVariable QMAKE_CFLAGS
4180 setBootstrapVariable QMAKE_CXXFLAGS
4181 setBootstrapVariable QMAKE_LFLAGS
4183 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4184 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4185 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4187 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4188 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4189 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
4190 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4191 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4192 elif [ "$CFG_DEBUG" = "yes" ]; then
4193 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4194 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
4195 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4196 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4199 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
4200 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
4201 for rpath in $RPATH_FLAGS; do
4202 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4205 if [ "$BUILD_ON_MAC" = "yes" ]; then
4206 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4207 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4208 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4209 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4210 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4211 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4212 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4213 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4214 if [ '!' -z "$CFG_SDK" ]; then
4215 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4216 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4217 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4218 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4219 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4222 if [ '!' -z "$D_FLAGS" ]; then
4223 for DEF in $D_FLAGS; do
4224 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4227 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4228 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4229 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4230 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4232 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4233 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4234 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4235 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4236 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4237 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4238 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4239 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4240 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4241 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4243 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4244 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4245 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4246 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4251 QMAKE_BUILD_ERROR=no
4252 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4253 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4254 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4255 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4258 #-------------------------------------------------------------------------------
4259 # tests that need qmake
4260 #-------------------------------------------------------------------------------
4262 # detect availability of float math.h functions
4263 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4264 CFG_USE_FLOATMATH=yes
4266 CFG_USE_FLOATMATH=no
4269 # detect mmx support
4270 if [ "${CFG_MMX}" = "auto" ]; then
4271 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4278 # detect 3dnow support
4279 if [ "${CFG_3DNOW}" = "auto" ]; then
4280 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4287 # detect sse support
4288 if [ "${CFG_SSE}" = "auto" ]; then
4289 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4296 # detect sse2 support
4297 if [ "${CFG_SSE2}" = "auto" ]; then
4298 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4305 # detect sse3 support
4306 if [ "${CFG_SSE3}" = "auto" ]; then
4307 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4314 # detect ssse3 support
4315 if [ "${CFG_SSSE3}" = "auto" ]; then
4316 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4323 # detect sse4.1 support
4324 if [ "${CFG_SSE4_1}" = "auto" ]; then
4325 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
4332 # detect sse4.2 support
4333 if [ "${CFG_SSE4_2}" = "auto" ]; then
4334 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
4341 # detect avx support
4342 if [ "${CFG_AVX}" = "auto" ]; then
4343 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4350 # check iWMMXt support
4351 if [ "$CFG_IWMMXT" = "yes" ]; then
4352 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4353 if [ $? != "0" ]; then
4354 echo "The iWMMXt functionality test failed!"
4355 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4360 # detect neon support
4361 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4362 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
4369 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4372 if [ "$CFG_ZLIB" = "no" ]; then
4373 # Note: Qt no longer support builds without zlib
4374 # So we force a "no" to be "auto" here.
4375 # If you REALLY really need no zlib support, you can still disable
4376 # it by doing the following:
4377 # add "no-zlib" to mkspecs/qconfig.pri
4378 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4380 # There's no guarantee that Qt will build under those conditions
4385 if [ "$CFG_ZLIB" = "auto" ]; then
4386 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
4393 if [ "$CFG_LARGEFILE" = "auto" ]; then
4394 #Large files should be enabled for all Linux systems
4398 # detect how jpeg should be built
4399 if [ "$CFG_JPEG" = "auto" ]; then
4400 if [ "$CFG_SHARED" = "yes" ]; then
4407 if [ "$CFG_LIBJPEG" = "auto" ]; then
4408 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
4415 # detect how gif should be built
4416 if [ "$CFG_GIF" = "auto" ]; then
4417 if [ "$CFG_SHARED" = "yes" ]; then
4425 if [ "$CFG_LIBPNG" = "auto" ]; then
4426 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
4433 # detect accessibility
4434 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4435 CFG_ACCESSIBILITY=yes
4438 # auto-detect SQL-modules support
4439 for _SQLDR in $CFG_SQL_AVAILABLE; do
4442 if [ "$CFG_SQL_mysql" != "no" ]; then
4443 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4444 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4445 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4446 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4447 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4448 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4449 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4451 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4452 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4453 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4454 echo " You need MySql 4 or higher."
4455 echo " If you believe this message is in error you may use the continue"
4456 echo " switch (-continue) to $0 to continue."
4461 QT_LFLAGS_MYSQL_R=""
4465 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
4466 QMakeVar add CONFIG use_libmysqlclient_r
4467 if [ "$CFG_SQL_mysql" = "auto" ]; then
4468 CFG_SQL_mysql=plugin
4470 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4471 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
4472 if [ "$CFG_SQL_mysql" = "auto" ]; then
4473 CFG_SQL_mysql=plugin
4476 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4477 echo "MySQL support cannot be enabled due to functionality tests!"
4478 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4479 echo " If you believe this message is in error you may use the continue"
4480 echo " switch (-continue) to $0 to continue."
4485 QT_LFLAGS_MYSQL_R=""
4493 if [ "$CFG_SQL_psql" != "no" ]; then
4494 # Be careful not to use native pg_config when cross building.
4495 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4496 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4497 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4499 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4500 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4501 # But, respect PSQL_LIBS if set
4502 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4503 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
4504 if [ "$CFG_SQL_psql" = "auto" ]; then
4508 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4509 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4510 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4511 echo " If you believe this message is in error you may use the continue"
4512 echo " switch (-continue) to $0 to continue."
4523 if [ "$CFG_SQL_odbc" != "no" ]; then
4524 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
4525 if [ "$CFG_SQL_odbc" = "auto" ]; then
4529 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
4530 QT_LFLAGS_ODBC="-liodbc"
4531 if [ "$CFG_SQL_odbc" = "auto" ]; then
4535 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4536 echo "ODBC support cannot be enabled due to functionality tests!"
4537 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4538 echo " If you believe this message is in error you may use the continue"
4539 echo " switch (-continue) to $0 to continue."
4549 if [ "$CFG_SQL_oci" != "no" ]; then
4550 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
4551 if [ "$CFG_SQL_oci" = "auto" ]; then
4555 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4556 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4557 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4558 echo " If you believe this message is in error you may use the continue"
4559 echo " switch (-continue) to $0 to continue."
4568 if [ "$CFG_SQL_tds" != "no" ]; then
4569 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4570 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4571 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
4572 if [ "$CFG_SQL_tds" = "auto" ]; then
4576 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4577 echo "TDS support cannot be enabled due to functionality tests!"
4578 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4579 echo " If you believe this message is in error you may use the continue"
4580 echo " switch (-continue) to $0 to continue."
4589 if [ "$CFG_SQL_db2" != "no" ]; then
4590 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
4591 if [ "$CFG_SQL_db2" = "auto" ]; then
4595 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4596 echo "ODBC support cannot be enabled due to functionality tests!"
4597 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4598 echo " If you believe this message is in error you may use the continue"
4599 echo " switch (-continue) to $0 to continue."
4608 if [ "$CFG_SQL_ibase" != "no" ]; then
4609 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
4610 if [ "$CFG_SQL_ibase" = "auto" ]; then
4611 CFG_SQL_ibase=plugin
4614 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4615 echo "InterBase support cannot be enabled due to functionality tests!"
4616 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4617 echo " If you believe this message is in error you may use the continue"
4618 echo " switch (-continue) to $0 to continue."
4627 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4628 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
4629 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4630 CFG_SQL_sqlite2=plugin
4633 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4634 echo "SQLite2 support cannot be enabled due to functionality tests!"
4635 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4636 echo " If you believe this message is in error you may use the continue"
4637 echo " switch (-continue) to $0 to continue."
4646 if [ "$CFG_SQL_sqlite" != "no" ]; then
4647 SQLITE_AUTODETECT_FAILED="no"
4648 if [ "$CFG_SQLITE" = "system" ]; then
4649 if [ -n "$PKG_CONFIG" ]; then
4650 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4651 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4653 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
4654 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4655 CFG_SQL_sqlite=plugin
4657 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4659 SQLITE_AUTODETECT_FAILED="yes"
4662 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4663 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4664 CFG_SQL_sqlite=plugin
4667 SQLITE_AUTODETECT_FAILED="yes"
4671 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4672 echo "SQLite support cannot be enabled due to functionality tests!"
4673 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4674 echo " If you believe this message is in error you may use the continue"
4675 echo " switch (-continue) to $0 to continue."
4681 if [ "$OPT_VERBOSE" = "yes" ]; then
4682 echo "unknown SQL driver: $_SQLDR"
4688 # auto-detect NIS support
4689 if [ "$CFG_NIS" != "no" ]; then
4690 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
4693 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4694 echo "NIS 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 CUPS support
4706 if [ "$CFG_CUPS" != "no" ]; then
4707 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
4710 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4711 echo "Cups support cannot be enabled due to functionality tests!"
4712 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4713 echo " If you believe this message is in error you may use the continue"
4714 echo " switch (-continue) to $0 to continue."
4722 # auto-detect iconv(3) support
4723 if [ "$CFG_ICONV" != "no" ]; then
4724 if [ "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
4726 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
4728 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
4730 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
4733 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4734 echo "Iconv support cannot be enabled due to functionality tests!"
4735 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4736 echo " If you believe this message is in error you may use the continue"
4737 echo " switch (-continue) to $0 to continue."
4745 # auto-detect libdbus-1 support
4746 if [ "$CFG_DBUS" != "no" ]; then
4747 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4748 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4749 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4751 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
4752 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4753 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4754 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4756 if [ "$CFG_DBUS" = "auto" ]; then
4758 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4759 # CFG_DBUS is "yes" or "linked" here
4761 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4762 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4763 echo " If you believe this message is in error you may use the continue"
4764 echo " switch (-continue) to $0 to continue."
4771 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4773 # auto-detect Glib support
4774 if [ "$CFG_GLIB" != "no" ]; then
4775 if [ -n "$PKG_CONFIG" ]; then
4776 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4777 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4779 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
4781 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4782 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4784 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4785 echo "Glib support cannot be enabled due to functionality tests!"
4786 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4787 echo " If you believe this message is in error you may use the continue"
4788 echo " switch (-continue) to $0 to continue."
4797 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4798 if [ -n "$PKG_CONFIG" ]; then
4799 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4800 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4802 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
4804 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4805 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4807 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4808 echo "Gstreamer support cannot be enabled due to functionality tests!"
4809 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4810 echo " If you believe this message is in error you may use the continue"
4811 echo " switch (-continue) to $0 to continue."
4817 elif [ "$CFG_GLIB" = "no" ]; then
4821 # auto-detect libicu support
4822 if [ "$CFG_ICU" != "no" ]; then
4823 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4824 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4826 if [ "$CFG_ICU" = "auto" ]; then
4828 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4831 echo "The ICU library support cannot be enabled."
4832 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4833 echo " If you believe this message is in error you may use the continue"
4834 echo " switch (-continue) to $0 to continue."
4840 # Auto-detect PulseAudio support
4841 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4842 if [ -n "$PKG_CONFIG" ]; then
4843 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4844 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4846 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
4848 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4849 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4851 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4852 echo "PulseAudio support cannot be enabled due to functionality tests!"
4853 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4854 echo " If you believe this message is in error you may use the continue"
4855 echo " switch (-continue) to $0 to continue."
4865 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4866 x11tests="$relpath/config.tests/x11"
4869 # work around broken X11 headers when using GCC 2.95 or later
4871 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4872 if [ $NOTYPE = "yes" ]; then
4873 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4874 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4877 # Check we actually have X11 :-)
4878 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4879 if [ $? != "0" ]; then
4880 echo "Basic XLib functionality test failed!"
4881 echo " You might need to modify the include and library search paths by editing"
4882 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4888 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4889 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4890 if [ "$CFG_GUI" = "no" ]; then
4891 if [ "$CFG_OPENGL" = "auto" ]; then
4894 if [ "$CFG_OPENGL" != "no" ]; then
4895 echo "OpenGL enabled, but GUI disabled."
4896 echo " You might need to either enable the GUI or disable OpenGL"
4900 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4901 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
4903 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
4905 if [ "$CFG_EGL" = "no" ]; then
4909 if [ "$CFG_OPENGL" = "yes" ]; then
4910 echo "All the OpenGL functionality tests failed!"
4911 echo " You might need to modify the include and library search paths by editing"
4912 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4913 echo " ${XQMAKESPEC}."
4920 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4921 if [ "$CFG_OPENGL" = "desktop" ]; then
4922 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4923 if [ $? != "0" ]; then
4924 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4931 elif [ "$CFG_OPENGL" = "es2" ]; then
4933 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4934 if [ $? != "0" ]; then
4935 echo "The OpenGL ES 2.0 functionality test failed!"
4936 echo " You might need to modify the include and library search paths by editing"
4937 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4938 echo " ${XQMAKESPEC}."
4941 elif [ "$CFG_OPENGL" = "desktop" ]; then
4942 # Desktop OpenGL support
4943 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4944 if [ $? != "0" ]; then
4945 echo "The OpenGL functionality test failed!"
4946 echo " You might need to modify the include and library search paths by editing"
4947 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4948 echo " ${XQMAKESPEC}."
4953 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4954 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4955 if [ $? != "0" ]; then
4956 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4963 fi # X11/MINGW OpenGL
4966 if [ "$PLATFORM_X11" = "yes" ]; then
4967 # auto-detect Xcursor support
4968 if [ "$CFG_XCURSOR" != "no" ]; then
4969 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
4970 if [ "$CFG_XCURSOR" != "runtime" ]; then
4974 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4975 echo "Xcursor support cannot be enabled due to functionality tests!"
4976 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4977 echo " If you believe this message is in error you may use the continue"
4978 echo " switch (-continue) to $0 to continue."
4986 # auto-detect Xfixes support
4987 if [ "$CFG_XFIXES" != "no" ]; then
4988 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4989 if [ "$CFG_XFIXES" != "runtime" ]; then
4993 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4994 echo "Xfixes support cannot be enabled due to functionality tests!"
4995 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4996 echo " If you believe this message is in error you may use the continue"
4997 echo " switch (-continue) to $0 to continue."
5005 # auto-detect Xrandr support (resize and rotate extension)
5006 if [ "$CFG_XRANDR" != "no" ]; then
5007 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
5008 if [ "$CFG_XRANDR" != "runtime" ]; then
5012 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5013 echo "Xrandr 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 Xrender support
5025 if [ "$CFG_XRENDER" != "no" ]; then
5026 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
5029 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5030 echo "Xrender 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 MIT-SHM support
5042 if [ "$CFG_MITSHM" != "no" ]; then
5043 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
5046 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5047 echo "MITSHM support cannot be enabled due to functionality tests!"
5048 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5049 echo " If you believe this message is in error you may use the continue"
5050 echo " switch (-continue) to $0 to continue."
5058 # auto-detect FontConfig support
5059 if [ "$CFG_FONTCONFIG" != "no" ]; then
5060 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5061 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5062 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5064 QT_CFLAGS_FONTCONFIG=
5065 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5067 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
5069 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5070 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5071 CFG_LIBFREETYPE=system
5073 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5074 echo "FontConfig 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 Session Management support
5086 if [ "$CFG_SM" = "auto" ]; then
5087 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
5090 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5091 echo "Session Management 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 SHAPE support
5103 if [ "$CFG_XSHAPE" != "no" ]; then
5104 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
5107 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5108 echo "XShape 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 XVideo support
5120 if [ "$CFG_XVIDEO" != "no" ]; then
5121 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
5124 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5125 echo "XVideo 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 XSync support
5137 if [ "$CFG_XSYNC" != "no" ]; then
5138 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
5141 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5142 echo "XSync support cannot be enabled due to functionality tests!"
5143 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5144 echo " If you believe this message is in error you may use the continue"
5145 echo " switch (-continue) to $0 to continue."
5153 # auto-detect Xinerama support
5154 if [ "$CFG_XINERAMA" != "no" ]; then
5155 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
5156 if [ "$CFG_XINERAMA" != "runtime" ]; then
5160 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5161 echo "Xinerama support cannot be enabled due to functionality tests!"
5162 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5163 echo " If you believe this message is in error you may use the continue"
5164 echo " switch (-continue) to $0 to continue."
5172 # auto-detect Xinput support
5173 if [ "$CFG_XINPUT" != "no" ]; then
5174 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
5175 if [ "$CFG_XINPUT" != "runtime" ]; then
5179 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5180 echo "Tablet and Xinput 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 # auto-detect XKB support
5192 if [ "$CFG_XKB" != "no" ]; then
5193 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
5196 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5197 echo "XKB support cannot be enabled due to functionality tests!"
5198 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5199 echo " If you believe this message is in error you may use the continue"
5200 echo " switch (-continue) to $0 to continue."
5208 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5209 if [ -n "$PKG_CONFIG" ]; then
5210 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5211 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5213 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5215 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5216 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5218 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5219 echo "Gtk theme support cannot be enabled due to functionality tests!"
5220 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5221 echo " If you believe this message is in error you may use the continue"
5222 echo " switch (-continue) to $0 to continue."
5228 elif [ "$CFG_GLIB" = "no" ]; then
5234 if [ "$BUILD_ON_MAC" = "yes" ]; then
5235 if [ "$CFG_PHONON" != "no" ]; then
5236 # Always enable Phonon (unless it was explicitly disabled)
5240 if [ "$CFG_COREWLAN" = "auto" ]; then
5241 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
5250 if [ "$PLATFORM_QPA" = "yes" ]; then
5251 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5252 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5253 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
5255 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
5258 if [ "$CFG_OPENGL" = "yes" ]; then
5259 echo "All the OpenGL functionality tests failed!"
5260 echo " You might need to modify the include and library search paths by editing"
5261 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5262 echo " ${XQMAKESPEC}."
5267 elif [ "$CFG_OPENGL" = "es2" ]; then
5269 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5270 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5271 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5272 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5273 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5274 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5275 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5276 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5279 "$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
5280 if [ $? != "0" ]; then
5281 echo "The OpenGL ES 2.0 functionality test failed!"
5282 echo " You might need to modify the include and library search paths by editing"
5283 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5284 echo " ${XQMAKESPEC}."
5287 elif [ "$CFG_OPENGL" = "desktop" ]; then
5288 # Desktop OpenGL support
5289 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5290 if [ $? != "0" ]; then
5291 echo "The OpenGL functionality test failed!"
5292 echo " You might need to modify the include and library search paths by editing"
5293 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5294 echo " ${XQMAKESPEC}."
5299 # auto-detect FontConfig support
5300 if [ "$CFG_FONTCONFIG" != "no" ]; then
5301 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5302 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5303 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5305 QT_CFLAGS_FONTCONFIG=
5306 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5308 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
5309 QT_CONFIG="$QT_CONFIG fontconfig"
5310 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5311 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5312 CFG_LIBFREETYPE=system
5317 # Save these for a check later
5318 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5319 ORIG_CFG_XCB="$CFG_XCB"
5321 if [ "$CFG_WAYLAND" != "no" ]; then
5322 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5323 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5324 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5325 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --cflags-only-I wayland-client 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5326 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --libs-only-L wayland-client 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5328 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
5330 QT_CONFIG="$QT_CONFIG wayland"
5331 elif [ "$CFG_WAYLAND" = "yes" ]; then
5332 echo "The Wayland functionality test failed!"
5336 QMakeVar add DEFINES QT_NO_WAYLAND
5340 if [ "$CFG_LIBUDEV" != "no" ]; then
5341 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5343 QT_CONFIG="$QT_CONFIG libudev"
5344 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5345 echo "The libudev functionality test failed!"
5349 QMakeVar add DEFINES QT_NO_LIBUDEV
5353 if [ "$CFG_EVDEV" != "no" ]; then
5354 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5356 QT_CONFIG="$QT_CONFIG evdev"
5357 elif [ "$CFG_EVDEV" = "yes" ]; then
5358 echo "The evdev functionality test failed!"
5362 QMakeVar add DEFINES QT_NO_EVDEV
5366 # Check we actually have X11 :-)
5367 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
5368 QT_CONFIG="$QT_CONFIG xlib"
5371 # auto-detect Xrender support
5372 if [ "$CFG_XRENDER" != "no" ]; then
5373 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
5375 QT_CONFIG="$QT_CONFIG xrender"
5377 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5378 echo "Xrender support cannot be enabled due to functionality tests!"
5379 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5380 echo " If you believe this message is in error you may use the continue"
5381 echo " switch (-continue) to $0 to continue."
5389 if [ "$CFG_XCB" != "no" ]; then
5390 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then
5391 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5392 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5394 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
5396 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
5397 QT_CONFIG="$QT_CONFIG xcb-render"
5400 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
5402 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5405 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
5406 QT_CONFIG="$QT_CONFIG xcb-xlib"
5409 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5410 # auto-detect XInput2/Xinput support
5411 if [ "$CFG_XINPUT2" != "no" ]; then
5412 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
5416 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5417 echo "XInput2 support cannot be enabled due to functionality tests!"
5418 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5419 echo " If you believe this message is in error you may use the continue"
5420 echo " switch (-continue) to $0 to continue."
5429 if [ "$CFG_XCB" = "yes" ]; then
5430 echo "The XCB test failed!"
5431 echo " You might need to install dependency packages."
5432 echo " See src/plugins/platforms/xcb/README."
5436 QMakeVar add DEFINES QT_NO_XCB
5440 # Detect libxkbcommon
5441 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5442 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5443 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5444 if [ "$CFG_WAYLAND" = "yes" ]; then
5445 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5446 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5448 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5449 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5451 if [ "$CFG_WAYLAND" = "yes" ]; then
5452 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5454 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5457 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5458 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5459 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5460 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5461 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5462 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5463 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5466 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5467 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5468 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5469 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5472 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
5473 QT_CONFIG="$QT_CONFIG coreservices"
5475 QMakeVar add DEFINES QT_NO_CORESERVICES
5478 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5479 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5480 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5481 echo "No QPA platform plugin enabled!"
5482 echo " If you really want to build without a QPA platform plugin you must pass"
5483 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5484 echo " cannot run GUI applications."
5485 echo " The dependencies needed for xcb to build are listed in"
5486 echo " src/plugins/platforms/xcb/README"
5496 if [ "$PLATFORM_X11" = "yes" ]; then
5497 if [ "$CFG_EGL" != "no" ]; then
5498 # detect EGL support
5499 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
5500 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5505 if [ "$EGL_VARIANT" = "none" ]; then
5506 if [ "$CFG_EGL" = "yes" ]; then
5507 echo "The EGL functionality test failed!"
5508 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5509 echo " You might need to modify the include and library search paths by editing"
5510 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5511 echo " ${XQMAKESPEC}."
5515 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5516 if [ "$CFG_OPENGL" = "es2" ]; then
5523 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5526 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5527 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5528 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
5529 CFG_LIBFREETYPE=system
5535 if [ "$CFG_ENDIAN" = "auto" ]; then
5536 if [ "$XPLATFORM_MINGW" = "yes" ]; then
5537 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5539 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
5541 if [ "$F" -eq 0 ]; then
5542 CFG_ENDIAN="Q_LITTLE_ENDIAN"
5543 elif [ "$F" -eq 1 ]; then
5544 CFG_ENDIAN="Q_BIG_ENDIAN"
5547 echo "The target system byte order could not be detected!"
5548 echo "Turn on verbose messaging (-v) to see the final report."
5549 echo "You can use the -little-endian or -big-endian switch to"
5550 echo "$0 to continue."
5556 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5557 if [ "$BUILD_ON_MAC" = "yes" ]; then
5560 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5562 if [ "$F" -eq 0 ]; then
5563 CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
5564 elif [ "$F" -eq 1 ]; then
5565 CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
5568 echo "The host system byte order could not be detected!"
5569 echo "Turn on verbose messaging (-v) to see the final report."
5570 echo "You can use the -host-little-endian or -host-big-endian switch to"
5571 echo "$0 to continue."
5578 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5582 if [ "$CFG_STL" != "no" ]; then
5583 if [ "$HAVE_STL" = "yes" ]; then
5586 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5587 echo "STL support cannot be enabled due to functionality tests!"
5588 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5589 echo " If you believe this message is in error you may use the continue"
5590 echo " switch (-continue) to $0 to continue."
5598 # detect POSIX clock_gettime()
5599 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5600 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
5601 CFG_CLOCK_GETTIME=yes
5603 CFG_CLOCK_GETTIME=no
5607 # detect POSIX monotonic clocks
5608 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5609 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
5610 CFG_CLOCK_MONOTONIC=yes
5612 CFG_CLOCK_MONOTONIC=no
5614 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5615 CFG_CLOCK_MONOTONIC=no
5619 if [ "$CFG_MREMAP" = "auto" ]; then
5620 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5627 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5628 if [ "$CFG_GETADDRINFO" != "no" ]; then
5629 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5632 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5633 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5634 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5635 echo " If you believe this message is in error you may use the continue"
5636 echo " switch (-continue) to $0 to continue."
5644 # find if the platform provides inotify
5645 if [ "$CFG_INOTIFY" != "no" ]; then
5646 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5649 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5650 echo "inotify support cannot be enabled due to functionality tests!"
5651 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5652 echo " If you believe this message is in error you may use the continue"
5653 echo " switch (-continue) to $0 to continue."
5661 # find if the platform provides if_nametoindex (ipv6 interface name support)
5662 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5663 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
5666 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5667 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5668 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5669 echo " If you believe this message is in error you may use the continue"
5670 echo " switch (-continue) to $0 to continue."
5678 # find if the platform provides getifaddrs (network interface enumeration)
5679 if [ "$CFG_GETIFADDRS" != "no" ]; then
5680 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5683 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5684 echo "getifaddrs support cannot be enabled due to functionality tests!"
5685 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5686 echo " If you believe this message is in error you may use the continue"
5687 echo " switch (-continue) to $0 to continue."
5696 if [ "$CFG_OPENSSL" != "no" ]; then
5697 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
5698 if [ "$CFG_OPENSSL" = "auto" ]; then
5702 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5703 echo "OpenSSL support cannot be enabled due to functionality tests!"
5704 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5705 echo " If you believe this message is in error you may use the continue"
5706 echo " switch (-continue) to $0 to continue."
5715 if [ "$CFG_PCRE" != "qt" ]; then
5716 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5719 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5720 echo "PCRE support cannot be enabled due to functionality tests!"
5721 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5722 echo " If you believe this message is in error you may use the continue"
5723 echo " switch (-continue) to $0 to continue."
5731 # detect OpenVG support
5732 if [ "$CFG_OPENVG" != "no" ]; then
5733 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
5734 if [ "$CFG_OPENVG" = "auto" ]; then
5737 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
5738 if [ "$CFG_OPENVG" = "auto" ]; then
5741 CFG_OPENVG_ON_OPENGL=yes
5742 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
5743 if [ "$CFG_OPENVG" = "auto" ]; then
5746 CFG_OPENVG_LC_INCLUDES=yes
5747 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
5748 if [ "$CFG_OPENVG" = "auto" ]; then
5751 CFG_OPENVG_LC_INCLUDES=yes
5752 CFG_OPENVG_ON_OPENGL=yes
5754 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5755 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5756 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5757 echo " If you believe this message is in error you may use the continue"
5758 echo " switch (-continue) to $0 to continue."
5764 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
5765 CFG_OPENVG_SHIVA=yes
5769 if [ "$CFG_ALSA" = "auto" ]; then
5770 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5777 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5778 if [ "$CFG_ARCH" = "arm" ]; then
5779 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5780 if [ $? != "0" ]; then
5781 CFG_JAVASCRIPTCORE_JIT=no
5784 case "$XPLATFORM" in
5786 CFG_JAVASCRIPTCORE_JIT=no
5792 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5793 QMakeVar set JAVASCRIPTCORE_JIT yes
5794 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5795 QMakeVar set JAVASCRIPTCORE_JIT no
5798 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5799 CFG_AUDIO_BACKEND=yes
5802 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5803 echo "Warning: largefile support cannot be disabled for win32."
5807 #-------------------------------------------------------------------------------
5808 # ask for all that hasn't been auto-detected or specified in the arguments
5809 #-------------------------------------------------------------------------------
5811 # enable dwarf2 support on Mac
5812 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5813 QT_CONFIG="$QT_CONFIG dwarf2"
5816 # Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
5817 if [ "$BUILD_ON_MAC" = "yes" ]; then
5818 DEFAULT_ARCH="$CFG_MAC_ARCHS"
5819 if [ -z "$DEFAULT_ARCH" ]; then
5820 case `file "${outpath}/bin/qmake"` in
5828 # unsupported/unknown
5832 if [ -n "$DEFAULT_ARCH" ]; then
5833 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5834 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5835 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5836 # Make the application arch follow the Qt arch for single arch builds.
5837 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
5838 [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5843 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5844 QT_CONFIG="$QT_CONFIG phonon-backend"
5847 # disable accessibility
5848 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5849 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5851 QT_CONFIG="$QT_CONFIG accessibility"
5854 # egl stuff does not belong in lighthouse, but rather in plugins
5855 if [ "$PLATFORM_QPA" = "yes" ]; then
5860 if [ "$CFG_EGL" = "no" ]; then
5861 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5863 QT_CONFIG="$QT_CONFIG egl"
5864 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5865 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5870 if [ "$CFG_OPENVG" = "no" ]; then
5871 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5873 QT_CONFIG="$QT_CONFIG openvg"
5874 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5875 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5877 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5878 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5880 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5881 QT_CONFIG="$QT_CONFIG shivavg"
5882 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5887 if [ "$CFG_OPENGL" = "no" ]; then
5888 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5890 QT_CONFIG="$QT_CONFIG opengl"
5893 if [ "$CFG_OPENGL" = "es2" ]; then
5894 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5897 if [ "$CFG_OPENGL" = "es2" ]; then
5898 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5899 QT_CONFIG="$QT_CONFIG opengles2"
5902 # safe execution environment
5903 if [ "$CFG_SXE" != "no" ]; then
5904 QT_CONFIG="$QT_CONFIG sxe"
5907 # build up the variables for output
5908 if [ "$CFG_DEBUG" = "yes" ]; then
5909 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5910 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5911 elif [ "$CFG_DEBUG" = "no" ]; then
5912 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5913 QMAKE_CONFIG="$QMAKE_CONFIG release"
5915 if [ "$CFG_SHARED" = "yes" ]; then
5916 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5917 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5918 elif [ "$CFG_SHARED" = "no" ]; then
5919 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5920 QMAKE_CONFIG="$QMAKE_CONFIG static"
5922 if [ "$PLATFORM_QPA" = "yes" ]; then
5923 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5924 QT_CONFIG="$QT_CONFIG qpa"
5925 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5926 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5929 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5930 # Do not set this here for Windows. Let qmake do it so
5931 # debug and release precompiled headers are kept separate.
5932 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5934 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5935 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5936 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5937 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5938 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5939 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5941 if [ "$CFG_STL" = "no" ]; then
5942 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5944 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5946 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5947 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5949 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5950 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5951 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5952 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5953 QMakeVar add QMAKE_CFLAGS -g
5954 QMakeVar add QMAKE_CXXFLAGS -g
5955 QT_CONFIG="$QT_CONFIG separate_debug_info"
5957 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5958 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5960 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5961 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5962 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5963 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5964 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5965 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5966 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5967 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5968 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5969 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5970 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5971 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5972 QT_CONFIG="$QT_CONFIG clock-gettime"
5974 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5975 QT_CONFIG="$QT_CONFIG clock-monotonic"
5977 if [ "$CFG_MREMAP" = "yes" ]; then
5978 QT_CONFIG="$QT_CONFIG mremap"
5980 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5981 QT_CONFIG="$QT_CONFIG getaddrinfo"
5983 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5984 QT_CONFIG="$QT_CONFIG ipv6ifname"
5986 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5987 QT_CONFIG="$QT_CONFIG getifaddrs"
5989 if [ "$CFG_INOTIFY" = "yes" ]; then
5990 QT_CONFIG="$QT_CONFIG inotify"
5992 if [ "$CFG_LIBJPEG" = "no" ]; then
5994 elif [ "$CFG_LIBJPEG" = "system" ]; then
5995 QT_CONFIG="$QT_CONFIG system-jpeg"
5997 if [ "$CFG_JPEG" = "no" ]; then
5998 QT_CONFIG="$QT_CONFIG no-jpeg"
5999 elif [ "$CFG_JPEG" = "yes" ]; then
6000 QT_CONFIG="$QT_CONFIG jpeg"
6002 if [ "$CFG_LIBPNG" = "no" ]; then
6005 if [ "$CFG_LIBPNG" = "system" ]; then
6006 QT_CONFIG="$QT_CONFIG system-png"
6008 if [ "$CFG_PNG" = "no" ]; then
6009 QT_CONFIG="$QT_CONFIG no-png"
6010 elif [ "$CFG_PNG" = "yes" ]; then
6011 QT_CONFIG="$QT_CONFIG png"
6013 if [ "$CFG_GIF" = "no" ]; then
6014 QT_CONFIG="$QT_CONFIG no-gif"
6015 elif [ "$CFG_GIF" = "yes" ]; then
6016 QT_CONFIG="$QT_CONFIG gif"
6018 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6019 QT_CONFIG="$QT_CONFIG no-freetype"
6020 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
6021 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6022 QT_CONFIG="$QT_CONFIG system-freetype"
6024 QT_CONFIG="$QT_CONFIG freetype"
6026 if [ "$CFG_GUI" = "auto" ]; then
6029 if [ "$CFG_GUI" = "no" ]; then
6030 QT_CONFIG="$QT_CONFIG no-gui"
6032 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
6036 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6037 #On Mac we implicitly link against libz, so we
6038 #never use the 3rdparty stuff.
6039 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
6041 if [ "$CFG_ZLIB" = "yes" ]; then
6042 QT_CONFIG="$QT_CONFIG zlib"
6043 elif [ "$CFG_ZLIB" = "system" ]; then
6044 QT_CONFIG="$QT_CONFIG system-zlib"
6047 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
6048 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
6049 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
6050 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
6051 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
6052 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
6053 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
6054 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
6055 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
6056 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
6057 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
6058 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
6059 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
6060 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
6061 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
6063 if [ "$PLATFORM_X11" = "yes" ]; then
6064 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
6066 # for some reason, the following libraries are not always built shared,
6067 # so *every* program/lib (including Qt) has to link against them
6068 if [ "$CFG_XSHAPE" = "yes" ]; then
6069 QT_CONFIG="$QT_CONFIG xshape"
6071 if [ "$CFG_XVIDEO" = "yes" ]; then
6072 QT_CONFIG="$QT_CONFIG xvideo"
6074 if [ "$CFG_XSYNC" = "yes" ]; then
6075 QT_CONFIG="$QT_CONFIG xsync"
6077 if [ "$CFG_XINERAMA" = "yes" ]; then
6078 QT_CONFIG="$QT_CONFIG xinerama"
6079 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6081 if [ "$CFG_XCURSOR" = "yes" ]; then
6082 QT_CONFIG="$QT_CONFIG xcursor"
6083 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6085 if [ "$CFG_XFIXES" = "yes" ]; then
6086 QT_CONFIG="$QT_CONFIG xfixes"
6087 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6089 if [ "$CFG_XRANDR" = "yes" ]; then
6090 QT_CONFIG="$QT_CONFIG xrandr"
6091 if [ "$CFG_XRENDER" != "yes" ]; then
6092 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6093 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6095 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6098 if [ "$CFG_XRENDER" = "yes" ]; then
6099 QT_CONFIG="$QT_CONFIG xrender"
6100 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6102 if [ "$CFG_MITSHM" = "yes" ]; then
6103 QT_CONFIG="$QT_CONFIG mitshm"
6105 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6106 QT_CONFIG="$QT_CONFIG fontconfig"
6108 if [ "$CFG_XINPUT" = "yes" ]; then
6109 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6111 if [ "$CFG_XINPUT" = "yes" ]; then
6112 QT_CONFIG="$QT_CONFIG xinput tablet"
6114 if [ "$CFG_XKB" = "yes" ]; then
6115 QT_CONFIG="$QT_CONFIG xkb"
6119 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6120 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6121 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6123 if [ "$PLATFORM_MAC" = "yes" ]; then
6124 if [ "$CFG_RPATH" = "yes" ]; then
6125 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6127 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
6128 if [ -n "$RPATH_FLAGS" ]; then
6130 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6134 elif [ "$CFG_RPATH" = "yes" ]; then
6135 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6139 if [ "$CFG_RPATH" = "yes" ]; then
6140 # set the default rpath to the library installation directory
6141 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6143 if [ -n "$RPATH_FLAGS" ]; then
6144 # add the user defined rpaths
6145 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6149 if [ '!' -z "$I_FLAGS" ]; then
6150 # add the user define include paths
6151 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6152 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6155 if [ '!' -z "$W_FLAGS" ]; then
6156 # add the user defined warning flags
6157 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6158 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6159 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6162 # turn off exceptions for the compilers that support it
6163 if [ "$XPLATFORM" != "$PLATFORM" ]; then
6164 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6166 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6169 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6170 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6173 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6174 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6175 # Follow default behavior of configure.exe by overriding with "rtti".
6176 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6179 if [ "$CFG_ALSA" = "yes" ]; then
6180 QT_CONFIG="$QT_CONFIG alsa"
6183 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6184 QT_CONFIG="$QT_CONFIG pulseaudio"
6187 if [ "$CFG_COREWLAN" = "yes" ]; then
6188 QT_CONFIG="$QT_CONFIG corewlan"
6191 if [ "$CFG_ICU" = "yes" ]; then
6192 QT_CONFIG="$QT_CONFIG icu"
6195 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6196 QT_CONFIG="$QT_CONFIG force_asserts"
6199 if [ "$CFG_PCRE" = "qt" ]; then
6200 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6204 # Some Qt modules are too advanced in C++ for some old compilers
6205 # Detect here the platforms where they are known to work.
6207 # See Qt documentation for more information on which features are
6208 # supported and on which compilers.
6210 canBuildQtConcurrent="yes"
6211 canUseV8Snapshot="yes"
6213 case "$XPLATFORM" in
6215 # PA-RISC's assembly is too limited
6216 # gcc 3.4 on that platform can't build QtXmlPatterns
6217 # the assembly it generates cannot be compiled
6219 # Check gcc's version
6220 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6224 canBuildQtXmlPatterns="no"
6228 canBuildQtXmlPatterns="no"
6232 unsupported/vxworks-*-g++*)
6235 unsupported/vxworks-*-dcc*)
6237 canBuildQtXmlPatterns="no"
6240 # Check gcc's version
6241 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6249 canBuildQtXmlPatterns="no"
6254 # Check the compiler version
6255 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6258 canBuildQtXmlPatterns="no"
6259 canBuildQtConcurrent="no"
6263 canBuildQtConcurrent="no"
6269 canBuildQtXmlPatterns="no"
6270 canBuildQtConcurrent="no"
6276 # Get the xlC version
6277 cat > xlcver.c <<EOF
6281 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6286 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6287 xlcver=`./xlcver 2>/dev/null`
6290 if [ "$OPT_VERBOSE" = "yes" ]; then
6291 if [ -n "$xlcver" ]; then
6292 echo Found IBM xlC version: $xlcver.
6294 echo Could not determine IBM xlC version, assuming oldest supported.
6301 canBuildQtXmlPatterns="no"
6302 canBuildQtConcurrent="no"
6306 canBuildQtConcurrent="no"
6312 canBuildQtConcurrent="no"
6316 if [ "$CFG_GUI" = "no" ]; then
6317 # WebKit requires QtGui
6321 if [ "$CFG_SHARED" = "no" ]; then
6323 echo "WARNING: Using static linking will disable the WebKit module."
6328 CFG_CONCURRENT="yes"
6329 if [ "$canBuildQtConcurrent" = "no" ]; then
6330 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6333 QT_CONFIG="$QT_CONFIG concurrent"
6337 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6338 QT_CONFIG="$QT_CONFIG audio-backend"
6342 if [ "$CFG_WEBKIT" = "debug" ]; then
6343 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6347 QT_CONFIG="$QT_CONFIG v8"
6348 # Detect snapshot support
6349 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6350 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6353 *) canUseV8Snapshot="no"
6357 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6358 # QEMU crashes when building inside Scratchbox with an ARM target
6359 canUseV8Snapshot="no"
6362 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6363 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6365 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6366 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6369 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6370 QT_CONFIG="$QT_CONFIG v8snapshot"
6374 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6375 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6378 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6381 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6382 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6383 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6388 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6389 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6390 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6397 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6403 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6405 case "$COMPILER_VERSION" in
6407 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6408 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6409 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6412 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6413 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6414 QT_GCC_PATCH_VERSION=0
6424 #-------------------------------------------------------------------------------
6425 # part of configuration information goes into qconfig.h
6426 #-------------------------------------------------------------------------------
6428 case "$CFG_QCONFIG" in
6430 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6433 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6434 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6435 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6436 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6437 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6438 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6440 echo "#endif" >>"$tmpconfig"
6444 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6448 # define QT_EDITION $QT_EDITION
6451 /* Machine byte-order */
6452 #define Q_BIG_ENDIAN 4321
6453 #define Q_LITTLE_ENDIAN 1234
6456 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6457 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6458 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6459 #if defined(__BIG_ENDIAN__)
6460 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6461 #elif defined(__LITTLE_ENDIAN__)
6462 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6464 # error "Unable to determine byte order!"
6468 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6470 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6471 if [ "$CFG_ENDIAN" = "auto" ]; then
6472 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6473 #if defined(__BIG_ENDIAN__)
6474 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6475 #elif defined(__LITTLE_ENDIAN__)
6476 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6478 # error "Unable to determine byte order!"
6482 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6484 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6486 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6487 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6488 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6489 /* Machine Architecture */
6490 #ifndef QT_BOOTSTRAPPED
6491 # define QT_ARCH_${CFG_ARCH_STR}
6493 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6497 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6498 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6500 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6501 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6504 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6505 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6508 if [ "$BUILD_ON_MAC" = "yes" ]; then
6509 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6510 #if defined(__LP64__)
6511 # define QT_POINTER_SIZE 8
6513 # define QT_POINTER_SIZE 4
6517 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6518 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6521 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6522 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6523 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6527 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6529 if [ "$CFG_DEV" = "yes" ]; then
6530 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6533 if [ "$PLATFORM_QPA" = "yes" ]; then
6534 # Add QPA to config.h
6535 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6538 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6539 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6542 # Add turned on SQL drivers
6543 for DRIVER in $CFG_SQL_AVAILABLE; do
6544 eval "VAL=\$CFG_SQL_$DRIVER"
6547 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6548 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6549 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6552 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6558 QMakeVar set sql-drivers "$SQL_DRIVERS"
6559 QMakeVar set sql-plugins "$SQL_PLUGINS"
6561 # Add other configuration options to the qconfig.h file
6562 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6563 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6564 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6565 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6566 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6567 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6568 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6570 # X11/Unix/Mac only configs
6571 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6572 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6573 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6574 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6575 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6576 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6577 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6578 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6579 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6580 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6581 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6582 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6583 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6584 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6585 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6587 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6588 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6589 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6590 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6591 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6592 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6593 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6594 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6595 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6596 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6597 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6598 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6599 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6601 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6602 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6603 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6604 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6605 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6606 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6607 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6608 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6610 # sort QCONFIG_FLAGS for neatness if we can
6611 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6612 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6614 if [ -n "$QCONFIG_FLAGS" ]; then
6615 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6616 #ifndef QT_BOOTSTRAPPED
6619 for cfg in $QCONFIG_FLAGS; do
6620 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6621 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6622 # figure out define logic, so we can output the correct
6623 # ifdefs to override the global defines in a project
6625 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6626 # QT_NO_option can be forcefully turned on by QT_option
6627 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6628 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6629 # QT_option can be forcefully turned off by QT_NO_option
6630 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6633 if [ -z $cfgdNeg ]; then
6634 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6641 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6642 #if defined($cfgd) && defined($cfgdNeg)
6644 #elif !defined($cfgd) && !defined($cfgdNeg)
6651 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6652 #endif // QT_BOOTSTRAPPED
6657 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6658 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6659 #define QT_VISIBILITY_AVAILABLE
6664 if [ -n "$QT_LIBINFIX" ]; then
6665 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6666 #define QT_LIBINFIX "$QT_LIBINFIX"
6671 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6672 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6673 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6675 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6676 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6677 chmod -w "$outpath/src/corelib/global/qconfig.h"
6678 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6679 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6683 #-------------------------------------------------------------------------------
6684 # save configuration into qconfig.pri
6685 #-------------------------------------------------------------------------------
6686 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6687 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6688 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6689 if [ "$CFG_DEBUG" = "yes" ]; then
6690 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6691 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6692 QT_CONFIG="$QT_CONFIG release"
6694 QT_CONFIG="$QT_CONFIG debug"
6695 elif [ "$CFG_DEBUG" = "no" ]; then
6696 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6697 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6698 QT_CONFIG="$QT_CONFIG debug"
6700 QT_CONFIG="$QT_CONFIG release"
6702 if [ "$CFG_STL" = "yes" ]; then
6703 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6705 if [ "$CFG_FRAMEWORK" = "no" ]; then
6706 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6708 QT_CONFIG="$QT_CONFIG qt_framework"
6709 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6711 if [ "$CFG_DEV" = "yes" ]; then
6712 QT_CONFIG="$QT_CONFIG private_tests"
6715 cat >>"$QTCONFIG.tmp" <<EOF
6717 CONFIG += $QTCONFIG_CONFIG
6719 QT_EDITION = $Edition
6720 QT_CONFIG += $QT_CONFIG
6723 QT_VERSION = $QT_VERSION
6724 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6725 QT_MINOR_VERSION = $QT_MINOR_VERSION
6726 QT_PATCH_VERSION = $QT_PATCH_VERSION
6729 QT_LIBINFIX = $QT_LIBINFIX
6730 QT_NAMESPACE = $QT_NAMESPACE
6733 if [ -n "$CFG_SYSROOT" ]; then
6734 echo "# sysroot" >>"$QTCONFIG.tmp"
6735 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6736 echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
6737 echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
6738 echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
6739 echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
6740 echo "}" >> "$QTCONFIG.tmp"
6741 echo >> "$QTCONFIG.tmp"
6743 if [ "$CFG_RPATH" = "yes" ]; then
6744 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6746 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6747 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6748 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6749 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6752 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6753 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6754 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6757 # replace qconfig.pri if it differs from the newly created temp file
6758 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6759 rm -f "$QTCONFIG.tmp"
6761 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6764 #-------------------------------------------------------------------------------
6765 # save configuration into qmodule.pri
6766 #-------------------------------------------------------------------------------
6767 QTMODULE="$outpath/mkspecs/qmodule.pri"
6769 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6771 # Ensure we can link to uninistalled libraries
6772 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6773 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6775 if [ -n "$QT_CFLAGS_PSQL" ]; then
6776 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6778 if [ -n "$QT_LFLAGS_PSQL" ]; then
6779 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6781 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6782 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6784 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6785 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6787 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6788 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6790 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6791 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6793 if [ -n "$QT_LFLAGS_ODBC" ]; then
6794 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6796 if [ -n "$QT_LFLAGS_TDS" ]; then
6797 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6800 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6801 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6804 #dump in the OPENSSL_LIBS info
6805 if [ '!' -z "$OPENSSL_LIBS" ]; then
6806 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6807 elif [ "$CFG_OPENSSL" = "linked" ]; then
6808 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6811 #dump in the SDK info
6812 if [ '!' -z "$CFG_SDK" ]; then
6813 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6817 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6818 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6820 # replace qmodule.pri if it differs from the newly created temp file
6821 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6822 rm -f "$QTMODULE.tmp"
6824 mv -f "$QTMODULE.tmp" "$QTMODULE"
6827 #-------------------------------------------------------------------------------
6828 # save configuration into .qmake.cache
6829 #-------------------------------------------------------------------------------
6831 CACHEFILE="$outpath/.qmake.cache"
6832 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6833 cat >>"$CACHEFILE.tmp" <<EOF
6835 QT_SOURCE_TREE = \$\$quote($relpath)
6836 QT_BUILD_TREE = \$\$quote($outpath)
6837 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6839 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6840 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
6841 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
6842 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
6843 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6844 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6846 include(\$\$PWD/mkspecs/qmodule.pri)
6847 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6848 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
6849 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
6853 #dump the qmake spec
6854 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6855 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6857 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6862 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
6863 if [ "$CFG_INCREMENTAL" = "yes" ]; then
6864 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
6865 # don't need to worry about generated files
6866 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
6867 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
6869 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
6871 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
6872 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
6875 # replace .qmake.cache if it differs from the newly created temp file
6876 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6877 rm -f "$CACHEFILE.tmp"
6879 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6882 #-------------------------------------------------------------------------------
6883 # give feedback on configuration
6884 #-------------------------------------------------------------------------------
6888 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6891 This target is using the GNU C++ compiler ($PLATFORM).
6893 Recent versions of this compiler automatically include code for
6894 exceptions, which increase both the size of the Qt libraries and
6895 the amount of memory taken by your applications.
6897 You may choose to re-run `basename $0` with the -no-exceptions
6898 option to compile Qt without exceptions. This is completely binary
6899 compatible, and existing applications will continue to work.
6907 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6910 This target is using the MIPSpro C++ compiler ($PLATFORM).
6912 You may choose to re-run `basename $0` with the -no-exceptions
6913 option to compile Qt without exceptions. This will make the
6914 size of the Qt library smaller and reduce the amount of memory
6915 taken by your applications.
6927 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6928 echo "Build type: $PLATFORM"
6930 echo "Building on: $PLATFORM"
6931 echo "Building for: $XPLATFORM"
6934 if [ ! -z "$CFG_MAC_ARCHS" ]; then
6935 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
6937 echo "Architecture: $CFG_ARCH"
6940 if [ "$PLATFORM_QPA" = "yes" ]; then
6941 echo "Host architecture: $CFG_HOST_ARCH"
6944 if [ -n "$PLATFORM_NOTES" ]; then
6945 echo "Platform notes:"
6946 echo "$PLATFORM_NOTES"
6951 if [ "$OPT_VERBOSE" = "yes" ]; then
6952 echo $ECHO_N "qmake vars .......... $ECHO_C"
6953 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6954 echo "qmake switches ......... $QMAKE_SWITCHES"
6957 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
6958 echo "Build .................. $CFG_BUILD_PARTS"
6959 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6960 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6961 echo "Debug .................. yes (combined)"
6962 if [ "$CFG_DEBUG" = "yes" ]; then
6963 echo "Default Link ........... debug"
6965 echo "Default Link ........... release"
6968 echo "Debug .................. $CFG_DEBUG"
6970 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6971 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6972 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6973 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6974 echo "QtGui module ........... $CFG_GUI"
6975 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6976 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6978 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6980 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6981 echo "STL support ............ $CFG_STL"
6982 echo "PCH support ............ $CFG_PRECOMPILE"
6983 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6984 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6985 echo "AVX..................... ${CFG_AVX}"
6986 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
6987 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6988 echo "NEON support ........... ${CFG_NEON}"
6990 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6991 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6992 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6993 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6994 echo "NIS support ............ $CFG_NIS"
6995 echo "CUPS support ........... $CFG_CUPS"
6996 echo "Iconv support .......... $CFG_ICONV"
6997 echo "Glib support ........... $CFG_GLIB"
6998 echo "GStreamer support ...... $CFG_GSTREAMER"
6999 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
7000 echo "Large File support ..... $CFG_LARGEFILE"
7001 echo "GIF support ............ $CFG_GIF"
7002 if [ "$CFG_JPEG" = "no" ]; then
7003 echo "JPEG support ........... $CFG_JPEG"
7005 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
7007 if [ "$CFG_PNG" = "no" ]; then
7008 echo "PNG support ............ $CFG_PNG"
7010 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
7012 echo "zlib support ........... $CFG_ZLIB"
7013 echo "Session management ..... $CFG_SM"
7015 if [ "$CFG_OPENGL" = "desktop" ]; then
7016 echo "OpenGL support ......... yes (Desktop OpenGL)"
7017 elif [ "$CFG_OPENGL" = "es2" ]; then
7018 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
7020 echo "OpenGL support ......... no"
7022 if [ "$CFG_EGL" != "no" ]; then
7023 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
7024 echo "EGL support ............ yes <GLES/egl.h>"
7026 echo "EGL support ............ yes <EGL/egl.h>"
7029 if [ "$CFG_OPENVG" ]; then
7030 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7031 echo "OpenVG support ......... ShivaVG"
7033 echo "OpenVG support ......... $CFG_OPENVG"
7036 if [ "$PLATFORM_X11" = "yes" ]; then
7037 echo "NAS sound support ...... $CFG_NAS"
7038 echo "XShape support ......... $CFG_XSHAPE"
7039 echo "XVideo support ......... $CFG_XVIDEO"
7040 echo "XSync support .......... $CFG_XSYNC"
7041 echo "Xinerama support ....... $CFG_XINERAMA"
7042 echo "Xcursor support ........ $CFG_XCURSOR"
7043 echo "Xfixes support ......... $CFG_XFIXES"
7044 echo "Xrandr support ......... $CFG_XRANDR"
7045 echo "Xi support ............. $CFG_XINPUT"
7046 echo "MIT-SHM support ........ $CFG_MITSHM"
7047 echo "FontConfig support ..... $CFG_FONTCONFIG"
7048 echo "XKB Support ............ $CFG_XKB"
7049 echo "immodule support ....... $CFG_IM"
7050 echo "GTK theme support ...... $CFG_QGTKSTYLE"
7052 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
7053 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
7054 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
7055 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
7056 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
7057 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
7058 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
7059 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
7060 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
7063 if [ "$CFG_OPENSSL" = "yes" ]; then
7064 OPENSSL_LINKAGE="(run-time)"
7065 elif [ "$CFG_OPENSSL" = "linked" ]; then
7066 OPENSSL_LINKAGE="(linked)"
7068 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
7069 echo "Alsa support ........... $CFG_ALSA"
7070 if [ "$BUILD_ON_MAC" = "yes" ]; then
7071 echo "CoreWlan support ....... $CFG_COREWLAN"
7073 echo "libICU support ......... $CFG_ICU"
7074 echo "PCRE support ........... $CFG_PCRE"
7075 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7076 echo "Xcb support ............ limited (old version)"
7078 echo "Xcb support ............ $CFG_XCB"
7080 echo "Xrender support ........ $CFG_XRENDER"
7081 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
7082 echo "XInput2 support ........ $CFG_XINPUT2"
7086 # complain about not being able to use dynamic plugins if we are using a static build
7087 if [ "$CFG_SHARED" = "no" ]; then
7089 echo "WARNING: Using static linking will disable the use of dynamically"
7090 echo "loaded plugins. Make sure to import all needed static plugins,"
7091 echo "or compile needed modules into the library."
7094 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7096 echo "NOTE: When linking against OpenSSL, you can override the default"
7097 echo "library names through OPENSSL_LIBS."
7099 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
7102 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7104 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
7105 echo "if you want a pure debug build."
7110 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7115 #-------------------------------------------------------------------------------
7116 # build makefiles based on the configuration
7117 #-------------------------------------------------------------------------------
7119 echo "Finding project files. Please wait..."
7120 if [ "$CFG_NOPROCESS" != "yes" ]; then
7121 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7122 if [ -f "${relpath}/qtbase.pro" ]; then
7123 mkfile="${outpath}/Makefile"
7124 [ -f "$mkfile" ] && chmod +w "$mkfile"
7125 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7129 # .projects -> projects to process
7130 # .projects.1 -> qt and moc
7131 # .projects.2 -> subdirs and libs
7132 # .projects.3 -> the rest
7133 rm -f .projects .projects.1 .projects.2 .projects.3
7135 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7136 if [ -z "$AWK" ]; then
7137 for p in `echo $QMAKE_PROJECTS`; do
7138 echo "$p" >> .projects
7141 cat >projects.awk <<EOF
7147 first = "./.projects.1.tmp"
7148 second = "./.projects.2.tmp"
7149 third = "./.projects.3.tmp"
7154 if ( ! target_file )
7156 print input_file >target_file
7161 input_file = FILENAME
7166 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7169 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7170 target_file = second
7175 matched_target == 0 && /^(TEMPLATE.*=)/ {
7176 if ( \$3 == "subdirs" )
7177 target_file = second
7178 else if ( \$3 == "lib" )
7184 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7185 if ( \$0 ~ /plugin/ )
7188 target_file = second
7193 if ( ! target_file )
7195 print input_file >>target_file
7202 for p in `echo $QMAKE_PROJECTS`; do
7203 echo "$p" >> .projects.all
7206 # if you get errors about the length of the command line to awk, change the -l arg
7208 split -l 100 .projects.all .projects.all.
7209 for p in .projects.all.*; do
7210 "$AWK" -f projects.awk `cat $p`
7211 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7212 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7213 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7214 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7216 rm -f .projects.all* projects.awk
7218 [ -f .projects.1 ] && cat .projects.1 >>.projects
7219 [ -f .projects.2 ] && cat .projects.2 >>.projects
7220 rm -f .projects.1 .projects.2
7221 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7222 cat .projects.3 >>.projects
7226 # don't sort Qt and MOC in with the other project files
7227 # also work around a segfaulting uniq(1)
7228 if [ -f .sorted.projects.2 ]; then
7229 sort .sorted.projects.2 > .sorted.projects.2.new
7230 mv -f .sorted.projects.2.new .sorted.projects.2
7231 cat .sorted.projects.2 >> .sorted.projects.1
7233 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7234 rm -f .sorted.projects.2 .sorted.projects.1
7238 if [ -f .projects ]; then
7239 uniq .projects >.tmp
7240 mv -f .tmp .projects
7241 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7243 if [ -f .projects.3 ]; then
7244 uniq .projects.3 >.tmp
7245 mv -f .tmp .projects.3
7246 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7248 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7252 for part in $CFG_BUILD_PARTS; do
7254 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7255 libs) PART_ROOTS="$PART_ROOTS src" ;;
7256 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7257 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7262 if [ "$CFG_DEV" = "yes" ]; then
7263 PART_ROOTS="$PART_ROOTS tests"
7266 echo "Creating makefiles. Please wait..."
7267 for file in .projects .projects.3; do
7268 [ '!' -f "$file" ] && continue
7269 for a in `cat $file`; do
7271 for r in $PART_ROOTS; do
7272 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7277 [ "$IN_ROOT" = "no" ] && continue
7280 *winmain/winmain.pro)
7281 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7285 */qmake/qmake.pro) continue ;;
7286 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
7287 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7293 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7294 test -d "$dir" || mkdir -p "$dir"
7295 OUTDIR="$outpath/$dir"
7296 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7297 # fast configure - the makefile exists, skip it
7298 # since the makefile exists, it was generated by qmake, which means we
7299 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7301 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7304 QMAKE_SPEC_ARGS="-spec $SPEC"
7305 echo $ECHO_N " for $a$ECHO_C"
7307 QMAKE="$outpath/bin/qmake"
7308 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7309 if [ "$file" = ".projects.3" ]; then
7312 cat >"${OUTDIR}/Makefile" <<EOF
7313 # ${OUTDIR}/Makefile: generated by configure
7315 # WARNING: This makefile will be replaced with a real makefile.
7316 # All changes made to this file will be lost.
7318 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7320 cat >>"${OUTDIR}/Makefile" <<EOF
7322 all clean install qmake first Makefile: FORCE
7323 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7331 if [ "$OPT_VERBOSE" = "yes" ]; then
7332 echo " (`basename $SPEC`)"
7333 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7338 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7339 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7343 rm -f .projects .projects.3
7345 #-------------------------------------------------------------------------------
7346 # check for platforms that we don't yet know about
7347 #-------------------------------------------------------------------------------
7348 if [ "$CFG_ARCH" = "generic" ]; then
7351 NOTICE: Atomic operations are not yet supported for this
7354 Qt will use the 'generic' architecture instead, which uses a
7355 single pthread_mutex_t to protect all atomic operations. This
7356 implementation is the slow (but safe) fallback implementation
7357 for architectures Qt does not yet support.
7361 #-------------------------------------------------------------------------------
7362 # check if the user passed the -no-zlib option, which is no longer supported
7363 #-------------------------------------------------------------------------------
7364 if [ -n "$ZLIB_FORCED" ]; then
7365 which_zlib="supplied"
7366 if [ "$CFG_ZLIB" = "system" ]; then
7372 NOTICE: The -no-zlib option was supplied but is no longer
7375 Qt now requires zlib support in all builds, so the -no-zlib
7376 option was ignored. Qt will be built using the $which_zlib
7381 #-------------------------------------------------------------------------------
7382 # finally save the executed command to another script
7383 #-------------------------------------------------------------------------------
7384 if [ `basename $0` != "config.status" ]; then
7385 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7387 # add the system variables
7388 for varname in $SYSTEM_VARIABLES; do
7390 'if [ -n "\$'${varname}'" ]; then
7391 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7396 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7398 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7399 echo "#!/bin/sh" > "$outpath/config.status"
7400 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7401 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7402 echo "else" >> "$outpath/config.status"
7403 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7404 echo "fi" >> "$outpath/config.status"
7405 chmod +x "$outpath/config.status"
7408 if [ -n "$RPATH_MESSAGE" ]; then
7410 echo "$RPATH_MESSAGE"
7413 MAKE=`basename "$MAKE"`
7415 echo Qt is now configured for building. Just run \'$MAKE\'.
7416 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7417 echo Once everything is built, Qt is installed.
7418 echo You should not run \'$MAKE install\'.
7420 echo Once everything is built, you must run \'$MAKE install\'.
7421 echo Qt will be installed into $QT_INSTALL_PREFIX
7424 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.