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
768 CFG_CLOCK_GETTIME=auto
769 CFG_CLOCK_MONOTONIC=auto
778 MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
782 CFG_PREFIX_INSTALL=yes
791 XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
792 XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
796 OPT_CONFIRM_LICENSE=no
810 # initalize variables used for installation
819 QT_INSTALL_TRANSLATIONS=
828 #flags for SQL drivers
836 QT_LFLAGS_ODBC="-lodbc"
839 # flags for libdbus-1
843 # flags for Glib (X11 only)
847 # flags for GStreamer (X11 only)
851 #-------------------------------------------------------------------------------
852 # check SQL drivers, mouse drivers and decorations available in this package
853 #-------------------------------------------------------------------------------
855 # opensource version removes some drivers, so force them to be off
861 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
862 for a in "$relpath/src/plugins/sqldrivers/"*; do
864 base_a=`basename "$a"`
865 CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
866 eval "CFG_SQL_${base_a}=auto"
871 CFG_DECORATION_PLUGIN_AVAILABLE=
872 if [ -d "$relpath/src/plugins/decorations" ]; then
873 for a in "$relpath/src/plugins/decorations/"*; do
875 base_a=`basename "$a"`
876 CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
881 CFG_KBD_PLUGIN_AVAILABLE=
882 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
883 for a in "$relpath/src/plugins/kbddrivers/"*; do
885 base_a=`basename "$a"`
886 CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
891 CFG_MOUSE_PLUGIN_AVAILABLE=
892 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
893 for a in "$relpath/src/plugins/mousedrivers/"*; do
895 base_a=`basename "$a"`
896 CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
901 CFG_GFX_PLUGIN_AVAILABLE=
902 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
903 for a in "$relpath/src/plugins/gfxdrivers/"*; do
905 base_a=`basename "$a"`
906 CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
909 CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
912 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
913 if [ -d "$relpath/src/plugins/imageformats" ]; then
914 for a in "$relpath/src/plugins/imageformats/"*; do
916 base_a=`basename "$a"`
917 CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
922 #-------------------------------------------------------------------------------
923 # parse command line arguments
924 #-------------------------------------------------------------------------------
926 # parse the arguments, setting things to "yes" or "no"
927 while [ "$#" -gt 0 ]; do
931 #Autoconf style options
933 VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
937 VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
941 VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
942 VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
945 VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
949 VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
953 -no-*-*|-plugin-*-*|-qt-*-*)
954 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
955 VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
959 VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
962 #Qt style yes options
963 -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)
964 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
967 #Qt style options that pass an argument
969 if [ "$PLATFORM_QPA" != "yes" ]; then
971 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
975 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
979 -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
980 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
984 #Qt style complex options in one command
985 -enable-*|-disable-*)
986 VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
987 VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
989 #Qt Builtin/System style options
990 -no-*|-system-*|-qt-*)
991 VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
992 VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
994 #Options that cannot be generalized
1001 # this option may or may not be followed by an argument
1002 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1011 # this option may or may not be followed by an argument
1012 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1021 # this option may or may not be followed by an argument
1022 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1030 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1031 # this option may or may not be followed by an argument
1032 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1051 if [ "$1" = "-D" ]; then
1055 VAL=`echo $1 | sed 's,-D,,'`
1060 # this option may or may not be followed by an argument
1061 if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
1070 if [ "$1" = "-I" ]; then
1074 VAL=`echo $1 | sed 's,-I,,'`
1079 if [ "$1" = "-L" ]; then
1083 VAL=`echo $1 | sed 's,-L,,'`
1088 if [ "$1" = "-R" ]; then
1092 VAL=`echo $1 | sed 's,-R,,'`
1097 VAL=`echo $1 | sed 's,-l,,'`
1101 if [ "$1" = "-F" ]; then
1105 VAL=`echo $1 | sed 's,-F,,'`
1110 if [ "$1" = "-fw" ]; then
1114 VAL=`echo $1 | sed 's,-fw,,'`
1122 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
1129 if [ "$UNKNOWN_ARG" = "yes" ]; then
1130 echo "$1: unknown argument"
1141 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1142 CFG_ACCESSIBILITY="$VAL"
1151 CFG_USE_GNUMAKE="$VAL"
1154 CFG_MYSQL_CONFIG="$VAL"
1157 QT_INSTALL_PREFIX="$VAL"
1160 QT_HOST_PREFIX="$VAL"
1169 QT_FORCE_PKGCONFIG=yes
1172 QT_INSTALL_DOCS="$VAL"
1175 QT_INSTALL_HEADERS="$VAL"
1178 QT_INSTALL_PLUGINS="$VAL"
1181 QT_INSTALL_IMPORTS="$VAL"
1184 QT_INSTALL_DATA="$VAL"
1187 QT_INSTALL_LIBS="$VAL"
1196 QT_INSTALL_TRANSLATIONS="$VAL"
1198 sysconfdir|settingsdir)
1199 QT_INSTALL_SETTINGS="$VAL"
1202 QT_INSTALL_EXAMPLES="$VAL"
1205 QT_INSTALL_TESTS="$VAL"
1214 QT_INSTALL_BINS="$VAL"
1224 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1231 if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
1232 [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
1233 [ "$VAL" = "es2" ]; then
1235 if [ "$VAL" = "es2" ]; then
1243 if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1245 if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then
1252 qvfb) # left for commandline compatibility, not documented
1253 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1254 if [ "$VAL" = "yes" ]; then
1255 QMakeVar add gfx-drivers qvfb
1256 QMakeVar add kbd-drivers qvfb
1257 QMakeVar add mouse-drivers qvfb
1258 CFG_GFX_ON="$CFG_GFX_ON qvfb"
1259 CFG_KBD_ON="$CFG_KBD_ON qvfb"
1260 CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
1267 CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
1270 CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
1278 if [ "$BUILD_ON_MAC" = "yes" ]; then
1285 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1286 CFG_MAC_DWARF2="$VAL"
1292 # if this is a Mac then "windows" probably means
1293 # we are cross-compiling for MinGW
1294 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then
1295 CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
1304 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1305 CFG_MAC_HARFBUZZ="$VAL"
1312 if [ "$BUILD_ON_MAC" = "yes" ]; then
1313 CFG_FRAMEWORK="$VAL"
1319 if [ "$VAL" = "yes" ]; then
1321 QMakeVar add QMAKE_CFLAGS -pg
1322 QMakeVar add QMAKE_CXXFLAGS -pg
1323 QMakeVar add QMAKE_LFLAGS -pg
1324 QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
1330 if [ "$VAL" = "yes" ]; then
1331 QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
1334 exceptions|g++-exceptions)
1335 if [ "$VAL" = "no" ]; then
1337 elif [ "$VAL" = "yes" ]; then
1345 # keep compatibility with old platform names
1351 PLATFORM=hpux-acc-o64
1354 PLATFORM=hpux-acc-64
1357 PLATFORM=hpux-acc-64
1369 PLATFORM=reliant-cds-64
1372 PLATFORM=solaris-cc-64
1375 PLATFORM=unixware-cc
1378 PLATFORM=unixware-g++
1381 PLATFORM=unixware-cc
1384 PLATFORM=unixware-g++
1390 i386) NATIVE_64_ARCH="x86_64" ;;
1391 powerpc) NATIVE_64_ARCH="ppc64" ;;
1392 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1394 if [ ! -z "$NATIVE_64_ARCH" ]; then
1395 QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1402 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
1405 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1406 CFG_DEBUG_RELEASE="$VAL"
1412 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1413 CFG_RELEASE_QMAKE="$VAL"
1419 if [ "$VAL" = "yes" ]; then
1421 elif [ "$VAL" = "no" ]; then
1428 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1429 CFG_PREFIX_INSTALL="$VAL"
1437 developer-build|commercial|opensource)
1438 # These switches have been dealt with already
1441 if [ "$VAL" = "yes" ]; then
1443 elif [ "$VAL" = "no" ]; then
1450 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1451 CFG_INCREMENTAL="$VAL"
1457 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1458 CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
1464 FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1465 if [ "$VAL" = "no" ]; then
1466 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
1467 elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
1468 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
1474 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1481 if [ "$VAL" = "no" ]; then
1488 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1496 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1503 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1510 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1517 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1524 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1531 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1538 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1545 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1552 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1553 CFG_PRECOMPILE="$VAL"
1558 separate-debug-info)
1559 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1560 CFG_SEPARATE_DEBUG_INFO="$VAL"
1561 elif [ "$VAL" = "nocopy" ] ; then
1562 CFG_SEPARATE_DEBUG_INFO="yes"
1563 CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
1569 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1570 CFG_REDUCE_EXPORTS="$VAL"
1576 if [ "$VAL" = "no" ]; then
1583 if [ "$VAL" = "no" ]; then
1590 if [ "$VAL" = "no" ]; then
1597 if [ "$VAL" = "no" ]; then
1604 if [ "$VAL" = "no" ]; then
1611 if [ "$VAL" = "no" ]; then
1618 if [ "$VAL" = "no" ]; then
1625 if [ "$VAL" = "no" ]; then
1632 if [ "$VAL" = "no" ]; then
1642 if [ "$VAL" = "no" ]; then
1649 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1650 CFG_REDUCE_RELOCATIONS="$VAL"
1656 [ "$VAL" = "qt" ] && VAL=yes
1657 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1662 # No longer supported:
1663 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1666 if [ "$VAL" = "system" ]; then
1673 [ "$VAL" = "yes" ] && VAL=qt
1674 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1681 [ "$VAL" = "yes" ] && VAL=qt
1682 if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
1689 if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
1696 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1703 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1710 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
1717 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1724 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1731 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1732 CFG_FONTCONFIG="$VAL"
1738 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1745 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1752 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1759 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1766 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1773 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1780 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1787 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1794 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1795 CFG_GSTREAMER="$VAL"
1801 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1802 CFG_QGTKSTYLE="$VAL"
1808 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
1811 if [ "$VAL" = "no" ]; then
1819 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
1821 elif [ "$VAL" = "runtime" ]; then
1828 if [ "$VAL" = "yes" ]; then
1835 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1842 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1843 CFG_LARGEFILE="$VAL"
1849 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
1856 if [ "$VAL" = "yes" ]; then
1857 CFG_OPENSSL="linked"
1863 if [ "$VAL" = "yes" ]; then
1864 CFG_DECLARATIVE_DEBUG="yes"
1866 if [ "$VAL" = "no" ]; then
1867 CFG_DECLARATIVE_DEBUG="no"
1874 if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
1875 CFG_JAVASCRIPTCORE_JIT="$VAL"
1881 if [ "$VAL" = "yes" ]; then
1882 OPT_CONFIRM_LICENSE="$VAL"
1888 if [ "$VAL" = "yes" ]; then
1894 sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*)
1895 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1896 # if autoconf style options were used, $VAL can be "yes" or "no"
1897 [ "$VAL" = "yes" ] && VAL=qt
1898 # now $VAL should be "no", "qt", or "plugin"... double-check
1899 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1902 # now $VAL is "no", "qt", or "plugin"
1904 VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1905 VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1907 # Grab the available values
1910 avail="$CFG_SQL_AVAILABLE"
1913 avail="$CFG_GFX_AVAILABLE"
1914 if [ "$OPT" = "plugin" ]; then
1915 avail="$CFG_GFX_PLUGIN_AVAILABLE"
1919 avail="$CFG_DECORATION_AVAILABLE"
1920 if [ "$OPT" = "plugin" ]; then
1921 avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
1925 avail="$CFG_KBD_AVAILABLE"
1926 if [ "$OPT" = "plugin" ]; then
1927 avail="$CFG_KBD_PLUGIN_AVAILABLE"
1931 avail="$CFG_MOUSE_AVAILABLE"
1932 if [ "$OPT" = "plugin" ]; then
1933 avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
1937 avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
1938 if [ "$OPT" != "plugin" ]; then
1939 # png is always built in
1945 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1949 # Check that that user's value is available.
1952 if [ "$VAL" = "$d" ]; then
1957 [ "$found" = yes ] || ERROR=yes
1959 if [ "$VAR" = "sql" ]; then
1960 # set the CFG_SQL_driver
1961 eval "CFG_SQL_$VAL=\$OPT"
1963 elif [ "$VAR" = "imageformat" ]; then
1964 [ "$OPT" = "qt" ] && OPT=yes
1965 VAL="`echo $VAL |tr a-z A-Z`"
1966 eval "CFG_$VAL=$OPT"
1970 if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
1971 if [ "$OPT" = "plugin" ]; then
1972 [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
1973 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1974 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1975 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1976 [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
1977 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1978 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1979 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1982 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
1983 [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
1984 [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
1985 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
1986 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
1990 QMakeVar add "${VAR}s" "${VAL}"
1991 elif [ "$OPT" = "no" ]; then
1992 PLUG_VAR="${VAR}-plugin"
1993 if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
1994 IN_VAR="${VAR}-driver"
1998 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
1999 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2000 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2001 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2002 QMakeVar del "${IN_VAR}s" "$VAL"
2003 QMakeVar del "${PLUG_VAR}s" "$VAL"
2005 if [ "$ERROR" = "yes" ]; then
2006 echo "$CURRENT_OPT: unknown argument"
2011 if [ "$VAL" = "yes" ]; then
2012 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2013 QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
2017 elif [ "$VAL" = "no" ]; then
2018 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
2019 QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2028 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2035 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2042 D_FLAGS="$D_FLAGS \"$VAL\""
2045 I_FLAGS="$I_FLAGS -I\"${VAL}\""
2048 L_FLAGS="$L_FLAGS -L\"${VAL}\""
2051 RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
2054 l_FLAGS="$l_FLAGS -l\"${VAL}\""
2057 if [ "$BUILD_ON_MAC" = "yes" ]; then
2058 L_FLAGS="$L_FLAGS -F\"${VAL}\""
2059 I_FLAGS="$I_FLAGS -F\"${VAL}\""
2065 if [ "$BUILD_ON_MAC" = "yes" ]; then
2066 l_FLAGS="$l_FLAGS -framework \"${VAL}\""
2072 W_FLAGS="$W_FLAGS \"${VAL}\""
2078 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2079 CFG_PHONON_BACKEND="$VAL"
2091 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2092 CFG_AUDIO_BACKEND="$VAL"
2098 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2105 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
2106 CFG_FORCE_ASSERTS="$VAL"
2112 if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
2122 if [ "$UNKNOWN_OPT" = "yes" ]; then
2123 echo "${CURRENT_OPT}: invalid command-line switch"
2129 # update QT_CONFIG to show our current predefined configuration
2130 case "$CFG_QCONFIG" in
2131 minimal|small|medium|large|full)
2132 # these are a sequence of increasing functionality
2133 for c in minimal small medium large full; do
2134 QT_CONFIG="$QT_CONFIG $c-config"
2135 [ "$CFG_QCONFIG" = $c ] && break
2139 # not known to be sufficient for anything
2140 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ] && [ '!' -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
2141 echo >&2 "Error: configuration file not found:"
2142 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2144 echo >&2 " `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"`"
2149 #-------------------------------------------------------------------------------
2150 # build tree initialization
2151 #-------------------------------------------------------------------------------
2153 # where to find which..
2154 unixtests="$relpath/config.tests/unix"
2155 mactests="$relpath/config.tests/mac"
2156 WHICH="$unixtests/which.test"
2158 PERL=`$WHICH perl 2>/dev/null`
2160 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2162 for e in gawk nawk awk; do
2163 if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
2170 PERL="/usr/bin/perl"
2171 if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then
2175 ### skip this if the user just needs help...
2176 if [ "$OPT_HELP" != "yes" ]; then
2178 # is this a shadow build?
2179 if [ "$OPT_SHADOW" = "maybe" ]; then
2181 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2182 if [ -h "$outpath" ]; then
2183 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
2189 if [ "$OPT_SHADOW" = "yes" ]; then
2190 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2191 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2192 echo >&2 "Cannot proceed."
2195 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2198 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2200 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2201 echo "Qt can be built in release mode with separate debug information, so"
2202 echo "-debug-and-release is not necessary anymore"
2206 if [ "$CFG_SILENT" = "yes" ]; then
2207 QMAKE_CONFIG="$QMAKE_CONFIG silent"
2210 # if the source tree is different from the build tree,
2211 # symlink or copy part of the sources
2212 if [ "$OPT_SHADOW" = "yes" ]; then
2213 echo "Preparing build tree..."
2215 if [ -z "$PERL" ]; then
2217 echo "You need perl in your PATH to make a shadow build."
2218 echo "Cannot proceed."
2222 [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
2224 # symlink the qmake directory
2225 find "$relpath/qmake" | while read a; do
2226 my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2227 if [ '!' -f "$my_a" ]; then
2228 if [ -d "$a" ]; then
2229 # directories are created...
2232 a_dir=`dirname "$my_a"`
2233 [ -d "$a_dir" ] || mkdir -p "$a_dir"
2234 # ... and files are symlinked
2235 case `basename "$a"` in
2236 *.o|*.d|GNUmakefile*|qmake)
2247 # make a syncqt script that can be used in the shadow
2248 rm -f "$outpath/bin/syncqt"
2249 if [ -x "$relpath/bin/syncqt" ]; then
2250 mkdir -p "$outpath/bin"
2251 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2252 echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2253 chmod 755 "$outpath/bin/syncqt"
2256 for i in elf2e32_qtwrapper createpackage patch_capabilities qtmodule-configtests; do
2257 rm -f "$outpath/bin/$i"
2258 if [ -x "$relpath/bin/$i" ]; then
2259 mkdir -p "$outpath/bin"
2260 echo "#!/bin/sh" >"$outpath/bin/$i"
2261 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/$i"
2262 echo "\"$relpath/bin/$i\" \"\$@\"" >>"$outpath/bin/$i"
2263 chmod 755 "$outpath/bin/$i"
2267 # symlink the mkspecs directory
2268 mkdir -p "$outpath/mkspecs"
2269 rm -rf "$outpath"/mkspecs/*
2270 ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
2271 rm -f "$outpath/mkspecs/default"
2275 rm -rf "$outpath/mkspecs/$1"
2276 find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
2277 find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
2280 # Special case for mkspecs/features directory.
2281 # To be able to place .prf files into a shadow build directory,
2282 # we're creating links for files only. The directory structure is reproduced.
2283 ShadowMkspecs features
2285 # The modules dir is special, too.
2286 ShadowMkspecs modules
2288 # symlink the doc directory
2289 rm -rf "$outpath/doc"
2290 ln -s "$relpath/doc" "$outpath/doc"
2293 # symlink fonts to be able to run application from build directory
2294 if [ "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
2295 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2296 mkdir -p "${outpath}/lib"
2297 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2301 if [ "$OPT_FAST" = "auto" ]; then
2302 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2309 # find a make command
2310 if [ -z "$MAKE" ]; then
2312 for mk in gmake make; do
2313 if "$WHICH" $mk >/dev/null 2>&1; then
2318 if [ -z "$MAKE" ]; then
2319 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2320 echo >&2 "Cannot proceed."
2323 # export MAKE, we need it later in the config.tests
2329 #-------------------------------------------------------------------------------
2330 # auto-detect all that hasn't been specified in the arguments
2331 #-------------------------------------------------------------------------------
2333 if [ -z "$PLATFORM" ]; then
2335 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2337 if [ "$PLATFORM_QPA" = "yes" ]; then
2338 OSX_VERSION=`uname -r | cut -d. -f1`
2339 if [ "$OSX_VERSION" -ge 11 ]; then
2340 # We're on Lion or above. Check if we have a supported Clang version
2341 case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
2344 PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
2359 #PLATFORM=aix-g++-64
2361 #PLATFORM=aix-xlc-64
2363 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2373 # PLATFORM=dynix-g++
2379 PLATFORM=freebsd-g++
2381 - Also available for FreeBSD: freebsd-icc
2385 PLATFORM=openbsd-g++
2396 #PLATFORM=irix-cc-64
2398 - Also available for IRIX: irix-g++ irix-cc-64
2402 case "$UNAME_MACHINE" in
2404 #PLATFORM=hpuxi-acc-32
2405 PLATFORM=hpuxi-acc-64
2407 - Also available for HP-UXi: hpuxi-acc-32
2413 #PLATFORM=hpux-acc-64
2415 #PLATFORM=hpux-acc-o64
2417 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2426 - Also available for Tru64: tru64-g++
2430 case "$UNAME_MACHINE" in
2432 PLATFORM=linux-g++-64
2439 - Also available for Linux: linux-kcc linux-icc linux-cxx
2443 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2444 PLATFORM="solaris-g++"
2446 #PLATFORM=solaris-g++
2448 #PLATFORM=solaris-cc64
2451 - Also available for Solaris: solaris-g++ solaris-cc-64
2454 ReliantUNIX-*:*|SINIX-*:*)
2455 PLATFORM=reliant-cds
2456 #PLATFORM=reliant-cds-64
2458 - Also available for Reliant UNIX: reliant-cds-64
2468 #PLATFORM=unixware-g++
2469 PLATFORM=unixware-cc
2471 - Also available for OpenUNIX: unixware-g++
2475 #PLATFORM=unixware-g++
2476 PLATFORM=unixware-cc
2478 - Also available for UnixWare: unixware-g++
2485 - Also available for SCO OpenServer: sco-g++
2489 PLATFORM=unixware-g++
2492 PLATFORM=unsupported/qnx-g++
2495 if [ "$OPT_HELP" != "yes" ]; then
2497 for p in $PLATFORMS; do
2498 echo " $relconf $* -platform $p"
2501 echo " The build script does not currently recognize all" >&2
2502 echo " platforms supported by Qt." >&2
2503 echo " Rerun this script with a -platform option listed to" >&2
2504 echo " set the system/compiler combination you use." >&2
2511 PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2513 [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
2515 case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
2516 case "$XPLATFORM" in linux-g++-maemo) XPLATFORM_MAEMO=yes;; esac
2518 if [ -d "$PLATFORM" ]; then
2519 QMAKESPEC="$PLATFORM"
2521 QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
2523 if [ -d "$XPLATFORM" ]; then
2524 XQMAKESPEC="$XPLATFORM"
2526 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
2528 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2529 QT_CROSS_COMPILE=yes
2530 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
2531 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
2534 if [ "$BUILD_ON_MAC" = "yes" ]; then
2535 if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2537 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2538 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2539 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2540 echo " built with 'macx-g++'" >&2
2546 # check specified platforms are supported
2547 if [ '!' -d "$QMAKESPEC" ]; then
2549 echo " The specified system/compiler is not supported:"
2553 echo " Please see the README file for a complete list."
2557 if [ '!' -d "$XQMAKESPEC" ]; then
2559 echo " The specified system/compiler is not supported:"
2563 echo " Please see the README file for a complete list."
2567 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2569 echo " The specified system/compiler port is not complete:"
2571 echo " $XQMAKESPEC/qplatformdefs.h"
2573 echo " Please contact qt-info@nokia.com."
2578 # now look at the configs and figure out what platform we are config'd for
2579 [ "$PLATFORM_QPA" != "yes" ] \
2580 && [ -n "`getXQMakeConf QMAKE_LIBS_X11`" ] \
2582 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2584 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2585 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2586 if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
2587 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2588 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2592 #-------------------------------------------------------------------------------
2593 # determine the system architecture
2594 #-------------------------------------------------------------------------------
2595 if [ "$OPT_VERBOSE" = "yes" ]; then
2596 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2599 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2600 case `basename "$XPLATFORM"` in
2603 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2605 echo "Please contact qt-info@nokia.com to upgrade your license to"
2606 echo "include this platform, or install the Qt Open Source Edition"
2607 echo "if you intend to develop free software."
2613 if [ -z "${CFG_HOST_ARCH}" ]; then
2614 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2616 CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'`
2617 case "$CFG_HOST_ARCH" in
2622 if [ "$OPT_VERBOSE" = "yes" ]; then
2623 echo " GNU/Hurd ($CFG_HOST_ARCH)"
2627 CFG_HOST_ARCH=`uname -p`
2628 if [ "$OPT_VERBOSE" = "yes" ]; then
2629 echo " SGI ($CFG_HOST_ARCH)"
2633 case "$UNAME_MACHINE" in
2635 if [ "$OPT_VERBOSE" = "yes" ]; then
2636 echo " Sun SPARC (sparc)"
2643 if [ "$OPT_VERBOSE" = "yes" ]; then
2644 echo " 64-bit AMD 80x86 (x86_64)"
2646 CFG_HOST_ARCH=x86_64
2649 if [ "$OPT_VERBOSE" = "yes" ]; then
2650 echo " 32-bit Intel 80x86 (i386)"
2658 if [ "$OPT_VERBOSE" = "yes" ]; then
2659 echo " 64-bit IBM PowerPC (powerpc)"
2661 CFG_HOST_ARCH=powerpc
2664 if [ "$OPT_VERBOSE" = "yes" ]; then
2665 echo " HP PA-RISC (parisc)"
2667 CFG_HOST_ARCH=parisc
2670 if [ "$OPT_VERBOSE" = "yes" ]; then
2671 echo " 32-bit Intel 80x86 (i386)"
2675 *:*:x86_64|*:*:amd64)
2676 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2677 if [ "$OPT_VERBOSE" = "yes" ]; then
2678 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2682 if [ "$OPT_VERBOSE" = "yes" ]; then
2683 echo " 64-bit AMD 80x86 (x86_64)"
2685 CFG_HOST_ARCH=x86_64
2689 if [ "$OPT_VERBOSE" = "yes" ]; then
2690 echo " 32-bit PowerPC (powerpc)"
2692 CFG_HOST_ARCH=powerpc
2695 if [ "$OPT_VERBOSE" = "yes" ]; then
2696 echo " 64-bit PowerPC (powerpc)"
2698 CFG_HOST_ARCH=powerpc
2701 if [ "$OPT_VERBOSE" = "yes" ]; then
2702 echo " IBM S/390 (s390)"
2707 if [ "$OPT_VERBOSE" = "yes" ]; then
2713 if [ "$OPT_VERBOSE" = "yes" ]; then
2714 echo " Linux on SPARC"
2719 case "$UNAME_MACHINE" in
2721 if [ "$OPT_VERBOSE" = "yes" ]; then
2722 echo " QNX on Intel 80x86 (i386)"
2729 if [ "$OPT_VERBOSE" = "yes" ]; then
2730 echo " Trying '$UNAME_MACHINE'..."
2732 CFG_HOST_ARCH="$UNAME_MACHINE"
2737 if [ "$XPLATFORM_MINGW" = "yes" ]; then
2738 [ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
2739 elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
2740 CFG_ARCH=$CFG_HOST_ARCH
2747 # previously, armv6 was a different arch
2753 if [ "$OPT_VERBOSE" = "yes" ]; then
2754 echo "System architecture: '$CFG_ARCH'"
2755 if [ "$PLATFORM_QPA" = "yes" ]; then
2756 echo "Host architecture: '$CFG_HOST_ARCH'"
2760 #-------------------------------------------------------------------------------
2761 # tests that don't need qmake (must be run before displaying help)
2762 #-------------------------------------------------------------------------------
2764 # detect build style
2765 if [ "$CFG_DEBUG" = "auto" ]; then
2766 if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
2767 CFG_DEBUG_RELEASE=yes
2769 elif [ "$CFG_DEV" = "yes" ]; then
2770 CFG_DEBUG_RELEASE=no
2773 CFG_DEBUG_RELEASE=no
2777 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2778 QT_CONFIG="$QT_CONFIG build_all"
2781 if [ -z "$PKG_CONFIG" ]; then
2782 # See if PKG_CONFIG is set in the mkspec:
2783 PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
2785 if [ -z "$PKG_CONFIG" ]; then
2786 PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
2789 # Work out if we can use pkg-config
2790 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2791 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2793 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2794 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2795 echo >&2 "environment!"
2797 if [ -z "$PKG_CONFIG_PATH" ]; then
2799 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2800 echo >&2 "the host compiler's .pc files will be used. This is probably"
2801 echo >&2 "not what you want."
2803 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2805 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2806 echo >&2 "been set. This means your toolchain's .pc files must contain"
2807 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2808 echo >&2 "tests are failing, please check these files."
2813 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2814 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2815 echo >&2 "dependencies"
2821 if [ ! -n "$PKG_CONFIG" ]; then
2822 QT_CONFIG="$QT_CONFIG no-pkg-config"
2825 # pass on $CFG_SDK to the configure tests.
2826 if [ '!' -z "$CFG_SDK" ]; then
2827 MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2830 # find the default framework value
2831 if [ "$BUILD_ON_MAC" = "yes" ]; then
2832 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2833 CFG_FRAMEWORK="$CFG_SHARED"
2834 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2836 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2844 QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
2846 TEST_COMPILER=$QMAKE_CONF_COMPILER
2847 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
2848 if [ -z "$TEST_COMPILER" ]; then
2849 echo "ERROR: Cannot set the compiler for the configuration tests"
2855 if [ -n "$CFG_SYSROOT" ]; then
2856 if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
2857 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
2858 SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
2860 echo >&2 "The compiler doesn't support the --sysroot flag, I can't set the sysroot"
2864 export SYSROOT_FLAG # used by config.tests/unix/compile.test
2866 # auto-detect precompiled header support
2867 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2868 if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2875 #auto-detect DWARF2 on the mac
2876 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2877 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2884 # don't autodetect support for separate debug info on objcopy when
2885 # cross-compiling as lots of toolchains seems to have problems with this
2886 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2887 CFG_SEPARATE_DEBUG_INFO="no"
2890 # auto-detect support for separate debug info in objcopy
2891 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2892 TEST_COMPILER_CFLAGS=`getXQMakeConf QMAKE_CFLAGS`
2893 TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
2894 TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY`
2895 COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
2896 COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
2897 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
2898 CFG_SEPARATE_DEBUG_INFO=no
2902 # binutils on HP-UX is buggy; default to no.
2903 CFG_SEPARATE_DEBUG_INFO=no
2906 CFG_SEPARATE_DEBUG_INFO=yes
2912 # auto-detect -fvisibility support
2913 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
2914 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2915 CFG_REDUCE_EXPORTS=no
2917 CFG_REDUCE_EXPORTS=yes
2921 # detect the availability of the -Bsymbolic-functions linker optimization
2922 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
2923 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2924 CFG_REDUCE_RELOCATIONS=no
2926 CFG_REDUCE_RELOCATIONS=yes
2930 # auto-detect GNU make support
2931 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
2935 # find the default framework value
2936 if [ "$BUILD_ON_MAC" = "yes" ]; then
2937 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2938 CFG_FRAMEWORK="$CFG_SHARED"
2939 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2941 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2949 # x11 tests are done after qmake is built
2952 #setup the build parts
2953 if [ -z "$CFG_BUILD_PARTS" ]; then
2954 CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
2956 # don't build tools by default when cross-compiling
2957 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2958 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
2961 for nobuild in $CFG_NOBUILD_PARTS; do
2962 CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
2964 if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
2966 # echo "WARNING: libs is a required part of the build."
2968 CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
2971 #-------------------------------------------------------------------------------
2972 # post process QT_INSTALL_* variables
2973 #-------------------------------------------------------------------------------
2975 if [ -z "$QT_INSTALL_PREFIX" ]; then
2976 if [ "$CFG_DEV" = "yes" ]; then
2977 QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
2979 QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
2982 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
2984 if [ -z "$QT_INSTALL_DOCS" ]; then #default
2985 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2986 if [ "$BUILD_ON_MAC" = "yes" ]; then
2987 QT_INSTALL_DOCS="/Developer/Documentation/Qt"
2990 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
2993 QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
2995 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
2996 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
2997 if [ "$BUILD_ON_MAC" = "yes" ]; then
2998 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3003 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
3006 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3008 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3009 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3010 if [ "$BUILD_ON_MAC" = "yes" ]; then
3011 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3012 QT_INSTALL_LIBS="/Libraries/Frameworks"
3016 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
3018 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3020 if [ -z "$QT_INSTALL_BINS" ]; then #default
3021 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3022 if [ "$BUILD_ON_MAC" = "yes" ]; then
3023 QT_INSTALL_BINS="/Developer/Applications/Qt"
3026 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
3028 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3030 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3031 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3032 if [ "$BUILD_ON_MAC" = "yes" ]; then
3033 QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
3036 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
3038 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3040 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
3041 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3042 if [ "$BUILD_ON_MAC" = "yes" ]; then
3043 QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
3046 [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
3048 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
3050 if [ -z "$QT_INSTALL_DATA" ]; then #default
3051 QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
3053 QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3055 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3056 QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
3058 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3060 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3061 if [ "$BUILD_ON_MAC" = "yes" ]; then
3062 QT_INSTALL_SETTINGS=/Library/Preferences/Qt
3064 QT_INSTALL_SETTINGS=/etc/xdg
3067 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3069 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3070 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3071 if [ "$BUILD_ON_MAC" = "yes" ]; then
3072 QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
3075 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
3077 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3080 if [ -z "$QT_INSTALL_TESTS" ]; then #default
3081 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3082 if [ "$BUILD_ON_MAC" = "yes" ]; then
3083 QT_INSTALL_TESTS="/Developer/Tests/Qt"
3086 [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
3088 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
3090 #------- host paths --------
3092 if [ -z "$QT_HOST_PREFIX" ]; then
3093 QT_HOST_PREFIX=$QT_INSTALL_PREFIX
3096 QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
3100 if [ -z "$QT_HOST_BINS" ]; then #default
3102 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3103 if [ "$BUILD_ON_MAC" = "yes" ]; then
3104 QT_HOST_BINS="/Developer/Applications/Qt"
3107 [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
3109 QT_HOST_BINS="$QT_INSTALL_BINS"
3112 QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
3114 if [ -z "$QT_HOST_DATA" ]; then #default
3116 QT_HOST_DATA="$QT_HOST_PREFIX"
3118 QT_HOST_DATA="$QT_INSTALL_DATA"
3121 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
3124 #-------------------------------------------------------------------------------
3125 # help - interactive parts of the script _after_ this section please
3126 #-------------------------------------------------------------------------------
3128 # next, emit a usage message if something failed.
3129 if [ "$OPT_HELP" = "yes" ]; then
3130 [ "x$ERROR" = "xyes" ] && echo
3131 if [ "$CFG_NIS" = "no" ]; then
3138 if [ "$CFG_CUPS" = "no" ]; then
3145 if [ "$CFG_ICONV" = "no" ]; then
3152 if [ "$CFG_LARGEFILE" = "no" ]; then
3159 if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
3166 if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
3174 if [ "$CFG_XCB" = "no" ]; then
3182 if [ "$CFG_WAYLAND" = "no" ]; then
3189 if [ "$CFG_XINPUT2" = "no" ]; then
3198 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3199 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-importdir <dir>] [-datadir <dir>]
3200 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>] [-testsdir <dir>]
3201 [-release] [-debug] [-debug-and-release]
3202 [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3203 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3204 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3205 [-plugin-sql-<driver>] [-system-sqlite]
3206 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3207 [-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng] [-qt-libpng] [-system-libpng]
3208 [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3209 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3210 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3211 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
3212 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3213 [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
3214 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info]
3215 [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend]
3216 [-no-audio-backend] [-audio-backend]
3217 [-no-javascript-jit] [-javascript-jit] [-no-declarative-debug] [-declarative-debug]
3218 [-no-optimized-qmake] [-optimized-qmake]
3219 [-no-openssl] [-openssl] [-openssl-linked]
3220 [-no-gtkstyle] [-gtkstyle]
3221 [-qt-pcre] [-system-pcre]
3222 [additional platform specific options (see below)]
3225 Installation options:
3227 -qpa ................ This will enable the QPA build.
3228 QPA is a window system agnostic implementation of Qt.
3230 These are optional, but you may specify install directories.
3232 -prefix <dir> ...... This will install everything relative to <dir>
3233 (default $QT_INSTALL_PREFIX)
3235 if [ "$PLATFORM_QPA" = "yes" ]; then
3238 -hostprefix [dir] .. Tools and libraries needed when developing
3239 applications are installed in [dir]. If [dir] is
3240 not given, the current build directory will be used.
3246 * -prefix-install .... Force a sandboxed "local" installation of
3247 Qt. This will install into
3248 $QT_INSTALL_PREFIX, if this option is
3249 disabled then some platforms will attempt a
3250 "system" install by placing default values to
3251 be placed in a system location other than
3254 You may use these to separate different parts of the install:
3256 -bindir <dir> ......... Executables will be installed to <dir>
3257 (default PREFIX/bin)
3258 -libdir <dir> ......... Libraries will be installed to <dir>
3259 (default PREFIX/lib)
3260 -docdir <dir> ......... Documentation will be installed to <dir>
3261 (default PREFIX/doc)
3262 -headerdir <dir> ...... Headers will be installed to <dir>
3263 (default PREFIX/include)
3264 -plugindir <dir> ...... Plugins will be installed to <dir>
3265 (default PREFIX/plugins)
3266 -importdir <dir> ...... Imports for QML will be installed to <dir>
3267 (default PREFIX/imports)
3268 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3270 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3271 (default PREFIX/translations)
3272 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3273 (default PREFIX/etc/settings)
3274 -examplesdir <dir> .... Examples will be installed to <dir>
3275 (default PREFIX/examples)
3276 -testsdir <dir> ....... Tests will be installed to <dir>
3277 (default PREFIX/tests)
3279 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3282 -hostbindir <dir> .. Host executables will be installed to <dir>
3283 (default HOSTPREFIX/bin)
3284 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
3285 (default HOSTPREFIX)
3292 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3293 that needs to be evaluated. If the evaluation succeeds, the feature is
3294 included. Here is a short explanation of each option:
3296 * -release ........... Compile and link Qt with debugging turned off.
3297 -debug ............. Compile and link Qt with debugging turned on.
3298 -debug-and-release . Compile and link two versions of Qt, with and without
3299 debugging turned on (Mac only).
3301 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
3303 -opensource ........ Compile and link the Open-Source Edition of Qt.
3304 -commercial ........ Compile and link the Commercial Edition of Qt.
3307 * -shared ............ Create and use shared Qt libraries.
3308 -static ............ Create and use static Qt libraries.
3310 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3312 -fast .............. Configure Qt quickly by generating Makefiles only for
3313 library and subdirectory targets. All other Makefiles
3314 are created as wrappers, which will in turn run qmake.
3316 -no-largefile ...... Disables large file support.
3317 + -largefile ......... Enables Qt to access files larger than 4 GB.
3320 if [ "$PLATFORM_QPA" = "yes" ]; then
3327 if [ "$CFG_DBUS" = "no" ]; then
3336 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3337 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3339 -no-accessibility .. Do not compile Accessibility support.
3340 * -accessibility ..... Compile Accessibility support.
3342 $SHN -no-stl ............ Do not compile STL support.
3343 $SHY -stl ............... Compile STL support.
3345 -no-sql-<driver> ... Disable SQL <driver> entirely.
3346 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3348 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3351 Possible values for <driver>:
3352 [ $CFG_SQL_AVAILABLE ]
3354 -system-sqlite ..... Use sqlite from the operating system.
3356 -no-phonon-backend.. Do not build the platform phonon plugin.
3357 + -phonon-backend..... Build the platform phonon plugin.
3359 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3360 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3362 -no-declarative-debug ..... Do not build the declarative debugging support.
3363 + -declarative-debug ....... Build the declarative debugging support.
3365 -platform target ... The operating system and compiler you are building
3368 See the README file for a list of supported
3369 operating systems and compilers.
3372 if [ "${PLATFORM_QPA}" != "yes" ]; then
3374 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3375 raster - Software rasterizer
3376 opengl - Rendering via OpenGL, Experimental!
3377 openvg - Rendering via OpenVG, Experimental!
3384 -no-mmx ............ Do not compile with use of MMX instructions.
3385 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3386 -no-sse ............ Do not compile with use of SSE instructions.
3387 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3388 -no-sse3 ........... Do not compile with use of SSE3 instructions.
3389 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.
3390 -no-sse4.1.......... Do not compile with use of SSE4.1 instructions.
3391 -no-sse4.2.......... Do not compile with use of SSE4.2 instructions.
3392 -no-avx ............ Do not compile with use of AVX instructions.
3393 -no-neon ........... Do not compile with use of NEON instructions.
3395 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3396 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3398 -testcocoon Instrument Qt with the TestCocoon code coverage tool.
3400 -D <string> ........ Add an explicit define to the preprocessor.
3401 -I <string> ........ Add an explicit include path.
3402 -L <string> ........ Add an explicit library path.
3404 -help, -h .......... Display this information.
3406 Third Party Libraries:
3408 -qt-zlib ........... Use the zlib bundled with Qt.
3409 + -system-zlib ....... Use zlib from the operating system.
3410 See http://www.gzip.org/zlib
3412 -no-gif ............ Do not compile GIF reading support.
3414 -no-libpng ......... Do not compile PNG support.
3415 -qt-libpng ......... Use the libpng bundled with Qt.
3416 + -system-libpng ..... Use libpng from the operating system.
3417 See http://www.libpng.org/pub/png
3419 -no-libjpeg ........ Do not compile JPEG support.
3420 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3421 + -system-libjpeg .... Use libjpeg from the operating system.
3422 See http://www.ijg.org
3424 -no-openssl ........ Do not compile support for OpenSSL.
3425 + -openssl ........... Enable run-time OpenSSL support.
3426 -openssl-linked .... Enabled linked OpenSSL support.
3428 -qt-pcre ........... Use the PCRE library bundled with Qt.
3429 + -system-pcre ....... Use the PCRE library from the operating system.
3433 -make <part> ....... Add part to the list of parts to be built at make time.
3434 ($QT_DEFAULT_BUILD_PARTS)
3435 -nomake <part> ..... Exclude part from the list of parts to be built.
3437 -R <string> ........ Add an explicit runtime library path to the Qt
3439 -l <string> ........ Add an explicit library.
3441 -no-rpath .......... Do not use the library install path as a runtime
3443 + -rpath ............. Link Qt libraries and executables using the library
3444 install path as a runtime library path. Equivalent
3445 to -R install_libpath
3447 -continue .......... Continue as far as possible if an error occurs.
3449 -verbose, -v ....... Print verbose information about each step of the
3452 -silent ............ Reduce the build output so that warnings and errors
3453 can be seen more easily.
3455 * -no-optimized-qmake ... Do not build qmake optimized.
3456 -optimized-qmake ...... Build qmake optimized.
3458 -no-gui ............ Don't build the Qt GUI library
3460 $NSN -no-nis ............ Do not compile NIS support.
3461 $NSY -nis ............... Compile NIS support.
3463 $CUN -no-cups ........... Do not compile CUPS support.
3464 $CUY -cups .............. Compile CUPS support.
3465 Requires cups/cups.h and libcups.so.2.
3467 $CIN -no-iconv .......... Do not compile support for iconv(3).
3468 $CIY -iconv ............. Compile support for iconv(3).
3470 $PHN -no-pch ............ Do not use precompiled header support.
3471 $PHY -pch ............... Use precompiled header support.
3473 $DBN -no-dbus ........... Do not compile the QtDBus module.
3474 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3475 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3477 -reduce-relocations ..... Reduce relocations in the libraries through extra
3478 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3479 experimental; needs GNU ld >= 2.18).
3481 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
3485 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3486 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3493 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3501 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
3505 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3506 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3508 $XCBN -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
3509 $XCBY -xcb ............... Compile Xcb support.
3511 $XWN -no-wayland......... Do not compile Wayland support.
3512 $XWY -wayland .......... Compile Wayland support.
3518 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
3522 $X2N -no-xinput2......... Do not compile XInput2 support.
3523 $X2Y -xinput2............ Compile XInput2 support.
3529 if [ "$PLATFORM_X11" = "yes" ]; then
3530 if [ "$CFG_SM" = "no" ]; then
3537 if [ "$CFG_XSHAPE" = "no" ]; then
3544 if [ "$CFG_XVIDEO" = "no" ]; then
3551 if [ "$CFG_XINERAMA" = "no" ]; then
3558 if [ "$CFG_FONTCONFIG" = "no" ]; then
3565 if [ "$CFG_XCURSOR" = "no" ]; then
3572 if [ "$CFG_XFIXES" = "no" ]; then
3579 if [ "$CFG_XRANDR" = "no" ]; then
3586 if [ "$CFG_XRENDER" = "no" ]; then
3593 if [ "$CFG_MITSHM" = "no" ]; then
3600 if [ "$CFG_XINPUT" = "no" ]; then
3607 if [ "$CFG_XKB" = "no" ]; then
3614 if [ "$CFG_IM" = "no" ]; then
3625 -no-gtkstyle ....... Do not build the GTK theme integration.
3626 + -gtkstyle .......... Build the GTK theme integration.
3628 * -no-nas-sound ...... Do not compile in NAS sound support.
3629 -system-nas-sound .. Use NAS libaudio from the operating system.
3630 See http://radscan.com/nas.html
3632 -egl ............... Use EGL instead of GLX to manage contexts.
3633 When building for desktop OpenGL, this option will
3634 make Qt use EGL to manage contexts rather than the
3635 GLX, which is the default. Note: For OpenGL ES, EGL
3638 -no-opengl ......... Do not support OpenGL.
3639 + -opengl <api> ...... Enable OpenGL support.
3640 With no parameter, this will auto-detect the "best"
3641 OpenGL API to use. If desktop OpenGL is available, it
3642 will be used. Use desktop or es2 for <api>
3643 to force the use of the Desktop OpenGL or
3644 OpenGL ES 2 APIs instead.
3646 -no-openvg ........ Do not support OpenVG.
3647 + -openvg ........... Enable OpenVG support.
3648 Requires EGL support, typically supplied by an OpenGL
3649 or other graphics implementation.
3651 $SMN -no-sm ............. Do not support X Session Management.
3652 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3654 $SHN -no-xshape ......... Do not compile XShape support.
3655 $SHY -xshape ............ Compile XShape support.
3656 Requires X11/extensions/shape.h.
3658 $XVN -no-xvideo ......... Do not compile XVideo support.
3659 $XVY -xvideo ............ Compile XVideo support.
3660 Requires X11/extensions/Xv.h & Xvlib.h.
3662 $SHN -no-xsync .......... Do not compile XSync support.
3663 $SHY -xsync ............. Compile XSync support.
3664 Requires X11/extensions/sync.h.
3666 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3667 $XAY -xinerama .......... Compile Xinerama support.
3668 Requires X11/extensions/Xinerama.h and libXinerama.
3669 By default, Xinerama support will be compiled if
3670 available and the shared libraries are dynamically
3673 $XCN -no-xcursor ........ Do not compile Xcursor support.
3674 $XCY -xcursor ........... Compile Xcursor support.
3675 Requires X11/Xcursor/Xcursor.h and libXcursor.
3676 By default, Xcursor support will be compiled if
3677 available and the shared libraries are dynamically
3680 $XFN -no-xfixes ......... Do not compile Xfixes support.
3681 $XFY -xfixes ............ Compile Xfixes support.
3682 Requires X11/extensions/Xfixes.h and libXfixes.
3683 By default, Xfixes support will be compiled if
3684 available and the shared libraries are dynamically
3687 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3688 $XZY -xrandr ............ Compile Xrandr support.
3689 Requires X11/extensions/Xrandr.h and libXrandr.
3691 $XRN -no-xrender ........ Do not compile Xrender support.
3692 $XRY -xrender ........... Compile Xrender support.
3693 Requires X11/extensions/Xrender.h and libXrender.
3695 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3696 $XMY -mitshm ............ Compile MIT-SHM support.
3697 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3699 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3700 $FCGY -fontconfig ........ Compile FontConfig support.
3701 Requires fontconfig/fontconfig.h, libfontconfig,
3702 freetype.h and libfreetype.
3704 $XIN -no-xinput ......... Do not compile Xinput support.
3705 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3706 which requires IRIX with wacom.h and libXi or
3707 XFree86 with X11/extensions/XInput.h and libXi.
3709 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3710 $XKY -xkb ............... Compile XKB support.
3715 if [ "$BUILD_ON_MAC" = "yes" ]; then
3720 -Fstring ........... Add an explicit framework path.
3721 -fw string ......... Add an explicit framework.
3723 * -framework ......... Build Qt as a series of frameworks and
3724 link tools against those frameworks.
3725 -no-framework ...... Do not build Qt as a series of frameworks.
3727 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3728 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3730 -arch <arch> ....... Build Qt for <arch>. Supported arch values: x86 x86_64.
3731 Only one arch value can be specified.
3733 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3734 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3736 -harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
3737 * -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
3738 QT_ENABLE_HARFBUZZ environment variable.
3743 if [ "$PLATFORM_QPA" = "yes" ]; then
3749 if [ "$PLATFORM_QPA" = "yes" ]; then
3752 -xplatform target ... The target platform when cross-compiling.
3754 -no-feature-<feature> Do not compile in <feature>.
3755 -feature-<feature> .. Compile in <feature>. The available features
3756 are described in src/corelib/global/qfeatures.txt
3758 -no-freetype ........ Do not compile in Freetype2 support.
3759 -qt-freetype ........ Use the libfreetype bundled with Qt.
3760 * -system-freetype .... Use libfreetype from the operating system.
3761 See http://www.freetype.org/
3763 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3764 default ($CFG_QCONFIG).
3766 -no-opengl .......... Do not support OpenGL.
3767 -opengl <api> ....... Enable OpenGL ES support
3768 With no parameter, this will attempt to auto-detect
3769 OpenGL ES 2, or regular desktop OpenGL.
3770 Use es2 for <api> to override auto-detection.
3774 if [ "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3775 if [ "$CFG_GLIB" = "no" ]; then
3783 $GBN -no-glib ........... Do not compile Glib support.
3784 $GBY -glib .............. Compile Glib support.
3789 [ "x$ERROR" = "xyes" ] && exit 1
3794 # -----------------------------------------------------------------------------
3795 # LICENSING, INTERACTIVE PART
3796 # -----------------------------------------------------------------------------
3798 if [ "$PLATFORM_QPA" = "yes" ]; then
3799 Platform="Qt Lighthouse"
3800 elif [ "$XPLATFORM_MINGW" = "yes" ]; then
3801 Platform="Qt for Windows"
3802 elif [ -n "`getXQMakeConf grep QMAKE_LIBS_X11`" ]; then
3804 Platform="Qt for Linux/X11"
3808 echo "This is the $Platform ${EditionString} Edition."
3811 if [ "$Edition" = "OpenSource" ]; then
3813 echo "You are licensed to use this software under the terms of"
3814 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3815 if [ -f "$relpath/LICENSE.GPL3" ]; then
3816 echo "You are also licensed to use this software under the terms of"
3817 echo "the GNU General Public License (GPL) versions 3."
3823 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3824 echo "You have already accepted the terms of the $LicenseType license."
3827 if [ -f "$relpath/LICENSE.GPL3" ]; then
3828 echo "Type '3' to view the GNU General Public License version 3."
3830 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3831 echo "Type 'yes' to accept this license offer."
3832 echo "Type 'no' to decline this license offer."
3834 echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
3838 if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
3840 elif [ "$acceptance" = "no" ]; then
3841 echo "You are not licensed to use this software."
3844 elif [ "$acceptance" = "3" ]; then
3845 more "$relpath/LICENSE.GPL3"
3846 elif [ "$acceptance" = "L" ]; then
3847 more "$relpath/LICENSE.LGPL"
3850 elif [ "$Edition" = "Preview" ]; then
3851 TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3854 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3855 echo "You have already accepted the terms of the $LicenseType license."
3858 echo "You are licensed to use this software under the terms of"
3859 echo "the $TheLicense"
3861 echo "Type '?' to read the Preview License."
3862 echo "Type 'yes' to accept this license offer."
3863 echo "Type 'no' to decline this license offer."
3865 echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
3869 if [ "$acceptance" = "yes" ]; then
3871 elif [ "$acceptance" = "no" ] ;then
3872 echo "You are not licensed to use this software."
3875 elif [ "$acceptance" = "?" ]; then
3876 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
3879 elif [ "$Edition" != "OpenSource" ]; then
3880 if [ -n "$ExpiryDate" ]; then
3881 ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
3882 [ -z "$ExpiryDate" ] && ExpiryDate="0"
3883 Today=`date +%Y%m%d`
3884 if [ "$Today" -gt "$ExpiryDate" ]; then
3885 case "$LicenseType" in
3886 Commercial|Academic|Educational)
3887 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
3889 echo "NOTICE NOTICE NOTICE NOTICE"
3891 echo " Your support and upgrade period has expired."
3893 echo " You are no longer licensed to use this version of Qt."
3894 echo " Please contact qt-info@nokia.com to renew your support"
3895 echo " and upgrades for this license."
3897 echo "NOTICE NOTICE NOTICE NOTICE"
3902 echo "WARNING WARNING WARNING WARNING"
3904 echo " Your support and upgrade period has expired."
3906 echo " You may continue to use your last licensed release"
3907 echo " of Qt under the terms of your existing license"
3908 echo " agreement. But you are not entitled to technical"
3909 echo " support, nor are you entitled to use any more recent"
3910 echo " Qt releases."
3912 echo " Please contact qt-info@nokia.com to renew your"
3913 echo " support and upgrades for this license."
3915 echo "WARNING WARNING WARNING WARNING"
3922 echo "NOTICE NOTICE NOTICE NOTICE"
3924 echo " Your Evaluation license has expired."
3926 echo " You are no longer licensed to use this software. Please"
3927 echo " contact qt-info@nokia.com to purchase license, or install"
3928 echo " the Qt Open Source Edition if you intend to develop free"
3931 echo "NOTICE NOTICE NOTICE NOTICE"
3938 TheLicense=`head -n 1 "$outpath/LICENSE"`
3940 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3941 echo "You have already accepted the terms of the $TheLicense."
3944 echo "You are licensed to use this software under the terms of"
3945 echo "the $TheLicense."
3947 echo "Type '?' to view the $TheLicense."
3948 echo "Type 'yes' to accept this license offer."
3949 echo "Type 'no' to decline this license offer."
3951 echo $ECHO_N "Do you accept the terms of the $TheLicense? $ECHO_C"
3955 if [ "$acceptance" = "yes" ]; then
3957 elif [ "$acceptance" = "no" ]; then
3958 echo "You are not licensed to use this software."
3961 else [ "$acceptance" = "?" ]
3962 more "$outpath/LICENSE"
3967 # this should be moved somewhere else
3970 AIX_VERSION=`uname -v`
3971 if [ "$AIX_VERSION" -lt "5" ]; then
3972 QMakeVar add QMAKE_LIBS_X11 -lbind
3979 #-------------------------------------------------------------------------------
3980 # generate qconfig.cpp
3981 #-------------------------------------------------------------------------------
3982 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
3984 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
3986 static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
3987 static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
3989 /* Installation date */
3990 static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
3992 /* Installation Info */
3993 static const char qt_configure_prefix_path_strs[][256 + 12] = {
3994 "qt_prfxpath=$QT_INSTALL_PREFIX",
3995 "qt_docspath=$QT_INSTALL_DOCS",
3996 "qt_hdrspath=$QT_INSTALL_HEADERS",
3997 "qt_libspath=$QT_INSTALL_LIBS",
3998 "qt_binspath=$QT_INSTALL_BINS",
3999 "qt_plugpath=$QT_INSTALL_PLUGINS",
4000 "qt_impspath=$QT_INSTALL_IMPORTS",
4001 "qt_datapath=$QT_INSTALL_DATA",
4002 "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
4003 "qt_xmplpath=$QT_INSTALL_EXAMPLES",
4004 "qt_tstspath=$QT_INSTALL_TESTS",
4005 #ifdef QT_BUILD_QMAKE
4006 "qt_ssrtpath=$CFG_SYSROOT",
4007 "qt_hpfxpath=$QT_HOST_PREFIX",
4008 "qt_hbinpath=$QT_HOST_BINS",
4009 "qt_hdatpath=$QT_HOST_DATA",
4012 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
4015 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4017 /* strlen( "qt_lcnsxxxx" ) == 12 */
4018 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4019 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4021 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4024 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4025 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4026 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4028 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
4029 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4030 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4033 # -----------------------------------------------------------------------------
4034 if [ "$LicenseType" = "Evaluation" ]; then
4035 EVALKEY=qt_qevalkey=$LicenseKeyExt
4036 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
4037 EVALKEY=qt_qevalkey=
4040 if [ -n "$EVALKEY" ]; then
4041 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4042 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4043 /* Evaluation license key */
4044 static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY";
4046 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4050 # -----------------------------------------------------------------------------
4052 # -----------------------------------------------------------------------------
4055 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4057 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
4058 if [ "$OPT_SHADOW" = "yes" ]; then
4059 "$outpath/bin/syncqt" $SYNCQT_OPTS "$relpath" || exit 1
4060 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
4061 QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1
4065 # $1: input variable name (awk regexp)
4066 # $2: optional output variable name
4067 # $3: optional value transformation (sed command)
4068 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4069 # is where the resulting variable is written to
4070 setBootstrapVariable()
4072 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
4076 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
4077 echo "Creating qmake. Please wait..."
4080 QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
4081 QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
4082 if [ -f "$QCONFIG_H" ]; then
4083 OLD_QCONFIG_H=$QCONFIG_H
4084 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4087 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4088 # when building qmake, we use #defines for the install paths,
4089 # however they are real functions in the library
4090 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4091 mkdir -p "$outpath/src/corelib/global"
4092 [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
4093 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4096 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4098 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4099 rm -rf mkspecs/default
4100 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
4102 for mkfile in GNUmakefile Makefile; do
4105 in_mkfile="${mkfile}.in"
4106 if [ "$mkfile" = "Makefile" ]; then
4107 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4108 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4110 in_mkfile="${mkfile}.unix"
4112 in_mkfile="$relpath/qmake/$in_mkfile"
4113 mkfile="$outpath/qmake/$mkfile"
4114 if [ -f "$mkfile" ]; then
4115 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
4118 [ -f "$in_mkfile" ] || continue
4120 echo "########################################################################" > "$mkfile"
4121 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4122 echo "########################################################################" >> "$mkfile"
4125 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
4126 EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
4127 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
4129 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
4130 EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
4133 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
4134 setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
4135 setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
4136 setBootstrapVariable QMAKE_CFLAGS
4137 setBootstrapVariable QMAKE_CXXFLAGS
4138 setBootstrapVariable QMAKE_LFLAGS
4140 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4141 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4142 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4144 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4145 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4146 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
4147 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4148 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4149 elif [ "$CFG_DEBUG" = "yes" ]; then
4150 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4151 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
4152 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4153 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4156 if [ -n "$RPATH_FLAGS" ] && [ -n "`getQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
4157 setBootstrapVariable "QMAKE_(LFLAGS_)?RPATH" QMAKE_LFLAGS_RPATH
4158 for rpath in $RPATH_FLAGS; do
4159 EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4162 if [ "$BUILD_ON_MAC" = "yes" ]; then
4163 echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
4164 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4165 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4166 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4167 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4168 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4169 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
4170 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4171 if [ '!' -z "$CFG_SDK" ]; then
4172 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4173 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4174 EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4175 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4176 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4179 if [ '!' -z "$D_FLAGS" ]; then
4180 for DEF in $D_FLAGS; do
4181 EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
4184 QMAKE_BIN_DIR="$QT_INSTALL_BINS"
4185 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
4186 QMAKE_DATA_DIR="$QT_INSTALL_DATA"
4187 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
4189 adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4190 adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4191 adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4192 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4193 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4194 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4195 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4196 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4197 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4198 -e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
4200 if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
4201 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
4202 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4203 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4208 QMAKE_BUILD_ERROR=no
4209 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
4210 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4211 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4212 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4215 #-------------------------------------------------------------------------------
4216 # tests that need qmake
4217 #-------------------------------------------------------------------------------
4219 # detect availability of float math.h functions
4220 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4221 CFG_USE_FLOATMATH=yes
4223 CFG_USE_FLOATMATH=no
4226 # detect mmx support
4227 if [ "${CFG_MMX}" = "auto" ]; then
4228 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4235 # detect 3dnow support
4236 if [ "${CFG_3DNOW}" = "auto" ]; then
4237 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4244 # detect sse support
4245 if [ "${CFG_SSE}" = "auto" ]; then
4246 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4253 # detect sse2 support
4254 if [ "${CFG_SSE2}" = "auto" ]; then
4255 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4262 # detect sse3 support
4263 if [ "${CFG_SSE3}" = "auto" ]; then
4264 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then
4271 # detect ssse3 support
4272 if [ "${CFG_SSSE3}" = "auto" ]; then
4273 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then
4280 # detect sse4.1 support
4281 if [ "${CFG_SSE4_1}" = "auto" ]; then
4282 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
4289 # detect sse4.2 support
4290 if [ "${CFG_SSE4_2}" = "auto" ]; then
4291 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
4298 # detect avx support
4299 if [ "${CFG_AVX}" = "auto" ]; then
4300 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then
4307 # check iWMMXt support
4308 if [ "$CFG_IWMMXT" = "yes" ]; then
4309 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4310 if [ $? != "0" ]; then
4311 echo "The iWMMXt functionality test failed!"
4312 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4317 # detect neon support
4318 if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
4319 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
4326 [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
4329 if [ "$CFG_ZLIB" = "no" ]; then
4330 # Note: Qt no longer support builds without zlib
4331 # So we force a "no" to be "auto" here.
4332 # If you REALLY really need no zlib support, you can still disable
4333 # it by doing the following:
4334 # add "no-zlib" to mkspecs/qconfig.pri
4335 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4337 # There's no guarantee that Qt will build under those conditions
4342 if [ "$CFG_ZLIB" = "auto" ]; then
4343 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
4350 if [ "$CFG_LARGEFILE" = "auto" ]; then
4351 #Large files should be enabled for all Linux systems
4355 # detect how jpeg should be built
4356 if [ "$CFG_JPEG" = "auto" ]; then
4357 if [ "$CFG_SHARED" = "yes" ]; then
4364 if [ "$CFG_LIBJPEG" = "auto" ]; then
4365 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
4372 # detect how gif should be built
4373 if [ "$CFG_GIF" = "auto" ]; then
4374 if [ "$CFG_SHARED" = "yes" ]; then
4382 if [ "$CFG_LIBPNG" = "auto" ]; then
4383 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
4390 # detect accessibility
4391 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4392 CFG_ACCESSIBILITY=yes
4395 # auto-detect SQL-modules support
4396 for _SQLDR in $CFG_SQL_AVAILABLE; do
4399 if [ "$CFG_SQL_mysql" != "no" ]; then
4400 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
4401 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4402 QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4403 QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4404 QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4405 QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4406 QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4408 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4409 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4410 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4411 echo " You need MySql 4 or higher."
4412 echo " If you believe this message is in error you may use the continue"
4413 echo " switch (-continue) to $0 to continue."
4418 QT_LFLAGS_MYSQL_R=""
4422 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
4423 QMakeVar add CONFIG use_libmysqlclient_r
4424 if [ "$CFG_SQL_mysql" = "auto" ]; then
4425 CFG_SQL_mysql=plugin
4427 QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
4428 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
4429 if [ "$CFG_SQL_mysql" = "auto" ]; then
4430 CFG_SQL_mysql=plugin
4433 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4434 echo "MySQL support cannot be enabled due to functionality tests!"
4435 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4436 echo " If you believe this message is in error you may use the continue"
4437 echo " switch (-continue) to $0 to continue."
4442 QT_LFLAGS_MYSQL_R=""
4450 if [ "$CFG_SQL_psql" != "no" ]; then
4451 # Be careful not to use native pg_config when cross building.
4452 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
4453 QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
4454 QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
4456 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
4457 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
4458 # But, respect PSQL_LIBS if set
4459 [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
4460 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
4461 if [ "$CFG_SQL_psql" = "auto" ]; then
4465 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4466 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4467 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4468 echo " If you believe this message is in error you may use the continue"
4469 echo " switch (-continue) to $0 to continue."
4480 if [ "$CFG_SQL_odbc" != "no" ]; then
4481 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
4482 if [ "$CFG_SQL_odbc" = "auto" ]; then
4486 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
4487 QT_LFLAGS_ODBC="-liodbc"
4488 if [ "$CFG_SQL_odbc" = "auto" ]; then
4492 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4493 echo "ODBC support cannot be enabled due to functionality tests!"
4494 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4495 echo " If you believe this message is in error you may use the continue"
4496 echo " switch (-continue) to $0 to continue."
4506 if [ "$CFG_SQL_oci" != "no" ]; then
4507 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
4508 if [ "$CFG_SQL_oci" = "auto" ]; then
4512 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4513 echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
4514 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4515 echo " If you believe this message is in error you may use the continue"
4516 echo " switch (-continue) to $0 to continue."
4525 if [ "$CFG_SQL_tds" != "no" ]; then
4526 [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
4527 [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
4528 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
4529 if [ "$CFG_SQL_tds" = "auto" ]; then
4533 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4534 echo "TDS support cannot be enabled due to functionality tests!"
4535 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4536 echo " If you believe this message is in error you may use the continue"
4537 echo " switch (-continue) to $0 to continue."
4546 if [ "$CFG_SQL_db2" != "no" ]; then
4547 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
4548 if [ "$CFG_SQL_db2" = "auto" ]; then
4552 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4553 echo "ODBC support cannot be enabled due to functionality tests!"
4554 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4555 echo " If you believe this message is in error you may use the continue"
4556 echo " switch (-continue) to $0 to continue."
4565 if [ "$CFG_SQL_ibase" != "no" ]; then
4566 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
4567 if [ "$CFG_SQL_ibase" = "auto" ]; then
4568 CFG_SQL_ibase=plugin
4571 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4572 echo "InterBase support cannot be enabled due to functionality tests!"
4573 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4574 echo " If you believe this message is in error you may use the continue"
4575 echo " switch (-continue) to $0 to continue."
4584 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4585 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
4586 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4587 CFG_SQL_sqlite2=plugin
4590 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4591 echo "SQLite2 support cannot be enabled due to functionality tests!"
4592 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4593 echo " If you believe this message is in error you may use the continue"
4594 echo " switch (-continue) to $0 to continue."
4603 if [ "$CFG_SQL_sqlite" != "no" ]; then
4604 SQLITE_AUTODETECT_FAILED="no"
4605 if [ "$CFG_SQLITE" = "system" ]; then
4606 if [ -n "$PKG_CONFIG" ]; then
4607 QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4608 QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4610 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
4611 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4612 CFG_SQL_sqlite=plugin
4614 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
4616 SQLITE_AUTODETECT_FAILED="yes"
4619 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4620 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4621 CFG_SQL_sqlite=plugin
4624 SQLITE_AUTODETECT_FAILED="yes"
4628 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4629 echo "SQLite support cannot be enabled due to functionality tests!"
4630 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4631 echo " If you believe this message is in error you may use the continue"
4632 echo " switch (-continue) to $0 to continue."
4638 if [ "$OPT_VERBOSE" = "yes" ]; then
4639 echo "unknown SQL driver: $_SQLDR"
4645 # auto-detect NIS support
4646 if [ "$CFG_NIS" != "no" ]; then
4647 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
4650 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4651 echo "NIS support cannot be enabled due to functionality tests!"
4652 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4653 echo " If you believe this message is in error you may use the continue"
4654 echo " switch (-continue) to $0 to continue."
4662 # auto-detect CUPS support
4663 if [ "$CFG_CUPS" != "no" ]; then
4664 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
4667 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4668 echo "Cups support cannot be enabled due to functionality tests!"
4669 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4670 echo " If you believe this message is in error you may use the continue"
4671 echo " switch (-continue) to $0 to continue."
4679 # auto-detect iconv(3) support
4680 if [ "$CFG_ICONV" != "no" ]; then
4681 if [ "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
4683 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
4685 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
4687 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
4690 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4691 echo "Iconv support cannot be enabled due to functionality tests!"
4692 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4693 echo " If you believe this message is in error you may use the continue"
4694 echo " switch (-continue) to $0 to continue."
4702 # auto-detect libdbus-1 support
4703 if [ "$CFG_DBUS" != "no" ]; then
4704 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
4705 QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4706 QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4708 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
4709 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
4710 QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
4711 QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
4713 if [ "$CFG_DBUS" = "auto" ]; then
4715 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4716 # CFG_DBUS is "yes" or "linked" here
4718 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4719 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4720 echo " If you believe this message is in error you may use the continue"
4721 echo " switch (-continue) to $0 to continue."
4728 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
4730 # auto-detect Glib support
4731 if [ "$CFG_GLIB" != "no" ]; then
4732 if [ -n "$PKG_CONFIG" ]; then
4733 QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4734 QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4736 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
4738 QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
4739 QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
4741 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4742 echo "Glib support cannot be enabled due to functionality tests!"
4743 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4744 echo " If you believe this message is in error you may use the continue"
4745 echo " switch (-continue) to $0 to continue."
4754 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
4755 if [ -n "$PKG_CONFIG" ]; then
4756 QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4757 QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
4759 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
4761 QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
4762 QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
4764 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4765 echo "Gstreamer support cannot be enabled due to functionality tests!"
4766 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4767 echo " If you believe this message is in error you may use the continue"
4768 echo " switch (-continue) to $0 to continue."
4774 elif [ "$CFG_GLIB" = "no" ]; then
4778 # auto-detect libicu support
4779 if [ "$CFG_ICU" != "no" ]; then
4780 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then
4781 [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
4783 if [ "$CFG_ICU" = "auto" ]; then
4785 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4788 echo "The ICU library support cannot be enabled."
4789 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4790 echo " If you believe this message is in error you may use the continue"
4791 echo " switch (-continue) to $0 to continue."
4797 # Auto-detect PulseAudio support
4798 if [ "$CFG_PULSEAUDIO" != "no" ]; then
4799 if [ -n "$PKG_CONFIG" ]; then
4800 QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4801 QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
4803 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
4805 QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
4806 QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
4808 if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4809 echo "PulseAudio support cannot be enabled due to functionality tests!"
4810 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4811 echo " If you believe this message is in error you may use the continue"
4812 echo " switch (-continue) to $0 to continue."
4822 if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
4823 x11tests="$relpath/config.tests/x11"
4826 # work around broken X11 headers when using GCC 2.95 or later
4828 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
4829 if [ $NOTYPE = "yes" ]; then
4830 QMakeVar add QMAKE_CXXFLAGS -fpermissive
4831 X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
4834 # Check we actually have X11 :-)
4835 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4836 if [ $? != "0" ]; then
4837 echo "Basic XLib functionality test failed!"
4838 echo " You might need to modify the include and library search paths by editing"
4839 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
4845 if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
4846 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
4847 if [ "$CFG_GUI" = "no" ]; then
4848 if [ "$CFG_OPENGL" = "auto" ]; then
4851 if [ "$CFG_OPENGL" != "no" ]; then
4852 echo "OpenGL enabled, but GUI disabled."
4853 echo " You might need to either enable the GUI or disable OpenGL"
4857 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
4858 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
4860 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
4862 if [ "$CFG_EGL" = "no" ]; then
4866 if [ "$CFG_OPENGL" = "yes" ]; then
4867 echo "All the OpenGL functionality tests failed!"
4868 echo " You might need to modify the include and library search paths by editing"
4869 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4870 echo " ${XQMAKESPEC}."
4877 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4878 if [ "$CFG_OPENGL" = "desktop" ]; then
4879 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4880 if [ $? != "0" ]; then
4881 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4888 elif [ "$CFG_OPENGL" = "es2" ]; then
4890 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
4891 if [ $? != "0" ]; then
4892 echo "The OpenGL ES 2.0 functionality test failed!"
4893 echo " You might need to modify the include and library search paths by editing"
4894 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
4895 echo " ${XQMAKESPEC}."
4898 elif [ "$CFG_OPENGL" = "desktop" ]; then
4899 # Desktop OpenGL support
4900 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4901 if [ $? != "0" ]; then
4902 echo "The OpenGL functionality test failed!"
4903 echo " You might need to modify the include and library search paths by editing"
4904 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
4905 echo " ${XQMAKESPEC}."
4910 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
4911 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
4912 if [ $? != "0" ]; then
4913 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
4920 fi # X11/MINGW OpenGL
4923 if [ "$PLATFORM_X11" = "yes" ]; then
4924 # auto-detect Xcursor support
4925 if [ "$CFG_XCURSOR" != "no" ]; then
4926 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
4927 if [ "$CFG_XCURSOR" != "runtime" ]; then
4931 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4932 echo "Xcursor support cannot be enabled due to functionality tests!"
4933 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4934 echo " If you believe this message is in error you may use the continue"
4935 echo " switch (-continue) to $0 to continue."
4943 # auto-detect Xfixes support
4944 if [ "$CFG_XFIXES" != "no" ]; then
4945 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
4946 if [ "$CFG_XFIXES" != "runtime" ]; then
4950 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4951 echo "Xfixes support cannot be enabled due to functionality tests!"
4952 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4953 echo " If you believe this message is in error you may use the continue"
4954 echo " switch (-continue) to $0 to continue."
4962 # auto-detect Xrandr support (resize and rotate extension)
4963 if [ "$CFG_XRANDR" != "no" ]; then
4964 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
4965 if [ "$CFG_XRANDR" != "runtime" ]; then
4969 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4970 echo "Xrandr support cannot be enabled due to functionality tests!"
4971 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4972 echo " If you believe this message is in error you may use the continue"
4973 echo " switch (-continue) to $0 to continue."
4981 # auto-detect Xrender support
4982 if [ "$CFG_XRENDER" != "no" ]; then
4983 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
4986 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4987 echo "Xrender support cannot be enabled due to functionality tests!"
4988 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4989 echo " If you believe this message is in error you may use the continue"
4990 echo " switch (-continue) to $0 to continue."
4998 # auto-detect MIT-SHM support
4999 if [ "$CFG_MITSHM" != "no" ]; then
5000 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
5003 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5004 echo "MITSHM support cannot be enabled due to functionality tests!"
5005 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5006 echo " If you believe this message is in error you may use the continue"
5007 echo " switch (-continue) to $0 to continue."
5015 # auto-detect FontConfig support
5016 if [ "$CFG_FONTCONFIG" != "no" ]; then
5017 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5018 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5019 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5021 QT_CFLAGS_FONTCONFIG=
5022 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5024 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
5026 QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5027 QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5028 CFG_LIBFREETYPE=system
5030 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5031 echo "FontConfig support cannot be enabled due to functionality tests!"
5032 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5033 echo " If you believe this message is in error you may use the continue"
5034 echo " switch (-continue) to $0 to continue."
5042 # auto-detect Session Management support
5043 if [ "$CFG_SM" = "auto" ]; then
5044 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
5047 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5048 echo "Session Management support cannot be enabled due to functionality tests!"
5049 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5050 echo " If you believe this message is in error you may use the continue"
5051 echo " switch (-continue) to $0 to continue."
5059 # auto-detect SHAPE support
5060 if [ "$CFG_XSHAPE" != "no" ]; then
5061 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
5064 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5065 echo "XShape support cannot be enabled due to functionality tests!"
5066 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5067 echo " If you believe this message is in error you may use the continue"
5068 echo " switch (-continue) to $0 to continue."
5076 # auto-detect XVideo support
5077 if [ "$CFG_XVIDEO" != "no" ]; then
5078 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
5081 if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5082 echo "XVideo support cannot be enabled due to functionality tests!"
5083 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5084 echo " If you believe this message is in error you may use the continue"
5085 echo " switch (-continue) to $0 to continue."
5093 # auto-detect XSync support
5094 if [ "$CFG_XSYNC" != "no" ]; then
5095 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
5098 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5099 echo "XSync support cannot be enabled due to functionality tests!"
5100 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5101 echo " If you believe this message is in error you may use the continue"
5102 echo " switch (-continue) to $0 to continue."
5110 # auto-detect Xinerama support
5111 if [ "$CFG_XINERAMA" != "no" ]; then
5112 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
5113 if [ "$CFG_XINERAMA" != "runtime" ]; then
5117 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5118 echo "Xinerama support cannot be enabled due to functionality tests!"
5119 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5120 echo " If you believe this message is in error you may use the continue"
5121 echo " switch (-continue) to $0 to continue."
5129 # auto-detect Xinput support
5130 if [ "$CFG_XINPUT" != "no" ]; then
5131 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
5132 if [ "$CFG_XINPUT" != "runtime" ]; then
5136 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5137 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5138 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5139 echo " If you believe this message is in error you may use the continue"
5140 echo " switch (-continue) to $0 to continue."
5148 # auto-detect XKB support
5149 if [ "$CFG_XKB" != "no" ]; then
5150 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
5153 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5154 echo "XKB support cannot be enabled due to functionality tests!"
5155 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5156 echo " If you believe this message is in error you may use the continue"
5157 echo " switch (-continue) to $0 to continue."
5165 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5166 if [ -n "$PKG_CONFIG" ]; then
5167 QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5168 QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5170 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5172 QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
5173 QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
5175 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5176 echo "Gtk theme support cannot be enabled due to functionality tests!"
5177 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5178 echo " If you believe this message is in error you may use the continue"
5179 echo " switch (-continue) to $0 to continue."
5185 elif [ "$CFG_GLIB" = "no" ]; then
5191 if [ "$BUILD_ON_MAC" = "yes" ]; then
5192 if [ "$CFG_PHONON" != "no" ]; then
5193 # Always enable Phonon (unless it was explicitly disabled)
5197 if [ "$CFG_COREWLAN" = "auto" ]; then
5198 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
5207 if [ "$PLATFORM_QPA" = "yes" ]; then
5208 # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
5209 if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
5210 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
5212 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
5215 if [ "$CFG_OPENGL" = "yes" ]; then
5216 echo "All the OpenGL functionality tests failed!"
5217 echo " You might need to modify the include and library search paths by editing"
5218 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5219 echo " ${XQMAKESPEC}."
5224 elif [ "$CFG_OPENGL" = "es2" ]; then
5226 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
5227 QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5228 QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5229 QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
5230 QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
5231 QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "$QMAKE_INCDIR_OPENGL_ES2"
5232 QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "$QMAKE_LIBDIR_OPENGL_ES2"
5233 QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2"
5236 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
5237 if [ $? != "0" ]; then
5238 echo "The OpenGL ES 2.0 functionality test failed!"
5239 echo " You might need to modify the include and library search paths by editing"
5240 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5241 echo " ${XQMAKESPEC}."
5244 elif [ "$CFG_OPENGL" = "desktop" ]; then
5245 # Desktop OpenGL support
5246 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5247 if [ $? != "0" ]; then
5248 echo "The OpenGL functionality test failed!"
5249 echo " You might need to modify the include and library search paths by editing"
5250 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5251 echo " ${XQMAKESPEC}."
5256 # auto-detect FontConfig support
5257 if [ "$CFG_FONTCONFIG" != "no" ]; then
5258 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
5259 QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5260 QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5262 QT_CFLAGS_FONTCONFIG=
5263 QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
5265 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
5266 QT_CONFIG="$QT_CONFIG fontconfig"
5267 QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
5268 QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
5269 CFG_LIBFREETYPE=system
5274 # Save these for a check later
5275 ORIG_CFG_WAYLAND="$CFG_WAYLAND"
5276 ORIG_CFG_XCB="$CFG_XCB"
5278 if [ "$CFG_WAYLAND" != "no" ]; then
5279 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
5280 QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
5281 QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
5282 QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --cflags-only-I wayland-client 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5283 QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --libs-only-L wayland-client 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
5285 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
5287 QT_CONFIG="$QT_CONFIG wayland"
5288 elif [ "$CFG_WAYLAND" = "yes" ]; then
5289 echo "The Wayland functionality test failed!"
5293 QMakeVar add DEFINES QT_NO_WAYLAND
5297 if [ "$CFG_LIBUDEV" != "no" ]; then
5298 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
5299 QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
5300 QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
5301 QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
5302 QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
5304 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_INCDIR_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
5306 QT_CONFIG="$QT_CONFIG libudev"
5307 elif [ "$CFG_LIBUDEV" = "yes" ]; then
5308 echo "The libudev functionality test failed!"
5312 QMakeVar add DEFINES QT_NO_LIBUDEV
5316 if [ "$CFG_EVDEV" != "no" ]; then
5317 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
5319 QT_CONFIG="$QT_CONFIG evdev"
5320 elif [ "$CFG_EVDEV" = "yes" ]; then
5321 echo "The evdev functionality test failed!"
5325 QMakeVar add DEFINES QT_NO_EVDEV
5329 # Check we actually have X11 :-)
5330 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
5331 QT_CONFIG="$QT_CONFIG xlib"
5334 # auto-detect Xrender support
5335 if [ "$CFG_XRENDER" != "no" ]; then
5336 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
5338 QT_CONFIG="$QT_CONFIG xrender"
5340 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5341 echo "Xrender support cannot be enabled due to functionality tests!"
5342 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5343 echo " If you believe this message is in error you may use the continue"
5344 echo " switch (-continue) to $0 to continue."
5352 if [ "$CFG_XCB" != "no" ]; then
5353 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then
5354 QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
5355 QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
5357 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
5359 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
5360 QT_CONFIG="$QT_CONFIG xcb-render"
5363 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
5365 QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
5368 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
5369 QT_CONFIG="$QT_CONFIG xcb-xlib"
5372 if [ "$XPLATFORM_MAEMO" = "yes" ]; then
5373 # auto-detect XInput2/Xinput support
5374 if [ "$CFG_XINPUT2" != "no" ]; then
5375 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
5379 if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5380 echo "XInput2 support cannot be enabled due to functionality tests!"
5381 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5382 echo " If you believe this message is in error you may use the continue"
5383 echo " switch (-continue) to $0 to continue."
5392 if [ "$CFG_XCB" = "yes" ]; then
5393 echo "The XCB test failed!"
5394 echo " You might need to install dependency packages."
5395 echo " See src/plugins/platforms/xcb/README."
5399 QMakeVar add DEFINES QT_NO_XCB
5403 # Detect libxkbcommon
5404 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
5405 QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
5406 QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
5407 if [ "$CFG_WAYLAND" = "yes" ]; then
5408 QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
5409 QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
5411 QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
5412 QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
5414 if [ "$CFG_WAYLAND" = "yes" ]; then
5415 QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
5417 QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
5420 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5421 if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
5422 QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
5423 QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
5424 QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
5425 QMakeVar set QMAKE_LIBDIR_WAYLAND "$QMAKE_LIBDIR_WAYLAND"
5426 QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
5429 if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
5430 QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
5431 QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
5432 QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
5435 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
5436 QT_CONFIG="$QT_CONFIG coreservices"
5438 QMakeVar add DEFINES QT_NO_CORESERVICES
5441 if [ "$PLATFORM_QPA" = "yes" ] && [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then
5442 if [ "$CFG_XCB" = "no" ] && [ "$CFG_WAYLAND" = "no" ]; then
5443 if [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_WAYLAND" = "auto" ]; then
5444 echo "No QPA platform plugin enabled!"
5445 echo " If you really want to build without a QPA platform plugin you must pass"
5446 echo " -no-xcb and -no-wayland to configure. Doing this will produce a Qt that"
5447 echo " cannot run GUI applications."
5448 echo " The dependencies needed for xcb to build are listed in"
5449 echo " src/plugins/platforms/xcb/README"
5459 if [ "$PLATFORM_X11" = "yes" ]; then
5460 if [ "$CFG_EGL" != "no" ]; then
5461 # detect EGL support
5462 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
5463 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
5468 if [ "$EGL_VARIANT" = "none" ]; then
5469 if [ "$CFG_EGL" = "yes" ]; then
5470 echo "The EGL functionality test failed!"
5471 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
5472 echo " You might need to modify the include and library search paths by editing"
5473 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
5474 echo " ${XQMAKESPEC}."
5478 # If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
5479 if [ "$CFG_OPENGL" = "es2" ]; then
5486 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes"
5489 [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
5490 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5491 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
5492 CFG_LIBFREETYPE=system
5499 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5503 if [ "$CFG_STL" != "no" ]; then
5504 if [ "$HAVE_STL" = "yes" ]; then
5507 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5508 echo "STL support cannot be enabled due to functionality tests!"
5509 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5510 echo " If you believe this message is in error you may use the continue"
5511 echo " switch (-continue) to $0 to continue."
5519 # detect POSIX clock_gettime()
5520 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5521 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
5522 CFG_CLOCK_GETTIME=yes
5524 CFG_CLOCK_GETTIME=no
5528 # detect POSIX monotonic clocks
5529 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5530 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
5531 CFG_CLOCK_MONOTONIC=yes
5533 CFG_CLOCK_MONOTONIC=no
5535 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5536 CFG_CLOCK_MONOTONIC=no
5540 if [ "$CFG_MREMAP" = "auto" ]; then
5541 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5548 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5549 if [ "$CFG_GETADDRINFO" != "no" ]; then
5550 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5553 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5554 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5555 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5556 echo " If you believe this message is in error you may use the continue"
5557 echo " switch (-continue) to $0 to continue."
5565 # find if the platform provides inotify
5566 if [ "$CFG_INOTIFY" != "no" ]; then
5567 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5570 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5571 echo "inotify support cannot be enabled due to functionality tests!"
5572 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5573 echo " If you believe this message is in error you may use the continue"
5574 echo " switch (-continue) to $0 to continue."
5582 # find if the platform provides if_nametoindex (ipv6 interface name support)
5583 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5584 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
5587 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5588 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5589 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5590 echo " If you believe this message is in error you may use the continue"
5591 echo " switch (-continue) to $0 to continue."
5599 # find if the platform provides getifaddrs (network interface enumeration)
5600 if [ "$CFG_GETIFADDRS" != "no" ]; then
5601 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5604 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5605 echo "getifaddrs support cannot be enabled due to functionality tests!"
5606 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5607 echo " If you believe this message is in error you may use the continue"
5608 echo " switch (-continue) to $0 to continue."
5617 if [ "$CFG_OPENSSL" != "no" ]; then
5618 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
5619 if [ "$CFG_OPENSSL" = "auto" ]; then
5623 if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5624 echo "OpenSSL support cannot be enabled due to functionality tests!"
5625 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5626 echo " If you believe this message is in error you may use the continue"
5627 echo " switch (-continue) to $0 to continue."
5636 if [ "$CFG_PCRE" != "qt" ]; then
5637 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pcre "PCRE" $L_FLAGS $I_FLAGS $l_FLAGS; then
5640 if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5641 echo "PCRE support cannot be enabled due to functionality tests!"
5642 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5643 echo " If you believe this message is in error you may use the continue"
5644 echo " switch (-continue) to $0 to continue."
5652 # detect OpenVG support
5653 if [ "$CFG_OPENVG" != "no" ]; then
5654 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
5655 if [ "$CFG_OPENVG" = "auto" ]; then
5658 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
5659 if [ "$CFG_OPENVG" = "auto" ]; then
5662 CFG_OPENVG_ON_OPENGL=yes
5663 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
5664 if [ "$CFG_OPENVG" = "auto" ]; then
5667 CFG_OPENVG_LC_INCLUDES=yes
5668 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
5669 if [ "$CFG_OPENVG" = "auto" ]; then
5672 CFG_OPENVG_LC_INCLUDES=yes
5673 CFG_OPENVG_ON_OPENGL=yes
5675 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5676 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5677 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5678 echo " If you believe this message is in error you may use the continue"
5679 echo " switch (-continue) to $0 to continue."
5685 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
5686 CFG_OPENVG_SHIVA=yes
5690 if [ "$CFG_ALSA" = "auto" ]; then
5691 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5698 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5699 if [ "$CFG_ARCH" = "arm" ]; then
5700 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5701 if [ $? != "0" ]; then
5702 CFG_JAVASCRIPTCORE_JIT=no
5705 case "$XPLATFORM" in
5707 CFG_JAVASCRIPTCORE_JIT=no
5713 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5714 QMakeVar set JAVASCRIPTCORE_JIT yes
5715 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5716 QMakeVar set JAVASCRIPTCORE_JIT no
5719 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
5720 CFG_AUDIO_BACKEND=yes
5723 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
5724 echo "Warning: largefile support cannot be disabled for win32."
5728 #-------------------------------------------------------------------------------
5729 # ask for all that hasn't been auto-detected or specified in the arguments
5730 #-------------------------------------------------------------------------------
5732 # enable dwarf2 support on Mac
5733 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5734 QT_CONFIG="$QT_CONFIG dwarf2"
5737 # Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
5738 if [ "$BUILD_ON_MAC" = "yes" ]; then
5739 DEFAULT_ARCH="$CFG_MAC_ARCHS"
5740 if [ -z "$DEFAULT_ARCH" ]; then
5741 case `file "${outpath}/bin/qmake"` in
5749 # unsupported/unknown
5753 if [ -n "$DEFAULT_ARCH" ]; then
5754 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
5755 QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
5756 QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
5757 # Make the application arch follow the Qt arch for single arch builds.
5758 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
5759 [ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
5764 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
5765 QT_CONFIG="$QT_CONFIG phonon-backend"
5768 # disable accessibility
5769 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
5770 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
5772 QT_CONFIG="$QT_CONFIG accessibility"
5775 # egl stuff does not belong in lighthouse, but rather in plugins
5776 if [ "$PLATFORM_QPA" = "yes" ]; then
5781 if [ "$CFG_EGL" = "no" ]; then
5782 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
5784 QT_CONFIG="$QT_CONFIG egl"
5785 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
5786 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GLES_EGL"
5791 if [ "$CFG_OPENVG" = "no" ]; then
5792 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
5794 QT_CONFIG="$QT_CONFIG openvg"
5795 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
5796 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
5798 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
5799 QT_CONFIG="$QT_CONFIG openvg_on_opengl"
5801 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
5802 QT_CONFIG="$QT_CONFIG shivavg"
5803 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
5808 if [ "$CFG_OPENGL" = "no" ]; then
5809 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
5811 QT_CONFIG="$QT_CONFIG opengl"
5814 if [ "$CFG_OPENGL" = "es2" ]; then
5815 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
5818 if [ "$CFG_OPENGL" = "es2" ]; then
5819 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
5820 QT_CONFIG="$QT_CONFIG opengles2"
5823 # safe execution environment
5824 if [ "$CFG_SXE" != "no" ]; then
5825 QT_CONFIG="$QT_CONFIG sxe"
5828 # build up the variables for output
5829 if [ "$CFG_DEBUG" = "yes" ]; then
5830 QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
5831 QMAKE_CONFIG="$QMAKE_CONFIG debug"
5832 elif [ "$CFG_DEBUG" = "no" ]; then
5833 QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
5834 QMAKE_CONFIG="$QMAKE_CONFIG release"
5836 if [ "$CFG_SHARED" = "yes" ]; then
5837 QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
5838 QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
5839 elif [ "$CFG_SHARED" = "no" ]; then
5840 QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
5841 QMAKE_CONFIG="$QMAKE_CONFIG static"
5843 if [ "$PLATFORM_QPA" = "yes" ]; then
5844 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
5845 QT_CONFIG="$QT_CONFIG qpa"
5846 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
5847 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
5850 if [ "$XPLATFORM_MINGW" != "yes" ]; then
5851 # Do not set this here for Windows. Let qmake do it so
5852 # debug and release precompiled headers are kept separate.
5853 QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
5855 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
5856 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
5857 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
5858 QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
5859 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5860 QMAKE_CONFIG="$QMAKE_CONFIG largefile"
5862 if [ "$CFG_STL" = "no" ]; then
5863 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
5865 QMAKE_CONFIG="$QMAKE_CONFIG stl"
5867 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
5868 QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
5870 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
5871 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
5872 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
5873 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
5874 QMakeVar add QMAKE_CFLAGS -g
5875 QMakeVar add QMAKE_CXXFLAGS -g
5876 QT_CONFIG="$QT_CONFIG separate_debug_info"
5878 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
5879 QT_CONFIG="$QT_CONFIG separate_debug_info_nocopy"
5881 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
5882 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
5883 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
5884 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
5885 [ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
5886 [ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
5887 [ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
5888 [ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
5889 [ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
5890 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
5891 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
5892 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
5893 QT_CONFIG="$QT_CONFIG clock-gettime"
5895 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
5896 QT_CONFIG="$QT_CONFIG clock-monotonic"
5898 if [ "$CFG_MREMAP" = "yes" ]; then
5899 QT_CONFIG="$QT_CONFIG mremap"
5901 if [ "$CFG_GETADDRINFO" = "yes" ]; then
5902 QT_CONFIG="$QT_CONFIG getaddrinfo"
5904 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
5905 QT_CONFIG="$QT_CONFIG ipv6ifname"
5907 if [ "$CFG_GETIFADDRS" = "yes" ]; then
5908 QT_CONFIG="$QT_CONFIG getifaddrs"
5910 if [ "$CFG_INOTIFY" = "yes" ]; then
5911 QT_CONFIG="$QT_CONFIG inotify"
5913 if [ "$CFG_LIBJPEG" = "no" ]; then
5915 elif [ "$CFG_LIBJPEG" = "system" ]; then
5916 QT_CONFIG="$QT_CONFIG system-jpeg"
5918 if [ "$CFG_JPEG" = "no" ]; then
5919 QT_CONFIG="$QT_CONFIG no-jpeg"
5920 elif [ "$CFG_JPEG" = "yes" ]; then
5921 QT_CONFIG="$QT_CONFIG jpeg"
5923 if [ "$CFG_LIBPNG" = "no" ]; then
5926 if [ "$CFG_LIBPNG" = "system" ]; then
5927 QT_CONFIG="$QT_CONFIG system-png"
5929 if [ "$CFG_PNG" = "no" ]; then
5930 QT_CONFIG="$QT_CONFIG no-png"
5931 elif [ "$CFG_PNG" = "yes" ]; then
5932 QT_CONFIG="$QT_CONFIG png"
5934 if [ "$CFG_GIF" = "no" ]; then
5935 QT_CONFIG="$QT_CONFIG no-gif"
5936 elif [ "$CFG_GIF" = "yes" ]; then
5937 QT_CONFIG="$QT_CONFIG gif"
5939 if [ "$CFG_LIBFREETYPE" = "no" ]; then
5940 QT_CONFIG="$QT_CONFIG no-freetype"
5941 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
5942 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
5943 QT_CONFIG="$QT_CONFIG system-freetype"
5945 QT_CONFIG="$QT_CONFIG freetype"
5947 if [ "$CFG_GUI" = "auto" ]; then
5950 if [ "$CFG_GUI" = "no" ]; then
5951 QT_CONFIG="$QT_CONFIG no-gui"
5953 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
5957 if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
5958 #On Mac we implicitly link against libz, so we
5959 #never use the 3rdparty stuff.
5960 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
5962 if [ "$CFG_ZLIB" = "yes" ]; then
5963 QT_CONFIG="$QT_CONFIG zlib"
5964 elif [ "$CFG_ZLIB" = "system" ]; then
5965 QT_CONFIG="$QT_CONFIG system-zlib"
5968 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
5969 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
5970 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
5971 [ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
5972 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
5973 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
5974 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
5975 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
5976 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
5977 [ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
5978 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
5979 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
5980 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
5981 [ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
5982 [ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
5984 if [ "$PLATFORM_X11" = "yes" ]; then
5985 [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
5987 # for some reason, the following libraries are not always built shared,
5988 # so *every* program/lib (including Qt) has to link against them
5989 if [ "$CFG_XSHAPE" = "yes" ]; then
5990 QT_CONFIG="$QT_CONFIG xshape"
5992 if [ "$CFG_XVIDEO" = "yes" ]; then
5993 QT_CONFIG="$QT_CONFIG xvideo"
5995 if [ "$CFG_XSYNC" = "yes" ]; then
5996 QT_CONFIG="$QT_CONFIG xsync"
5998 if [ "$CFG_XINERAMA" = "yes" ]; then
5999 QT_CONFIG="$QT_CONFIG xinerama"
6000 QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
6002 if [ "$CFG_XCURSOR" = "yes" ]; then
6003 QT_CONFIG="$QT_CONFIG xcursor"
6004 QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
6006 if [ "$CFG_XFIXES" = "yes" ]; then
6007 QT_CONFIG="$QT_CONFIG xfixes"
6008 QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
6010 if [ "$CFG_XRANDR" = "yes" ]; then
6011 QT_CONFIG="$QT_CONFIG xrandr"
6012 if [ "$CFG_XRENDER" != "yes" ]; then
6013 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6014 QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
6016 QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
6019 if [ "$CFG_XRENDER" = "yes" ]; then
6020 QT_CONFIG="$QT_CONFIG xrender"
6021 QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
6023 if [ "$CFG_MITSHM" = "yes" ]; then
6024 QT_CONFIG="$QT_CONFIG mitshm"
6026 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6027 QT_CONFIG="$QT_CONFIG fontconfig"
6029 if [ "$CFG_XINPUT" = "yes" ]; then
6030 QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
6032 if [ "$CFG_XINPUT" = "yes" ]; then
6033 QT_CONFIG="$QT_CONFIG xinput tablet"
6035 if [ "$CFG_XKB" = "yes" ]; then
6036 QT_CONFIG="$QT_CONFIG xkb"
6040 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
6041 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
6042 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
6044 if [ "$PLATFORM_MAC" = "yes" ]; then
6045 if [ "$CFG_RPATH" = "yes" ]; then
6046 QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
6048 elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
6049 if [ -n "$RPATH_FLAGS" ]; then
6051 echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
6055 elif [ "$CFG_RPATH" = "yes" ]; then
6056 RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6060 if [ "$CFG_RPATH" = "yes" ]; then
6061 # set the default rpath to the library installation directory
6062 RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6064 if [ -n "$RPATH_FLAGS" ]; then
6065 # add the user defined rpaths
6066 QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
6070 if [ '!' -z "$I_FLAGS" ]; then
6071 # add the user define include paths
6072 QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
6073 QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
6076 if [ '!' -z "$W_FLAGS" ]; then
6077 # add the user defined warning flags
6078 QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
6079 QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
6080 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
6083 # turn off exceptions for the compilers that support it
6084 if [ "$XPLATFORM" != "$PLATFORM" ]; then
6085 COMPILER=`echo $XPLATFORM | cut -f 2- -d-`
6087 COMPILER=`echo $PLATFORM | cut -f 2- -d-`
6090 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6091 QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
6094 if [ "$XPLATFORM_MINGW" = "yes" ]; then
6095 # mkspecs/features/win32/default_pre.prf sets "no-rtti".
6096 # Follow default behavior of configure.exe by overriding with "rtti".
6097 QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
6100 if [ "$CFG_ALSA" = "yes" ]; then
6101 QT_CONFIG="$QT_CONFIG alsa"
6104 if [ "$CFG_PULSEAUDIO" = "yes" ]; then
6105 QT_CONFIG="$QT_CONFIG pulseaudio"
6108 if [ "$CFG_COREWLAN" = "yes" ]; then
6109 QT_CONFIG="$QT_CONFIG corewlan"
6112 if [ "$CFG_ICU" = "yes" ]; then
6113 QT_CONFIG="$QT_CONFIG icu"
6116 if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
6117 QT_CONFIG="$QT_CONFIG force_asserts"
6120 if [ "$CFG_PCRE" = "qt" ]; then
6121 QMAKE_CONFIG="$QMAKE_CONFIG pcre"
6125 # Some Qt modules are too advanced in C++ for some old compilers
6126 # Detect here the platforms where they are known to work.
6128 # See Qt documentation for more information on which features are
6129 # supported and on which compilers.
6131 canBuildQtConcurrent="yes"
6132 canUseV8Snapshot="yes"
6134 case "$XPLATFORM" in
6136 # PA-RISC's assembly is too limited
6137 # gcc 3.4 on that platform can't build QtXmlPatterns
6138 # the assembly it generates cannot be compiled
6140 # Check gcc's version
6141 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6145 canBuildQtXmlPatterns="no"
6149 canBuildQtXmlPatterns="no"
6153 unsupported/vxworks-*-g++*)
6156 unsupported/vxworks-*-dcc*)
6158 canBuildQtXmlPatterns="no"
6161 # Check gcc's version
6162 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6170 canBuildQtXmlPatterns="no"
6175 # Check the compiler version
6176 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6179 canBuildQtXmlPatterns="no"
6180 canBuildQtConcurrent="no"
6184 canBuildQtConcurrent="no"
6190 canBuildQtXmlPatterns="no"
6191 canBuildQtConcurrent="no"
6197 # Get the xlC version
6198 cat > xlcver.c <<EOF
6202 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6207 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
6208 xlcver=`./xlcver 2>/dev/null`
6211 if [ "$OPT_VERBOSE" = "yes" ]; then
6212 if [ -n "$xlcver" ]; then
6213 echo Found IBM xlC version: $xlcver.
6215 echo Could not determine IBM xlC version, assuming oldest supported.
6222 canBuildQtXmlPatterns="no"
6223 canBuildQtConcurrent="no"
6227 canBuildQtConcurrent="no"
6233 canBuildQtConcurrent="no"
6237 if [ "$CFG_GUI" = "no" ]; then
6238 # WebKit requires QtGui
6242 if [ "$CFG_SHARED" = "no" ]; then
6244 echo "WARNING: Using static linking will disable the WebKit module."
6249 CFG_CONCURRENT="yes"
6250 if [ "$canBuildQtConcurrent" = "no" ]; then
6251 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6254 QT_CONFIG="$QT_CONFIG concurrent"
6258 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6259 QT_CONFIG="$QT_CONFIG audio-backend"
6263 if [ "$CFG_WEBKIT" = "debug" ]; then
6264 QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
6268 QT_CONFIG="$QT_CONFIG v8"
6269 # Detect snapshot support
6270 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6271 case "$CFG_HOST_ARCH,$CFG_ARCH" in
6274 *) canUseV8Snapshot="no"
6278 if [ -n "$_SBOX_DIR" -a "$CFG_ARCH" = "arm" ]; then
6279 # QEMU crashes when building inside Scratchbox with an ARM target
6280 canUseV8Snapshot="no"
6283 if [ "$CFG_V8SNAPSHOT" = "auto" ]; then
6284 CFG_V8SNAPSHOT="$canUseV8Snapshot"
6286 if [ "$CFG_V8SNAPSHOT" = "yes" -a "$canUseV8Snapshot" = "no" ]; then
6287 echo "Error: V8 snapshot was requested, but is not supported on this platform."
6290 if [ "$CFG_V8SNAPSHOT" = "yes" ]; then
6291 QT_CONFIG="$QT_CONFIG v8snapshot"
6295 if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then
6296 QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL"
6299 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6302 QMakeVar add QMAKE_CFLAGS -fno-exceptions
6303 QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
6304 QMakeVar add QMAKE_LFLAGS -fno-exceptions
6309 QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
6310 QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
6311 QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
6318 QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
6324 COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6326 case "$COMPILER_VERSION" in
6328 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6329 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6330 QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6333 QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6334 QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6335 QT_GCC_PATCH_VERSION=0
6345 #-------------------------------------------------------------------------------
6346 # part of configuration information goes into qconfig.h
6347 #-------------------------------------------------------------------------------
6349 case "$CFG_QCONFIG" in
6351 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6354 tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
6355 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6356 if [ -f "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" ]; then
6357 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6358 elif [ -f `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` ]; then
6359 cat `"$relpath/config.tests/unix/makeabs" "${CFG_QCONFIG}"` >>"$tmpconfig"
6361 echo "#endif" >>"$tmpconfig"
6365 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6369 # define QT_EDITION $QT_EDITION
6373 CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6374 CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6375 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6376 /* Machine Architecture */
6377 #ifndef QT_BOOTSTRAPPED
6378 # define QT_ARCH_${CFG_ARCH_STR}
6380 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6384 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6385 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6387 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
6388 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6391 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6392 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6395 if [ "$BUILD_ON_MAC" = "yes" ]; then
6396 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6397 #if defined(__LP64__)
6398 # define QT_POINTER_SIZE 8
6400 # define QT_POINTER_SIZE 4
6404 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6405 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6408 #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
6409 if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
6410 echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
6414 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6416 if [ "$CFG_DEV" = "yes" ]; then
6417 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6420 if [ "$PLATFORM_QPA" = "yes" ]; then
6421 # Add QPA to config.h
6422 QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
6425 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6426 QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6429 # Add turned on SQL drivers
6430 for DRIVER in $CFG_SQL_AVAILABLE; do
6431 eval "VAL=\$CFG_SQL_$DRIVER"
6434 ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6435 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6436 SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
6439 SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
6445 QMakeVar set sql-drivers "$SQL_DRIVERS"
6446 QMakeVar set sql-plugins "$SQL_PLUGINS"
6448 # Add other configuration options to the qconfig.h file
6449 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
6450 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
6451 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
6452 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
6453 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
6454 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
6455 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
6457 # X11/Unix/Mac only configs
6458 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
6459 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
6460 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
6461 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
6462 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
6463 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
6464 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
6465 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
6466 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
6467 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
6468 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
6469 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
6470 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
6471 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
6472 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
6474 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
6475 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
6476 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
6477 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
6478 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
6479 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
6480 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
6481 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
6482 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
6483 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
6484 [ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
6485 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
6486 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
6488 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
6489 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
6490 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
6491 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
6492 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
6493 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
6494 [ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
6495 [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
6497 # sort QCONFIG_FLAGS for neatness if we can
6498 [ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
6499 QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
6501 if [ -n "$QCONFIG_FLAGS" ]; then
6502 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6503 #ifndef QT_BOOTSTRAPPED
6506 for cfg in $QCONFIG_FLAGS; do
6507 cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
6508 cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
6509 # figure out define logic, so we can output the correct
6510 # ifdefs to override the global defines in a project
6512 if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
6513 # QT_NO_option can be forcefully turned on by QT_option
6514 cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
6515 elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
6516 # QT_option can be forcefully turned off by QT_NO_option
6517 cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
6520 if [ -z $cfgdNeg ]; then
6521 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6528 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6529 #if defined($cfgd) && defined($cfgdNeg)
6531 #elif !defined($cfgd) && !defined($cfgdNeg)
6538 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6539 #endif // QT_BOOTSTRAPPED
6544 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
6545 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6546 #define QT_VISIBILITY_AVAILABLE
6551 if [ -n "$QT_LIBINFIX" ]; then
6552 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
6553 #define QT_LIBINFIX "$QT_LIBINFIX"
6558 # avoid unecessary rebuilds by copying only if qconfig.h has changed
6559 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
6560 rm -f "$outpath/src/corelib/global/qconfig.h.new"
6562 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
6563 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
6564 chmod -w "$outpath/src/corelib/global/qconfig.h"
6565 if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then
6566 ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h"
6570 #-------------------------------------------------------------------------------
6571 # save configuration into qconfig.pri
6572 #-------------------------------------------------------------------------------
6573 QTCONFIG="$outpath/mkspecs/qconfig.pri"
6574 QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
6575 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
6576 if [ "$CFG_DEBUG" = "yes" ]; then
6577 QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
6578 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6579 QT_CONFIG="$QT_CONFIG release"
6581 QT_CONFIG="$QT_CONFIG debug"
6582 elif [ "$CFG_DEBUG" = "no" ]; then
6583 QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
6584 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6585 QT_CONFIG="$QT_CONFIG debug"
6587 QT_CONFIG="$QT_CONFIG release"
6589 if [ "$CFG_STL" = "yes" ]; then
6590 QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
6592 if [ "$CFG_FRAMEWORK" = "no" ]; then
6593 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
6595 QT_CONFIG="$QT_CONFIG qt_framework"
6596 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
6598 if [ "$CFG_DEV" = "yes" ]; then
6599 QT_CONFIG="$QT_CONFIG private_tests"
6602 cat >>"$QTCONFIG.tmp" <<EOF
6604 CONFIG += $QTCONFIG_CONFIG
6606 QT_EDITION = $Edition
6607 QT_CONFIG += $QT_CONFIG
6610 QT_VERSION = $QT_VERSION
6611 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
6612 QT_MINOR_VERSION = $QT_MINOR_VERSION
6613 QT_PATCH_VERSION = $QT_PATCH_VERSION
6616 QT_LIBINFIX = $QT_LIBINFIX
6617 QT_NAMESPACE = $QT_NAMESPACE
6620 if [ -n "$CFG_SYSROOT" ]; then
6621 echo "# sysroot" >>"$QTCONFIG.tmp"
6622 echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
6623 echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6624 echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6625 echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
6626 echo "}" >> "$QTCONFIG.tmp"
6627 echo >> "$QTCONFIG.tmp"
6629 if [ "$CFG_RPATH" = "yes" ]; then
6630 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
6632 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
6633 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
6634 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
6635 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
6638 if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
6639 echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
6640 echo "QMAKE_INCDIR_OPENGL_ES2 = \"$QMAKE_INCDIR_OPENGL_ES2\"" >> "$QTCONFIG.tmp"
6643 # replace qconfig.pri if it differs from the newly created temp file
6644 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
6645 rm -f "$QTCONFIG.tmp"
6647 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
6650 #-------------------------------------------------------------------------------
6651 # save configuration into qmodule.pri
6652 #-------------------------------------------------------------------------------
6653 QTMODULE="$outpath/mkspecs/qmodule.pri"
6655 echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
6657 # Ensure we can link to uninistalled libraries
6658 if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
6659 echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
6661 if [ -n "$QT_CFLAGS_PSQL" ]; then
6662 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp"
6664 if [ -n "$QT_LFLAGS_PSQL" ]; then
6665 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp"
6667 if [ -n "$QT_CFLAGS_MYSQL" ]; then
6668 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp"
6670 if [ -n "$QT_LFLAGS_MYSQL" ]; then
6671 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp"
6673 if [ -n "$QT_CFLAGS_SQLITE" ]; then
6674 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp"
6676 if [ -n "$QT_LFLAGS_SQLITE" ]; then
6677 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp"
6679 if [ -n "$QT_LFLAGS_ODBC" ]; then
6680 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp"
6682 if [ -n "$QT_LFLAGS_TDS" ]; then
6683 echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp"
6686 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
6687 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$QTMODULE.tmp"
6690 #dump in the OPENSSL_LIBS info
6691 if [ '!' -z "$OPENSSL_LIBS" ]; then
6692 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp"
6693 elif [ "$CFG_OPENSSL" = "linked" ]; then
6694 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
6697 #dump in the SDK info
6698 if [ '!' -z "$CFG_SDK" ]; then
6699 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
6703 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
6704 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
6706 # replace qmodule.pri if it differs from the newly created temp file
6707 if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
6708 rm -f "$QTMODULE.tmp"
6710 mv -f "$QTMODULE.tmp" "$QTMODULE"
6713 #-------------------------------------------------------------------------------
6714 # save configuration into .qmake.cache
6715 #-------------------------------------------------------------------------------
6717 CACHEFILE="$outpath/.qmake.cache"
6718 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
6719 cat >>"$CACHEFILE.tmp" <<EOF
6721 QT_SOURCE_TREE = \$\$quote($relpath)
6722 QT_BUILD_TREE = \$\$quote($outpath)
6723 QT_BUILD_PARTS = $CFG_BUILD_PARTS
6725 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
6726 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
6727 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
6729 include(\$\$PWD/mkspecs/qmodule.pri)
6730 CONFIG += $QMAKE_CONFIG dylib depend_includepath fix_output_dirs no_private_qt_headers_warning QTDIR_build
6734 #dump the qmake spec
6735 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
6736 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
6738 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
6743 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
6744 if [ "$CFG_INCREMENTAL" = "yes" ]; then
6745 find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
6746 # don't need to worry about generated files
6747 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
6748 basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
6750 INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
6752 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
6753 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
6756 # replace .qmake.cache if it differs from the newly created temp file
6757 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
6758 rm -f "$CACHEFILE.tmp"
6760 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
6763 #-------------------------------------------------------------------------------
6764 # give feedback on configuration
6765 #-------------------------------------------------------------------------------
6769 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6772 This target is using the GNU C++ compiler ($PLATFORM).
6774 Recent versions of this compiler automatically include code for
6775 exceptions, which increase both the size of the Qt libraries and
6776 the amount of memory taken by your applications.
6778 You may choose to re-run `basename $0` with the -no-exceptions
6779 option to compile Qt without exceptions. This is completely binary
6780 compatible, and existing applications will continue to work.
6788 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6791 This target is using the MIPSpro C++ compiler ($PLATFORM).
6793 You may choose to re-run `basename $0` with the -no-exceptions
6794 option to compile Qt without exceptions. This will make the
6795 size of the Qt library smaller and reduce the amount of memory
6796 taken by your applications.
6808 if [ "$XPLATFORM" = "$PLATFORM" ]; then
6809 echo "Build type: $PLATFORM"
6811 echo "Building on: $PLATFORM"
6812 echo "Building for: $XPLATFORM"
6815 if [ ! -z "$CFG_MAC_ARCHS" ]; then
6816 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
6818 echo "Architecture: $CFG_ARCH"
6821 if [ "$PLATFORM_QPA" = "yes" ]; then
6822 echo "Host architecture: $CFG_HOST_ARCH"
6825 if [ -n "$PLATFORM_NOTES" ]; then
6826 echo "Platform notes:"
6827 echo "$PLATFORM_NOTES"
6832 if [ "$OPT_VERBOSE" = "yes" ]; then
6833 echo $ECHO_N "qmake vars .......... $ECHO_C"
6834 cat "$QMAKE_VARS_FILE" | tr '\n' ' '
6835 echo "qmake switches ......... $QMAKE_SWITCHES"
6838 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
6839 echo "Build .................. $CFG_BUILD_PARTS"
6840 echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
6841 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
6842 echo "Debug .................. yes (combined)"
6843 if [ "$CFG_DEBUG" = "yes" ]; then
6844 echo "Default Link ........... debug"
6846 echo "Default Link ........... release"
6849 echo "Debug .................. $CFG_DEBUG"
6851 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
6852 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
6853 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
6854 echo "QtConcurrent code ...... $CFG_CONCURRENT"
6855 echo "QtGui module ........... $CFG_GUI"
6856 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
6857 echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
6859 echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
6861 echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG"
6862 echo "STL support ............ $CFG_STL"
6863 echo "PCH support ............ $CFG_PRECOMPILE"
6864 echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}"
6865 echo "SSSE3/SSE4.1/SSE4.2..... ${CFG_SSSE3}/${CFG_SSE4_1}/${CFG_SSE4_2}"
6866 echo "AVX..................... ${CFG_AVX}"
6867 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
6868 echo "iWMMXt support ......... ${CFG_IWMMXT}"
6869 echo "NEON support ........... ${CFG_NEON}"
6871 echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
6872 echo "getaddrinfo support .... $CFG_GETADDRINFO"
6873 echo "getifaddrs support ..... $CFG_GETIFADDRS"
6874 echo "Accessibility .......... $CFG_ACCESSIBILITY"
6875 echo "NIS support ............ $CFG_NIS"
6876 echo "CUPS support ........... $CFG_CUPS"
6877 echo "Iconv support .......... $CFG_ICONV"
6878 echo "Glib support ........... $CFG_GLIB"
6879 echo "GStreamer support ...... $CFG_GSTREAMER"
6880 echo "PulseAudio support ..... $CFG_PULSEAUDIO"
6881 echo "Large File support ..... $CFG_LARGEFILE"
6882 echo "GIF support ............ $CFG_GIF"
6883 if [ "$CFG_JPEG" = "no" ]; then
6884 echo "JPEG support ........... $CFG_JPEG"
6886 echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
6888 if [ "$CFG_PNG" = "no" ]; then
6889 echo "PNG support ............ $CFG_PNG"
6891 echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
6893 echo "zlib support ........... $CFG_ZLIB"
6894 echo "Session management ..... $CFG_SM"
6895 echo "libudev support ........ $CFG_LIBUDEV"
6897 if [ "$CFG_OPENGL" = "desktop" ]; then
6898 echo "OpenGL support ......... yes (Desktop OpenGL)"
6899 elif [ "$CFG_OPENGL" = "es2" ]; then
6900 echo "OpenGL support ......... yes (OpenGL ES 2.x)"
6902 echo "OpenGL support ......... no"
6904 if [ "$CFG_EGL" != "no" ]; then
6905 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6906 echo "EGL support ............ yes <GLES/egl.h>"
6908 echo "EGL support ............ yes <EGL/egl.h>"
6911 if [ "$CFG_OPENVG" ]; then
6912 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6913 echo "OpenVG support ......... ShivaVG"
6915 echo "OpenVG support ......... $CFG_OPENVG"
6918 if [ "$PLATFORM_X11" = "yes" ]; then
6919 echo "NAS sound support ...... $CFG_NAS"
6920 echo "XShape support ......... $CFG_XSHAPE"
6921 echo "XVideo support ......... $CFG_XVIDEO"
6922 echo "XSync support .......... $CFG_XSYNC"
6923 echo "Xinerama support ....... $CFG_XINERAMA"
6924 echo "Xcursor support ........ $CFG_XCURSOR"
6925 echo "Xfixes support ......... $CFG_XFIXES"
6926 echo "Xrandr support ......... $CFG_XRANDR"
6927 echo "Xi support ............. $CFG_XINPUT"
6928 echo "MIT-SHM support ........ $CFG_MITSHM"
6929 echo "FontConfig support ..... $CFG_FONTCONFIG"
6930 echo "XKB Support ............ $CFG_XKB"
6931 echo "immodule support ....... $CFG_IM"
6932 echo "GTK theme support ...... $CFG_QGTKSTYLE"
6934 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
6935 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
6936 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
6937 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
6938 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
6939 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
6940 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
6941 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
6942 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
6945 if [ "$CFG_OPENSSL" = "yes" ]; then
6946 OPENSSL_LINKAGE="(run-time)"
6947 elif [ "$CFG_OPENSSL" = "linked" ]; then
6948 OPENSSL_LINKAGE="(linked)"
6950 echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
6951 echo "Alsa support ........... $CFG_ALSA"
6952 if [ "$BUILD_ON_MAC" = "yes" ]; then
6953 echo "CoreWlan support ....... $CFG_COREWLAN"
6955 echo "libICU support ......... $CFG_ICU"
6956 echo "PCRE support ........... $CFG_PCRE"
6957 if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6958 echo "Xcb support ............ limited (old version)"
6960 echo "Xcb support ............ $CFG_XCB"
6962 echo "Xrender support ........ $CFG_XRENDER"
6963 if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
6964 echo "XInput2 support ........ $CFG_XINPUT2"
6968 # complain about not being able to use dynamic plugins if we are using a static build
6969 if [ "$CFG_SHARED" = "no" ]; then
6971 echo "WARNING: Using static linking will disable the use of dynamically"
6972 echo "loaded plugins. Make sure to import all needed static plugins,"
6973 echo "or compile needed modules into the library."
6976 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
6978 echo "NOTE: When linking against OpenSSL, you can override the default"
6979 echo "library names through OPENSSL_LIBS."
6981 echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
6984 if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
6986 echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
6987 echo "if you want a pure debug build."
6992 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
6997 #-------------------------------------------------------------------------------
6998 # build makefiles based on the configuration
6999 #-------------------------------------------------------------------------------
7001 echo "Finding project files. Please wait..."
7002 if [ "$CFG_NOPROCESS" != "yes" ]; then
7003 "$outpath/bin/qmake" -prl -r "${relpath}/qtbase.pro"
7004 if [ -f "${relpath}/qtbase.pro" ]; then
7005 mkfile="${outpath}/Makefile"
7006 [ -f "$mkfile" ] && chmod +w "$mkfile"
7007 QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/qtbase.pro" -o "$mkfile"
7011 # .projects -> projects to process
7012 # .projects.1 -> qt and moc
7013 # .projects.2 -> subdirs and libs
7014 # .projects.3 -> the rest
7015 rm -f .projects .projects.1 .projects.2 .projects.3
7017 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7018 if [ -z "$AWK" ]; then
7019 for p in `echo $QMAKE_PROJECTS`; do
7020 echo "$p" >> .projects
7023 cat >projects.awk <<EOF
7029 first = "./.projects.1.tmp"
7030 second = "./.projects.2.tmp"
7031 third = "./.projects.3.tmp"
7036 if ( ! target_file )
7038 print input_file >target_file
7043 input_file = FILENAME
7048 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7051 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7052 target_file = second
7057 matched_target == 0 && /^(TEMPLATE.*=)/ {
7058 if ( \$3 == "subdirs" )
7059 target_file = second
7060 else if ( \$3 == "lib" )
7066 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7067 if ( \$0 ~ /plugin/ )
7070 target_file = second
7075 if ( ! target_file )
7077 print input_file >>target_file
7084 for p in `echo $QMAKE_PROJECTS`; do
7085 echo "$p" >> .projects.all
7088 # if you get errors about the length of the command line to awk, change the -l arg
7090 split -l 100 .projects.all .projects.all.
7091 for p in .projects.all.*; do
7092 "$AWK" -f projects.awk `cat $p`
7093 [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
7094 [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
7095 [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
7096 rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
7098 rm -f .projects.all* projects.awk
7100 [ -f .projects.1 ] && cat .projects.1 >>.projects
7101 [ -f .projects.2 ] && cat .projects.2 >>.projects
7102 rm -f .projects.1 .projects.2
7103 if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
7104 cat .projects.3 >>.projects
7108 # don't sort Qt and MOC in with the other project files
7109 # also work around a segfaulting uniq(1)
7110 if [ -f .sorted.projects.2 ]; then
7111 sort .sorted.projects.2 > .sorted.projects.2.new
7112 mv -f .sorted.projects.2.new .sorted.projects.2
7113 cat .sorted.projects.2 >> .sorted.projects.1
7115 [ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
7116 rm -f .sorted.projects.2 .sorted.projects.1
7120 if [ -f .projects ]; then
7121 uniq .projects >.tmp
7122 mv -f .tmp .projects
7123 NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
7125 if [ -f .projects.3 ]; then
7126 uniq .projects.3 >.tmp
7127 mv -f .tmp .projects.3
7128 FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7130 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7134 for part in $CFG_BUILD_PARTS; do
7136 tools) PART_ROOTS="$PART_ROOTS tools" ;;
7137 libs) PART_ROOTS="$PART_ROOTS src" ;;
7138 translations) PART_ROOTS="$PART_ROOTS translations" ;;
7139 examples) PART_ROOTS="$PART_ROOTS examples" ;;
7144 if [ "$CFG_DEV" = "yes" ]; then
7145 PART_ROOTS="$PART_ROOTS tests"
7148 echo "Creating makefiles. Please wait..."
7149 for file in .projects .projects.3; do
7150 [ '!' -f "$file" ] && continue
7151 for a in `cat $file`; do
7153 for r in $PART_ROOTS; do
7154 if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
7159 [ "$IN_ROOT" = "no" ] && continue
7162 *winmain/winmain.pro)
7163 if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_MINGW" != "yes" ]; then
7167 */qmake/qmake.pro) continue ;;
7168 *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*tools/qdoc*) SPEC=$QMAKESPEC ;;
7169 *) if [ "$CFG_NOPROCESS" = "yes" ]; then
7175 dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
7176 test -d "$dir" || mkdir -p "$dir"
7177 OUTDIR="$outpath/$dir"
7178 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7179 # fast configure - the makefile exists, skip it
7180 # since the makefile exists, it was generated by qmake, which means we
7181 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7183 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7186 QMAKE_SPEC_ARGS="-spec $SPEC"
7187 echo $ECHO_N " for $a$ECHO_C"
7189 QMAKE="$outpath/bin/qmake"
7190 QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7191 if [ "$file" = ".projects.3" ]; then
7194 cat >"${OUTDIR}/Makefile" <<EOF
7195 # ${OUTDIR}/Makefile: generated by configure
7197 # WARNING: This makefile will be replaced with a real makefile.
7198 # All changes made to this file will be lost.
7200 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7202 cat >>"${OUTDIR}/Makefile" <<EOF
7204 all clean install qmake first Makefile: FORCE
7205 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7213 if [ "$OPT_VERBOSE" = "yes" ]; then
7214 echo " (`basename $SPEC`)"
7215 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7220 [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
7221 QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7225 rm -f .projects .projects.3
7227 #-------------------------------------------------------------------------------
7228 # check for platforms that we don't yet know about
7229 #-------------------------------------------------------------------------------
7230 if [ "$CFG_ARCH" = "generic" ]; then
7233 NOTICE: Atomic operations are not yet supported for this
7236 Qt will use the 'generic' architecture instead, which uses a
7237 single pthread_mutex_t to protect all atomic operations. This
7238 implementation is the slow (but safe) fallback implementation
7239 for architectures Qt does not yet support.
7243 #-------------------------------------------------------------------------------
7244 # check if the user passed the -no-zlib option, which is no longer supported
7245 #-------------------------------------------------------------------------------
7246 if [ -n "$ZLIB_FORCED" ]; then
7247 which_zlib="supplied"
7248 if [ "$CFG_ZLIB" = "system" ]; then
7254 NOTICE: The -no-zlib option was supplied but is no longer
7257 Qt now requires zlib support in all builds, so the -no-zlib
7258 option was ignored. Qt will be built using the $which_zlib
7263 #-------------------------------------------------------------------------------
7264 # finally save the executed command to another script
7265 #-------------------------------------------------------------------------------
7266 if [ `basename $0` != "config.status" ]; then
7267 CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
7269 # add the system variables
7270 for varname in $SYSTEM_VARIABLES; do
7272 'if [ -n "\$'${varname}'" ]; then
7273 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7278 echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
7280 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7281 echo "#!/bin/sh" > "$outpath/config.status"
7282 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7283 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7284 echo "else" >> "$outpath/config.status"
7285 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7286 echo "fi" >> "$outpath/config.status"
7287 chmod +x "$outpath/config.status"
7290 if [ -n "$RPATH_MESSAGE" ]; then
7292 echo "$RPATH_MESSAGE"
7295 MAKE=`basename "$MAKE"`
7297 echo Qt is now configured for building. Just run \'$MAKE\'.
7298 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7299 echo Once everything is built, Qt is installed.
7300 echo You should not run \'$MAKE install\'.
7302 echo Once everything is built, you must run \'$MAKE install\'.
7303 echo Qt will be installed into $QT_INSTALL_PREFIX
7306 echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.