2 #############################################################################
4 ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 ## All rights reserved.
6 ## Contact: Nokia Corporation (qt-info@nokia.com)
8 ## This file is the build configuration utility of the Qt Toolkit.
10 ## $QT_BEGIN_LICENSE:LGPL$
11 ## No Commercial Usage
12 ## This file contains pre-release code and may not be distributed.
13 ## You may use this file in accordance with the terms and conditions
14 ## contained in the Technology Preview License Agreement accompanying
17 ## GNU Lesser General Public License Usage
18 ## Alternatively, this file may be used under the terms of the GNU Lesser
19 ## General Public License version 2.1 as published by the Free Software
20 ## Foundation and appearing in the file LICENSE.LGPL included in the
21 ## packaging of this file. Please review the following information to
22 ## ensure the GNU Lesser General Public License version 2.1 requirements
23 ## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ## In addition, as a special exception, Nokia gives you certain additional
26 ## rights. These rights are described in the Nokia Qt LGPL Exception
27 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ## If you have questions regarding the use of this file, please contact
30 ## Nokia at qt-info@nokia.com.
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 [ ! -e "$conf_file" ]; then
119 echo "WARNING: Unable to find file $conf_file" >&2
122 getQMakeConf1
"$conf_file"
131 # relies on $QMAKESPEC being set correctly. parses include statements in
132 # qmake.conf and prints out the expanded file
139 getQMakeConf1
"$tmpSPEC/qmake.conf"
142 # relies on $TEST_COMPILER being set correctly
143 compilerSupportsFlag
()
145 cat >conftest.cpp
<<EOF
146 int main() { return 0; }
148 "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
150 rm -f conftest.cpp conftest.o
154 # relies on $TEST_COMPILER being set correctly
160 safe_flag
=`shellEscape "$flag"`
161 lflags
=$lflags,$safe_flag
163 compilerSupportsFlag
"$lflags" >/dev
/null
2>&1
166 #-------------------------------------------------------------------------------
167 # operating system detection
168 #-------------------------------------------------------------------------------
170 # need that throughout the script
171 UNAME_MACHINE
=`(uname -m) 2>/dev/null` || UNAME_MACHINE
=unknown
172 UNAME_RELEASE
=`(uname -r) 2>/dev/null` || UNAME_RELEASE
=unknown
173 UNAME_SYSTEM
=`(uname -s) 2>/dev/null` || UNAME_SYSTEM
=unknown
174 UNAME_VERSION
=`(uname -v) 2>/dev/null` || UNAME_VERSION
=unknown
177 #-------------------------------------------------------------------------------
178 # window system detection
179 #-------------------------------------------------------------------------------
185 if [ -f "$relpath"/src
/gui
/kernel
/qapplication_mac.mm
] && [ -d /System
/Library
/Frameworks
/Carbon.framework
]; then
187 # ~ the Carbon SDK exists
188 # ~ src/gui/base/qapplication_mac.cpp is present
189 # ~ this is the internal edition and Qt/Mac sources exist
191 elif [ -f "$relpath"/src
/gui
/kernel
/qapplication_qws.cpp
]; then
193 # ~ src/gui/base/qapplication_qws.cpp is present
194 # ~ this is the free or commercial edition
195 # ~ this is the internal edition and Qt Embedded is explicitly enabled
196 if [ -f "$relpath"/src
/gui
/kernel
/qapplication_mac.mm
]; then
197 # This is a depot build, or an all-platforms package
200 # This must be the embedded package, since the Qt/Mac source files are not present
205 #-----------------------------------------------------------------------------
206 # Qt version detection
207 #-----------------------------------------------------------------------------
208 QT_VERSION
=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
212 if [ -n "$QT_VERSION" ]; then
213 QT_VERSION
=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
214 MAJOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
215 if [ -n "$MAJOR" ]; then
216 MINOR
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
217 PATCH
=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
218 QT_MAJOR_VERSION
="$MAJOR"
219 [ -z "$MINOR" ] || QT_MINOR_VERSION
="$MINOR"
220 [ -z "$PATCH" ] || QT_PATCH_VERSION
="$PATCH"
223 if [ -z "$QT_MAJOR_VERSION" ]; then
224 echo "Cannot process version from qglobal.h: $QT_VERSION"
225 echo "Cannot proceed."
229 QT_PACKAGEDATE
=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
230 if [ -z "$QT_PACKAGEDATE" ]; then
231 echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
232 echo "Cannot proceed"
236 #-------------------------------------------------------------------------------
238 #-------------------------------------------------------------------------------
244 EditionString
=Commercial
248 # parse the arguments, setting things to "yes" or "no"
249 while [ "$#" -gt 0 ]; do
253 #Autoconf style options
255 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
259 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
263 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
264 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
267 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
272 # this option may or may not be followed by an argument
273 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
280 -h|
help|
--help|
-help)
281 if [ "$VAL" = "yes" ]; then
283 COMMERCIAL_USER
="no" #doesn't matter we will display the help
286 COMMERCIAL_USER
="no" #doesn't matter we will display the help
290 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
294 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
301 if [ "$UNKNOWN_ARG" = "yes" ]; then
311 if [ "$PLATFORM_QWS" != "no" ]; then
312 if [ "$PLATFORM_QWS" = "maybe" ]; then
318 echo "No license exists to enable Qt for Embedded Linux. Disabling."
331 COMMERCIAL_USER
="yes"
345 if [ "$COMMERCIAL_USER" = "ask" ]; then
347 echo "Which edition of Qt do you want to use ?"
349 echo "Type 'c' if you want to use the Commercial Edition."
350 echo "Type 'o' if you want to use the Open Source Edition."
354 if [ "$commercial" = "c" ]; then
355 COMMERCIAL_USER
="yes"
357 elif [ "$commercial" = "o" ]; then
364 if [ "$CFG_NOKIA" = "yes" ]; then
366 Edition
="NokiaInternalBuild"
367 EditionString
="Nokia Internal Build"
368 QT_EDITION
="QT_EDITION_OPENSOURCE"
369 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
370 elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL
] && [ $COMMERCIAL_USER = "yes" ]; then
371 # Commercial preview release
372 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
375 QT_EDITION
="QT_EDITION_DESKTOP"
376 LicenseType
="Technology Preview"
377 elif [ $COMMERCIAL_USER = "yes" ]; then
378 # one of commercial editions
379 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
380 [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS
=no
382 # read in the license file
383 if [ -f "$LICENSE_FILE" ]; then
384 .
"$LICENSE_FILE" >/dev
/null
2>&1
385 if [ -z "$LicenseKeyExt" ]; then
387 echo "You are using an old license file."
389 echo "Please install the license file supplied by Nokia,"
390 echo "or install the Qt Open Source Edition if you intend to"
391 echo "develop free software."
394 if [ -z "$Licensee" ]; then
396 echo "Invalid license key. Please check the license key."
400 if [ -z "$LicenseKeyExt" ]; then
402 if echo '\c' |
grep '\c' >/dev
/null
; then
403 echo -n "Please enter your license key: "
405 echo "Please enter your license key: \c"
408 Licensee
="Unknown user"
413 echo "$LicenseKeyExt" |
grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev
/null
2>&1 \
414 && LicenseValid
="yes" \
416 if [ "$LicenseValid" != "yes" ]; then
418 echo "Invalid license key. Please check the license key."
421 ProductCode
=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
422 PlatformCode
=`echo $LicenseKeyExt | cut -f 2 -d -`
423 LicenseTypeCode
=`echo $LicenseKeyExt | cut -f 3 -d -`
424 LicenseFeatureCode
=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
426 # determine which edition we are licensed to use
427 case "$LicenseTypeCode" in
429 LicenseType
="Commercial"
433 QT_EDITION
="QT_EDITION_UNIVERSAL"
436 Edition
="FullFramework"
437 EditionString
="Full Framework"
438 QT_EDITION
="QT_EDITION_DESKTOP"
441 Edition
="GUIFramework"
442 EditionString
="GUI Framework"
443 QT_EDITION
="QT_EDITION_DESKTOPLIGHT"
448 LicenseType
="Evaluation"
449 QMakeVar add DEFINES QT_EVAL
453 QT_EDITION
="QT_EDITION_EVALUATION"
458 if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
460 echo "Invalid license key. Please check the license key."
464 # verify that we are licensed to use Qt on this platform
466 case "$PlatformCode" in
469 PlatformCode
=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
473 PlatformCode
=`echo "$PlatformCode" | sed 's/.$//'`
476 case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
477 X9
,* | XC
,* | XU
,* | XW
,* | XM
,*)
479 LICENSE_EXTENSION
="-ALLOS"
481 8M
,* | KM
,* | S9
,* | SC
,* | SU
,* | SW
,* | X9
,* | XC
,* | XU
,* | XW
,*)
482 # Qt for Embedded Linux
483 LICENSE_EXTENSION
="-EMBEDDED"
485 6M
,*,no | N7
,*,no | N9
,*,no | NX
,*,no
)
487 LICENSE_EXTENSION
="-EMBEDDED"
489 FM
,*,no | LM
,yes,* | ZM
,no
,no
)
491 LICENSE_EXTENSION
="-DESKTOP"
495 [ "$PLATFORM_MAC" = "yes" ] && Platform
='Mac OS X'
496 [ "$PLATFORM_QWS" = "yes" ] && Platform
='Embedded Linux'
498 echo "You are not licensed for the $Platform platform."
500 echo "Please contact qt-info@nokia.com to upgrade your license to"
501 echo "include the $Platform platform, or install the Qt Open Source Edition"
502 echo "if you intend to develop free software."
507 if test -r "$relpath/.LICENSE"; then
508 # Generic, non-final license
510 line
=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
515 *TECHNOLOGY?PREVIEW
*)
522 echo >&2 "Invalid license files; cannot continue"
527 EditionString
="$Edition"
528 QT_EDITION
="QT_EDITION_DESKTOP"
531 case "$LicenseFeatureCode" in
534 case "$LicenseType" in
536 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
539 cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
545 case "$LicenseType" in
547 cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
550 cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
556 echo "Invalid license key. Please check the license key."
560 case "$LicenseFeatureCode" in
568 if [ '!' -f "$outpath/LICENSE" ]; then
569 echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
570 echo "this software has disappeared."
572 echo "Sorry, you are not licensed to use this software."
573 echo "Try re-installing."
577 elif [ $COMMERCIAL_USER = "no" ]; then
578 # Open Source edition - may only be used under the terms of the GPL or LGPL.
579 [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC
=yes
580 Licensee
="Open Source"
582 EditionString
="Open Source"
583 QT_EDITION
="QT_EDITION_OPENSOURCE"
586 #-------------------------------------------------------------------------------
587 # initalize variables
588 #-------------------------------------------------------------------------------
590 SYSTEM_VARIABLES
="CC CXX CFLAGS CXXFLAGS LDFLAGS"
591 for varname
in $SYSTEM_VARIABLES; do
592 qmakevarname
="${varname}"
593 # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
594 if [ "${varname}" = "LDFLAGS" ]; then
595 qmakevarname
="LFLAGS"
598 'if [ -n "\$'${varname}'" ]; then
599 QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'"
603 # Use CC/CXX to run config.tests
604 mkdir
-p "$outpath/config.tests"
605 rm -f "$outpath/config.tests/.qmake.cache"
606 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
608 QMakeVar add styles
"cde mac motif plastique cleanlooks windows"
609 QMakeVar add decorations
"default windows styled"
610 QMakeVar add mouse-drivers
"pc"
611 if [ "$UNAME_SYSTEM" = "Linux" ] ; then
612 QMakeVar add gfx-drivers
"linuxfb"
613 QMakeVar add mouse-drivers
"linuxtp"
615 QMakeVar add kbd-drivers
"tty"
617 if [ "$CFG_DEV" = "yes" ]; then
618 QMakeVar add kbd-drivers
"um"
621 # QTDIR may be set and point to an old or system-wide Qt installation
624 # the minimum version of libdbus-1 that we require:
625 MIN_DBUS_1_VERSION
=0.93
627 # initalize internal variables
628 CFG_CONFIGURE_EXIT_ON_ERROR
=yes
630 CFG_EXCEPTIONS
=unspecified
631 CFG_SCRIPT
=auto
# (yes|no|auto)
632 CFG_SCRIPTTOOLS
=auto
# (yes|no|auto)
633 CFG_XMLPATTERNS
=auto
# (yes|no|auto)
662 CFG_OPENVG_LC_INCLUDES
=no
664 CFG_OPENVG_ON_OPENGL
=no
666 CFG_EGL_GLES_INCLUDES
=no
669 CFG_QWS_FREETYPE
=auto
672 QT_DEFAULT_BUILD_PARTS
="libs tools examples demos docs translations"
677 CFG_PHONON_BACKEND
=yes
679 CFG_AUDIO_BACKEND
=yes
682 CFG_WEBKIT
=auto
# (yes|no|auto)
683 CFG_JAVASCRIPTCORE_JIT
=auto
685 CFG_GFX_AVAILABLE
="linuxfb transformed qvfb vnc multiscreen directfb"
686 CFG_GFX_ON
="linuxfb multiscreen"
687 CFG_GFX_PLUGIN_AVAILABLE
=
690 CFG_KBD_AVAILABLE
="tty linuxinput qvfb"
691 CFG_KBD_ON
="tty" #default, see QMakeVar above
692 CFG_MOUSE_AVAILABLE
="pc linuxtp linuxinput tslib qvfb"
693 CFG_MOUSE_ON
="pc linuxtp" #default, see QMakeVar above
695 if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then
696 CFG_KBD_AVAILABLE
="${CFG_KBD_AVAILABLE} qnx"
697 CFG_MOUSE_AVAILABLE
="${CFG_MOUSE_AVAILABLE} qnx"
698 CFG_GFX_AVAILABLE
="${CFG_GFX_AVAILABLE} qnx"
703 CFG_KBD_PLUGIN_AVAILABLE
=
706 CFG_MOUSE_PLUGIN_AVAILABLE
=
711 CFG_DECORATION_AVAILABLE
="styled windows default"
712 CFG_DECORATION_ON
="${CFG_DECORATION_AVAILABLE}" # all on by default
713 CFG_DECORATION_PLUGIN_AVAILABLE
=
714 CFG_DECORATION_PLUGIN
=
729 CFG_SEPARATE_DEBUG_INFO
=auto
730 CFG_SEPARATE_DEBUG_INFO_NOCOPY
=no
731 CFG_REDUCE_EXPORTS
=auto
736 CFG_REDUCE_RELOCATIONS
=no
741 CFG_ACCESSIBILITY
=auto
745 CFG_DOUBLEFORMAT
=auto
749 CFG_CLOCK_GETTIME
=auto
750 CFG_CLOCK_MONOTONIC
=auto
759 MAC_CONFIG_TEST_COMMANDLINE
= # used to make the configure tests run with the correct arch's and SDK settings
764 COMMANDLINE_MAC_COCOA
=no
766 CFG_PREFIX_INSTALL
=yes
774 XPLATFORM
= # This seems to be the QMAKESPEC, like "linux-g++"
777 OPT_CONFIRM_LICENSE
=no
783 CFG_GRAPHICS_SYSTEM
=default
786 # initalize variables used for installation
794 QT_INSTALL_TRANSLATIONS
=
800 #flags for SQL drivers
808 QT_LFLAGS_ODBC
="-lodbc"
810 # flags for libdbus-1
814 # flags for Glib (X11 only)
818 # flags for GStreamer (X11 only)
822 #-------------------------------------------------------------------------------
823 # check SQL drivers, mouse drivers and decorations available in this package
824 #-------------------------------------------------------------------------------
826 # opensource version removes some drivers, so force them to be off
832 if [ -d "$relpath/src/plugins/sqldrivers" ]; then
833 for a
in "$relpath/src/plugins/sqldrivers/"*; do
835 base_a
=`basename "$a"`
836 CFG_SQL_AVAILABLE
="${CFG_SQL_AVAILABLE} ${base_a}"
837 eval "CFG_SQL_${base_a}=auto"
842 CFG_DECORATION_PLUGIN_AVAILABLE
=
843 if [ -d "$relpath/src/plugins/decorations" ]; then
844 for a
in "$relpath/src/plugins/decorations/"*; do
846 base_a
=`basename "$a"`
847 CFG_DECORATION_PLUGIN_AVAILABLE
="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
852 CFG_KBD_PLUGIN_AVAILABLE
=
853 if [ -d "$relpath/src/plugins/kbddrivers" ]; then
854 for a
in "$relpath/src/plugins/kbddrivers/"*; do
856 base_a
=`basename "$a"`
857 CFG_KBD_PLUGIN_AVAILABLE
="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
862 CFG_MOUSE_PLUGIN_AVAILABLE
=
863 if [ -d "$relpath/src/plugins/mousedrivers" ]; then
864 for a
in "$relpath/src/plugins/mousedrivers/"*; do
866 base_a
=`basename "$a"`
867 CFG_MOUSE_PLUGIN_AVAILABLE
="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
872 CFG_GFX_PLUGIN_AVAILABLE
=
873 if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
874 for a
in "$relpath/src/plugins/gfxdrivers/"*; do
876 base_a
=`basename "$a"`
877 CFG_GFX_PLUGIN_AVAILABLE
="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
880 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE" # assume all off
883 #-------------------------------------------------------------------------------
884 # parse command line arguments
885 #-------------------------------------------------------------------------------
887 # parse the arguments, setting things to "yes" or "no"
888 while [ "$#" -gt 0 ]; do
892 #Autoconf style options
894 VAR
=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
898 VAR
=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
902 VAR
=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
903 VAL
=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
906 VAR
=`echo $1 | sed "s,^--no-\(.*\),\1,"`
910 VAR
=`echo $1 | sed "s,^--\(.*\),\1,"`
914 -no-*-*|
-plugin-*-*|
-qt-*-*)
915 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
916 VAL
=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
920 VAR
=`echo $1 | sed "s,^-no-\(.*\),\1,"`
923 #Qt style yes options
924 -incremental|
-qvfb|
-profile|
-shared|
-static|
-sm|
-xinerama|
-xshape|
-xsync|
-xinput|
-reduce-exports|
-pch|
-separate-debug-info|
-stl|
-freetype|
-xcursor|
-xfixes|
-xrandr|
-xrender|
-mitshm|
-fontconfig|
-xkb|
-nis|
-qdbus|
-dbus|
-dbus-linked|
-glib|
-gstreamer|
-gtkstyle|
-cups|
-iconv|
-largefile|
-h|
-help|
-v|
-verbose|
-debug|
-release|
-fast|
-accessibility|
-confirm-license|
-gnumake|
-framework|
-qt3support|
-debug-and-release|
-exceptions|
-cocoa|
-universal|
-prefix-install|
-silent|
-armfpa|
-optimized-qmake|
-dwarf2|
-reduce-relocations|
-sse|
-openssl|
-openssl-linked|
-ptmalloc|
-xmlpatterns|
-phonon|
-phonon-backend|
-multimedia|
-audio-backend|
-svg|
-declarative|
-webkit|
-javascript-jit|
-script|
-scripttools|
-rpath|
-force-pkg-config)
925 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
928 #Qt style options that pass an argument
930 if [ "$PLATFORM_QWS" != "yes" ]; then
932 echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
936 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
940 -prefix|
-docdir|
-headerdir|
-plugindir|
-datadir|
-libdir|
-bindir|
-translationdir|
-sysconfdir|
-examplesdir|
-demosdir|
-depths|
-make|
-nomake|
-platform|
-xplatform|
-buildkey|
-sdk|
-arch|
-host-arch|
-mysql_config)
941 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
945 #Qt style complex options in one command
946 -enable-*|
-disable-*)
947 VAR
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
948 VAL
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
950 #Qt Builtin/System style options
951 -no-*|
-system-*|
-qt-*)
952 VAR
=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
953 VAL
=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
955 #Options that cannot be generalized
962 # this option may or may not be followed by an argument
963 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
972 # this option may or may not be followed by an argument
973 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
982 # this option may or may not be followed by an argument
983 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
991 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
992 # this option may or may not be followed by an argument
993 if [ -z "$2" ] ||
echo "$2" |
grep '^-' >/dev
/null
2>&1; then
1002 VAL
=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
1006 VAL
=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
1014 VAR
="graphicssystem"
1025 if [ "$1" = "-D" ]; then
1029 VAL
=`echo $1 | sed 's,-D,,'`
1034 if [ "$1" = "-I" ]; then
1038 VAL
=`echo $1 | sed 's,-I,,'`
1043 if [ "$1" = "-L" ]; then
1047 VAL
=`echo $1 | sed 's,-L,,'`
1052 if [ "$1" = "-R" ]; then
1056 VAL
=`echo $1 | sed 's,-R,,'`
1061 VAL
=`echo $1 | sed 's,-l,,'`
1065 if [ "$1" = "-F" ]; then
1069 VAL
=`echo $1 | sed 's,-F,,'`
1074 if [ "$1" = "-fw" ]; then
1078 VAL
=`echo $1 | sed 's,-fw,,'`
1082 VAR
=`echo $1 | sed "s,^-\(.*\),\1,"`
1089 if [ "$UNKNOWN_ARG" = "yes" ]; then
1090 echo "$1: unknown argument"
1101 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1102 CFG_QT3SUPPORT
="$VAL"
1108 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1109 CFG_ACCESSIBILITY
="$VAL"
1118 CFG_USE_GNUMAKE
="$VAL"
1121 CFG_MYSQL_CONFIG
="$VAL"
1124 QT_INSTALL_PREFIX
="$VAL"
1127 QT_HOST_PREFIX
="$VAL"
1130 QT_FORCE_PKGCONFIG
=yes
1133 QT_INSTALL_DOCS
="$VAL"
1136 QT_INSTALL_HEADERS
="$VAL"
1139 QT_INSTALL_PLUGINS
="$VAL"
1142 QT_INSTALL_DATA
="$VAL"
1145 QT_INSTALL_LIBS
="$VAL"
1154 QT_INSTALL_TRANSLATIONS
="$VAL"
1156 sysconfdir|settingsdir
)
1157 QT_INSTALL_SETTINGS
="$VAL"
1160 QT_INSTALL_EXAMPLES
="$VAL"
1163 QT_INSTALL_DEMOS
="$VAL"
1169 QT_INSTALL_BINS
="$VAL"
1172 CFG_USER_BUILD_KEY
="$VAL"
1179 if [ "$PLATFORM_QWS" != "no" ]; then
1180 if [ "$PLATFORM_QWS" = "maybe" ]; then
1186 echo "No license exists to enable Qt for Embedded Linux. Disabling."
1191 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1198 if [ "$VAL" = "little" ]; then
1199 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
1200 elif [ "$VAL" = "big" ]; then
1201 CFG_ENDIAN
="Q_BIG_ENDIAN"
1207 if [ "$VAL" = "little" ]; then
1208 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
1209 elif [ "$VAL" = "big" ]; then
1210 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
1216 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1223 CFG_QWS_DEPTHS
="$VAL"
1226 if [ "$VAL" = "auto" ] ||
[ "$VAL" = "desktop" ] ||
1227 [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
1228 [ "$VAL" = "es1cl" ] ||
[ "$VAL" = "es1" ] ||
[ "$VAL" = "es2" ]; then
1235 if [ "$VAL" = "auto" ] ||
[ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1242 if [ "$PLATFORM_QWS" = "yes" ]; then
1243 echo "Error: Graphics System plugins are not supported on QWS."
1244 echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
1245 echo " rather than existing as a separate plugin."
1249 if [ "$VAL" = "opengl" ]; then
1250 CFG_GRAPHICS_SYSTEM
="opengl"
1251 elif [ "$VAL" = "openvg" ]; then
1252 CFG_GRAPHICS_SYSTEM
="openvg"
1253 elif [ "$VAL" = "raster" ]; then
1254 CFG_GRAPHICS_SYSTEM
="raster"
1261 qvfb
) # left for commandline compatibility, not documented
1262 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1263 if [ "$VAL" = "yes" ]; then
1264 QMakeVar add gfx-drivers qvfb
1265 QMakeVar add kbd-drivers qvfb
1266 QMakeVar add mouse-drivers qvfb
1267 CFG_GFX_ON
="$CFG_GFX_ON qvfb"
1268 CFG_KBD_ON
="$CFG_KBD_ON qvfb"
1269 CFG_MOUSE_ON
="$CFG_MOUSE_ON qvfb"
1276 CFG_NOBUILD_PARTS
="$CFG_NOBUILD_PARTS $VAL"
1279 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS $VAL"
1282 if [ "$PLATFORM_MAC" = "yes" ]; then
1284 elif [ "$PLATFORM_QWS" = "yes" ]; then
1287 if [ "$CFG_FRAMEWORK" = "auto" ]; then
1293 if [ "$PLATFORM_MAC" = "yes" ]; then
1300 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1301 CFG_MAC_DWARF2
="$VAL"
1307 if [ "$PLATFORM_MAC" = "yes" ]; then
1308 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $VAL"
1317 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1318 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86 ppc"
1324 if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
1325 CFG_MAC_COCOA
="$VAL"
1326 COMMANDLINE_MAC_COCOA
="$VAL"
1332 if [ "$PLATFORM_MAC" = "yes" ]; then
1333 CFG_FRAMEWORK
="$VAL"
1339 if [ "$VAL" = "yes" ]; then
1341 QMakeVar add QMAKE_CFLAGS
-pg
1342 QMakeVar add QMAKE_CXXFLAGS
-pg
1343 QMakeVar add QMAKE_LFLAGS
-pg
1344 QMAKE_VARS
="$QMAKE_VARS CONFIG+=nostrip"
1349 exceptions|g
++-exceptions)
1350 if [ "$VAL" = "no" ]; then
1352 elif [ "$VAL" = "yes" ]; then
1360 # keep compatibility with old platform names
1366 PLATFORM
=hpux-acc-o64
1369 PLATFORM
=hpux-acc-64
1372 PLATFORM
=hpux-acc-64
1384 PLATFORM
=reliant-cds-64
1387 PLATFORM
=solaris-cc-64
1390 PLATFORM
=solaris-cc-64
1393 PLATFORM
=unixware-cc
1396 PLATFORM
=unixware-g
++
1399 PLATFORM
=unixware-cc
1402 PLATFORM
=unixware-g
++
1408 i386
) NATIVE_64_ARCH
="x86_64" ;;
1409 powerpc
) NATIVE_64_ARCH
="ppc64" ;;
1410 *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
1412 if [ ! -z "$NATIVE_64_ARCH" ]; then
1413 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
1414 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
1423 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1424 CFG_DEBUG_RELEASE
="$VAL"
1430 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1431 CFG_RELEASE_QMAKE
="$VAL"
1437 if [ "$VAL" = "yes" ]; then
1439 elif [ "$VAL" = "no" ]; then
1446 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1447 CFG_PREFIX_INSTALL
="$VAL"
1455 developer-build|commercial|opensource|nokia-developer
)
1456 # These switches have been dealt with already
1459 if [ "$VAL" = "yes" ]; then
1461 elif [ "$VAL" = "no" ]; then
1468 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1469 CFG_INCREMENTAL
="$VAL"
1475 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1476 CFG_CONFIGURE_EXIT_ON_ERROR
="$VAL"
1482 if [ "$PLATFORM_QWS" = "yes" ]; then
1483 FEATURE
=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
1484 if [ "$VAL" = "no" ]; then
1485 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_$FEATURE"
1486 elif [ "$VAL" = "yes" ] ||
[ "$VAL" = "unknown" ]; then
1487 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_$FEATURE"
1496 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1503 [ "$VAL" = "qt" ] && VAL
=yes
1504 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1511 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1519 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1526 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1533 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1540 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1547 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1554 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1555 CFG_PRECOMPILE
="$VAL"
1560 separate-debug-info
)
1561 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1562 CFG_SEPARATE_DEBUG_INFO
="$VAL"
1563 elif [ "$VAL" = "nocopy" ] ; then
1564 CFG_SEPARATE_DEBUG_INFO
="yes"
1565 CFG_SEPARATE_DEBUG_INFO_NOCOPY
="yes"
1571 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1572 CFG_REDUCE_EXPORTS
="$VAL"
1578 if [ "$VAL" = "no" ]; then
1585 if [ "$VAL" = "no" ]; then
1592 if [ "$VAL" = "no" ]; then
1599 if [ "$VAL" = "no" ]; then
1609 if [ "$VAL" = "no" ]; then
1616 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1617 CFG_REDUCE_RELOCATIONS
="$VAL"
1623 [ "$VAL" = "qt" ] && VAL
=yes
1624 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1625 CFG_QWS_FREETYPE
="$VAL"
1631 [ "$VAL" = "qt" ] && VAL
=yes
1632 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1637 # No longer supported:
1638 #[ "$VAL" = "no" ] && CFG_LIBPNG=no
1641 if [ "$VAL" = "system" ]; then
1648 [ "$VAL" = "yes" ] && VAL
=qt
1649 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1656 [ "$VAL" = "yes" ] && VAL
=qt
1657 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1664 [ "$VAL" = "yes" ] && VAL
=qt
1665 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1672 [ "$VAL" = "yes" ] && VAL
=qt
1673 if [ "$VAL" = "qt" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "system" ]; then
1680 if [ "$VAL" = "system" ] ||
[ "$VAL" = "no" ]; then
1687 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1694 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1701 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "runtime" ]; then
1708 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1715 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1722 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1723 CFG_FONTCONFIG
="$VAL"
1729 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1736 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1743 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1750 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1757 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1758 CFG_GSTREAMER
="$VAL"
1764 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1765 CFG_QGTKSTYLE
="$VAL"
1771 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ] ||
[ "$VAL" = "linked" ]; then
1773 elif [ "$VAL" = "runtime" ]; then
1780 if [ "$VAL" = "yes" ]; then
1787 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1794 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1795 CFG_LARGEFILE
="$VAL"
1801 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
1808 if [ "$VAL" = "yes" ]; then
1809 CFG_OPENSSL
="linked"
1815 if [ "$VAL" = "yes" ]; then
1823 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1824 CFG_XMLPATTERNS
="yes"
1826 if [ "$VAL" = "no" ]; then
1827 CFG_XMLPATTERNS
="no"
1834 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1837 if [ "$VAL" = "no" ]; then
1845 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1846 CFG_SCRIPTTOOLS
="yes"
1848 if [ "$VAL" = "no" ]; then
1849 CFG_SCRIPTTOOLS
="no"
1856 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1859 if [ "$VAL" = "no" ]; then
1867 if [ "$VAL" = "yes" ]; then
1868 CFG_DECLARATIVE
="yes"
1870 if [ "$VAL" = "no" ]; then
1871 CFG_DECLARATIVE
="no"
1878 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ]; then
1881 if [ "$VAL" = "no" ]; then
1889 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "auto" ] ||
[ "$VAL" = "no" ]; then
1890 CFG_JAVASCRIPTCORE_JIT
="$VAL"
1896 if [ "$VAL" = "yes" ]; then
1897 OPT_CONFIRM_LICENSE
="$VAL"
1903 if [ "$VAL" = "yes" ]; then
1909 sql-
*|gfx-
*|decoration-
*|kbd-
*|mouse-
*)
1910 # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
1911 # if autoconf style options were used, $VAL can be "yes" or "no"
1912 [ "$VAL" = "yes" ] && VAL
=qt
1913 # now $VAL should be "no", "qt", or "plugin"... double-check
1914 if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
1917 # now $VAL is "no", "qt", or "plugin"
1919 VAL
=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
1920 VAR
=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
1922 # Grab the available values
1925 avail
="$CFG_SQL_AVAILABLE"
1928 avail
="$CFG_GFX_AVAILABLE"
1929 if [ "$OPT" = "plugin" ]; then
1930 avail
="$CFG_GFX_PLUGIN_AVAILABLE"
1934 avail
="$CFG_DECORATION_AVAILABLE"
1935 if [ "$OPT" = "plugin" ]; then
1936 avail
="$CFG_DECORATION_PLUGIN_AVAILABLE"
1940 avail
="$CFG_KBD_AVAILABLE"
1941 if [ "$OPT" = "plugin" ]; then
1942 avail
="$CFG_KBD_PLUGIN_AVAILABLE"
1946 avail
="$CFG_MOUSE_AVAILABLE"
1947 if [ "$OPT" = "plugin" ]; then
1948 avail
="$CFG_MOUSE_PLUGIN_AVAILABLE"
1953 echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
1957 # Check that that user's value is available.
1960 if [ "$VAL" = "$d" ]; then
1965 [ "$found" = yes ] || ERROR
=yes
1967 if [ "$VAR" = "sql" ]; then
1968 # set the CFG_SQL_driver
1969 eval "CFG_SQL_$VAL=\$OPT"
1973 if [ "$OPT" = "plugin" ] ||
[ "$OPT" = "qt" ]; then
1974 if [ "$OPT" = "plugin" ]; then
1975 [ "$VAR" = "decoration" ] && QMakeVar del
"${VAR}s" "$VAL"
1976 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
1977 [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
1978 [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
1979 [ "$VAR" = "mouse" ] && QMakeVar del
"${VAR}s" "$VAL"
1980 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
1981 [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
1982 [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
1985 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "decoration" ] ||
[ "$VAR" = "mouse" ]; then
1986 [ "$VAR" = "gfx" ] && CFG_GFX_ON
="$CFG_GFX_ON $VAL"
1987 [ "$VAR" = "kbd" ] && CFG_KBD_ON
="$CFG_KBD_ON $VAL"
1988 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
="$CFG_DECORATION_ON $VAL"
1989 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
="$CFG_MOUSE_ON $VAL"
1993 QMakeVar add
"${VAR}s" "${VAL}"
1994 elif [ "$OPT" = "no" ]; then
1995 PLUG_VAR
="${VAR}-plugin"
1996 if [ "$VAR" = "gfx" ] ||
[ "$VAR" = "kbd" ] ||
[ "$VAR" = "mouse" ]; then
1997 IN_VAR
="${VAR}-driver"
2001 [ "$VAR" = "decoration" ] && CFG_DECORATION_ON
=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
2002 [ "$VAR" = "gfx" ] && CFG_GFX_ON
=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
2003 [ "$VAR" = "kbd" ] && CFG_KBD_ON
=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
2004 [ "$VAR" = "mouse" ] && CFG_MOUSE_ON
=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
2005 QMakeVar del
"${IN_VAR}s" "$VAL"
2006 QMakeVar del
"${PLUG_VAR}s" "$VAL"
2008 if [ "$ERROR" = "yes" ]; then
2009 echo "$CURRENT_OPT: unknown argument"
2014 if [ "$VAL" = "yes" ]; then
2015 if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
2016 QMAKE_SWITCHES
="$QMAKE_SWITCHES -d"
2020 elif [ "$VAL" = "no" ]; then
2021 if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" |
grep ' -d' >/dev
/null
2>&1; then
2022 QMAKE_SWITCHES
=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
2031 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2038 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2045 D_FLAGS
="$D_FLAGS \"$VAL\""
2048 I_FLAGS
="$I_FLAGS -I\"${VAL}\""
2051 L_FLAGS
="$L_FLAGS -L\"${VAL}\""
2054 RPATH_FLAGS
="$RPATH_FLAGS \"${VAL}\""
2057 l_FLAGS
="$l_FLAGS -l\"${VAL}\""
2060 if [ "$PLATFORM_MAC" = "yes" ]; then
2061 L_FLAGS
="$L_FLAGS -F\"${VAL}\""
2062 I_FLAGS
="$I_FLAGS -F\"${VAL}\""
2068 if [ "$PLATFORM_MAC" = "yes" ]; then
2069 l_FLAGS
="$l_FLAGS -framework \"${VAL}\""
2078 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2085 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2086 CFG_PHONON_BACKEND
="$VAL"
2092 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2093 CFG_MULTIMEDIA
="$VAL"
2099 if [ "$VAL" = "yes" ] ||
[ "$VAL" = "no" ]; then
2100 CFG_AUDIO_BACKEND
="$VAL"
2109 if [ "$UNKNOWN_OPT" = "yes" ]; then
2110 echo "${CURRENT_OPT}: invalid command-line switch"
2116 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
2117 echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
2121 # update QT_CONFIG to show our current predefined configuration
2122 case "$CFG_QCONFIG" in
2123 minimal|small|medium|large|full
)
2124 # these are a sequence of increasing functionality
2125 for c
in minimal small medium large full
; do
2126 QT_CONFIG
="$QT_CONFIG $c-config"
2127 [ "$CFG_QCONFIG" = $c ] && break
2131 # not known to be sufficient for anything
2132 if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
2133 echo >&2 "Error: configuration file not found:"
2134 echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
2139 #-------------------------------------------------------------------------------
2140 # build tree initialization
2141 #-------------------------------------------------------------------------------
2143 # where to find which..
2144 unixtests
="$relpath/config.tests/unix"
2145 mactests
="$relpath/config.tests/mac"
2146 WHICH
="$unixtests/which.test"
2148 PERL
=`$WHICH perl 2>/dev/null`
2150 # find out which awk we want to use, prefer gawk, then nawk, then regular awk
2152 for e
in gawk nawk
awk; do
2153 if "$WHICH" $e >/dev
/null
2>&1 && ( $e -f /dev
/null
/dev
/null
) >/dev
/null
2>&1; then
2160 PERL
="/usr/bin/perl"
2161 if "$WHICH" perl
>/dev
/null
2>&1 && ( perl
/dev
/null
) >/dev
/null
2>&1; then
2165 ### skip this if the user just needs help...
2166 if [ "$OPT_HELP" != "yes" ]; then
2168 # is this a shadow build?
2169 if [ "$OPT_SHADOW" = "maybe" ]; then
2171 if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
2172 if [ -h "$outpath" ]; then
2173 [ "$relpath" -ef "$outpath" ] || OPT_SHADOW
=yes
2179 if [ "$OPT_SHADOW" = "yes" ]; then
2180 if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
2181 echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
2182 echo >&2 "Cannot proceed."
2185 [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
2188 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2190 echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
2191 echo "By default, Qt is built in release mode with separate debug information, so"
2192 echo "-debug-and-release is not necessary anymore"
2196 # detect build style
2197 if [ "$CFG_DEBUG" = "auto" ]; then
2198 if [ "$PLATFORM_MAC" = "yes" ]; then
2199 CFG_DEBUG_RELEASE
=yes
2201 elif [ "$CFG_DEV" = "yes" ]; then
2202 CFG_DEBUG_RELEASE
=no
2205 CFG_DEBUG_RELEASE
=no
2209 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
2210 QMAKE_CONFIG
="$QMAKE_CONFIG build_all"
2213 if [ "$CFG_SILENT" = "yes" ]; then
2214 QMAKE_CONFIG
="$QMAKE_CONFIG silent"
2217 # if the source tree is different from the build tree,
2218 # symlink or copy part of the sources
2219 if [ "$OPT_SHADOW" = "yes" ]; then
2220 echo "Preparing build tree..."
2222 if [ -z "$PERL" ]; then
2224 echo "You need perl in your PATH to make a shadow build."
2225 echo "Cannot proceed."
2229 [ -d "$outpath/bin" ] || mkdir
-p "$outpath/bin"
2231 # symlink the qmake directory
2232 find "$relpath/qmake" |
while read a
; do
2233 my_a
=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
2234 if [ '!' -f "$my_a" ]; then
2235 if [ -d "$a" ]; then
2236 # directories are created...
2239 a_dir
=`dirname "$my_a"`
2240 [ -d "$a_dir" ] || mkdir
-p "$a_dir"
2241 # ... and files are symlinked
2242 case `basename "$a"` in
2243 *.o|
*.d|GNUmakefile
*|qmake
)
2254 # make a syncqt script that can be used in the shadow
2255 rm -f "$outpath/bin/syncqt"
2256 if [ -x "$relpath/bin/syncqt" ]; then
2257 mkdir
-p "$outpath/bin"
2258 echo "#!/bin/sh" >"$outpath/bin/syncqt"
2259 echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
2260 echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
2261 chmod 755 "$outpath/bin/syncqt"
2264 # symlink the mkspecs directory
2265 mkdir
-p "$outpath/mkspecs"
2266 rm -f "$outpath"/mkspecs
/*
2267 ln -s "$relpath"/mkspecs
/* "$outpath/mkspecs"
2268 rm -f "$outpath/mkspecs/default"
2270 # symlink the doc directory
2271 rm -rf "$outpath/doc"
2272 ln -s "$relpath/doc" "$outpath/doc"
2274 # make sure q3porting.xml can be found
2275 mkdir
-p "$outpath/tools/porting/src"
2276 rm -f "$outpath/tools/porting/src/q3porting.xml"
2277 ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
2280 # symlink fonts to be able to run application from build directory
2281 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
2282 if [ "$PLATFORM" = "$XPLATFORM" ]; then
2283 mkdir
-p "${outpath}/lib"
2284 ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
2288 if [ "$OPT_FAST" = "auto" ]; then
2289 if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
2296 # find a make command
2297 if [ -z "$MAKE" ]; then
2299 for mk
in gmake
make; do
2300 if "$WHICH" $mk >/dev
/null
2>&1; then
2305 if [ -z "$MAKE" ]; then
2306 echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
2307 echo >&2 "Cannot proceed."
2310 # export MAKE, we need it later in the config.tests
2316 #-------------------------------------------------------------------------------
2317 # auto-detect all that hasn't been specified in the arguments
2318 #-------------------------------------------------------------------------------
2320 [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED
=auto
2321 if [ "$CFG_EMBEDDED" != "no" ]; then
2322 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2324 [ -z "$PLATFORM" ] && PLATFORM
=qws
/macx-generic-g
++
2325 if [ -z "$XPLATFORM" ]; then
2326 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2327 XPLATFORM
="qws/macx-$CFG_EMBEDDED-g++"
2331 [ -z "$PLATFORM" ] && PLATFORM
=qws
/freebsd-generic-g
++
2332 if [ -z "$XPLATFORM" ]; then
2333 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2334 XPLATFORM
="qws/freebsd-$CFG_EMBEDDED-g++"
2338 [ -z "$PLATFORM" ] && PLATFORM
=qws
/solaris-generic-g
++
2339 if [ -z "$XPLATFORM" ]; then
2340 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2341 XPLATFORM
="qws/solaris-$CFG_EMBEDDED-g++"
2345 if [ -z "$PLATFORM" ]; then
2346 case "$UNAME_MACHINE" in
2348 PLATFORM
=qws
/linux-x86-g
++
2351 PLATFORM
=qws
/linux-x86_64-g
++
2354 PLATFORM
=qws
/linux-generic-g
++
2358 if [ -z "$XPLATFORM" ]; then
2359 if [ "$CFG_EMBEDDED" = "auto" ]; then
2360 if [ -n "$CFG_ARCH" ]; then
2361 CFG_EMBEDDED
=$CFG_ARCH
2363 case "$UNAME_MACHINE" in
2371 CFG_EMBEDDED
=generic
2376 XPLATFORM
="qws/linux-$CFG_EMBEDDED-g++"
2380 [ -z "$PLATFORM" ] && PLATFORM
=unsupported
/qws
/qnx-generic-g
++
2381 if [ -z "$XPLATFORM" ]; then
2382 [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED
=generic
2383 XPLATFORM
="unsupported/qws/qnx-$CFG_EMBEDDED-g++"
2390 echo "Qt for Embedded Linux is not supported on this platform. Disabling."
2396 if [ -z "$PLATFORM" ]; then
2398 case "$UNAME_SYSTEM:$UNAME_RELEASE" in
2400 if [ "$PLATFORM_MAC" = "yes" ]; then
2402 # PLATFORM=macx-xcode
2409 #PLATFORM=aix-g++-64
2411 #PLATFORM=aix-xlc-64
2413 - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
2423 # PLATFORM=dynix-g++
2429 PLATFORM
=freebsd-g
++
2431 - Also available for FreeBSD: freebsd-icc
2435 PLATFORM
=openbsd-g
++
2446 #PLATFORM=irix-cc-64
2448 - Also available for IRIX: irix-g++ irix-cc-64
2452 case "$UNAME_MACHINE" in
2454 #PLATFORM=hpuxi-acc-32
2455 PLATFORM
=hpuxi-acc-64
2457 - Also available for HP-UXi: hpuxi-acc-32
2463 #PLATFORM=hpux-acc-64
2465 #PLATFORM=hpux-acc-o64
2467 - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
2476 - Also available for Tru64: tru64-g++
2480 case "$UNAME_MACHINE" in
2482 PLATFORM
=linux-g
++-64
2489 - Also available for Linux: linux-kcc linux-icc linux-cxx
2493 #PLATFORM=solaris-g++
2495 #PLATFORM=solaris-cc64
2497 - Also available for Solaris: solaris-g++ solaris-cc-64
2500 ReliantUNIX-
*:*|SINIX-
*:*)
2501 PLATFORM
=reliant-cds
2502 #PLATFORM=reliant-cds-64
2504 - Also available for Reliant UNIX: reliant-cds-64
2514 #PLATFORM=unixware-g++
2515 PLATFORM
=unixware-cc
2517 - Also available for OpenUNIX: unixware-g++
2521 #PLATFORM=unixware-g++
2522 PLATFORM
=unixware-cc
2524 - Also available for UnixWare: unixware-g++
2531 - Also available for SCO OpenServer: sco-g++
2535 PLATFORM
=unixware-g
++
2538 PLATFORM
=unsupported
/qnx-g
++
2541 if [ "$OPT_HELP" != "yes" ]; then
2543 for p
in $PLATFORMS; do
2544 echo " $relconf $* -platform $p"
2547 echo " The build script does not currently recognize all" >&2
2548 echo " platforms supported by Qt." >&2
2549 echo " Rerun this script with a -platform option listed to" >&2
2550 echo " set the system/compiler combination you use." >&2
2557 if [ "$PLATFORM_QWS" = "yes" ]; then
2559 PLATFORMS
=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
2561 PLATFORMS
=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
2564 [ -z "$XPLATFORM" ] && XPLATFORM
="$PLATFORM"
2565 if [ -d "$PLATFORM" ]; then
2566 QMAKESPEC
="$PLATFORM"
2568 QMAKESPEC
="$relpath/mkspecs/${PLATFORM}"
2570 if [ -d "$XPLATFORM" ]; then
2571 XQMAKESPEC
="$XPLATFORM"
2573 XQMAKESPEC
="$relpath/mkspecs/${XPLATFORM}"
2575 if [ "$PLATFORM" != "$XPLATFORM" ]; then
2576 QT_CROSS_COMPILE
=yes
2577 QMAKE_CONFIG
="$QMAKE_CONFIG cross_compile"
2580 if [ "$PLATFORM_MAC" = "yes" ]; then
2581 if [ `basename $QMAKESPEC` = "macx-xcode" ] ||
[ `basename $XQMAKESPEC` = "macx-xcode" ]; then
2583 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
2584 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
2585 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
2586 echo " built with 'macx-g++'" >&2
2592 # check specified platforms are supported
2593 if [ '!' -d "$QMAKESPEC" ]; then
2595 echo " The specified system/compiler is not supported:"
2599 echo " Please see the README file for a complete list."
2603 if [ '!' -d "$XQMAKESPEC" ]; then
2605 echo " The specified system/compiler is not supported:"
2609 echo " Please see the README file for a complete list."
2613 if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
2615 echo " The specified system/compiler port is not complete:"
2617 echo " $XQMAKESPEC/qplatformdefs.h"
2619 echo " Please contact qt-bugs@trolltech.com."
2624 # now look at the configs and figure out what platform we are config'd for
2625 [ "$CFG_EMBEDDED" = "no" ] \
2626 && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
2628 ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
2630 if [ "$UNAME_SYSTEM" = "SunOS" ]; then
2631 # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
2632 if echo $UNAME_RELEASE |
grep "^5\.[5|6]" >/dev
/null
2>&1; then
2633 sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
2634 mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
2638 #-------------------------------------------------------------------------------
2639 # determine the system architecture
2640 #-------------------------------------------------------------------------------
2641 if [ "$OPT_VERBOSE" = "yes" ]; then
2642 echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
2645 if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
2646 if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
2648 echo "You have specified a target architecture with -embedded and -arch."
2649 echo "The two architectures you have specified are different, so we can"
2650 echo "not proceed. Either set both to be the same, or only use -embedded."
2656 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
2657 case `basename "$XPLATFORM"` in
2660 echo "You are not licensed for Qt for `basename $XPLATFORM`."
2662 echo "Please contact qt-info@nokia.com to upgrade your license to"
2663 echo "include this platform, or install the Qt Open Source Edition"
2664 echo "if you intend to develop free software."
2670 if [ -z "${CFG_HOST_ARCH}" ]; then
2671 case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
2673 CFG_HOST_ARCH
=`uname -p`
2674 if [ "$OPT_VERBOSE" = "yes" ]; then
2675 echo " SGI ($CFG_HOST_ARCH)"
2679 case "$UNAME_MACHINE" in
2681 if [ "$OPT_VERBOSE" = "yes" ]; then
2682 echo " Sun SPARC (sparc)"
2689 if [ "$OPT_VERBOSE" = "yes" ]; then
2690 echo " 64-bit AMD 80x86 (x86_64)"
2692 CFG_HOST_ARCH
=x86_64
2695 if [ "$OPT_VERBOSE" = "yes" ]; then
2696 echo " 32-bit Intel 80x86 (i386)"
2704 case "$UNAME_MACHINE" in
2706 if [ "$OPT_VERBOSE" = "yes" ]; then
2707 echo " 32-bit Apple PowerPC (powerpc)"
2711 if [ "$OPT_VERBOSE" = "yes" ]; then
2712 echo " 32-bit Intel 80x86 (i386)"
2716 CFG_HOST_ARCH
=macosx
2719 if [ "$OPT_VERBOSE" = "yes" ]; then
2720 echo " 64-bit IBM PowerPC (powerpc)"
2722 CFG_HOST_ARCH
=powerpc
2725 if [ "$OPT_VERBOSE" = "yes" ]; then
2726 echo " HP PA-RISC (parisc)"
2728 CFG_HOST_ARCH
=parisc
2731 if [ "$OPT_VERBOSE" = "yes" ]; then
2732 echo " 32-bit Intel 80x86 (i386)"
2736 *:*:x86_64|
*:*:amd64
)
2737 if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
2738 if [ "$OPT_VERBOSE" = "yes" ]; then
2739 echo " 32 bit on 64-bit AMD 80x86 (i386)"
2743 if [ "$OPT_VERBOSE" = "yes" ]; then
2744 echo " 64-bit AMD 80x86 (x86_64)"
2746 CFG_HOST_ARCH
=x86_64
2750 if [ "$OPT_VERBOSE" = "yes" ]; then
2751 echo " 32-bit PowerPC (powerpc)"
2753 CFG_HOST_ARCH
=powerpc
2756 if [ "$OPT_VERBOSE" = "yes" ]; then
2757 echo " 64-bit PowerPC (powerpc)"
2759 CFG_HOST_ARCH
=powerpc
2762 if [ "$OPT_VERBOSE" = "yes" ]; then
2763 echo " IBM S/390 (s390)"
2768 if [ "$OPT_VERBOSE" = "yes" ]; then
2774 if [ "$OPT_VERBOSE" = "yes" ]; then
2775 echo " Linux on SPARC"
2780 case "$UNAME_MACHINE" in
2782 if [ "$OPT_VERBOSE" = "yes" ]; then
2783 echo " QNX on Intel 80x86 (i386)"
2790 if [ "$OPT_VERBOSE" = "yes" ]; then
2791 echo " Trying '$UNAME_MACHINE'..."
2793 CFG_HOST_ARCH
="$UNAME_MACHINE"
2798 if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
2799 if [ -n "$CFG_ARCH" ]; then
2800 CFG_EMBEDDED
=$CFG_ARCH
2803 case "$CFG_EMBEDDED" in
2823 CFG_ARCH
="$CFG_EMBEDDED"
2826 elif [ "$PLATFORM_MAC" = "yes" ] ||
[ -z "$CFG_ARCH" ]; then
2827 CFG_ARCH
=$CFG_HOST_ARCH
2830 if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
2831 if [ "$OPT_VERBOSE" = "yes" ]; then
2832 echo " '$CFG_ARCH' is supported"
2835 if [ "$OPT_VERBOSE" = "yes" ]; then
2836 echo " '$CFG_ARCH' is unsupported, using 'generic'"
2840 if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
2841 if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
2842 if [ "$OPT_VERBOSE" = "yes" ]; then
2843 echo " '$CFG_HOST_ARCH' is supported"
2846 if [ "$OPT_VERBOSE" = "yes" ]; then
2847 echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
2849 CFG_HOST_ARCH
=generic
2853 if [ "$OPT_VERBOSE" = "yes" ]; then
2854 echo "System architecture: '$CFG_ARCH'"
2855 if [ "$PLATFORM_QWS" = "yes" ]; then
2856 echo "Host architecture: '$CFG_HOST_ARCH'"
2860 #-------------------------------------------------------------------------------
2861 # tests that don't need qmake (must be run before displaying help)
2862 #-------------------------------------------------------------------------------
2864 if [ -z "$PKG_CONFIG" ]; then
2865 # See if PKG_CONFIG is set in the mkspec:
2866 PKG_CONFIG
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
2868 if [ -z "$PKG_CONFIG" ]; then
2869 PKG_CONFIG
=`"$WHICH" pkg-config 2>/dev/null`
2872 # Work out if we can use pkg-config
2873 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
2874 if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
2876 echo >&2 "You have asked to use pkg-config and are cross-compiling."
2877 echo >&2 "Please make sure you have a correctly set-up pkg-config"
2878 echo >&2 "environment!"
2880 if [ -z "$PKG_CONFIG_PATH" ]; then
2882 echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
2883 echo >&2 "the host compiler's .pc files will be used. This is probably"
2884 echo >&2 "not what you want."
2886 elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
2888 echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
2889 echo >&2 "been set. This means your toolchain's .pc files must contain"
2890 echo >&2 "the paths to the toolchain's libraries & headers. If configure"
2891 echo >&2 "tests are failing, please check these files."
2896 echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
2897 echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
2898 echo >&2 "dependencies"
2904 # process CFG_MAC_ARCHS
2905 if [ "$PLATFORM_MAC" = "yes" ]; then
2906 # check -arch arguments for validity.
2907 ALLOWED
="x86 ppc x86_64 ppc64 i386"
2908 # Save the list so we can re-write it using only valid values
2909 CFG_MAC_ARCHS_IN
="$CFG_MAC_ARCHS"
2911 for i
in $CFG_MAC_ARCHS_IN
2913 if echo "$ALLOWED" |
grep -w -v "$i" > /dev
/null
2>&1; then
2914 echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
2917 if [ "$i" = "i386" -o "$i" = "x86" ]; then
2918 # These are synonymous values
2919 # CFG_MAC_ARCHS requires x86 while GCC requires i386
2920 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS x86"
2921 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch i386"
2923 CFG_MAC_ARCHS
="$CFG_MAC_ARCHS $i"
2924 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -arch $i"
2929 # pass on $CFG_SDK to the configure tests.
2930 if [ '!' -z "$CFG_SDK" ]; then
2931 MAC_CONFIG_TEST_COMMANDLINE
="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
2934 # find the default framework value
2935 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
2936 if [ "$CFG_FRAMEWORK" = "auto" ]; then
2937 CFG_FRAMEWORK
="$CFG_SHARED"
2938 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
2940 echo "WARNING: Using static linking will disable the use of Mac frameworks."
2948 QMAKE_CONF_COMPILER
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
2950 [ -z "$TEST_COMPILER" ] && TEST_COMPILER
=$QMAKE_CONF_COMPILER
2951 if [ -z "$TEST_COMPILER" ]; then
2952 echo "ERROR: Cannot set the compiler for the configuration tests"
2956 # auto-detect precompiled header support
2957 if [ "$CFG_PRECOMPILE" = "auto" ]; then
2958 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2960 elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
2965 elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
2967 echo "WARNING: Using universal binaries disables precompiled headers."
2972 #auto-detect DWARF2 on the mac
2973 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
2974 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2981 # auto-detect support for -Xarch on the mac
2982 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then
2983 if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
2990 # don't autodetect support for separate debug info on objcopy when
2991 # cross-compiling as lots of toolchains seems to have problems with this
2992 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
2993 CFG_SEPARATE_DEBUG_INFO
="no"
2996 # auto-detect support for separate debug info in objcopy
2997 if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
2998 TEST_COMPILER_CFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
2999 TEST_COMPILER_CXXFLAGS
=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
3000 TEST_OBJCOPY
=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
3001 COMPILER_WITH_FLAGS
="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
3002 COMPILER_WITH_FLAGS
=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
3003 if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
3004 CFG_SEPARATE_DEBUG_INFO
=no
3008 # binutils on HP-UX is buggy; default to no.
3009 CFG_SEPARATE_DEBUG_INFO
=no
3012 CFG_SEPARATE_DEBUG_INFO
=yes
3018 # auto-detect -fvisibility support
3019 if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
3020 if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3021 CFG_REDUCE_EXPORTS
=no
3023 CFG_REDUCE_EXPORTS
=yes
3027 # detect the availability of the -Bsymbolic-functions linker optimization
3028 if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
3029 if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
3030 CFG_REDUCE_RELOCATIONS
=no
3032 CFG_REDUCE_RELOCATIONS
=yes
3036 # auto-detect GNU make support
3037 if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v |
grep "GNU Make" >/dev
/null
2>&1; then
3041 # If -opengl wasn't specified, don't try to auto-detect
3042 if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
3047 if [ "$PLATFORM_MAC" = "yes" ]; then
3048 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
3053 # find the default framework value
3054 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
3055 if [ "$CFG_FRAMEWORK" = "auto" ]; then
3056 CFG_FRAMEWORK
="$CFG_SHARED"
3057 elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
3059 echo "WARNING: Using static linking will disable the use of Mac frameworks."
3067 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
3068 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
3069 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
3070 # get the darwin version. 10.0.0 and up means snow leopard.
3071 VERSION
=`uname -r | tr '.' ' ' | awk '{print $1}'`
3072 if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
3074 echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
3079 # x11 tests are done after qmake is built
3082 #setup the build parts
3083 if [ -z "$CFG_BUILD_PARTS" ]; then
3084 CFG_BUILD_PARTS
="$QT_DEFAULT_BUILD_PARTS"
3086 # don't build tools by default when cross-compiling
3087 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3088 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
3091 for nobuild
in $CFG_NOBUILD_PARTS; do
3092 CFG_BUILD_PARTS
=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
3094 if echo $CFG_BUILD_PARTS |
grep -v libs
>/dev
/null
2>&1; then
3096 # echo "WARNING: libs is a required part of the build."
3098 CFG_BUILD_PARTS
="$CFG_BUILD_PARTS libs"
3101 #-------------------------------------------------------------------------------
3102 # post process QT_INSTALL_* variables
3103 #-------------------------------------------------------------------------------
3106 if [ -z "$QT_INSTALL_PREFIX" ]; then
3107 if [ "$CFG_DEV" = "yes" ]; then
3108 QT_INSTALL_PREFIX
="$outpath" # In Development, we use sandboxed builds by default
3109 elif [ "$PLATFORM_QWS" = "yes" ]; then
3110 QT_INSTALL_PREFIX
="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
3111 if [ "$PLATFORM" != "$XPLATFORM" ]; then
3112 QT_INSTALL_PREFIX
="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
3115 QT_INSTALL_PREFIX
="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
3118 QT_INSTALL_PREFIX
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
3121 if [ -z "$QT_INSTALL_DOCS" ]; then #default
3122 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3123 if [ "$PLATFORM_MAC" = "yes" ]; then
3124 QT_INSTALL_DOCS
="/Developer/Documentation/Qt"
3127 [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS
="$QT_INSTALL_PREFIX/doc" #fallback
3130 QT_INSTALL_DOCS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
3133 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
3134 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3135 if [ "$PLATFORM_MAC" = "yes" ]; then
3136 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3141 [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS
="$QT_INSTALL_PREFIX/include"
3144 QT_INSTALL_HEADERS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
3147 if [ -z "$QT_INSTALL_LIBS" ]; then #default
3148 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3149 if [ "$PLATFORM_MAC" = "yes" ]; then
3150 if [ "$CFG_FRAMEWORK" = "yes" ]; then
3151 QT_INSTALL_LIBS
="/Libraries/Frameworks"
3155 [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS
="$QT_INSTALL_PREFIX/lib" #fallback
3157 QT_INSTALL_LIBS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
3160 if [ -z "$QT_INSTALL_BINS" ]; then #default
3161 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3162 if [ "$PLATFORM_MAC" = "yes" ]; then
3163 QT_INSTALL_BINS
="/Developer/Applications/Qt"
3166 [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS
="$QT_INSTALL_PREFIX/bin" #fallback
3169 QT_INSTALL_BINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
3172 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
3173 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3174 if [ "$PLATFORM_MAC" = "yes" ]; then
3175 QT_INSTALL_PLUGINS
="/Developer/Applications/Qt/plugins"
3178 [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS
="$QT_INSTALL_PREFIX/plugins" #fallback
3180 QT_INSTALL_PLUGINS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
3183 if [ -z "$QT_INSTALL_DATA" ]; then #default
3184 QT_INSTALL_DATA
="$QT_INSTALL_PREFIX"
3186 QT_INSTALL_DATA
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
3189 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
3190 QT_INSTALL_TRANSLATIONS
="$QT_INSTALL_PREFIX/translations"
3192 QT_INSTALL_TRANSLATIONS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
3195 if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
3196 if [ "$PLATFORM_MAC" = "yes" ]; then
3197 QT_INSTALL_SETTINGS
=/Library
/Preferences
/Qt
3199 QT_INSTALL_SETTINGS
=/etc
/xdg
3202 QT_INSTALL_SETTINGS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
3205 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
3206 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3207 if [ "$PLATFORM_MAC" = "yes" ]; then
3208 QT_INSTALL_EXAMPLES
="/Developer/Examples/Qt"
3211 [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES
="$QT_INSTALL_PREFIX/examples" #fallback
3213 QT_INSTALL_EXAMPLES
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
3216 if [ -z "$QT_INSTALL_DEMOS" ]; then #default
3217 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
3218 if [ "$PLATFORM_MAC" = "yes" ]; then
3219 QT_INSTALL_DEMOS
="/Developer/Examples/Qt/Demos"
3222 [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS
="$QT_INSTALL_PREFIX/demos"
3224 QT_INSTALL_DEMOS
=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
3226 #-------------------------------------------------------------------------------
3227 # help - interactive parts of the script _after_ this section please
3228 #-------------------------------------------------------------------------------
3230 # next, emit a usage message if something failed.
3231 if [ "$OPT_HELP" = "yes" ]; then
3232 [ "x$ERROR" = "xyes" ] && echo
3233 if [ "$CFG_NIS" = "no" ]; then
3240 if [ "$CFG_CUPS" = "no" ]; then
3247 if [ "$CFG_ICONV" = "no" ]; then
3254 if [ "$CFG_LARGEFILE" = "no" ]; then
3261 if [ "$CFG_STL" = "auto" ] ||
[ "$CFG_STL" = "yes" ]; then
3268 if [ "$CFG_IPV6" = "auto" ]; then
3272 if [ "$CFG_PRECOMPILE" = "auto" ] ||
[ "$CFG_PRECOMPILE" = "no" ]; then
3281 Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
3282 [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
3283 [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
3284 [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
3285 [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
3286 [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
3287 [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
3288 [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
3289 [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
3290 [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
3291 [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
3292 [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
3293 [-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
3294 [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
3295 [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
3296 [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
3297 [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
3298 [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
3299 [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
3300 [-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked]
3301 [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
3302 [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
3304 [additional platform specific options (see below)]
3307 Installation options:
3309 These are optional, but you may specify install directories.
3311 -prefix <dir> ...... This will install everything relative to <dir>
3312 (default $QT_INSTALL_PREFIX)
3314 if [ "$PLATFORM_QWS" = "yes" ]; then
3317 -hostprefix [dir] .. Tools and libraries needed when developing
3318 applications are installed in [dir]. If [dir] is
3319 not given, the current build directory will be used.
3324 * -prefix-install .... Force a sandboxed "local" installation of
3325 Qt. This will install into
3326 $QT_INSTALL_PREFIX, if this option is
3327 disabled then some platforms will attempt a
3328 "system" install by placing default values to
3329 be placed in a system location other than
3332 You may use these to separate different parts of the install:
3334 -bindir <dir> ......... Executables will be installed to <dir>
3335 (default PREFIX/bin)
3336 -libdir <dir> ......... Libraries will be installed to <dir>
3337 (default PREFIX/lib)
3338 -docdir <dir> ......... Documentation will be installed to <dir>
3339 (default PREFIX/doc)
3340 -headerdir <dir> ...... Headers will be installed to <dir>
3341 (default PREFIX/include)
3342 -plugindir <dir> ...... Plugins will be installed to <dir>
3343 (default PREFIX/plugins)
3344 -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
3346 -translationdir <dir> . Translations of Qt programs will be installed to <dir>
3347 (default PREFIX/translations)
3348 -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
3349 (default PREFIX/etc/settings)
3350 -examplesdir <dir> .... Examples will be installed to <dir>
3351 (default PREFIX/examples)
3352 -demosdir <dir> ....... Demos will be installed to <dir>
3353 (default PREFIX/demos)
3355 You may use these options to turn on strict plugin loading.
3357 -buildkey <key> .... Build the Qt library and plugins using the specified
3358 <key>. When the library loads plugins, it will only
3359 load those that have a matching key.
3363 The defaults (*) are usually acceptable. A plus (+) denotes a default value
3364 that needs to be evaluated. If the evaluation succeeds, the feature is
3365 included. Here is a short explanation of each option:
3367 * -release ........... Compile and link Qt with debugging turned off.
3368 -debug ............. Compile and link Qt with debugging turned on.
3369 -debug-and-release . Compile and link two versions of Qt, with and without
3370 debugging turned on (Mac only).
3372 -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
3374 -opensource......... Compile and link the Open-Source Edition of Qt.
3375 -commercial......... Compile and link the Commercial Edition of Qt.
3378 * -shared ............ Create and use shared Qt libraries.
3379 -static ............ Create and use static Qt libraries.
3381 * -no-fast ........... Configure Qt normally by generating Makefiles for all
3383 -fast .............. Configure Qt quickly by generating Makefiles only for
3384 library and subdirectory targets. All other Makefiles
3385 are created as wrappers, which will in turn run qmake.
3387 -no-largefile ...... Disables large file support.
3388 + -largefile ......... Enables Qt to access files larger than 4 GB.
3391 if [ "$PLATFORM_QWS" = "yes" ]; then
3398 if [ "$CFG_DBUS" = "no" ]; then
3407 $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
3408 $EXCY -exceptions ........ Enable exceptions on compilers that support it.
3410 -no-accessibility .. Do not compile Accessibility support.
3411 * -accessibility ..... Compile Accessibility support.
3413 $SHN -no-stl ............ Do not compile STL support.
3414 $SHY -stl ............... Compile STL support.
3416 -no-sql-<driver> ... Disable SQL <driver> entirely.
3417 -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
3419 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
3422 Possible values for <driver>:
3423 [ $CFG_SQL_AVAILABLE ]
3425 -system-sqlite ..... Use sqlite from the operating system.
3427 -no-qt3support ..... Disables the Qt 3 support functionality.
3428 * -qt3support ........ Enables the Qt 3 support functionality.
3430 -no-xmlpatterns .... Do not build the QtXmlPatterns module.
3431 + -xmlpatterns ....... Build the QtXmlPatterns module.
3432 QtXmlPatterns is built if a decent C++ compiler
3433 is used and exceptions are enabled.
3435 -no-multimedia ..... Do not build the QtMultimedia module.
3436 + -multimedia ........ Build the QtMultimedia module.
3438 -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
3439 + -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
3441 -no-phonon ......... Do not build the Phonon module.
3442 + -phonon ............ Build the Phonon module.
3443 Phonon is built if a decent C++ compiler is used.
3444 -no-phonon-backend.. Do not build the platform phonon plugin.
3445 + -phonon-backend..... Build the platform phonon plugin.
3447 -no-svg ............ Do not build the SVG module.
3448 + -svg ............... Build the SVG module.
3450 -no-webkit ......... Do not build the WebKit module.
3451 + -webkit ............ Build the WebKit module.
3452 WebKit is built if a decent C++ compiler is used.
3454 -no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
3455 + -javascript-jit .... Build the JavaScriptCore JIT compiler.
3457 -no-script ......... Do not build the QtScript module.
3458 + -script ............ Build the QtScript module.
3460 -no-scripttools .... Do not build the QtScriptTools module.
3461 + -scripttools ....... Build the QtScriptTools module.
3463 + -no-declarative .....Do not build the declarative module.
3464 -declarative ....... Build the declarative module.
3466 -platform target ... The operating system and compiler you are building
3469 See the README file for a list of supported
3470 operating systems and compilers.
3472 if [ "${PLATFORM_QWS}" != "yes" ]; then
3474 -graphicssystem <sys> Sets an alternate graphics system. Available options are:
3475 raster - Software rasterizer
3476 opengl - Rendering via OpenGL, Experimental!
3481 -no-mmx ............ Do not compile with use of MMX instructions.
3482 -no-3dnow .......... Do not compile with use of 3DNOW instructions.
3483 -no-sse ............ Do not compile with use of SSE instructions.
3484 -no-sse2 ........... Do not compile with use of SSE2 instructions.
3486 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
3487 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
3489 -D <string> ........ Add an explicit define to the preprocessor.
3490 -I <string> ........ Add an explicit include path.
3491 -L <string> ........ Add an explicit library path.
3493 -help, -h .......... Display this information.
3495 Third Party Libraries:
3497 -qt-zlib ........... Use the zlib bundled with Qt.
3498 + -system-zlib ....... Use zlib from the operating system.
3499 See http://www.gzip.org/zlib
3501 -no-gif ............ Do not compile the plugin for GIF reading support.
3502 * -qt-gif ............ Compile the plugin for GIF reading support.
3503 See also src/plugins/imageformats/gif/qgifhandler.h
3505 -no-libtiff ........ Do not compile the plugin for TIFF support.
3506 -qt-libtiff ........ Use the libtiff bundled with Qt.
3507 + -system-libtiff .... Use libtiff from the operating system.
3508 See http://www.libtiff.org
3510 -no-libpng ......... Do not compile in PNG support.
3511 -qt-libpng ......... Use the libpng bundled with Qt.
3512 + -system-libpng ..... Use libpng from the operating system.
3513 See http://www.libpng.org/pub/png
3515 -no-libmng ......... Do not compile the plugin for MNG support.
3516 -qt-libmng ......... Use the libmng bundled with Qt.
3517 + -system-libmng ..... Use libmng from the operating system.
3518 See http://www.libmng.com
3520 -no-libjpeg ........ Do not compile the plugin for JPEG support.
3521 -qt-libjpeg ........ Use the libjpeg bundled with Qt.
3522 + -system-libjpeg .... Use libjpeg from the operating system.
3523 See http://www.ijg.org
3525 -no-openssl ........ Do not compile support for OpenSSL.
3526 + -openssl ........... Enable run-time OpenSSL support.
3527 -openssl-linked .... Enabled linked OpenSSL support.
3529 -ptmalloc .......... Override the system memory allocator with ptmalloc.
3534 -make <part> ....... Add part to the list of parts to be built at make time.
3535 ($QT_DEFAULT_BUILD_PARTS)
3536 -nomake <part> ..... Exclude part from the list of parts to be built.
3538 -R <string> ........ Add an explicit runtime library path to the Qt
3540 -l <string> ........ Add an explicit library.
3542 -no-rpath .......... Do not use the library install path as a runtime
3544 + -rpath ............. Link Qt libraries and executables using the library
3545 install path as a runtime library path. Equivalent
3546 to -R install_libpath
3548 -continue .......... Continue as far as possible if an error occurs.
3550 -verbose, -v ....... Print verbose information about each step of the
3553 -silent ............ Reduce the build output so that warnings and errors
3554 can be seen more easily.
3556 * -no-optimized-qmake ... Do not build qmake optimized.
3557 -optimized-qmake ...... Build qmake optimized.
3559 $NSN -no-nis ............ Do not compile NIS support.
3560 $NSY -nis ............... Compile NIS support.
3562 $CUN -no-cups ........... Do not compile CUPS support.
3563 $CUY -cups .............. Compile CUPS support.
3564 Requires cups/cups.h and libcups.so.2.
3566 $CIN -no-iconv .......... Do not compile support for iconv(3).
3567 $CIY -iconv ............. Compile support for iconv(3).
3569 $PHN -no-pch ............ Do not use precompiled header support.
3570 $PHY -pch ............... Use precompiled header support.
3572 $DBN -no-dbus ........... Do not compile the QtDBus module.
3573 $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
3574 -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
3576 -reduce-relocations ..... Reduce relocations in the libraries through extra
3577 linker optimizations (Qt/X11 and Qt for Embedded Linux only;
3578 experimental; needs GNU ld >= 2.18).
3581 if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
3582 if [ "$QT_CROSS_COMPILE" = "yes" ]; then
3589 elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
3597 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
3601 $SBN -no-separate-debug-info . Do not store debug information in a separate file.
3602 $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
3608 if [ "$PLATFORM_X11" = "yes" ]; then
3609 if [ "$CFG_SM" = "no" ]; then
3616 if [ "$CFG_XSHAPE" = "no" ]; then
3623 if [ "$CFG_XINERAMA" = "no" ]; then
3630 if [ "$CFG_FONTCONFIG" = "no" ]; then
3637 if [ "$CFG_XCURSOR" = "no" ]; then
3644 if [ "$CFG_XFIXES" = "no" ]; then
3651 if [ "$CFG_XRANDR" = "no" ]; then
3658 if [ "$CFG_XRENDER" = "no" ]; then
3665 if [ "$CFG_MITSHM" = "no" ]; then
3672 if [ "$CFG_XINPUT" = "no" ]; then
3679 if [ "$CFG_XKB" = "no" ]; then
3686 if [ "$CFG_IM" = "no" ]; then
3697 -no-gtkstyle ....... Do not build the GTK theme integration.
3698 + -gtkstyle .......... Build the GTK theme integration.
3700 * -no-nas-sound ...... Do not compile in NAS sound support.
3701 -system-nas-sound .. Use NAS libaudio from the operating system.
3702 See http://radscan.com/nas.html
3704 -no-opengl ......... Do not support OpenGL.
3705 + -opengl <api> ...... Enable OpenGL support.
3706 With no parameter, this will auto-detect the "best"
3707 OpenGL API to use. If desktop OpenGL is available, it
3708 will be used. Use desktop, es1, es1cl or es2 for <api>
3709 to force the use of the Desktop (OpenGL 1.x or 2.x),
3710 OpenGL ES 1.x Common profile, 1.x Common Lite profile
3711 or 2.x APIs instead. On X11, the EGL API will be used
3712 to manage GL contexts in the case of OpenGL ES
3714 -no-openvg ........ Do not support OpenVG.
3715 + -openvg ........... Enable OpenVG support.
3716 Requires EGL support, typically supplied by an OpenGL
3717 or other graphics implementation.
3719 $SMN -no-sm ............. Do not support X Session Management.
3720 $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
3722 $SHN -no-xshape ......... Do not compile XShape support.
3723 $SHY -xshape ............ Compile XShape support.
3724 Requires X11/extensions/shape.h.
3726 $SHN -no-xsync .......... Do not compile XSync support.
3727 $SHY -xsync ............. Compile XSync support.
3728 Requires X11/extensions/sync.h.
3730 $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
3731 $XAY -xinerama .......... Compile Xinerama support.
3732 Requires X11/extensions/Xinerama.h and libXinerama.
3733 By default, Xinerama support will be compiled if
3734 available and the shared libraries are dynamically
3737 $XCN -no-xcursor ........ Do not compile Xcursor support.
3738 $XCY -xcursor ........... Compile Xcursor support.
3739 Requires X11/Xcursor/Xcursor.h and libXcursor.
3740 By default, Xcursor support will be compiled if
3741 available and the shared libraries are dynamically
3744 $XFN -no-xfixes ......... Do not compile Xfixes support.
3745 $XFY -xfixes ............ Compile Xfixes support.
3746 Requires X11/extensions/Xfixes.h and libXfixes.
3747 By default, Xfixes support will be compiled if
3748 available and the shared libraries are dynamically
3751 $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
3752 $XZY -xrandr ............ Compile Xrandr support.
3753 Requires X11/extensions/Xrandr.h and libXrandr.
3755 $XRN -no-xrender ........ Do not compile Xrender support.
3756 $XRY -xrender ........... Compile Xrender support.
3757 Requires X11/extensions/Xrender.h and libXrender.
3759 $XMN -no-mitshm ......... Do not compile MIT-SHM support.
3760 $XMY -mitshm ............ Compile MIT-SHM support.
3761 Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
3763 $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
3764 $FCGY -fontconfig ........ Compile FontConfig support.
3765 Requires fontconfig/fontconfig.h, libfontconfig,
3766 freetype.h and libfreetype.
3768 $XIN -no-xinput.......... Do not compile Xinput support.
3769 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
3770 which requires IRIX with wacom.h and libXi or
3771 XFree86 with X11/extensions/XInput.h and libXi.
3773 $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
3774 $XKY -xkb ............... Compile XKB support.
3779 if [ "$PLATFORM_MAC" = "yes" ]; then
3784 -Fstring ........... Add an explicit framework path.
3785 -fw string ......... Add an explicit framework.
3787 -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
3788 and -static is not supported with -cocoa. Specifying
3789 this option creates Qt binaries that requires Mac OS X
3792 * -framework ......... Build Qt as a series of frameworks and
3793 link tools against those frameworks.
3794 -no-framework ...... Do not build Qt as a series of frameworks.
3796 * -dwarf2 ............ Enable dwarf2 debugging symbols.
3797 -no-dwarf2 ......... Disable dwarf2 debugging symbols.
3799 -universal ......... Equivalent to -arch "ppc x86"
3801 -arch <arch> ....... Build Qt for <arch>
3802 Example values for <arch>: x86 ppc x86_64 ppc64
3803 Multiple -arch arguments can be specified, 64-bit archs
3804 will be built with the Cocoa framework.
3806 -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
3807 To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
3812 if [ "$PLATFORM_QWS" = "yes" ]; then
3815 Qt for Embedded Linux only:
3817 -xplatform target ... The target platform when cross-compiling.
3819 -no-feature-<feature> Do not compile in <feature>.
3820 -feature-<feature> .. Compile in <feature>. The available features
3821 are described in src/corelib/global/qfeatures.txt
3823 -embedded <arch> .... This will enable the embedded build, you must have a
3824 proper license for this switch to work.
3825 Example values for <arch>: arm mips x86 generic
3827 -armfpa ............. Target platform uses the ARM-FPA floating point format.
3828 -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
3830 The floating point format is usually autodetected by configure. Use this
3831 to override the detected value.
3833 -little-endian ...... Target platform is little endian (LSB first).
3834 -big-endian ......... Target platform is big endian (MSB first).
3836 -host-little-endian . Host platform is little endian (LSB first).
3837 -host-big-endian .... Host platform is big endian (MSB first).
3839 You only need to specify the endianness when
3840 cross-compiling, otherwise the host
3841 endianness will be used.
3843 -no-freetype ........ Do not compile in Freetype2 support.
3844 -qt-freetype ........ Use the libfreetype bundled with Qt.
3845 * -system-freetype .... Use libfreetype from the operating system.
3846 See http://www.freetype.org/
3848 -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
3849 default ($CFG_QCONFIG).
3851 -depths <list> ...... Comma-separated list of supported bit-per-pixel
3852 depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
3854 -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
3855 by default all available decorations are on.
3856 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3857 -plugin-decoration-<style> Enable decoration <style> as a plugin to be
3858 linked to at run time.
3859 Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
3860 -no-decoration-<style> ....Disable decoration <style> entirely.
3861 Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
3863 -no-opengl .......... Do not support OpenGL.
3864 -opengl <api> ....... Enable OpenGL ES support
3865 With no parameter, this will attempt to auto-detect OpenGL ES 1.x
3866 or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
3868 NOTE: A QGLScreen driver for the hardware is required to support
3869 OpenGL ES on Qt for Embedded Linux.
3871 -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
3872 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3873 -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
3874 linked to at run time.
3875 Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
3876 -no-gfx-<driver> ... Disable graphics <driver> entirely.
3877 Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
3879 -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
3880 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3882 -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
3884 Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
3886 -no-kbd-<driver> ... Disable keyboard <driver> entirely.
3887 Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
3889 -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
3890 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3891 -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
3893 Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
3894 -no-mouse-<driver> ... Disable mouse <driver> entirely.
3895 Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
3897 -iwmmxt ............ Compile using the iWMMXt instruction set
3898 (available on some XScale CPUs).
3900 -no-neon ........... Do not compile with use of NEON instructions.
3905 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
3906 if [ "$CFG_GLIB" = "no" ]; then
3914 $GBN -no-glib ........... Do not compile Glib support.
3915 $GBY -glib .............. Compile Glib support.
3920 [ "x$ERROR" = "xyes" ] && exit 1
3925 # -----------------------------------------------------------------------------
3926 # LICENSING, INTERACTIVE PART
3927 # -----------------------------------------------------------------------------
3929 if [ "$PLATFORM_QWS" = "yes" ]; then
3930 Platform
="Qt for Embedded Linux"
3931 elif [ "$PLATFORM_MAC" = "yes" ]; then
3932 Platform
="Qt for Mac OS X"
3935 Platform
="Qt for Linux/X11"
3939 echo "This is the $Platform ${EditionString} Edition."
3942 if [ "$Edition" = "NokiaInternalBuild" ]; then
3943 echo "Detected -nokia-developer option"
3944 echo "Nokia employees and agents are allowed to use this software under"
3945 echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
3946 elif [ "$Edition" = "OpenSource" ]; then
3948 echo "You are licensed to use this software under the terms of"
3949 echo "the Lesser GNU General Public License (LGPL) versions 2.1."
3950 if [ -f "$relpath/LICENSE.GPL3" ]; then
3951 echo "You are also licensed to use this software under the terms of"
3952 echo "the GNU General Public License (GPL) versions 3."
3958 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3959 echo "You have already accepted the terms of the $LicenseType license."
3962 if [ -f "$relpath/LICENSE.GPL3" ]; then
3963 echo "Type '3' to view the GNU General Public License version 3."
3965 echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
3966 echo "Type 'yes' to accept this license offer."
3967 echo "Type 'no' to decline this license offer."
3969 if echo '\c' |
grep '\c' >/dev
/null
; then
3970 echo -n "Do you accept the terms of $affix license? "
3972 echo "Do you accept the terms of $affix license? \c"
3977 if [ "$acceptance" = "yes" ] ||
[ "$acceptance" = "y" ]; then
3979 elif [ "$acceptance" = "no" ]; then
3980 echo "You are not licensed to use this software."
3983 elif [ "$acceptance" = "3" ]; then
3984 more "$relpath/LICENSE.GPL3"
3985 elif [ "$acceptance" = "L" ]; then
3986 more "$relpath/LICENSE.LGPL"
3989 elif [ "$Edition" = "Preview" ]; then
3990 TheLicense
=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
3993 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
3994 echo "You have already accepted the terms of the $LicenseType license."
3997 echo "You are licensed to use this software under the terms of"
3998 echo "the $TheLicense"
4000 echo "Type '?' to read the Preview License."
4001 echo "Type 'yes' to accept this license offer."
4002 echo "Type 'no' to decline this license offer."
4004 if echo '\c' |
grep '\c' >/dev
/null
; then
4005 echo -n "Do you accept the terms of the license? "
4007 echo "Do you accept the terms of the license? \c"
4012 if [ "$acceptance" = "yes" ]; then
4014 elif [ "$acceptance" = "no" ] ;then
4015 echo "You are not licensed to use this software."
4018 elif [ "$acceptance" = "?" ]; then
4019 more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
4022 elif [ "$Edition" != "OpenSource" ]; then
4023 if [ -n "$ExpiryDate" ]; then
4024 ExpiryDate
=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
4025 [ -z "$ExpiryDate" ] && ExpiryDate
="0"
4026 Today
=`date +%Y%m%d`
4027 if [ "$Today" -gt "$ExpiryDate" ]; then
4028 case "$LicenseType" in
4029 Commercial|Academic|Educational
)
4030 if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
4032 echo "NOTICE NOTICE NOTICE NOTICE"
4034 echo " Your support and upgrade period has expired."
4036 echo " You are no longer licensed to use this version of Qt."
4037 echo " Please contact qt-info@nokia.com to renew your support"
4038 echo " and upgrades for this license."
4040 echo "NOTICE NOTICE NOTICE NOTICE"
4045 echo "WARNING WARNING WARNING WARNING"
4047 echo " Your support and upgrade period has expired."
4049 echo " You may continue to use your last licensed release"
4050 echo " of Qt under the terms of your existing license"
4051 echo " agreement. But you are not entitled to technical"
4052 echo " support, nor are you entitled to use any more recent"
4053 echo " Qt releases."
4055 echo " Please contact qt-info@nokia.com to renew your"
4056 echo " support and upgrades for this license."
4058 echo "WARNING WARNING WARNING WARNING"
4065 echo "NOTICE NOTICE NOTICE NOTICE"
4067 echo " Your Evaluation license has expired."
4069 echo " You are no longer licensed to use this software. Please"
4070 echo " contact qt-info@nokia.com to purchase license, or install"
4071 echo " the Qt Open Source Edition if you intend to develop free"
4074 echo "NOTICE NOTICE NOTICE NOTICE"
4081 TheLicense
=`head -n 1 "$outpath/LICENSE"`
4083 if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
4084 echo "You have already accepted the terms of the $TheLicense."
4087 echo "You are licensed to use this software under the terms of"
4088 echo "the $TheLicense."
4090 echo "Type '?' to view the $TheLicense."
4091 echo "Type 'yes' to accept this license offer."
4092 echo "Type 'no' to decline this license offer."
4094 if echo '\c' |
grep '\c' >/dev
/null
; then
4095 echo -n "Do you accept the terms of the $TheLicense? "
4097 echo "Do you accept the terms of the $TheLicense? \c"
4102 if [ "$acceptance" = "yes" ]; then
4104 elif [ "$acceptance" = "no" ]; then
4105 echo "You are not licensed to use this software."
4108 else [ "$acceptance" = "?" ]
4109 more "$outpath/LICENSE"
4114 # this should be moved somewhere else
4117 AIX_VERSION
=`uname -v`
4118 if [ "$AIX_VERSION" -lt "5" ]; then
4119 QMakeVar add QMAKE_LIBS_X11
-lbind
4126 #-------------------------------------------------------------------------------
4127 # generate qconfig.cpp
4128 #-------------------------------------------------------------------------------
4129 [ -d "$outpath/src/corelib/global" ] || mkdir
-p "$outpath/src/corelib/global"
4131 LICENSE_USER_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
4132 LICENSE_PRODUCTS_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
4133 PREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
4134 DOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
4135 HEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
4136 LIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
4137 BINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
4138 PLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
4139 DATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
4140 TRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
4141 SETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4142 EXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4143 DEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4145 TODAY
=`date +%Y-%m-%d`
4146 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4148 static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
4149 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
4151 /* Installation date */
4152 static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY";
4156 if [ ! -z "$QT_HOST_PREFIX" ]; then
4157 HOSTPREFIX_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
4158 HOSTDOCUMENTATION_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
4159 HOSTHEADERS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
4160 HOSTLIBRARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
4161 HOSTBINARIES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
4162 HOSTPLUGINS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
4163 HOSTDATA_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
4164 HOSTTRANSLATIONS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
4165 HOSTSETTINGS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
4166 HOSTEXAMPLES_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
4167 HOSTDEMOS_PATH_STR
=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
4169 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4171 #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
4172 /* Installation Info */
4173 static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
4174 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
4175 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
4176 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
4177 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
4178 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
4179 static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
4180 static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
4181 static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
4182 static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
4183 static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
4184 #else // QT_BOOTSTRAPPED
4188 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4189 /* Installation Info */
4190 static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
4191 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
4192 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
4193 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
4194 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
4195 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
4196 static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
4197 static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
4198 static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
4199 static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
4200 static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
4203 if [ ! -z "$QT_HOST_PREFIX" ]; then
4204 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4205 #endif // QT_BOOTSTRAPPED
4210 cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
4211 /* strlen( "qt_lcnsxxxx" ) == 12 */
4212 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
4213 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
4214 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
4215 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
4216 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
4217 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
4218 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
4219 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
4220 #define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
4221 #define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
4222 #define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
4223 #define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
4224 #define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
4227 # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
4228 if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
4229 rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
4231 [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w
"$outpath/src/corelib/global/qconfig.cpp"
4232 mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
4233 chmod -w "$outpath/src/corelib/global/qconfig.cpp"
4236 # -----------------------------------------------------------------------------
4237 if [ "$LicenseType" = "Evaluation" ]; then
4238 EVALKEY
=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
4239 elif echo "$D_FLAGS" |
grep QT_EVAL
>/dev
/null
2>&1; then
4240 EVALKEY
=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
4243 if [ -n "$EVALKEY" ]; then
4244 rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
4245 cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
4246 /* Evaluation license key */
4247 static const char qt_eval_key_data [512 + 12] = "$EVALKEY";
4249 chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
4253 # -----------------------------------------------------------------------------
4255 # -----------------------------------------------------------------------------
4258 if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
4260 [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS
="$SYNCQT_OPTS -check-includes"
4261 if [ "$OPT_SHADOW" = "yes" ]; then
4262 "$outpath/bin/syncqt" $SYNCQT_OPTS
4263 elif [ "$CFG_DEV" = "yes" ] ||
[ ! -d $relpath/include
]; then
4264 QTDIR
="$relpath" perl
"$outpath/bin/syncqt" $SYNCQT_OPTS
4269 # $2: optional transformation
4270 # relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
4271 # is where the resulting variable is written to
4272 setBootstrapVariable
()
4274 variableRegExp
="^$1[^_A-Z0-9]"
4275 getQMakeConf |
grep "$variableRegExp" |
( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) |
$AWK '
4277 varLength = index($0, "=") - 1
4278 valStart = varLength + 2
4279 if (substr($0, varLength, 1) == "+") {
4280 varLength = varLength - 1
4281 valStart = valStart + 1
4283 var = substr($0, 0, varLength)
4284 gsub("[ \t]+", "", var)
4285 val = substr($0, valStart)
4286 printf "%s_%s = %s\n", var, NR, val
4289 if (length(var) > 0) {
4291 for (i = 1; i <= NR; ++i)
4292 printf " $(%s_%s)", var, i
4299 if true
; then ###[ '!' -f "$outpath/bin/qmake" ];
4300 echo "Creating qmake. Please wait..."
4303 QCONFIG_H
="$outpath/src/corelib/global/qconfig.h"
4304 QMAKE_QCONFIG_H
="${QCONFIG_H}.qmake"
4305 if [ -f "$QCONFIG_H" ]; then
4306 OLD_QCONFIG_H
=$QCONFIG_H
4307 mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
4310 # create temporary qconfig.h for compiling qmake, if it doesn't exist
4311 # when building qmake, we use #defines for the install paths,
4312 # however they are real functions in the library
4313 if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
4314 mkdir
-p "$outpath/src/corelib/global"
4315 [ -f "$QCONFIG_H" ] && chmod +w
"$QCONFIG_H"
4316 echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
4319 mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
4320 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
4321 if [ '!' -f "$conf" ]; then
4322 ln -s "$QCONFIG_H" "$conf"
4326 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
4327 rm -f mkspecs
/default
4328 ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs
/default
4330 for mkfile
in GNUmakefile Makefile
; do
4333 in_mkfile
="${mkfile}.in"
4334 if [ "$mkfile" = "Makefile" ]; then
4335 # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
4336 # (cd qmake && qmake) >/dev/null 2>&1 && continue
4338 in_mkfile
="${mkfile}.unix"
4340 in_mkfile
="$relpath/qmake/$in_mkfile"
4341 mkfile
="$outpath/qmake/$mkfile"
4342 if [ -f "$mkfile" ]; then
4343 [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags
>/dev
/null
2>&1 && chflags nouchg
"$mkfile"
4346 [ -f "$in_mkfile" ] ||
continue
4348 echo "########################################################################" > "$mkfile"
4349 echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
4350 echo "########################################################################" >> "$mkfile"
4353 EXTRA_CFLAGS
="\$(QMAKE_CFLAGS)"
4354 EXTRA_CXXFLAGS
="\$(QMAKE_CXXFLAGS)"
4355 EXTRA_LFLAGS
="\$(QMAKE_LFLAGS)"
4357 if [ "$PLATFORM" = "irix-cc" ] ||
[ "$PLATFORM" = "irix-cc-64" ]; then
4358 EXTRA_LFLAGS
="$EXTRA_LFLAGS -lm"
4361 [ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
4362 [ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
4363 if [ "$CFG_SILENT" = "yes" ]; then
4364 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC.*=,CC=\@,'
4365 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX.*=,CXX=\@,'
4367 [ -z "$CC" ] && setBootstrapVariable QMAKE_CC
's,QMAKE_CC,CC,'
4368 [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX
's,QMAKE_CXX,CXX,'
4370 setBootstrapVariable QMAKE_CFLAGS
4371 setBootstrapVariable QMAKE_CXXFLAGS
's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
4372 setBootstrapVariable QMAKE_LFLAGS
4374 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
4375 EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
4376 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
4378 if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
4379 setBootstrapVariable QMAKE_CFLAGS_RELEASE
4380 setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
4381 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
4382 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
4383 elif [ "$CFG_DEBUG" = "yes" ]; then
4384 setBootstrapVariable QMAKE_CFLAGS_DEBUG
4385 setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
4386 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
4387 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
4390 if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
4391 setBootstrapVariable QMAKE_RPATH
's,\$\$LITERAL_WHITESPACE, ,'
4392 for rpath
in $RPATH_FLAGS; do
4393 EXTRA_LFLAGS
="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
4396 if [ "$PLATFORM_MAC" = "yes" ]; then
4397 echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
4398 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
4399 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
4400 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
4401 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
4402 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
4403 EXTRA_OBJS
="qsettings_mac.o qcore_mac.o"
4404 EXTRA_SRCS
="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
4405 if echo "$CFG_MAC_ARCHS" |
grep x86
> /dev
/null
2>&1; then # matches both x86 and x86_64
4406 X86_CFLAGS
="-arch i386"
4407 X86_LFLAGS
="-arch i386"
4408 EXTRA_CFLAGS
="$X86_CFLAGS $EXTRA_CFLAGS"
4409 EXTRA_CXXFLAGS
="$X86_CFLAGS $EXTRA_CXXFLAGS"
4410 EXTRA_LFLAGS
="$EXTRA_LFLAGS $X86_LFLAGS"
4412 if echo "$CFG_MAC_ARCHS" |
grep ppc
> /dev
/null
2>&1; then # matches both ppc and ppc64
4413 PPC_CFLAGS
="-arch ppc"
4414 PPC_LFLAGS
="-arch ppc"
4415 EXTRA_CFLAGS
="$PPC_CFLAGS $EXTRA_CFLAGS"
4416 EXTRA_CXXFLAGS
="$PPC_CFLAGS $EXTRA_CXXFLAGS"
4417 EXTRA_LFLAGS
="$EXTRA_LFLAGS $PPC_LFLAGS"
4419 if [ '!' -z "$CFG_SDK" ]; then
4420 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
4421 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
4422 EXTRA_CFLAGS
="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
4423 EXTRA_CXXFLAGS
="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
4424 EXTRA_LFLAGS
="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
4427 [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS
="$EXTRA_CFLAGS -DQWS"
4428 if [ '!' -z "$D_FLAGS" ]; then
4429 for DEF
in $D_FLAGS; do
4430 EXTRA_CFLAGS
="$EXTRA_CFLAGS \"-D${DEF}\""
4433 QMAKE_BIN_DIR
="$QT_INSTALL_BINS"
4434 [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR
="${QT_INSTALL_PREFIX}/bin"
4435 QMAKE_DATA_DIR
="$QT_INSTALL_DATA"
4436 [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR
="${QT_INSTALL_PREFIX}"
4438 adjrelpath
=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
4439 adjoutpath
=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
4440 adjqmakespec
=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
4441 sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
4442 -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
4443 -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
4444 -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
4445 -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
4446 -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
4447 -e "s,@QMAKESPEC@,$adjqmakespec,g" "$in_mkfile" >>"$mkfile"
4449 if "$WHICH" makedepend
>/dev
/null
2>&1 && grep 'depend:' "$mkfile" >/dev
/null
2>&1; then
4450 (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend
) >/dev
/null
2>&1
4451 sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp"
4452 sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
4457 QMAKE_BUILD_ERROR
=no
4458 (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR
=yes
4459 [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
4460 [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
4461 [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
4464 #-------------------------------------------------------------------------------
4465 # tests that need qmake
4466 #-------------------------------------------------------------------------------
4468 # detect availability of float math.h functions
4469 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/floatmath
"floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
4470 CFG_USE_FLOATMATH
=yes
4472 CFG_USE_FLOATMATH
=no
4475 # detect mmx support
4476 if [ "${CFG_MMX}" = "auto" ]; then
4477 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mmx
"mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
4484 # detect 3dnow support
4485 if [ "${CFG_3DNOW}" = "auto" ]; then
4486 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/3dnow
"3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
4493 # detect sse support
4494 if [ "${CFG_SSE}" = "auto" ]; then
4495 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse
"sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
4502 # detect sse2 support
4503 if [ "${CFG_SSE2}" = "auto" ]; then
4504 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/sse2
"sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
4511 # check iWMMXt support
4512 if [ "$CFG_IWMMXT" = "yes" ]; then
4513 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/iwmmxt
"iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
4514 if [ $?
!= "0" ]; then
4515 echo "The iWMMXt functionality test failed!"
4516 echo " Please make sure your compiler supports iWMMXt intrinsics!"
4521 # detect neon support
4522 if ([ "$CFG_ARCH" = "arm" ] ||
[ "$CFG_ARCH" = "armv6" ]) && [ "${CFG_NEON}" = "auto" ]; then
4523 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
4531 if [ "$CFG_ZLIB" = "no" ]; then
4532 # Note: Qt no longer support builds without zlib
4533 # So we force a "no" to be "auto" here.
4534 # If you REALLY really need no zlib support, you can still disable
4535 # it by doing the following:
4536 # add "no-zlib" to mkspecs/qconfig.pri
4537 # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
4539 # There's no guarantee that Qt will build under those conditions
4544 if [ "$CFG_ZLIB" = "auto" ]; then
4545 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
4552 # detect how jpeg should be built
4553 if [ "$CFG_JPEG" = "auto" ]; then
4554 if [ "$CFG_SHARED" = "yes" ]; then
4561 if [ "$CFG_LIBJPEG" = "auto" ]; then
4562 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
4569 # detect how gif should be built
4570 if [ "$CFG_GIF" = "auto" ]; then
4571 if [ "$CFG_SHARED" = "yes" ]; then
4578 # detect how tiff should be built
4579 if [ "$CFG_TIFF" = "auto" ]; then
4580 if [ "$CFG_SHARED" = "yes" ]; then
4588 if [ "$CFG_LIBTIFF" = "auto" ]; then
4589 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libtiff
"libtiff" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4596 # detect how mng should be built
4597 if [ "$CFG_MNG" = "auto" ]; then
4598 if [ "$CFG_SHARED" = "yes" ]; then
4605 if [ "$CFG_LIBMNG" = "auto" ]; then
4606 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/libmng
"libmng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4614 if [ "$CFG_LIBPNG" = "auto" ]; then
4615 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
4622 # detect accessibility
4623 if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
4624 CFG_ACCESSIBILITY
=yes
4627 # auto-detect SQL-modules support
4628 for _SQLDR
in $CFG_SQL_AVAILABLE; do
4631 if [ "$CFG_SQL_mysql" != "no" ]; then
4632 [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG
=`"$WHICH" mysql_config`
4633 if [ -x "$CFG_MYSQL_CONFIG" ]; then
4634 QT_CFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
4635 QT_LFLAGS_MYSQL_R
=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
4636 QT_LFLAGS_MYSQL
=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
4637 QT_MYSQL_VERSION
=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
4638 QT_MYSQL_VERSION_MAJOR
=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
4640 if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
4641 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4642 echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
4643 echo " You need MySql 4 or higher."
4644 echo " If you believe this message is in error you may use the continue"
4645 echo " switch (-continue) to $0 to continue."
4650 QT_LFLAGS_MYSQL_R
=""
4654 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
4655 QMakeVar add CONFIG use_libmysqlclient_r
4656 if [ "$CFG_SQL_mysql" = "auto" ]; then
4657 CFG_SQL_mysql
=plugin
4659 QT_LFLAGS_MYSQL
="$QT_LFLAGS_MYSQL_R"
4660 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
4661 if [ "$CFG_SQL_mysql" = "auto" ]; then
4662 CFG_SQL_mysql
=plugin
4665 if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4666 echo "MySQL support cannot be enabled due to functionality tests!"
4667 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4668 echo " If you believe this message is in error you may use the continue"
4669 echo " switch (-continue) to $0 to continue."
4674 QT_LFLAGS_MYSQL_R
=""
4682 if [ "$CFG_SQL_psql" != "no" ]; then
4683 if "$WHICH" pg_config
>/dev
/null
2>&1; then
4684 QT_CFLAGS_PSQL
=`pg_config --includedir 2>/dev/null`
4685 QT_LFLAGS_PSQL
=`pg_config --libdir 2>/dev/null`
4687 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL
="-I$QT_CFLAGS_PSQL"
4688 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL
="-L$QT_LFLAGS_PSQL"
4689 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
4690 if [ "$CFG_SQL_psql" = "auto" ]; then
4694 if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4695 echo "PostgreSQL support cannot be enabled due to functionality tests!"
4696 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4697 echo " If you believe this message is in error you may use the continue"
4698 echo " switch (-continue) to $0 to continue."
4709 if [ "$CFG_SQL_odbc" != "no" ]; then
4710 if [ "$PLATFORM_MAC" != "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
4711 if [ "$CFG_SQL_odbc" = "auto" ]; then
4715 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
4716 QT_LFLAGS_ODBC
="-liodbc"
4717 if [ "$CFG_SQL_odbc" = "auto" ]; then
4721 if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4722 echo "ODBC support cannot be enabled due to functionality tests!"
4723 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4724 echo " If you believe this message is in error you may use the continue"
4725 echo " switch (-continue) to $0 to continue."
4735 if [ "$CFG_SQL_oci" != "no" ]; then
4736 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
4737 if [ "$CFG_SQL_oci" = "auto" ]; then
4741 if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4742 echo "Oracle (OCI) 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_SQL_tds" != "no" ]; then
4755 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tds
"TDS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
4756 if [ "$CFG_SQL_tds" = "auto" ]; then
4760 if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4761 echo "TDS support cannot be enabled due to functionality tests!"
4762 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4763 echo " If you believe this message is in error you may use the continue"
4764 echo " switch (-continue) to $0 to continue."
4773 if [ "$CFG_SQL_db2" != "no" ]; then
4774 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
4775 if [ "$CFG_SQL_db2" = "auto" ]; then
4779 if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4780 echo "ODBC support cannot be enabled due to functionality tests!"
4781 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4782 echo " If you believe this message is in error you may use the continue"
4783 echo " switch (-continue) to $0 to continue."
4792 if [ "$CFG_SQL_ibase" != "no" ]; then
4793 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
4794 if [ "$CFG_SQL_ibase" = "auto" ]; then
4795 CFG_SQL_ibase
=plugin
4798 if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4799 echo "InterBase support cannot be enabled due to functionality tests!"
4800 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4801 echo " If you believe this message is in error you may use the continue"
4802 echo " switch (-continue) to $0 to continue."
4811 if [ "$CFG_SQL_sqlite2" != "no" ]; then
4812 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
4813 if [ "$CFG_SQL_sqlite2" = "auto" ]; then
4814 CFG_SQL_sqlite2
=plugin
4817 if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4818 echo "SQLite2 support cannot be enabled due to functionality tests!"
4819 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4820 echo " If you believe this message is in error you may use the continue"
4821 echo " switch (-continue) to $0 to continue."
4830 if [ "$CFG_SQL_sqlite" != "no" ]; then
4831 SQLITE_AUTODETECT_FAILED
="no"
4832 if [ "$CFG_SQLITE" = "system" ]; then
4833 if [ -n "$PKG_CONFIG" ]; then
4834 QT_CFLAGS_SQLITE
=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
4835 QT_LFLAGS_SQLITE
=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
4837 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
4838 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4839 CFG_SQL_sqlite
=plugin
4841 QMAKE_CONFIG
="$QMAKE_CONFIG system-sqlite"
4843 SQLITE_AUTODETECT_FAILED
="yes"
4846 elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
4847 if [ "$CFG_SQL_sqlite" = "auto" ]; then
4848 CFG_SQL_sqlite
=plugin
4851 SQLITE_AUTODETECT_FAILED
="yes"
4855 if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4856 echo "SQLite support cannot be enabled due to functionality tests!"
4857 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4858 echo " If you believe this message is in error you may use the continue"
4859 echo " switch (-continue) to $0 to continue."
4865 if [ "$OPT_VERBOSE" = "yes" ]; then
4866 echo "unknown SQL driver: $_SQLDR"
4872 # auto-detect NIS support
4873 if [ "$CFG_NIS" != "no" ]; then
4874 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
4877 if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4878 echo "NIS support cannot be enabled due to functionality tests!"
4879 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4880 echo " If you believe this message is in error you may use the continue"
4881 echo " switch (-continue) to $0 to continue."
4889 # auto-detect CUPS support
4890 if [ "$CFG_CUPS" != "no" ]; then
4891 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
4894 if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4895 echo "Cups support cannot be enabled due to functionality tests!"
4896 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4897 echo " If you believe this message is in error you may use the continue"
4898 echo " switch (-continue) to $0 to continue."
4906 # auto-detect iconv(3) support
4907 if [ "$CFG_ICONV" != "no" ]; then
4908 if [ "$PLATFORM_QWS" = "yes" ]; then
4910 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
4912 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
4915 if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4916 echo "Iconv support cannot be enabled due to functionality tests!"
4917 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4918 echo " If you believe this message is in error you may use the continue"
4919 echo " switch (-continue) to $0 to continue."
4927 # auto-detect libdbus-1 support
4928 if [ "$CFG_DBUS" != "no" ]; then
4929 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1
2>/dev
/null
; then
4930 QT_CFLAGS_DBUS
=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
4931 QT_LIBS_DBUS
=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
4933 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
4934 [ "$CFG_DBUS" = "auto" ] && CFG_DBUS
=yes
4935 QMakeVar
set QT_CFLAGS_DBUS
"$QT_CFLAGS_DBUS"
4936 QMakeVar
set QT_LIBS_DBUS
"$QT_LIBS_DBUS"
4938 if [ "$CFG_DBUS" = "auto" ]; then
4940 elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4941 # CFG_DBUS is "yes" or "linked" here
4943 echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
4944 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4945 echo " If you believe this message is in error you may use the continue"
4946 echo " switch (-continue) to $0 to continue."
4952 # Generate a CRC of the namespace for using in constants for the Carbon port.
4953 # This should mean that you really *can* load two Qt's and have our custom
4954 # Carbon events work.
4955 if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
4956 QT_NAMESPACE_MAC_CRC
=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS $I_FLAGS $l_FLAGS`
4959 if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
4961 # detect EGL support
4962 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
4963 # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
4965 CFG_EGL_GLES_INCLUDES
=no
4966 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
4967 # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
4969 CFG_EGL_GLES_INCLUDES
=yes
4971 if ( [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ]; then
4972 echo "The EGL functionality test failed!"
4973 echo " EGL is required for OpenGL ES to manage contexts & surfaces."
4974 echo " You might need to modify the include and library search paths by editing"
4975 echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in"
4976 echo " ${XQMAKESPEC}."
4981 # auto-detect Glib support
4982 if [ "$CFG_GLIB" != "no" ]; then
4983 if [ -n "$PKG_CONFIG" ]; then
4984 QT_CFLAGS_GLIB
=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
4985 QT_LIBS_GLIB
=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
4987 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
4989 QMakeVar
set QT_CFLAGS_GLIB
"$QT_CFLAGS_GLIB"
4990 QMakeVar
set QT_LIBS_GLIB
"$QT_LIBS_GLIB"
4992 if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
4993 echo "Glib support cannot be enabled due to functionality tests!"
4994 echo " Turn on verbose messaging (-v) to $0 to see the final report."
4995 echo " If you believe this message is in error you may use the continue"
4996 echo " switch (-continue) to $0 to continue."
5004 if [ "$CFG_PHONON" != "no" ]; then
5005 if [ "$CFG_PHONON_BACKEND" != "no" ]; then
5006 if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
5007 if [ -n "$PKG_CONFIG" ]; then
5008 QT_CFLAGS_GSTREAMER
=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5009 QT_LIBS_GSTREAMER
=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
5011 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
5013 QMakeVar
set QT_CFLAGS_GSTREAMER
"$QT_CFLAGS_GSTREAMER"
5014 QMakeVar
set QT_LIBS_GSTREAMER
"$QT_LIBS_GSTREAMER"
5016 if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5017 echo "Gstreamer support cannot be enabled due to functionality tests!"
5018 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5019 echo " If you believe this message is in error you may use the continue"
5020 echo " switch (-continue) to $0 to continue."
5026 elif [ "$CFG_GLIB" = "no" ]; then
5030 if [ "$CFG_GSTREAMER" = "yes" ]; then
5033 if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5034 echo "Phonon support cannot be enabled due to functionality tests!"
5035 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5036 echo " If you believe this message is in error you may use the continue"
5037 echo " switch (-continue) to $0 to continue."
5050 if [ "$PLATFORM_X11" = "yes" ]; then
5051 x11tests
="$relpath/config.tests/x11"
5054 # work around broken X11 headers when using GCC 2.95 or later
5056 "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE
=yes
5057 if [ $NOTYPE = "yes" ]; then
5058 QMakeVar add QMAKE_CXXFLAGS
-fpermissive
5059 X11TESTS_FLAGS
="$X11TESTS_FLAGS -fpermissive"
5062 # Check we actually have X11 :-)
5063 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xlib
"XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5064 if [ $?
!= "0" ]; then
5065 echo "Basic XLib functionality test failed!"
5066 echo " You might need to modify the include and library search paths by editing"
5067 echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
5071 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5072 if [ "$CFG_OPENGL" = "auto" ] ||
[ "$CFG_OPENGL" = "yes" ]; then
5073 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
5075 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
5077 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
5079 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1cl
"OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS; then
5082 if [ "$CFG_OPENGL" = "yes" ]; then
5083 echo "All the OpenGL functionality tests failed!"
5084 echo " You might need to modify the include and library search paths by editing"
5085 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5086 echo " ${XQMAKESPEC}."
5093 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5094 if [ "$CFG_OPENGL" = "desktop" ]; then
5095 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5096 if [ $?
!= "0" ]; then
5097 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5104 elif [ "$CFG_OPENGL" = "es1cl" ]; then
5105 # OpenGL ES 1.x common lite
5106 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1cl
"OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS
5107 if [ $?
!= "0" ]; then
5108 echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
5109 echo " You might need to modify the include and library search paths by editing"
5110 echo " QMAKE_INCDIR_OPENGL_ES1CL, QMAKE_LIBDIR_OPENGL_ES1CL and QMAKE_LIBS_OPENGL_ES1CL in"
5111 echo " ${XQMAKESPEC}."
5114 elif [ "$CFG_OPENGL" = "es1" ]; then
5116 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5117 if [ $?
!= "0" ]; then
5118 echo "The OpenGL ES 1.x functionality test failed!"
5119 echo " You might need to modify the include and library search paths by editing"
5120 echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
5121 echo " ${XQMAKESPEC}."
5124 elif [ "$CFG_OPENGL" = "es2" ]; then
5126 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5127 if [ $?
!= "0" ]; then
5128 echo "The OpenGL ES 2.0 functionality test failed!"
5129 echo " You might need to modify the include and library search paths by editing"
5130 echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
5131 echo " ${XQMAKESPEC}."
5134 elif [ "$CFG_OPENGL" = "desktop" ]; then
5135 # Desktop OpenGL support
5136 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/opengl
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5137 if [ $?
!= "0" ]; then
5138 echo "The OpenGL functionality test failed!"
5139 echo " You might need to modify the include and library search paths by editing"
5140 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5141 echo " ${XQMAKESPEC}."
5146 # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
5147 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/glxfbconfig
"OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
5148 if [ $?
!= "0" ]; then
5149 QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
5157 # if opengl is disabled and the user specified graphicssystem gl, disable it...
5158 if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
5159 echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
5160 CFG_GRAPHICS_SYSTEM
=default
5163 # auto-detect Xcursor support
5164 if [ "$CFG_XCURSOR" != "no" ]; then
5165 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
5166 if [ "$CFG_XCURSOR" != "runtime" ]; then
5170 if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5171 echo "Xcursor support cannot be enabled due to functionality tests!"
5172 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5173 echo " If you believe this message is in error you may use the continue"
5174 echo " switch (-continue) to $0 to continue."
5182 # auto-detect Xfixes support
5183 if [ "$CFG_XFIXES" != "no" ]; then
5184 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/x11
/xfixes
"Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
5185 if [ "$CFG_XFIXES" != "runtime" ]; then
5189 if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5190 echo "Xfixes support cannot be enabled due to functionality tests!"
5191 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5192 echo " If you believe this message is in error you may use the continue"
5193 echo " switch (-continue) to $0 to continue."
5201 # auto-detect Xrandr support (resize and rotate extension)
5202 if [ "$CFG_XRANDR" != "no" ]; then
5203 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
5204 if [ "$CFG_XRANDR" != "runtime" ]; then
5208 if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5209 echo "Xrandr support cannot be enabled due to functionality tests!"
5210 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5211 echo " If you believe this message is in error you may use the continue"
5212 echo " switch (-continue) to $0 to continue."
5220 # auto-detect Xrender support
5221 if [ "$CFG_XRENDER" != "no" ]; then
5222 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
5225 if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5226 echo "Xrender support cannot be enabled due to functionality tests!"
5227 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5228 echo " If you believe this message is in error you may use the continue"
5229 echo " switch (-continue) to $0 to continue."
5237 # auto-detect MIT-SHM support
5238 if [ "$CFG_MITSHM" != "no" ]; then
5239 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
5242 if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5243 echo "MITSHM support cannot be enabled due to functionality tests!"
5244 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5245 echo " If you believe this message is in error you may use the continue"
5246 echo " switch (-continue) to $0 to continue."
5254 # auto-detect FontConfig support
5255 if [ "$CFG_FONTCONFIG" != "no" ]; then
5256 if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig
--exists freetype2
2>/dev
/null
; then
5257 QT_CFLAGS_FONTCONFIG
=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
5258 QT_LIBS_FONTCONFIG
=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
5260 QT_CFLAGS_FONTCONFIG
=
5261 QT_LIBS_FONTCONFIG
="-lfreetype -lfontconfig"
5263 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
5265 QMakeVar
set QMAKE_CFLAGS_X11
"$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
5266 QMakeVar
set QMAKE_LIBS_X11
"$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
5267 CFG_LIBFREETYPE
=system
5269 if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5270 echo "FontConfig support cannot be enabled due to functionality tests!"
5271 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5272 echo " If you believe this message is in error you may use the continue"
5273 echo " switch (-continue) to $0 to continue."
5281 # auto-detect Session Management support
5282 if [ "$CFG_SM" = "auto" ]; then
5283 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
5286 if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5287 echo "Session Management support cannot be enabled due to functionality tests!"
5288 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5289 echo " If you believe this message is in error you may use the continue"
5290 echo " switch (-continue) to $0 to continue."
5298 # auto-detect SHAPE support
5299 if [ "$CFG_XSHAPE" != "no" ]; then
5300 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
5303 if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5304 echo "XShape support cannot be enabled due to functionality tests!"
5305 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5306 echo " If you believe this message is in error you may use the continue"
5307 echo " switch (-continue) to $0 to continue."
5315 # auto-detect XSync support
5316 if [ "$CFG_XSYNC" != "no" ]; then
5317 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
5320 if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5321 echo "XSync support cannot be enabled due to functionality tests!"
5322 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5323 echo " If you believe this message is in error you may use the continue"
5324 echo " switch (-continue) to $0 to continue."
5332 # auto-detect Xinerama support
5333 if [ "$CFG_XINERAMA" != "no" ]; then
5334 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
5335 if [ "$CFG_XINERAMA" != "runtime" ]; then
5339 if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5340 echo "Xinerama support cannot be enabled due to functionality tests!"
5341 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5342 echo " If you believe this message is in error you may use the continue"
5343 echo " switch (-continue) to $0 to continue."
5351 # auto-detect Xinput support
5352 if [ "$CFG_XINPUT" != "no" ]; then
5353 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
5354 if [ "$CFG_XINPUT" != "runtime" ]; then
5358 if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5359 echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
5360 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5361 echo " If you believe this message is in error you may use the continue"
5362 echo " switch (-continue) to $0 to continue."
5370 # auto-detect XKB support
5371 if [ "$CFG_XKB" != "no" ]; then
5372 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
5375 if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5376 echo "XKB support cannot be enabled due to functionality tests!"
5377 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5378 echo " If you believe this message is in error you may use the continue"
5379 echo " switch (-continue) to $0 to continue."
5387 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
5388 if [ -n "$PKG_CONFIG" ]; then
5389 QT_CFLAGS_QGTKSTYLE
=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
5390 QT_LIBS_QGTKSTYLE
=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
5392 if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
5394 QMakeVar
set QT_CFLAGS_QGTKSTYLE
"$QT_CFLAGS_QGTKSTYLE"
5395 QMakeVar
set QT_LIBS_QGTKSTYLE
"$QT_LIBS_QGTKSTYLE"
5397 if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5398 echo "Gtk theme support cannot be enabled due to functionality tests!"
5399 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5400 echo " If you believe this message is in error you may use the continue"
5401 echo " switch (-continue) to $0 to continue."
5407 elif [ "$CFG_GLIB" = "no" ]; then
5413 if [ "$PLATFORM_MAC" = "yes" ]; then
5414 if [ "$CFG_PHONON" != "no" ]; then
5415 # Always enable Phonon (unless it was explicitly disabled)
5421 if [ "$PLATFORM_QWS" = "yes" ]; then
5423 # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
5424 if [ "$CFG_OPENGL" = "yes" ]; then
5425 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
5427 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
5429 elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1cl
"OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS; then
5432 echo "All the OpenGL ES functionality tests failed!"
5433 echo " You might need to modify the include and library search paths by editing"
5434 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5435 echo " ${XQMAKESPEC}."
5438 elif [ "$CFG_OPENGL" = "es1" ]; then
5440 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles1
"OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
5441 if [ $?
!= "0" ]; then
5442 echo "The OpenGL ES 1.x functionality test failed!"
5443 echo " You might need to modify the include and library search paths by editing"
5444 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5445 echo " ${XQMAKESPEC}."
5448 elif [ "$CFG_OPENGL" = "es2" ]; then
5450 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/opengles2
"OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
5451 if [ $?
!= "0" ]; then
5452 echo "The OpenGL ES 2.0 functionality test failed!"
5453 echo " You might need to modify the include and library search paths by editing"
5454 echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
5455 echo " ${XQMAKESPEC}."
5458 elif [ "$CFG_OPENGL" = "desktop" ]; then
5459 # Desktop OpenGL support
5460 echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
5465 for screen
in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
5466 if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5467 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/ahi
"Ahi" $L_FLAGS $I_FLAGS $l_FLAGS
5468 if [ $?
!= "0" ]; then
5469 echo "The Ahi screen driver functionality test failed!"
5470 echo " You might need to modify the include and library search paths by editing"
5471 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5472 echo " ${XQMAKESPEC}."
5477 if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5478 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/svgalib
"SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS
5479 if [ $?
!= "0" ]; then
5480 echo "The SVGAlib screen driver functionality test failed!"
5481 echo " You might need to modify the include and library search paths by editing"
5482 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5483 echo " ${XQMAKESPEC}."
5488 if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5489 if [ -n "$PKG_CONFIG" ]; then
5490 if $PKG_CONFIG --exists directfb
2>/dev
/null
; then
5491 QT_CFLAGS_DIRECTFB
=`$PKG_CONFIG --cflags directfb 2>/dev/null`
5492 QT_LIBS_DIRECTFB
=`$PKG_CONFIG --libs directfb 2>/dev/null`
5493 elif directfb-config
--version >/dev
/null
2>&1; then
5494 QT_CFLAGS_DIRECTFB
=`directfb-config --cflags 2>/dev/null`
5495 QT_LIBS_DIRECTFB
=`directfb-config --libs 2>/dev/null`
5499 # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
5500 if [ -n "$QT_CFLAGS_DIRECTFB" ] ||
[ -n "$QT_LIBS_DIRECTFB" ]; then
5501 QMakeVar
set QT_CFLAGS_DIRECTFB
"$QT_CFLAGS_DIRECTFB"
5502 QMakeVar
set QT_LIBS_DIRECTFB
"$QT_LIBS_DIRECTFB"
5504 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
5505 QMakeVar
set QT_DEFINES_DIRECTFB
"QT3_SUPPORT"
5508 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/directfb
"DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DIRECTFB $QT_LIBS_DIRECTFB
5509 if [ $?
!= "0" ]; then
5510 echo "The DirectFB screen driver functionality test failed!"
5511 echo " You might need to modify the include and library search paths by editing"
5512 echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
5513 echo " ${XQMAKESPEC}."
5521 for mouse
in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
5522 if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
5523 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/tslib
"tslib" $L_FLAGS $I_FLAGS $l_FLAGS
5524 if [ $?
!= "0" ]; then
5525 echo "The tslib functionality test failed!"
5526 echo " You might need to modify the include and library search paths by editing"
5527 echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
5528 echo " ${XQMAKESPEC}."
5537 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/qws
/sound
"sound" $L_FLAGS $I_FLAGS $l_FLAGS
5538 if [ $?
!= "0" ]; then
5539 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SOUND"
5545 [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE
="$CFG_QWS_FREETYPE"
5546 [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE
=no
5547 if [ "$CFG_LIBFREETYPE" = "auto" ]; then
5548 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
5549 CFG_LIBFREETYPE
=system
5555 if [ "$CFG_ENDIAN" = "auto" ]; then
5556 if [ "$PLATFORM_MAC" = "yes" ]; then
5559 "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5561 if [ "$F" -eq 0 ]; then
5562 CFG_ENDIAN
="Q_LITTLE_ENDIAN"
5563 elif [ "$F" -eq 1 ]; then
5564 CFG_ENDIAN
="Q_BIG_ENDIAN"
5567 echo "The target system byte order could not be detected!"
5568 echo "Turn on verbose messaging (-v) to see the final report."
5569 echo "You can use the -little-endian or -big-endian switch to"
5570 echo "$0 to continue."
5576 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
5577 if [ "$PLATFORM_MAC" = "yes" ]; then
5580 "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5582 if [ "$F" -eq 0 ]; then
5583 CFG_HOST_ENDIAN
="Q_LITTLE_ENDIAN"
5584 elif [ "$F" -eq 1 ]; then
5585 CFG_HOST_ENDIAN
="Q_BIG_ENDIAN"
5588 echo "The host system byte order could not be detected!"
5589 echo "Turn on verbose messaging (-v) to see the final report."
5590 echo "You can use the -host-little-endian or -host-big-endian switch to"
5591 echo "$0 to continue."
5597 if [ "$CFG_ARMFPA" != "auto" ]; then
5598 if [ "$CFG_ARMFPA" = "yes" ]; then
5599 if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5600 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5602 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5605 CFG_DOUBLEFORMAT
="normal"
5610 if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
5611 if [ "$PLATFORM_QWS" != "yes" ]; then
5612 CFG_DOUBLEFORMAT
=normal
5614 "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
5616 if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
5617 CFG_DOUBLEFORMAT
=normal
5618 elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
5619 CFG_DOUBLEFORMAT
=normal
5620 elif [ "$F" -eq 10 ]; then
5621 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE"
5622 elif [ "$F" -eq 11 ]; then
5623 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG"
5624 elif [ "$F" -eq 12 ]; then
5625 CFG_DOUBLEFORMAT
="Q_DOUBLE_LITTLE_SWAPPED"
5627 elif [ "$F" -eq 13 ]; then
5628 CFG_DOUBLEFORMAT
="Q_DOUBLE_BIG_SWAPPED"
5632 echo "The system floating point format could not be detected."
5633 echo "This may cause data to be generated in a wrong format"
5634 echo "Turn on verbose messaging (-v) to see the final report."
5635 # we do not fail on this since this is a new test, and if it fails,
5636 # the old behavior should be correct in most cases
5637 CFG_DOUBLEFORMAT
=normal
5643 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stl
"STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
5647 if [ "$CFG_STL" != "no" ]; then
5648 if [ "$HAVE_STL" = "yes" ]; then
5651 if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5652 echo "STL support cannot be enabled due to functionality tests!"
5653 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5654 echo " If you believe this message is in error you may use the continue"
5655 echo " switch (-continue) to $0 to continue."
5663 # find if the platform supports IPv6
5664 if [ "$CFG_IPV6" != "no" ]; then
5665 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/ipv6
"IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
5668 if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5669 echo "IPv6 support cannot be enabled due to functionality tests!"
5670 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5671 echo " If you believe this message is in error you may use the continue"
5672 echo " switch (-continue) to $0 to continue."
5680 # detect POSIX clock_gettime()
5681 if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
5682 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
5683 CFG_CLOCK_GETTIME
=yes
5685 CFG_CLOCK_GETTIME
=no
5689 # detect POSIX monotonic clocks
5690 if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
5691 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
5692 CFG_CLOCK_MONOTONIC
=yes
5694 CFG_CLOCK_MONOTONIC
=no
5696 elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
5697 CFG_CLOCK_MONOTONIC
=no
5701 if [ "$CFG_MREMAP" = "auto" ]; then
5702 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/mremap
"mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
5709 # find if the platform provides getaddrinfo (ipv6 dns lookups)
5710 if [ "$CFG_GETADDRINFO" != "no" ]; then
5711 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getaddrinfo
"getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
5714 if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5715 echo "getaddrinfo support cannot be enabled due to functionality tests!"
5716 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5717 echo " If you believe this message is in error you may use the continue"
5718 echo " switch (-continue) to $0 to continue."
5726 # find if the platform provides inotify
5727 if [ "$CFG_INOTIFY" != "no" ]; then
5728 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/inotify
"inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
5731 if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5732 echo "inotify support cannot be enabled due to functionality tests!"
5733 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5734 echo " If you believe this message is in error you may use the continue"
5735 echo " switch (-continue) to $0 to continue."
5743 # find if the platform provides if_nametoindex (ipv6 interface name support)
5744 if [ "$CFG_IPV6IFNAME" != "no" ]; then
5745 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
5748 if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5749 echo "IPv6 interface name support cannot be enabled due to functionality tests!"
5750 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5751 echo " If you believe this message is in error you may use the continue"
5752 echo " switch (-continue) to $0 to continue."
5760 # find if the platform provides getifaddrs (network interface enumeration)
5761 if [ "$CFG_GETIFADDRS" != "no" ]; then
5762 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/getifaddrs
"getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
5765 if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5766 echo "getifaddrs support cannot be enabled due to functionality tests!"
5767 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5768 echo " If you believe this message is in error you may use the continue"
5769 echo " switch (-continue) to $0 to continue."
5777 # find if the platform supports X/Open Large File compilation environment
5778 if [ "$CFG_LARGEFILE" != "no" ]; then
5779 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/largefile
"X/Open Large File" $L_FLAGS $I_FLAGS $l_FLAGS; then
5782 if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5783 echo "X/Open Large File support cannot be enabled due to functionality tests!"
5784 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5785 echo " If you believe this message is in error you may use the continue"
5786 echo " switch (-continue) to $0 to continue."
5795 if [ "$CFG_OPENSSL" != "no" ]; then
5796 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
5797 if [ "$CFG_OPENSSL" = "auto" ]; then
5801 if ( [ "$CFG_OPENSSL" = "yes" ] ||
[ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5802 echo "OpenSSL support cannot be enabled due to functionality tests!"
5803 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5804 echo " If you believe this message is in error you may use the continue"
5805 echo " switch (-continue) to $0 to continue."
5813 # detect OpenVG support
5814 if [ "$CFG_OPENVG" != "no" ]; then
5815 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
5816 if [ "$CFG_OPENVG" = "auto" ]; then
5819 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
5820 if [ "$CFG_OPENVG" = "auto" ]; then
5823 CFG_OPENVG_ON_OPENGL
=yes
5824 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
5825 if [ "$CFG_OPENVG" = "auto" ]; then
5828 CFG_OPENVG_LC_INCLUDES
=yes
5829 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
5830 if [ "$CFG_OPENVG" = "auto" ]; then
5833 CFG_OPENVG_LC_INCLUDES
=yes
5834 CFG_OPENVG_ON_OPENGL
=yes
5836 if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
5837 echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
5838 echo " Turn on verbose messaging (-v) to $0 to see the final report."
5839 echo " If you believe this message is in error you may use the continue"
5840 echo " switch (-continue) to $0 to continue."
5846 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
5847 CFG_OPENVG_SHIVA
=yes
5851 # if openvg is disabled and the user specified graphicssystem vg, disable it...
5852 if [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && [ "$CFG_OPENVG" = "no" ]; then
5853 echo "OpenVG Graphics System is disabled due to missing OpenVG support..."
5854 CFG_GRAPHICS_SYSTEM
=default
5857 if [ "$CFG_PTMALLOC" != "no" ]; then
5858 # build ptmalloc, copy .a file to lib/
5859 echo "Building ptmalloc. Please wait..."
5860 (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
5861 mkdir
"$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
5863 QMakeVar add QMAKE_LFLAGS
"$outpath/lib/libptmalloc3.a"
5866 if [ "$CFG_ALSA" = "auto" ]; then
5867 if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/alsa
"alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
5874 if [ -f "$relpath/src/declarative/declarative.pro" ]; then
5875 if [ "$CFG_DECLARATIVE" = "auto" ]; then
5879 if [ "$CFG_DECLARATIVE" = "auto" ] ||
[ "$CFG_DECLARATIVE" = "no" ]; then
5882 echo "Error: Unable to locate the qt-declarative package. Refer to the documentation on how to build the package."
5887 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] ||
[ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
5888 if [ "$CFG_ARCH" = "arm" ] ||
[ "$CFG_ARCH" = "armv6" ]; then
5889 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/javascriptcore-jit
"javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS
5890 if [ $?
!= "0" ]; then
5891 CFG_JAVASCRIPTCORE_JIT
=no
5896 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ]; then
5897 QMakeVar
set JAVASCRIPTCORE_JIT
yes
5898 elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
5899 QMakeVar
set JAVASCRIPTCORE_JIT no
5902 #-------------------------------------------------------------------------------
5903 # ask for all that hasn't been auto-detected or specified in the arguments
5904 #-------------------------------------------------------------------------------
5906 ### fix this: user input should be validated in a loop
5907 if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
5909 echo "Choose pixel-depths to support:"
5911 echo " 1. 1bpp, black/white"
5912 echo " 4. 4bpp, grayscale"
5913 echo " 8. 8bpp, paletted"
5914 echo " 12. 12bpp, rgb 4-4-4"
5915 echo " 15. 15bpp, rgb 5-5-5"
5916 echo " 16. 16bpp, rgb 5-6-5"
5917 echo " 18. 18bpp, rgb 6-6-6"
5918 echo " 24. 24bpp, rgb 8-8-8"
5919 echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
5920 echo " all. All supported depths"
5922 echo "Your choices (default 8,16,32):"
5924 if [ -z "$CFG_QWS_DEPTHS" ] ||
[ "$CFG_QWS_DEPTHS" = "yes" ]; then
5925 CFG_QWS_DEPTHS
=8,16,32
5928 if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
5929 if [ "$CFG_QWS_DEPTHS" = "all" ]; then
5930 CFG_QWS_DEPTHS
="1 4 8 12 15 16 18 24 32 generic"
5932 for D
in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
5934 1|
4|
8|
12|
15|
16|
18|
24|
32) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
5935 generic
) QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
5940 # enable dwarf2 support on Mac
5941 if [ "$CFG_MAC_DWARF2" = "yes" ]; then
5942 QT_CONFIG
="$QT_CONFIG dwarf2"
5945 # Set the default arch.
5946 # Carbon builds: 32 bit x86/ppc.
5947 # For "-cocoa" builds on snow leopard : compiler default (64-bit).
5948 # For "-cocoa" builds on leopard : compiler default (32-bit).
5949 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
5950 source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
5952 if [ "$CFG_MAC_COCOA" != "yes" ]; then
5953 if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
5954 CFG_MAC_ARCHS
=" x86"
5955 elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
5956 CFG_MAC_ARCHS
=" ppc"
5958 CFG_MAC_ARCHS
=" $QT_MAC_DEFAULT_ARCH"
5961 CFG_MAC_ARCHS
=" $QT_MAC_DEFAULT_ARCH"
5964 [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
5967 # enable cocoa and/or carbon on Mac
5968 if [ "$CFG_MAC_COCOA" = "yes" ]; then
5969 # -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
5972 # check which archs are in use, enable cocoa if we find a 64-bit one
5973 if echo "$CFG_MAC_ARCHS" |
grep 64 > /dev
/null
2>&1; then
5974 CFG_MAC_COCOA
="yes";
5975 CFG_MAC_CARBON
="no";
5976 if echo "$CFG_MAC_ARCHS" |
grep -w ppc
> /dev
/null
2>&1; then
5977 CFG_MAC_CARBON
="yes";
5979 if echo "$CFG_MAC_ARCHS" |
grep -w x86
> /dev
/null
2>&1; then
5980 CFG_MAC_CARBON
="yes";
5983 # no 64-bit archs found.
5988 # set the global Mac deployment target. This is overridden on an arch-by-arch basis
5989 # in some cases, see code further down
5990 case "$PLATFORM,$CFG_MAC_COCOA" in
5993 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.5
5997 QMakeVar
set QMAKE_MACOSX_DEPLOYMENT_TARGET
10.4
6001 # disable Qt 3 support on VxWorks
6002 case "$XPLATFORM" in
6003 unsupported
/vxworks
*)
6008 # enable Qt 3 support functionality
6009 if [ "$CFG_QT3SUPPORT" = "yes" ]; then
6010 QT_CONFIG
="$QT_CONFIG qt3support"
6014 if [ "$CFG_PHONON" = "yes" ]; then
6015 QT_CONFIG
="$QT_CONFIG phonon"
6016 if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
6017 QT_CONFIG
="$QT_CONFIG phonon-backend"
6020 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_PHONON"
6023 # disable accessibility
6024 if [ "$CFG_ACCESSIBILITY" = "no" ]; then
6025 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
6027 QT_CONFIG
="$QT_CONFIG accessibility"
6031 if [ "$CFG_EGL" = "no" ]; then
6032 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EGL"
6034 QT_CONFIG
="$QT_CONFIG egl"
6035 if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then
6036 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GLES_EGL"
6041 if [ "$CFG_OPENVG" = "no" ]; then
6042 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENVG"
6044 QT_CONFIG
="$QT_CONFIG openvg"
6045 if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
6046 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
6048 if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
6049 QT_CONFIG
="$QT_CONFIG openvg_on_opengl"
6051 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
6052 QT_CONFIG
="$QT_CONFIG shivavg"
6053 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SHIVAVG"
6058 if [ "$CFG_OPENGL" = "no" ]; then
6059 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENGL"
6061 QT_CONFIG
="$QT_CONFIG opengl"
6064 if [ "$CFG_OPENGL" = "es1" ] ||
[ "$CFG_OPENGL" = "es1cl" ] ||
[ "$CFG_OPENGL" = "es2" ]; then
6065 if [ "$PLATFORM_QWS" = "yes" ]; then
6066 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
6067 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
6069 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES"
6072 if [ "$CFG_OPENGL" = "es1" ]; then
6073 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1"
6074 QT_CONFIG
="$QT_CONFIG opengles1"
6077 if [ "$CFG_OPENGL" = "es1cl" ]; then
6078 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
6079 QT_CONFIG
="$QT_CONFIG opengles1cl"
6082 if [ "$CFG_OPENGL" = "es2" ]; then
6083 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_OPENGL_ES_2"
6084 QT_CONFIG
="$QT_CONFIG opengles2"
6087 # safe execution environment
6088 if [ "$CFG_SXE" != "no" ]; then
6089 QT_CONFIG
="$QT_CONFIG sxe"
6092 # build up the variables for output
6093 if [ "$CFG_DEBUG" = "yes" ]; then
6094 QMAKE_OUTDIR
="${QMAKE_OUTDIR}debug"
6095 QMAKE_CONFIG
="$QMAKE_CONFIG debug"
6096 elif [ "$CFG_DEBUG" = "no" ]; then
6097 QMAKE_OUTDIR
="${QMAKE_OUTDIR}release"
6098 QMAKE_CONFIG
="$QMAKE_CONFIG release"
6100 if [ "$CFG_SHARED" = "yes" ]; then
6101 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-shared"
6102 QMAKE_CONFIG
="$QMAKE_CONFIG shared dll"
6103 elif [ "$CFG_SHARED" = "no" ]; then
6104 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-static"
6105 QMAKE_CONFIG
="$QMAKE_CONFIG static"
6107 if [ "$PLATFORM_QWS" = "yes" ]; then
6108 QMAKE_OUTDIR
="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
6109 QMAKE_CONFIG
="$QMAKE_CONFIG embedded"
6110 QT_CONFIG
="$QT_CONFIG embedded"
6111 rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
6113 QMakeVar
set PRECOMPILED_DIR
".pch/$QMAKE_OUTDIR"
6114 QMakeVar
set OBJECTS_DIR
".obj/$QMAKE_OUTDIR"
6115 QMakeVar
set MOC_DIR
".moc/$QMAKE_OUTDIR"
6116 QMakeVar
set RCC_DIR
".rcc/$QMAKE_OUTDIR"
6117 QMakeVar
set UI_DIR
".uic/$QMAKE_OUTDIR"
6118 if [ "$CFG_LARGEFILE" = "yes" ]; then
6119 QMAKE_CONFIG
="$QMAKE_CONFIG largefile"
6121 if [ "$CFG_STL" = "no" ]; then
6122 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STL"
6124 QMAKE_CONFIG
="$QMAKE_CONFIG stl"
6126 if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
6127 QMAKE_CONFIG
="$QMAKE_CONFIG GNUmake"
6129 [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_exports"
6130 [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG
="$QT_CONFIG reduce_relocations"
6131 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG precompile_header"
6132 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
6133 QMakeVar add QMAKE_CFLAGS
-g
6134 QMakeVar add QMAKE_CXXFLAGS
-g
6135 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info"
6137 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
6138 QMAKE_CONFIG
="$QMAKE_CONFIG separate_debug_info_nocopy"
6140 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG mmx"
6141 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG 3dnow"
6142 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse"
6143 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG sse2"
6144 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG iwmmxt"
6145 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG neon"
6146 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG
="$QMAKE_CONFIG $CFG_MAC_ARCHS"
6147 if [ "$CFG_IPV6" = "yes" ]; then
6148 QT_CONFIG
="$QT_CONFIG ipv6"
6150 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
6151 QT_CONFIG
="$QT_CONFIG clock-gettime"
6153 if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
6154 QT_CONFIG
="$QT_CONFIG clock-monotonic"
6156 if [ "$CFG_MREMAP" = "yes" ]; then
6157 QT_CONFIG
="$QT_CONFIG mremap"
6159 if [ "$CFG_GETADDRINFO" = "yes" ]; then
6160 QT_CONFIG
="$QT_CONFIG getaddrinfo"
6162 if [ "$CFG_IPV6IFNAME" = "yes" ]; then
6163 QT_CONFIG
="$QT_CONFIG ipv6ifname"
6165 if [ "$CFG_GETIFADDRS" = "yes" ]; then
6166 QT_CONFIG
="$QT_CONFIG getifaddrs"
6168 if [ "$CFG_INOTIFY" = "yes" ]; then
6169 QT_CONFIG
="$QT_CONFIG inotify"
6171 if [ "$CFG_LIBJPEG" = "no" ]; then
6173 elif [ "$CFG_LIBJPEG" = "system" ]; then
6174 QT_CONFIG
="$QT_CONFIG system-jpeg"
6176 if [ "$CFG_JPEG" = "no" ]; then
6177 QT_CONFIG
="$QT_CONFIG no-jpeg"
6178 elif [ "$CFG_JPEG" = "yes" ]; then
6179 QT_CONFIG
="$QT_CONFIG jpeg"
6181 if [ "$CFG_LIBMNG" = "no" ]; then
6183 elif [ "$CFG_LIBMNG" = "system" ]; then
6184 QT_CONFIG
="$QT_CONFIG system-mng"
6186 if [ "$CFG_MNG" = "no" ]; then
6187 QT_CONFIG
="$QT_CONFIG no-mng"
6188 elif [ "$CFG_MNG" = "yes" ]; then
6189 QT_CONFIG
="$QT_CONFIG mng"
6191 if [ "$CFG_LIBPNG" = "no" ]; then
6194 if [ "$CFG_LIBPNG" = "system" ]; then
6195 QT_CONFIG
="$QT_CONFIG system-png"
6197 if [ "$CFG_PNG" = "no" ]; then
6198 QT_CONFIG
="$QT_CONFIG no-png"
6199 elif [ "$CFG_PNG" = "yes" ]; then
6200 QT_CONFIG
="$QT_CONFIG png"
6202 if [ "$CFG_GIF" = "no" ]; then
6203 QT_CONFIG
="$QT_CONFIG no-gif"
6204 elif [ "$CFG_GIF" = "yes" ]; then
6205 QT_CONFIG
="$QT_CONFIG gif"
6207 if [ "$CFG_LIBTIFF" = "no" ]; then
6209 elif [ "$CFG_LIBTIFF" = "system" ]; then
6210 QT_CONFIG
="$QT_CONFIG system-tiff"
6212 if [ "$CFG_TIFF" = "no" ]; then
6213 QT_CONFIG
="$QT_CONFIG no-tiff"
6214 elif [ "$CFG_TIFF" = "yes" ]; then
6215 QT_CONFIG
="$QT_CONFIG tiff"
6217 if [ "$CFG_LIBFREETYPE" = "no" ]; then
6218 QT_CONFIG
="$QT_CONFIG no-freetype"
6219 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
6220 QT_CONFIG
="$QT_CONFIG system-freetype"
6222 QT_CONFIG
="$QT_CONFIG freetype"
6225 if [ "x$PLATFORM_MAC" = "xyes" ]; then
6226 #On Mac we implicitly link against libz, so we
6227 #never use the 3rdparty stuff.
6228 [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB
="system"
6230 if [ "$CFG_ZLIB" = "yes" ]; then
6231 QT_CONFIG
="$QT_CONFIG zlib"
6232 elif [ "$CFG_ZLIB" = "system" ]; then
6233 QT_CONFIG
="$QT_CONFIG system-zlib"
6236 [ "$CFG_NIS" = "yes" ] && QT_CONFIG
="$QT_CONFIG nis"
6237 [ "$CFG_CUPS" = "yes" ] && QT_CONFIG
="$QT_CONFIG cups"
6238 [ "$CFG_ICONV" = "yes" ] && QT_CONFIG
="$QT_CONFIG iconv"
6239 [ "$CFG_ICONV" = "gnu" ] && QT_CONFIG
="$QT_CONFIG gnu-libiconv"
6240 [ "$CFG_GLIB" = "yes" ] && QT_CONFIG
="$QT_CONFIG glib"
6241 [ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG
="$QT_CONFIG gstreamer"
6242 [ "$CFG_DBUS" = "yes" ] && QT_CONFIG
="$QT_CONFIG dbus"
6243 [ "$CFG_DBUS" = "linked" ] && QT_CONFIG
="$QT_CONFIG dbus dbus-linked"
6244 [ "$CFG_NAS" = "system" ] && QT_CONFIG
="$QT_CONFIG nas"
6245 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG
="$QT_CONFIG openssl"
6246 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG
="$QT_CONFIG openssl-linked"
6248 if [ "$PLATFORM_X11" = "yes" ]; then
6249 [ "$CFG_SM" = "yes" ] && QT_CONFIG
="$QT_CONFIG x11sm"
6251 # for some reason, the following libraries are not always built shared,
6252 # so *every* program/lib (including Qt) has to link against them
6253 if [ "$CFG_XSHAPE" = "yes" ]; then
6254 QT_CONFIG
="$QT_CONFIG xshape"
6256 if [ "$CFG_XSYNC" = "yes" ]; then
6257 QT_CONFIG
="$QT_CONFIG xsync"
6259 if [ "$CFG_XINERAMA" = "yes" ]; then
6260 QT_CONFIG
="$QT_CONFIG xinerama"
6261 QMakeVar
set QMAKE_LIBS_X11
'-lXinerama $$QMAKE_LIBS_X11'
6263 if [ "$CFG_XCURSOR" = "yes" ]; then
6264 QT_CONFIG
="$QT_CONFIG xcursor"
6265 QMakeVar
set QMAKE_LIBS_X11
'-lXcursor $$QMAKE_LIBS_X11'
6267 if [ "$CFG_XFIXES" = "yes" ]; then
6268 QT_CONFIG
="$QT_CONFIG xfixes"
6269 QMakeVar
set QMAKE_LIBS_X11
'-lXfixes $$QMAKE_LIBS_X11'
6271 if [ "$CFG_XRANDR" = "yes" ]; then
6272 QT_CONFIG
="$QT_CONFIG xrandr"
6273 if [ "$CFG_XRENDER" != "yes" ]; then
6274 # libXrandr uses 1 function from libXrender, so we always have to have it :/
6275 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr -lXrender $$QMAKE_LIBS_X11'
6277 QMakeVar
set QMAKE_LIBS_X11
'-lXrandr $$QMAKE_LIBS_X11'
6280 if [ "$CFG_XRENDER" = "yes" ]; then
6281 QT_CONFIG
="$QT_CONFIG xrender"
6282 QMakeVar
set QMAKE_LIBS_X11
'-lXrender $$QMAKE_LIBS_X11'
6284 if [ "$CFG_MITSHM" = "yes" ]; then
6285 QT_CONFIG
="$QT_CONFIG mitshm"
6287 if [ "$CFG_FONTCONFIG" = "yes" ]; then
6288 QT_CONFIG
="$QT_CONFIG fontconfig"
6290 if [ "$CFG_XINPUT" = "yes" ]; then
6291 QMakeVar
set QMAKE_LIBS_X11
'-lXi $$QMAKE_LIBS_X11'
6293 if [ "$CFG_XINPUT" = "yes" ]; then
6294 QT_CONFIG
="$QT_CONFIG xinput tablet"
6296 if [ "$CFG_XKB" = "yes" ]; then
6297 QT_CONFIG
="$QT_CONFIG xkb"
6301 [ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES
"$D_FLAGS"
6302 [ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS
"$L_FLAGS"
6303 [ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS
"$l_FLAGS"
6305 if [ "$PLATFORM_MAC" = "yes" ]; then
6306 if [ "$CFG_RPATH" = "yes" ]; then
6307 QMAKE_CONFIG
="$QMAKE_CONFIG absolute_library_soname"
6309 elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
6310 if [ -n "$RPATH_FLAGS" ]; then
6312 echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
6316 elif [ "$CFG_RPATH" = "yes" ]; then
6317 RPATH_MESSAGE
=" NOTE: This platform does not support runtime library paths, using -no-rpath."
6321 if [ "$CFG_RPATH" = "yes" ]; then
6322 # set the default rpath to the library installation directory
6323 RPATH_FLAGS
="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
6325 if [ -n "$RPATH_FLAGS" ]; then
6326 # add the user defined rpaths
6327 QMakeVar add QMAKE_RPATHDIR
"$RPATH_FLAGS"
6331 if [ '!' -z "$I_FLAGS" ]; then
6332 # add the user define include paths
6333 QMakeVar add QMAKE_CFLAGS
"$I_FLAGS"
6334 QMakeVar add QMAKE_CXXFLAGS
"$I_FLAGS"
6337 # turn off exceptions for the compilers that support it
6338 if [ "$PLATFORM_QWS" = "yes" ]; then
6339 COMPILER
=`echo $XPLATFORM | cut -f 3- -d-`
6341 COMPILER
=`echo $PLATFORM | cut -f 2- -d-`
6343 if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
6347 if [ "$CFG_EXCEPTIONS" != "no" ]; then
6348 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG exceptions"
6351 if [ "$CFG_ALSA" = "yes" ]; then
6352 QT_CONFIG
="$QT_CONFIG alsa"
6356 # Some Qt modules are too advanced in C++ for some old compilers
6357 # Detect here the platforms where they are known to work.
6359 # See Qt documentation for more information on which features are
6360 # supported and on which compilers.
6362 canBuildQtXmlPatterns
="yes"
6363 canBuildWebKit
="$HAVE_STL"
6364 canBuildQtConcurrent
="yes"
6366 # WebKit requires stdint.h
6367 "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.
tests
/unix
/stdint
"Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
6368 if [ $?
!= "0" ]; then
6372 case "$XPLATFORM" in
6374 # PA-RISC's assembly is too limited
6375 # gcc 3.4 on that platform can't build QtXmlPatterns
6376 # the assembly it generates cannot be compiled
6378 # Check gcc's version
6379 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6383 canBuildQtXmlPatterns
="no"
6387 canBuildQtXmlPatterns
="no"
6391 unsupported
/vxworks-
*-g++*)
6394 unsupported
/vxworks-
*-dcc*)
6396 canBuildQtXmlPatterns
="no"
6399 # Check gcc's version
6400 case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
6408 canBuildQtXmlPatterns
="no"
6413 # Check the compiler version
6414 case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
6417 canBuildQtXmlPatterns
="no"
6418 canBuildQtConcurrent
="no"
6422 canBuildQtConcurrent
="no"
6428 canBuildQtXmlPatterns
="no"
6429 canBuildQtConcurrent
="no"
6435 # Get the xlC version
6436 cat > xlcver.c
<<EOF
6440 printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
6445 if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c
>/dev
/null
2>/dev
/null
; then
6446 xlcver
=`./xlcver 2>/dev/null`
6449 if [ "$OPT_VERBOSE" = "yes" ]; then
6450 if [ -n "$xlcver" ]; then
6451 echo Found IBM xlC version
: $xlcver.
6453 echo Could not determine IBM xlC version
, assuming oldest supported.
6460 canBuildQtXmlPatterns
="no"
6461 canBuildQtConcurrent
="no"
6465 canBuildQtConcurrent
="no"
6471 canBuildQtConcurrent
="no"
6475 CFG_CONCURRENT
="yes"
6476 if [ "$canBuildQtConcurrent" = "no" ]; then
6477 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CONCURRENT"
6481 if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
6482 echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
6485 if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
6486 CFG_XMLPATTERNS
="$canBuildQtXmlPatterns"
6487 elif [ "$CFG_EXCEPTIONS" = "no" ]; then
6488 CFG_XMLPATTERNS
="no"
6490 if [ "$CFG_XMLPATTERNS" = "yes" ]; then
6491 QT_CONFIG
="$QT_CONFIG xmlpatterns"
6493 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
6496 if [ "$CFG_MULTIMEDIA" = "no" ]; then
6497 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
6499 QT_CONFIG
="$QT_CONFIG multimedia"
6502 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
6503 QT_CONFIG
="$QT_CONFIG audio-backend"
6506 if [ "$CFG_SVG" = "yes" ]; then
6507 QT_CONFIG
="$QT_CONFIG svg"
6509 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SVG"
6512 if [ "$CFG_DECLARATIVE" = "yes" ]; then
6513 QT_CONFIG
="$QT_CONFIG declarative"
6515 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
6518 if [ "$CFG_WEBKIT" = "auto" ]; then
6519 CFG_WEBKIT
="$canBuildWebKit"
6522 if [ "$CFG_WEBKIT" = "yes" ]; then
6523 QT_CONFIG
="$QT_CONFIG webkit"
6524 # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
6528 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_WEBKIT"
6531 if [ "$CFG_SCRIPT" = "auto" ]; then
6535 if [ "$CFG_SCRIPT" = "yes" ]; then
6536 QT_CONFIG
="$QT_CONFIG script"
6538 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPT"
6541 if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then
6542 echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled."
6545 if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then
6546 CFG_SCRIPTTOOLS
="yes"
6547 elif [ "$CFG_SCRIPT" = "no" ]; then
6548 CFG_SCRIPTTOOLS
="no"
6551 if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
6552 QT_CONFIG
="$QT_CONFIG scripttools"
6554 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
6557 if [ "$CFG_EXCEPTIONS" = "no" ]; then
6560 QMakeVar add QMAKE_CFLAGS
-fno-exceptions
6561 QMakeVar add QMAKE_CXXFLAGS
-fno-exceptions
6562 QMakeVar add QMAKE_LFLAGS
-fno-exceptions
6567 QMakeVar add QMAKE_CFLAGS
-LANG:exceptions
=off
6568 QMakeVar add QMAKE_CXXFLAGS
-LANG:exceptions
=off
6569 QMakeVar add QMAKE_LFLAGS
-LANG:exceptions
=off
6576 QMAKE_CONFIG
="$QMAKE_CONFIG exceptions_off"
6579 # On Mac, set the minimum deployment target for the different architechtures
6580 # using the Xarch compiler option when supported (10.5 and up). On 10.4 the
6581 # deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
6582 # env. variable. "-cocoa" on the command line means Cocoa is used in 32-bit mode also,
6583 # in this case fall back on QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
6584 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
6585 if echo "$CFG_MAC_ARCHS" |
grep '\<x86\>' > /dev
/null
2>&1; then
6586 QMakeVar add QMAKE_CFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6587 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6588 QMakeVar add QMAKE_LFLAGS
"-Xarch_i386 -mmacosx-version-min=10.4"
6589 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86
"-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
6591 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc\>' > /dev
/null
2>&1; then
6592 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6593 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6594 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc -mmacosx-version-min=10.4"
6595 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC
"-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
6597 if echo "$CFG_MAC_ARCHS" |
grep '\<x86_64\>' > /dev
/null
2>&1; then
6598 QMakeVar add QMAKE_CFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6599 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6600 QMakeVar add QMAKE_LFLAGS
"-Xarch_x86_64 -mmacosx-version-min=10.5"
6601 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64
"-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
6603 if echo "$CFG_MAC_ARCHS" |
grep '\<ppc64\>' > /dev
/null
2>&1; then
6604 QMakeVar add QMAKE_CFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6605 QMakeVar add QMAKE_CXXFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6606 QMakeVar add QMAKE_LFLAGS
"-Xarch_ppc64 -mmacosx-version-min=10.5"
6607 QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64
"-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
6611 #-------------------------------------------------------------------------------
6612 # generate QT_BUILD_KEY
6613 #-------------------------------------------------------------------------------
6615 # some compilers generate binary incompatible code between different versions,
6616 # so we need to generate a build key that is different between these compilers
6620 COMPILER_VERSION
=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
6622 case "$COMPILER_VERSION" in
6624 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
6625 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
6626 QT_GCC_PATCH_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
6629 QT_GCC_MAJOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
6630 QT_GCC_MINOR_VERSION
=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
6631 QT_GCC_PATCH_VERSION
=0
6635 case "$COMPILER_VERSION" in
6637 COMPILER_VERSION
="2.95.*"
6640 COMPILER_VERSION
="3.*"
6643 COMPILER_VERSION
="4"
6648 [ '!' -z "$COMPILER_VERSION" ] && COMPILER
="g++-${COMPILER_VERSION}"
6655 # QT_CONFIG can contain the following:
6657 # Things that affect the Qt API/ABI:
6660 # minimal-config small-config medium-config large-config full-config
6662 # Different edition modules:
6663 # network canvas table xml opengl sql
6665 # Things that do not affect the Qt API/ABI:
6667 # system-jpeg no-jpeg jpeg
6668 # system-mng no-mng mng
6669 # system-png no-png png
6670 # system-zlib no-zlib zlib
6671 # system-libtiff no-libtiff
6684 # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
6685 # Embedded: embedded freetype
6691 # determine the build options
6692 for config_option
in $QMAKE_CONFIG $QT_CONFIG; do
6694 case "$config_option" in
6696 # take the last *-config setting. this is the highest config being used,
6697 # and is the one that we will use for tagging plugins
6698 BUILD_CONFIG
="$config_option"
6701 *) # skip all other options since they don't affect the Qt API/ABI.
6705 if [ "$SKIP" = "no" ]; then
6706 BUILD_OPTIONS
="$BUILD_OPTIONS $config_option"
6710 # put the options that we are missing into .options
6712 for opt
in `echo $ALL_OPTIONS`; do
6714 if echo $BUILD_OPTIONS |
grep $opt >/dev
/null
2>&1; then
6717 if [ "$SKIP" = "no" ]; then
6718 echo "$opt" >> .options
6722 # reconstruct BUILD_OPTIONS with a sorted negative feature list
6723 # (ie. only things that are missing are will be put into the build key)
6725 if [ -f .options
]; then
6726 for opt
in `sort -f .options | uniq`; do
6727 BUILD_OPTIONS
="$BUILD_OPTIONS no-$opt"
6732 # QT_NO* defines affect the Qt API (and binary compatibility). they need
6733 # to be included in the build key
6734 for build_option
in $D_FLAGS; do
6735 build_option
=`echo $build_option | cut -d \" -f 2 -`
6736 case "$build_option" in
6738 echo "$build_option" >> .options
6741 # skip all other compiler defines
6746 # sort the compile time defines (helps ensure that changes in this configure
6747 # script don't affect the QT_BUILD_KEY generation)
6748 if [ -f .options
]; then
6749 for opt
in `sort -f .options | uniq`; do
6750 BUILD_OPTIONS
="$BUILD_OPTIONS $opt"
6755 BUILD_OPTIONS
="$BUILD_CONFIG $BUILD_OPTIONS"
6756 # extract the operating system from the XPLATFORM
6757 TARGET_OPERATING_SYSTEM
=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
6759 # when cross-compiling, don't include build-host information (build key is target specific)
6760 QT_BUILD_KEY
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6761 if [ -n "$QT_NAMESPACE" ]; then
6762 QT_BUILD_KEY
="$QT_BUILD_KEY $QT_NAMESPACE"
6764 MAC_NEED_TWO_BUILD_KEYS
="no"
6765 if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
6766 QT_BUILD_KEY_CARBON
=$QT_BUILD_KEY
6767 TARGET_OPERATING_SYSTEM
="$TARGET_OPERATING_SYSTEM-cocoa"
6768 QT_BUILD_KEY_COCOA
="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
6769 if [ "$CFG_MAC_CARBON" = "no" ]; then
6770 QT_BUILD_KEY
=$QT_BUILD_KEY_COCOA
6772 MAC_NEED_TWO_BUILD_KEYS
="yes"
6775 # don't break loading plugins build with an older version of Qt
6776 QT_BUILD_KEY_COMPAT
=
6777 if [ "$QT_CROSS_COMPILE" = "no" ]; then
6778 # previous versions of Qt used a build key built from the uname
6779 QT_BUILD_KEY_COMPAT
="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
6780 if [ -n "$QT_NAMESPACE" ]; then
6781 QT_BUILD_KEY_COMPAT
="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
6784 # strip out leading/trailing/extra whitespace
6785 QT_BUILD_KEY
=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6786 QT_BUILD_KEY_COMPAT
=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
6788 #-------------------------------------------------------------------------------
6789 # part of configuration information goes into qconfig.h
6790 #-------------------------------------------------------------------------------
6792 case "$CFG_QCONFIG" in
6794 echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
6797 tmpconfig
="$outpath/src/corelib/global/qconfig.h.new"
6798 echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
6799 cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
6800 echo "#endif" >>"$tmpconfig"
6804 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6808 # define QT_EDITION $QT_EDITION
6811 /* Machine byte-order */
6812 #define Q_BIG_ENDIAN 4321
6813 #define Q_LITTLE_ENDIAN 1234
6816 if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
6817 echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
6818 >> "$outpath/src/corelib/global/qconfig.h.new"
6820 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6822 #define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
6823 #define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
6827 if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
6828 echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
6829 >> "$outpath/src/corelib/global/qconfig.h.new"
6831 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6833 echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
6834 if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
6835 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6836 #if defined(__BIG_ENDIAN__)
6837 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6838 #elif defined(__LITTLE_ENDIAN__)
6839 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6841 # error "Unable to determine byte order!"
6845 echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6847 echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
6848 if [ "$CFG_ENDIAN" = "auto" ]; then
6849 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6850 #if defined(__BIG_ENDIAN__)
6851 # define Q_BYTE_ORDER Q_BIG_ENDIAN
6852 #elif defined(__LITTLE_ENDIAN__)
6853 # define Q_BYTE_ORDER Q_LITTLE_ENDIAN
6855 # error "Unable to determine byte order!"
6859 echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
6861 echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
6863 if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
6864 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6865 /* Non-IEEE double format */
6866 #define Q_DOUBLE_LITTLE "01234567"
6867 #define Q_DOUBLE_BIG "76543210"
6868 #define Q_DOUBLE_LITTLE_SWAPPED "45670123"
6869 #define Q_DOUBLE_BIG_SWAPPED "32107654"
6870 #define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
6873 if [ "$CFG_ARMFPA" = "yes" ]; then
6874 if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
6875 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6876 #ifndef QT_BOOTSTRAPPED
6881 echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
6885 CFG_ARCH_STR
=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6886 CFG_HOST_ARCH_STR
=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6887 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6888 /* Machine Architecture */
6889 #ifndef QT_BOOTSTRAPPED
6890 # define QT_ARCH_${CFG_ARCH_STR}
6892 # define QT_ARCH_${CFG_HOST_ARCH_STR}
6896 echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
6897 [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
6899 if [ "$CFG_LARGEFILE" = "yes" ]; then
6900 echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
6903 # if both carbon and cocoa are specified, enable the autodetection code.
6904 if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
6905 echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6906 elif [ "$CFG_MAC_COCOA" = "yes" ]; then
6907 echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
6910 if [ "$CFG_FRAMEWORK" = "yes" ]; then
6911 echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
6914 if [ "$PLATFORM_MAC" = "yes" ]; then
6915 cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
6916 #if defined(__LP64__)
6917 # define QT_POINTER_SIZE 8
6919 # define QT_POINTER_SIZE 4
6923 "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
6924 echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
6928 echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
6930 if [ "$CFG_DEV" = "yes" ]; then
6931 echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
6934 # Embedded compile time options
6935 if [ "$PLATFORM_QWS" = "yes" ]; then
6936 # Add QWS to config.h
6937 QCONFIG_FLAGS
="$QCONFIG_FLAGS Q_WS_QWS"
6939 # Add excluded decorations to $QCONFIG_FLAGS
6940 decors
=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
6941 for decor
in $decors; do
6942 NODECORATION
=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6943 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
6946 # Figure which embedded drivers which are turned off
6947 CFG_GFX_OFF
="$CFG_GFX_AVAILABLE"
6948 for ADRIVER
in $CFG_GFX_ON; do
6949 CFG_GFX_OFF
=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
6952 CFG_KBD_OFF
="$CFG_KBD_AVAILABLE"
6953 # the um driver is currently not in the available list for external builds
6954 if [ "$CFG_DEV" = "no" ]; then
6955 CFG_KBD_OFF
="$CFG_KBD_OFF um"
6957 for ADRIVER
in $CFG_KBD_ON; do
6958 CFG_KBD_OFF
=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
6961 CFG_MOUSE_OFF
="$CFG_MOUSE_AVAILABLE"
6962 for ADRIVER
in $CFG_MOUSE_ON; do
6963 CFG_MOUSE_OFF
=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
6966 for DRIVER
in $CFG_GFX_OFF; do
6967 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6968 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
6971 for DRIVER
in $CFG_KBD_OFF; do
6972 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6973 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
6976 for DRIVER
in $CFG_MOUSE_OFF; do
6977 NODRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6978 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
6982 if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
6983 QCONFIG_FLAGS
="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
6986 # Add turned on SQL drivers
6987 for DRIVER
in $CFG_SQL_AVAILABLE; do
6988 eval "VAL=\$CFG_SQL_$DRIVER"
6991 ONDRIVER
=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6992 QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
6993 SQL_DRIVERS
="$SQL_DRIVERS $DRIVER"
6996 SQL_PLUGINS
="$SQL_PLUGINS $DRIVER"
7002 QMakeVar
set sql-drivers
"$SQL_DRIVERS"
7003 QMakeVar
set sql-plugins
"$SQL_PLUGINS"
7005 # Add other configuration options to the qconfig.h file
7006 [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
7007 [ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
7008 [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
7009 [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
7010 [ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
7011 [ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ZLIB"
7012 [ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
7013 [ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6"
7014 [ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SXE"
7015 [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_DBUS"
7017 if [ "$PLATFORM_QWS" != "yes" ]; then
7018 [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
7019 [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
7020 [ "$CFG_GRAPHICS_SYSTEM" = "openvg" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENVG"
7023 # X11/Unix/Mac only configs
7024 [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CUPS"
7025 [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ICONV"
7026 [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GLIB"
7027 [ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GSTREAMER"
7028 [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
7029 [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
7030 [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MREMAP"
7031 [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
7032 [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
7033 [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
7034 [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_INOTIFY"
7035 [ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NAS"
7036 [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_NIS"
7037 [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_OPENSSL"
7038 [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
7040 [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
7041 [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XCURSOR"
7042 [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XFIXES"
7043 [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
7044 [ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINERAMA"
7045 [ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XKB"
7046 [ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRANDR"
7047 [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XRENDER"
7048 [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_MITSHM"
7049 [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_SHAPE"
7050 [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XSYNC"
7051 [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
7053 [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
7054 [ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
7055 [ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
7056 [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
7057 [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
7058 [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS
="$QCONFIG_FLAGS QT_NO_ALSA"
7060 # sort QCONFIG_FLAGS for neatness if we can
7061 [ '!' -z "$AWK" ] && QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
7062 QCONFIG_FLAGS
=`echo $QCONFIG_FLAGS`
7064 if [ -n "$QCONFIG_FLAGS" ]; then
7065 for cfg
in $QCONFIG_FLAGS; do
7066 cfgd
=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
7067 cfg
=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
7068 # figure out define logic, so we can output the correct
7069 # ifdefs to override the global defines in a project
7071 if [ true
] && echo "$cfgd" |
grep 'QT_NO_' >/dev
/null
2>&1; then
7072 # QT_NO_option can be forcefully turned on by QT_option
7073 cfgdNeg
=`echo $cfgd | sed "s,QT_NO_,QT_,"`
7074 elif [ true
] && echo "$cfgd" |
grep 'QT_' >/dev
/null
2>&1; then
7075 # QT_option can be forcefully turned off by QT_NO_option
7076 cfgdNeg
=`echo $cfgd | sed "s,QT_,QT_NO_,"`
7079 if [ -z $cfgdNeg ]; then
7080 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7087 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7088 #if defined($cfgd) && defined($cfgdNeg)
7090 #elif !defined($cfgd) && !defined($cfgdNeg)
7099 if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
7100 cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
7101 #define QT_VISIBILITY_AVAILABLE
7106 # avoid unecessary rebuilds by copying only if qconfig.h has changed
7107 if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
7108 rm -f "$outpath/src/corelib/global/qconfig.h.new"
7110 [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w
"$outpath/src/corelib/global/qconfig.h"
7111 mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
7112 chmod -w "$outpath/src/corelib/global/qconfig.h"
7113 for conf
in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
7114 if [ '!' -f "$conf" ]; then
7115 ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
7120 #-------------------------------------------------------------------------------
7121 # save configuration into qconfig.pri
7122 #-------------------------------------------------------------------------------
7124 QTCONFIG
="$outpath/mkspecs/qconfig.pri"
7125 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG no_mocdepend"
7126 [ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
7127 if [ "$CFG_DEBUG" = "yes" ]; then
7128 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG debug"
7129 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7130 QT_CONFIG
="$QT_CONFIG release"
7132 QT_CONFIG
="$QT_CONFIG debug"
7133 elif [ "$CFG_DEBUG" = "no" ]; then
7134 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG release"
7135 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7136 QT_CONFIG
="$QT_CONFIG debug"
7138 QT_CONFIG
="$QT_CONFIG release"
7140 if [ "$CFG_STL" = "yes" ]; then
7141 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG stl"
7143 if [ "$CFG_FRAMEWORK" = "no" ]; then
7144 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_no_framework"
7146 QT_CONFIG
="$QT_CONFIG qt_framework"
7147 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG qt_framework"
7149 if [ "$PLATFORM_MAC" = "yes" ]; then
7150 QT_CONFIG
="$QT_CONFIG $CFG_MAC_ARCHS"
7152 if [ "$CFG_DEV" = "yes" ]; then
7153 QT_CONFIG
="$QT_CONFIG private_tests"
7156 # Make the application arch follow the Qt arch for single arch builds.
7157 # (for multiple-arch builds, set CONFIG manually in the application .pro file)
7158 if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
7159 QTCONFIG_CONFIG
="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
7162 cat >>"$QTCONFIG.tmp" <<EOF
7164 CONFIG += $QTCONFIG_CONFIG
7166 QT_EDITION = $Edition
7167 QT_CONFIG += $QT_CONFIG
7170 QT_VERSION = $QT_VERSION
7171 QT_MAJOR_VERSION = $QT_MAJOR_VERSION
7172 QT_MINOR_VERSION = $QT_MINOR_VERSION
7173 QT_PATCH_VERSION = $QT_PATCH_VERSION
7176 QT_LIBINFIX = $QT_LIBINFIX
7177 QT_NAMESPACE = $QT_NAMESPACE
7178 QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
7181 if [ "$CFG_RPATH" = "yes" ]; then
7182 echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
7184 if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
7185 echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
7186 echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
7187 echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
7189 # replace qconfig.pri if it differs from the newly created temp file
7190 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
7191 rm -f "$QTCONFIG.tmp"
7193 mv -f "$QTCONFIG.tmp" "$QTCONFIG"
7196 #-------------------------------------------------------------------------------
7197 # save configuration into .qmake.cache
7198 #-------------------------------------------------------------------------------
7200 CACHEFILE
="$outpath/.qmake.cache"
7201 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
7202 cat >>"$CACHEFILE.tmp" <<EOF
7203 CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
7204 QT_SOURCE_TREE = \$\$quote($relpath)
7205 QT_BUILD_TREE = \$\$quote($outpath)
7206 QT_BUILD_PARTS = $CFG_BUILD_PARTS
7207 QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
7208 QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
7210 #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
7211 QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
7212 QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
7213 QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
7214 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
7215 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
7216 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
7217 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
7221 # Ensure we can link to uninistalled libraries
7222 if linkerSupportsFlag
-rpath-link "$outpath/lib"; then
7223 echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"
7226 if [ -n "$QT_CFLAGS_PSQL" ]; then
7227 echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
7229 if [ -n "$QT_LFLAGS_PSQL" ]; then
7230 echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
7232 if [ -n "$QT_CFLAGS_MYSQL" ]; then
7233 echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7235 if [ -n "$QT_LFLAGS_MYSQL" ]; then
7236 echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
7238 if [ -n "$QT_CFLAGS_SQLITE" ]; then
7239 echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7241 if [ -n "$QT_LFLAGS_SQLITE" ]; then
7242 echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
7244 if [ -n "$QT_LFLAGS_ODBC" ]; then
7245 echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
7248 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
7249 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
7252 #dump in the OPENSSL_LIBS info
7253 if [ '!' -z "$OPENSSL_LIBS" ]; then
7254 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
7255 elif [ "$CFG_OPENSSL" = "linked" ]; then
7256 echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
7259 #dump in the SDK info
7260 if [ '!' -z "$CFG_SDK" ]; then
7261 echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
7264 # mac gcc -Xarch support
7265 if [ "$CFG_MAC_XARCH" = "no" ]; then
7266 echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
7269 #dump the qmake spec
7270 if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
7271 echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
7273 echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
7277 cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
7278 rm -f "$QMAKE_VARS_FILE" 2>/dev
/null
7282 [ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4
>/dev
/null
2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL
="yes"
7283 if [ "$CFG_INCREMENTAL" = "yes" ]; then
7284 find "$relpath" -perm u
+w
-mtime -3 |
grep 'cpp$' |
while read f
; do
7285 # don't need to worry about generated files
7286 [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
7287 basename "$f" |
grep '^moc_' >/dev
/null
2>&1 && continue
7289 INCREMENTAL
="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
7291 [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
7292 [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
7295 # replace .qmake.cache if it differs from the newly created temp file
7296 if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
7297 rm -f "$CACHEFILE.tmp"
7299 mv -f "$CACHEFILE.tmp" "$CACHEFILE"
7302 #-------------------------------------------------------------------------------
7303 # give feedback on configuration
7304 #-------------------------------------------------------------------------------
7308 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7311 This target is using the GNU C++ compiler ($PLATFORM).
7313 Recent versions of this compiler automatically include code for
7314 exceptions, which increase both the size of the Qt libraries and
7315 the amount of memory taken by your applications.
7317 You may choose to re-run `basename $0` with the -no-exceptions
7318 option to compile Qt without exceptions. This is completely binary
7319 compatible, and existing applications will continue to work.
7327 if [ "$CFG_EXCEPTIONS" != "no" ]; then
7330 This target is using the MIPSpro C++ compiler ($PLATFORM).
7332 You may choose to re-run `basename $0` with the -no-exceptions
7333 option to compile Qt without exceptions. This will make the
7334 size of the Qt library smaller and reduce the amount of memory
7335 taken by your applications.
7346 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7348 WARNING: DWARF2 debug symbols are not enabled. Linking webkit
7349 in debug mode will run out of memory on systems with 2GB or less.
7350 Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
7351 -no-webkit or -release to skip webkit debug.
7356 if [ "$XPLATFORM" = "$PLATFORM" ]; then
7357 echo "Build type: $PLATFORM"
7359 echo "Building on: $PLATFORM"
7360 echo "Building for: $XPLATFORM"
7363 if [ "$PLATFORM_MAC" = "yes" ]; then
7364 echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
7366 echo "Architecture: $CFG_ARCH"
7369 if [ "$PLATFORM_QWS" = "yes" ]; then
7370 echo "Host architecture: $CFG_HOST_ARCH"
7373 if [ "$PLATFORM_MAC" = "yes" ]; then
7374 if [ "$CFG_MAC_COCOA" = "yes" ]; then
7375 if [ "$CFG_MAC_CARBON" = "yes" ]; then
7376 echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
7378 echo "Using framework: Cocoa"
7381 echo "Using framework: Carbon"
7385 if [ -n "$PLATFORM_NOTES" ]; then
7386 echo "Platform notes:"
7387 echo "$PLATFORM_NOTES"
7392 if [ "$OPT_VERBOSE" = "yes" ]; then
7393 if echo '\c' |
grep '\c' >/dev
/null
; then
7394 echo -n "qmake vars .......... "
7396 echo "qmake vars .......... \c"
7398 cat "$QMAKE_VARS_FILE" |
tr '\n' ' '
7399 echo "qmake switches ...... $QMAKE_SWITCHES"
7402 [ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
7403 echo "Build ............... $CFG_BUILD_PARTS"
7404 echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
7405 if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
7406 echo "Debug ............... yes (combined)"
7407 if [ "$CFG_DEBUG" = "yes" ]; then
7408 echo "Default Link ........ debug"
7410 echo "Default Link ........ release"
7413 echo "Debug ............... $CFG_DEBUG"
7415 echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
7416 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
7417 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
7418 [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
7419 echo "QtConcurrent code.... $CFG_CONCURRENT"
7420 echo "QtScript module ..... $CFG_SCRIPT"
7421 echo "QtScriptTools module $CFG_SCRIPTTOOLS"
7422 echo "QtXmlPatterns module $CFG_XMLPATTERNS"
7423 echo "Phonon module ....... $CFG_PHONON"
7424 echo "Multimedia module ... $CFG_MULTIMEDIA"
7425 echo "SVG module .......... $CFG_SVG"
7426 echo "WebKit module ....... $CFG_WEBKIT"
7427 if [ "$CFG_WEBKIT" = "yes" ]; then
7428 if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
7429 echo "JavaScriptCore JIT .. To be decided by JavaScriptCore"
7431 echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
7434 echo "Declarative module .. $CFG_DECLARATIVE"
7435 echo "STL support ......... $CFG_STL"
7436 echo "PCH support ......... $CFG_PRECOMPILE"
7437 echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
7438 if [ "$CFG_ARCH" = "arm" ] ||
[ "$CFG_ARCH" = "armv6" ]; then
7439 echo "iWMMXt support ...... ${CFG_IWMMXT}"
7440 echo "NEON support ........ ${CFG_NEON}"
7442 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
7443 echo "IPv6 support ........ $CFG_IPV6"
7444 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
7445 echo "getaddrinfo support . $CFG_GETADDRINFO"
7446 echo "getifaddrs support .. $CFG_GETIFADDRS"
7447 echo "Accessibility ....... $CFG_ACCESSIBILITY"
7448 echo "NIS support ......... $CFG_NIS"
7449 echo "CUPS support ........ $CFG_CUPS"
7450 echo "Iconv support ....... $CFG_ICONV"
7451 echo "Glib support ........ $CFG_GLIB"
7452 echo "GStreamer support ... $CFG_GSTREAMER"
7453 echo "Large File support .. $CFG_LARGEFILE"
7454 echo "GIF support ......... $CFG_GIF"
7455 if [ "$CFG_TIFF" = "no" ]; then
7456 echo "TIFF support ........ $CFG_TIFF"
7458 echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
7460 if [ "$CFG_JPEG" = "no" ]; then
7461 echo "JPEG support ........ $CFG_JPEG"
7463 echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
7465 if [ "$CFG_PNG" = "no" ]; then
7466 echo "PNG support ......... $CFG_PNG"
7468 echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
7470 if [ "$CFG_MNG" = "no" ]; then
7471 echo "MNG support ......... $CFG_MNG"
7473 echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
7475 echo "zlib support ........ $CFG_ZLIB"
7476 echo "Session management .. $CFG_SM"
7477 if [ "$PLATFORM_QWS" = "yes" ]; then
7478 echo "Embedded support .... $CFG_EMBEDDED"
7479 if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
7480 echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
7482 echo "Freetype2 support ... $CFG_QWS_FREETYPE"
7484 # Normalize the decoration output first
7485 CFG_GFX_ON
=`echo ${CFG_GFX_ON}`
7486 CFG_GFX_PLUGIN
=`echo ${CFG_GFX_PLUGIN}`
7487 echo "Graphics (qt) ....... ${CFG_GFX_ON}"
7488 echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
7489 CFG_DECORATION_ON
=`echo ${CFG_DECORATION_ON}`
7490 CFG_DECORATION_PLUGIN
=`echo ${CFG_DECORATION_PLUGIN}`
7491 echo "Decorations (qt) .... $CFG_DECORATION_ON"
7492 echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
7493 CFG_KBD_ON
=`echo ${CFG_KBD_ON}`
7494 CFG_KBD_PLUGIN
=`echo ${CFG_KBD_PLUGIN}`
7495 echo "Keyboard driver (qt). ${CFG_KBD_ON}"
7496 echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
7497 CFG_MOUSE_ON
=`echo ${CFG_MOUSE_ON}`
7498 CFG_MOUSE_PLUGIN
=`echo ${CFG_MOUSE_PLUGIN}`
7499 echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
7500 echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
7502 if [ "$CFG_OPENGL" = "desktop" ]; then
7503 echo "OpenGL support ...... yes (Desktop OpenGL)"
7504 elif [ "$CFG_OPENGL" = "es1" ]; then
7505 echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
7506 elif [ "$CFG_OPENGL" = "es1cl" ]; then
7507 echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
7508 elif [ "$CFG_OPENGL" = "es2" ]; then
7509 echo "OpenGL support ...... yes (OpenGL ES 2.x)"
7511 echo "OpenGL support ...... no"
7513 if [ "$CFG_EGL" != "no" ]; then
7514 if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then
7515 echo "EGL support ......... yes <GLES/egl.h>"
7517 echo "EGL support ......... yes <EGL/egl.h>"
7520 if [ "$CFG_OPENVG" ]; then
7521 if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
7522 echo "OpenVG support ...... ShivaVG"
7524 echo "OpenVG support ...... $CFG_OPENVG"
7527 if [ "$PLATFORM_X11" = "yes" ]; then
7528 echo "NAS sound support ... $CFG_NAS"
7529 echo "XShape support ...... $CFG_XSHAPE"
7530 echo "XSync support ....... $CFG_XSYNC"
7531 echo "Xinerama support .... $CFG_XINERAMA"
7532 echo "Xcursor support ..... $CFG_XCURSOR"
7533 echo "Xfixes support ...... $CFG_XFIXES"
7534 echo "Xrandr support ...... $CFG_XRANDR"
7535 echo "Xrender support ..... $CFG_XRENDER"
7536 echo "Xi support .......... $CFG_XINPUT"
7537 echo "MIT-SHM support ..... $CFG_MITSHM"
7538 echo "FontConfig support .. $CFG_FONTCONFIG"
7539 echo "XKB Support ......... $CFG_XKB"
7540 echo "immodule support .... $CFG_IM"
7541 echo "GTK theme support ... $CFG_QGTKSTYLE"
7543 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
7544 [ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
7545 [ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
7546 [ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
7547 [ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
7548 [ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
7549 [ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
7550 [ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
7551 [ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
7554 if [ "$CFG_OPENSSL" = "yes" ]; then
7555 OPENSSL_LINKAGE
="(run-time)"
7556 elif [ "$CFG_OPENSSL" = "linked" ]; then
7557 OPENSSL_LINKAGE
="(linked)"
7559 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
7561 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
7563 # complain about not being able to use dynamic plugins if we are using a static build
7564 if [ "$CFG_SHARED" = "no" ]; then
7566 echo "WARNING: Using static linking will disable the use of dynamically"
7567 echo "loaded plugins. Make sure to import all needed static plugins,"
7568 echo "or compile needed modules into the library."
7571 if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
7573 echo "NOTE: When linking against OpenSSL, you can override the default"
7574 echo "library names through OPENSSL_LIBS."
7576 echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
7579 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
7581 echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
7584 echo "alsa support ........ $CFG_ALSA"
7587 sepath
=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
7592 #-------------------------------------------------------------------------------
7593 # build makefiles based on the configuration
7594 #-------------------------------------------------------------------------------
7596 echo "Finding project files. Please wait..."
7597 "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
7598 if [ -f "${relpath}/projects.pro" ]; then
7599 mkfile
="${outpath}/Makefile"
7600 [ -f "$mkfile" ] && chmod +w
"$mkfile"
7601 QTDIR
="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
7604 # .projects -> projects to process
7605 # .projects.1 -> qt and moc
7606 # .projects.2 -> subdirs and libs
7607 # .projects.3 -> the rest
7608 rm -f .projects .projects
.1 .projects
.2 .projects
.3
7610 QMAKE_PROJECTS
=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
7611 if [ -z "$AWK" ]; then
7612 for p
in `echo $QMAKE_PROJECTS`; do
7613 echo "$p" >> .projects
7616 cat >projects.
awk <<EOF
7622 first = "./.projects.1.tmp"
7623 second = "./.projects.2.tmp"
7624 third = "./.projects.3.tmp"
7629 if ( ! target_file )
7631 print input_file >target_file
7636 input_file = FILENAME
7641 if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
7644 } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
7645 target_file = second
7650 matched_target == 0 && /^(TEMPLATE.*=)/ {
7651 if ( \$3 == "subdirs" )
7652 target_file = second
7653 else if ( \$3 == "lib" )
7659 matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
7660 if ( \$0 ~ /plugin/ )
7663 target_file = second
7668 if ( ! target_file )
7670 print input_file >>target_file
7677 for p
in `echo $QMAKE_PROJECTS`; do
7678 echo "$p" >> .projects.all
7681 # if you get errors about the length of the command line to awk, change the -l arg
7683 split -l 100 .projects.all .projects.all.
7684 for p
in .projects.all.
*; do
7685 "$AWK" -f projects.
awk `cat $p`
7686 [ -f .projects
.1.tmp
] && cat .projects
.1.tmp
>> .projects
.1
7687 [ -f .projects
.2.tmp
] && cat .projects
.2.tmp
>> .projects
.2
7688 [ -f .projects
.3.tmp
] && cat .projects
.3.tmp
>> .projects
.3
7689 rm -f .projects
.1.tmp .projects
.2.tmp .projects
.3.tmp
$p
7691 rm -f .projects.all
* projects.
awk
7693 [ -f .projects
.1 ] && cat .projects
.1 >>.projects
7694 [ -f .projects
.2 ] && cat .projects
.2 >>.projects
7695 rm -f .projects
.1 .projects
.2
7696 if [ -f .projects
.3 ] && [ "$OPT_FAST" = "no" ]; then
7697 cat .projects
.3 >>.projects
7701 # don't sort Qt and MOC in with the other project files
7702 # also work around a segfaulting uniq(1)
7703 if [ -f .sorted.projects
.2 ]; then
7704 sort .sorted.projects
.2 > .sorted.projects
.2.new
7705 mv -f .sorted.projects
.2.new .sorted.projects
.2
7706 cat .sorted.projects
.2 >> .sorted.projects
.1
7708 [ -f .sorted.projects
.1 ] && sort .sorted.projects
.1 >> .sorted.projects
7709 rm -f .sorted.projects
.2 .sorted.projects
.1
7713 if [ -f .projects
]; then
7714 uniq .projects
>.tmp
7715 mv -f .tmp .projects
7716 NORM_PROJECTS
=`cat .projects | wc -l | sed -e "s, ,,g"`
7718 if [ -f .projects
.3 ]; then
7719 uniq .projects
.3 >.tmp
7720 mv -f .tmp .projects
.3
7721 FAST_PROJECTS
=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
7723 echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
7727 for part
in $CFG_BUILD_PARTS; do
7729 tools
) PART_ROOTS
="$PART_ROOTS tools" ;;
7730 libs
) PART_ROOTS
="$PART_ROOTS src" ;;
7731 translations
) PART_ROOTS
="$PART_ROOTS tools/linguist/lrelease translations" ;;
7732 examples
) PART_ROOTS
="$PART_ROOTS examples demos" ;;
7737 if [ "$CFG_DEV" = "yes" ]; then
7738 PART_ROOTS
="$PART_ROOTS tests"
7741 echo "Creating makefiles. Please wait..."
7742 for file in .projects .projects
.3; do
7743 [ '!' -f "$file" ] && continue
7744 for a
in `cat $file`; do
7746 for r
in $PART_ROOTS; do
7747 if echo "$a" |
grep "^$r" >/dev
/null
2>&1 ||
echo "$a" |
grep "^$relpath/$r" >/dev
/null
2>&1; then
7752 [ "$IN_ROOT" = "no" ] && continue
7755 *winmain
/winmain.pro
) continue ;;
7756 *s60main
/s60main.pro
) continue ;;
7757 *examples
/activeqt
/*) continue ;;
7758 */qmake
/qmake.pro
) continue ;;
7759 *tools
/bootstrap
*|
*tools
/moc
*|
*tools
/rcc
*|
*tools
/uic
*|
*linguist
/lrelease
*) SPEC
=$QMAKESPEC ;;
7760 *) SPEC
=$XQMAKESPEC ;;
7762 dir
=`dirname "$a" | sed -e "s;$sepath;.;g"`
7763 test -d "$dir" || mkdir
-p "$dir"
7764 OUTDIR
="$outpath/$dir"
7765 if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
7766 # fast configure - the makefile exists, skip it
7767 # since the makefile exists, it was generated by qmake, which means we
7768 # can skip it, since qmake has a rule to regenerate the makefile if the .pro
7770 [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
7773 QMAKE_SPEC_ARGS
="-spec $SPEC"
7774 if echo '\c' |
grep '\c' >/dev
/null
; then
7780 QMAKE
="$outpath/bin/qmake"
7781 QMAKE_ARGS
="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
7782 if [ "$file" = ".projects.3" ]; then
7783 if echo '\c' |
grep '\c' >/dev
/null
; then
7790 cat >"${OUTDIR}/Makefile" <<EOF
7791 # ${OUTDIR}/Makefile: generated by configure
7793 # WARNING: This makefile will be replaced with a real makefile.
7794 # All changes made to this file will be lost.
7796 [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
7798 cat >>"${OUTDIR}/Makefile" <<EOF
7800 all clean install qmake first Makefile: FORCE
7801 \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
7809 if [ "$OPT_VERBOSE" = "yes" ]; then
7810 echo " (`basename $SPEC`)"
7811 echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7816 [ -f "${OUTDIR}/Makefile" ] && chmod +w
"${OUTDIR}/Makefile"
7817 QTDIR
="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
7821 rm -f .projects .projects
.3
7823 #-------------------------------------------------------------------------------
7824 # XShape is important, DnD in the Designer doens't work without it
7825 #-------------------------------------------------------------------------------
7826 if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
7829 NOTICE: Qt will not be built with XShape support.
7831 As a result, drag-and-drop in the Qt Designer will NOT
7832 work. We recommend that you enable XShape support by passing
7833 the -xshape switch to $0.
7837 #-------------------------------------------------------------------------------
7838 # check for platforms that we don't yet know about
7839 #-------------------------------------------------------------------------------
7840 if [ "$CFG_ARCH" = "generic" ]; then
7843 NOTICE: Atomic operations are not yet supported for this
7846 Qt will use the 'generic' architecture instead, which uses a
7847 single pthread_mutex_t to protect all atomic operations. This
7848 implementation is the slow (but safe) fallback implementation
7849 for architectures Qt does not yet support.
7853 #-------------------------------------------------------------------------------
7854 # check if the user passed the -no-zlib option, which is no longer supported
7855 #-------------------------------------------------------------------------------
7856 if [ -n "$ZLIB_FORCED" ]; then
7857 which_zlib
="supplied"
7858 if [ "$CFG_ZLIB" = "system" ]; then
7864 NOTICE: The -no-zlib option was supplied but is no longer
7867 Qt now requires zlib support in all builds, so the -no-zlib
7868 option was ignored. Qt will be built using the $which_zlib
7873 #-------------------------------------------------------------------------------
7874 # finally save the executed command to another script
7875 #-------------------------------------------------------------------------------
7876 if [ `basename $0` != "config.status" ]; then
7877 CONFIG_STATUS
="$relpath/$relconf $OPT_CMDLINE"
7879 # add the system variables
7880 for varname
in $SYSTEM_VARIABLES; do
7882 'if [ -n "\$'${varname}'" ]; then
7883 CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
7888 echo "$CONFIG_STATUS" |
grep '\-confirm\-license' >/dev
/null
2>&1 || CONFIG_STATUS
="$CONFIG_STATUS -confirm-license"
7890 [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
7891 echo "#!/bin/sh" > "$outpath/config.status"
7892 echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
7893 echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
7894 echo "else" >> "$outpath/config.status"
7895 echo " $CONFIG_STATUS" >> "$outpath/config.status"
7896 echo "fi" >> "$outpath/config.status"
7897 chmod +x
"$outpath/config.status"
7900 if [ -n "$RPATH_MESSAGE" ]; then
7902 echo "$RPATH_MESSAGE"
7905 MAKE
=`basename "$MAKE"`
7907 echo Qt is now configured
for building. Just run
\'$MAKE\'.
7908 if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
7909 echo Once everything is built
, Qt is installed.
7910 echo You should not run
\'$MAKE install\'.
7912 echo Once everything is built
, you must run
\'$MAKE install\'.
7913 echo Qt will be installed into
$QT_INSTALL_PREFIX
7916 echo To reconfigure
, run
\'$MAKE confclean
\' and
\'configure
\'.